From cc9ff059de0aab70c69fd311b9e57a97c82f48d9 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 12 Sep 2017 09:49:56 +0800 Subject: [PATCH 01/14] add --- dist/biconst.js | 668 ------------------------------------------ dist/index.html | 6 +- dist/vancharts-all.js | 167 ----------- 3 files changed, 3 insertions(+), 838 deletions(-) delete mode 100644 dist/biconst.js delete mode 100644 dist/vancharts-all.js diff --git a/dist/biconst.js b/dist/biconst.js deleted file mode 100644 index 411442bcb..000000000 --- a/dist/biconst.js +++ /dev/null @@ -1,668 +0,0 @@ -BICst.DATE_TYPE = {}; -BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV = 1; -BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER = 2; -BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN = 3; -BICst.DATE_TYPE.MULTI_DATE_YEAR_END = 4; -BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV = 5; -BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER = 6; -BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN = 7; -BICst.DATE_TYPE.MULTI_DATE_MONTH_END = 8; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV = 9; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER = 10; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN = 11; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_END = 12; -BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV = 13; -BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER = 14; -BICst.DATE_TYPE.MULTI_DATE_DAY_PREV = 15; -BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER = 16; -BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY = 17; -BICst.DATE_TYPE.MULTI_DATE_PARAM = 18; -BICst.DATE_TYPE.MULTI_DATE_CALENDAR = 19; -BICst.DATE_TYPE.YEAR_QUARTER = 20; -BICst.DATE_TYPE.YEAR_MONTH = 21; -BICst.DATE_TYPE.YEAR_WEEK = 22; -BICst.DATE_TYPE.YEAR_DAY = 23; -BICst.DATE_TYPE.MONTH_WEEK = 24; -BICst.DATE_TYPE.MONTH_DAY = 25; -BICst.DATE_TYPE.YEAR = 26; -BICst.DATE_TYPE.SAME_PERIOD = 27; -BICst.DATE_TYPE.LAST_SAME_PERIOD = 28; -BICst.DATE_FORMAT = {}; -BICst.DATE_FORMAT.SPLIT = 1; -BICst.DATE_FORMAT.CHINESE = 2; -BICst.RES_STATUS = {}; -BICst.RES_STATUS.NORMAL = 1; -BICst.RES_STATUS.ERROR = 2; -BICst.RES_STATUS.DATA_MISS = 3; -BICst.RES_STATUS.NO_AUTHORITY = 4; -BICst.RES_STATUS.NO_DATA = 5; -BICst.REPORT_AUTH = {}; -BICst.REPORT_AUTH.NONE = 0; -BICst.REPORT_AUTH.EDIT = 1; -BICst.REPORT_AUTH.VIEW = 2; -BICst.TARGET_STYLE = {}; -BICst.TARGET_STYLE.ICON_STYLE = {}; -BICst.TARGET_STYLE.ICON_STYLE.NONE = 1; -BICst.TARGET_STYLE.ICON_STYLE.POINT = 2; -BICst.TARGET_STYLE.ICON_STYLE.ARROW = 3; -BICst.TARGET_STYLE.NUM_LEVEL = {}; -BICst.TARGET_STYLE.NUM_LEVEL.NORMAL = 1; -BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND = 2; -BICst.TARGET_STYLE.NUM_LEVEL.MILLION = 3; -BICst.TARGET_STYLE.NUM_LEVEL.YI = 4; -BICst.TARGET_STYLE.NUM_LEVEL.PERCENT = 5; -BICst.TARGET_STYLE.FORMAT = {}; -BICst.TARGET_STYLE.FORMAT.NORMAL = -1; -BICst.TARGET_STYLE.FORMAT.ZERO2POINT = 0; -BICst.TARGET_STYLE.FORMAT.ONE2POINT = 1; -BICst.TARGET_STYLE.FORMAT.TWO2POINT = 2; -BICst.MULTI_PATH_STATUS = {}; -BICst.MULTI_PATH_STATUS.NEED_GENERATE_CUBE = 0; -BICst.MULTI_PATH_STATUS.NOT_NEED_GENERATE_CUBE = 1; -BICst.CUSTOM_GROUP = {}; -BICst.CUSTOM_GROUP.UNGROUP2OTHER = {}; -BICst.CUSTOM_GROUP.UNGROUP2OTHER.NOTSELECTED = 0; -BICst.CUSTOM_GROUP.UNGROUP2OTHER.SELECTED = 1; -BICst.REPORT_STATUS = {}; -BICst.REPORT_STATUS.APPLYING = 1; -BICst.REPORT_STATUS.HANGOUT = 2; -BICst.REPORT_STATUS.NORMAL = 3; -BICst.FIELD_ID = {}; -BICst.FIELD_ID.HEAD = "81c48028-1401-11e6-a148-3e1d05defe78"; -BICst.TREE_LABEL = {}; -BICst.TREE_LABEL.TREE_LABEL_ITEM_COUNT_NUM = 40; -BICst.TREE = {}; -BICst.TREE.TREE_REQ_TYPE = {}; -BICst.TREE.TREE_REQ_TYPE.DEFAULT_DATA = 0; -BICst.TREE.TREE_REQ_TYPE.INIT_DATA = 1; -BICst.TREE.TREE_REQ_TYPE.SELECT_DATA = 3; -BICst.TREE.TREE_REQ_TYPE.ADJUST_DATA = 2; -BICst.TREE.TREE_REQ_TYPE.GET_SELECTED_DATA = 4; -BICst.TREE.TREE_REQ_TYPE.UNSELECT_DATA = 5; -BICst.TREE.TREE_ITEM_COUNT_PER_PAGE = 100; -BICst.BUSINESS_TABLE_TYPE = {}; -BICst.BUSINESS_TABLE_TYPE.NORMAL = 0; -BICst.EXPANDER_TYPE = {}; -BICst.EXPANDER_TYPE.NONE = false; -BICst.EXPANDER_TYPE.ALL = true; -BICst.SORT = {}; -BICst.SORT.ASC = 0; -BICst.SORT.DESC = 1; -BICst.SORT.CUSTOM = 2; -BICst.SORT.NONE = 3; -BICst.SORT.NUMBER_ASC = 4; -BICst.SORT.NUMBER_DESC = 5; -BICst.TABLE_PAGE_OPERATOR = {}; -BICst.TABLE_PAGE_OPERATOR.ALL_PAGE = -1; -BICst.TABLE_PAGE_OPERATOR.REFRESH = 0; -BICst.TABLE_PAGE_OPERATOR.COLUMN_PRE = 1; -BICst.TABLE_PAGE_OPERATOR.COLUMN_NEXT = 2; -BICst.TABLE_PAGE_OPERATOR.ROW_PRE = 3; -BICst.TABLE_PAGE_OPERATOR.ROW_NEXT = 4; -BICst.TABLE_PAGE_OPERATOR.EXPAND = 5; -BICst.TABLE_PAGE = {}; -BICst.TABLE_PAGE.VERTICAL_PRE = 0; -BICst.TABLE_PAGE.VERTICAL_NEXT = 1; -BICst.TABLE_PAGE.HORIZON_PRE = 2; -BICst.TABLE_PAGE.HORIZON_NEXT = 3; -BICst.TABLE_PAGE.TOTAL_PAGE = 4; -BICst.TABLE_WIDGET = {}; -BICst.TABLE_WIDGET.GROUP_TYPE = 1; -BICst.TABLE_WIDGET.CROSS_TYPE = 2; -BICst.TABLE_WIDGET.COMPLEX_TYPE = 3; -BICst.REGION = {}; -BICst.REGION.DIMENSION1 = "10000"; -BICst.REGION.DIMENSION2 = "20000"; -BICst.REGION.TARGET1 = "30000"; -BICst.REGION.TARGET2 = "40000"; -BICst.REGION.TARGET3 = "50000"; -BICst.EXPORT = {}; -BICst.EXPORT.EXCEL = 1; -BICst.EXPORT.PDF = 2; -BICst.WIDGET = {}; -BICst.WIDGET.TABLE = 1; -BICst.WIDGET.CROSS_TABLE = 2; -BICst.WIDGET.COMPLEX_TABLE = 3; -BICst.WIDGET.DETAIL = 4; -BICst.WIDGET.AXIS = 5; -BICst.WIDGET.ACCUMULATE_AXIS = 6; -BICst.WIDGET.PERCENT_ACCUMULATE_AXIS = 7; -BICst.WIDGET.COMPARE_AXIS = 8; -BICst.WIDGET.FALL_AXIS = 9; -BICst.WIDGET.BAR = 10; -BICst.WIDGET.ACCUMULATE_BAR = 11; -BICst.WIDGET.COMPARE_BAR = 12; -BICst.WIDGET.LINE = 13; -BICst.WIDGET.AREA = 14; -BICst.WIDGET.ACCUMULATE_AREA = 15; -BICst.WIDGET.PERCENT_ACCUMULATE_AREA = 16; -BICst.WIDGET.COMPARE_AREA = 17; -BICst.WIDGET.RANGE_AREA = 18; -BICst.WIDGET.COMBINE_CHART = 19; -BICst.WIDGET.MULTI_AXIS_COMBINE_CHART = 20; -BICst.WIDGET.PIE = 21; -BICst.WIDGET.DONUT = 22; -BICst.WIDGET.MAP = 23; -BICst.WIDGET.GIS_MAP = 24; -BICst.WIDGET.DASHBOARD = 25; -BICst.WIDGET.BUBBLE = 26; -BICst.WIDGET.SCATTER = 28; -BICst.WIDGET.FORCE_BUBBLE = 27; -BICst.WIDGET.RADAR = 29; -BICst.WIDGET.ACCUMULATE_RADAR = 30; -BICst.WIDGET.FUNNEL = 31; -BICst.WIDGET.RECT_TREE = 39; -BICst.WIDGET.MULTI_PIE = 40; -BICst.WIDGET.HEAT_MAP = 65; -BICst.WIDGET.PARETO = 66; -BICst.WIDGET.DOT = 67; -BICst.WIDGET.STRING = 32; -BICst.WIDGET.NUMBER = 33; -BICst.WIDGET.TREE = 34; -BICst.WIDGET.SINGLE_SLIDER = 35; -BICst.WIDGET.INTERVAL_SLIDER = 36; -BICst.WIDGET.LIST_LABEL = 37; -BICst.WIDGET.TREE_LABEL = 38; -BICst.WIDGET.STRING_LIST = 59; -BICst.WIDGET.TREE_LIST = 60; -BICst.WIDGET.DATE_PANE = 61; -BICst.WIDGET.DATE = 48; -BICst.WIDGET.YEAR = 49; -BICst.WIDGET.QUARTER = 50; -BICst.WIDGET.MONTH = 51; -BICst.WIDGET.YMD = 52; -BICst.WIDGET.QUERY = 53; -BICst.WIDGET.RESET = 54; -BICst.WIDGET.CONTENT = 55; -BICst.WIDGET.IMAGE = 56; -BICst.WIDGET.WEB = 57; -BICst.WIDGET.GENERAL_QUERY = 58; -BICst.WIDGET.TABLE_SHOW = 64; -BICst.WIDGET.NONE = -1; -BICst.TARGET_TYPE = {}; -BICst.TARGET_TYPE.CAL_POSITION = {}; -BICst.TARGET_TYPE.CAL_POSITION.ALL = 0; -BICst.TARGET_TYPE.CAL_POSITION.INGROUP = 1; -BICst.TARGET_TYPE.CAL_VALUE = {}; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE = {}; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE.VALUE = 0; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE.RATE = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE = {}; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.SUM = 0; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.MAX = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.MIN = 2; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.AVG = 3; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE = {}; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE.ASC = 0; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE.DESC = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUM_OF_ALL = 0; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUM_OF_ABOVE = 2; -BICst.TARGET_TYPE.CAL_VALUE.RANK = 3; -BICst.TARGET_TYPE.CAL = {}; -BICst.TARGET_TYPE.CAL.FORMULA = 0; -BICst.TARGET_TYPE.CAL.CONFIGURATION = 1; -BICst.TARGET_TYPE.STRING = 1; -BICst.TARGET_TYPE.NUMBER = 2; -BICst.TARGET_TYPE.DATE = 3; -BICst.TARGET_TYPE.COUNTER = 4; -BICst.TARGET_TYPE.FORMULA = 5; -BICst.TARGET_TYPE.YEAR_ON_YEAR_RATE = 6; -BICst.TARGET_TYPE.MONTH_ON_MONTH_RATE = 7; -BICst.TARGET_TYPE.YEAR_ON_YEAR_VALUE = 8; -BICst.TARGET_TYPE.MONTH_ON_MONTH_VALUE = 9; -BICst.TARGET_TYPE.SUM_OF_ABOVE = 10; -BICst.TARGET_TYPE.SUM_OF_ABOVE_IN_GROUP = 11; -BICst.TARGET_TYPE.SUM_OF_ALL = 12; -BICst.TARGET_TYPE.SUM_OF_ALL_IN_GROUP = 13; -BICst.TARGET_TYPE.RANK = 14; -BICst.TARGET_TYPE.RANK_IN_GROUP = 15; -BICst.DIMENSION_FILTER_DATE = {}; -BICst.DIMENSION_FILTER_DATE.BELONG_VALUE = 98; -BICst.DIMENSION_FILTER_DATE.NOT_BELONG_VALUE = 99; -BICst.DIMENSION_FILTER_DATE.IS_NULL = 100; -BICst.DIMENSION_FILTER_DATE.NOT_NULL = 101; -BICst.DIMENSION_FILTER_DATE.TOP_N = 102; -BICst.DIMENSION_FILTER_DATE.BOTTOM_N = 103; -BICst.DIMENSION_FILTER_DATE.CONTAIN = 104; -BICst.DIMENSION_FILTER_DATE.NOT_CONTAIN = 105; -BICst.DIMENSION_FILTER_DATE.BEGIN_WITH = 106; -BICst.DIMENSION_FILTER_DATE.END_WITH = 107; -BICst.FILTER_TYPE = {}; -BICst.FILTER_TYPE.AND = 80; -BICst.FILTER_TYPE.OR = 81; -BICst.FILTER_TYPE.FORMULA = 82; -BICst.FILTER_TYPE.EMPTY_FORMULA = 90; -BICst.FILTER_TYPE.EMPTY_CONDITION = 91; -BICst.FILTER_TYPE.NUMBER_SUM = 83; -BICst.FILTER_TYPE.NUMBER_AVG = 84; -BICst.FILTER_TYPE.NUMBER_MAX = 85; -BICst.FILTER_TYPE.NUMBER_MIN = 86; -BICst.FILTER_TYPE.NUMBER_COUNT = 87; -BICst.FILTER_TYPE.TREE_FILTER = 88; -BICst.FILTER_TYPE.COLUMNFILTER = 89; -BICst.FILTER_TYPE.DIMENSION_TARGET_VALUE_FILTER = 96; -BICst.FILTER_TYPE.DIMENSION_SELF_FILTER = 97; -BICst.FILTER_DATE = {}; -BICst.FILTER_DATE.BELONG_DATE_RANGE = 64; -BICst.FILTER_DATE.BELONG_WIDGET_VALUE = 65; -BICst.FILTER_DATE.NOT_BELONG_DATE_RANGE = 66; -BICst.FILTER_DATE.NOT_BELONG_WIDGET_VALUE = 67; -BICst.FILTER_DATE.MORE_THAN = 68; -BICst.FILTER_DATE.LESS_THAN = 69; -BICst.FILTER_DATE.EQUAL_TO = 70; -BICst.FILTER_DATE.NOT_EQUAL_TO = 71; -BICst.FILTER_DATE.IS_NULL = 72; -BICst.FILTER_DATE.NOT_NULL = 73; -BICst.FILTER_DATE.EARLY_THAN = 74; -BICst.FILTER_DATE.LATER_THAN = 75; -BICst.FILTER_DATE.CONTAINS = 76; -BICst.FILTER_DATE.CONTAINS_DAY = 77; -BICst.FILTER_DATE.DAY_EQUAL_TO = 78; -BICst.FILTER_DATE.DAY_NOT_EQUAL_TO = 79; -BICst.TARGET_FILTER_NUMBER = {}; -BICst.TARGET_FILTER_NUMBER.EQUAL_TO = 48; -BICst.TARGET_FILTER_NUMBER.NOT_EQUAL_TO = 49; -BICst.TARGET_FILTER_NUMBER.BELONG_VALUE = 50; -BICst.TARGET_FILTER_NUMBER.BELONG_USER = 51; -BICst.TARGET_FILTER_NUMBER.NOT_BELONG_VALUE = 52; -BICst.TARGET_FILTER_NUMBER.NOT_BELONG_USER = 53; -BICst.TARGET_FILTER_NUMBER.IS_NULL = 54; -BICst.TARGET_FILTER_NUMBER.NOT_NULL = 55; -BICst.TARGET_FILTER_NUMBER.CONTAINS = 56; -BICst.TARGET_FILTER_NUMBER.NOT_CONTAINS = 57; -BICst.TARGET_FILTER_NUMBER.LARGE_THAN_CAL_LINE = 58; -BICst.TARGET_FILTER_NUMBER.LARGE_OR_EQUAL_CAL_LINE = 59; -BICst.TARGET_FILTER_NUMBER.SMALL_THAN_CAL_LINE = 60; -BICst.TARGET_FILTER_NUMBER.SMALL_OR_EQUAL_CAL_LINE = 61; -BICst.TARGET_FILTER_NUMBER.TOP_N = 62; -BICst.TARGET_FILTER_NUMBER.BOTTOM_N = 63; -BICst.TARGET_FILTER_STRING = {}; -BICst.TARGET_FILTER_STRING.BELONG_VALUE = 32; -BICst.TARGET_FILTER_STRING.BELONG_USER = 33; -BICst.TARGET_FILTER_STRING.NOT_BELONG_VALUE = 34; -BICst.TARGET_FILTER_STRING.NOT_BELONG_USER = 35; -BICst.TARGET_FILTER_STRING.CONTAIN = 36; -BICst.TARGET_FILTER_STRING.NOT_CONTAIN = 37; -BICst.TARGET_FILTER_STRING.IS_NULL = 38; -BICst.TARGET_FILTER_STRING.NOT_NULL = 39; -BICst.TARGET_FILTER_STRING.BEGIN_WITH = 40; -BICst.TARGET_FILTER_STRING.END_WITH = 41; -BICst.TARGET_FILTER_STRING.NOT_BEGIN_WITH = 42; -BICst.TARGET_FILTER_STRING.NOT_END_WITH = 43; -BICst.TARGET_FILTER_STRING.VAGUE_CONTAIN = 46; -BICst.TARGET_FILTER_STRING.NOT_VAGUE_CONTAIN = 47; -BICst.DIMENSION_FILTER_NUMBER = {}; -BICst.DIMENSION_FILTER_NUMBER.BELONG_VALUE = 16; -BICst.DIMENSION_FILTER_NUMBER.BELONG_USER = 17; -BICst.DIMENSION_FILTER_NUMBER.NOT_BELONG_VALUE = 18; -BICst.DIMENSION_FILTER_NUMBER.NOT_BELONG_USER = 19; -BICst.DIMENSION_FILTER_NUMBER.MORE_THAN_AVG = 20; -BICst.DIMENSION_FILTER_NUMBER.LESS_THAN_AVG = 21; -BICst.DIMENSION_FILTER_NUMBER.IS_NULL = 22; -BICst.DIMENSION_FILTER_NUMBER.NOT_NULL = 23; -BICst.DIMENSION_FILTER_NUMBER.TOP_N = 24; -BICst.DIMENSION_FILTER_NUMBER.BOTTOM_N = 25; -BICst.DIMENSION_FILTER_STRING = {}; -BICst.DIMENSION_FILTER_STRING.BELONG_VALUE = 0; -BICst.DIMENSION_FILTER_STRING.BELONG_USER = 1; -BICst.DIMENSION_FILTER_STRING.NOT_BELONG_VALUE = 2; -BICst.DIMENSION_FILTER_STRING.NOT_BELONG_USER = 3; -BICst.DIMENSION_FILTER_STRING.CONTAIN = 4; -BICst.DIMENSION_FILTER_STRING.NOT_CONTAIN = 5; -BICst.DIMENSION_FILTER_STRING.IS_NULL = 6; -BICst.DIMENSION_FILTER_STRING.NOT_NULL = 7; -BICst.DIMENSION_FILTER_STRING.BEGIN_WITH = 8; -BICst.DIMENSION_FILTER_STRING.END_WITH = 9; -BICst.DIMENSION_FILTER_STRING.TOP_N = 10; -BICst.DIMENSION_FILTER_STRING.BOTTOM_N = 11; -BICst.DIMENSION_FILTER_STRING.NOT_BEGIN_WITH = 12; -BICst.DIMENSION_FILTER_STRING.NOT_END_WITH = 13; -BICst.DIMENSION_FILTER_STRING.VAGUE_CONTAIN = 14; -BICst.DIMENSION_FILTER_STRING.NOT_VAGUE_CONTAIN = 15; -BICst.GROUP = {}; -BICst.GROUP.NO_GROUP = 0; -BICst.GROUP.AUTO_GROUP = 3; -BICst.GROUP.CUSTOM_GROUP = 4; -BICst.GROUP.CUSTOM_NUMBER_GROUP = 5; -BICst.GROUP.Y = 6; -BICst.GROUP.S = 7; -BICst.GROUP.M = 8; -BICst.GROUP.W = 9; -BICst.GROUP.YMD = 10; -BICst.GROUP.YD = 11; -BICst.GROUP.MD = 12; -BICst.GROUP.YMDHMS = 13; -BICst.GROUP.ID_GROUP = 14; -BICst.GROUP.HOUR = 15; -BICst.GROUP.MINUTE = 16; -BICst.GROUP.SECOND = 17; -BICst.GROUP.WEEK_COUNT = 18; -BICst.GROUP.D = 19; -BICst.GROUP.YM = 20; -BICst.GROUP.YW = 21; -BICst.GROUP.YMDH = 22; -BICst.GROUP.YMDHM = 23; -BICst.GROUP.YS = 24; -BICst.SUMMARY_TYPE = {}; -BICst.SUMMARY_TYPE.SUM = 0; -BICst.SUMMARY_TYPE.MAX = 1; -BICst.SUMMARY_TYPE.MIN = 2; -BICst.SUMMARY_TYPE.AVG = 3; -BICst.SUMMARY_TYPE.COUNT = 4; -BICst.SUMMARY_TYPE.APPEND = 5; -BICst.SUMMARY_TYPE.RECORD_COUNT = 6; -BICst.BI_REPORT = {}; -BICst.BI_REPORT.NULL = 0; -BICst.BI_REPORT.SUBMITED = 1; -BICst.BI_REPORT.PUBLISHED = 2; -BICst.VERSION = "4.0.2"; -BICst.SYSTEM_TIME = "__system_time-3e1d05defe78__"; - -BICst.ETL_ADD_COLUMN_TYPE = {}; -BICst.ETL_ADD_COLUMN_TYPE.FORMULA = "formula"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_DIFF = "date_diff"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_YEAR = "date_year"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_SEASON = "date_season"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_MONTH = "date_month"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_CPP = "expr_same_period"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_LP = "expr_last_period"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_CPP_PERCENT = "expr_same_period_percent"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_LP_PERCENT = "expr_last_period_percent"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_SUM = "expr_sum"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_ACC = "expr_acc"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_RANK = "expr_rank"; -BICst.ETL_ADD_COLUMN_TYPE.GROUP = "group_value"; -BICst.ETL_ADD_COLUMN_TYPE.SINGLE_VALUE = "single_value"; -BICst.ETL_ADD_COLUMN_TYPE.VALUE_CONVERT = "value_convert"; -BICst.JSON_KEYS = {}; -BICst.JSON_KEYS.STATISTIC_ELEMENT = "_src"; -BICst.JSON_KEYS.FILED_MAX_VALUE = "max"; -BICst.JSON_KEYS.FIELD_MIN_VALUE = "min"; -BICst.JSON_KEYS.FILTER_VALUE = "filterValue"; -BICst.JSON_KEYS.FILTER_CONDITION = "condition"; -BICst.JSON_KEYS.FILTER_AND_OR = "andor"; -BICst.JSON_KEYS.FILTER_TYPE = "filterType"; -BICst.JSON_KEYS.FIELD_ID = "fieldId"; -BICst.JSON_KEYS.FIELD_TYPE = "fieldType"; -BICst.JSON_KEYS.FIELD_VALUE = "field_value"; -BICst.JSON_KEYS.FIELD_NAME = "fieldName"; -BICst.JSON_KEYS.TYPE = "type"; -BICst.JSON_KEYS.VALUE = "value"; -BICst.JSON_KEYS.EXPANDER = "expander"; -BICst.JSON_KEYS.EXPANDER_X = "x"; -BICst.JSON_KEYS.EXPANDER_Y = "y"; -BICst.JSON_KEYS.CLICKEDVALUE = "clickedvalue"; -BICst.JSON_KEYS.SETTTINGS = "settings"; -BICst.JSON_KEYS.ID = "id"; -BICst.JSON_KEYS.TABLES = "tables"; -BICst.JSON_KEYS.TABLE = "table"; -BICst.JSON_KEYS.FIELDS = "fields"; -BICst.JSON_KEYS.FIELD = "field"; -BICst.JSON_KEYS.ETL_TYPE = "etlType"; -BICst.JSON_KEYS.ETL_VALUE = "etlValue"; -BICst.JSON_KEYS.TABLE_TYPE = "table_type"; -BICst.JSON_KEYS.HAS_NEXT = "hasNext"; -BICst.JSON_KEYS.CONNECTION_SET = "connectionSet"; -BICst.JSON_KEYS.PRIMARY_KEY_MAP = "primKeyMap"; -BICst.JSON_KEYS.FOREIGN_KEY_MAP = "foreignKeyMap"; - -BICst.CUSTOM_FORMAT = {}; -BICst.CUSTOM_FORMAT.VALUEFORMAT = "(window.BH ? BH.contentFormat(this.value, '#.##;-#.##') : this.value)"; -BICst.CUSTOM_FORMAT.PERCENTVALUEFORMAT = "(window.BH ? BH.contentFormat(this.value, '#0.00%') : this.value)"; -BICst.CUSTOM_FORMAT.THISPERCENTVALUEFORMAT = "(window.BH ? BH.contentFormat(this, '#0.00%') : this)"; -BICst.CUSTOM_FORMAT.NUMSEPARATORS = "(window.BH ? BH.contentFormat(this.value, '#,###.##') : this.value)"; -BICst.CUSTOM_FORMAT.PERCENTNUMSEPARATORS = "(window.BH ? BH.contentFormat(this.value, '#,##0%') : this.value)"; -BICst.CUSTOM_FORMAT.THISPERCENTNUMSEPARATORS = "(window.BH ? BH.contentFormat(this, '#,##0%') : this)"; -BICst.DEFAULT_FORMAT_FUNCTIONS = {}; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMAT = "function(){return window.BH ? BH.contentFormat(arguments[0], '') : arguments[0]}"; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMAT2DECIMAL = "function () {return window.BH ? BH.contentFormat(arguments[0], '#.##') : arguments[0]}"; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMATPERCENTAGE = "function(){return window.BH ? BH.contentFormat(arguments[0], '#.##%') : arguments[0]}"; -BICst.LENEGD_DEFAULT_COLOR = {}; -BICst.LENEGD_DEFAULT_COLOR.COLOR_A = "#65B3EE"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_B = "#95E1AA"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_C = "#F8D08E"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_D = "#e697c8"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_E = "#a484b9"; -BICst.CHART_COLOR = {}; -BICst.CHART_COLOR.COLOR_A = "#5caae4"; -BICst.CHART_COLOR.COLOR_B = "#70cc7f"; -BICst.CHART_COLOR.COLOR_C = "#ebbb67"; -BICst.CHART_COLOR.COLOR_D = "#e97e7b"; -BICst.CHART_COLOR.COLOR_E = "#6ed3c9"; -BICst.DISPLAY_RULES = {}; -BICst.DISPLAY_RULES.DIMENSION = 1; -BICst.DISPLAY_RULES.FIXED = 2; -BICst.DISPLAY_RULES.GRADIENT = 3; -BICst.LINE_WIDTH = {}; -BICst.LINE_WIDTH.ZERO = 0; -BICst.LINE_WIDTH.ONE = 1; -BICst.POINTER = {}; -BICst.POINTER.ONE = 1; -BICst.POINTER.SOME = 2; -BICst.CHART_TARGET_STYLE = {}; -BICst.CHART_TARGET_STYLE.NUM_LEVEL = {}; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.NORMAL = 1; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND = 2; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.MILLION = 3; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.YI = 4; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.PERCENT = 5; -BICst.CHART_TARGET_STYLE.FORMAT = {}; -BICst.CHART_TARGET_STYLE.FORMAT.NORMAL = 1; -BICst.CHART_TARGET_STYLE.FORMAT.ZERO2POINT = 2; -BICst.CHART_TARGET_STYLE.FORMAT.ONE2POINT = 3; -BICst.CHART_TARGET_STYLE.FORMAT.TWO2POINT = 4; -BICst.DOT_VALUE_TYPE = {}; -BICst.DOT_VALUE_TYPE.SIZE = 1; -BICst.DOT_VALUE_TYPE.COLOR = 2; -BICst.ACCUMULATE_TYPE = {}; -BICst.ACCUMULATE_TYPE.COLUMN = 1; -BICst.ACCUMULATE_TYPE.STACKED_COLUMN = 2; -BICst.ACCUMULATE_TYPE.AREA_NORMAL = 3; -BICst.ACCUMULATE_TYPE.AREA_CURVE = 4; -BICst.ACCUMULATE_TYPE.AREA_RIGHT_ANGLE = 5; -BICst.ACCUMULATE_TYPE.STACKED_AREA_NORMAL = 6; -BICst.ACCUMULATE_TYPE.STACKED_AREA_CURVE = 7; -BICst.ACCUMULATE_TYPE.STACKED_AREA_RIGHT_ANGLE = 8; -BICst.ACCUMULATE_TYPE.LINE_NORMAL = 9; -BICst.ACCUMULATE_TYPE.LINE_CURVE = 10; -BICst.ACCUMULATE_TYPE.LINE_RIGHT_ANGLE = 11; -BICst.DATA_LABEL = {}; -BICst.DATA_LABEL.POSITION_INNER = 1; -BICst.DATA_LABEL.POSITION_OUTER = 2; -BICst.DATA_LABEL.POSITION_CENTER = 2; -BICst.DOT_STYLE = {}; -BICst.DOT_STYLE.SQUARE = 1; -BICst.DOT_STYLE.TRIANGLE = 2; -BICst.CHART_SHAPE = {}; -BICst.CHART_SHAPE.NORMAL = 1; -BICst.CHART_SHAPE.RIGHT_ANGLE = 2; -BICst.CHART_SHAPE.CURVE = 3; -BICst.CHART_SHAPE.EQUAL_ARC_ROSE = 4; -BICst.CHART_SHAPE.NOT_EQUAL_ARC_ROSE = 5; -BICst.CHART_SHAPE.CIRCLE = 6; -BICst.CHART_SHAPE.POLYGON = 7; -BICst.CHART_SHAPE.HALF_DASHBOARD = 9; -BICst.CHART_SHAPE.PERCENT_DASHBOARD = 10; -BICst.CHART_SHAPE.PERCENT_SCALE_SLOT = 11; -BICst.CHART_SHAPE.VERTICAL_TUBE = 12; -BICst.CHART_SHAPE.HORIZONTAL_TUBE = 13; -BICst.CHART_SHAPE.NO_PROJECTOR = 16; -BICst.CHART_SHAPE.PROJECTOR = 17; -BICst.DASHBOARD_CHART_STYLE_AUTO = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.COLOR = ""; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.COLOR = ""; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.COLOR = ""; -BICst.PERCENTAGE = {}; -BICst.PERCENTAGE.SHOW = 1; -BICst.PERCENTAGE.NOT_SHOW = 2; -BICst.CHART_LEGENDS = {}; -BICst.CHART_LEGENDS.NOT_SHOW = 1; -BICst.CHART_LEGENDS.TOP = 2; -BICst.CHART_LEGENDS.RIGHT = 3; -BICst.CHART_LEGENDS.BOTTOM = 4; -BICst.CHART_LEGENDS.LEFT = 5; -BICst.FUNNEL_SLANT_STYLE = {}; -BICst.FUNNEL_SLANT_STYLE.SAME = 1; -BICst.FUNNEL_SLANT_STYLE.DIFF = 2; -BICst.MULTI_PIE_GRADIENT_STYLE = {}; -BICst.MULTI_PIE_GRADIENT_STYLE.LIGHTER = 1; -BICst.MULTI_PIE_GRADIENT_STYLE.DARKER = 2; -BICst.PIE_ANGLES = {}; -BICst.PIE_ANGLES.THREE_FOURTHS = 270; -BICst.PIE_ANGLES.HALF = 180; -BICst.PIE_ANGLES.TOTAL = 360; -BICst.GIS_POSITION_TYPE = {}; -BICst.GIS_POSITION_TYPE.ADDRESS = 1; -BICst.GIS_POSITION_TYPE.LNG_LAT = 2; -BICst.GIS_POSITION_TYPE.LNG_FIRST = 3; -BICst.GIS_POSITION_TYPE.LAT_FIRST = 4; -BICst.DATACOLUMN = {}; -BICst.DATACOLUMN.X = 96; -BICst.DATACOLUMN.Y = 112; -BICst.DATACOLUMN.Z = 128; -BICst.DATACOLUMN.XANDY = 144; -BICst.DATACOLUMN.XANDYANDSIZE = 160; -BICst.DATA_LABEL_STYLE_TYPE = {}; -BICst.DATA_LABEL_STYLE_TYPE.TEXT = 143; -BICst.DATA_LABEL_STYLE_TYPE.IMG = 144; -BICst.DATA_LABEL_RANGE = {}; -BICst.DATA_LABEL_RANGE.ALL = 140; -BICst.DATA_LABEL_RANGE.Classification = 141; -BICst.DATA_LABEL_RANGE.Series = 142; -BICst.SCALE_SETTING = {}; -BICst.SCALE_SETTING.AUTO = 1; -BICst.SCALE_SETTING.CUSTOM = 2; -BICst.CHART_STYLE = {}; -BICst.CHART_STYLE.STYLE_NORMAL = 1; -BICst.CHART_STYLE.STYLE_GRADUAL = 2; -BICst.FONT_STYLE = {}; -BICst.FONT_STYLE.FONTFAMILY = "inherit"; -BICst.FONT_STYLE.COLOR = "#808080"; -BICst.FONT_STYLE.FONTSIZE = "12px"; -BICst.AUTO = 1; -BICst.X_AXIS = 3; -BICst.NORMAL = 1; -BICst.POLYGON = 7; -BICst.NOT_SHOW = 2; -BICst.ONE2POINT = 3; -BICst.TWO2POINT = 4; -BICst.LEFT_AXIS = 0; -BICst.LNG_FIRST = 3; -BICst.LAT_FIRST = 4; -BICst.FIX_COUNT = 6; -BICst.ROTATION = -90; -BICst.RIGHT_AXIS = 1; -BICst.ZERO2POINT = 2; -BICst.NO_PROJECT = 16; -BICst.MINLIMIT = 1.0E-5; -BICst.ONE_POINTER = 1; -BICst.MULTI_POINTER = 2; -BICst.LEGEND_BOTTOM = 4; -BICst.STYLE_NORMAL = 21; -BICst.LEGEND_HEIGHT = 80; -BICst.LEGEND_WIDTH = "30.0%"; -BICst.HALF_DASHBOARD = 9; -BICst.VERTICAL_TUBE = 12; -BICst.DASHBOARD_AXIS = 4; -BICst.HORIZONTAL_TUBE = 13; -BICst.RIGHT_AXIS_SECOND = 2; -BICst.PERCENT_DASHBOARD = 10; -BICst.PERCENT_SCALE_SLOT = 11; -BICst.INTERVAL = 100; -BICst.GIS_MAP_PATH = "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"; -BICst.KNOWLEDGE_RIGHT = "© 2016 AutoNavi"; -BICst.NUM_SEPARATORS = false; -BICst.WMS_SERVER = "wms"; - -BICst.DATA_CONFIG_DESIGN = {}; -BICst.DATA_CONFIG_DESIGN.NO = 0; -BICst.DATA_CONFIG_DESIGN.YES = 1; -BICst.DATA_CONFIG_AUTHORITY = {}; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER = {}; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.NODE = "__package_manager_node__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.PAGE = "__package_manager_page__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.SERVER_CONNECTION = "__package_server_connection__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.DATA_CONNECTION = "__package_data_connection__"; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION = {}; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION.NODE = "__data_connection_node__"; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION.PAGE = "__data_connection_page__"; -BICst.DATA_CONFIG_AUTHORITY.MULTI_PATH_SETTING = "__multi_path_setting__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_AUTHORITY = "__package_authority__"; -BICst.DATA_CONFIG_AUTHORITY.FINE_INDEX_UPDATE = "__fine_index_update__"; -BICst.GLOBAL_UPDATE_TYPE = {}; -BICst.GLOBAL_UPDATE_TYPE.PART_UPDATE = "_part_update_"; -BICst.GLOBAL_UPDATE_TYPE.COMPLETE_UPDATE = "_complete_update_"; -BICst.GLOBAL_UPDATE_TYPE.META_UPDATE = "_meta_update_"; -BICst.CUBE_UPDATE_TYPE = {}; -BICst.CUBE_UPDATE_TYPE.GLOBAL_UPDATE = "__global_update__"; -BICst.CUBE_UPDATE_TYPE.SINGLETABLE_UPDATE = "__singleTable_update__"; -BICst.SINGLE_TABLE_UPDATE = {}; -BICst.SINGLE_TABLE_UPDATE.TOGETHER = 0; -BICst.SINGLE_TABLE_UPDATE.NEVER = 1; -BICst.SINGLE_TABLE_UPDATE_TYPE = {}; -BICst.SINGLE_TABLE_UPDATE_TYPE.ALL = 0; -BICst.SINGLE_TABLE_UPDATE_TYPE.PART = 1; -BICst.SINGLE_TABLE_UPDATE_TYPE.NEVER = 2; -BICst.UPDATE_FREQUENCY = {}; -BICst.UPDATE_FREQUENCY.EVER_DAY = 0; -BICst.UPDATE_FREQUENCY.EVER_SUNDAY = 1; -BICst.UPDATE_FREQUENCY.EVER_MONDAY = 2; -BICst.UPDATE_FREQUENCY.EVER_TUESDAY = 3; -BICst.UPDATE_FREQUENCY.EVER_WEDNESDAY = 4; -BICst.UPDATE_FREQUENCY.EVER_THURSDAY = 5; -BICst.UPDATE_FREQUENCY.EVER_FRIDAY = 6; -BICst.UPDATE_FREQUENCY.EVER_SATURDAY = 7; -BICst.UPDATE_FREQUENCY.EVER_MONTH = 10; -BICst.REQ_DATA_TYPE = {}; -BICst.REQ_DATA_TYPE.REQ_GET_ALL_DATA = -1; -BICst.REQ_DATA_TYPE.REQ_GET_DATA_LENGTH = 0; -BICst.TRANS_TYPE = {}; -BICst.TRANS_TYPE.READ_FROM_DB = "db"; -BICst.TRANS_TYPE.READ_FROM_TABLEDATA = "tabledata"; -BICst.TRANS_TYPE.CHOOSE = "choose"; -BICst.CONNECTION = {}; -BICst.CONNECTION.ETL_CONNECTION = "__FR_BI_ETL__"; -BICst.CONNECTION.SERVER_CONNECTION = "__FR_BI_SERVER__"; -BICst.CONNECTION.SQL_CONNECTION = "__FR_BI_SQL__"; -BICst.CONNECTION.EXCEL_CONNECTION = "__FR_BI_EXCEL__"; -BICst.COLUMN = {}; -BICst.COLUMN.NUMBER = 32; -BICst.COLUMN.STRING = 16; -BICst.COLUMN.DATE = 48; -BICst.COLUMN.COUNTER = 64; -BICst.COLUMN.ROW = 80; -BICst.CLASS = {}; -BICst.CLASS.INTEGER = 0; -BICst.CLASS.LONG = 1; -BICst.CLASS.DOUBLE = 2; -BICst.CLASS.FLOAT = 3; -BICst.CLASS.DATE = 4; -BICst.CLASS.STRING = 5; -BICst.CLASS.BOOLEAN = 6; -BICst.CLASS.TIMESTAMP = 7; -BICst.CLASS.DECIMAL = 8; -BICst.CLASS.TIME = 9; -BICst.CLASS.BYTE = 10; -BICst.CLASS.ROW = 16; -BICst.SYSTEM_USER_NAME = "__system_user_name__"; -BICst.LAST_UPDATE_TIME = "__last_update_time__"; -BICst.CURRENT_UPDATE_TIME = "__current_update_time__"; - -BICst.FUNCTION = {}; -BICst.FUNCTION.TEXT = 1; -BICst.FUNCTION.MATH = 2; -BICst.FUNCTION.DATE = 3; -BICst.FUNCTION.ARRAY = 4; -BICst.FUNCTION.LOGIC = 5; -BICst.FUNCTION.OTHER = 6; - diff --git a/dist/index.html b/dist/index.html index 121d9b772..fc1fc3dc5 100644 --- a/dist/index.html +++ b/dist/index.html @@ -18,10 +18,10 @@ - - + + - + diff --git a/dist/vancharts-all.js b/dist/vancharts-all.js deleted file mode 100644 index d12b37479..000000000 --- a/dist/vancharts-all.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/almond for details - */ - -// Copyright 2006 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! Hammer.JS - v2.0.7 - 2016-04-22 - * http://hammerjs.github.io/ - * - * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */ - -//Copyright (c) 2013, Baidu Inc. -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, with or -// without modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright notice, this -//list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -//and/or other materials provided with the distribution. -// -// Neither the name of Baidu Inc. nor the names of its contributors may be used -//to endorse or promote products derived from this software without specific -//prior written permission of Baidu Inc. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -//DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// document.body.appendChild(c); - -// -//Copyright (c) 2014 Ga?tan Renaudeau -// -//Permission is hereby granted, free of charge, to any person -//obtaining a copy of this software and associated documentation -//files (the "Software"), to deal in the Software without -//restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the -//Software is furnished to do so, subject to the following -//conditions: -// -// The above copyright notice and this permission notice shall be -//included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -//OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -//NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -//HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -//FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -//OTHER DEALINGS IN THE SOFTWARE. - -/* - * heatmap.js v2.0.5 | JavaScript Heatmap Library - * - * Copyright 2008-2016 Patrick Wied - All rights reserved. - * Dual licensed under MIT and Beerware license - * - * :: 2016-09-05 01:16 - */ - -/** - * Copyright (c) 2010-2016, Vladimir Agafonkin - Copyright (c) 2010-2011, CloudMade - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - **/ - -/* - Copyright (c) JS Foundation and other contributors - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - https://github.com/moment/moment - */ - -!function(t,e){"function"==typeof define&&define.amd?define([],e):t.VanCharts=e()}(this,function(){var requirejs,require,define;!function(t){function e(t,e){return v.call(t,e)}function i(t,e){var i,n,r,a,o,s,h,l,u,c,d,f=e&&e.split("/"),p=g.map,m=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),o=t.length-1,g.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=f.slice(0,f.length-1).concat(t),u=0;u0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((f||m)&&p){for(i=t.split("/"),u=i.length;u>0;u-=1){if(n=i.slice(0,u).join("/"),f)for(c=f.length;c>0;c-=1)if(r=p[f.slice(0,c).join("/")],r&&(r=r[n])){a=r,s=u;break}if(a)break;!h&&m&&m[n]&&(h=m[n],l=u)}!a&&h&&(a=h,s=l),a&&(i.splice(0,s,a),t=i.join("/"))}return t}function n(e,i){return function(){var n=_.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(t,n.concat([e,i]))}}function r(t){return function(e){return i(e,t)}}function a(t){return function(e){f[t]=e}}function o(i){if(e(p,i)){var n=p[i];delete p[i],m[i]=!0,l.apply(t,n)}if(!e(f,i)&&!e(m,i))throw new Error("No "+i);return f[i]}function s(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function h(t){return function(){return g&&g.config&&g.config[t]||{}}}var l,u,c,d,f={},p={},g={},m={},v=Object.prototype.hasOwnProperty,_=[].slice,y=/\.js$/;c=function(t,e){var n,a=s(t),h=a[0];return t=a[1],h&&(h=i(h,e),n=o(h)),h?t=n&&n.normalize?n.normalize(t,r(e)):i(t,e):(t=i(t,e),a=s(t),h=a[0],t=a[1],h&&(n=o(h))),{f:h?h+"!"+t:t,n:t,pr:h,p:n}},d={require:function(t){return n(t)},exports:function(t){var e=f[t];return"undefined"!=typeof e?e:f[t]={}},module:function(t){return{id:t,uri:"",exports:f[t],config:h(t)}}},l=function(i,r,s,h){var l,u,g,v,_,y,x=[],b=typeof s;if(h=h||i,"undefined"===b||"function"===b){for(r=!r.length&&s.length?["require","exports","module"]:r,_=0;_n;n++)for(var a=0;3>a;a++){for(var o=0,s=0;3>s;s++)o+=t[n][s]*e[s][a];i[n][a]=o}return i}function o(t,e){e.fillStyle=t.fillStyle,e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle,e.globalAlpha=t.globalAlpha,e.arcScaleX_=t.arcScaleX_,e.arcScaleY_=t.arcScaleY_,e.lineScale_=t.lineScale_}function s(t){var e,i=1;if(t=String(t),"rgb"==t.substring(0,3)){var n=t.indexOf("(",3),r=t.indexOf(")",n+1),a=t.substring(n+1,r).split(",");e="#";for(var o=0;3>o;o++)e+=L[Number(a[o])];4===a.length&&"a"===t.substr(3,1)&&(i=a[3])}else e=t;return{color:e,alpha:i}}function h(t){switch(t){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function l(t){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.font="12px sans-serif",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*b,this.globalAlpha=1,this.canvas=t;var e=t.ownerDocument.createElement("div");e.style.width=t.clientWidth+"px",e.style.height=t.clientHeight+"px",e.style.position="absolute",t.appendChild(e),this.element_=e,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function u(t,e,i,n){t.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:i.x,cp2y:i.y,x:n.x,y:n.y}),t.currentX_=n.x,t.currentY_=n.y}function c(t){for(var e=0;3>e;e++)for(var i=0;2>i;i++)if(!isFinite(t[e][i])||isNaN(t[e][i]))return!1;return!0}function d(t,e,i){if(c(e)&&(t.m_=e,i)){var n=e[0][0]*e[1][1]-e[0][1]*e[1][0];t.lineScale_=x(y(n))}}function f(t){this.type_=t,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function p(){}var g=Math,m=g.round,v=g.sin,_=g.cos,y=g.abs,x=g.sqrt,b=10,T=b/2,A=Array.prototype.slice,C={init:function(t){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=t||document;i.createElement("vancanvas"),i.attachEvent("onreadystatechange",e(this.init_,this,i))}},init_:function(t){if(t.namespaces){if(t.namespaces.g_vml_||t.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),t.namespaces.g_o_||t.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),!t.styleSheets.ex_canvas_){var e=t.createStyleSheet();e.owningElement.id="ex_canvas_",e.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}for(var i=t.getElementsByTagName("vancanvas"),n=0;nP;P++)for(var M=0;16>M;M++)L[16*P+M]=P.toString(16)+M.toString(16);var w=l.prototype;w.clearRect=function(){this.element_.innerHTML=""},w.beginPath=function(){this.currentPath_=[]},w.moveTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.lineTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.bezierCurveTo=function(t,e,i,n,r,a){var o=this.getCoords_(r,a),s=this.getCoords_(t,e),h=this.getCoords_(i,n);u(this,s,h,o)},w.quadraticCurveTo=function(t,e,i,n){var r=this.getCoords_(t,e),a=this.getCoords_(i,n),o={x:this.currentX_+2/3*(r.x-this.currentX_),y:this.currentY_+2/3*(r.y-this.currentY_)},s={x:o.x+(a.x-this.currentX_)/3,y:o.y+(a.y-this.currentY_)/3};u(this,o,s,a)},w.arc=function(t,e,i,n,r,a){i*=b;var o=a?"at":"wa",s=t+_(n)*i-T,h=e+v(n)*i-T,l=t+_(r)*i-T,u=e+v(r)*i-T;s!=l||a||(s+=.125);var c=this.getCoords_(t,e),d=this.getCoords_(s,h),f=this.getCoords_(l,u);this.currentPath_.push({type:o,x:c.x,y:c.y,radius:i,xStart:d.x,yStart:d.y,xEnd:f.x,yEnd:f.y})},w.rect=function(t,e,i,n){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath()},w.strokeRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.stroke(),this.currentPath_=r},w.fillRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.fill(),this.currentPath_=r},w.createLinearGradient=function(t,e,i,n){var r=new f("gradient");return r.x0_=t,r.y0_=e,r.x1_=i,r.y1_=n,r},w.createRadialGradient=function(t,e,i,n,r,a){var o=new f("gradientradial");return o.x0_=t,o.y0_=e,o.r0_=i,o.x1_=n,o.y1_=r,o.r1_=a,o},w.drawImage=function(t,e){t.getContext&&(this.element_.innerHTML+=t.getContext("2d").element_.innerHTML);var i,n,r,a,o,s,h,l,u=t.runtimeStyle.width,c=t.runtimeStyle.height;t.runtimeStyle.width="auto",t.runtimeStyle.height="auto";var d=t.width,f=t.height;if(t.runtimeStyle.width=u,t.runtimeStyle.height=c,3===arguments.length)i=arguments[1],n=arguments[2],o=s=0,h=r=d,l=a=f;else if(5===arguments.length)i=arguments[1],n=arguments[2],r=arguments[3],a=arguments[4],o=s=0,h=d,l=f;else{if(9!==arguments.length)throw Error("Invalid number of arguments");o=arguments[1],s=arguments[2],h=arguments[3],l=arguments[4],i=arguments[5],n=arguments[6],r=arguments[7],a=arguments[8]}var p=this.getCoords_(i,n),v=[],_=10,y=10;if(v.push(" ','",""),this.element_.insertAdjacentHTML("BeforeEnd",v.join(""))},w.stroke=function(t){var e=[],i=s(t?this.fillStyle:this.strokeStyle),n=i.color,r=i.alpha*this.globalAlpha,a=10,o=10;e.push("u.x)&&(u.x=f.x),(null==l.y||f.yu.y)&&(u.y=f.y))}if(e.push(' ">'),t)if(this.fillStyle&&"object"==typeof this.fillStyle){var p=this.fillStyle,v=0,_={x:0,y:0},y=0,x=1;if("gradient"==p.type_){var T=p.x0_/this.arcScaleX_,A=p.y0_/this.arcScaleY_,C=p.x1_/this.arcScaleX_,L=p.y1_/this.arcScaleY_,P=this.getCoords_(T,A),M=this.getCoords_(C,L),w=M.x-P.x,E=M.y-P.y;v=180*Math.atan2(w,E)/Math.PI,0>v&&(v+=360),1e-6>v&&(v=0)}else{var P=this.getCoords_(p.x0_,p.y0_),S=u.x-l.x,O=u.y-l.y;_={x:(P.x-l.x)/S,y:(P.y-l.y)/O},S/=this.arcScaleX_*b,O/=this.arcScaleY_*b;var k=g.max(S,O);y=2*p.r0_/k,x=2*p.r1_/k-y}var D=p.colors_;D.sort(function(t,e){return t.offset-e.offset});for(var R=D.length,B=D[0].color,I=D[R-1].color,G=D[0].alpha*this.globalAlpha,N=D[R-1].alpha*this.globalAlpha,H=[],c=0;R>c;c++){var z=D[c];H.push(z.offset*x+y+" "+z.color)}e.push('')}else e.push('');else{var U=this.lineScale_*this.lineWidth;1>U&&(r*=U),e.push("')}e.push(""),this.element_.insertAdjacentHTML("beforeEnd",e.join(""))},w.fill=function(){this.stroke(!0)},w.closePath=function(){this.currentPath_.push({type:"close"})},w.getCoords_=function(t,e){var i=this.m_;return{x:b*(t*i[0][0]+e*i[1][0]+i[2][0])-T,y:b*(t*i[0][1]+e*i[1][1]+i[2][1])-T}},w.save=function(){var t={};o(this,t),this.aStack_.push(t),this.mStack_.push(this.m_),this.m_=a(r(),this.m_)},w.restore=function(){o(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},w.translate=function(t,e){var i=[[1,0,0],[0,1,0],[t,e,1]];d(this,a(i,this.m_),!1)},w.rotate=function(t){var e=_(t),i=v(t),n=[[e,i,0],[-i,e,0],[0,0,1]];d(this,a(n,this.m_),!1)},w.scale=function(t,e){this.arcScaleX_*=t,this.arcScaleY_*=e;var i=[[t,0,0],[0,e,0],[0,0,1]];d(this,a(i,this.m_),!0)},w.transform=function(t,e,i,n,r,o){var s=[[t,e,0],[i,n,0],[r,o,1]];d(this,a(s,this.m_),!0)},w.setTransform=function(t,e,i,n,r,a){var o=[[t,e,0],[i,n,0],[r,a,1]];d(this,o,!0)},w.clip=function(){},w.arcTo=function(){},w.createPattern=function(){return new p},w.measureText=function(t){var e=document.createElement("span");e.style.font=this.font,e.innerHTML=t;var i=document.getElementsByTagName("body")[0];i.appendChild(e);var n=e.offsetWidth;return i.removeChild(e),{width:n+1}},w.fillText=function(t,e,i){var n=[],r=this.font.split("px")[0].replace(/(^\s+)|(\s+$)/g,""),a=/^\d+$/.test(r)?parseInt(r):0;n.push(''+t," ",""),this.element_.insertAdjacentHTML("BeforeEnd",n.join(""))},f.prototype.addColorStop=function(t,e){e=s(e),this.colors_.push({offset:t,color:e.color,alpha:e.alpha})},VanCanvasManager=C,CanvasRenderingContext2D=l,CanvasGradient=f,CanvasPattern=p}(),define("excanvas",function(){}),function(t,e,i,n){"use strict";function r(t,e,i){return setTimeout(l(t,i),e)}function a(t,e,i){return Array.isArray(t)?(o(t,i[e],i),!0):!1}function o(t,e,i){var r;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&ct(n,i)}function l(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==pt?t.apply(e?e[0]||n:n,e):t}function c(t,e){return t===n?e:t}function d(t,e,i){return o(m(e),function(e){t.addEventListener?"wheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.addEventListener(e,i,!1):t.attachEvent&&("wheel"==e&&(e="mousewheel"),t.attachEvent("on"+e,i))}),this}function f(t,e,i){o(m(e),function(e){t.removeEventListener?"wheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.removeEventListener(e,i,!1):t.detachEvent&&("wheel"==e&&(e="mousewheel"),t.detachEvent("on"+e,i))})}function p(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function g(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function v(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function x(t,e){for(var i,r,a=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&!i.firstMultiple?i.firstMultiple=E(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,o=i.firstMultiple,s=o?o.center:a.center,h=e.center=S(n);e.timeStamp=yt(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=R(s,h),e.distance=D(s,h),M(i,e),e.offsetDirection=k(e.deltaX,e.deltaY);var l=O(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=_t(l.x)>_t(l.y)?l.x:l.y,e.scale=o?I(o.pointers,n):1,e.rotation=o?B(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,w(i,e);var u=t.element;p(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function M(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},a=t.prevInput||{};(e.eventType===kt||a.eventType===Rt)&&(r=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}function w(t,e){var i,r,a,o,s=t.lastInterval||e,h=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(h>Ot||s.velocity===n)){var l=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,c=O(h,l,u);r=c.x,a=c.y,i=_t(c.x)>_t(c.y)?c.x:c.y,o=k(l,u),t.lastInterval=e}else i=s.velocity,r=s.velocityX,a=s.velocityY,o=s.direction;e.velocity=i,e.velocityX=r,e.velocityY=a,e.direction=o}function E(t){for(var e=[],i=0;ir;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:vt(i/e),y:vt(n/e)}}function O(t,e,i){return{x:e/t||0,y:i/t||0}}function k(t,e){return t===e?It:_t(t)>=_t(e)?0>t?Gt:Nt:0>e?Ht:zt}function D(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function R(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function B(t,e){return R(e[1],e[0],Xt)+R(t[1],t[0],Xt)}function I(t,e){return D(e[0],e[1],Xt)/D(t[0],t[1],Xt)}function G(){this.evEl=qt,this.evWin=Zt,this.pressed=!1,A.apply(this,arguments)}function N(){this.evEl=Jt,this.evWin=$t,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function H(){this.evTarget=ee,this.evWin=ie,this.started=!1,A.apply(this,arguments)}function z(t,e){var i=_(t.touches),n=_(t.changedTouches);return e&(Rt|Bt)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function U(){this.evTarget=re,this.targetIds={},A.apply(this,arguments)}function F(t,e){var i=_(t.touches),n=this.targetIds;if(e&(kt|Dt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,a,o=_(t.changedTouches),s=[],h=this.target;if(a=i.filter(function(t){return p(t.target,h)}),e===kt)for(r=0;r-1&&n.splice(t,1)};setTimeout(r,ae)}}function Y(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n=a&&oe>=o)return!0}return!1}function q(t,e){this.manager=t,this.set(e)}function Z(t){if(g(t,de))return de;var e=g(t,fe),i=g(t,pe);return e&&i?ce:e||i?e?fe:pe:g(t,ce)?ce:ue}function j(){if(!he)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=i?t.CSS.supports("touch-action",n):!0}),e}function Q(t){this.options=ct({},this.defaults,t||{}),this.id=b(),this.manager=null,this.options.enable=c(this.options.enable,!0),this.state=me,this.simultaneous={},this.requireFail=[]}function K(t){return t&be?"cancel":t&ye?"end":t&_e?"move":t&ve?"start":""}function J(t){return t==zt?"down":t==Ht?"up":t==Gt?"left":t==Nt?"right":""}function $(t,e){var i=e.manager;return i?i.get(t):t}function tt(){Q.apply(this,arguments)}function et(){tt.apply(this,arguments),this.pX=null,this.pY=null}function it(){tt.apply(this,arguments)}function nt(){Q.apply(this,arguments),this._timer=null,this._input=null}function rt(){tt.apply(this,arguments)}function at(){tt.apply(this,arguments)}function ot(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function st(t,e){return e=e||{},e.recognizers=c(e.recognizers,st.defaults.preset),new ht(t,e)}function ht(t,e){this.options=ct({},st.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=C(this),this.touchAction=new q(this,this.options.touchAction),lt(this,!0),o(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function lt(t,e){var i=t.element;if(i.style){var n;o(t.options.cssProps,function(r,a){n=x(i.style,a),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function ut(t,i){var n=e.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var ct,dt=["","webkit","Moz","MS","ms","o"],ft=e.createElement("div"),pt="function",gt=function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},mt=!t.SVGSVGElement,vt=Math.round,_t=Math.abs,yt=Date.now;ct="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;is&&(e.push(t),s=e.length-1):r&(Rt|Bt)&&(i=!0);var h={pointers:e,changedPointers:[t],pointerType:a,srcEvent:t};if(0>s){if(-1!=Kt.indexOf(t.type)){var l=this.manager.handlers[t.type]&&this.manager.handlers[t.type].slice();if(l&&l.length)for(var u=0;u-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;ye>n&&e(i.options.event+K(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=ye&&e(i.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=Te)},canEmit:function(){for(var t=0;ta?Gt:Nt,i=a!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?It:0>o?Ht:zt,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,h&&i&&n>e.threshold&&r&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ve||!(this.state&ve)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ve)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(nt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(Rt|Bt)&&!a)this.reset();else if(t.eventType&kt)this.reset(),this._timer=r(function(){this.state=xe,this.tryEmit()},e.time,this);else if(t.eventType&Rt)return xe;return Te},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===xe&&(t&&t.eventType&Rt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=yt(),this.manager.emit(this.options.event,this._input)))}}),h(rt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ve)}}),h(at,tt,{defaults:{event:"swipe", - threshold:10,velocity:.3,direction:Ut|Ft,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ut|Ft)?e=t.overallVelocity:i&Ut?e=t.overallVelocityX:i&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&_t(e)>this.options.velocity&&t.eventType&Rt},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ot,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=e[1]&&(t=e[1]),t}function i(t,e){if("function"!=typeof e)throw new TypeError;for(var i=t?t.length:0,n=0;i>n;n++)t[n]=e(t[n]);return t}function n(n){if(y[n]&&(n=y[n]),x[n])return x[n].slice();if(n=t(n),/^#[\da-f]{3}$/i.test(n)){n=parseInt(n.slice(1),16);var r=(3840&n)<<8,a=(240&n)<<4,o=15&n;n="#"+((1<<24)+(r<<4)+r+(a<<4)+a+(o<<4)+o).toString(16).slice(1)}var r=n.match(T);if(!r)return x[n]=b,b.slice();var s,h,l,u=[];if(r[2])s=r[2].replace("#","").split(""),l=[s[0]+s[1],s[2]+s[3],s[4]+s[5]],u=i(l,function(t){return e(parseInt(t,16),[0,255])});else if(r[4]){var c=r[4].split(",");h=c[3],l=c.slice(0,3),u=i(l,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e(t,[0,255])}),"undefined"!=typeof h&&u.push(e(parseFloat(h),[0,1]))}return 3===u.length&&u.push(1),x[n]=u.slice(),u}function r(t,n){if(n=n||"rgb",t&&(3===t.length||4===t.length)){if(t=i(t,function(t){return t>1?Math.ceil(t):t}),n.indexOf("hex")>-1)return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1);if(n.indexOf("hs")>-1){var r=i(t.slice(1,3),function(t){return t+"%"});t[1]=r[0],t[2]=r[1]}return n.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=e(t[3],[0,1]),n+"("+t.slice(0,4).join(", ")+")"):n+"("+t.slice(0,3).join(", ")+")"}}function a(t){for(var i=n(t),a=[],o=0;3>o;o++){var s=i[o];128>=s?a.push(e(s-(255-s)*(255-2*s)/(2*s),[0,255])):a.push(e(s+s*(2*s-255)/(2*(255-s)),[0,255]))}var h=[];for(o=0;3>o;o++)h.push(Math.round(.65*i[o]+.35*a[o]));return r(h,"rgb")}function o(t,e){var i=n(t);i.length=3;for(var a=0;3>a;a++)i[a]=parseInt(i[a]/e,10);return r(i,"rgb")}function s(t){var e=n(t);e.length=3;for(var i=0;2>i;i++)e[i]=parseInt(.95*e[i],10);return r(e,"rgb")}function h(t,e){var i=n(t);return i[3]=e,r(i,"rgba")}function l(t,e,i,a){var o=n(t),s=d(o[0],o[1],o[2]);s[0]+=e,s[1]+=i,s[2]+=a;var h=u(s[0],s[1],s[2]);return r(h,"rgb")}function u(t,e,i){e=Math.min(1,Math.max(0,e)),i=Math.min(1,Math.max(0,i));var n=0,r=0,a=0;if(0===e)n=r=a=255*i+.5;else{var o=6*(t-Math.floor(t)),s=o-Math.floor(o),h=i*(1-e),l=i*(1-e*s),u=i*(1-e*(1-s));switch(Math.floor(o)){case 0:n=255*i+.5,r=255*u+.5,a=255*h+.5;break;case 1:n=255*l+.5,r=255*i+.5,a=255*h+.5;break;case 2:n=255*h+.5,r=255*i+.5,a=255*u+.5;break;case 3:n=255*h+.5,r=255*l+.5,a=255*i+.5;break;case 4:n=255*u+.5,r=255*h+.5,a=255*i+.5;break;case 5:n=255*i+.5,r=255*h+.5,a=255*l+.5}}var c=[];return c.push(Math.floor(n)),c.push(Math.floor(r)),c.push(Math.floor(a)),c}function c(t,e){t=t||"blue",e=e||1;for(var i=n(t),a=d(i[0],i[1],i[2]),o=[],s=a[0],h=a[1],l=a[2],c=0;e>c;c++){var f=h*(1-c/e),p=l+c*(1-l)/e;o.push(r(u(s,f,p)))}return o}function d(t,e,i){var n,r,a,o=[3],s=t>e?t:e;i>s&&(s=i);var h=e>t?t:e;if(h>i&&(h=i),a=s/255,r=0!==s?(s-h)/s:0,0===r)n=0;else{var l=(s-t)/(s-h),u=(s-e)/(s-h),c=(s-i)/(s-h);n=t==s?c-u:e==s?2+l-c:4+u-l,n/=6,0>n&&(n+=1)}return o[0]=n,o[1]=r,o[2]=a,o}function f(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?n(t)[3]:1}function p(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?f(t):void 0}function g(t){return m(t).hex}function m(t){var e,i,a,o,s=r(n(t),"rgba"),h=/rgba?\((\d{1,3}),(\d{1,3}),(\d{1,3})(,([.\d]+))?\)/,l=s.replace(/\s+/g,"").match(h);return e=(+l[1]).toString(16),e=1===e.length?"0"+e:e,i=(+l[2]).toString(16),i=1===i.length?"0"+i:i,a=(+l[3]).toString(16),a=1===a.length?"0"+a:a,o=+(l[5]?l[5]:1),{hex:"#"+e+i+a,alpha:o}}function v(t,i){if(null==t)return{hex:t,alpha:i};null==i&&(i=1),i=e(parseFloat(i),[0,1]);var n=m(t);return null!=n.alpha&&(i*=n.alpha),{hex:n.hex,alpha:i}}function _(t){return y[t]}var y={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},x={},b=[0,0,0,1],T=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,A={hasColorName:_,toColor:r,hsb2rgb:u,rgb2hsb:d,createColorsWithHsb:c,getRGBAColorArray:n,mixColorWithHSB:l,getHighLightColor:a,getColorWithDivider:o,mixColorWithAlpha:h,getColorOpacity:f,getColorOpacityWithoutDefault:p,colorToHex:g,colorToHexAlpha:m,getClickColor:s,getStandardColorAndOpacity:v};return window.ColorUtils=A,A}),define("Constants",[],function(){return{BLANK_VALUE_PERCENTAGE:"\xa0\xa0",INSTANCES_KEY:"vancharts_index_",SELECT_ANIMATION:"select",CHART_HIDE:"vancharts-chart-hide",EXPORT_HIDE:"vancharts-export-hide",GEO:"geographic_co_sys",PLANE:"plane_co_sys",BUTTON:"button",CAROUSEL:"carousel",BAR_CHART:"bar",COLUMN_CHART:"column",LINE_CHART:"line",AREA_CHART:"area",PIE_CHART:"pie",MULTIPIE_CHART:"multiPie",TREEMAP_CHART:"treeMap",SCATTER_CHART:"scatter",BUBBLE_CHART:"bubble",FORCE_BUBBLE_CHART:"forceBubble",GANTT_CHART:"gantt",GAUGE_CHART:"gauge",POINTER_GAUGE:"pointer",POINTER_SEMI_GAUGE:"pointer_semi",SLOT_GAUGE:"slot",THERMOMETER_GAUGE:"thermometer",RING_GAUGE:"ring",RADAR_CHART:"radar",COLUMN_RADAR:"columnRadar",LINE_RADAR:"lineRadar",POINT_MAP:"pointMap",AREA_MAP:"areaMap",HEAT_MAP:"heatMap",LINE_MAP:"lineMap",FUNNEL_CHART:"funnel",WORD_CLOUD_CHART:"wordCloud",STRUCTURE_CHART:"structure",VANCHART:"vanchart",FULL_SCREEN_ICON:"fullScreen",EXPORT_ICON:"toImage",SORT:"sort",MENU_ICON:"vancharts-icon-menu",REFRESH_ICON:"vancharts-icon-refresh",AXIS_GROUP:"vanchart-axis-group",BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right",RIGHT_TOP:"right-top",LEFT_TO_RIGHT:"left-to-right",RIGHT_TO_LEFT:"right-to-right",BOTTOM_TO_TOP:"bottom-to-top",TOP_TO_BOTTOM:"top-to-botttom",DISORDER:"disorder",DESCENDING:"descending",ASCENDING:"ascending",CIRCLE:"circle",SQUARE:"square",DIAMOND:"diamond",TRIANGLE:"triangle",STAR:"star",CIRCLE_HOLLOW:"circle_hollow",SQUARE_HOLLOW:"square_hollow",DIAMOND_HOLLOW:"diamond_hollow",TRIANGLE_HOLLOW:"triangle_hollow",NORMAL_ICON:"normal-legend-icon",PIE_ICON:"pie-legend-icon",DONUT_ICON:"donut-legend-icon",BUBBLE_ICON:"bubble-legend-icon",SCATTER_ICON:"scatter-legend-icon",TREEMAP_ICON:"treeMap-legend-icon",DASH_TYPE:{Solid:"none",Dash:"8,6"},SAME_ARC:"sameArc",DIFFERENT_ARC:"differentArc",OUTSIDE:"outside",INSIDE:"inside",CENTER:"center",STYLE_GRADUAL:"gradual",HORIZONTAL_LAYOUT:"horizontal",VERTICAL_LAYOUT:"vertical",POLYGON_RADAR:"polygon",CIRCLE_RADAR:"circle",SIZE_BY_AREA:"area",SIZE_BY_WIDTH:"width",GRADUAL_LIGHTER:"lighter",GRADUAL_DARKER:"darker",STATE_TO_DROP:"to-drop",STATE_DROPPED:"dropped",STATE_TO_SHOW:"to-show",STATE_SHOW:"show",EXPONENTIAL:"exponential",LINEAR:"linear",LOGARITHMIC:"logarithmic",POLYNOMIAL:"polynomial"}}),define("utils/vMap",["require"],function(t){function e(t,i){if(this._=Object.create(null),t){var n=this;if(t instanceof e)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,a=-1,o=t.length;if(1===arguments.length)for(;++a-1||"Netscape"===navigator.appName&&navigator.appVersion.indexOf("Edge")>-1,utils.transPrefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"",DIV_CONTAINER=document.createElement("div"),document.body.appendChild(DIV_CONTAINER),isSupportSVG())){var t=document.createElement("canvas");CANVAS_CTX=t.getContext("2d"),SVG_CONTAINER=document.createElementNS("http://www.w3.org/2000/svg","svg"),document.body.appendChild(SVG_CONTAINER);var e=document.createElementNS("http://www.w3.org/2000/svg","text");SVG_CONTAINER.appendChild(e),SVG_CONTAINER._textNode=e,SVG_CONTAINER.style.visibility="hidden"}}function initPaddingScale(t){SCALE=t||1}function pick(){for(var t,e=arguments.length,i=0;e>i;i++)if(t=arguments[i],"undefined"!=typeof t&&null!==t)return t;return null}function isArray(t){return"[object Array]"===Object.prototype.toString.apply(t)}function toArray(t){return Array.prototype.slice.call(t)}function setTextStyle(t,e){e=cssNormalization(e);for(var i in e)t.style(i,e[i])}function getTextDimension(t,e,i){if(null==t)return{width:0,height:0};if(i)return _getHtmlTextDim(t,e);if(!isSupportSVG())return _getHtmlTextDim(t,e,!1);var n=convertREMtoPX(e.fontSize);return!e["writing-mode"]&&n>=12?{width:_getCanvasTextWidth(t,n+"px",e),height:getTextHeight(e)}:_getSvgTextDim(t,e)}function getTextWrapDimension(t,e,i){var n=extend({"white-space":"normal",whiteSpace:"normal","word-wrap":"break-word",wordWrap:"break-word"},e);return _getHtmlTextDim(t,n,i)}function _getHtmlTextDim(t,e,i){DIV_CONTAINER.style.cssText="",DIV_CONTAINER.style.visibility="hidden",DIV_CONTAINER.style.whiteSpace="nowrap",DIV_CONTAINER.style.position="absolute",DIV_CONTAINER.style.display="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(DIV_CONTAINER.style[n]=e[n]);i===!1?DIV_CONTAINER.textContent?DIV_CONTAINER.textContent=t:DIV_CONTAINER.innerText=t:DIV_CONTAINER.innerHTML=t;var r=DIV_CONTAINER.offsetWidth||0,a=DIV_CONTAINER.offsetHeight||0,o={width:r,height:a};return DIV_CONTAINER.style.display="none",o}function _getSvgTextDim(t,e){SVG_CONTAINER.style.display="";var i=SVG_CONTAINER._textNode;i.textContent=t,i.style.cssText="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(i.style[n]=e[n]);var r=i.getBBox(),a={width:r.width,height:r.height};return SVG_CONTAINER.style.display="none",a}function _getCanvasTextWidth(t,e,i){if(!CANVAS_CTX)return 0;var n=i.fontStyle||"",r=i.fontWeight||"",a=i.fontFamily||"",o="italic"===n?5:0;return CANVAS_CTX.font=n+" "+r+" "+e+" "+a,CANVAS_CTX.measureText(t).width+o||0}function setDomBackground(t,e){var i=[];if(e.backgroundColor)if("string"==typeof e.backgroundColor)if(isSupportSVG())i.push("background-Color:"+e.backgroundColor);else{var n=ColorUtils.colorToHexAlpha(e.backgroundColor);i.push("background-Color:"+n.hex),i.push("filter:alpha(opacity="+100*n.alpha+")")}else if("object"==typeof e.backgroundColor){var r=e.backgroundColor,a=ColorUtils.colorToHex(r.startColor),o=ColorUtils.colorToHex(r.endColor),s="left",h="left top",l="right top",u=1;r.x1==r.x2&&(s="top",h="left top",l="left bottom",u=0),i.push("background: -ms-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -moz-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -webkit-gradient(linear, "+h+", "+l+", color-stop(0, "+a+"), color-stop(1, "+o+"))"),i.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+a+", endColorstr="+o+", GradientType="+u+")")}e.backgroundImage&&(i.push("background-image:url("+e.backgroundImage+")"),i.push("background-size:100% 100%")),null!=e.borderWidth&&(i.push("border-style:solid"),i.push("border-width:"+e.borderWidth+"px")),null!=e.borderColor&&i.push("border-color:"+e.borderColor),null!=e.borderRadius&&(i.push("border-radius:"+e.borderRadius+"px"),i.push("-moz-border-radius:"+e.borderRadius+"px"),i.push("-webkit-border-radius:"+e.borderRadius+"px"),i.push("-o-border-radius:"+e.borderRadius+"px")),e.shadow&&i.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)"),t.style.cssText+=i.join(";")+";"}function getTextHeight(t){var e=t.fontSize||"0.75rem";return convertREMtoPX(e)}function stamp(t){return t._vanchart_id=t._vanchart_id||"vancharts"+ ++lastID,t._vanchart_id}function extend(t){var e,i,n,r;for(i=1,n=arguments.length;n>i;i++){r=arguments[i];for(e in r)t[e]=r[e]}return t}function domRotate(t,e){var i=[];i.push("transform:rotate("+e+"deg)"),i.push("-ms-transform:rotate("+e+"deg)"),i.push("-webkit-transform:rotate("+e+"deg)"),i.push("-moz-transform:rotate("+e+"deg)"),i.push("-o-transform:rotate("+e+"deg)");var n=Math.cos(toRadian(e)),r=Math.sin(toRadian(e));if(!isSupportSVG()){var a=e?["progid:DXImageTransform.Microsoft.Matrix(M11=",n,", M12=",-r,", M21=",r,", M22=",n,", sizingMethod='auto expand')"].join(""):"none";i.push("filter:"+a)}t.style.cssText+=i.join(";")+";"}function splitText(t,e,i,n){if(!t)return[];t+="",n=n||0,i-=2*n;for(var r=[],a=0,o=t.length;o>a;){for(var s=a;getTextDimension(t.substring(s,a+1),e,!1).width=o)););if(s==a)return["..."];r.push(t.substring(s,a))}return r}function getTextDimensionWithRotation(t,e,i,n){var r=getTextDimension(t,e,i);return getTextDimRotated(r,n)}function getTextDimRotated(t,e){var i=Math.abs(toRadian(e||0)),n=t.width*Math.cos(i)+t.height*Math.sin(i),r=t.width*Math.sin(i)+t.height*Math.cos(i);return{width:n,height:r}}function clone(t){if("object"==typeof t&&null!==t){var e=t;if(isArray(t)){e=[];for(var i=0,n=t.length;n>i;i++)e[i]=clone(t[i])}else{e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]))}return e}return t}function cssNormalization(t){var e={};for(var i in t)if(styleToCss[i]&&(e[styleToCss[i]]=t[i]),"color"==i&&(e.color=t[i]),"fontSize"==i){var n=t[i];-1!=n.indexOf("pt")&&(n=4*parseFloat(n)/3,e["font-size"]=n+"px")}return e}function reformCssArray(t){if(!(t instanceof Array))return[t,t,t,t];switch(t.length+""){case"4":return t;case"3":return[t[0],t[1],t[2],t[1]];case"2":return[t[0],t[1],t[0],t[1]];case"1":return[t[0],t[0],t[0],t[0]];case"0":return[0,0,0,0]}}function lineSubPixelOpt(t,e){return e%2===0?Math.round(t):Math.round(t-.5)+.5}function rectSubPixelOpt(){var t,e,i,n,r;return 2===arguments.length?(t=arguments[0].x,e=arguments[0].y,i=arguments[0].width,n=arguments[0].height,r=arguments[1]):(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],r=arguments[4]),r=r||0,t=lineSubPixelOpt(t,r),e=lineSubPixelOpt(e,r),i=Math.round(i),n=Math.round(n),{x:t,y:e,width:i,height:n}}function addArray(t,e){var i=[];if(t&&t.length)for(var n=0,r=t.length;r>n;n++)i.push(t[n]);if(e&&e.length)for(var n=0,r=e.length;r>n;n++)i.push(e[n]);return i}function toFront(t){t&&t.parentNode&&t.parentNode.appendChild(t)}function toBack(t){t&&t.parentNode&&t.parentNode.insertBefore(t,t.parentNode.firstChild)}function toFrontOfAll(t){t.ownerSVGElement.appendChild(t)}function toBackOfAll(t){t.ownerSVGElement.appendChild(t,t.ownerSVGElement.firstChild)}function containsRect(t,e){return t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height}function rectangleOverlapped(t,e){if(!t||!e)return!1;var i=Math.max(t.x,e.x),n=Math.max(t.y,e.y),r=Math.min(t.x+t.width,e.x+e.width),a=Math.min(t.y+t.height,e.y+e.height);return r>=i&&a>=n}function outsideRect(t,e){return!containsRect(t,e)&&!rectangleOverlapped(t,e)}function containsPoint(t,e){if(!t||!e)return!1;var i=pick(e.x||e[0]),n=pick(e.y||e[1]);return t.xi&&t.yn}function isSupportSVG(){return!!window.SVGSVGElement}function makeValueInRange(t,e,i){var n=Math.min(t,e),r=Math.max(t,e),a=r-n;return((i-n)%a+a)%a+n}function getValueInDomain(t,e){return Math.min(Math.max(t,e[0]),e[1])}function toRadian(t){return Math.PI*(t/180)}function toDegree(t){return 180*t/Math.PI}function getFormatterFunction(formatter){if(null==formatter||""===formatter)return null;if("string"==typeof formatter){var formatterFunc=new Function("return "+formatter)();return"string"==typeof formatterFunc?(eval("var _tmpFunc = "+formatter),_tmpFunc):formatterFunc}return formatter}function format(t,e){return e=getFormatterFunction(e),"function"==typeof e?e.bind(t)(t):t}function clone(t){if(null==t||"object"!=typeof t)return t;if(t instanceof Date){var e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){for(var e=[],i=0,n=t.length;n>i;++i)e[i]=clone(t[i]);return e}if(t instanceof String)return t+"";if(t instanceof Object){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]));return e}}function isEmpty(t){var e=""===t||null===t||void 0===t;return e}function isNull(t){return void 0==t||null==t}function isIE(){return window.ActiveXObject||"ActiveXObject"in window?!0:!1}function hasNotDefined(t){return null===t||void 0===t}function hasDefined(t){return!hasNotDefined(t)}function makeBounds(){var t=0,e=0,i=0,n=0;if(2===arguments.length){var r=arguments[0],a=arguments[1];t=pick(r.x,r[0]),e=pick(r.y,r[1]),i=pick(a.width,a[0]),n=pick(a.height,a[1])}else 4===arguments.length&&(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3]);return{x:t,y:e,width:i,height:n}}function distance(t,e){var i=pick(t.x,t[0]),n=pick(t.y,t[1]),r=pick(e.x,e[0]),a=pick(e.y,e[1]),o=i-r,s=n-a;return Math.sqrt(o*o+s*s)}function isEmptyBounds(t){return t.width<=0||t.height<=0}function log(t,e){return Math.log(e)/Math.log(t)}function getOrder(t){var e=0;if(t>0&&1>t)for(;1>t;)t=accMul(t,10),e--;else if(t>=10)for(;t>=10;)t=accDiv(t,10),e++;return e}function getPercentValue(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0}function getDecimalPlaces(t){var e=(t+"").match(decimalPlacesRegExp);return e?(e[1]?e[1].length:0)+(+e[2]||0):0}function accAdd(t,e){if(t%1===0&&e%1===0)return t+e;var i=getDecimalPlaces(t),n=getDecimalPlaces(e),r=Math.pow(10,Math.max(i,n));return(Math.round(t*r)+Math.round(e*r))/r}function accDiv(t,e){if(t%1===0&&e%1===0)return t/e;var i=t+"",n=e+"",r=-getDecimalPlaces(t);r+=getDecimalPlaces(e);var a=i.replace(decimalRegExp,""),o=n.replace(decimalRegExp,"");return r>0?a/o*Math.pow(10,r):a/o/Math.pow(10,-r)}function accMul(t,e){if(t%1===0&&e%1===0)return t*e;var i=t+"",n=e+"",r=getDecimalPlaces(t);return r+=getDecimalPlaces(e),i.replace(decimalRegExp,"")*n.replace(decimalRegExp,"")/Math.pow(10,r)}function objectToArray(t){if(t.length)return[].slice.call(t);var e=[];for(var i in t)e.push(t[i]);return e}function date2int(t){if(null==t)return null;"string"==typeof t&&(t=new Date(Date.parse(t.replace(/-|\./g,"/"))));var e=new Date("1970/01/01");return"number"==typeof t?t:t.getTime()-e.getTime()}function int2date(t){var e=new Date("1970/01/01");return t=t||0,new Date(t+e.getTime())}function object2date(t){var e=t;return"string"==typeof e?e=new Date(Date.parse(e.replace(/-|\./g,"/"))):"number"==typeof e&&(e=new Date(e)),e}function makeTranslate(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]);return"translate("+e+","+i+")"}function makeTranslate3d(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]),n=pick(t.z,t[2],0);return"translate3d("+e+"px,"+i+"px,"+n+"px)"}function isImageMarker(t){var e=Constants.STAR+Constants.CIRCLE+Constants.SQUARE+Constants.DIAMOND+Constants.TRIANGLE+Constants.CIRCLE_HOLLOW+Constants.SQUARE_HOLLOW+Constants.DIAMOND_HOLLOW+Constants.TRIANGLE_HOLLOW;return-1==e.indexOf(t)&&hasDefined(t)}function isNullMarker(t){return hasNotDefined(t.symbol)}function getDefaultMarkerSymbol(t){var e=[Constants.CIRCLE,Constants.CIRCLE_HOLLOW,Constants.SQUARE,Constants.SQUARE_HOLLOW,Constants.DIAMOND,Constants.DIAMOND_HOLLOW,Constants.TRIANGLE,Constants.TRIANGLE_HOLLOW];return e[t%e.length]}function splitWords(t){return t=t.trim?t.trim():t.replace(/^\s+|\s+$/g,""),t.split(/\s+/)}function trim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function removeEvent(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&t.detachEvent("on"+e,i)}function dealFloatPrecision(t){return Math.abs(t)<1e-6?0:t}function getDomWidth(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10)).toFixed(0)-0}function getDomHeight(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)).toFixed(0)-0}function hasTouch(){var t=window.document;return t&&void 0!==t.documentElement.ontouchstart}function getArcPoint(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function getArcByPoint(t,e){return(2*Math.PI-(Math.atan2(e,t)-Math.PI/2))%(2*Math.PI)}function calculateAutoMinMaxAndGap(t,e,i){t>e&&(t=0,e=100);var n=accAdd(e,-t),r=getOrder(n),a=Math.pow(10,r);0>=r?(t=accMul(t,Math.pow(10,1-r)),t=accDiv(Math.floor(t),Math.pow(10,1-r))):t=Math.floor(t/a)*a;for(var o=accMul(accDiv(i,10),a),s=0;n>s;)s=accAdd(o,s);for(var h=accDiv(s,i);e>t+h*i;)s=accAdd(o,s),h=accDiv(s,i);return s=accDiv(s,i),e=accAdd(t,accMul(s,i)),[t,e,s]}function indexOf(t,e){for(var i=0;ii?-1:1,u=l*h/Math.tan(a),c=Math.atan((e-n)/(i-t)),d=u*Math.sin(c),f=u*Math.cos(c),p=(t+i)/2,g=(e+n)/2,m=p+d,v=g+f,_=t-m,y=e-v,x=i-m,b=n-v,T=normalRadian(Math.atan2(y,_)),A=normalRadian(Math.atan2(b,x));return T>A&&(A+=DOUBLE_PI),[m,v,h/r,T,A]}function normalRadian(t){return t%=DOUBLE_PI,0>t&&(t+=DOUBLE_PI),t}function formatNum(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i}function wrapNum(t,e,i){var n=e[1],r=e[0],a=n-r;return t===n&&i?t:((t-r)%a+a)%a+r}function bind(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function getParamString(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function template(t,e){return t.replace(templateRe,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}function setOptions(t,e){t.hasOwnProperty("options")||(t.options=t.options?Object.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function createOptions(t,e){return e.forEach(function(e){if(e)for(var i in e)hasNotDefined(t[i])&&!skipKeys[i]&&(t[i]=e[i])}),t}function getPrefixed(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function timeoutDefer(t){var e=+new Date,i=Math.max(0,16-(e-lastTime));return lastTime=e+i,window.setTimeout(t,i)}function requestAnimFrame(t,e,i){return i&&requestFn===timeoutDefer?void t.call(e):requestFn.call(window,bind(t,e))}function cancelAnimFrame(t){t&&cancelFn.call(window,t)}function throttle(t,e,i){var n,r,a,o;return o=function(){n=!1,r&&(a.apply(i,r),r=!1)},a=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(o,e),n=!0)}}function rebind(t,e){for(var i,n=1,r=arguments.length;++n=0&&(n=t.slice(i+1),t=t.slice(0,i)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}};var utils={dispatch:dispatch,rebind:rebind,throttle:throttle,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame,getParamString:getParamString,template:template,setOptions:setOptions,createOptions:createOptions,formatNum:formatNum,wrapNum:wrapNum,bind:bind,initConst:initConst,initPaddingScale:initPaddingScale,toPng:toPng,getDomWidth:getDomWidth,getDomHeight:getDomHeight,makeTranslate:makeTranslate,makeTranslate3d:makeTranslate3d,clone:clone,date2int:date2int,int2date:int2date,object2date:object2date,log:log,getOrder:getOrder,getPercentValue:getPercentValue,accAdd:accAdd,accDiv:accDiv,accMul:accMul,dealFloatPrecision:dealFloatPrecision,isEmpty:isEmpty,isEmptyBounds:isEmptyBounds,objectToArray:objectToArray,toArray:toArray,pick:pick,isNull:isNull,getTextDimension:getTextDimension,getTextHeight:getTextHeight,splitText:splitText,getTextDimensionWithRotation:getTextDimensionWithRotation,getTextDimRotated:getTextDimRotated,isArray:isArray,indexOf:indexOf,cssNormalization:cssNormalization,reformCssArray:reformCssArray,rectSubPixelOpt:rectSubPixelOpt,lineSubPixelOpt:lineSubPixelOpt,addArray:addArray,toFront:toFront,toBack:toBack,toFrontOfAll:toFrontOfAll,toBackOfAll:toBackOfAll,containsRect:containsRect,rectangleOverlapped:rectangleOverlapped,outsideRect:outsideRect,containsPoint:containsPoint,isSupportSVG:isSupportSVG,setTextStyle:setTextStyle,domRotate:domRotate,makeValueInRange:makeValueInRange,getValueInDomain:getValueInDomain,toRadian:toRadian,toDegree:toDegree,getFormatterFunction:getFormatterFunction,format:format,isIE:isIE,hasTouch:hasTouch,hasNotDefined:hasNotDefined,hasDefined:hasDefined,distance:distance,makeBounds:makeBounds,isImageMarker:isImageMarker,isNullMarker:isNullMarker,getDefaultMarkerSymbol:getDefaultMarkerSymbol,removeEvent:removeEvent,getArcPoint:getArcPoint,getTextWrapDimension:getTextWrapDimension,stamp:stamp,splitWords:splitWords,trim:trim,extend:extend,setDomBackground:setDomBackground,getArcByPoint:getArcByPoint,calculateAutoMinMaxAndGap:calculateAutoMinMaxAndGap,hasChn:hasChn,convertREMtoPX:convertREMtoPX,paddingConvertWithScale:paddingConvertWithScale,getDefaultFontSize:getDefaultFontSize,convertToREMUseDefault16PX:convertToREMUseDefault16PX,getPlainText:getPlainText,computeArc:computeArc,normalRadian:normalRadian,bindData:bindData,falseFn:falseFn,trueFn:trueFn,emptyFn:emptyFn};return window.VanUtils=utils,utils}),define("utils/QueryUtils",["require"],function(t){function e(t,e){if(t&&t.length&&e)for(var i=0;it;t++)r._initHooks[t].call(this)}},e},e.include=function(t){return i.extend(this.prototype,t),this},e.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},e}),define("dom/Evented",["require","../utils/BaseUtils","../utils/Class"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Class"),n=i.extend({on:function(t,i,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._on(t[a],i,n)}return this},off:function(t,i,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._off(t[a],i,n)}else delete this._events;return this},_on:function(t,e,i){if(t&&e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},a=n,o=0,s=a.length;s>o;o++)if(a[o].fn===e&&a[o].ctx===i)return;a.push(r),n.count++}},_off:function(t,i,n){var r,a,o;if(this._events&&(r=this._events[t])){if(!i){for(a=0,o=r.length;o>a;a++)r[a].fn=e.falseFn;return void delete this._events[t]}if(n===this&&(n=void 0),r)for(a=0,o=r.length;o>a;a++){var s=r[a];if(s.ctx===n&&s.fn===i)return s.fn=e.falseFn,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(a,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=e;if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,o=r.length;o>a;a++){var s=r[a];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],i);return this}var a=e.bind(function(){this.off(t,i,n).off(t,a,n)},this);return this.on(t,i,n).on(t,a,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[e.stamp(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[e.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.srcEvent.type,t,!0)}});return n}),define("ComponentLibrary",[],function(){function t(t){return n[t]}function e(t,e){n[t]=e}function i(){return n}var n=Object.create(null),r=["tooltip","tools","title","dTools","geo","rangeLegend","legend","zoom","dataSheet","xAxis","yAxis","polar","angleAxis","radiusAxis","gaugeAxis","value","category","datetime","levelBar","processes","timeAxis"];return{TOOLTIP_COMPONENT:"tooltip",TOOLBAR_COMPONENT:"tools",GEO_COMPONENT:"geo",DRILL_TOOLS:"dTools",TITLE_COMPONENT:"title",RANGE_LEGEND_COMPONENT:"rangeLegend",INTERVAL_RANGE_LEGEND:"intervalRangeLegend",GradientRangeLegend:"gradientRangeLegend",LEGEND_COMPONENT:"legend",DATA_SHEET_COMPONENT:"dataSheet",ZOOM_COMPONENT:"zoom",X_AXIS_COMPONENT:"xAxis",Y_AXIS_COMPONENT:"yAxis",POLAR_COMPONENT:"polar",RADIUS_AXIS_COMPONENT:"radiusAxis",ANGLE_AXIS_COMPONENT:"angleAxis",GAUGE_AXIS_COMPONENT:"gaugeAxis",VALUE_AXIS_COMPONENT:"value",CATEGORY_AXIS_COMPONENT:"category",DATE_AXIS_COMPONENT:"datetime",LEVELBAR:"levelBar",PROCESSES:"processes",TIMEAXIS:"timeAxis",ComponentsOrder:r,getRegisteredComponents:i,get:t,register:e}}),define("utils/BoundsManager",["require","./BaseUtils"],function(t){function e(){this.addedBounds=[]}var i=t("./BaseUtils");return e.prototype={constructor:e,addBounds:function(t){this.addedBounds.push(t)},isOverlapped:function(t){for(var e=0,n=this.addedBounds.length;n>e;e++)if(i.rectangleOverlapped(t,this.addedBounds[e]))return!0;return!1},isEmpty:function(){return 0===this.addedBounds.length}},e}),define("utils/BezierEasing",["require","./vMap"],function(t){function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function r(t,r,a){return((e(r,a)*t+i(r,a))*t+n(r))*t}function a(t,r,a){return 3*e(r,a)*t*t+2*i(r,a)*t+n(r)}function o(t,e,i,n,a){var o,s,h=0;do s=e+(i-e)/2,o=r(s,n,a)-t,o>0?i=s:e=s;while(Math.abs(o)>C&&++ho;++o){var s=a(n,t,i);if(0===s)return n;var h=r(n,t,i)-e;n-=h/s}return n}function h(){for(var e=0;P>e;++e)d[e]=r(e*M,t,i)}function l(e){for(var n=0,r=1,h=P-1;r!=h&&d[r]<=e;++r)n+=M;--r;var l=(e-d[r])/(d[r+1]-d[r]),u=n+l*M,c=a(u,t,i);return c>=A?s(e,u):0===c?u:o(e,n,n+M,t,i)}function u(){f=!0,(t!=e||i!=n)&&h()}if(4!==arguments.length)throw new Error("BezierEasing requires 4 arguments.");for(var c=0;4>c;++c)if("number"!=typeof arguments[c]||isNaN(arguments[c])||!isFinite(arguments[c]))throw new Error("BezierEasing arguments should be integers.");if(0>t||t>1||0>i||i>1)throw new Error("BezierEasing x values must be in [0, 1] range.");var d=w?new Float32Array(P):[],f=!1,p=function(a){return f||u(),t===e&&i===n?a:0===a?0:.001>1-a?1:r(l(a),e,n)};p.getControlPoints=function(){return[{x:t,y:e},{x:i,y:n}]};var g=[t,e,i,n],m="BezierEasing("+g+")";return p.toString=function(){return m},p}function h(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function l(t){return function(e){return 1-t(1-e)}}function u(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function c(t){return t*t}function d(t){return t*t*t}function f(t){return function(e){return Math.pow(e,t)}}function p(t){return 1-Math.cos(t*half\u03c0)}function g(t){return Math.pow(2,10*(t-1))}function m(t){return 1-Math.sqrt(1-t*t)}function v(t,e){var i;return arguments.length<2&&(e=.45),arguments.length?i=e/E*Math.asin(1/t):(t=1,i=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-i)*E/e)}}function _(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function y(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}var x=t("./vMap"),b=this,T=4,A=.001,C=1e-7,L=10,P=11,M=1/(P-1),w="Float32Array"in b;s.css={ease:s(.25,.1,.25,1),linear:s(0,0,1,1),"ease-in":s(.42,0,1,1),"ease-out":s(0,0,.58,1),"ease-in-out":s(.42,0,.58,1),"ease-in-out-quad":s(.455,.03,.515,.955),swing:s(.02,.01,.47,1),"ease-in-quart":s(.895,.03,.685,.22),"ease-out-back":s(.175,.885,.32,1.275),"ease-out-quart":s(.165,.84,.44,1),"ease-in-quint":s(.755,.05,.855,.06),"ease-out-quint":s(.23,1,.32,1),"ease-in-quad":s(.55,.085,.68,.53),"ease-out-quad":s(.25,.46,.45,.94)};var E=2*Math.PI,S=function(t){return t},O=function(){return S},k=new x({linear:O,poly:f,quad:function(){return c},cubic:function(){return d},sin:function(){return p},exp:function(){return g},circle:function(){return m},elastic:v,back:_,bounce:function(){return y}}),D=new x({"in":S,out:l,"in-out":u,"out-in":function(t){return u(l(t))}});return s.ease=function(t){var e=t.indexOf("-"),i=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return i=k.get(i)||O,n=D.get(n)||S,h(n(i.apply(null,Array.prototype.slice.call(arguments,1))))},s}),define("vans/VanChartLayout",["require","../Constants","../utils/BaseUtils","../ComponentLibrary","../utils/BoundsManager","../utils/BezierEasing"],function(t){function e(t){r(t),a(t.seriesOfType(f.WORD_CLOUD_CHART)),o(t,t.seriesOfType(f.BUBBLE_CHART),f.BUBBLE_CHART),o(t,t.seriesOfType(f.SCATTER_CHART),f.SCATTER_CHART),s(t.seriesOfType(f.BUBBLE_CHART)),s(t.seriesOfType(f.FORCE_BUBBLE_CHART))}function i(t){for(var e=new m,i=0,n=t.series.length;n>i;i++){var r=t.series[i];r.visible&&(r.doLayout(),r._calculateLabelPos(e))}}function n(t){e(t),u(t)}function r(t){for(var e={},i=t.series,n=0,r=i.length;r>n;n++){var a=i[n],o=a.type;if(!a.isTreeSeries()&&o!=f.WORD_CLOUD_CHART)if(a.isSeriesAccumulated())if(a._calculatePercentage)a._calculatePercentage();else{var s=a.getTargetKey();l(a.points,s),h(a.points,s)}else a.visible&&a.points.map(function(t){var i=[o,a.stack,t.category].join("-");e[i]||(e[i]=[]),e[i].push(t)})}for(var u in e){var c=e[u],s=c[0].series.getTargetKey();l(c,s),h(c,s)}for(var n=0,r=i.length;r>n;n++){var d=i[n];d.points.forEach(function(t){d.calculateLabelInfo(t)})}}function a(t){if(t&&t.length){var e=[];t.forEach(function(t){e=e.concat(t.points)}),l(e,t[0].getTargetKey())}}function o(t,e,i){var n,r;if(i==f.BUBBLE_CHART)r="swing",n=function(t,e){return e.radius-t.radius};else if(i==f.SCATTER_CHART){var a=t.isInverted();r="exp-in-out",n=function(t,e){return a?t.posY-e.posY:t.posX-e.posX}}var o=[];e.forEach(function(t){o=o.concat(t.points)}),o.sort(n);var s=o.length;s>0&&o.forEach(function(t,e){t.delayTime=800*v.ease(r)(e/s)})}function s(t){t.forEach(function(t){t._calculateMinMax4Radius()}),t.forEach(function(t){t._calculateBubbleRadius()})}function h(t,e){if(t&&t.length)for(var i=t[0].series,n=i.options.stackByPercent,r=i.stack||n,a=i.getStackAxis(),o=a&&a.isLog()?1:0,s=o,h=o,l=0,u=t.length;u>l;l++){var c=t[l],d=c.options;if(r){var f=n?c.percentage:c.getTargetValue();f>=o?(d[e+"0"]=s,s+=f):(d[e+"0"]=h,h+=f)}else d[e+"0"]=o}}function l(t,e){var i=0;t.filter(function(t){return!t.isNull&&t.visible}).forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){var e=t.series,n=e.getTargetKey(),r=e[e.getBaseAxisType()],a=!e.stack&&r&&r.type!=g.CATEGORY_AXIS_COMPONENT;t.percentage=a?1:Math.abs(t[n])/i})}function u(t){t.bounds=t._getDefaultBounds(),g.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),t.plotBounds=t.bounds,[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()});var e=!1;[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(i){e=t.components[i]&&t.components[i].adjustDomain4Radius()||e}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.ZOOM_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()}),e&&c(t),i(t)}function c(t){t.plotBounds&&(t.bounds=p.makeBounds(t.plotBounds,t.plotBounds)),t.clipPool={},t.axisSize={left:0,right:0,bottom:0,top:0},[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].reCalculateSize()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.ZOOM_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()})}function d(t){var e=t.getChartBounds(),i=t.bounds,n=i.x,r=i.y,a=i.width,o=i.height,s=Math.max(t.clipPool[f.LEFT]||0,n),h=Math.max(t.clipPool[f.RIGHT]||0,e.width-(n+a)),l=Math.max(t.clipPool[f.TOP]||0,r),u=Math.max(t.clipPool[f.BOTTOM]||0,e.height-(r+o));i={x:s,y:l,width:e.width-s-h,height:e.height-l-u},t.setPlotBounds(i)}var f=t("../Constants"),p=t("../utils/BaseUtils"),g=t("../ComponentLibrary"),m=t("../utils/BoundsManager"),v=t("../utils/BezierEasing");return{PLANE_SYSTEM_LAYOUT:n,reLayoutPlotBounds:c,calculateBubbleRadius:s,calculateSeries:e,calculateSeriesShapes:i,fixCoordinateSystem:u}}),define("ChartLibrary",["require"],function(t){function e(t){return n[t]}function i(t,e){n[t]=e}var n={};return{get:e,register:i}}),define("utils/Point2D",["require","./BaseUtils"],function(t){var e=t("./BaseUtils"),i=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e};return i.prototype={clone:function(){return new i(this.x,this.y)},add:function(t){return this.clone()._add(i.create(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(i.create(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new i(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new i(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=i.create(t);var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return t=i.create(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=i.create(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+e.formatNum(this.x)+", "+e.formatNum(this.y)+")"}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)?new i(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new i(t.x,t.y):new i(t,n,r)},i}),define("dom/Browser",[],function(){var t=navigator.userAgent.toLowerCase(),e=document.documentElement,i="ActiveXObject"in window,n=-1!==t.indexOf("webkit"),r=-1!==t.indexOf("phantom"),a=-1!==t.search("android [23]"),o=-1!==t.indexOf("chrome"),s=-1!==t.indexOf("gecko")&&!n&&!window.opera&&!i,h=0===navigator.platform.indexOf("Win"),l="undefined"!=typeof orientation||-1!==t.indexOf("mobile"),u=!window.PointerEvent&&window.MSPointerEvent,c=window.PointerEvent||u,d=i&&"transition"in e.style,f="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!a,p="MozPerspective"in e.style,g="OTransition"in e.style,m=!window.L_NO_TOUCH&&(c||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);return{ie:i,ielt9:i&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:n,gecko:s,android:-1!==t.indexOf("android"),android23:a,chrome:o,safari:!o&&-1!==t.indexOf("safari"),win:h,ie3d:d,webkit3d:f,gecko3d:p,opera12:g,any3d:(d||f||p)&&!g&&!r,mobile:l,mobileWebkit:l&&n,mobileWebkit3d:l&&f,mobileOpera:l&&window.opera,mobileGecko:l&&s,touch:!!m,msPointer:!!u,pointer:!!c,retina:(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1}}),define("dom/DomUtils",["require","../utils/BaseUtils","../utils/Point2D","./Browser"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Point2D"),n=t("./Browser"),r={get:function(t){return"string"==typeof t?document.getElementById(t):t},getStyle:function(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},create:function(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(t,e.firstChild)}},hasClass:function(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=r.getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,i){if(void 0!==t.classList)for(var n=e.splitWords(i),a=0,o=n.length;o>a;a++)t.classList.add(n[a]);else if(!r.hasClass(t,i)){var s=r.getClass(t);r.setClass(t,(s?s+" ":"")+i)}},removeClass:function(t,i){void 0!==t.classList?t.classList.remove(i):r.setClass(t,e.trim((" "+r.getClass(t)+" ").replace(" "+i+" "," ")))},setClass:function(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e},getClass:function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&r._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(r){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"},testProp:function(t){for(var e=document.documentElement.style,i=0;iu;u++){var d=l[u];if(d.bounds&&i.containsPoint(d.bounds,t))return d}}},cursor:function(t){this._container.style.cursor=t||""},onContainerMouseOver:function(t){},onContainerMouseMove:function(t){var e=this.vanchart.bounds,n=this.vanchart;n.renderer;if(n.chartType()!==r.GANTT_CHART||(n.isResizeEnabled()&&(i.containsPoint(n.resizeBounds,t.containerPoint)?(this.cursor("col-resize"),this._state=d,this.fire("resizeStart",t)):(this.cursor(),this._state=c,this.fire("resizeEnd",t))),this.fire("over",t),this._state!==d))if(i.containsPoint(e,t.containerPoint)){var a=t.srcEvent;a.target||a.srcElement;if(this.cursor(),!this._highlightShared(t)){this._removeHightlight(t);var o;if(n.isLargeMode()&&!n.hoverSeries)o=this._getCanvasClosestPoint(t.containerPoint),o&&(o._events||o.getEvents&&o.on(o.getEvents(),o),n.showTooltip(o,t),n.hoverPoint=o,o.options.click&&this.cursor("pointer"));else if(n.hoverSeries&&(o=n.hoverSeries.getClosestPoint(t.containerPoint))){if(o._events||o.getEvents&&o.on(o.getEvents(),o),o.series.defaultMarker){var s=o.series.defaultMarker;n._targets[i.stamp(s.node())]=o}o.fire("mouseover",t),o.options.click&&this.cursor("pointer")}}}else this.removeAllChosen(t)},removeAllChosen:function(t){var e=this.vanchart;this._removeHightlight(t),e.hoverPoint&&(e.hoverPoint.fire("mouseout",t),e.hoverPoint=null),e.hoverSeries&&e.hoverSeries.fire("mouseout",t);var i=e.getComponent(o.TOOLTIP_COMPONENT);i&&"vanChartMap"!==e.vanChartType&&i.immediateHide(),t&&e.cancelLegendHighlight(t.containerPoint)},_getCanvasClosestPoint:function(t){var e=this.vanchart,i=e.seriesOfType(r.BUBBLE_CHART).concat(e.seriesOfType(r.SCATTER_CHART)),n=e.isMap(),a=e.seriesOfType(r.HEAT_MAP);i=i.concat(a);for(var o=this.vanchart.bounds,s=i.length-1;s>=0;s--)for(var h=i[s],l=h.points.length-1;l>=0;l--){var u=h.points[l],c=n&&u.options.lnglat?e.latLngToContainerPoint(u.getLatLng()):{x:u.posX+o.x,y:u.posY+o.y},d=c.x-t.x,f=c.y-t.y,p=Math.sqrt(d*d+f*f),g=u.radius||u.options.marker&&u.options.marker.radius||4.5;if(g>=p&&u.visible)return u}},onContainerMouseOut:function(t){},onContainerTap:function(t){this.onContainerMouseMove(t);var e=this.vanchart.hoverPoint;e&&e.fire("tap",t)},onContainerPanStart:function(t){if(!this.forceTarget){var e=this.vanchart,n=e.renderer,a=t.containerPoint,s=e.bounds;if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(e.resizeBounds,a)?(this._state=d,this.fire("resizeStart",t)):!this._state&&i.containsPoint(e.panBounds,a)&&(this._state=p,this.fire("pan",t)));!this.selectRect&&this._supportCoordinateZoom()&&i.containsPoint(s,a)&&(this.selectRect=n.rect().style({fill:"rgb(69,114,167)","fill-opacity":.25}).add(),this.downPos=a,e.hoverPoint&&e.hoverPoint.fire("mouseout"));var h=e.getComponent(o.ZOOM_COMPONENT);this._zoomAsTarget(h,a)&&h._panStart(t,h.centerRect)}},_zoomAsTarget:function(t,e){var n=this.vanchart,r=n.bounds,a=!1,s=n.getComponent(o.DATA_SHEET_COMPONENT);return s&&(a=i.containsPoint(s.bounds,e)),a=a||i.containsPoint(r,e),t&&t.zoomToolEnabled()&&a},onContainerPanMove:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds),a=e.options,s=t.containerPoint,h=this.downPos,l=e.isInverted();if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(this.vanchart.panBounds,s)&&(this._state===d?this.fire("resizeMove",t):this._state===p&&this.fire("pan",t)));if(this.selectRect){var u=a.zoom.zoomType,c=Math.min(s.x,h.x),f=Math.min(s.y,h.y),g=Math.abs(s.x-h.x),m=Math.abs(s.y-h.y),v=-1!=u.indexOf("x"),_=-1!=u.indexOf("y");l&&(v=-1!=u.indexOf("y"),_=-1!=u.indexOf("x")),v&&!_?(f=n.y,m=n.height):_&&!v&&(c=n.x,g=n.width),this.selectRect.attr({x:c,y:f,width:g,height:m})}var y=e.getComponent(o.ZOOM_COMPONENT);y&&y.zoomToolEnabled()&&y._panContainerMove(t)},onContainerPanEnd:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds,e.options,t.containerPoint),a=this.downPos,s=e.components[o.TOOLBAR_COMPONENT];if(e.chartType()===r.GANTT_CHART)return void(this._state===d?(this._state=c,this.fire("resizeEnd",t)):this._state===p&&(this._state=f,this.fire("pan",t)));this.selectRect&&(i.distance(a,n)>14&&(e.clearAllEffects(),e.dealAxisZoom(a,n),s&&s.showRefreshIconWhenZoom()),this.selectRect.remove(),this.selectRect=null),this.panTarget=null;var h=e.getComponent(o.ZOOM_COMPONENT);h&&h.zoomToolEnabled()&&h._panEnd()},onContainerWheel:function(t){var e=this.vanchart;e.chartType()===r.GANTT_CHART&&i.containsPoint(e.panBounds,t.containerPoint)&&(t.srcEvent.preventDefault(),t.wheel=this.normalizeWheel(t.srcEvent),this.fire("wheelMove",t))},_highlightShared:function(t){var e=this.vanchart.getSharedAxis();if(e&&e.getPointsInCategory){var i=t.containerPoint,n=e.getPointsInCategory(i);if(n&&n.length)return n[0]._onPointMouseOver.call(n[0],t),e.drawHighlightBackground(n),!0}return!1},_removeHightlight:function(t){var e=this.vanchart,i=e.getSharedAxis(),n=e.hoverPoints;i&&i.removeHighlightBackground&&i.removeHighlightBackground(),n&&n.length&&n[0]._onPointMouseOut.call(n[0],t),e.hoverPoints=null},getEvents:function(){return{mouseover:this.onContainerMouseOver,mousemove:this.onContainerMouseMove,mouseout:this.onContainerMouseOut,tap:this.onContainerTap,panstart:this.onContainerPanStart,panmove:this.onContainerPanMove,panend:this.onContainerPanEnd,wheel:this.onContainerWheel}},_supportCoordinateZoom:function(){var t=this.vanchart.hoverPoint&&"vanChartForceBubble"==this.vanchart.vanChartType,e=this.vanchart.options;return i.isSupportSVG()&&e.zoom&&e.zoom.zoomType&&!t},destroy:function(){this.hammer.destroy()},_inZoomBar:function(t){var e=this.vanchart.getComponent(o.ZOOM_COMPONENT);return e&&e.bounds&&i.containsPoint(e.bounds,t)},preventDefault:function(t){var e=t.srcEvent,a=e.target||e.srcElement,s=n.getMousePos(e,this._container),h=this.pressed||this._inZoomBar(s),l=this.vanchart.getComponent(o.ZOOM_COMPONENT);return!h&&l&&(h=l.target||this._zoomAsTarget(l,s),h=h&&(Math.abs(t.angle)<45||Math.abs(t.angle)>135)),this.vanchart.isMap()&&(h=this.vanchart._zoomEnabled()&&"A"!=a.nodeName), -this.vanchart.chartType()===r.GANTT_CHART&&(h=i.containsPoint(this.vanchart.panBounds,s)),h?this.hammer.touchAction.setTouchActionNone():this.hammer.touchAction.recoverTouchAction(),h},normalizeWheel:function(t){var e=0,i=0,n=0,r=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),n=e*h,r=i*h,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||r)&&t.deltaMode&&(1===t.deltaMode?(n*=l,r*=l):(n*=u,r*=u)),n&&!e&&(e=1>n?-1:1),r&&!i&&(i=1>r?-1:1),{spinX:e,spinY:i,pixelX:n,pixelY:r}}});return m}),define("vector/Layer",["require","../dom/Evented","../utils/BaseUtils"],function(t){var e=t("../dom/Evented"),i=t("../utils/BaseUtils"),n=e.extend({options:{pane:"overlayPane",nonBubblingEvents:[]},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e)}},_reset:i.falseFn,_project:i.falseFn,_update:i.falseFn});return n}),define("utils/Bounds",["require","./Point2D"],function(t){var e=t("./Point2D"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){return t=e.create(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new e((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new e(this.min.x,this.max.y)},getTopRight:function(){return new e(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,r;return t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t),t instanceof i?(n=t.min,r=t.max):n=r=t,n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y},intersects:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>=e.x&&r.x<=n.x,s=a.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>e.x&&r.xe.y&&r.y24?(isFinite(r)&&(clearTimeout(s),s=setTimeout(e,r)),o=0):(o=1,u(e))}function i(){var t=Date.now();for(h=r;h;)t>=h.t&&(h.f=h.c(t-h.t)),h=h.n;return t}function n(){for(var t,e=r,i=1/0;e;)e.f?e=t?t.n=e.n:r=e.n:(e.th&&(i=0),3>h&&(n=Date.now());var l=n+i,c={c:t,t:l,f:!1,n:null};a?a.n=c:r=c,a=c,o||(s=clearTimeout(s),o=1,u(e))};return c.flush=function(){i(),n()},c.getActiveTimer=function(){return h},c}),define("utils/Interpolator",["require","./ColorUtils"],function(t){function e(t,e){var i=typeof e;return("string"===i?p.hasColorName(e)||/^(#|rgb\(|hsl\()/.test(e)?n:r:Array.isArray(e)?s:"object"===i&&isNaN(e)?a:o)(t,e)}function i(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function n(t,e){t="none"==t||""==t?e:t,t=p.getRGBAColorArray(t),e=p.getRGBAColorArray(e);var n=t[0],r=t[1],a=t[2],o=e[0]-n,s=e[1]-r,h=e[2]-a;return function(t){return"#"+i(Math.round(n+o*t))+i(Math.round(r+s*t))+i(Math.round(a+h*t))}}function r(t,e){var i,n,r,a=g.lastIndex=m.lastIndex=0,s=-1,h=[],l=[];for(t+="",e+="";(i=g.exec(t))&&(n=m.exec(e));)(r=n.index)>a&&(r=e.slice(a,r),h[s]?h[s]+=r:h[++s]=r),(i=i[0])===(n=n[0])?h[s]?h[s]+=n:h[++s]=n:(h[++s]=null,l.push({i:s,x:o(i,n)})),a=m.lastIndex;return an;++n)h[(i=l[n]).i]=i.x(t);return h.join("")})}function a(t,i){var n,r={},a={};for(n in t)n in i?r[n]=e(t[n],i[n]):a[n]=t[n];for(n in i)n in t||(a[n]=i[n]);return function(t){for(n in r)a[n]=r[n](t);return a}}function o(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function s(t,i){var n,r=[],a=[],o=t.length,s=i.length,h=Math.min(t.length,i.length);for(n=0;h>n;++n)r.push(e(t[n],i[n]));for(;o>n;++n)a[n]=t[n];for(;s>n;++n)a[n]=i[n];return function(t){for(n=0;h>n;++n)a[n]=r[n](t);return a}}function h(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g");return(h=function(t){if(null!=t){e.setAttribute("transform",t);var i=e.transform.baseVal.consolidate()}return new l(i?i.matrix:v)})(t)}function l(t){var e=[t.a,t.b],i=[t.c,t.d],n=c(e),r=u(e,i),a=c(d(i,e,-r))||0;e[0]*i[1]180?d+=360:d-c>180&&(c+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:o(c,d)})):d&&n.push(n.pop()+"rotate("+d+")"),f!=p?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:o(f,p)}):p&&n.push(n.pop()+"skewX("+p+")"),g[0]!=m[0]||g[1]!=m[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:o(g[0],m[0])},{i:i-2,x:o(g[1],m[1])})):(1!==m[0]||1!==m[1])&&n.push(n.pop()+"scale("+m+")"),i=r.length,function(t){for(var e,a=-1;++ai)return c();var n=r[r.active];n&&(--r.count,delete r[r.active],n.event&&n.event.interrupt.call(t)),r.active=i,a.event&&a.event.start.call(t),a.tween.forEach(function(e,i){(i=i.call(t))&&m.push(i)}),f=a.ease,d=a.duration,s(function(){return g.c=u(e||1)?o.trueFn:u,1},0,l)}function u(e){if(r.active!==i)return 1;for(var n=e/d,o=f(n),s=m.length;s>0;)m[--s].call(t,o);return n>=1?(a.event&&a.event.end.call(t),c()):void 0}function c(){return--r.count?r[i]=void 0:t[e]=void 0,1}var d,f,p=a.delay,g=s.getActiveTimer(),m=[];return g.t=p+l,n>=p?h(n-p):void(g.c=h)},0,l)}}function n(){return++d}function r(t){return null==t?"__transition__":"__transition_"+t+"__"}function a(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}var o=t("../utils/BaseUtils"),s=t("../utils/Timer"),h=t("../utils/vMap"),l=t("../utils/Interpolator"),u=t("../utils/BezierEasing"),c=o.isSupportSVG(),d=0,f=function(t,e,a,o){var s=n(),h=r(e);a=a||{time:Date.now(),ease:u.ease("linear"),delay:0,duration:250},this.noAnimation=o||!c,o&&(a.time=0),i(t.node(),h,s,a),this.elW=t,this.namespace=h,this.id=s};return o.extend(f.prototype,{setAnimation:function(t){for(var e in t)this[e]&&this[e](t[e]);return this},tween:function(t,e){var i=this.id,n=this.namespace,r=this.elW.node();return arguments.length<2?r[n][i].tween.get(t):(null==e?r[n][i].tween.remove(t):r[n][i].tween.set(t,e),this)},attr:function(t,i){function n(){this.removeAttribute(h)}function r(){this.removeAttributeNS(h.space,h.local)}function a(t){return null==t?n:(t+="",function(){var e,i=this.getAttribute(h);return i!==t&&(e=s(i,t),function(t){this.setAttribute(h,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,i=this.getAttributeNS(h.space,h.local);return i!==t&&(e=s(i,t),function(t){this.setAttributeNS(h.space,h.local,e(t))})})}if(arguments.length<2){for(i in t)this.attr(i,t[i]);return this}if(this.noAnimation)return this.elW.attr(t,i),this;var s="transform"==t?l.interpolateTransform:l,h=t;return e(this,"attr."+t,i,h.local?o:a)},attrTween:function(t,e){function i(t,i){var n=e.call(this,t,i,this.getAttribute(r));return n&&function(t){this.setAttribute(r,n(t))}}function n(t,i){var n=e.call(this,t,i,this.getAttributeNS(r.space,r.local));return n&&function(t){this.setAttributeNS(r.space,r.local,n(t))}}if(arguments.length<2){for(e in t)this.attrTween(e,t[e]);return this}var r=t;if(this.noAnimation){var a=e.call(this.elW.node());return this.elW.attr(r,a(1)),this}return this.tween("attr."+t,r.local?n:i)},style:function(t,i,n){function r(){this.style.removeProperty(t)}function o(e){return null==e?r:(e+="",function(){var i,r=a(this).getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=l(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var s=arguments.length;if(3>s){if("string"!=typeof t){2>s&&(i="");for(n in t)this.style(n,t[n],i);return this}n=""}return this.noAnimation?(this.elW.style(t,i),this):e(this,"style."+t,i,o)},styleTween:function(t,e,i){function n(n,r){var o=e.call(this,n,r,a(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),i)}}if(arguments.length<3&&(i=""),this.noAnimation){var r=e.call(this.elW.node());return this.elW.style(t,r(1)),this}return this.tween("style."+t,n)},remove:function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},each:function(t,e){var i=this.elW.node(),n=this.id,r=this.namespace,a=i[r][n];return(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e),this},ease:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].ease:("function"!=typeof t&&(t=u.ease.apply(null,arguments)),n[i][e].ease=t,this)},delay:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].delay:(t=+t,n[i][e].delay=t,this)},duration:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].duration:(t=Math.max(1,t),n[i][e].duration=t,this)},transition:function(t){var e=this.id,i=this.namespace,n=this.elW.node(),r=n[i][e];return new f(this.elW,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration},this.noAnimation).setAnimation(t)},animate:function(t){return this.setAnimation(t)}}),f.d3_transitionNamespace=r,f.nextTransitionID=n,f}),define("vector/ElementWrapper",["require","../utils/Class","../dom/DomUtils","./Transition","../utils/BaseUtils"],function(t){var e=t("../utils/Class"),i=t("../dom/DomUtils"),n=t("./Transition"),r=t("../utils/BaseUtils").isArray,a=e.extend({initialize:function(t,e){return this.rawElement=t,this.renderer=e,this},node:function(){return this.rawElement},addTo:function(t){return t=t||this.renderer._container,t.append(this),this},addToBack:function(t){return t=t||this.renderer._container,t=t.node(),t.firstChild?t.insertBefore(this.node(),t.firstChild):t.appendChild(this.node()),this},add:function(){return"div"===this.type?this.addTo(this.renderer._divContainer):this.addTo(this.renderer._container)},append:function(t){return this.node().appendChild(t.node()),t},datum:function(){return arguments.length?(this._datum=arguments[0],this):this._datum},addClass:function(t){return i.addClass(this.node(),t),this},remove:function(){return i.remove(this.node()),this},removed:function(){return!(this.node().parentNode&&this.node().parentNode.tagName)},isVisible:function(){return!this.removed()&&"none"!=this.node().style.display},setType:function(t){return this.type=t,this},vRotate:function(t,e){return this.renderer.vRotate(this,t,e),this},vMiddle:function(){this.renderer.vMiddle(this)},animate:function(t){if(t){if(r(t)){for(var e=this.transition().setAnimation(t[0]),i=1,n=t.length;n>i;i++)e=e.transition(t[i]);return this.setTransitionEnd(e,t[n-1].style)}return this.setTransitionEnd(this.transition().setAnimation(t),t.style)}throw new Error("animate para empty")},setTransitionEnd:function(t,e){var i=this,n=this.renderer.vanchart;return++n.animationCount,t.each("end",function(){e&&i.style(e),n._animationStarted&&(--n.animationCount||(n.animationCount=-1,n.fire("animationEnd")))})},effectTransition:function(){return new n(this)},transition:function(t){return new n(this,t,null,!this.renderer.isAnimation)},interrupt:function(t){var e,i=this.node(),r=n.d3_transitionNamespace(t);return(e=i[r])&&e[e.active]&&(--e.count?delete e[e.active]:delete i[r],e.active+=.5),this}});return a}),define("vector/Renderer",["require","./Layer","../dom/DomUtils","../dom/Browser","../utils/Bounds","../utils/BaseUtils","./ElementWrapper"],function(t){var e=t("./Layer"),i=t("../dom/DomUtils"),n=t("../dom/Browser"),r=t("../utils/Bounds"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=0,h=e.extend({initialize:function(t,e,i){this.dom=t,this.vanchart=e,this.config=i,this.isSupportSVG=a.isSupportSVG(),this.isAnimation=this.isSupportSVG&&a.pick(this.vanchart.options.plotOptions.animation,!0)},resize:function(){},remove:function(){i.remove(this._container.node()),this.off("update",this._updatePaths,this)},div:function(t){var e=new o(document.createElement("div"),this).setType("div").style({position:"absolute",left:0,top:0});return e.isHtml=t,e},vgroup:function(){var t=this.div(),e=this.group();return{divG:t,renderG:e,type:"vgroup",attr:function(){return this.divG.attr.apply(this.divG,arguments),this.renderG.attr.apply(this.renderG,arguments),this},style:function(){return this.divG.style.apply(this.divG,arguments),this.renderG.style.apply(this.renderG,arguments),this},append:function(i){return"div"===i.type&&i.isHtml?t.append(i):"vgroup"===i.type?(t.append(i.divG),e.append(i.renderG)):e.append(i),i},add:function(t){return t?this.renderG.addTo(t):this.renderG.add(),this.divG.add(),this},remove:function(){this.divG.node()&&this.divG.remove(),this.renderG.node()&&this.renderG.remove()},node:function(){return e.node()},vRotate:function(t){isNaN(t)||(this.divG.vRotate(t),this.renderG.vRotate(t))}}},vtext:function(t){return t||!this.isSupportSVG?this.div(t):this.text()},vtspan:function(t){return t||!this.isSupportSVG?this.div(t):this.tspan()},onAdd:function(){this._conatainer||(this._initContainer(),this._zoomAnimated&&i.addClass(this._container.node(),"leaflet-zoom-animated")),this.dom.appendChild(this._container.node()),this._divContainer&&this.dom.appendChild(this._divContainer.node()),this._update(),this.on("update",this._updatePaths,this)},_update:function(){var t=this.vanchart.getSize();if(this._bounds=new r([0,0],t),this._map){var e=s,i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new r(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._reset()},_onZoomEnd:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._project()},_updatePaths:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._update()},_updateTransform:function(t,e){var r=this._container.node(),o=this._map.getZoomScale(e,this._zoom),h=i.getPosition(r),l=this._map.getSize().multiplyBy(.5+s),u=this._map.project(this._center,e),c=this._map.project(t,e),d=c.subtract(u),f=l.multiplyBy(-o).add(h).add(l).subtract(d);n.any3d?i.setTransform(r,f,o):a.isSupportSVG()?i.setPosition(r,f):(r.style.left="0px",r.style.top="0px")}});return h}),define("vector/SvgRenderer",["require","./Renderer","../dom/DomUtils","../utils/BaseUtils","./ElementWrapper"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){s||(s=!0,o.include({imageContent:function(t){return this.node().setAttributeNS("http://www.w3.org/1999/xlink","href",t),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):r.attr.apply(null,[this.node()].concat(a.objectToArray(arguments))),this},style:function(t){var i;2===arguments.length?(i={},i[arguments[0]]=arguments[1]):i=arguments[0];var n,r=this.styles,o={},s=this.node(),h="",l=!r;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===this.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(o[n]=i[n],l=!0);if(l){if("div"===this.type){var u={x:"left",y:"top",dx:"margin-left"};for(var c in u){var d;null!=(d=o[c])&&(o[u[c]]=/em/gi.test(d)?d:d+"px",delete o[c])}if(o.transform){var f=e(o.transform.replace(/px/gi,""));f.translate&&(o[a.transPrefix+"transform"]="translate("+f.translate[0]+"px,"+f.translate[1]+"px)")}}r&&(i=a.extend(r,o)),this.styles=i;var p=function(t,e){return"-"+e.toLowerCase()};for(n in i)h+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";s.style.cssText=h,i.fill&&(s.style.fill=i.fill)}return this}}))}var n=t("./Renderer"),r=t("../dom/DomUtils"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=!1,h=n.extend({_initContainer:function(){i(),this._container=new o(this.create("svg"),this),this.defs=new o(this.create("defs"),this).addTo(this._container),this._divContainer=this.div().style({"white-space":"nowrap","pointer-events":"none"})},resize:function(){var t=this.vanchart.width,e=this.vanchart.height;this._container.style({width:t+"px",height:e+"px"})},_update:function(){if(!(this._map&&this._map._animatingZoom&&this._bounds)){n.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container.node();this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),r.setPosition(i,t.min),this._map&&i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},line:function(t){return new o(this.create("line"),this).attr(t)},rect:function(t){return new o(this.create("rect"),this).attr(t)},circle:function(t){return new o(this.create("circle"),this).attr(t)},path:function(t){return new o(this.create("path"),this).attr(t)},text:function(t){return new o(this.create("text"),this).attr(t)},tspan:function(t){return new o(this.create("tspan"),this).attr(t)},image:function(t){return new o(this.create("image"),this).attr(t)},group:function(t){return new o(this.create("g"),this).attr(t)},colorGradient:function(t,e,i){i=i||"linearGradient";var n=new o(this.create(i),this);t.id=a.stamp(n),n.attr(t),n.stops=[];for(var r=0,s=e.length;s>r;r++)n.stops[r]=new o(this.create("stop"),this).attr(e[r]).addTo(n);return n.addTo(this.defs)},updateColorGradient:function(t,e,i){t.attr(e);for(var n=0,r=i.length;r>n;n++)t.stops[n].attr(i[n])},createClip:function(t,e){e=e||"rect";var i=new o(this.create("clipPath"),this);return i.attr("id",a.stamp(i)),i.setType(e),i[e]=new o(this.create(e),this).attr(t).addTo(i),i.addTo(this.defs),i},clip:function(t,e){t.attr("clip-path","url(#"+a.stamp(e)+")")},updateClip:function(t,e){t&&t[t.type].attr(e)},imagePattern:function(t,e,i){var n=new o(this.create("pattern"),this);return t.id=a.stamp(n),n.attr(t),n.image=new o(this.create("image"),this).addTo(n),n.image.attr(e),n.image.imageContent(i),n.image._imageUrl=i,n.addTo(this.defs),n},updateImagePattern:function(t,e,i,n){t.attr(e),t.image.attr(i),t.image._imageUrl!=n&&(t.image.imageContent(n),t.image._imageUrl=n)},createDropShadowFilter:function(t,e,i,n,r,s,h){r=r||0,s=s||0,h=h||0;var l=new o(this.create("filter"),this),u=a.stamp(l);return l.attr({id:u,x:"-50%",y:"-50%",width:"200%",height:"200%"}),this.updateDropShadowFilter(l,t,e,i,n,r,s,h),l.feBlend=l.feBlend||new o(this.create("feBlend"),this).addTo(l),l.feBlend.attr({"in":"SourceGraphic",in2:"blurOut",mode:"normal"}),l.addTo(this.defs),l},updateDropShadowFilter:function(t,e,i,n,r,a,s,h){a=a||0,s=s||0,h=h||0,t.feOffset=t.feOffset||new o(this.create("feOffset"),this).addTo(t),t.feOffset.attr({"in":"SourceGraphic",dx:e,dy:i,result:"offOut"}),t.feColorMatrix=t.feColorMatrix||new o(this.create("feColorMatrix"),this).addTo(t),t.feColorMatrix.attr({"in":"offOut",type:"matrix",values:a+" 0 0 0 0 0 "+s+" 0 0 0 0 0 "+h+" 0 0 0 0 0 "+n+" 0",result:"matrixOut"}),t.feGaussianBlur=t.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(t),t.feGaussianBlur.attr({"in":"matrixOut",stdDeviation:r,result:"blurOut"})},createInnerShadowFilter:function(t,e,i,n){var r=new o(this.create("filter"),this),s=a.stamp(r);return r.attr({id:s,x:"-50%",y:"-50%",width:"200%",height:"200%"}),r.feComponentTransfer=r.feComponentTransfer||new o(this.create("feComponentTransfer"),this).attr({"in":"SourceAlpha"}).addTo(r),r.feComponentTransfer.feFuncA=r.feComponentTransfer.feFuncA||new o(this.create("feFuncA"),this).attr({type:"table",tableValues:"1 0"}).addTo(r.feComponentTransfer),r.feGaussianBlur=r.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(r),r.feGaussianBlur.attr("stdDeviation",n),r.feOffset=r.feOffset||new o(this.create("feOffset"),this).addTo(r),r.feOffset.attr({dx:t,dy:e,result:"offsetblur"}),r.feFlood=r.feFlood||new o(this.create("feFlood"),this).addTo(r),r.feFlood.attr({"flood-color":"black","flood-opacity":i,result:"color"}),r.feComposite1=r.feComposite1||new o(this.create("feComposite"),this).attr({in2:"offsetblur",operator:"in"}).addTo(r),r.feComposite2=r.feComposite2||new o(this.create("feComposite"),this).attr({in2:"SourceAlpha",operator:"in"}).addTo(r),r.merge=r.merge||new o(this.create("feMerge"),this).addTo(r),r.merge.feMergeNode1=r.merge.feMergeNode1||new o(this.create("feMergeNode"),this).attr("in","SourceGraphic").addTo(r.merge),r.merge.feMergeNode2=r.merge.feMergeNode2||new o(this.create("feMergeNode"),this).addTo(r.merge),r.addTo(this.defs),r},create:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},vRotate:function(t,i,n){var r,o,s,h=t.node();if("div"===t.type){o=t.styles[a.transPrefix+"transform"]||"",o&&(r=e(o.replace(/px/gi,"")),o="",r.translate&&(o="translate("+r.translate[0]+"px,"+r.translate[1]+"px) ")),s="rotate("+i+"deg)",o+=s;var l=a.transPrefix+"transform";t.styles[l]=o,h.style[l]=o}else{var u=(h.scrollWidth||h.getBBox().width)/2,c=(h.scrollHeight||h.getBBox().height)/2-1;u+=+h.getAttribute("x")||0,c+=+h.getAttribute("y")||0,o=h.getAttribute("transform")||"",o&&(r=e(o),o="",r.translate&&(o="translate("+r.translate[0]+" "+r.translate[1]+") ")),s="rotate("+i+" "+u+" "+c+")",o+=s,n||t.attr("transform",o)}return t.rotateStr=s,this},vMiddle:function(t){if("div"===t.type){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}else t.attr("text-anchor","middle");return this}});return h.include({getEvents:function(){var t=n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_onZoomStart:function(){this._update()}}),h}),define("utils/PathUtils",["require"],function(t){function e(t){var e=/([clmz]),?([^clmz]*)/gi,i={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},n=/[ahqstv]/gi,a=h;if(String(t).match(n)&&(a=r),n=/[clmz]/g,a==h&&!String(t).match(n)){var o=String(t).replace(e,function(t,e,n){var r=[],a="m"==e.toLowerCase(),o=i[e];return n.replace(L,function(t){a&&2===r.length&&(o+=r+i["m"==e?"l":"L"],r=[]),r.push(x(t*w))}),o+r});return o}var s,l,u=a(t);o=[];for(var c=0,d=u.length;d>c;c++){s=u[c],l=u[c][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,p=s.length;p>f;f++)l+=x(s[f]*w)+(f!=p-1?",":M);o.push(l)}return o.join(P)}function i(t){if(!t&&"string"!=typeof t)return null;var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return String(t).replace(f,function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(p,function(t,e){e&&a.push(+e)}),"m"==o&&a.length>2&&(i.push([n][g](a.splice(0,2))),o="l",n="m"==n?"l":"L"),"r"==o)i.push([n][g](a));else for(;a.length>=e[o]&&(i.push([n][g](a.splice(0,e[o]))),e[o]););}),i.toString=n,i}function n(){return this.join(",").replace(C,"$1")}function r(t,e){for(var i=h(t),n=e&&h(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=(function(t,e,i){var n,r,h={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in h)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][g](s[m](0,[e.x,e.y][g](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][g](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][g](a(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][g](a(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][g](o(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][g](o(e.x,e.y,t[1],e.y));break;case"V":t=["C"][g](o(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][g](o(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)f[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][g](r.splice(0,6)));t.splice(e,1),b=_(i.length,n&&n.length||0)}},d=function(t,e,r,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[o][1],r.y=t[o][2],b=_(i.length,n&&n.length||0))},f=[],p=[],v="",y="",x=0,b=Math.max(i.length,n&&n.length||0);b>x;x++){i[x]&&(v=i[x][0]),"C"!=v&&(f[x]=v,x&&(y=f[x-1])),i[x]=u(i[x],r,y),"A"!=f[x]&&"C"==v&&(f[x]="C"),c(i,x),n&&(n[x]&&(v=n[x][0]),"C"!=v&&(p[x]=v,x&&(y=p[x-1])),n[x]=u(n[x],l,y),"A"!=p[x]&&"C"==v&&(p[x]="C"),c(n,x)),d(i,n,r,l,x),d(n,i,l,r,x);var T=i[x],A=n&&n[x],C=T.length,L=n&&A.length;r.x=T[C-2],r.y=T[C-1],r.bx=parseFloat(T[C-4])||r.x,r.by=parseFloat(T[C-3])||r.y,l.bx=n&&(parseFloat(A[L-4])||l.x),l.by=n&&(parseFloat(A[L-3])||l.y),l.x=n&&A[L-2],l.y=n&&A[L-1]}return n?[i,n]:i}function a(t,e,i,n,r,a){var o=1/3,s=2/3;return[o*t+s*i,o*e+s*n,o*r+s*i,o*a+s*n,r,a]}function o(t,e,i,n){return[t,e,i,n,i,n]}function s(t,e,i,n,r,a,o,h,l,u){var c,d=120*b/180,f=b/180*(+r||0),p=[],m=function(t,e,i){var n=t*y.cos(i)-e*y.sin(i),r=t*y.sin(i)+e*y.cos(i);return{x:n,y:r}};if(u)E=u[0],S=u[1],M=u[2],w=u[3];else{c=m(t,e,-f),t=c.x,e=c.y,c=m(h,l,-f),h=c.x,l=c.y;var v=(y.cos(b/180*r),y.sin(b/180*r),(t-h)/2),_=(e-l)/2,x=v*v/(i*i)+_*_/(n*n);x>1&&(x=y.sqrt(x),i=x*i,n=x*n);var C=i*i,L=n*n,P=(a==o?-1:1)*y.sqrt(T((C*L-C*_*_-L*v*v)/(C*_*_+L*v*v))),M=P*i*_/n+(t+h)/2,w=P*-n*v/i+(e+l)/2,E=y.asin(((e-w)/n).toFixed(9)),S=y.asin(((l-w)/n).toFixed(9));E=M>t?b-E:E,S=M>h?b-S:S,0>E&&(E=2*b+E),0>S&&(S=2*b+S),o&&E>S&&(E-=2*b),!o&&S>E&&(S-=2*b)}var O=S-E;if(T(O)>d){var k=S,D=h,R=l;S=E+d*(o&&S>E?1:-1),h=M+i*y.cos(S),l=w+n*y.sin(S),p=s(h,l,i,n,r,0,o,D,R,[S,k,M,w])}O=S-E;var B=y.cos(E),I=y.sin(E),G=y.cos(S),N=y.sin(S),H=y.tan(O/4),z=4/3*i*H,U=4/3*n*H,F=[t,e],V=[t+z*I,e-U*B],W=[h+z*N,l-U*G],X=[h,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],u)return[V,W,X][g](p);p=[V,W,X][g](p).join()[A](",");for(var Y=[],q=0,Z=p.length;Z>q;q++)Y[q]=q%2?m(p[q-1],p[q],f).y:m(p[q],p[q+1],f).x;return Y}function h(t){if("string"==typeof t&&(t=i(t)),!t||!t.length)return[["M",0,0]];var e=[],r=0,a=0,o=0,s=0,h=0;"M"==t[0][0]&&(r=+t[0][1],a=+t[0][2],o=r,s=a,h++,e[0]=["M",r,a]);for(var u,c,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=h,p=t.length;p>f;f++){if(e.push(u=[]),c=t[f],c[0]!=v.call(c[0]))switch(u[0]=v.call(c[0]),u[0]){case"A":u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5],u[6]=+(c[6]+r),u[7]=+(c[7]+a);break;case"V":u[1]=+c[1]+a;break;case"H":u[1]=+c[1]+r;break;case"R":for(var m=[r,a][g](c.slice(1)),_=2,y=m.length;y>_;_++)m[_]=+m[_]+r,m[++_]=+m[_]+a;e.pop(),e=e[g](l(m,d));break;case"M":o=+c[1]+r,s=+c[2]+a;default:for(_=1,y=c.length;y>_;_++)u[_]=+c[_]+(_%2?r:a)}else if("R"==c[0])m=[r,a][g](c.slice(1)),e.pop(),e=e[g](l(m,d)),u=["R"][g](c.slice(-2));else for(var x=0,b=c.length;b>x;x++)u[x]=c[x];switch(u[0]){case"Z":r=o,a=s;break;case"H":r=u[1];break;case"V":a=u[1];break;case"M":o=u[u.length-2],s=u[u.length-1];default:r=u[u.length-2],a=u[u.length-1]}}return e.toString=n,e}function l(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?a[3]={x:+t[0],y:+t[1]}:r-2==n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}function u(t,i,n,r,a){return a?[["M",t+a,i],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]]:e([["M",t,i],["l",n,0],["l",0,r],["l",-n,0],["z"]])}function c(t,i,n){return e([["M",t,i],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]])}function d(t,i,n,r){return e([["M",t,i],["L",n,r]])}var f=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,p=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,g="concat",m="apply",v=String.prototype.toUpperCase,_=Math.max,y=Math,x=y.round,b=y.PI,T=Math.abs,A="split",C=/,?([achlmqrstvxz]),?/gi,L=/-?\d*\.?\d+(?:[eE][\-+]?\d+)?/g,P=" ",M="",w=1;return window.tmp={path2vml:e,rectPath:u,linePath:d,circlePath:c},window.tmp}),define("vector/VmlRenderer",["require","./Renderer","../utils/PathUtils","../utils/BaseUtils","../utils/ColorUtils","./ElementWrapper","../dom/DomUtils"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){c||(c=!0,s.include({imageContent:function(t){return this.style({src:t}),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t, - this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):this.renderer.attr(this,arguments),this},style:function(){var t;return 2===arguments.length?(t={},t[arguments[0]]=arguments[1]):t=arguments[0],this.renderer.style(this,t),this}}))}var n=t("./Renderer"),r=t("../utils/PathUtils"),a=t("../utils/BaseUtils"),o=t("../utils/ColorUtils"),s=t("./ElementWrapper"),h=t("../dom/DomUtils"),l="position:absolute;left:0px;top:0px;width:1px;height:1px;behavior:url(#default#VML);display:inline-block;",u="position:absolute;behavior:url(#default#VML);display:inline-block;",c=!1,d=n.extend({_initContainer:function(){i();var t=this.div().style({"white-space":"nowrap",display:"inline-block"});return h.addClass(t.node(),"van-vml"),this.dom.appendChild(t.node()),this._divContainer=t,this._container=t,t},line:function(t){return this._shapeWithPath(t,"line")},rect:function(t){return this._shapeWithPath(t,"rect")},circle:function(t){return this._shapeWithPath(t,"circle")},path:function(t){return this._shapeWithPath(t,"path")},image:function(t){var e=new s(document.createElement("image"),this).setType("image");return e.attr(t),e},group:function(t){var e=this.div().style({"white-space":"nowrap","pointer-events":"none"});return e.attr(t)},colorGradient:function(t,e,i){return i=i||"linearGradient",{type:i,attrs:t,stops:e,elements:[]}},updateColorGradient:function(t,e,i){t.attrs=e,t.stops=i},_updateGradientFill:function(t,e){var i=t.node(),n=t._fill,r=e.stops,a=e.attrs;if(n){i.removeChild(n),n.on=!0,n.method="none",n.color=r[0]["stop-color"],n.color2=r[r.length-1]["stop-color"];for(var o=[],s=0,h=r.length;h>s;s++){var l=100*r[s].offset+"%";o.push(l+" "+r[s]["stop-color"])}n.type="gradient",n.angle=a.x1==a.x2?0:270,i.appendChild(n)}},textContent:function(t,e){},text:function(){return this.vtext(!1)},tspan:function(){return this.vtspan(!1)},_shapeWithPath:function(t,e){var i=new s(this.create("shape"),this).setType(e),n=i.rawElement;return n.style.cssText=l,n.coordsize="1 1",i.attr(t)},create:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),createClip:function(t,e){return e&&"rect"!=e?void 0:{x:t.x,y:t.y,width:t.width,height:t.height,clipped:[]}},_getClipStr:function(t,e){var i=e.y||0,n=e.x||0,r=n+e.width,a=i+e.height;if("div"!=t.type){var o=t.isLineChart?t.node().parentNode.firstChild:t.node();i-=o.offsetTop,a-=o.offsetTop}return"rect("+i+"px "+r+"px "+a+"px "+n+"px)"},clip:function(t,e){if(e){var i;t.node&&(i=t.node())&&(i.style.clip=this._getClipStr(t,e),e.clipped.push(t))}},updateClip:function(t,e){var i=this;t&&(a.extend(t,e),t.clipped.forEach(function(e){var n=e.node();n&&(n.style.clip=i._getClipStr(e,t))}))},imagePattern:function(t,e){},createDropShadowFilter:function(){return{}},createInnerShadowFilter:function(){return{}},attr:function(t,i){if(i&&!(i.length<=0)&&i[0]){var n={},o=t.rawElement;2===i.length?n[i[0]]=i[1]:n=i[0];var s=t.attrs,h=t.type;if(n=s?a.extend(s,n):a.extend({},n),t.attrs=n,n.transform){var l=e(n.transform);try{l.translate&&(o.style.left=l.translate[0]+"px",o.style.top=l.translate[1]+"px")}catch(u){}l.rotate}if("image"==h)o.style.position="absolute",o.style.left=n.x+"px",o.style.top=n.y+"px",o.style.width=n.width+"px",o.style.height=n.height+"px";else if("group"!=h){var c="";"rect"==h?c=r.rectPath(n.x||0,n.y||0,n.width,n.height):"line"==h?c=r.linePath(n.x1,n.y1,n.x2,n.y2):"path"==h?c=r.path2vml(n.d):"circle"==h&&(c=r.circlePath(n.cx||0,n.cy||0,n.r)),o.path=c}}},style:function(t,i){var n,r=t.styles,s={},h=t.rawElement;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===t.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(s[n]=i[n]);if("div"===t.type){if(s.transform){var l=e(s.transform.replace(/px/gi,""));l.translate&&(s.transform="",s.x=l.translate[0],s.y=l.translate[1])}var c={x:"left",y:"top",dx:"margin-left"};for(var d in c){var f;null!=(f=s[d])&&(s[c[d]]=/em/gi.test(f)?f:f+"px",delete s[d])}}if(r&&(i=a.extend(r,s)),t.styles=i,"div"===t.type){var p=function(t,e){return"-"+e.toLowerCase()},g=1;if(/rgba/i.test(i.color)){var m=o.colorToHexAlpha(i.color);i.color=m.hex,g=m.alpha}a.hasDefined(i["fill-opacity"])&&(g*=i["fill-opacity"]),1>g&&(i.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+100*g+")");var v="";for(n in i)v+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";h.style.cssText=v}else if("group"!=t.type)if("image"==t.type)t.node().src=i.src;else{var _=t._stroke,y=t._fill,x=t.node();x.stroked=!0,x.filled=!!(i.fill&&"none"!=i.fill||"image"==t.type),_||(_=t._stroke=this.create("stroke"),_.style.cssText=u),x.appendChild(_),_.weight=(i["stroke-width"]||0)+"px";var b=i.stroke,T=a.hasDefined(i["stroke-opacity"])?i["stroke-opacity"]:1;if(b&&-1!=b.indexOf("rgba")&&(b=o.colorToHexAlpha(b),T*=b.alpha,b=b.hex),_.color=b,_.opacity=i["stroke-width"]?T:0,i["stroke-dasharray"]?_.dashStyle=i["stroke-dasharray"].replace(/( *, *)/g," "):_.dashStyle="","round"==i["stroke-linecap"]&&(_.endcap="round"),x.filled){y||(y=t._fill=this.create("fill"),y.style.cssText=u),x.appendChild(y);var A=i.fill,C=a.hasDefined(i["fill-opacity"])?i["fill-opacity"]:1;-1!=A.indexOf("rgba")&&(A=o.colorToHexAlpha(A),C*=A.alpha,A=A.hex),y.color=A,y.opacity=C}else y&&(x.removeChild(y),t._fill=null)}"display"in i&&(t.node().style.display=i.display),"cursor"in i&&(t.node().style.cursor=i.cursor)},vRotate:function(t,e){e%=360;var i=t.node();a.domRotate(i,0);var n=i.offsetWidth,r=i.offsetHeight;a.domRotate(i,e);var o=i.offsetWidth,s=i.offsetHeight;i.style.marginLeft=(n-o)/2+"px",i.style.marginTop=(r-s)/2+"px"},vMiddle:function(t){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}});return d}),define("chart/map/LatLng",["require","../../utils/BaseUtils"],function(t){var e=t("../../utils/BaseUtils"),i=function(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)};return i.prototype={equals:function(t,e){if(!t)return!1;t=i.create(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return(void 0===e?1e-9:e)>=n},toString:function(t){return"LatLng("+e.formatNum(this.lat,t)+", "+e.formatNum(this.lng,t)+")"},distanceTo:function(t){return L.CRS.Earth.distance(this,i.create(t))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},clone:function(){return new i(this.lat,this.lng,this.alt)}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)&&"object"!=typeof t[0]?3===t.length?new i(t[0],t[1],t[2]):2===t.length?new i(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new i(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===n?null:new i(t,n,r)},i}),define("chart/map/Projection",["require","../../utils/Point2D","../../utils/Bounds","./LatLng"],function(t){var e=t("../../utils/Point2D"),i=t("../../utils/Bounds"),n=t("./LatLng"),r={};return r.LonLat={project:function(t){return new e(t.lng,t.lat)},unproject:function(t){return new n(t.y,t.x)},bounds:i.create([-180,-90],[180,90])},r.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),a=Math.sin(r*i);return new e(this.R*t.lng*i,this.R*Math.log((1+a)/(1-a))/2)},unproject:function(t){var e=180/Math.PI;return new n((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return i.create([-t,-t],[t,t])}()},r.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:i.create([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,n=this.R,r=t.lat*i,a=this.R_MINOR/n,o=Math.sqrt(1-a*a),s=o*Math.sin(r),h=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(h,1e-10)),new e(t.lng*i*n,r)},unproject:function(t){for(var e,i=180/Math.PI,r=this.R,a=this.R_MINOR/r,o=Math.sqrt(1-a*a),s=Math.exp(-t.y/r),h=Math.PI/2-2*Math.atan(s),l=0,u=.1;15>l&&Math.abs(u)>1e-7;l++)e=o*Math.sin(h),e=Math.pow((1-e)/(1+e),o/2),u=Math.PI/2-2*Math.atan(s*e)-h,h+=u;return new n(h*i,t.x*i/r)}},r}),define("chart/map/Transformation",["require","../../utils/Point2D"],function(t){var e=t("../../utils/Point2D"),i=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n};return i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new e((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}},i}),define("chart/map/CRS",["require","../../utils/Bounds","./LatLng","../../utils/BaseUtils","./Projection","./Transformation"],function(t){var e=t("../../utils/Bounds"),i=(t("./LatLng"),t("../../utils/BaseUtils")),n=t("./Projection"),r=t("./Transformation"),a={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,n=this.scale(t),r=this.transformation.transform(i.min,n),a=this.transformation.transform(i.max,n);return e.create(r,a)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?i.wrapNum(t.lng,this.wrapLng,!0):t.lng,r=this.wrapLat?i.wrapNum(t.lat,this.wrapLat,!0):t.lat,a=t.alt;return e.create(r,n,a)}};return a.Simple=i.extend({},a,{projection:n.LonLat,transformation:new r(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),a.Earth=i.extend({},a,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,a=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-t.lng)*i);return this.R*Math.acos(Math.min(a,1))}}),a.EPSG3857=i.extend({},a.Earth,{code:"EPSG:3857",projection:n.SphericalMercator,transformation:function(){var t=.5/(Math.PI*n.SphericalMercator.R);return new r(t,.5,-t,.5)}()}),a.EPSG900913=i.extend({},a.EPSG3857,{code:"EPSG:900913"}),a.EPSG4326=i.extend({},a.Earth,{code:"EPSG:4326",projection:n.LonLat,transformation:new r(1/180,1,-1/180,.5)}),a.EPSG3395=i.extend({},a.Earth,{code:"EPSG:3395",projection:n.Mercator,transformation:function(){var t=.5/(Math.PI*n.Mercator.R);return new r(t,.5,-t,.5)}()}),a}),define("theme/config",["require","../Constants","../utils/QueryUtils","../utils/BaseUtils","../chart/map/CRS","../dom/Browser"],function(t){function e(){var t={pie:{plotOptions:{rotatable:!0,startAngle:0,endAngle:360,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:a()},options:{colors:A,style:L,legend:d()}},multiPie:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",rotatable:!0,gradual:"lighter",innerRadius:0,startAngle:0,endAngle:360,drilldown:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d()}},treeMap:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",zoom:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"top"}},options:{colors:A,legend:d()}},bar:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[g()],yAxis:[m()]}},column:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},line:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},area:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i(),fillColor:!0,fillColorOpacity:.15},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},gauge:{thermometer:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#333333",fontSize:"0.75rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#bababa",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee",thermometerLayout:"vertical"},ring:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"1.5rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#777777",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},clockwise:!1,paneBackgroundColor:"#eeeeee",innerPaneBackgroundColor:"#f4f4f4"},pointer:{layout:"horizontal",tooltip:n(),seriesLabel:{enabled:!1,align:y.BOTTOM,useHtml:!1,style:{color:"#333333",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}"}},valueLabel:{enabled:!1,useHtml:!1,backgroundColor:"#F5F5F7",style:{color:"#333333",fontSize:"0.6875rem",fontFamily:"Verdana"},formatter:{identifier:"${SERIES}${VALUE}"}},needle:"#E5715A",hinge:"#656B6D",hingeBackgroundColor:"#DCF2F9",paneBackgroundColor:"#FCFCFC"},slot:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"2.25rem",fontFamily:"Verdana",fontWeight:"bold",textShadow:"0px 2px 0px rgba(0,0,0,0.08)"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#666666",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee"},options:{colors:A,legend:d(),gaugeAxis:[{type:"value",showLabel:!0,step:1,enableTick:!0,tickColor:"#BBBBBB",tickWidth:1,enableMinorTick:!0,minorTickColor:"#e2e2e2",minorTickWidth:1,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.625rem"}}]}},radar:{plotOptions:{fillColorOpacity:.15,columnType:!1,marker:{radius:4.5},lineWidth:2,shape:"circle",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,polar:{},legend:d(),angleAxis:[v()],radiusAxis:[_()]}},scatter:{plotOptions:{large:!1,lineWidth:0,curve:!1,marker:{radius:4.5},opacity:1,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"outside"}},options:{colors:A,zoom:l(),legend:d(),rangeLegend:c(),xAxis:[g()],yAxis:[p()]}},bubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:.7,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"inside"}},options:{colors:A,zoom:l(),rangeLegend:c(),legend:d(),xAxis:[g()],yAxis:[p()]}},funnel:{plotOptions:{borderColor:"rgb(255,255,255)",borderWidth:1,sort:!0,useSameSlantAngle:!0,dataLabels:{formatter:{identifier:"${VALUE}"},enabled:!1,connectorWidth:1,align:"outside"}},options:{colors:A,legend:d(),style:L}},wordCloud:{plotOptions:{fontFamily:"Microsoft YaHei",maxRotation:0,minRotation:0,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},structure:{plotOptions:{layout:"vertical",force:!0,lineColor:"rgb(156,156,156)",lineOpacity:1,borderWidth:1,borderOpacity:1,fillColorOpacity:1,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},forceBubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:1,tooltip:i(),dataLabels:{formatter:{identifier:"{SERIES}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d(),zoom:l(),rangeLegend:c()}},areaMap:{plotOptions:{nullColor:"#cccccc",opacity:.75,borderColor:"#ffffff",borderWidth:1,borderOpacity:1,tooltip:s(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},pointMap:{plotOptions:{opacity:1,icon:{iconUrl:"../../doc/example/marker-icon.png",iconSize:[25,41]},dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"outside"},tooltip:s()},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},heatMap:{plotOptions:{maxOpacity:1,minOpacity:0,radius:15,blur:.15},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},lineMap:{plotOptions:{lineWidth:.5,curveness:.3,mouseOverColor:"rgb(253,221,49)",opacity:1},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},gantt:{plotOptions:{newLine:!0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${DURATION}${PROGRESS}"},enabled:!1},tooltip:i()},options:{processes:{resize:!0},levelBar:{enabled:!0},timeAxis:{zoom:!0,showWeekends:!0},colors:A,legend:d()}}};return t.MAP_CONFIG=C,t}function i(){return{formatter:{identifier:"${CATEGORY}${SERIES}${VALUE}"},enabled:!0,animation:!0,follow:!1,backgroundColor:"rgba(0,0,0,0.5)",borderColor:null,borderWidth:0,borderRadius:2,shadow:!0,hideDelay:500,shared:!1,padding:5}}function n(){return x.merge(i(),{formatter:{enabled:!1}},!0)}function r(){return x.merge(i(),{formatter:{identifier:"${SERIES}${X}${Y}${SIZE}"}},!0)}function a(){return x.merge(i(),{formatter:{identifier:"${SERIES}${VALUE}"}},!0)}function o(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}",shared:!0}},!0)}function s(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}${SIZE}",shared:!0}},!0)}function h(){return{align:"center",backgroundColor:null,borderRadius:0,floating:!1,x:0,y:0,text:null,style:{color:"#333333",fontSize:"1.375rem",fontFamily:"Verdana"},useHtml:!1}}function l(){return{zoomType:"xy",zoomTool:{enabled:!1,resize:!0}}}function u(){return{visible:!0,enabled:!0,borderColor:"#cccccc",borderWidth:0,hiddenColor:"#cccccc",hoverColor:"#293C55",style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,x:0,y:0,layout:"vertical",continuous:!0,margin:10}}function c(){return x.merge(u(),{enabled:!1},!0)}function d(){return{visible:!0,enabled:!1,hiddenColor:"#cccccc",hoverColor:"#293C55",borderRadius:0,borderColor:"#cccccc",borderWidth:0,backgroundColor:null,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,layout:"vertical",x:0,y:0,shadow:!1,margin:10}}function f(){return{type:"category",position:"bottom",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:1,lineColor:"#cccccc",showArrow:!1,enableTick:!0,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:0,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function p(){return{type:"value",position:"left",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:0,lineColor:"#cccccc",showArrow:!1,enableTick:!1,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function g(){return x.merge(f(),{type:"value"},!0)}function m(){return x.merge(p(),{type:"category"},!0)}function v(){return{type:"category",lineWidth:1,lineColor:"#cccccc",gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function _(){return x.merge(v(),{type:"value"},!0)}var y=t("../Constants"),x=t("../utils/QueryUtils"),b=(t("../utils/BaseUtils"),t("../chart/map/CRS")),T=t("../dom/Browser"),A=["#63b2ee","#76da91","#f8cb7f","#f89588","#7cd6cf","#9192ab","#7898e1","#efa666","#eddd86","#9987ce"],C={crs:b.EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:.5,zoomDelta:.5,trackResize:!0,dragging:!0,inertia:!T.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60},L="gradual";return e}),define("vans/VanChartLibrary",["require","../Constants"],function(t){function e(t){return r[t]||r[n.VANCHART]}function i(t,e){r[t]=e}var n=t("../Constants"),r={};return{get:e,register:i}}),define("vans/VanChart",["require","./../utils/BaseUtils","./../utils/QueryUtils","../dom/Evented","./VanChartLayout","./../ComponentLibrary","./../ChartLibrary","./../Constants","./../HammerHandler","./../vector/SvgRenderer","./../vector/VmlRenderer","../utils/Point2D","./../theme/config","./VanChartLibrary"],function(t){var e=t("./../utils/BaseUtils"),i=t("./../utils/QueryUtils"),n=t("../dom/Evented"),r=t("./VanChartLayout"),a=t("./../ComponentLibrary"),o=t("./../ChartLibrary"),s=t("./../Constants"),h=t("./../HammerHandler"),l=t("./../vector/SvgRenderer"),u=t("./../vector/VmlRenderer"),c=t("../utils/Point2D"),d=5,f=[a.X_AXIS_COMPONENT,a.Y_AXIS_COMPONENT,a.ANGLE_AXIS_COMPONENT],p=n.extend({vanChartType:"vanChart",initialize:function(t,i,n){this.wrapDom=i,this.width=e.getDomWidth(i),this.height=e.getDomHeight(i),this.vancharts=n,this.series=[],this.components={},this._targets={},this.animationCount=0,this._changeDataState=!1,this.fullScreenChart=null,this.setOptions(t),this.handler=new h(this,i),this._initDomLayout(this.wrapDom),this.update()},setOptions:function(t){t.series=t.series||[],t.series.forEach(function(t){t.data=t.data||[]}),this._mergeThemeConfig(t),t.plotOptions.inverted&&t.dataSheet&&(t.dataSheet.enabled=!1),this.options=t,this.fullScreenChart&&this.fullScreenChart.setData(t)},_initDomLayout:function(t){this.dom=t,this.renderer=e.isSupportSVG()?new l(t,this):new u(t,this),this.renderer.onAdd(),this.on({animationStart:this._animationStart,animationEnd:this._animationEnd})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels(),t.render()}),this.animationCount||this.fire("animationEnd")},_animationEnd:function(){this.renderer&&(this._animationStarted=!1,this.series.forEach(function(t){t._animateEnd()}))},_removeChangeDataState:function(t){this._changeDataState&&(this._changeDataSeries=this._changeDataSeries||[],this._changeDataSeries.push(t),this._changeDataSeries.length>=this.series.length&&(this._changeDataState=!1,this._changeDataSeries=[]))},_needShowMoreLabel:function(){return this._changeDataState&&e.hasDefined(this.options.moreLabel)&&!this.isLargeMode()},_clearMoreLabels:function(){this.series.forEach(function(t){t._clearMoreLabels()})},_initIntermediateState:function(){this.colorMap={},this.orderMap={},this.cateMap={},this.scale=1,this.timeQueue=this.clearTimeQueue(),this.clipPool={},this.axisSize={left:0,right:0,bottom:0,top:0},this.layerMap=this.layerIndex=null},refresh:function(t){this.setOptions(t),this.update()},refreshRestore:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._restoreCategoryAxisBasedSeries(e[i])});var i=this.seriesOfType(s.GAUGE_CHART);i.length==this.series.length&&this.series.sort(function(t,e){return t.index-e.index}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.map(function(t){return t.graphic}),i={};t.options.data.forEach(function(t,e){i[t.x]=e}),t.points.sort(function(t,e){return i[t.x]-i[e.x]}),t.points.forEach(function(t,i){t.graphic=e[i]})});var n=this.seriesOfType(s.MULTIPIE_CHART);n.length&&n[0].orderData(null),this.update()},orderData:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._orderCategoryAxisBasedSeries(e[i])});var i=this.orderType==s.ASCENDING,n=i?1:-1,r=this.seriesOfType(s.GAUGE_CHART);r.length==this.series.length&&this.series.sort(function(t,e){var i=t.getSeryTotalValue(),r=e.getSeryTotalValue();return(i-r)*n}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.filter(function(t){return t.visible}).map(function(t){return t.graphic});t.points.sort(function(t,e){return i?t.y-e.y:e.y-t.y});var n=0;t.points.forEach(function(t){t.visible&&(t.graphic=e[n],++n)})});var o=this.seriesOfType(s.MULTIPIE_CHART);o&&o.length&&o[0].orderData(i),this.reRenderSeries(),f.concat([a.ZOOM_COMPONENT,a.DATA_SHEET_COMPONENT,a.POLAR_COMPONENT]).forEach(function(t){e[t]&&e[t].render()})},_restoreCategoryAxisBasedSeries:function(t){for(var i=0,n=t.getAxisCount();n>i;i++){var r=t.getAxis(i),a=r.series;if(r._isBaseAxis()&&r.isCategory()&&this.orderMap&&Object.keys(this.orderMap).length){var o=this.orderMap[r.componentType][i],s={};o.forEach(function(t,e){s[t]=e});for(var h=r._dataDomain,l=0,u=a.length;u>l;l++){var c=[],d=a[l],f=!0;d.points.forEach(function(t){c[e.indexOf(h,t.category)]=t.graphic,t.graphic||(f=!1)}),d.points.forEach(function(t){t.graphic=f?c[s[t.category]]:t.graphic,d.updatePointGraphic(t)})}}}},_orderCategoryAxisBasedSeries:function(t){for(var i=this.orderType==s.ASCENDING?1:-1,n=0,r=t.getAxisCount();r>n;n++){var a=t.getAxis(n);if(this.orderMap[a.componentType]=this.orderMap[a.componentType]||[],this.orderMap[a.componentType][n]||(this.orderMap[a.componentType][n]=a._dataDomain),a._isBaseAxis()&&a.isCategory()){for(var o=a.series,h=[],l=o[0].points,u=0,c=l.length;c>u;u++){var d=l[u],f=0;d.points.forEach(function(t){t.visible&&t.series.visible&&(f+=Math.abs(t.getTargetValue()))}),h.push({key:d.category,value:f})}h.sort(function(t,e){return(t.value-e.value)*i});var p={},g=[];h.forEach(function(t,e){p[t.key]=e,g.push(t.key)});for(var m=a.getOriginalCategories(),u=0,c=o.length;c>u;u++){var v=[],_=o[u],y=!0;_.points.forEach(function(t){v[e.indexOf(m,t.category)]=t.graphic,t.graphic||(y=!1)}),_.points.forEach(function(t){t.graphic=y?v[p[t.category]]:t.graphic,_.updatePointGraphic(t)})}a.setCategories(g)}}},update:function(){this.series=this.layerMap&&this.layerMap.length?this.layerMap[0].series:this.series,this._initIntermediateState();for(var t,i,n=this.options,r=this,h=n.series,l=n.chartType,u=a.getRegisteredComponents(),c=a.ComponentsOrder,d=0,f=c.length;f>d;d++){if(t=c[d],i=u[t],t==a.RANGE_LEGEND_COMPONENT&&n[t]){var p=n[t].continuous?a.GradientRangeLegend:a.INTERVAL_RANGE_LEGEND;this.components[t]&&this.components[t].type!=p&&(this.components[t].remove(),this.components[t]=null),i=a.get(p)}if(i){var g=n[t]&&(e.hasNotDefined(n[t].enabled)||n[t].enabled);g||t!=a.TOOLBAR_COMPONENT||(g=!0,n[t]={enabled:!0,hidden:!1}),n[t]&&g?this.components[t]?this.components[t].refresh(n[t],r):this.components[t]=new i(n[t],t,r):this.components[t]&&(this.components[t].remove(),this.components[t]=null,delete this.components[t])}}var m,v={},_=[];r.series.forEach(function(t){m=t.type,m==s.GAUGE_CHART&&(m+=t.gaugeType+(t.options.thermometerLayout||"")),m==s.RADAR_CHART&&(m=t.columnType?s.COLUMN_RADAR:s.LINE_RADAR),v[t.name+m]=t}),h.forEach(function(t,i){m=t.type||l;var a=e.pick(t.name,"Series"+i),h=o.get(m),u=a+m;if(m==s.GAUGE_CHART){var c=t.style||n.plotOptions.style,d=t.thermometerLayout||n.plotOptions.thermometerLayout||"";h=o.get(c),u=a+m+c+d}else if(m==s.RADAR_CHART){var f=t.columnType||n.plotOptions.columnType;f=f?s.COLUMN_RADAR:s.LINE_RADAR,h=o.get(f),u=a+f}var p=v[u];p=p?p.refresh(t,i):new h(t,r,i),_.push(p),v[u]=null});for(var y in v)v[y]&&v[y].remove();r.series=_;var x=this.components[a.GAUGE_AXIS_COMPONENT];x&&x.initAttributesWithSeries();var b=this.components[a.RANGE_LEGEND_COMPONENT];b&&b.initAttributesWithSeries(),_.forEach(function(t){if(t.type!==s.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),r.layoutComponentsAndCharts()},layoutComponentsAndCharts:function(){this.hoverPoint=this.hoverSeries=null,r.PLANE_SYSTEM_LAYOUT(this),this.render()},_getDefaultBounds:function(){var t=this.options&&this.options.padding||d,i=this.options&&this.options.borderWidth||0;return t=i+t,e.makeBounds(t,t,Math.max(this.width-2*t,0),Math.max(this.height-2*t,0))},reRenderWholePlot:function(){r.reLayoutPlotBounds(this),r.calculateSeries(this),r.calculateSeriesShapes(this),this.render()},dealAxisZoom:function(t,e){var i=this.options.zoom.zoomType,n=this.components.xAxis,r=this.components.yAxis;n&&-1!==i.indexOf("x")&&n.axisZoom(t,e),r&&-1!==i.indexOf("y")&&r.axisZoom(t,e),this.reRenderWholePlot()},clearAllEffects:function(){this.series.forEach(function(t){t.points.forEach(function(t){t.clearPointEffect()})})},_calculateZoomParas:function(t,e){var i=this.bounds,n=Math.min(t.x,e.x)-i.x,r=Math.min(t.y,e.y)-i.y,a=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y),s=Math.min(i.width/a,i.height/o),h=i.width/s,l=i.height/s,u=(i.width-h)/2-n,c=(i.height-l)/2-r;return{shiftX:u,shiftY:c,scale:s}},_mergeThemeConfig:function(n){var r=t("./../theme/config")(),a={};n.series.forEach(function(t){var o=t.type||n.chartType,h=r[o].plotOptions;if(o==s.GAUGE_CHART){var l=t.style||n.plotOptions.gauge&&n.plotOptions.gauge.style||n.plotOptions.style;l="pointer_semi"==l?"pointer":l,h=r.gauge[l];var u=["seriesLabel","valueLabel","percentageLabel"];u.forEach(function(n){e.hasDefined(t[n])&&i.merge(t[n],h[n],!1)})}a[o]||(a[o]=!0,i.merge(n,r[o].options,!1),n.plotOptions[o]?n.plotOptions[o]=i.merge(n.plotOptions[o],h,!1):n.plotOptions=i.merge(n.plotOptions,h,!1))}),this.isMap()&&(n.xAxis=n.yAxis=n.zoom=void 0,e.extend(n,r.MAP_CONFIG)),n.chartType==s.RADAR_CHART&&(n.polar=n.polar||{}),n.tooltip=n.tooltip||{}},getChartMinMaxValue:function(){var t=Number.MAX_VALUE,e=-t;return this.series.forEach(function(i){i.points.filter(function(t){return!t.isNull&&!isNaN(t.getTargetValue())}).forEach(function(i){var n=i.getTargetValue();e=Math.max(e,n),t=Math.min(t,n)})}),t>e&&(t=0,e=100),[t,e]},getParentDom:function(){return this.dom},getDivParentDom:function(){return this.wrapDom},isInverted:function(){return!!this.options.plotOptions.inverted},setPlotBounds:function(t){this.bounds=t},getPlotClipBounds:function(){var t=0,e=0,i=this.bounds.width,n=this.bounds.height,r={},a=[];return this.components.xAxis&&(a=a.concat(this.components.xAxis._axisList)),this.components.yAxis&&(a=a.concat(this.components.yAxis._axisList)),a.forEach(function(t){var e=t.getPosition();t.isOnZero()||r[e]||(r[e]=t.getLineWidth())}),e=r[s.TOP]?Math.ceil(r[s.TOP]/2):0,n-=e,n=r[s.BOTTOM]?n-Math.ceil(r[s.BOTTOM]/2-.5):n,t=r[s.LEFT]?Math.ceil(r[s.LEFT]/2):0,i-=t,i=r[s.RIGHT]?i-Math.ceil(r[s.RIGHT]/2):i,{x:t+this.bounds.x,y:e+this.bounds.y,width:Math.max(i+1,0),height:Math.max(n+1,0)}},getChartBounds:function(){return e.makeBounds(0,0,this.width,this.height)},xAxis:function(t){t||(t=0);var e=this.components.xAxis;return e?e.getAxis(t):null},yAxis:function(t){t||(t=0);var e=this.components.yAxis;return e?e.getAxis(t):null},polar:function(t){t||(t=0);var e=this.components.polar;return e?e.getAxis(t):null},angleAxis:function(t){t||(t=0);var e=this.components.angleAxis;return e?e.getAxis(t):null},radiusAxis:function(t){t||(t=0);var e=this.components.radiusAxis; - return e?e.getAxis(t):null},gaugeAxis:function(t){t||(t=0);var e=this.components.gaugeAxis;return e?e.getAxis(t):null},getSharedAxis:function(){for(var t=[this.xAxis(),this.yAxis(),this.angleAxis()],e=0;ee;e++)t[e].state=t[e].state==s.STATE_TO_DROP?s.STATE_DROPPED:t[e].state,t[e].state=t[e].state==s.STATE_TO_SHOW?s.STATE_SHOW:t[e].state},isMap:function(){return"vanChartMap"==this.vanChartType},chartType:function(){return this.options.chartType},isHeatMap:function(){return this.options.chartType==s.HEAT_MAP},isAreaMap:function(){return this.options.chartType==s.AREA_MAP},isForceBubble:function(){return"vanChartForceBubble"==this.vanChartType},isLargeMode:function(){return this.options.plotOptions.large},seriesOfType:function(t){return this.series.filter(function(e){return e.type==t})},pointsOfType:function(t){var e=[];return this.series.forEach(function(i){i.type==t&&(e=e.concat(i.points))}),e},setTimeout:function(t,e,i){this.timeQueue[t]&&window.clearTimeout(this.timeQueue[t]),i?this.timeQueue[t]=window.setTimeout(e,i):(e&&e(),this.timeQueue[t]=null)},clearTimeQueue:function(){var t=this.timeQueue||{};return Object.keys(t).map(function(e){window.clearTimeout(t[e])}),{}},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new c(this.width,this.height),this._sizeChanged=!1),this._size.clone()}});return p.include({render:function(){function t(t){e[t]||(e[t]=i.group().addClass(t).add(),e.isMap()&&e[t].addClass("map-component"))}this.vancharts.endLoading();var e=this,i=this.renderer,n=this.getPlotClipBounds();this.plotClip?i.updateClip(this.plotClip,n):this.plotClip=i.createClip(n),["backGroup","clipSeriesGroup","seriesGroup","seriesTextRenderGroup","frontGroup"].forEach(t),i.clip(e.clipSeriesGroup,e.plotClip),i.clip(e.seriesTextRenderGroup,e.plotClip),this._addDivClipGroup(n),this._renderBackground(),this.renderComponents(),this.renderSeries(),this._consoleDone()},_addDivClipGroup:function(t){var e=this;e.seriesTextDivGroup||(e.seriesTextDivGroup=this.renderer.div().add()),e.seriesTextDivGroup.style({clip:"rect("+[t.y,t.x+t.width,t.y+t.height,t.x].join("px ")+"px)"})},_renderBackground:function(){var t=e.makeBounds(0,0,this.width,this.height),i=this.bounds,n=this.options,r=this.renderer,a={backgroundColor:n.geo?"":n.backgroundColor,backgroundImage:n.geo?"":n.backgroundImage,borderColor:n.borderColor,borderWidth:n.geo?0:n.borderWidth,borderRadius:n.borderRadius,shadow:n.shadow},o={backgroundColor:n.plotBackgroundColor,backgroundImage:n.plotBackgroundImage,borderColor:n.plotBorderColor,borderWidth:n.plotBorderWidth,borderRadius:n.plotBorderRadius,shadow:n.plotShadow};a.shadow&&(t.width-=5,t.height-=5),a.backgroundColor||a.backgroundImage||a.borderColor?this.chartBackgroundGroup=this.chartBackgroundGroup||r.group().addTo(this.backGroup):this.chartBackgroundGroup&&(this.chartBackgroundGroup.remove(),this.chartBackgroundGroup=null),o.backgroundColor||o.backgroundImage||o.borderColor?this.plotBackgroundGroup=this.plotBackgroundGroup||this.renderer.group().addTo(this.backGroup):this.plotBackgroundGroup&&(this.plotBackgroundGroup.remove(),this.plotBackgroundGroup=null),this._renderRectangleBackground(this.chartBackgroundGroup,a,t),this._renderRectangleBackground(this.plotBackgroundGroup,o,i)},renderComponents:function(){for(var t in this.components)this.components[t].render()},renderSeries:function(){this.getComponent(a.TOOLTIP_COMPONENT).immediateHide(),this.fire("animationStart"),this._renderTrendLine(),this._updateSeriesState()},_renderRectangleBackground:function(t,i,n){if(t){var r=i.borderWidth||0,a=this.renderer,o=r/2,s=e.rectSubPixelOpt(n.x+o,n.y+o,Math.max(n.width-r,0),Math.max(n.height-r,0),r);if(s.rx=s.ry=i.borderRadius,i.shadow){var h=e.rectSubPixelOpt(n,1),l=[5,3,1],u=[.05,.1,.15];l.forEach(function(e,n){var r="shadowRect"+n;t[r]=t[r]||a.rect().style({fill:"none",stroke:"black","stroke-width":l[n],"stroke-opacity":u[n]}).addTo(t),t[r].attr(h).attr({rx:i.borderRadius,ry:i.borderRadius,transform:"translate(1, 1)"})})}if(i.backgroundColor&&"object"==typeof i.backgroundColor)if(e.isSupportSVG()){var c=i.backgroundColor,d={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},f={offset:"0%","stop-color":c.startColor},p={offset:"100%","stop-color":c.endColor};t.gradientFill?a.updateColorGradient(t.gradientFill,d,[f,p]):t.gradientFill=a.colorGradient(d,[f,p])}else i.backgroundColor=i.backgroundColor.startColor;(i.backgroundColor||i.borderWidth)&&(t.backgroundColor=t.backgroundColor||a.rect().addTo(t),t.backgroundColor.attr(s).style({fill:i.backgroundColor?"string"==typeof i.backgroundColor?i.backgroundColor:"url(#"+e.stamp(t.gradientFill)+")":"none",stroke:i.borderColor,"stroke-width":e.pick(i.borderWidth,0)})),i.backgroundImage&&(t.backgroundImage=t.backgroundImage||a.image().addTo(t),t.backgroundImage.attr(n).attr("preserveAspectRatio","none").imageContent(i.backgroundImage))}},filterRender:function(){for(var t=0,e=this.series.length;e>t;t++)this.series[t].filterRender()},cancelLegendHighlight:function(t){var i=this.getComponent(a.LEGEND_COMPONENT);i=i||this.getComponent(a.RANGE_LEGEND_COMPONENT),i&&i.highlighted&&!e.containsPoint(i.bounds,t)&&(i.highlighted=!1,this.highlightTarget=null,this._updateSeriesStyle())},makeLegendHighlight:function(t){this.highlightTarget=t,this._updateSeriesStyle()},_updateSeriesStyle:function(){this.series.forEach(function(t){t.isSupportLegendHighlight()&&(t.useCanvas()?t._canvasRender():(t.drawSeries&&t.drawSeries(),t.getDataToDraw().filter(function(t){return t.isVisible()}).forEach(function(e){t._updatePointGraphicStyle(e)})))})},reRenderSeries:function(){r.calculateSeries(this),r.calculateSeriesShapes(this),this.renderSeries()},_consoleDone:function(){window.console&&console.log("done")},removePointGraphics:function(t){t&&t.remove()},registerInteractiveTarget:function(t,i){this._targets[e.stamp(i.node())]=t,t._events=null,t.getEvents&&t.on(t.getEvents(),t)},findInteractiveTarget:function(t){return this._targets[e.stamp(t)]},resize:function(){var t=this.wrapDom;this.width=e.getDomWidth(t),this.height=e.getDomHeight(t),this.renderer.resize(),this.isMap()&&(this.mapRenderer.resize(),this._onResize(),this.components.geo.resize()),this.layoutComponentsAndCharts()},remove:function(){this.force&&this.force.endTick(null).stop(),this.force=null,this.clearAllEffects(),this.clearTimeQueue(),this.renderer.remove(),this.handler&&this.handler.destroy(),this.mainRenderer&&this.mainRenderer.remove(),this.animationRenderer&&this.animationRenderer.remove(),this.mainRenderer=null,this.animationRenderer=null,this.largeSeries&&Object.keys(this.largeSeries).map(function(t){this.largeSeries[t]._canvas&&this.largeSeries[t]._canvas.remove(),this.largeSeries[t]=null},this),this.largeSeries=null,this.renderer=this.plotClip=this._leaflet=this.handler=this.chartBackgroundGroup=this.trendLineGroup=this.seriesGroup=this.clipSeriesGroup=this.seriesTextRenderGroup=this.seriesTextDivGroup=null}}),t("./VanChartLibrary").register(s.VANCHART,p),p}),define("vector/Cut",["require","../utils/BezierEasing"],function(t){var e=t("../utils/BezierEasing"),i=function(t,e){return function(i){return+t+(+e-+t)*i}},n=function(t,e,n){var r=i(t[e],n);return function(i){t[e]=r(i)}},r=function(t){if(!t)throw'animation "targets" empty';null==t.length?this.targets=[t]:this.targets=t,this._needsRemove=!1,this._lastSectionTime=null,this._sections=[],this.onend=null};return r.prototype={step:function(t){this._lastSectionTime||(this._lastSectionTime=t);var e=t-this._lastSectionTime,i=this.targets,n=this._sections[0],r=Math.min(e/n.time,1);if(!(!r>0)){n.easing&&(r=n.easing(r));for(var a=n.tweens,o=i.length,s=0;o>s;s++)for(var h in a)a.hasOwnProperty(h)&&a[h][s](r);return 1===r&&(this._lastSectionTime=t,this._sections.shift(),0===this._sections.length)?(this._needsRemove=!0,"end"):void 0}},_fillTweens:function(t){return this.targets.map(function(e,i){return t(e,i)})},delay:function(t){return this._sections.push({time:t,tweens:{}}),this},duration:function(t){return this._sections.push({time:t,tweens:{}}),this},tween:function(t,e){var i=this._sections.length,r=this._sections[i-1].tweens;return"function"==typeof e?r[t]=this._fillTweens(e):r[t]=this._fillTweens(function(i,r){return n(i,t,e)}),this},attrTween:function(t,e){return this.tween("attr"+t,function(i,n){var r=+i.getAttribute(t),a=e(i,n,r);return function(e){i.setAttribute(t,a(e))}}),this},attr:function(t,e){return this.attrTween(t,function(t,n,r){return"function"==typeof e?i(r,e.call(null,t,n,r)):i(r,e)}),this},end:function(t){return this.onend=t,this},stop:function(){return this._needsRemove=!0,this},ease:function(t){var i=this._sections.length;return this._sections[i-1].easing="string"==typeof t?e.css[t]:t,this}},r}),define("vector/Animation",["require","./Cut"],function(t){var e=t("./Cut"),i=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},n=function(){this._initTime=null,this._running=!1,this._cuts=[],this._callback=[],this.onframe=null,this.onend=null};return n.prototype={_update:function(){var t=(new Date).getTime(),e=this._cuts,i=e.length;if(!e.length)return!1;for(var n=0;i>n;)e[n]._needsRemove?(e[n]=e[i-1],e.pop(),i--):n++;for(var n=0;i>n;n++){var r=e[n].step(t);r&&e[n]["on"+r]&&this._callback.push(e[n]["on"+r])}this.onframe&&this.onframe();for(var a,n=-1;a=this._callback[++n];)a();return this._callback=[],!0},_startLoop:function(){function t(){e._running&&(e._running=e._update(),i(t))}var e=this;i(t)},frame:function(t){return this.onframe=t,this},start:function(){return this._running||(this._running=!0,this._startLoop()),this},stop:function(){return this._running=!1,this},clear:function(){return this._running=!1,this._cuts=[],this},animate:function(t){var i=new e(t);return i.animation=this,this._cuts.push(i),this.start(),i}},n}),define("vector/shape/Arc",["require","../../utils/BaseUtils","../../dom/Browser"],function(t){var e=t("../../utils/BaseUtils"),i=t("../../dom/Browser").touch,n=i?10:2,r=2*Math.PI,a=Math.max,o=Math.atan2,s=Math.abs,h=Math.sqrt,l=e.normalRadian,u=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,startAngle:null,endAngle:null,lineWidth:null,color:null,fillStyle:"rgba(0, 0, 0, 0)"}};return u.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.style;return(e.lineWidth&&e.lineWidth!==t.lineWidth||e.color&&e.color!==t.strokeStyle)&&(t.stroke(),t.beginPath(),t.lineWidth=e.lineWidth,t.strokeStyle=e.color),e.fillStyle&&e.fillStyle!==t.fillStyle&&(t.fill(),t.fillStyle=e.fillStyle),this},draw:function(){var t=this.ctx,e=this.style;return e.lineWidth?(t.moveTo(e.ox+e.r*Math.cos(e.startAngle),e.oy+e.r*Math.sin(e.startAngle)),t.arc(e.ox,e.oy,e.r,e.startAngle,e.endAngle),this):this},animate:function(){return this.cut||(this.cut=this.renderer.animation.animate(this.style)),this},delay:function(t){return this.cut.delay(t),this},duration:function(t){return this.cut.duration(t),this},tween:function(t,e){return this.cut.tween(t,e),this},end:function(t){return this.cut.end(t),this},stop:function(){return this.cut.stop(),this},ease:function(t){return this.cut.ease(t),this},remove:function(){this.cut&&this.cut.stop(),this.needToRemove=!0},contain:function(t){var e=t.x,i=t.y,u=this.style,c=a(u.lineWidth,n),d=e-u.ox,f=i-u.oy,p=s(h(d*d+f*f)-u.r);if(p>c)return!1;var g=l(o(f,d));return(g+r-u.startAngle)%r<=u.endAngle-u.startAngle}},u}),define("vector/shape/Circle",["require"],function(t){var e=2*Math.PI,i=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,lineWidth:null,strokeStyle:null,fillStyle:null}};return i.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.renderer,i=this.style;return(i.lineWidth&&i.lineWidth!==t.lineWidth||i.strokeStyle&&i.strokeStyle!==t.strokeStyle)&&(t.stroke(),t.lineWidth=i.lineWidth,t.strokeStyle=i.strokeStyle),i.fillStyle&&i.fillStyle!==e.fillStyle&&(t.fill(),t.beginPath(),t.fillStyle=i.fillStyle,e.fillStyle=i.fillStyle),this},draw:function(){var t=this.ctx,i=this.style;return t.moveTo(i.r+i.ox,i.oy),t.arc(i.ox,i.oy,i.r,0,e),this}},i}),define("vector/shape/Image",["require"],function(t){var e=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={imagedata:null,dx:null,dy:null,dirtyX:null,dirtyY:null,dirtyWidth:null,dirtyHeight:null}};return e.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){return this},draw:function(){var t=this.style;return this.ctx.putImageData(t.imagedata,t.dx,t.dy),this}},e}),define("vector/CanvasRenderer",["require","./Renderer","../Constants","./Animation","./shape/Arc","./shape/Circle","./shape/Image","./ElementWrapper"],function(t){var e=t("./Renderer"),i=t("../Constants"),n=t("./Animation"),r=t("./shape/Arc"),a=t("./shape/Circle"),o=t("./shape/Image"),s=t("./ElementWrapper"),h=["lineWidth","strokeStyle"],l=e.extend({_initContainer:function(){var t=this.dom,e=this.vanchart,i=this.config,r=i||e.bounds,a=i&&i.dpr||1;this._container=new s(this._createCanvas(t,r,a),this),this.ctx=this._container.node().getContext("2d"),this.ctx.scale(a,a),this.elements=[],this.animation=(new n).frame(this.flush.bind(this))},arc:function(t){return this._create(r,t)},circle:function(t){return this._create(a,t)},image:function(t){return this._create(o,t)},_create:function(t,e){var i=new t(this);return i.rawElement=i,this.elements.push(i),e&&i.setStyle(e),i},style:function(){},_createCanvas:function(t,e,i){var n=document.createElement(window.VAN_CANVAS),r=this.left=e.x,a=this.top=e.y,o=this.width=e.width,s=this.height=e.height;return this.dpr=i,n.style.position="absolute",n.style.left=r+"px",n.style.top=a+"px",n.style.width=o+"px",n.style.height=s+"px",n.width=o*i,n.height=s*i,n.onselectstart=function(){return!1},n.style["-webkit-user-select"]="none",n.style["user-select"]="none",n.style["pointer-events"]="none",n.style["-webkit-touch-callout"]="none",n.style.transform="translateZ(0)",t.appendChild(n),window.VanCanvasManager&&VanCanvasManager.initElement(n),n},flush:function(){this.clearAll(),this.ctx.beginPath();for(var t=this.elements,e=t.length,i=[],n=0;e>n;n++)t[n].needToRemove||(i.push(t[n]),t[n].drawStyle().draw());this.elements=i,this.ctx.stroke(),this.ctx.fill()},_updateCtxStatus:function(){for(var t,e,i=-1;t=h[++i];)this[t]!==this.ctx[t]&&(this[t]=this.ctx[t],e=!0);e&&this.ctx.stroke(),this.fillStyle!==this.ctx.fillStyle&&(this.fillStyle=this.ctx.fillStyle,this.ctx.fill())},clearAll:function(){this.ctx.clearRect(0,0,this.width,this.height)},remove:function(){this.animation.clear(),this.ctx=null,this._container.remove()},addBubbleSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];r.visible&&!r.isNull&&(e.fillStyle=r.color,e.globalAlpha=this.getPointOpacity(r),e.beginPath(),e.arc(r.posX,r.posY,r.radius,0,2*Math.PI),e.fill())}e.restore()},getPointOpacity:function(t){var e=t.series,i=e.vanchart.highlightTarget;if(i){var n=e.name;return n==i||t._rangeItem==i?1:.3}return t.opacity},addScatterSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];if(r.visible&&!r.isNull){var a=r.options.marker,o=a.symbol,s=isNaN(a.radius)?4.5:a.radius,h=a.fillColor||r.color;e.translate(r.posX,r.posY),e.fillStyle=h,e.strokeStyle=h,e.globalAlpha=this.getPointOpacity(r),this._drawMarker(e,o,s),e.translate(-r.posX,-r.posY)}}e.restore()},addSeries:function(t){t.visible&&(t.type==i.SCATTER_CHART?this.addScatterSeries(t):this.addBubbleSeries(t))},_drawMarker:function(t,e,n){-1!=e.indexOf(i.CIRCLE)?(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)):-1!=e.indexOf(i.SQUARE)?(t.beginPath(),t.moveTo(-n,-n),t.lineTo(n,-n),t.lineTo(n,n),t.lineTo(-n,n),t.closePath()):-1!=e.indexOf(i.DIAMOND)?(n=2*n/Math.sqrt(2),t.beginPath(),t.moveTo(-n,0),t.lineTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.closePath()):-1!=e.indexOf(i.TRIANGLE)?(t.beginPath(),t.moveTo(-n,n/Math.sqrt(3)),t.lineTo(0,-(2*Math.sqrt(3)/3)*n),t.lineTo(n,n/Math.sqrt(3)),t.closePath()):(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)),-1==e.indexOf("hollow")?t.fill():(t.fillStyle="white",t.lineWidth=2,t.fill(),t.stroke())}});return l}),define("chart/map/LineMapLayer",["require","../../utils/BaseUtils","../../dom/DomUtils","../../utils/ColorUtils","../../Constants","../../vector/Layer","../../dom/Browser"],function(t){function e(t,e,i,n){if(!p[t]){var r=document.createElement(window.VAN_CANVAS);r.style.width=e+"px",r.style.height=i+"px",r.width=e*n,r.height=i*n;var a=r.getContext("2d");a.scale(n,n),p[t]=a}return p[t]}function i(t){if(g[t])return g[t];var e=new Image;return e.crossOrigin="Anonymous",e.onload=function(){g[t]=e},e.src=t,!1}function n(t,n,r,a,o){var s=u*Math.max(n,r),h=e(t,s,s,a),l=null;return(l=i(t))?(h.clearRect(0,0,s,s),h.translate(s/2,s/2),h.rotate(o),h.drawImage(l,-n/2,-r/2,n,r),h.rotate(-o),h.translate(-s/2,-s/2),h.getImageData(0,0,s*a,s*a)):null}function r(t,e,i){function r(t){return b=t,this}function o(){return b=[],this}function h(t){l(!0,t)}function l(e,n){var r=b.length;if(r&&b[0]&&b[0].series.options.large){b[0].refreshPointColor();var a=s.mixColorWithAlpha(b[0].color,b[0].opacity)}b.map(function(o){var h=o.series,l=h.options.large,u=o.visible&&h.visible,m=o.graphic,_=o.options,y=_.from.lnglat[0],x=_.from.lnglat[1],b=_.to.lnglat[0],T=_.to.lnglat[1];if(y!==b||x!==T){var A=i.latLngToContainerPoint([x,y]),C=i.latLngToContainerPoint([T,b]);if(o.ax=A.x,o.ay=A.y,o.bx=C.x,o.by=C.y,o.curveness=_.curveness,0===o.curveness&&(o.curveness=.01),u)if(l)t.ctx.globalCompositeOperation="lighter",o._color=a;else{var L=o.opacity;n&&(L*=o.series.name==n||o._rangeItem==n?1:.3),o._color=s.mixColorWithAlpha(o.color,L)}if(u&&!m){var P,M;if(o.graphic=t.arc(),o.graphic.point=o,P=g(o.graphic,o),c&&!e&&!l&&h.options.animation&&o.options.lineWidth&&(o.graphic.style.endAngle=P[3],M=o.graphic.animate().duration(d).ease(f).tween("endAngle",P[4])),c&&!l&&u&&o.options.effect&&o.options.effect.enabled){var w=h.points.indexOf(o);M?M.end(v.bind(this,o,r,w)):v(o,r,w)}}else u&&m?g(o.graphic,o):!u&&m&&(o.graphic.needToRemove=!0,o.graphic=null,p(o))}})}function p(t){t._effect&&(t._effect.stop(),t._effect=null),t._symbol&&(t._symbol.map(function(t){t.needToRemove=!0}),t._symbol=null)}function g(t,e){var i=a.computeArc(e.ax,e.ay,e.bx,e.by,e.curveness);return t.setStyle({ox:i[0],oy:i[1],r:i[2],startAngle:i[3],endAngle:i[4],lineWidth:e.options.lineWidth,color:e._color}),i}function m(){e.clearAll()}function v(t,i,n){if(t.graphic){var r=t.options.effect.period||2e3;t._effect=e.animation.animate(t.graphic.style).delay(r/5*n/i).duration(r).tween("track",function(e){return _(e,t)}).end(v.bind(this,t,i,n))}}function _(t,e){var i=t.startAngle,n=t.endAngle,r=(n-i)/3,a=n-i+r,o=e.options.effect;if(o.symbol){var s=o.symbol,h=o.width,l=o.height,u=window.devicePixelRatio||1;return function(i){e._symbol&&(e._symbol[0].needToRemove=!0),e._symbol=y(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,s,h,l,u)}}var c=1.4,d=1.5;return function(i){e._symbol&&e._symbol.map(function(t){t.needToRemove=!0}),e._symbol=x(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,d,c,e.color)}}function y(t,i,r,a,o,s,h,l,c,d,f){var p=t-h+o;if(!(t+o>s)){var g=h+p,m=a*Math.cos(g)+i,v=a*Math.sin(g)+r,_=null;if(_=n(l,c,d,f,Math.PI+g)){var y=u*Math.max(c,d);return[e.image({imagedata:_,dx:(m-y/2)*f,dy:(v-y/2)*f})]}}}function x(t,i,n,r,a,o,s,h,l,u){for(var c=t>s?0:s-t,d=o>t+a?s:s-(t+a-o),f=t-s+a,p=[],g=d;g>c;g-=l/r){var m=g+f,v=r*Math.cos(m)+i,_=r*Math.sin(m)+n,y=g/s;p.push(e.circle({ox:v,oy:_,r:y*h,strokeStyle:"rgba(0, 0, 0, 0)",fillStyle:u}))}return p}var b=[];return{data:r,clear:o,draw:l,redraw:h,stop:m,removeEffect:p}}var a=t("../../utils/BaseUtils"),o=t("../../dom/DomUtils"),s=t("../../utils/ColorUtils"),h=(t("../../Constants").LINE_MAP,t("../../vector/Layer")),l=t("../../dom/Browser"),u=Math.SQRT2,c=a.isSupportSVG(),d=800,f="ease-in-out-quad",p={},g={},m=h.extend({options:{mainRenderer:null,animationRenderer:null,vanchart:null},initialize:function(t){a.setOptions(this,t)},setData:function(t){return this._pairs=t,this._draw()},addData:function(t){return this._pairs.push(t),this._draw()},setOptions:function(t){return a.setOptions(this,t),this._lineMap&&this._updateOptions(),this._draw()},redraw:function(){return this._lineMap.redraw(this.options.vanchart.highlightTarget),this.options.mainRenderer.flush(),this},removeEffect:function(t){this._lineMap&&this._lineMap.removeEffect(t)},onAdd:function(t){this._map=t,this._lineMap||this._initRenderer(),t.on("moveend",this._reset,this),t.options.zoomAnimation&&l.any3d&&t.on("zoomanim",this._animateZoom,this),t.on(this._events,this),this._reset()},onRemove:function(t){this.options.pane?(this.getPane().removeChild(this._canvas),this.getPane().removeChild(this._animCanvas)):(t.getPanes().overlayPane.removeChild(this._canvas),t.getPanes().overlayPane.removeChild(this._animCanvas)),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),t.off(this._events,this)},addTo:function(t){return t.addLayer(this),this},_initRenderer:function(){var t=this._canvas=this.options.mainRenderer._container.node(),e=this._animCanvas=this.options.animationRenderer._container.node(),i=o.TRANSFORM_ORIGIN;t.style[i]=e.style[i]="50% 50%";var n=this._map.options.zoomAnimation&&l.any3d,a="leaflet-zoom-"+(n?"animated":"hide"),s="leaflet-linemap-layer leaflet-layer ";o.addClass(t,s+a),o.addClass(e,s+a),this._lineMap=r(this.options.mainRenderer,this.options.animationRenderer,this._map)},_updateOptions:function(){},_reset:function(){this._lineMap.stop();var t=this._map.containerPointToLayerPoint([0,0]);o.setPosition(this._canvas,t),o.setPosition(this._animCanvas,t),this._draw()},_draw:function(){return this._map&&this._pairs&&this._pairs.length?(this._lineMap.data(this._pairs).draw(),void this.options.mainRenderer.flush()):void this.options.mainRenderer.flush()},_animateZoom:function(t){this._lineMap.stop();var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());if(o.setTransform)o.setTransform(this._canvas,i,e),o.setTransform(this._animCanvas,i,e);else{var n=a.makeTranslate(i)+" scale("+e+")";this._canvas.style[o.TRANSFORM]=n,this._animCanvas.style[o.TRANSFORM]=n}},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){for(var e,i,n=this.options.mainRenderer,r=this.options.vanchart,a=this,o=n.elements,s=n.elements.length,h=t.containerPoint;e=o[--s];)if(e.contain(h)){i=e;break}var l=i&&i.point,u=l&&l.series.options.large;l?(r.showTooltip(l,t),r.handler.cursor("pointer"),l.mouseOverColor&&!u&&l!==a.hoverPoint&&(i.style.color=i.point.mouseOverColor)):(r.hoverPoint||r.hideTooltip(),r.handler.cursor("")),u||a.hoverPoint==l||(a.hoverPoint&&(a.hoverPoint.graphic.style.color=a.hoverPoint._color),a.hoverPoint=l,n.flush())}}});return function(t){return new m(t)}}),function(t,e,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define("chart/map/heatmap",i):e[t]=i()}("h337",this,function(){var t={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},e=function(){var e=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},i=t.defaultRadius;return e.prototype={_organiseData:function(t,e){var n=t[this._xField],r=t[this._yField],a=this._radi,o=this._data,s=this._max,h=this._min,l=t[this._valueField]||1,u=t.radius||this._cfgRadius||i;o[n]||(o[n]=[],a[n]=[]),o[n][r]?o[n][r]+=l:(o[n][r]=l,a[n][r]=u);var c=o[n][r];return c>s?(e?this.setDataMax(c):this._max=c,!1):h>c?(e?this.setDataMin(c):this._min=c,!1):{x:n,y:r,value:l,radius:u,min:h,max:s}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var r in e[n])t.push({x:n,y:r,radius:i[n][r],value:e[n][r]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;i>n;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},e}(),i=function(){function t(t){var i=t.container,n=this.shadowCanvas=document.createElement(window.VAN_CANVAS),r=this.canvas=t.canvas||document.createElement(window.VAN_CANVAS);window.VanCanvasManager&&VanCanvasManager.initElement(r),window.VanCanvasManager&&VanCanvasManager.initElement(n);var a=(this._renderBoundaries=[1e4,1e4,0,0],t.container.currentStyle||getComputedStyle(t.container)||{});r.className="heatmap-canvas",this._width=r.width=n.width=t.width||+a.width.replace(/px/,""),this._height=r.height=n.height=t.height||+a.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=r.getContext("2d"),r.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(r),this._palette=e(t),this._templates={},this._setStyles(t)}var e=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement(window.VAN_CANVAS);if(i.getContext){var n=i.getContext("2d");i.width=256,i.height=1;var r=n.createLinearGradient(0,0,256,1);for(var a in e)r.addColorStop(a,e[a]);return n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}return{}},i=function(t,e){var i=document.createElement(window.VAN_CANVAS),n=i.getContext("2d"),r=t,a=t;if(i.width=i.height=2*t,1===e)n.beginPath(),n.arc(r,a,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var o=n.createRadialGradient(r,a,t*e,r,a,t);o.addColorStop(0,"rgba(0,0,0,1)"),o.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=o,n.fillRect(0,0,2*t,2*t)}return i},n=function(t){for(var e=[],i=t.min,n=t.max,r=t.radi,t=t.data,a=Object.keys(t),o=a.length;o--;)for(var s=a[o],h=Object.keys(t[s]),l=h.length;l--;){var u=h[l],c=t[s][u],d=r[s][u];e.push({x:s,y:u,value:c,radius:d})}return{min:i,max:n,data:e}};return t.prototype={renderPartial:function(t){t.data.length>0&&(this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t))},renderAll:function(t){if(this._clear(),t.data.length>0){var t=n(t);this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t)}},_drawPoints:function(t){for(var e=this._min=t.min,i=this._max=t.max,t=t.data||[],n=t.length,r=1-this._blur,a=this.ctx;n--;){var o=t[n],s=+o.radius,h=Math.min(o.value,i),l=+o.x,u=+o.y,c=(h-e)/(i-e);c=isNaN(c)?1:c,a.globalAlpha=.01>c?.01:c;var d=a.createRadialGradient(l,u,s*r,l,u,s),f=this._gradientConfig;for(var p in f)d.addColorStop(+p,f[p]);a.fillStyle=d,a.beginPath(),a.moveTo(l,u),a.arc(l,u,s,0,2*Math.PI,!1),a.fill()}},_updateGradient:function(t){this._palette=e(t)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0===t.blur?0:t.blur||t.defaultBlur,this._gradientConfig=t.gradient||t.defaultGradient,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var e=this._min=t.min,n=this._max=t.max,t=t.data||[],r=t.length,a=1-this._blur;r--;){var o,s=t[r],h=s.x,l=s.y,u=s.radius,c=Math.min(s.value,n),d=h-u,f=l-u,p=this.shadowCtx;this._templates[u]?o=this._templates[u]:this._templates[u]=o=i(u,a);var g=(c-e)/(n-e);p.globalAlpha=.01>g?.01:g,p.drawImage(o,d,f),dthis._renderBoundaries[2]&&(this._renderBoundaries[2]=d+2*u),f+2*u>this._renderBoundaries[3]&&(this._renderBoundaries[3]=f+2*u)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,r=this._width,a=this._height,o=this._opacity,s=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;0>t&&(t=0),0>e&&(e=0),t+i>r&&(i=r-t),e+n>a&&(n=a-e);for(var u=this.shadowCtx.getImageData(t,e,i,n),c=u.data,d=c.length,f=this._palette,p=3;d>p;p+=4){var g=c[p],m=4*g;if(m){var v;v=o>0?o:s>g?h>g?h:g:s,c[p-3]=f[m],c[p-2]=f[m+1],c[p-1]=f[m+2],c[p]=l?f[m+3]:v}}u.data=c,this.ctx.putImageData(u,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e,i=this.shadowCtx,n=i.getImageData(t.x,t.y,1,1),r=n.data[3],a=this._max,o=this._min;return e=Math.abs(a-o)*(r/255)>>0},getDataURL:function(){return this.canvas.toDataURL()}},t}(),n=function(){var e=!1;return"canvas2d"===t.defaultRenderer&&(e=i),e}(),r={merge:function(){for(var t={},e=arguments.length,i=0;e>i;i++){var n=arguments[i];for(var r in n)t[r]=n[r]}return t}},a=function(){function i(){var i=this._config=r.merge(t,arguments[0]||{});if(this._coordinator=new a,i.plugin){var s=i.plugin;if(!t.plugins[s])throw new Error("Plugin '"+s+"' not found. Maybe it was not registered."); - var h=t.plugins[s];this._renderer=new h.renderer(i),this._store=new h.store(i)}else this._renderer=new n(i),this._store=new e(i);o(this)}var a=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,r=0;n>r;r++){var a=i[t][r];a(e)}}},t}(),o=function(t){var e=t._renderer,i=t._coordinator,n=t._store;i.on("renderpartial",e.renderPartial,e),i.on("renderall",e.renderAll,e),i.on("extremachange",function(e){t._config.onExtremaChange&&t._config.onExtremaChange({min:e.min,max:e.max,gradient:t._config.gradient||t._config.defaultGradient})}),n.setCoordinator(i)};return i.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r.merge(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},i}(),o={create:function(t){return new a(t)},register:function(e,i){t.plugins[e]=i}};return o}),define("chart/map/HeatMapOverlay",["require","./heatmap","../../vector/Layer","../../dom/DomUtils","../../utils/Point2D","../../utils/BaseUtils","./LatLng"],function(t){var e=t("./heatmap"),i=t("../../vector/Layer"),n=t("../../dom/DomUtils"),r=t("../../utils/Point2D"),a=t("../../utils/BaseUtils"),o=t("./LatLng"),s=i.extend({initialize:function(t){this.cfg=t,this._el=n.create("div","leaflet-zoom-hide"),this._el.style.zIndex=201,this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var i=t.getSize();this._map=t,this._width=i.x,this._height=i.y,this._el.style.width=i.x+"px",this._el.style.height=i.y+"px",this._el.style.position="absolute",this._origin=this._map.layerPointToLatLng(new r(0,0)),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=e.create(this.cfg)),t.on("moveend",this._reset,this),t.on(this._events,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._reset,this),t.off(this._events,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,e=t._leaflet_pos;a.isSupportSVG()?this._el.style[s.CSS_TRANSFORM]="translate("+-Math.round(e.x)+"px,"+-Math.round(e.y)+"px)":(this._el.style.left=-Math.round(e.x)+"px",this._el.style.bottom=Math.round(e.y)+"px"),this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0===this._data.length)return void(this._heatmap&&this._heatmap.setData(n));for(var r=[],a=this.cfg.scaleRadius?i:1,o=0,s=0,h=this.cfg.valueField,l=this._data.length;l--;){var u=this._data[l],c=u[h],d=u.latlng;if(t.contains(d)){o=Math.max(c,o),s=Math.min(c,s);var f=this._map.latLngToContainerPoint(d),p={x:Math.round(f.x),y:Math.round(f.y)};p[h]=c;var g;g=u.radius?u.radius*a:(this.cfg.radius||2)*a,p.radius=g,r.push(p)}}this.cfg.useLocalExtrema&&(n.max=o,n.min=s),n.data=r,this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.lnglatField||"lnglat",i=this.cfg.valueField||"value",t=t.data,n=t.length,r=[];n--;){var a=t[n].options,s=new o(a[e][1],a[e][0]),h={latlng:s};h[i]=a[i],a.radius&&(h.radius=a.radius),r.push(h)}this._data=r,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.lnglatField||"lnglat",n=this.cfg.valueField||"value",r=t,a=new o(r[i][1],r[i][0]),s={latlng:a};s[n]=r[n],this._max=Math.max(this._max,s[n]),this._min=Math.min(this._min,s[n]),r.radius&&(s.radius=r.radius),this._data.push(s),this._draw()}},_reset:function(){this._origin=this._map.layerPointToLatLng(new r(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px",this._heatmap._renderer.setDimensions(this._width,this._height)),this._draw()},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){var e=this._map,i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i):e.hideTooltip()}}});return s.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;ie;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){for(var e in this._layers)t.addLayer(this._layers[e])},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e])},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return i.stamp(t)}});return n}),define("vector/shape/Path",["require","./../Layer","../../dom/Browser","../../utils/BaseUtils"],function(t){var e=t("./../Layer"),i=t("../../dom/Browser"),n=(t("../../utils/BaseUtils"),e.extend({onAdd:function(){this._path=this._renderer.path().style(this.options),this._reset(),this._path.add()},onRemove:function(){this._path.remove()},redraw:function(){return this._map&&this._reset(),this},setStyle:function(t){return this.options=t||this.options,this._renderer&&this._path.style(this.options),this},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options["stroke-width"]?this.options["stroke-width"]/2:0)+(i.touch?10:0)},node:function(){return this._path.node()}}));return n}),define("chart/map/LatLngBounds",["require","./LatLng"],function(t){var e=t("./LatLng"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){var n,r,a=this._southWest,o=this._northEast;if(t instanceof e)n=t,r=t;else{if(!(t instanceof i))return t?this.extend(e.create(t)||i.create(t)):this;if(n=t._southWest,r=t._northEast,!n||!r)return this}return a||o?(a.lat=Math.min(n.lat,a.lat),a.lng=Math.min(n.lng,a.lng),o.lat=Math.max(r.lat,o.lat),o.lng=Math.max(r.lng,o.lng)):(this._southWest=new e(n.lat,n.lng),this._northEast=new e(r.lat,r.lng)),this},pad:function(t){var n=this._southWest,r=this._northEast,a=Math.abs(n.lat-r.lat)*t,o=Math.abs(n.lng-r.lng)*t;return new i(new e(n.lat-a,n.lng-o),new e(r.lat+a,r.lng+o))},getCenter:function(){return new e((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new e(this.getNorth(),this.getWest())},getSouthEast:function(){return new e(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t);var n,r,a=this._southWest,o=this._northEast;return t instanceof i?(n=t.getSouthWest(),r=t.getNorthEast()):n=r=t,n.lat>=a.lat&&r.lat<=o.lat&&n.lng>=a.lng&&r.lng<=o.lng},intersects:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=e.lat&&r.lat<=n.lat,s=a.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>e.lat&&r.late.lng&&r.lng1?K:-1>t?-K:Math.asin(t)}function i(t){return t[0]}function n(t){return t[1]}function r(t){return t}function a(){return!0}function o(){return 0}function s(t){return t.innerRadius}function h(t){return t.outerRadius}function l(t){return t.startAngle}function u(t){return t.endAngle}function c(t){return t&&t.padAngle}function d(t,e,i,n){return(t-i)*e-(e-n)*t>0?0:1}function f(t,e,i,n,r){var a=t[0]-e[0],o=t[1]-e[1],s=(r?n:-n)/Math.sqrt(a*a+o*o),h=s*o,l=-s*a,u=t[0]+h,c=t[1]+l,d=e[0]+h,f=e[1]+l,p=(u+d)/2,g=(c+f)/2,m=d-u,v=f-c,_=m*m+v*v,y=i-n,x=u*f-d*c,b=(0>v?-1:1)*Math.sqrt(y*y*_-x*x),T=(x*v-m*b)/_,A=(-x*m-v*b)/_,C=(x*v+m*b)/_,L=(-x*m+v*b)/_,P=T-p,M=A-g,w=C-p,E=L-g;return P*P+M*M>w*w+E*E&&(T=C,A=L),[[T-h,A-l],[T*i/y,A*i/y]]}function p(t,e,i,n){var r=t[0],a=i[0],o=e[0]-r,s=n[0]-a,h=t[1],l=i[1],u=e[1]-h,c=n[1]-l,d=(s*(h-l)-c*(r-a))/(c*o-s*u);return[r+d*o,h+d*u]}function g(t){return"function"==typeof t?t:function(){return t}}function m(t){function e(e){function i(){a.push("M",h(t(l),u))}for(var n,a=[],l=[],c=-1,d=e.length,f=g(r),p=g(o);++c1&&r.push("H",n[0]),r.join("")}function x(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e1){s=e[1],a=t[h],h++,n+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var l=2;l9&&(r=3*e/Math.sqrt(r),o[s]=r*i,o[s+1]=r*n));for(s=-1;++s<=h;)r=(t[Math.min(h,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([r||0,o[s]*r||0]);return a}function I(t){return t.length<3?v(t):t[0]+L(t,B(t))}function G(t){for(var e,i,n,r=-1,a=t.length;++rh?0:1;if(t>o&&(c=o,o=t,t=c),l>=Q)return i(o,u)+(t?i(t,1-u):"")+"Z";var c,g,T,A,C,L,P,M,w,E,S,O,k=0,D=0,R=[];if((A=(+b.apply(this,arguments)||0)/2)&&(T=_===tt?Math.sqrt(t*t+o*o):+_.apply(this,arguments),u||(D*=-1),o&&(D=e(T/o*Math.sin(A))),t&&(k=e(T/t*Math.sin(A)))),o){C=o*Math.cos(s+D),L=o*Math.sin(s+D),P=o*Math.cos(h-D),M=o*Math.sin(h-D);var B=Math.abs(h-s-2*D)<=Z?0:1;if(D&&d(C,L,P,M)===u^B){var I=(s+h)/2;C=o*Math.cos(I),L=o*Math.sin(I),P=M=null}}else C=L=0;if(t){w=t*Math.cos(h-k),E=t*Math.sin(h-k),S=t*Math.cos(s+k),O=t*Math.sin(s+k);var G=Math.abs(s-h+2*k)<=Z?0:1;if(k&&d(w,E,S,O)===1-u^G){var N=(s+h)/2;w=t*Math.cos(N),E=t*Math.sin(N),S=O=null}}else w=E=0;if((c=Math.min(Math.abs(o-t)/2,+v.apply(this,arguments)))>.001){g=o>t^u?0:1;var H=null==S?[w,E]:null==P?[C,L]:p([C,L],[S,O],[P,M],[w,E]),z=C-H[0],U=L-H[1],F=P-H[0],V=M-H[1],W=1/Math.sin(Math.acos((z*F+U*V)/(Math.sqrt(z*z+U*U)*Math.sqrt(F*F+V*V)))/2),X=Math.sqrt(H[0]*H[0]+H[1]*H[1]);if(null!=P){var Y=Math.min(c,(o-X)/(W+1)),q=f(null==S?[w,E]:[S,O],[C,L],o,Y,u),j=f([P,M],[w,E],o,Y,u);c===Y?R.push("M",q[0],"A",Y,",",Y," 0 0,",g," ",q[1],"A",o,",",o," 0 ",1-u^d(q[1][0],q[1][1],j[1][0],j[1][1]),",",u," ",j[1],"A",Y,",",Y," 0 0,",g," ",j[0]):R.push("M",q[0],"A",Y,",",Y," 0 1,",g," ",j[0])}else R.push("M",C,",",L);if(null!=S){var J=Math.min(c,(t-X)/(W-1)),$=f([C,L],[S,O],t,-J,u),et=f([w,E],null==P?[C,L]:[P,M],t,-J,u);c===J?R.push("L",et[0],"A",J,",",J," 0 0,",g," ",et[1],"A",t,",",t," 0 ",u^d(et[1][0],et[1][1],$[1][0],$[1][1]),",",1-u," ",$[1],"A",J,",",J," 0 0,",g," ",$[0]):R.push("L",et[0],"A",J,",",J," 0 0,",g," ",$[0])}else n&&R.push("L",w,",",E)}else R.push("M",C,",",L),null!=P&&R.push("A",o,",",o," 0 ",B,",",u," ",P,",",M),n&&R.push("L",w,",",E),null!=S&&R.push("A",t,",",t," 0 ",G,",",1-u," ",S,",",O);return r&&R.push("Z"),R.join("")}function i(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=!0,r=!0,a=s,m=h,v=o,_=tt,y=l,x=u,b=c;return t.toCenter=function(e){return arguments.length?(n=!!e,t):n},t.closePath=function(e){return arguments.length?(r=!!e,t):r},t.innerRadius=function(e){return arguments.length?(a=g(e),t):a},t.outerRadius=function(e){return arguments.length?(m=g(e),t):m},t.cornerRadius=function(e){return arguments.length?(v=g(e),t):v},t.padRadius=function(e){return arguments.length?(_=e==tt?tt:g(e),t):_},t.startAngle=function(e){return arguments.length?(y=g(e),t):y},t.endAngle=function(e){return arguments.length?(x=g(e),t):x},t.padAngle=function(e){return arguments.length?(b=g(e),t):b},t.centroid=function(){var t=(+a.apply(this,arguments)+ +m.apply(this,arguments))/2,e=(+y.apply(this,arguments)+ +x.apply(this,arguments))/2-K;return[Math.cos(e)*t,Math.sin(e)*t]},t};var tt="auto";$.line=function(){return m(r)};var et=new X({linear:v,"linear-closed":_,step:y,"step-before":x,"step-after":b,basis:M,"basis-open":w,"basis-closed":E,bundle:S,cardinal:C,"cardinal-open":T,"cardinal-closed":A,monotone:I});et.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var it=[0,2/3,1/3,0],nt=[0,1/3,2/3,0],rt=[0,1/6,2/3,1/6];return $.line.radial=function(){var t=m(G);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},x.reverse=b,b.reverse=x,$.area=function(){return N(r)},$.area.radial=function(){var t=N(G);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},$.diagonal=function(){function t(t,r){var a=e.call(this,t,r),o=i.call(this,t,r),s=(a.y+o.y)/2,h=[a,{x:a.x,y:s},{x:o.x,y:s},o];return h=h.map(n),"M"+h[0]+"C"+h[1]+" "+h[2]+" "+h[3]}var e=H,i=z,n=U;return t.source=function(i){return arguments.length?(e=g(i),t):e},t.target=function(e){return arguments.length?(i=g(e),t):i},t.projection=function(e){return arguments.length?(n=e,t):n},t},$.getMarkerPath=function(t,e){switch(t){case Y.CIRCLE:case Y.CIRCLE_HOLLOW:return $.arc().outerRadius(e)({startAngle:0,endAngle:2*Math.PI});case Y.SQUARE:case Y.SQUARE_HOLLOW:var i=-e+","+-e,n=e+","+-e,r=e+","+e,a=-e+","+e;return"M"+i+"L"+n+"L"+r+"L"+a+"Z";case Y.DIAMOND:case Y.DIAMOND_HOLLOW:e=2*e/Math.sqrt(2);var o=-e+",0",s="0,"+-e,h=e+",0",l="0,"+e;return"M"+o+"L"+s+"L"+h+"L"+l+"Z";case Y.TRIANGLE:case Y.TRIANGLE_HOLLOW:var u=Math.sqrt(3),o=-2*e/u+","+e,s="0,"+-e,h=2*e/u+","+e;return"M"+o+"L"+s+"L"+h+"Z";case Y.STAR:e*=1.4;for(var c=V(e),d="",f=-1;++f<5;){var p=f*F(72),g=p+F(36),m=W(p,e,3),v=W(g,c,3),_=f?"L":"M";d+=_+m[0]+","+m[1],d+="L"+v[0]+","+v[1]}return d+="z"}},$}),define("vector/shape/CircleMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../chart/map/LatLngBounds","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../chart/map/LatLngBounds"),a=t("../../utils/PathGenerator"),o=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._radius=r,this._circle=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0)},setLatLng:function(t){return this._latlng=n.create(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this._radius=t,this.redraw()},getRadius:function(){return this._radius},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new r(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._circle.outerRadius(this._radius)(),transform:i.makeTranslate(this._point)}),this.setStyle()},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return o}),define("chart/map/Marker",["require","./../../vector/Layer","./Icon","../../utils/BaseUtils","./LatLng","../../dom/DomUtils"],function(t){var e=t("./../../vector/Layer"),i=t("./Icon"),n=t("../../utils/BaseUtils"),r=t("./LatLng"),a=t("../../dom/DomUtils"),o=e.extend({options:{icon:new i.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){n.setOptions(this,e),this._latlng=r.create(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=r.create(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),a.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,n&&this.getPane().appendChild(this._icon)},_removeIcon:function(){a.remove(this._icon),this._icon=null},_setPos:function(t){a.setPosition(this._icon,t),this._shadow&&a.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_resetZIndex:function(){this._updateZIndex(0)},node:function(){return this._icon},setStyle:function(){}});return o}),define("vector/shape/ScatterMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../utils/PathGenerator"),a=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._marker=r},getLatLng:function(){return this._latlng},_getMarkerPath:function(){var t=this._marker.symbol||"circle",e=this._marker.radius||4.5;return r.getMarkerPath(t,e)},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._getMarkerPath(),transform:i.makeTranslate(this._point)})},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return a}),define("vector/shape/TextLayer",["require","../../vector/Layer","../../chart/map/LatLng","../../utils/BaseUtils","../../utils/ColorUtils","../../dom/DomUtils"],function(t){var e=t("../../vector/Layer"),i=t("../../chart/map/LatLng"),n=t("../../utils/BaseUtils"),r=t("../../utils/ColorUtils"),a=t("../../dom/DomUtils"),o=4,s=e.extend({initialize:function(t,e){this._latlng=i.create(t),this._dataPoint=e},setStyle:function(t){this._latlng=t,this.onRemove(),this.onAdd()},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},onAdd:function(){this._text=document.createElement("div"),this._text.style.position="absolute",this._text.style.zIndex=1001,this._text.style["pointer-events"]="none",this.getPane().appendChild(this._text);var t=this._dataPoint,e=t.labelContent,i=t.options.marker,a=t.series.type,s=-t.labelDim.height/2;if("scatter"==a||"pointMap"==a)if(i&&!n.isImageMarker(i.symbol)){var h=i.radius||4.5;s=-h-t.labelDim.height}else{var l=i?i.height:t.options.icon.iconSize[1];s=-l/2-t.labelDim.height}s-=o;for(var u=0,c=e.length;c>u;u++){var d=e[u],f=d.dim,p=d.text,g=d.style,m=document.createElement("div");m.innerHTML=p,m.style.zIndex=1001,m.style.position="absolute",m.style.left=-f.width/2+"px",m.style.top=s+"px",m.style.overflow="hidden",m.style.whiteSpace="nowrap";for(var v in g)"color"==v&&"inherit"!=g.color?m.style.color=r.colorToHex(g.color):m.style[v]=g[v];this._text.appendChild(m),s+=f.height+2}this._reset()},onRemove:function(){a.remove(this._text)},getEvents:function(){return{zoomend:this._project,moveend:this._update,viewreset:this._reset}},_reset:function(){this._project(),this._update()},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&(this._text.style.left=this._point.x+"px",this._text.style.top=this._point.y+"px")}});return s}),define("chart/map/PosAnimation",["require","../../dom/Evented","../../dom/DomUtils","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../dom/DomUtils"),n=t("../../utils/BaseUtils"),r=e.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=i.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=n.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;i>e?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),i.setPosition(this._el,n),this.fire("step")},_complete:function(){n.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}});return r}),define("vans/VanChartBaseMap",["require","./VanChart","../utils/BaseUtils","../dom/DomUtils","../Constants","../dom/Evented","../dom/Browser","../utils/Point2D","../utils/Bounds","../chart/map/LatLng","../chart/map/LatLngBounds","../chart/map/PosAnimation"],function(t){var e=t("./VanChart"),i=t("../utils/BaseUtils"),n=t("../dom/DomUtils"),r=(t("../Constants"),t("../dom/Evented"),t("../dom/Browser")),a=t("../utils/Point2D"),o=t("../utils/Bounds"),s=t("../chart/map/LatLng"),h=t("../chart/map/LatLngBounds"),l=t("../chart/map/PosAnimation"),u=e.extend({setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(s.create(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){void 0!==n.animate&&(n.zoom=i.extend({animate:n.animate},n.zoom),n.pan=i.extend({animate:n.animate,duration:n.duration},n.pan));var r=this._zoom!==e?this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof a?t:this.latLngToContainerPoint(t),s=o.subtract(r).multiplyBy(1-1/n),h=this.containerPointToLatLng(r.add(s));return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():h.create(t);var i=a.create(e.paddingTopLeft||e.padding||[0,0]),n=a.create(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r;var o=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),r),l=this.project(t.getNorthEast(),r),u=this.unproject(s.add(l).divideBy(2).add(o),r);return{center:u,zoom:r}},fitBounds:function(t,e){if(t=h.create(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=a.create(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend"); - if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new l,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){n.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},setMaxBounds:function(t){return t=h.create(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,h.create(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),o=r.subtract(a);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},remove:function(){n.remove(this._mapPane),n.remove(this._controlContainer),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return e.prototype.remove.call(this),this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=n.create("div",i,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new h(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=h.create(t),i=a.create(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),l=t.getNorthWest(),u=t.getSouthEast(),c=this.getSize().subtract(i),d=this.project(u,n).subtract(this.project(l,n)),f=r.any3d?this.options.zoomSnap:1,p=Math.min(c.x/d.x,c.y/d.y);return n=this.getScaleZoom(p,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(s.create(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(a.create(t),e)},layerPointToLatLng:function(t){var e=a.create(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(s.create(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(s.create(t))},distance:function(t,e){return this.options.crs.distance(s.create(t),s.create(e))},containerPointToLayerPoint:function(t){return a.create(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return a.create(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(a.create(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.create(t)))},mouseEventToContainerPoint:function(t){return n.getMousePos(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=n.get(t);n.addClass(e,"leaflet-grab")},addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,a){var o=i+t+" "+i+a;e[t+a]=n.create("div",o,r)}var e=this._controlCorners={},i="leaflet-",r=this._controlContainer=n.create("div",i+"control-container",this._container);t("top","left"),t("bottom","right")},_resetView:function(t,e){n.setPosition(this._mapPane,new a(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return i.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){n.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_onResize:function(){i.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_performZoom:function(){var t=this,e=t.getZoom(),i=this.options.zoomSnap||0;t._stop();var n=this._delta/(4*this.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,a=i?Math.ceil(r/i)*i:r,o=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return n.getPosition(this._mapPane)||new a(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.create([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),r=this.getSize().divideBy(2),a=new o(n.subtract(r),n.add(r)),s=this._getBoundsOffset(a,i,e);return s.round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=o.create(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),s=n.max.subtract(t.max),h=this._rebound(r.x,-s.x),l=this._rebound(r.y,-s.y);return new a(h,l)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=r.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){n.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),a=this._getCenterOffset(t)._divideBy(1-1/r);return n.animate===!0||this.getSize().contains(a)?(i.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0):!1},_animateZoom:function(t,e,r,a){r&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,n.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:a}),setTimeout(i.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(n.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),i.requestAnimFrame(function(){this._moveEnd(!0)},this))},addLayer:function(t){var e=i.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=i.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&i.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addZoomLimit:function(t){(isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[i.stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=i.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0);this._getZoomSpan();for(var i in this._zoomBoundLayers){var n=this._zoomBoundLayers[i].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-(1/0)?void 0:e,this._layersMinZoom=t===1/0?void 0:t,void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}},_onPinch:function(t){if(this._zoomEnabled()){var e=this;this._pinchZoom=e._limitZoom(e.getZoom()+t.scale-1),this._pinchCenter=t.center,this._pinchStartTime||(this._pinchStartTime=+new Date);var i=this.options.wheelDebounceTime,n=Math.max(i-(+new Date-this._pinchStartTime),0);clearTimeout(this._pinchTimer),this._pinchTimer=setTimeout(function(){e._stop(),e._pinchStartTime=null,e.setZoomAround(g.create(e._pinchCenter),e._pinchZoom)},n)}},_onWheelScroll:function(t){if(this._zoomEnabled()){t=t.srcEvent;var e=c.getWheelDelta(t),i=this.options.wheelDebounceTime;this._delta=u.pick(this._delta,0),this._delta+=e,this._lastMousePos=this.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(u.bind(this._performZoom,this),n),c.stop(t)}},_animationEnd:function(){this.series.forEach(function(t){t._drawEffectPoints()})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.animationCount||this.fire("animationEnd")},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,c.addClass(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=c.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=this.createPane("mapPane",this._container),c.setPosition(this._mapPane,new g(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.options.markerZoomAnimation||c.addClass(t.markerPane,"leaflet-zoom-hide")},layoutComponentsAndCharts:function(){this.initLayerInfo();var t=this;t.bounds=t._getDefaultBounds(),o.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),this.reRenderSeries()},filterRender:function(){this.renderSeries()},_updateSeriesStyle:function(){this.validPoints.forEach(function(t){if(t.layers){var e=t.series._getDynamicStyle(t);t.layers.forEach(function(t){t.setStyle(e)})}})},reRenderWholePlot:function(){var t=this.components[o.LEGEND_COMPONENT];t&&t.render(),this.reRenderSeries()},refreshRestore:function(){this._initIntermediateState();for(var t in this.components)this.components[t].refresh();this.series.forEach(function(t,e){t.refresh(t.options,e)});var e=this.components[o.RANGE_LEGEND_COMPONENT];e&&e.initAttributesWithSeries(),this.series.forEach(function(t){if(t.type!==f.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layoutComponentsAndCharts()},reRenderSeries:function(){this.hoverPoint=this.hoverSeries=null,this.calculateMapSeries(),this.render()},calculateMapSeries:function(){var t=this;t.hoverPoint=null,t.hoverSeries=null;var e=t.seriesOfType(f.BUBBLE_CHART);r.calculateBubbleRadius(e);for(var i={},n={},a=this.series,o=0,s=a.length;s>o;o++){var h=0,l=a[o],c=l.type,d=l.points;d.forEach(function(t){h=u.accAdd(h,Math.abs(t.getTargetValue()))}),d.forEach(function(t){t.percentage=Math.abs(t.getTargetValue()/h);var e=t.options.lnglat?t.options.lnglat.join("-"):t.name;e+=c;var r=t.isNull?n:i;r[e]=r[e]||[],r[e].push(t)})}for(var p in i){var g=i[p].concat(n[p]||[]);g.forEach(function(t){if(c!==f.LINE_MAP){if(t.points=g,!t.options.drilldown)for(var e=g.length-1;e>=0;e--)g[e].options.drilldown&&(t.options.drilldown=g[e].options.drilldown,t.geo=g[e].geo);t.series.calculateLabelInfo(t)}})}this.validPoints=this._getMapPoints()},_getMapPoints:function(){var t=this,e={},i=[],n=t.getCurrentGeo(),r=this.getComponent(o.LEGEND_COMPONENT);return t.series.forEach(function(a,o){var s=a.points,h=a.type;if(h!==f.LINE_MAP&&h!==f.HEAT_MAP)for(var l=0,u=s.length;u>l;l++){var c=s[l];if(t.isMapPointVisible(c)){if(0!==o||!c.isNull||!c.options.drilldown){var d=n.getFeaturesByName(c.name,h);if(d||c.options.lnglat){var p=h==f.AREA_MAP?c.name:n.getDataPointLngLat(c,d&&d[0]).join("-");!e[p]||r&&h==f.BUBBLE_CHART?(i.push(c),e[p]=!0):t.removePointGraphics(c)}}}else t.removePointGraphics(c)}}),i},isMapPointVisible:function(t){var e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(e&&t.points&&t.points.length&&(t=t.points[0]),t.isNull){var i=t.series.type,n=t.options.marker,r=n&&u.isImageMarker(n.symbol),a=i==f.AREA_MAP?t.options.drilldown:i==f.POINT_MAP||r;return t&&t.visible&&t.series.visible&&a}return t.isVisible()},initLayerInfo:function(){if(!this.layerMap){this.layerMap=[],this.layerIndex=0;var t=this.getComponent(o.GEO_COMPONENT),e=this.series;this.layerMap=[{series:e,geo:t,layerIndex:this.layerIndex,drillUpDataPoint:e[0]&&e[0].points[0]}];var i=this.options.initDrillPath;if(i&&i.length>1)for(var n=1;ne;e++)t.points[e].refreshPointColor()}),this.layerIndex++,t=a.geo,this.layerMap[this.layerIndex]={geo:t,series:e,layerIndex:this.layerIndex},this.setComponent(t,o.GEO_COMPONENT)}}}},_createChildSeriesWhenLoaded:function(t){if(!t.childSeries){var e=[],i=this;i.parentPoint=t,t.options.drilldown.series.forEach(function(t,n){var r=t.type||i.options.chartType,o=a.get(r);e.push(new o(t,i,n))}),t.childSeries=e}},drillDown:function(t){var e=this.layerMap[this.layerIndex-1];if(t.options.drilldown&&t.options.drilldown.series&&(!e||e.drillUpDataPoint!=t)){var i=this.layerMap[this.layerIndex].geo;this._createChildSeriesWhenLoaded(t),this.layerMap[this.layerIndex].drillUpDataPoint=t,this._setNewGeoAndSeries(t.geo,i,t.childSeries,++this.layerIndex)}},drillUp:function(t){var e=this;if(t.series!=e.series){var i=this.layerMap[t.layerIndex+1].geo;this._setNewGeoAndSeries(t.geo,i,t.series,t.layerIndex)}},_setNewGeoAndSeries:function(t,e,i,n){for(var r=this,a=0,s=r.series.length;s>a;a++){var h=r.series[a],l=h.type,u=h.points;u.forEach(function(t){r.removePointGraphics(t,l)})}r.series=i;var c=r.getComponent(o.RANGE_LEGEND_COMPONENT);c&&c.initAttributesWithSeries(),i.forEach(function(t){for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layerMap[n]={geo:t,series:i,layerIndex:n,drillUpDataPoint:i[0]&&i[0].points[0]},this.layerIndex=n,this.layerMap=this.layerMap.slice(0,n+1),e&&e.remove(),this.setComponent(t,o.GEO_COMPONENT),this.layoutComponentsAndCharts()},cancelLegendHighlight:function(t){var e=this.highlightTarget;T.prototype.cancelLegendHighlight.call(this,t),this._lineMapLayer&&e&&this._lineMapLayer.redraw()},makeLegendHighlight:function(t){T.prototype.makeLegendHighlight.call(this,t),this._lineMapLayer&&this._lineMapLayer.redraw()},getEffectLayer:function(){var t=this;return t._effectLayer||(t._effectLayer=(new v).addTo(t)),t._effectLayer},renderSeries:function(){this.getComponent(o.TOOLTIP_COMPONENT).immediateHide();var t=this,e=(t.series,t.getComponent(o.GEO_COMPONENT));this._pointLayer=this._pointLayer||(new v).addTo(this);var i=[f.SCATTER_CHART,f.BUBBLE_CHART];this.largeSeries=i.reduce(function(t,e){return t[e]=t[e]||{visible:!0,type:e},t[e].points=[],t},this.largeSeries||{});var n=this.largeSeries;this.validPoints.forEach(function(i){var r=t.isMapPointVisible(i),a=i.series.type;if(i.series.options.large&&n[a]){if(!r)return;n[a].points.push(i)}else if(r){var o=i.series.getStyle(i),s=e.getFeaturesByName(i.name,a);i.layers?i.layers.forEach(function(e){e.setStyle(o),t.registerInteractiveTarget(i,e)}):(i.layers=[],s=i.options.lnglat?["null"]:s,s.forEach(function(n){var r;a==f.AREA_MAP?(r=e.getLayerByFeature(n),r.setStyle(o)):r=t.createPointLayer(n,i,o),i.layers.push(r),t.registerInteractiveTarget(i,r)}))}else t.removePointGraphics(i,a)}),i.map(function(e){n[e].points.length&&t._renderCanvas(n[e])}),this._renderHeatMap(),this._renderLineMap(),this.updateLabel(),this.fire("animationStart")},_renderCanvas:function(t){var e=this;if(!t._canvas){var i=e.getSize(),r={width:i.x,height:i.y,x:0,y:0,dpr:window.devicePixelRatio||1};t._canvas=new n(e._panes.overlayPane,e,r),t._canvas.onAdd(),e.on("moveend",e._resetCanvas.bind(e,t),e),e.options.zoomAnimation&&d.any3d&&e.on("zoomanim",e._resetCanvas.bind(e,t),e),e.on({tap:function(t){var i=e.hoverPoint;i&&i._onPointTap(t)},mousemove:function(t){var i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i,i.options.click&&e.handler.cursor("pointer")):e.hoverPoint||(e.hideTooltip(),e.handler.cursor(""))}})}e._resetCanvas(t)},_resetCanvas:function(t){var e=this,i=e.getComponent(o.GEO_COMPONENT);t.points.map(function(n){var r=i.getFeaturesByName(n.name,t.type);r=n.options.lnglat?["null"]:r,r.map(function(t){var i=n.getLatLng(t),r=e.latLngToLayerPoint(i);n.posX=r.x,n.posY=r.y})}),t._canvas.clearAll(),t._canvas.addSeries(t)},_onZoom:function(){var t=this,e=t.hoverPoint,i=t.getZoom();if(e&&e.geo){var n=e.geo.getZoomListener();if(n&&i>=n)return void t.drillDown(e)}var r=t.layerMap[t.layerIndex-1];r&&r.geo.getZoomListener()>i&&t.drillUp(r),clearTimeout(this.labelRelaoutTimeOut),this.labelRelaoutTimeOut=setTimeout(function(){t.updateLabel()},200)},updateLabel:function(){if(this._fixConflictLabel(),!this._needShowMoreLabel()||this.layerIndex>0)return void this._updateNormalLabel();var t=this;t._moreLabelTimeOut&&clearTimeout(t._moreLabelTimeOut),t._removeNormalLabels(),t._updateMoreLabels(),t._moreLabelTimeOut=setTimeout(function(){t._changeDataState=!1,t._clearMoreLabels(),t._updateNormalLabel()},1e3)},_updateMoreLabels:function(){var t=this;this.validPoints&&this.validPoints.filter(function(t){return t.series.type!=f.LINE_CHART&&t.series.type!=f.HEAT_MAP}).forEach(function(e){var i=e.getLatLng();if(t.isMapPointVisible(e)&&i){var n=t.latLngToLayerPoint(i),r=n.y,a=null;e.series.type==f.POINT_MAP&&(r-=e.options.icon.iconSize[1]/2,a=function(t,e){return t-e/2-5}),e.moreLabelG=t.getMapRenderer().text().add(),e.series._showAndExitMoreLabel(e,n.x,r,null,a,e.moreLabelG)}})},_removeNormalLabels:function(){var t=this.validPoints.concat(this._getHeatMapPoints()),e=this._textGroup;t.forEach(function(t){t.textLayers&&(t.textLayers.forEach(function(t){e.removeLayer(t)}),t.textLayers=null)})},_updateNormalLabel:function(){var t=this,e=t.getCurrentGeo(),i=this.validPoints.concat(this._getHeatMapPoints());this._textGroup=this._textGroup||(new v).addTo(t);var n=this._textGroup;i.forEach(function(i){var r=i.series.type,a=e.getFeaturesByName(i.name,r);a=i.options.lnglat?["null"]:a,i.labelPos&&i.labelContent&&a?a.forEach(function(e,n){i.labelPos[n]&&(i.textLayers=i.textLayers||[],i.textLayers[n]?i.textLayers[n].setStyle(i.getLatLng(e)):i.textLayers[n]=new b(i.getLatLng(e),i).addTo(t._textGroup))}):i.textLayers&&(i.textLayers.forEach(function(t){n.removeLayer(t)}),i.textLayers=null)})},_fixConflictLabel:function(){var t=this,e=new p,i=t.getCurrentGeo(),n=this.validPoints.concat(this._getHeatMapPoints());n.forEach(function(n){var r=n.series.type;if(n.labelPos=null,t.isMapPointVisible(n)&&r==f.AREA_MAP&&n.labelContent){var a=i.getFeaturesByName(n.name,r);a.forEach(function(i,r){if(n.labelPos=n.labelPos||[],i.properties.center){var a=t._getTextBounds(n,i);n.labelPos[r]=a,e.addBounds(a)}else n.labelPos[r]=null}),n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)}}),n.forEach(function(n){if(n.labelContent&&t.isMapPointVisible(n)){var r=n.series.type,a=i.getFeaturesByName(n.name,r);a=n.options.lnglat?["null"]:a,a&&a.forEach(function(i,r){if(!n.labelPos||!n.labelPos[r]){var a=t._getTextBounds(n,i);e.isOverlapped(a)?(n.labelPos=n.labelPos||[],n.labelPos[r]=null):(n.labelPos=n.labelPos||[],n.labelPos[r]=a,e.addBounds(a))}n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)})}})},_getTextBounds:function(t,e){var i=this,n=t.getLatLng(e),r=i.latLngToContainerPoint(n),a=r.y,o=t.series.type,s=t.options.marker,h=t.options.icon;if(o==f.AREA_MAP||o==f.BUBBLE_CHART||o==f.HEAT_MAP)a-=t.labelDim.height/2;else if(s&&!u.isImageMarker(s.symbol)){var l=s.radius||4.5;a-=l+t.labelDim.height}else{var c=h?h.iconSize[1]:s.height;a-=c/2+t.labelDim.height}return u.makeBounds([r.x,a],t.labelDim)},createPointLayer:function(t,e,i){var n,r=e.series.type,a=e.getLatLng(t);switch(r){case f.BUBBLE_CHART:n=new _(a,i,e.radius).addTo(this._pointLayer);break;case f.POINT_MAP:n=new y(a,{icon:new l(e.options.icon)}).addTo(this._pointLayer);break;case f.SCATTER_CHART:var o=e.options.marker,s=u.isImageMarker(o.symbol);s&&(i={icon:new l({iconSize:[o.width,o.height],iconUrl:o.symbol})}),n=s?new y(a,i):new x(a,i,e.options.marker),n.addTo(this._pointLayer)}return n},getCurrentGeo:function(){return this.layerMap?this.layerMap[this.layerMap.length-1].geo:this.components.geo},_getHeatMapPoints:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this,i=[],n=e.getComponent(o.GEO_COMPONENT);if(t&&t.length)for(var r=0,a=t.length;a>r;r++)t[r].points.forEach(function(t){if(!t.options.lnglat){var r=n.getFeaturesByName(t.name,f.HEAT_MAP);t.options.lnglat=n.getDataPointLngLat(t,r&&r[0])}!t.isNull&&t.visible&&t.options.lnglat?i.push(t):e.removePointGraphics(t,f.HEAT_MAP)});return i},_renderHeatMap:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(t&&t.length&&e){var i={min:e._getMin(),max:e._getMax(),data:this._getHeatMapPoints()};if(!this._heatMapOverlay){var n=t[0].options,r={maxOpacity:n.maxOpacity,minOpacity:n.minOpacity,radius:n.radius,blur:n.blur,gradient:e._getGradient(),valueField:"value"};this._heatMapOverlay=new h(r).addTo(this)}this._heatMapOverlay.setData(i)}},removePointGraphics:function(t,e){if(t){e=e||t.series.type;var i=this.getCurrentGeo();if(e===f.LINE_MAP&&(this._lineMapLayer.removeEffect(t),t.remove()),t.layers)if(e==f.AREA_MAP)t.layers.forEach(function(t){t.setStyle(i.defaultAreaStyle())});else{var n=this._pointLayer;t.layers.forEach(function(t){n.removeLayer(t)}),t.layers=null}var r=this._textGroup;t.textLayers&&(t.textLayers.forEach(function(t){r.removeLayer(t)}),t.textLayers=null,t.labelPos=null),t.clearPointEffect()}},_renderLineMap:function(){var t=this.seriesOfType(f.LINE_MAP),e=t.reduce(function(t,e){return t.concat(e.points)},[]);if(!t.length||!e.length)return void(this._lineMapLayer&&this._lineMapLayer.setData([]));if(!this._lineMapLayer){var i=this,r=this.getSize(),a={width:r.x,height:r.y,x:0,y:0,dpr:window.devicePixelRatio||1},o=this.mainRenderer=new n(this._panes.overlayPane,this,a),h=this.animationRenderer=new n(this._panes.overlayPane,this,a);o.onAdd(),h.onAdd(),this._lineMapLayer=s({mainRenderer:o,animationRenderer:h,vanchart:i}).addTo(this)}this._lineMapLayer.setData(e)}});return t("./VanChartLibrary").register(f.POINT_MAP,A),t("./VanChartLibrary").register(f.AREA_MAP,A),t("./VanChartLibrary").register(f.LINE_MAP,A),t("./VanChartLibrary").register(f.HEAT_MAP,A),A}),define("utils/QuadTree",[],function(){function t(t){return t[0]}function e(t){return t[1]}function i(t){return"function"==typeof t?t:function(){return t}}function n(n,u,c,d,f){function p(t){function e(t,e,i,r,a,o,s,h){if(!isNaN(i)&&!isNaN(r))if(t.leaf){var u=t.x,c=t.y;if(null!=u)if(l(u-i)+l(c-r)<.01)n(t,e,i,r,a,o,s,h);else{var d=t.point;t.x=t.y=t.point=null,n(t,d,u,c,a,o,s,h),n(t,e,i,r,a,o,s,h)}else t.x=i,t.y=r,t.point=e}else n(t,e,i,r,a,o,s,h)}function n(t,i,n,r,a,s,h,l){var u=.5*(a+h),c=.5*(s+l),d=n>=u,f=r>=c,p=f<<1|d;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=o()),d?a=u:h=u,f?s=c:l=c,e(t,i,n,r,a,s,h,l)}var r,a,p,_,y,x,b,T,A,C=i(m),L=i(v);if(null!=u)x=u,b=c,T=d,A=f;else if(T=A=-(x=b=1/0),a=[],p=[],y=t.length,g)for(_=0;y>_;++_)r=t[_],r.xT&&(T=r.x),r.y>A&&(A=r.y),a.push(r.x),p.push(r.y);else for(_=0;y>_;++_){var P=+C(r=t[_],_),M=+L(r,_);x>P&&(x=P),b>M&&(b=M),P>T&&(T=P),M>A&&(A=M),a.push(P),p.push(M)}var w=T-x,E=A-b;w>E?A=b+w:T=x+E;var S=o();if(S.add=function(t){e(S,t,+C(t,++_),+L(t,_),x,b,T,A)},S.visit=function(t){s(t,S,x,b,T,A); - },S.find=function(t){return h(S,t[0],t[1],x,b,T,A)},_=-1,null==u){for(;++_a||c>o||n>d||r>f)){if(p=t.point){var p,g=e-t.x,m=i-t.y,v=g*g+m*m;if(h>v){var _=Math.sqrt(h=v);n=e-_,r=i-_,a=e+_,o=i+_,s=p}}for(var y=t.nodes,x=.5*(u+d),b=.5*(c+f),T=e>=x,A=i>=b,C=A<<1|T,L=C+4;L>C;++C)if(t=y[3&C])switch(3&C){case 0:l(t,u,c,x,b);break;case 1:l(t,x,c,d,b);break;case 2:l(t,u,b,x,f);break;case 3:l(t,x,b,d,f)}}}(t,n,r,a,o),s}var l=Math.abs;return n}),define("vans/ForceLayout",["require","../utils/QuadTree","../utils/Timer","../utils/BaseUtils"],function(t){function e(t,e,i){for(var n;e;){if(n=t[c.stamp(e)])return n;if(e===i)return null;e=e.parentNode}}function i(){return{mouseover:o,mouseout:s,panstart:r,panmove:n,panend:a}}function n(t,e,i){var n=i.containerPoint.x-e.currentPoint.x,r=i.containerPoint.y-e.currentPoint.y;e.currentPoint=i.containerPoint,t.px+=n,t.py+=r,e.resume()}function r(t,e,i){t.fixed|=2,e.panTarget=t,e.currentPoint=i.containerPoint}function a(t,e){t.fixed&=-7,e.panTarget=null}function o(t){t.fixed|=4,t.px=t.x,t.py=t.y}function s(t){t.fixed&=-5}function h(t,e,i){var n=0,r=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++ls*s/L){if(A>h){var l=e.charge/h;t.px-=a*l,t.py-=o*l}return!0}if(e.point&&h&&A>h){var l=e.pointCharge/h;t.px-=a*l,t.py-=o*l}}return!e.charge}}var n,r,a,o,s,g,m,v={},_=[1,1],y=.9,x=d,b=f,T=-30,A=p,C=.1,L=.64,P=[],M=[],w=1,E={};return v.tick=function(){if((n*=.99)<.005)return n=0,g&&g(),!0;var e,i,u,c,d,f,p,m,v,x=P.length,b=M.length;for(i=0;b>i;++i)u=M[i],c=u.source,d=u.target,m=d.x-c.x,v=d.y-c.y,(f=m*m+v*v)&&(f=n*a[i]*((f=Math.sqrt(f))-r[i]*w)/f,m*=f,v*=f,d.x-=m*(p=c.weight/(d.weight+c.weight)),d.y-=v*p,c.x+=m*(p=1-p),c.y+=v*p);if((p=n*C)&&(m=_[0]/2,v=_[1]/2,i=-1,p))for(;++i0?t:0:t>0&&(n=t,u(v.tick)),v):n},v.start=function(){return v.preparePara(),v.resume()},v.simulateForce=function(){for(v.preparePara(),v.alpha(.1);v.alpha()>=.005;)v.tick();return g&&g(),v},v.simpleSimulateForce=function(){v.preparePara();for(var t=.1,e=.005,i=2,n=2,r=.5,a=.02,o=.9,s=t;s>=e;s-=s>.07?.001:5e-4){var h,l,u,c,d,f=P.length;if((u=s*a)&&(c=_[0]/2,d=_[1]/2,h=-1,u))for(;++hh;h++)for(var p=P[h],m=0;f>m;m++){var y=P[m];if(y!==p){var c=p.x-y.x,d=p.y-y.y,x=Math.sqrt(c*c+d*d),b=p.radius+y.radius+(p.series.cluster===y.series.cluster?i:n);b>x&&(x=(x-b)/x*r,p.x-=c*=x,p.y-=d*=x,y.x+=c,y.y+=d)}}}return g&&g(),v},v.preparePara=function(){function t(t,n){if(!i){for(i=[],l=0;s>l;++l)i[l]=[];for(l=0;h>l;++l){var r=M[l];i[r.source.index].push(r.target),i[r.target.index].push(r.source)}}for(var a,o=i[e],l=-1,u=o.length;++le;++e)(n=P[e]).index=e,n.weight=0;for(e=0;h>e;++e)n=M[e],"number"==typeof n.source&&(n.source=P[n.source]),"number"==typeof n.target&&(n.target=P[n.target]),++n.source.weight,++n.target.weight;for(e=0;s>e;++e)n=P[e],isNaN(n.x)&&(n.x=t("x",l)),isNaN(n.y)&&(n.y=t("y",u)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof x)for(e=0;h>e;++e)r[e]=+x.call(this,M[e],e);else for(e=0;h>e;++e)r[e]=x;if(a=[],"function"==typeof b)for(e=0;h>e;++e)a[e]=+b.call(this,M[e],e);else for(e=0;h>e;++e)a[e]=b;if(o=[],"function"==typeof T)for(e=0;s>e;++e)o[e]=+T.call(this,P[e],e);else for(e=0;s>e;++e)o[e]=T;return v},v.resume=function(){return v.alpha(.1)},v.stop=function(){return v.alpha(0)},v.registerDragTarget=function(t,e){m||(m=i()),E[c.stamp(e.node())]=t},v.dragFire=function(t,i){if(m){var n,r=t.srcEvent,a=t.type||r.type,o="panstart"===a||"panmove"===a||"panend"===a;if(o&&v.panTarget)n=v.panTarget;else{var s=r.target||r.srcElement;n=e(E,s,i)}return n&&m[a]?(m[a](n,v,t),n):void 0}},v};return g}),define("vans/VanChartForceBubble",["require","./VanChart","./../utils/BaseUtils","./../Constants","./ForceLayout","../utils/QuadTree","./VanChartLibrary"],function(t){function e(t){return function(e){var i=e.series.cluster;if(i&&i!==e){var n=e.x-i.x,r=e.y-i.y,a=Math.sqrt(n*n+r*r),o=e.radius+i.radius;a!=o&&(a=(a-o)/a*t,e.x-=n*=a,e.y-=r*=a,i.x+=n,i.y+=r)}}}function i(t,e,i){var n=s(e);return function(e){var r=e.radius+i+Math.max(h,l),a=e.x-r,o=e.x+r,s=e.y-r,u=e.y+r;n.visit(function(i,n,r,c,d){if(i.point&&i.point!==e){var f=e.x-i.point.x,p=e.y-i.point.y,g=Math.sqrt(f*f+p*p),m=e.radius+i.point.radius+(e.series.cluster===i.point.series.cluster?h:l);m>g&&(g=(g-m)/g*t,e.x-=f*=g,e.y-=p*=g,i.point.x+=f,i.point.y+=p)}return n>o||a>c||r>u||s>d})}}var n=t("./VanChart"),r=t("./../utils/BaseUtils"),a=t("./../Constants"),o=t("./ForceLayout"),s=t("../utils/QuadTree"),h=2,l=4,u=500,c=n.extend({vanChartType:"vanChartForceBubble",renderSeries:function(){function t(t){s._animationStarted&&t.alpha<.05&&n.prototype._animationEnd.bind(s)();var r=e(10*t.alpha*t.alpha),a=i(.5,l,s.maxRadius);l.forEach(function(t){r(t)}),l.forEach(function(t){a(t)}),s._updateGraphics()}function a(){s._updateGraphics(),n.prototype._animationEnd.bind(s)()}n.prototype.renderSeries.call(this);var s=this,h=s.bounds,l=this.nodes=[];this.maxRadius=0;var u=s.renderer.isAnimation;s.force&&s.force.stop(),s.force=s.force||o(),this.series.forEach(function(t){var e;t.points.forEach(function(t){t.isVisible()&&(t.x=s._changeDataState&&r.hasDefined(t._posX)?t._posX:s.validPosXY(t.x,0,h.width),t.y=s._changeDataState&&r.hasDefined(t._posY)?t._posY:s.validPosXY(t.y,0,h.height),u&&s.force.registerDragTarget(t,t.graphic),l.push(t),s.maxRadius=Math.max(s.maxRadius,t.radius),e=e||t,e=t.radius>e.radius?t:e)}),t.cluster=e}),s.force.nodes(l).size([h.width,h.height]).gravity(.05).charge(0).eachTick(t),r.isSupportSVG()?u?s.force.start():s.force.simulateForce():s.force.endTick(a).simpleSimulateForce()},_updateGraphics:function(){var t=this;t.nodes&&t.nodes.forEach(function(e){e._posX=e.x,e._posY=e.y,t._calculateLabelPos(e),e.textGraphic&&e.textGraphic.attr("transform",r.makeTranslate(e.labelPos)),e.graphic.attr(e.series.getPointUpdateAnimationAttr(e))})},_animationEnd:function(){},validPosXY:function(t,e,i){return t=+t,t>e&&i>t?t:void 0},dealAxisZoom:function(t,e){var i=this,n=i.bounds;i.force&&i.force.stop();var a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;i.nodes.forEach(function(t){t.radius*=h;var e=t.x+o,r=t.y+s;e-=n.width/2,r-=n.height/2,t.x=e*h+n.width/2-o,t.y=r*h+n.height/2-s,i._calculateLabelPos(t),i._updatePointTextGraphic(t);var a=t.series,l=a.getPointUpdateAnimationAttr(t);t.graphic.animate({duration:u,ease:"back-out",attr:l})}),this.scale=h*r.pick(this.scale,1)},refreshRestore:function(){this.scale=1,this.update()},_calculateLabelPos:function(t){if(t.labelContent&&t.labelDim){var e=t.radius;t.labelDim.width>2*e||t.labelDim.height>2*e?t.labelPos=null:t.labelPos={x:-t.labelDim.width/2+t.x,y:-t.labelDim.height/2+t.y}}},orderData:function(){},_updatePointTextGraphic:function(t){t.textGraphic?t.labelPos?t.textGraphic.attr("transform",r.makeTranslate(t.labelPos)):(t.textGraphic.remove(),t.textGraphic=null):t.series._createTextGraphic(t)}});return t("./VanChartLibrary").register(a.FORCE_BUBBLE_CHART,c),c}),define("utils/Scale",["require","./BaseUtils","./Interpolator","./vMap"],function(t){function e(t){var e=t[0],i=t[t.length-1];return i>e?[e,i]:[i,e]}function i(t,e,i,n){var r=i(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(r(t))}}function n(t,e,i,n){var a=[],o=[],s=0,h=Math.min(t.length,e.length)-1;for(t[h]i;){var r=i+n>>>1;a(t[r],e)>0?n=r:i=r+1}return i}function a(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function o(t,e){return g.rebind(t,e,"range","rangeRound","interpolate")}function s(t,e,r,a){function o(){var o=Math.min(t.length,e.length)>2?n:i;return l=o(t,e,a,r),u=o(e,t,a,r),h}function h(t){return l(t)}var l,u;return h.invert=function(t){return u(t)},h.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},h.range=function(t){return arguments.length?(e=t,o()):e},h.rangeRound=function(t){return h.range(t).interpolate(m.interpolateRound)},h.interpolate=function(t){return arguments.length?(r=t,o()):r},h.uninterpolate=function(t){return arguments.length?(a=t,o()):a},h.copy=function(){return s(t,e,r,a)},o()}function h(t,e,i,n){function r(t){return(i?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return i?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(r)),s):n},s.base=function(i){return arguments.length?(e=+i,t.domain(n.map(r)),s):e},s.copy=function(){return h(t.copy(),e,i,n)},o(s,t)}function l(t,i){function n(e){return o[((a.get(e)||("range"===i.t?a.set(e,t.push(e)):NaN))-1)%o.length]}function r(e,i){for(var n=[],r=t.length,a=0;r>a;a++)n.push(e+i*a);return n}var a,o,s;return n.domain=function(e){if(!arguments.length)return t;t=[],a=new v;for(var r,o=-1,s=e.length;++oe?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return u(t,e,i)},r()}function c(){return s([0,1],[0,1],m.interpolateNumber,m.uninterpolateNumber)}function d(){return h(c().domain([0,1]),10,!0,[1,10])}function f(){return u(0,1,[0,1])}function p(){return l([],{t:"range",a:[[]]})}var g=t("./BaseUtils"),m=t("./Interpolator"),v=t("./vMap");return{linear:c,quantize:f,log:d,quantize:f,ordinal:p}}),define("vans/CloudLayout",["require","./../utils/BaseUtils"],function(t){function e(t){return t.text}function i(){return"serif"}function n(){return"normal"}function r(t){return Math.sqrt(t.value)}function a(){return 30*(~~(6*Math.random())-3)}function o(){return 1}function s(t,e,i,n,r){if(!e.sprite){var a=t.context,o=t.ratio;a.clearRect(0,0,(v<<5)/o,_/o);var s=0,h=0,l=0,u=i.length;for(--n;++n>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else c=c+31>>5<<5;if(d>l&&(l=d),s+c>=v<<5&&(s=0,h+=l,l=0),h+d>=_&&!r)break;a.translate((s+(c>>1))/o,(h+(d>>1))/o),e.rotate&&a.rotate(e.rotate*m),a.fillText(e.text,0,0),e.padding&&!r&&(a.lineWidth=2*e.padding,a.strokeText(e.text,0,0)),a.restore(),e.width=c,e.height=d,e.xoff=s,e.yoff=h,e.x1=c>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,s+=c}if(!r)for(var T=a.getImageData(0,0,(v<<5)/o,_/o).data,A=[];--n>=0;)if(e=i[n],e.hasText){for(var c=e.width,C=c>>5,d=e.y1-e.y0,L=0;d*C>L;L++)A[L]=0;if(s=e.xoff,null==s)return;h=e.yoff;for(var P=0,M=-1,w=0;d>w;w++){for(var L=0;c>L;L++){var E=C*w+(L>>5),S=T[(h+w)*(v<<5)+(s+L)<<2]?1<<31-L%32:0;A[E]|=S,P|=S}P?M=w:(e.y0++,d--,w--,h++)}e.y1=e.y0+M,e.sprite=A.slice(0,(e.y1-e.y0)*C)}}}function h(t,e,i){i>>=5;for(var n,r=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,h=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*i+(o>>5),c=0;l>c;c++){n=0;for(var d=0;a>=d;d++)if((n<d?(n=r[c*a+d])>>>s:0))&e[u+d])return!0;u+=i}return!1}function l(t,e){var i=t[0],n=t[1];e.x+e.x0n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function u(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0>5)/n,a=A[1]/n;i.clearRect(0,0,r,a);var o=new Image;o.src=k,o.onload=function(){i.drawImage(o,0,0,r,a);var t=i.getImageData(0,0,r,a).data;i.clearRect(0,0,r,a);for(var n=t.length,s=[],h=0;n>h;h+=4)s[h/4]=t[h+3]?0:1;e(s)}}function x(t){t.width=t.height=1;var e=t.getContext("2d"),i=D?1:Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=(v<<5)/i,t.height=_/i,e.fillStyle=e.strokeStyle="red",e.textAlign="center",{context:e,ratio:i}}function b(t,e){for(var i=t.x+t.x0,n=t.x+t.x1,r=t.y+t.y0,a=t.y+t.y1,o=0,s=e.length;s>o;o++){var h=e[o],l=h.x+h.x0,u=h.x+h.x1,c=h.y+h.y0,d=h.y+h.y1,f=Math.max(i,l),p=Math.min(n,u),g=Math.max(r,c),m=Math.min(a,d);if(p>f&&m>g)return!0}return!1}function T(t,e,i){for(var n,r,a,o=([{x:0,y:0},{x:A[0],y:A[1]}],e.x),s=e.y,l=Math.sqrt(A[0]*A[0]+A[1]*A[1]),c=O(A),d=N()<.5?1:-1,f=-d;(n=c(f+=d))&&(r=~~n[0],a=~~n[1],!(Math.min(Math.abs(r),Math.abs(a))>=l));)if(e.x=o+r,e.y=s+a,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>A[0]||e.y+e.y1>A[1]))if(D){if(!i||!b(e,i))return!0}else if((!i&&!k||!h(e,t,A[0]))&&(!i||u(e,i))){for(var p,g=e.sprite,m=e.width>>5,v=A[0]>>5,_=e.x-(m<<4),y=127&_,x=32-y,T=e.y1-e.y0,C=(e.y+e.y0)*v+(_>>5),L=0;T>L;L++){p=0;for(var P=0;m>=P;P++)t[C+P]|=p<P?(p=g[L*m+P])>>>y:0);C+=v}return delete e.sprite,!0}return!1}var A=[256,256],C=e,L=i,P=r,M=n,w=n,E=a,S=o,O=c,k=null,D=!g.isSupportSVG(),R=null,B=[],I=1/0,G=null,N=Math.random,H={},z=f;return H.canvas=function(t){return arguments.length?(z=p(t),H):z},H.start=function(){function e(t){D?n(t):(G&&clearInterval(G),G=setInterval(i,0),i(t))}function i(t){function e(){return n.hasText&&T(a,n,o)?(c.push(n),o?l(o,n):o=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=A[0]>>1,n.y-=A[1]>>1,!0):!1}a=t?t:a;for(var i=Date.now();Date.now()-i>1,n.y=A[1]*(N()+.5)>>1,s(r,n,f,u,D),e()||e()}u>=h&&(H.stop(),R())}function n(t){for(;++u>1,e.y=A[1]*(N()+.5)>>1;var i=g.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1);e.height=i.height,e.y0=-e.height>>1,e.y1=-e.y0,e.width=i.width,e.x0=-e.width>>1,e.x1=-e.x0,T(a,e,o)&&(c.push(e),o?o.push({x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}):o=[{x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}],e.x-=A[0]>>1,e.y-=A[1]>>1,e.x-=e.width>>1,e.y-=e.height>>1)}u>=h&&(H.stop(),R())}var r=x(z()),a=t()?m(r,e):D?[]:d((A[0]>>5)*A[1]),o=null,h=B.length,u=-1,c=[],f=B.map(function(t,e){return t.text=C.call(this,t,e),t.font=L.call(this,t,e),t.style=M.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=E.call(this,t,e),t.size=~~P.call(this,t,e),t.padding=S.call(this,t,e),t}).sort(function(t,e){return e.size-t.size});return t()||e(),H},H.stop=function(){return G&&(clearInterval(G),G=null),H},H.timeInterval=function(t){return arguments.length?(I=null==t?1/0:t,H):I},H.words=function(t){return arguments.length?(B=t,H):B},H.path=function(t){return arguments.length?(k=t,H):k},H.renderFun=function(t){return arguments.length?(R=t,H):R},H.size=function(t){return arguments.length?(A=[+t[0],+t[1]],H):A},H.font=function(t){return arguments.length?(L=p(t),H):L},H.fontStyle=function(t){return arguments.length?(M=p(t),H):M},H.fontWeight=function(t){return arguments.length?(w=p(t),H):w},H.rotate=function(t){return arguments.length?(E=p(t),H):E},H.text=function(t){return arguments.length?(C=p(t),H):C},H.spiral=function(t){return arguments.length?(O=y[t]||t,H):O},H.fontSize=function(t){return arguments.length?(P=p(t),H):P},H.padding=function(t){return arguments.length?(S=p(t),H):S},H.random=function(t){return arguments.length?(N=t,H):N},H};var y}),define("vans/VanChartWordCloud",["require","./VanChart","./../Constants","./../utils/BaseUtils","../utils/Scale","./CloudLayout","./VanChartLibrary"],function(t){var e=t("./VanChart"),i=t("./../Constants"),n=t("./../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./CloudLayout"),o=e.extend({vanChartType:"vanChartWordCloud",dealAxisZoom:function(t,e){var i=this,r=i.series,a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;r.forEach(function(t){t.points.forEach(function(e){if(e.word){var i=e.word.x,n=e.word.y;e.word.x=(i+o)*h-o,e.word.y=(n+s)*h-s,e.word.size*=h,t._drawUpdatePoints(e)}})}),this.scale=h*n.pick(this.scale,1)},_getTranslate:function(){var t=this.bounds;return[t.x+t.width/2,t.y+t.height/2]},renderSeries:function(){function t(){e.group||(e.group=o.group().addTo(e.clipSeriesGroup),e.mouseOverGroup=o.group().addTo(e.clipSeriesGroup)),e.group.attr("transform",n.makeTranslate(e._getTranslate())),e.mouseOverGroup.attr("transform",n.makeTranslate(e._getTranslate()));var t=e.seriesOfType(i.WORD_CLOUD_CHART);if(t&&t.length){var r=t[0];e.registerInteractiveTarget(r,e.group),m.forEach(function(t){var e=t.word;e&&(t.labelDim=n.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1)),r.drawPoint(t)}),e.setTimeout("effect",function(){m.forEach(function(t){r.drawPointEffect(t)})},800)}e._updateSeriesState(),window.console&&console.log("done")}var e=this,o=e.renderer,s=e.options.plotOptions,h=e.bounds,l=h.width,u=h.height,c=s.minRotation,d=s.maxRotation,f=s.fontFamily,p=s.minFontSize,g=s.maxFontSize,m=e.pointsOfType(i.WORD_CLOUD_CHART).filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.value)-Math.abs(t.value)});if(0!==m.length){p=n.hasDefined(p)?p:10,g=n.hasDefined(g)?g:e._calculateNiceMaxFontSize(l,u,m[0].name,f),e.minFontSize=Math.min(parseFloat(p),parseFloat(g)),e.maxFontSize=Math.max(parseFloat(p),parseFloat(g));var v=r.linear().domain([Math.abs(m[m.length-1].value),Math.abs(m[0].value)]).range([e.minFontSize,e.maxFontSize]),_=a().size([l,u]).words(m.filter(function(t){return t.visible}).map(function(t){var i={text:t.name,size:v(Math.abs(t.value))*e.scale,point:t,fontFamily:f};return t.word=i,i})).path(s.path).padding(5).rotate(function(){return c+Math.random()*(d-c)}).font(f).fontSize(function(t){return t.size}).renderFun(t);_.start()}},_consoleDone:function(){},_calculateNiceMaxFontSize:function(t,e,i,r){for(var a={min:0,max:100},o=function(){return a.max-a.min>2},s={fontSize:a.max+"px",fontFamily:r},h=n.getTextDimension(i,s,!1);o()&&(h.width>t||h.height>e);){var l=Math.ceil(a.min+(a.max-a.min)/2);s.fontSize=l+"px";var u=n.getTextDimension(i,s,!1);u.width>t||u.height>e?(a.max=l,h=u):a.min=l}return o()?a.max:a.min}});return t("./VanChartLibrary").register(i.WORD_CLOUD_CHART,o),o}),define("vans/TreeMapLayout",["require","../utils/BaseUtils"],function(t){function e(t,e){return m.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=s,t}function i(t,e){for(var i=[t];null!=(t=i.pop());)if(e(t),(r=t.children)&&(n=r.length))for(var n,r;--n>=0;)i.push(r[n])}function n(t,e){for(var i=[t],n=[];null!=(t=i.pop());)if(n.push(t),(a=t.children)&&(r=a.length))for(var r,a,o=-1;++o=0;)e=r[a],e.z+=i,e.m+=i,i+=e.s+(n+=e.c)}function f(t,e,i){return t.a.parent===e.parent?t.a:i}function p(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function g(t,e){var i=t.x+e[3],n=t.y+e[0],r=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>r&&(i+=r/2,r=0),0>a&&(n+=a/2,a=0),{x:i,y:n,dx:r,dy:a}}var m=t("../utils/BaseUtils"),v=function(){function t(i){var r,a=[i],o=[];for(i.depth=0;null!=(r=a.pop());)if(o.push(r),(u=s.call(t,r,r.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=r,c.depth=r.depth+1;h&&(r.value=0),r.children=u}else h&&(r.value=+h.call(t,r,r.depth)||0),delete r.children;return n(i,function(t){var i,n;e&&(i=t.children)&&i.sort(e),h&&(n=t.parent)&&(n.value+=t.value)}),o}var e=o,s=r,h=a;return t.sort=function(i){return arguments.length?(e=i,t):e},t.children=function(e){return arguments.length?(s=e,t):s},t.value=function(e){return arguments.length?(h=e,t):h},t.revalue=function(e){return h&&(i(e,function(t){t.children&&(t.value=0)}),n(e,function(e){var i;e.children||(e.value=+h.call(t,e,e.depth)||0),(i=e.parent)&&(i.value+=e.value)})),e},t},_=function(){function t(t,e){var s=g.call(this,t,e),h=s[0],l=r(h);if(n(l,a),l.parent.m=-l.z,i(l,o),y)i(h,p);else{var u=h,c=h,d=h;i(h,function(t){t.xc.x&&(c=t),t.depth>d.depth&&(d=t)});var f=m(u,c)/2-u.x,v=_[0]/(c.x+m(c,u)/2+f),x=_[1]/(d.depth||1);i(h,function(t){t.x=(t.x+f)*v,t.y=t.depth*x})}return s}function r(t){for(var e,i={A:null,children:[t]},n=[i];null!=(e=n.pop());)for(var r,a=e.children,o=0,s=a.length;s>o;++o)n.push((a[o]=r={_:a[o],parent:e,children:(r=a[o].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=r);return i.children[0]}function a(t){var e=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(e.length){d(t);var r=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+m(t._,n._),t.m=t.z-r):t.z=r}else n&&(t.z=n.z+m(t._,n._));t.parent.A=s(t,n,t.parent.A||i[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t,e,i){if(e){for(var n,r=t,a=t,o=e,s=r.parent.children[0],h=r.m,d=a.m,p=o.m,g=s.m;o=u(o),r=l(r),o&&r;)s=l(s),a=u(a),a.a=t,n=o.z+p-r.z-h+m(o._,r._),n>0&&(c(f(o,t,i),t,n),h+=n,d+=n),p+=o.m,h+=r.m,g+=s.m,d+=a.m;o&&!u(a)&&(a.t=o,a.m+=p-d),r&&!l(s)&&(s.t=r,s.m+=h-g,i=t)}return i}function p(t){t.x*=_[0],t.y=t.depth*_[1]}var g=v().sort(null).value(null),m=h,_=[1,1],y=null;return t.separation=function(e){return arguments.length?(m=e,t):m},t.size=function(e){return arguments.length?(y=null==(_=e)?p:null,t):y?null:_},t.nodeSize=function(e){return arguments.length?(y=null==(_=e)?null:p,t):y?_:null},e(t,g)},y=function(){function t(t,e){for(var i,n,r=-1,a=t.length;++re?0:e),i.area=isNaN(n)||0>=n?0:n}function i(e){var n=e.children;if(n&&n.length){var o,s,h,l=d(e),u=[],c=n.slice(),f=1/0,p="slice"===m?l.dx:"dice"===m?l.dy:"slice-dice"===m?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(c,l.dx*l.dy/e.value),u.area=0;(h=c.length)>0;)u.push(o=c[h-1]),u.area+=o.area,"squarify"!==m||(s=r(u,p))<=f?(c.pop(),f=s):(u.area-=u.pop().area,a(u,p,l,!1),p=Math.min(l.dx,l.dy),u.length=u.area=0,f=1/0);u.length&&(a(u,p,l,!0),u.length=u.area=0),n.forEach(i)}}function n(e){var i=e.children;if(i&&i.length){var r,o=d(e),s=i.slice(),h=[];for(t(s,o.dx*o.dy/e.value),h.area=0;r=s.pop();)h.push(r),h.area+=r.area,null!=r.z&&(a(h,r.z?o.dx:o.dy,o,!s.length),h.length=h.area=0);i.forEach(n)}}function r(t,e){for(var i,n=t.area,r=0,a=1/0,o=-1,s=t.length;++oi&&(a=i),i>r&&(r=i));return n*=n,e*=e,n?Math.max(e*r*_/n,n/(e*a*_)):1/0}function a(t,e,i,n){var r,a=-1,o=t.length,s=i.x,h=i.y,u=e?l(t.area/e):0;if(e==i.dx){for((n||u>i.dy)&&(u=i.dy);++ai.dx)&&(u=i.dx);++a=i;)e[i]=m*r(n/a),n+=Math.pow(2,-i),i++;return e}function n(t){if(0===t)return[0];for(var e=[],i=0;t>=i;)e[i]=m*r(i/t),i++;return e}function r(t){var e=y(.5);return t>e?1-Math.sqrt((1-t)/2):Math.sqrt(t/2)}function a(t,e){return e-t.source.level}var o=t("./VanChart"),s=t("./../Constants"),h=t("./../utils/BaseUtils"),l=t("./../utils/BezierEasing"),u=t("./../utils/BoundsManager"),c=t("./TreeMapLayout").treeLayout,d=t("./ForceLayout"),f=t("../utils/Scale"),p=t("../utils/PathGenerator"),g=t("../dom/EventObject"),m=800,v=300,_=500,y=l.css["ease-in-out-quad"],x=l.css.swing,b=2,T=o.extend({vanChartType:"vanChartStructure",dealAxisZoom:function(t,e){var i=this,n=i.bounds,r=i._horizontalLayout(),a=i._radialLayout(),o=i._calculateZoomParas(t,e),s=o.shiftX,l=o.shiftY,u=o.scale;i.nodes.forEach(function(t){var e=t.posX+s,a=t.posY+l;e-=n.width/2,a-=n.height/2,t.posX=e*u+n.width/2-s,t.posY=a*u+n.height/2-l,t.x=r?t.posY:t.posX,t.y=r?t.posX:t.posY,t.radius*=u,t.labelPos=i._labelPos(t);var o=i._nodeAttrs(t),c={transform:h.makeTranslate(t.labelPos)},d="translate("+t.posX+","+t.posY+")";t.graphic.animate({duration:_,attr:{transform:d}}),t.graphic.nodeGraphic.animate({duration:_,attr:o}),t.textGraphic&&t.textGraphic.animate({duration:_,attr:c})}),i.edges.forEach(function(t){var e=a?i._forceLinkAttrs(t):{d:i._treeLinkPath(t)};t.linkGraphic.animate({duration:_,attr:e})}),i._forceDragEnabled()&&i.force.scale(u),this.scale=u*h.pick(this.scale,1)},renderSeries:function(){this.fire("animationStart");var t=this,e=t.renderer,i=t.bounds,n=t.seriesOfType(s.STRUCTURE_CHART);t.nodes&&n&&n.length&&(t.layout=t.options.plotOptions.layout,t.animation=t.options.plotOptions.animation,t.lineWidth=t.options.plotOptions.lineWidth,h.hasNotDefined(t.lineWidth)&&(t.lineWidth=null),t.linkGroup||(t.linkGroup=e.group().addTo(t.clipSeriesGroup),t.nodeGroup=e.group().addTo(t.clipSeriesGroup)),t.linkGroup.attr("transform",h.makeTranslate(i)),t.nodeGroup.attr("transform",h.makeTranslate(i)),t.groupTrans=null,t.registerInteractiveTarget(n[0],t.linkGroup),t._radialLayout()?t._forceRenderer():t._treeRenderer(),this.animationCount||this.fire("animationEnd"))},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels()})},_forceDragEnabled:function(){return this.animation&&this._radialLayout()&&this.options.plotOptions.force},_treeDragEnabled:function(){return this.animation&&!this._radialLayout()&&this.options.plotOptions.force},_verticalLayout:function(){return"vertical"===this.layout},_horizontalLayout:function(){return"horizontal"===this.layout},_radialLayout:function(){return"radial"===this.layout},_validPosition:function(t,e,i,n){return Math.min(n-i,Math.max(t,e))},_forceRenderer:function(){function t(t){return f*Math.pow(2,-t.source.level)}function n(){r(!0)}function r(t){var i=t?o.ancestor.x-p:0,n=t?o.ancestor.y-g:0;l.forEach(function(t){t.x-=i,t.y-=n,t.labelPos=o._labelPos(t),e(t,o.maxLevel);var r=t.radius,a=t.radius,l=t.radius,u=t.radius;t.hasValidDataLabel()&&(r=Math.max(r,t.x-t.labelPos.x),a=Math.max(a,t.labelPos.x+t.labelDim.width-t.x),l=Math.max(l,t.y-t.labelPos.y),u=Math.max(u,t.labelPos.y+t.labelDim.height-t.y)), - t.x=o._validPosition(t.x,r,a,s.width),t.y=o._validPosition(t.y,l,u,s.height),t.labelPos=o._labelPos(t),t.posX=t.x,t.posY=t.y,t.graphic&&t.graphic.attr("transform",h.makeTranslate(t)),t.textGraphic&&t.textGraphic.attr("transform",h.makeTranslate(t.labelPos))}),u.forEach(function(t){t.linkGraphic&&t.linkGraphic.attr("x1",t.source.x).attr("y1",t.source.y).attr("x2",t.target.x).attr("y2",t.target.y)})}function a(){r(!1)}var o=this,s=o.bounds,l=o.nodes,u=o.edges,c=o.maxLevel,f=Math.min(s.width,s.height)/4,p=s.width/2,g=s.height/2;o.force&&o.force.stop(),o.force=d().nodes(l).links(u).size([s.width,s.height]).linkDistance(t).gravity(0).charge(-150).eachTick(n).simulateForce();var m=i(c);o._rendererNodes(m),o._renderForceLink(m),o.force.eachTick(a)},_renderForceLink:function(t){var e=this,i=e.renderer;e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null;var r=e._forceLinkAttrs(n),o=e.options.plotOptions,s={fill:"none",stroke:o.lineColor,"stroke-opacity":o.lineOpacity,"stroke-width":null==e.lineWidth?a(n,e.maxLevel):e.lineWidth};if(n.linkGraphic=i.line(r).style(s).addTo(e.linkGroup),n.linkGraphic.datum(n),e.animation){var h=t[n.source.level],l=t[n.target.level],u=h/m,c=l/m,d=y(u),p=y(c),g=f.linear().domain([0,1]).range([u,c]),v=f.linear().domain([d,p]).range([0,1]);n.linkGraphic.attr("x2",r.x1).attr("y2",r.y1).animate({delay:h,ease:"linear",duration:l-h,attrTween:{x2:function(){return function(t){return r.x1+(r.x2-r.x1)*v(y(g(t)))}},y2:function(){return function(t){return r.y1+(r.y2-r.y1)*v(y(g(t)))}}}})}})},_forceLinkAttrs:function(t){return{x1:t.source.x,x2:t.target.x,y1:t.source.y,y2:t.target.y}},_treeRenderer:function(){var t=this,e=t.bounds,i=t.maxLevel,r=t._verticalLayout()?[e.width,e.height]:[e.height,e.width],a=c().size(r),o=a.nodes(t.ancestor).reverse();t._adjustTreeSize(a,r,o,i);var s=n(i);t._rendererNodes(s),t._renderTreeLink()},_adjustTreeSize:function(t,i,n,r){var a=this,o=a._verticalLayout(),h=0,l=i[0],u=0,c=i[1];n.forEach(function(t){var i=e(t,r);i+=t.options.borderWidth||0;var n=t.options.dataLabels,a=t.labelDim;if(n&&n.enabled){var d=a.width,f=a.height,p=n.align==s.OUTSIDE;o?(h=Math.min(h,t.x-d/2),l=Math.max(l,t.x+d/2),u=Math.min(u,t.y-(p?f+b+i:f/2)),c=Math.max(c,t.y+(p?0:f/2))):(h=Math.min(h,t.x-(p?0:f/2)),l=Math.max(l,t.x+(p?i+b+f:f/2)),u=Math.min(u,t.y-d/2),c=Math.max(c,t.y+d/2))}h=Math.min(h,t.x-i),l=Math.max(l,t.x+i),u=Math.min(u,t.y-i),c=Math.max(c,t.y+i)}),h=-h,l-=i[0],u=-u,c-=i[1],i=[i[0]-h-l,i[1]-u-c],t.size(i),t.nodes(a.ancestor).reverse(),n.forEach(function(t){t.x=t.x+h,t.y=t.y+u})},_treeLinkPath:function(t){var e=this,i=e.maxLevel,n=e._verticalLayout()?function(t){return[t.x,t.y]}:function(t){return[t.y,t.x]};if(e.lineWidth){var r=p.diagonal().projection(n);return r(t)}var o=t.source,s=t.target,h=a(t,i),l=h/2,u=o.x,c=o.y,d=s.x,f=s.y,g=(c+f)/2,m=u-l,v=Math.min(d-.25,d-l+.5),_=u+l,y=Math.max(d+.25,d+l-.5),x=[{x:m,y:c},{x:m,y:g},{x:v,y:g},{x:v,y:f},{x:y,y:f},{x:y,y:g},{x:_,y:g},{x:_,y:c}];return x=x.map(n),"M"+x[0]+"C"+x[1]+" "+x[2]+" "+x[3]+"L"+x[4]+"C"+x[5]+" "+x[6]+" "+x[7]},_renderTreeLink:function(){var t,e=this,i=e.renderer,n=e.bounds,r=e.options.plotOptions;if(t=null==e.lineWidth?{fill:r.lineColor,"fill-opacity":r.lineOpacity}:{fill:"none",stroke:r.lineColor,"stroke-opacity":r.lineOpacity,"stroke-width":e.lineWidth},e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null,n.linkGraphic=i.path().addTo(e.linkGroup),n.linkGraphic.attr("d",e._treeLinkPath(n)).style(t),n.linkGraphic.datum(n)}),e.animation&&h.isSupportSVG()){var a={x:0,y:0,width:n.width,height:n.height};e.linkGroup.clipG?i.updateClip(e.linkGroup.clipG,a):(e.linkGroup.clipG=i.createClip(a),i.clip(e.linkGroup,e.linkGroup.clipG));var o=e._verticalLayout()?"height":"width",s={};s[o]=n[o],e.linkGroup.clipG.rect.attr(o,0).animate({ease:y,duration:m,attr:s})}},_rendererNodes:function(t){var i=this,n=i.renderer,r=i.maxLevel;i.nodes.forEach(function(a){function o(){var t=new g(i.getEvents());return t.vanchart=i,t}function s(t,e){e&&i.registerInteractiveTarget(t,e)}a._events=null,a.graphic&&a.graphic.remove(),a.graphic=null;var h=(e(a,r),t[a.level]);a.posX=i._horizontalLayout()?a.y:a.x,a.posY=i._horizontalLayout()?a.x:a.y;var l=i._nodeAttrs(a),u=a.series.getStyle(a);a.graphic=n.group().attr("transform","translate("+a.posX+","+a.posY+")").addTo(i.nodeGroup),a.options.image?a.graphic.nodeGraphic=n.image(l).imageContent(a.options.image).addTo(a.graphic):a.graphic.nodeGraphic=n.circle(l).style(u).addTo(a.graphic),s(a,a.graphic),s(o(),a.graphic.nodeGraphic),a.graphic.attr("transform","translate("+a.posX+","+a.posY+") scale(0.01)").animate({delay:h,ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1.5)"},transition:{ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1)"}}}),i._forceDragEnabled()&&i.force.registerDragTarget(a,a.graphic)})},_nodeAttrs:function(t){var e=t.radius;return t.options.image?{preserveAspectRatio:"none",x:-e,y:-e,width:2*e,height:2*e}:{cx:0,cy:0,r:e}},_labelPos:function(t){if(t.labelDim){var e=t.options.dataLabels,i=t.labelDim,n=e.align==s.INSIDE;return n?{x:t.posX-i.width/2,y:t.posY-i.height/2}:{x:t.posX-i.width/2,y:t.posY-t.radius-b-i.height}}},_animationEnd:function(){this._renderLabels()},_renderLabels:function(){var t=new u,e=this;e.nodes&&e.nodes.forEach(function(i){i.textGraphic&&i.textGraphic.remove(),i.textGraphic=null;var n=i.options.dataLabels,r=i.series;if(n&&n.enabled){var a=e._labelPos(i);n.autoAdjust&&(a=r._calculateAutoLabelPos(i,a,e._horizontalLayout(),t)),a&&(i.labelPos=a,t.addBounds(h.makeBounds(i.labelPos,i.labelDim))),r._createTextGraphic(i)}})},_onPanStart:function(t){var e=this,i=e.vanchart;i.groupTrans=i.groupTrans||i.bounds,i.currentPoint=t.containerPoint},_onPanMove:function(t){var e=this,i=e.vanchart,n=t.containerPoint.x-i.currentPoint.x,r=t.containerPoint.y-i.currentPoint.y;i.groupTrans.x+=n,i.groupTrans.y+=r,i.currentPoint=t.containerPoint;var a=h.makeTranslate(i.groupTrans);i.linkGroup.attr("transform",a),i.nodeGroup.attr("transform",a),i.ancestor.series.textGraphicGroup&&i.ancestor.series.textGraphicGroup.attr("transform",a)},_onPanEnd:function(t){var e=this,i=e.vanchart;i.handler.panTarget=null},getEvents:function(){var t=this;return t._treeDragEnabled()?{panstart:t._onPanStart,panmove:t._onPanMove,panend:t._onPanEnd}:{}}});return t("./VanChartLibrary").register(s.STRUCTURE_CHART,T),T}),define("locale/localeText",["require","../utils/BaseUtils"],function(t){function e(t){return r[t]}var i=t("../utils/BaseUtils").extend,n="en",r={startTime:"start ",finishTime:"finish ",duration:"duration ",progress:"progress "};return e.setLocale=function(t){i(r,t),n=t._locale},e.getTextMap=function(){return r},e.normalizeLocale=function(t){return t?t.toLowerCase().replace("_","-"):t},e}),define("chart/Point",["require","../utils/QueryUtils","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary","../dom/Evented"],function(t){var e=(t("../utils/QueryUtils"),t("../utils/BaseUtils")),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../dom/Evented"),o="rgb(138, 138, 138)",s=a.extend({vanChartType:"point",initialize:function(t,e){this.series=e,this.refresh(t||{})},refresh:function(t){var i=this.series,a=i.vanchart;this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,t=this.options=e.createOptions(t,[i.options]);var o=i.isSeriesAccumulated(),s=i.type==n.BAR_CHART?t.y:t.x,h=i.name;if(this.category=o?h:s,this.seriesName=o?s:h,this.value=this.getTargetValue(),this.name=e.pick(this.options.x,this.options.name),this.x=t.x,this.y=t.y,this.size=t.size,this.visible=!0,this.isNull=i.isNullValue(this),this.points=o?i.points:a.registerPointsPara(this),!i.options.large){if(t.drilldown&&t.drilldown.geo){var l=r.get(r.GEO_COMPONENT);this.geo=new l(t.drilldown.geo,r.GEO_COMPONENT,a)}e.convertToREMUseDefault16PX(t.dataLabels&&t.dataLabels.style),e.convertToREMUseDefault16PX(t.tooltip&&t.tooltip.style),this.jsonHyperlink=t.jsonHyperlink,this.drillUpLink=t.drillUpLink,this.hyperlink=t.hyperlink}},refreshPointColor:function(){var t=this,a=t.options,s=t.series,h=s.vanchart;if(!s.isTreeSeries()){var l,u=a.opacity,c=a.opacity;l=s.type==n.STRUCTURE_CHART?this.level:s.isSeriesAccumulated()?e.pick(a.x,a.name):s.name;var d=h.getDefaultSeriesColor(l),f=d;if(a.marker&&(a.marker=e.clone(a.marker),f=a.marker.fillColor||f),s.type!==n.LINE_MAP||!s.options.large){var p=h.getComponent(r.RANGE_LEGEND_COMPONENT);p&&(d=p.getColorWithSize(this.getTargetValue()),f=d,this.visible=!!d)}if(f=s.originalColor||f,f=s.originalMarkerFillColor||f,d=this.originalColor||s.originalColor||d,f=this.originalColor||f,f=this.originalMarkerFillColor||f,s.type!=n.BUBBLE_CHART&&s.type!=n.FORCE_BUBBLE_CHART||p||(t.getTargetValue()<0&&t.options.displayNegative?d=o:t.getTargetValue()<0&&(d=null)),d){var g=i.getStandardColorAndOpacity(d,u);d=g.hex,u=g.alpha}if(f){var g=i.getStandardColorAndOpacity(f,c);f=g.hex,c=g.alpha}var m=a.marker;m&&(m.fillColor=f,m.fillColorOpacity=c,m.radius=isNaN(m.radius)?4.5:m.radius,m.symbol=m.symbol||s.marker&&s.marker.symbol||""),d&&(this.color=d,this.opacity=u,this.mouseOverColor=this.options.mouseOverColor||i.getHighLightColor(d),this.clickColor=i.getClickColor(d),this.clickOpacity=.95*u),this.borderColor=this.options.borderColor,this.borderOpacity=this.options.borderOpacity}},getTargetValue:function(){var t=this.options[this.series.getTargetKey()];return isNaN(+t)?this.series.isNullValue(this)?0:t:+t},getLatLng:function(t){var e=this.options.lnglat;if(!e){var i=this.series.vanchart.getCurrentGeo();t||(t=i.getFeaturesByName(this.name,this.series.type),t=t&&t[0]),t&&(e=i.getDataPointLngLat(this,t))}return e?[e[1],e[0]]:null}});return s.include({_onPointMouseOver:function(t){var e=this,i=e.options,n=this.series,r=n.vanchart,a=(r.renderer,r.hoverPoint),o=r.hoverSeries,s=r.hoverPoints,h=r.getSharedAxis();if(a!==e){if(n.isTreeSeries())return n.vanchart.showTooltip(e,t),void n.fire("pointMouseOver",e);if(a&&a.fire("mouseout",t),i.tooltip&&i.tooltip.shared&&e.points&&h&&e.series.supportTooltipShared()){var l=r.getValidPointsPara(e.category),u=l.reduce(function(t,e){return e.series._onPointMouseOver.call(e,e),t?e.getTargetValue()>t.getTargetValue()?e:t:e},0);s&&s.length&&s[0]!=l[0]&&s[0]._onPointMouseOut.call(s[0],t),h&&l.length&&h.drawHighlightBackground(l),n.vanchart.showTooltip(u,t,r.getSharedPoints(e.category)[0]),r.hoverPoints=l}else n.vanchart.showTooltip(e,t),n.fire("pointMouseOver",e),o!=e.series&&(o&&o.fire("mouseout",t),e.series.fire("mouseover",t)),r.hoverSeries=e.series,r.hoverPoint=e}},_onPointMouseMove:function(t){var e=this.series.vanchart;e.showTooltip(e.hoverPoint,t)},_onPointMouseOut:function(t){var e=this,i=e.options.tooltip,n=this.series,r=n.vanchart.getSharedAxis();return n.isTreeSeries()?void n.fire("pointMouseOut",e):(i&&i.shared&&e.points&&e.points.length&&r?e.points.forEach(function(e){e.graphic&&e.series.fire("pointMouseOut",e),e.series.fire("mouseout",t)}):e.series.fire("pointMouseOut",e),void n.vanchart.hideTooltip())},_onPointTap:function(t){var i=this,n=(i.options,this.series),r=n.vanchart,a=r.isMap()?r.isMapPointVisible(i):i.isVisible();if(a){n.isTreeSeries()&&n.onPointTap(i);var o=t.srcEvent;o=o.touches?o.touches.length?o.touches[0]:o.changedTouches[0]:o,i.onClick(o),e.hasTouch()&&i.fire("mouseover",t),r.drillDown&&r.drillDown(i)}},hasValidDataLabel:function(){var t=this,e=t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&t.options.dataLabels&&t.options.dataLabels.enabled;return t.series.visible&&!t.isNull&&t.visible&&e},clearPointEffect:function(){var t=this;clearInterval(t.effectInterval),t.effectGraphic&&t.effectGraphic.remove(),t.effectGraphic=null},isVisible:function(){var t=this;return t&&t.visible&&t.series.visible&&!t.isNull},getEffectTime:function(){var t=this;return e.isSupportSVG()&&t.isVisible()&&t.options.effect&&t.options.effect.enabled?t.series._getEffectTime(t):0},hasEffect:function(){return this.getEffectTime()>0},autoLabelColor:function(t){var e=this,i=e.options,r=e.series,t=t||i.dataLabels,a=t.align,o=a==n.TOP||a==n.BOTTOM||a==n.OUTSIDE;return r.type==n.BUBBLE_CHART||r.type==n.TREEMAP_CHART||r.type==n.FORCE_BUBBLE_CHART||r.columnType?o=!1:(r.type==n.SCATTER_CHART||r.type==n.POINT_MAP)&&(o=!0),o?i.marker&&i.marker.fillColor||e.color:"#ffffff"},_onPointPress:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&i.onPointPress.call(e,t)},_onPointPressUp:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&(i.onPointPressUp.call(e,t),r._onPointTap(t))},onClick:function(t){var i=this,n=i.options,r=n.click||n.onClick;r&&e.getFormatterFunction(r).call(i,t)},getEvents:function(){return{mouseover:this._onPointMouseOver,mouseout:this._onPointMouseOut,mousemove:this._onPointMouseMove,tap:this._onPointTap,press:this._onPointPress,pressup:this._onPointPressUp}},remove:function(){this.visible=!1,this.graphic&&this.graphic.remove(),this.textGraphic&&this.textGraphic.remove(),this.leadLine&&this.leadLine.remove(),this.moreLabelG&&this.moreLabelG.remove(),this.graphic=this.textGraphic=this.moreLabelG=this.leadLine=null},clearChild:function(){var t=this;if(t.parent){var i=t.parent.children;i&&i.splice(e.indexOf(i,t),1)}if(t.children)for(var n=t.children.length;--n>-1;)t.children[n].clearChild();t.remove()},getTooltipRect:function(){var t=this.series.vanchart.getComponent(r.TOOLTIP_COMPONENT);return t?t._tooltipRect:void 0}}),s}),define("component/FormattedText",["require","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){function e(t,e,i){var n=t.options,r=h.format(n.x,e.XFormat),a=h.format(n.y,e.YFormat),o="-"==n.size?"-":h.format(n.size,e.sizeFormat),s="";return(-1!=i.indexOf(g)||-1!=i.indexOf(m))&&(s="(",-1!=i.indexOf(g)?(s+=r,-1!=i.indexOf(m)&&(s=s+","+a),s+=")"):(s+=a,s+=")"),s+=l.BLANK_VALUE_PERCENTAGE),-1!=i.indexOf(_)&&"-"!=o&&(s+=o),s}function i(t,e){var i=t&&(t.nameLabelContent||t.valueLabelContent);if(i&&"funnel"==e.series.type)return n(e,t);var r=0,a=0;if(t&&t.length){for(var o=0,s=t.length;s>o;o++){var h=t[o].dim;r=Math.max(r,h.width),a+=h.height}a+=(s-1)*D}return{width:r,height:a}}function n(t,e){var i=0,n=0,r=0;if(e.nameLabelContent){var a=e.nameLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.valueLabelContent){var a=e.valueLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.nameLabelContent&&e.valueLabelContent){var o=t.series,s=o.vanchart,h=s.bounds;r=h.width*c,i+=r}return{width:i,height:n,nameValueGap:r}}function r(t,e){if(!t)return"";if("object"==typeof t){var i="",n=t.identifier,r=h.format(h.pick(e.category,""),t.categoryFormat),a=h.format(h.pick(e.seriesName,""),t.seriesFormat);if((-1!=n.indexOf(p)||-1!=n.indexOf(f))&&(i+=-1!=n.indexOf(p)&&-1!=n.indexOf(f)?r+" "+a:-1!=n.indexOf(p)?r:a),!e.isNull&&-1!=n.indexOf(y)||-1!=n.indexOf(x)){h.isEmpty(i)||(i+=":");var o=h.format(e[e.series.getTargetKey()],t.valueFormat),s=h.format(e.percentage,t.percentFormat);i+=-1!=n.indexOf(y)&&-1!=n.indexOf(x)?o+" "+s:-1!=n.indexOf(y)?o:s}return i}return h.getFormatterFunction(t).call(e)}function a(t,e){if(!t)return[];if("object"==typeof t){var i=[],n=t.identifier,r=h.format(e.category,t.categoryFormat),a=h.format(e.seriesName,t.seriesFormat),o=h.format(e.value,t.valueFormat),s=h.format(e.percentage,t.percentFormat);return-1!=n.indexOf(p)&&i.push(r),-1!=n.indexOf(f)&&i.push(a),-1!=n.indexOf(y)&&i.push(o),-1!=n.indexOf(x)&&i.push(s),i}return[h.getFormatterFunction(t).call(e)]}function o(){function t(t,e){return e=e||t&&t.options&&t.options.dataLabels,e&&e.enabled&&e.formatter&&t.isVisible()}function n(e,n){if(!t(e,n))return void(e.labelDim={width:0,height:0});n=n||e.options.dataLabels;var r=n.formatter;e.labelContent="object"==typeof r?s(e,n):a(e,n),e.labelDim=i(e.labelContent,e)}function r(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0,0.15)",color:t.autoLabelColor(e)})}function a(t,e){e=e||t.options.dataLabels;var i=e.formatter,n="";try{n=h.getFormatterFunction(i).call(t)}catch(a){}var o=e.style||r(t),s=h.getTextDimension(n,o,e.useHtml);return e.useHtml&&(s.width=isNaN(parseFloat(e.labelWidth))?s.width:parseFloat(e.labelWidth),s.height=isNaN(parseFloat(e.labelHeight))?s.height:parseFloat(e.labelHeight)),[{text:n,style:o,dim:s}]}function o(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({color:t.autoLabelColor(e),fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0, 0.15)",fontWeight:"bold"})}function s(t,e){var i=t.series,n=i.type;return i.vanchart.isMap()?b(t,e):n==l.BUBBLE_CHART||n==l.SCATTER_CHART?u(t):n==l.FUNNEL_CHART?c(t):d(t,e)}function u(t){var i=t.options.dataLabels,n=i.formatter,a=n.identifier,s=[];if(-1!=a.indexOf(f)){var l=h.format(t.seriesName,n.seriesFormat),u=i.style||o(t),c=h.getTextDimension(l,u,i.useHtml);s.push({text:l,style:u,dim:c})}if(-1!=a.indexOf(g)||-1!=a.indexOf(m)||-1!=a.indexOf(_)){var d=e(t,n,a),p=i.style||r(t),v=h.getTextDimension(d,p,i.useHtml);s.push({text:d,style:p,dim:v})}return s}function c(t){var e=t.options.dataLabels,i=e.formatter,n=i.identifier;if(e.align==l.INSIDE)return d(t);var a=t.series,s=[];if(-1!=n.indexOf(v)){var u=h.format(t.name,i.nameFormat),c=o(t),f=h.getTextDimension(u,c,e.useHtml);s.nameLabelContent={text:u,style:c,dim:f},a.maxNameLabelWidth||(a.maxNameLabelWidth=0),a.maxNameLabelWidth=Math.max(a.maxNameLabelWidth,f.width)}if(-1!=n.indexOf(y)||-1!=n.indexOf(x)){var p="";-1!=n.indexOf(y)&&(p+=h.format(t.value,i.valueFormat),-1!=n.indexOf(x)&&(p+=l.BLANK_VALUE_PERCENTAGE)),-1!=n.indexOf(x)&&(p+=h.format(t.percentage,i.percentFormat));var g=r(t),m=h.getTextDimension(p,g,e.useHtml);s.valueLabelContent={text:p,style:g,dim:m},a.maxValueLabelWidth||(a.maxValueLabelWidth=0),a.maxValueLabelWidth=Math.max(a.maxValueLabelWidth,m.width)}return s}function d(t,e){function i(t){return t.map(n).filter(a)}function n(e){if(-1!==d.indexOf(e)){var i=E[e][0],n=E[e][1],r=u._formatValue?u._formatValue(t,i):t[i],a=c[n]||u._getLabelFormatFn&&u._getLabelFormatFn(i),o=h.format(r,a);return u._postLabel?u._postLabel(o,i):o}return null}function a(t){return null!==t}function s(i,n,r){if(n.length){var a=n.join(l.BLANK_VALUE_PERCENTAGE),o=r(t,e),s=h.getTextDimension(a,o,e.useHtml);i.push({text:a,style:o,dim:s})}}e=e||t.options.dataLabels;var u=t.series,c=e.formatter,d=c.identifier,g=[v,p,f],m=[y,x,w],_=o,b=r;u.type===l.TREEMAP_CHART?(m.unshift(g.shift()),b=_):u.type===l.GANTT_CHART&&(g=[],m=[A,f,C,L,P,M]);var T=[];return s(T,i(g),_),s(T,i(m),b),T}function b(t,e){if(!t||t.isNull||!e||!e.enabled)return{};var i=e.formatter,n=e.useHtml,a=t.series.type,s=(a==l.SCATTER_CHART||a==l.POINT_MAP?l.OUTSIDE:l.INSIDE,[]);if("object"==typeof i){var u=i.identifier;if(-1!=u.indexOf(v)){var c=h.format(t.name,i.nameFormat),d=o(t,e),p=h.getTextDimension(c,d,n);s.push({text:c,style:d,dim:p})}var g="",m=-1!=u.indexOf(f),b=-1!=u.indexOf(y)||-1!=u.indexOf(_),T=-1!=u.indexOf(x),A=h.format(t.seriesName,i.seriesFormat),C=h.format(t.getTargetValue(),i.valueFormat),L=h.format(t.percentage,i.percentFormat);if(m&&(g+=A,(b||T)&&(g+=":")),b&&(g+=C,T&&(g+=" ")),T&&(g+=L),g){var d=r(t,e),p=h.getTextDimension(g,d,n);s.push({text:g,style:d,dim:p})}}return s}return n}function s(){function t(t){var e=t.options.tooltip;return e&&e.enabled&&t.isVisible()}function i(e){var i=e.options.tooltip;return t(e)&&i.shared}function n(e){var i=e.series,n=i.type,a=e.options.tooltip,o=a.formatter;if(!t(e)&&!a.shared)return"";if("object"!=typeof o)try{return h.getFormatterFunction(o).call(e)}catch(u){return""}var d;switch(n){case l.BUBBLE_CHART:case l.SCATTER_CHART:d=i.vanchart.isMap()?D:r;break;case l.TREEMAP_CHART:d=s;break;case l.GANTT_CHART:d=c;break;case l.LINE_MAP:d=I;break;default:d=D}return d(e,a)}function r(t,e){var i=(t.series,e.formatter),n=e.style,r=i.identifier,s="";return s+=a(t,r,n,i),s+=o(t,r,n,i)}function a(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"":O)+a+"",r+="
"}return r}function o(t,i,n,r){var a="";if(-1!=i.indexOf(g)||-1!=i.indexOf(m)||-1!=i.indexOf(_)){var o=e(t,r,i);a+=(n?"":k)+o+""}return a}function s(t,e){var i=e.style,n=e.formatter,r=n.identifier,a="";if(e.shared){if(-1!=r.indexOf(v)){for(var o,s=t,h=[t.name];(o=s.parent)&&o.depth;)s=o,h.unshift(o.name);a+=(i?"":S)+h.join(" / ")+"
"}a+=B(t,r,i,n)}else a+=R(t,r,i,n),a+=B(t,r,i,n);return a}function c(t,e){function i(e){if(-1!==a.indexOf(e)){var i=E[e][0],n=E[e][1],s=o._formatValue?o._formatValue(t,i):t[i],l=r[n]||o._getTooltipFormatFn&&o._getTooltipFormatFn(i),u=h.format(s,l);return o._postTooltip?o._postTooltip(u,i):u}return null}var n=e.style,r=e.formatter,a=r.identifier,o=t.series,s=[A,f,C,L,P,M],l="";return s.map(function(t){var e=i(t);null!=e&&(l+=(n?"":O)+e+"
")}),l}function D(t,e){var n=t.series,r=n.vanchart,a=t.points,o=e.formatter,s=o.identifier,h=e.style,l="";if(e.shared&&a&&a.length){var c=r.isMap(),f=r.getComponent(u.RANGE_LEGEND_COMPONENT);l+=R(t,s,h,o),a.filter(i).forEach(function(t){var e=c&&f?a[0].color:t.color,i=t.options.tooltip;l+='',l+=B(t,s,h,i.formatter),l+="
"})}else l+=R(t,s,h,o),l+=B(t,s,h,o);return l}function R(t,e,i,n){var r="",a=t.series.type;return a===l.MULTIPIE_CHART?-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat)):(-1!=e.indexOf(p)&&(r=h.format(t.category,n.categoryFormat)),-1!=e.indexOf(v)&&a!==l.WORD_CLOUD_CHART&&(r=h.format(t.name,n.nameFormat))),r&&(r=(i?"":S)+r+"",r+="
"),r}function B(t,e,i,n){var r,a="",o=t.series.type,s=h.format(t.value,n.valueFormat),u=h.format(t.percentage,n.percentFormat),c=h.format(t.level,n.levelFormat),d={};d[_]=s,d[y]=s,d[x]=u,d[w]=c,o===l.MULTIPIE_CHART||o===l.WORD_CLOUD_CHART?-1!=e.indexOf(v)&&(r=h.format(t.name,n.nameFormat)):-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat));var p=[y,x,w];(o==l.BUBBLE_CHART||o==l.SCATTER_CHART)&&(p=[_,x,w]);var g=p.filter(function(t){return-1!==e.indexOf(t)&&!h.isEmpty(d[t])}).map(function(t){return d[t]}).join(" ");return r&&g&&(r+=":"),r&&(a+=(i?"":O)+r+""),g&&(a+=(i?"":k)+g+""),a}function I(t,e){if(e&&e.enabled){var i=e.formatter,n="";if("object"==typeof i){var r=e.style,a=i.identifier;n+=G(t,a,r,i),n+=N(t,a,r,i)}else n=h.getFormatterFunction(i).call(t);return n}}function G(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"":O)+a+"",r+="
"}return r}function N(t,e,i,n){var r="",a=function(t){return-1!==e.indexOf(t)},o=[],s=t.options;a(b)&&s.from.name&&o.push(s.from.name),a(T)&&s.to.name&&o.push(s.to.name),o.length&&(r+=(i?"":O)+o.join("\u2192")+" ");var l=[];if(a(y)){var u=h.format(t[t.series.getTargetKey()],n.valueFormat);u&&l.push(u)}if(a(x)){var c=h.format(t.percentage,n.percentFormat);c&&l.push(c)}return l.length&&(r+=(i?"":k)+l.join("  ")+""),r}return n}var h=t("../utils/BaseUtils"),l=t("../Constants"),u=t("../ComponentLibrary"),c=.02,d=h.isSupportSVG(),f="{SERIES}",p="{CATEGORY}",g="{X}",m="{Y}",v="{NAME}",_="{SIZE}",y="{VALUE}",x="{PERCENT}",b="{FROM.NAME}",T="{TO.NAME}",A="{PROCESSES}",C="{STARTTIME}",L="{FINISHTIME}",P="{DURATION}",M="{PROGRESS}",w="{LEVEL}",E={};["name","category","value","processes","startTime","finishTime","duration","progress","level"].map(function(t){var e="{"+t.toUpperCase()+"}";E[e]=[t,t+"Format"]}),E[f]=["seriesName","seriesFormat"],E[x]=["percentage","percentFormat"];var S='',O='',k='',D=2;return{calculateSingleLineLabelContent:r,createMultiLineLabelContent:a,calculateTextDim:i,dataLabelGenerator:o(),tooltipGenerator:s()}}),define("chart/Series",["require","../utils/BaseUtils","../utils/QueryUtils","../utils/ColorUtils","../Constants","./Point","../dom/Evented","../utils/BezierEasing","../utils/PathGenerator","../ComponentLibrary","../vector/CanvasRenderer","../component/FormattedText","../utils/Timer"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/QueryUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("./Point"),o=t("../dom/Evented"),s=t("../utils/BezierEasing"),h=t("../utils/PathGenerator"),l=(t("../ComponentLibrary"),t("../vector/CanvasRenderer")),u=t("../component/FormattedText"),c=(t("../utils/Timer"),250),d=500,f=250,p=1e3,g=600,m="quad-out",v=o.extend({initialize:function(t,e,i){this.vanchart=e,this.points=[],this.refresh(t,i)},refresh:function(t,a){var o=this.vanchart,s=t.type||o.options.chartType,h=o.options.plotOptions,l=[t,h[s],h];this.minSize=i.queryList(l,"minSize"),this.maxSize=i.queryList(l,"maxSize"),this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,this.interpolate=this._getSeriesInterpolate(l),t=this.options=e.createOptions(t,[h[s],h]),this.type=s,this.stack=t.stack,this.index=a,this.className="vancharts-series-"+a,this.name=e.pick(t.name,"Series"+a),this.visible=e.pick(t.visible,!0),this.state=this.visible?r.STATE_SHOW:r.STATE_DROPPED;var u;if(!this.isSeriesAccumulated()&&this.type!=r.STRUCTURE_CHART){var c=this.options.color||o.getDefaultSeriesColor(this.name),d=t.opacity;u=n.getStandardColorAndOpacity(c,d),c=u.hex,d=u.alpha;var f=this.options.fillColor;f=f===!0?c:f;var p=+t.fillColorOpacity;p=isNaN(p)?this._getDefaultFillColorOpacity():p,u=n.getStandardColorAndOpacity(f,p),f=u.hex,p=u.alpha;var g=t.marker=e.clone(t.marker);if(e.hasDefined(g)){var m=this._getMarkerColorAlpha();g.fillColor=m.markerColor,g.fillColorOpacity=m.markerOpacity,this.type==r.SCATTER_CHART&&e.isNullMarker(g)&&(t.marker.symbol=e.getDefaultMarkerSymbol(a))}this.color=c,this.opacity=d,this.fillColor=f,this.fillColorOpacity=p,this.marker=g}if(e.hasDefined(this.options.startAngle)){var v=this.options.startAngle,_=this.options.endAngle;v>_?v-=360:v===_&&(_=v+360),this.startAngle=e.toRadian(v),this.endAngle=e.toRadian(_)}if(this._bindAxis(),this._loadData)var y=this._loadData(t.data);else var y=t.data||[];return this.isTreeSeries()||this._dealData(y),this},_dealData:function(t){var e=[],i=this,n={},r=this.vanchart,o=this.type;this.points.forEach(function(t){var e=i._getPointKey(t);n[e]=n[e]||[],n[e].push(t)});for(var s=0,h=t.length;h>s;s++){var l=i._getPointKey(t[s]),u=n[l],c=null;if(u){for(var d=0,f=u.length;f>d;d++)if(c=u[d]){u[d]=null;break}c&&(c._lastValue=c.options[i.getTargetKey()],c.drillSeries=null,c.geo=null,c.moreLabelG&&c.moreLabelG.remove(),c.moreLabelG=null,c.refresh(t[s]))}c||(c=new a(t[s],this)),e.push(c)}for(var l in n)n[l]&&n[l].forEach(function(t){r.removePointGraphics(t,o)});this.options.sort&&(e=e.filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.getTargetValue())-Math.abs(t.getTargetValue())})),this.points=e},_getPointKey:function(t){return t.x},_getDefaultFillColorOpacity:function(){return 1},getStackAxis:function(){return this[this.getTargetKey()+"Axis"]},isNullValue:function(t){var i=t.options[t.series.getTargetKey()];return"-"==i||e.hasNotDefined(i)},_getMarkerColorAlpha:function(){var t=this.vanchart,i=this.options,r=t.options.plotOptions,a=r[this.type],o=a&&a.marker||r.marker,s=i.opacity,h=i.marker,l=h&&h.fillColor||this.options.color||o&&o.fillColor||t.getDefaultSeriesColor(this.name),u=s;if(e.hasDefined(l)){var c=n.getStandardColorAndOpacity(l,s);l=c.hex,u=c.alpha}return{markerColor:l,markerOpacity:u}},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e[n]);r&&(r.series.push(t),t[n]=r)}})},supportTooltipShared:function(){return this.xAxis||this.yAxis||this.angleAxis},_getAxisTypes:function(){return["xAxis","yAxis"]},getTargetKey:function(){return"y"},getBaseAxisType:function(){return"xAxis"},_calculateAutoLabelPos:function(t,i,n,r){function a(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:i.x,y:s};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}function o(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:s,y:i.y};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}var s,h=3,l=t.labelDim,u=this.vanchart.bounds;if(n){var c,d;c=Math.max(0,i.y),d=u.height-l.height,s=a(c,d,h,l),s||(d=0,c=Math.min(i.y,u.height-l.height),s=a(c,d,-h,l))}else{var f,p;f=Math.max(0,i.x),p=u.width-l.width,s=o(f,p,h,l),s||(p=0,f=Math.min(i.x,u.width-l.width),s=o(f,p,-h,l))}return s?s:i},_getArcPoint:function(t,e){return[this._dealWithFloat(t*Math.sin(e)),this._dealWithFloat(-t*Math.cos(e))]},_getNormalTrendLineXYValues:function(t){var e=[],i=[],n=this.vanchart.isInverted()?"posY":"posX",a=this.vanchart.isInverted()?r.LEFT:r.BOTTOM;return t.points.sort(function(t,e){return t[n]-e[n]}),t.points.forEach(function(t){t.isNull||(e.push(t.posX),i.push(t.posY))}),[e,i,a]},_getSeriesInterpolate:function(t){var e=i.queryList(t,"step"),n=i.queryList(t,"curve"),r=t[0],a="linear";return r.step||e&&!r.curve?a="step-after":(r.curve||n&&!r.step)&&(a="cardinal"),a},_getAngle:function(t,e){return e=e||{x:0,y:0},Math.atan2(t.y-e.y,t.x-e.x)/(Math.PI/180)},_getBackgroundColor:function(){var t=this.vanchart.options,e="string"==typeof t.plotBackgroundColor,i="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:i?t.backgroundColor:"white";return n.colorToHex(r)},getSeryTotalValue:function(){var t=0;return this.points.forEach(function(e){t+=e.getTargetValue()}),t},getLegendKey:function(t){return this.isSeriesAccumulated()?t.name:this.name},calculateLabelInfo:function(t){u.dataLabelGenerator(t)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},isSupportLegendHighlight:function(){return!0},isSeriesAccumulated:function(){return!1},isTreeSeries:function(){return!1}});return v.include({getClosestPoint:function(){return null},getTooltipPos:function(t,e,i){var n;if(t.options.tooltip.follow){var r=i.containerPoint;n=[r.x+10,r.y+10]}else n=this._getFixedPos(t,e);if(n){var a=this.vanchart.getChartBounds(),o=a.y,s=a.x,h=a.y+a.height,l=a.x+a.width,u=n[0],c=n[1];return s>u?u+=s-u:u+e.width>l&&(u-=u+e.width-l),o>c?c+=o-c:c+e.height>h&&(c-=c+e.height-h),[u,c]}},getFillFilter:function(t){return t},filterRender:function(){this.useCanvas()?this._canvasRender():this._svgFilterRender()},render:function(){this.useCanvas()?this._canvasRender():this._svgRender()},useCanvas:e.falseFn,_createGroup:function(t,e){return t.group().addTo(e.clipSeriesGroup)},_svgRender:function(){this.initialAnimationMoving=!this.group;var t=this.vanchart,i=t.renderer;this.group||(this.group=this._createGroup(i,t).style("cursor",this._pointerStyle()).attr("transform",e.makeTranslate(this._getTranslate())).attr("class",this.className+" "+this.type)),this.type==r.GAUGE_CHART?this.group.animate({duration:g,ease:m,attr:{transform:e.makeTranslate(this._getTranslate())}}):this.group.attr("transform",e.makeTranslate(this._getTranslate())),this.drawSeries&&this.drawSeries(),this.drawPoints()},_svgFilterRender:function(){var t=this;t.getDataToDraw().forEach(function(e){e.isVisible()?(e.graphic&&e.graphic.style({display:"inline"}),e.textGraphic||t._createTextGraphic(e),e.effectGraphic||t.drawPointEffect(e)):(e.graphic&&e.graphic.style({display:"none"}),e.textGraphic&&e.textGraphic.remove(),e.textGraphic=null,e.clearPointEffect())})},_canvasRender:function(){this._canvas||(this._canvas=new l(this.vanchart.dom,this.vanchart),this._canvas.onAdd()),this._canvas.clearAll(),this._canvas.addSeries(this)},_pointerStyle:function(){return this.points[0]&&this.points[0].options.click?"pointer":""},getDataToDraw:function(){return this.points},getTextDataToDraw:function(){return this.getDataToDraw()},updatePointGraphic:function(t){},_updateMarkerPointGraphic:function(t){ - var i=t.graphic,n=t.options.marker,r=n.symbol;i&&(e.isImageMarker(r)&&!i.image?(i.strokePath&&i.strokePath.remove(),i.fillPath&&i.fillPath.remove(),i.markerPath&&i.markerPath.remove(),i.strokePath=i.fillPath=i.markerPath=null,this._createMarker(n,i)):!e.isImageMarker(r)&&i.image&&(i.image&&i.image.remove(),i.image=null,this._createMarker(n,i)))},drawPoints:function(){var t=this,e=t.vanchart,i=this._getPointGraphicGroup();e.registerInteractiveTarget(this,i),this.initialAnimationMoving&&this.initialAnimation&&this.initialAnimation();for(var n=this._calculateAnimationDelay(),r=t.getDataToDraw(),a=0,o=r.length;o>a;a++)t.drawPoint(r[a],n)},_drawEffectPoints:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t.drawPointEffect(e)})},drawPointEffect:function(t){var e=t.series;t.clearPointEffect();var i=t.getEffectTime();i&&(e.effectAnimation(t),t.effectInterval=setInterval(function(){e.effectAnimation(t)},i))},effectAnimation:function(){},_drawUpdatePoints:function(t,e){this._updatePointGraphicStyle(t),t.graphic.animate(this.getPointUpdateAnimationAttr(t,e)),this.vanchart.registerInteractiveTarget(t,t.graphic)},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=t.graphic=this._createPointGraphic(t);e._updatePointGraphicStyle(t);var r=e.getPointInitAttr&&e.getPointInitAttr(t),a=e.getPointInitStyle&&e.getPointInitStyle(t);t.hasEffect()?n.addTo(i):n.addToBack(i),n.attr(r||{}).style(a||{}).animate(e.getPointInitAnimationAttr(t)),e.vanchart.registerInteractiveTarget(t,n)},_drawExitPoints:function(t){var e=t.series;e.getPointDropAnimationAttr?t.graphic.animate(e.getPointDropAnimationAttr(t)).remove():t.graphic.remove()},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?t.graphic&&!t.graphic.removed()?(t.graphic.style("display","inline"),this._drawUpdatePoints(t,e)):this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_getEffectTime:function(t){return isNaN(t.options.effect.period)?t.series.getDefaultEffectTime():t.options.effect.period},_getPointEffectGroup:function(t){var e=t.series,i=e.vanchart.renderer;return t.effectGraphic=t.effectGraphic||i.group().addTo(e._getPointGraphicGroup()).style("pointer-events","none")},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return i[e]()},getStyle:function(t){var e=t.options,i=t.series;return{fill:i.getFillFilter(t.color,t),"fill-opacity":e.image?1:t.opacity,stroke:t.borderColor,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth,filter:"none"}},_getDynamicStyle:function(t){var e=this.getStyle(t),i=this.vanchart.highlightTarget;if(null!=i&&this.isSupportLegendHighlight()){var n=this.getLegendKey(t),r=n==i||t._rangeItem==i?1:.3;e["fill-opacity"]=e["stroke-opacity"]=r}return e},_updatePointGraphicStyle:function(t,e){e=e||t.series._getDynamicStyle(t),t.graphic&&t.graphic.style(e)},_createMarker:function(t,i){var n=t.symbol,a=t.radius,o=this.vanchart.renderer,i=i||o.group();if(e.isImageMarker(n)){var s=t.width,l=t.height;i.image=o.image({preserveAspectRatio:"none",x:-s/2,y:-l/2,width:s,height:l}).imageContent(n).addTo(i)}else{var u=this._isHollowMarker(n),c=this.type==r.LINE_CHART;u&&c?(i.strokePath=o.path({d:h.getMarkerPath(n,a+2)}).addTo(i),i.fillPath=o.path({d:h.getMarkerPath(n,a-1)}).addTo(i)):i.markerPath=o.path({d:h.getMarkerPath(n,a)}).addTo(i)}return i},_updateMarker:function(t,i,n){i=i||t.graphic,n=n||t.options.marker;var a=n.fillColorOpacity,o=this.vanchart.highlightTarget;if(o){var s=this.getLegendKey(t);a=s==o||t._rangeItem==o?1:.3}var h=n.symbol,l=this._getBackgroundColor();if(e.isImageMarker(h));else{var u=this._isHollowMarker(h),c=this.type==r.LINE_CHART;u&&c?(i.strokePath.style({fill:n.fillColor,"fill-opacity":a,stroke:l,"stroke-width":2}),i.fillPath.style({fill:l})):u?i.markerPath.style({stroke:n.fillColor,"stroke-opacity":a,"stroke-width":2,fill:l}):c?i.markerPath.style({fill:n.fillColor,"fill-opacity":a,"stroke-width":2,stroke:l}):i.markerPath.style({fill:n.fillColor,"fill-opacity":a})}},_onMarkerPressed:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series,{fill:t.clickColor,"fill-opacity":t.clickOpacity});if(!e.isImageMarker(n)){var o=this._isHollowMarker(n),s=this.type==r.LINE_CHART;o&&s?t.graphic.strokePath.style(a):t.graphic.markerPath.style(a)}}},_onMarkerMouseOver:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius+2);if(e.isImageMarker(n)){var o=i.width+4,s=i.height+4;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}}else{var i=this._getDefaultMarker(t);t.series.vanchart.renderer;t.series.defaultMarker=t.series.defaultMarker||this._createMarker(i).addTo(this.group),t.series.defaultMarker.attr("transform",e.makeTranslate([t.posX,t.posY])),this._updateMarker(t,t.series.defaultMarker,i)}},_onMarkerMouseOut:function(t){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius);if(t.graphic)if(e.isImageMarker(n)){var o=i.width,s=i.height;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}},_getDefaultMarker:function(t){return{symbol:r.CIRCLE,fillColor:t.options.marker.fillColor,fillColorOpacity:t.options.marker.fillColorOpacity,radius:4.5,enabled:!0}},_calculateAnimationDelay:function(){return 0},_isHollowMarker:function(t){return t&&-1!=t.indexOf("hollow")},_animateEnd:function(){this._showLabels(),this._drawEffectPoints()},_showLabels:function(){var t=this,e=t.vanchart,i=0;e._needShowMoreLabel()&&(t.getTextDataToDraw().forEach(function(e){e.visible&&t._showAndExitMoreLabel(e)}),i=p),e.setTimeout(t.className+"more_label_animate",function(){e._removeChangeDataState(t),t._clearMoreLabels(),t._removeDataLabels(),t._updateDataLabels();var i=t._getPointTextLabelGroup();i.renderG.style({opacity:0}).transition().animate({transition:"linear",duration:400,style:{opacity:1}})},i)},_clearMoreLabels:function(){this.getTextDataToDraw().forEach(function(t){t.moreLabelG&&t.moreLabelG.remove(),t.moreLabelG=null})},_getMoreLabelStyle:function(){var t=this.vanchart.options.moreLabel;return t.style||{fontFamily:"verdana",fontSize:"9pt"}},_showAndExitMoreLabel:function(t,i,r,a,o,h){if(0!==t.depth){var l=this,u=l.vanchart,p=u.renderer,g=t._lastValue||0,m=e.accAdd(t.options[l.getTargetKey()],-g),v=u.options.moreLabel,_=0>m?v.minusColor||"#f4b145":v.plusColor||"#52d1b8";if(m>0)m="+"+m;else if(!(0>m))return;var y=l._getMoreLabelStyle(),x=e.getTextDimension(m,y);if(e.hasNotDefined(i)||e.hasNotDefined(r)){var b=l._getMoreLabelDefaultCenter(t,x);i=b.centerX,r=b.centerY,e.hasDefined(t.labelPos)&&e.hasDefined(t.labelDim)&&(i=t.labelPos.x+t.labelDim.width/2,r=t.labelPos.y+t.labelDim.height/2)}a&&(i=a(i,x.width)),o&&(r=o(r,x.height)),t.moreLabelG=h||p.text().addTo(l.group),y["white-space"]="nowrap";var T=r-x.height/2;t.moreLabelG.textContent(m).attr({x:i-x.width/2,y:T+5,opacity:0}).style(y).style({color:n.colorToHex(_)}).animate({duration:c,ease:"back-out",attr:{y:T},attrTween:{opacity:function(){return function(t){return s.css.swing(t)}}},transition:{delay:d,duration:f,ease:"back-in",attr:{y:T+5},attrTween:{opacity:function(){return function(t){return 1-s.css.swing(t)}}}}})}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.width/2,centerY:t.y-e.height/2}},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._createTextGraphic(e)})},_removeDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(t){t.textGraphic&&(t.textGraphic.remove(),t.textGraphic=null),t.leadLine&&(t.leadLine.remove(),t.leadLine=null)})},_createTextGraphic:function(t){var i=this;if(t.hasValidDataLabel()){var n=i.vanchart,a=n.renderer,o=t.labelContent,s=t.labelPos.x,h=t.labelPos.y,l=t.options.dataLabels,u=l.useHtml,c=this._getPointTextLabelGroup(),d=a.vtext(u).attr("transform",e.makeTranslate([s,h])).style({"pointer-events":"none"});h=0;for(var f=0,p=o.length;p>f;f++){var g,m=o[f],v=m.dim,_=m.text,y=m.style;switch(t.options.dataLabels._align){case r.LEFT:g=0;break;case r.RIGHT:g=t.labelDim.width-v.width;break;case r.CENTER:default:g=(t.labelDim.width-v.width)/2}a.vtspan(u).style({width:l.labelWidth+"px",height:l.labelHeight+"px"}).attr("y",h).attr("x",0).attr("dy",.85*v.height).attr("dx",g).textContent(_).style(y).addTo(d),h+=v.height+2}t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},_getLeadLine:function(t){return this.vanchart.renderer.path().attr("d",this._getLeadLinePath(t)).style({fill:"none",stroke:t.options.dataLabels.connectorColor||t.color,"stroke-width":t.options.dataLabels.connectorWidth||0})},_getLeadLinePath:function(t){var e=t.labelPos.startPos,i=t.labelPos.midPos,n=t.labelPos.endPos,r=this._dealWithFloat;return"M"+r(e.x)+","+r(e.y)+"L"+r(i.x)+","+r(i.y)+"L"+r(n.x)+","+r(n.y)},_dealWithFloat:function(t){return Math.abs(t)<1e-6?0:t},_getPointGraphicGroup:function(){return this.group},_getPointTextLabelGroup:function(){if(this.textGraphicGroup)this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()));else{var t=this.vanchart,i=t.seriesTextRenderGroup,n=t.seriesTextDivGroup;this.textGraphicGroup=t.renderer.vgroup(),i.append(this.textGraphicGroup.renderG),n.append(this.textGraphicGroup.divG),this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()))}return this.textGraphicGroup},_getTranslate:function(){return this.vanchart.bounds},getEvents:function(){return{mouseover:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,pointMouseOver:this._onPointMouseOver,pointMouseOut:this._onPointMouseOut,tap:this._onSeriesTap}},_onSeriesMouseOver:function(t){var e=this,i=e.vanchart,n=i.hoverSeries,r=i.hoverPoint;n!=e&&(n&&n.fire("mouseout",t),i.hoverSeries=e);var a=e.getClosestPoint(t.containerPoint);a&&a!=r&&(r&&r.fire("mouseout",t),a._events||a.getEvents&&a.on(a.getEvents(),a),a.fire("mouseover",t))},_onSeriesTap:function(t){e.hasTouch()&&this.fire("mouseover",t)},getPressedStyle:function(){return null},onPointPress:function(){var t=this,e=t.series,i=e.getPressedStyle(t);i&&t.graphic&&t.graphic.style(i)},onPointPressUp:function(){var t=this,e=t.series,i=e.getHighLightStyle(t);i&&t.graphic&&t.graphic.style(i)},remove:function(){var t=this.vanchart;this.points.forEach(function(e){t.removePointGraphics(e,this.type)}),this._canvas&&this._canvas.remove(),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}}),v}),define("chart/gantt/GanttSeries",["require","../Series","../../utils/BaseUtils","../../Constants","../../utils/BezierEasing","../../locale/localeText","../../ChartLibrary"],function(t){function e(t){return t.format("YYYY-MM-dd")}function i(t){return t.format("YYYY-MM-dd HH:mm")}function n(t){return 100*t+"%"}function r(t){return t.map(function(t){return t.name}).join(" ")}var a=t("../Series"),o=t("../../utils/BaseUtils"),s=t("../../Constants"),h=t("../../utils/BezierEasing"),l=t("../../locale/localeText"),u=2,c=.1,d=3,f=800,p=800,g=800,m="ease-out-back",v=7,_=o.isSupportSVG(),y=a.extend({doLayout:function(){var t=this,e=t.vanchart,i=e.getTimeAxis(),n=i.scale,r=e.getProcesses(),a=(r.procMap,r.cateMap),s=r.tableDims.rowHeight,h=e.options.plotOptions.newLine,l=this._getSeriesOffsetAndHeight(s,h);this.getDataToDraw().forEach(function(t){var e=t.options,i=e.borderWidth,r=e.processesId,h=n(+t.startTime),c=n(+t.finishTime),d={};d.x=h,d.y=a[r]*s+l.offset,d.width=c-h,d.height=l.height,d=o.rectSubPixelOpt(d,i),d.rx=d.ry=u,t.rect=d,t.initRect={x:d.x,y:d.y,width:0,height:d.height},t.leftRect={x:d.x,y:d.y,width:d.width*t.progress,height:d.height},t.rightRect={x:d.x+t.leftRect.width,y:d.y,width:d.width*(1-t.progress),height:d.height}})},_getSeriesOffsetAndHeight:function(t,e){var i=0,n=t*c,r=this._getVisibles(),a=e?r.length:1,o=e?r.indexOf(this.index):0;return i=t*(1-c*(a+1))/a,n+=o*(i+t*c),{height:i,offset:n}},_getVisibles:function(){return this.vanchart.seriesOfType(this.type).filter(function(t){return t.visible}).map(function(t){return t.index})},getDataToDraw:function(){var t=this.vanchart.getProcesses().procMap;return this.points.filter(function(e){return t[e.options.processesId]&&!e.isNull})},isNullValue:o.falseFn,_getTranslate:function(){return[0,0]},_calculateLabelPos:function(){this.getDataToDraw().forEach(function(t){var e=t.options.dataLabels;if(e&&e.enabled){var i=t.rect,n=t.labelDim,r=i.width*t.progress,a={y:i.y+i.height/2-n.height/2};e.align===s.RIGHT?a.x=i.x+r-n.width-d:a.x=i.x+r/2-n.width/2,t.labelPos=a}})},getFillFilter:function(t,e){var i=this.vanchart.renderer,n={x1:0,y1:0,x2:1,y2:0},r=e.progress,a=[{offset:r,"stop-color":t},{offset:r,"stop-color":t,"stop-opacity":"0.5"}];return e.colorGradient?i.updateColorGradient(e.colorGradient,n,a):e.colorGradient=i.colorGradient(n,a),"url(#"+o.stamp(e.colorGradient)+")"},getPointGraphicKey:function(){return"rect"},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:h.css[m],duration:f,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:h.css[m],duration:g,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:h.ease("exp-out"),duration:p,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.style(i)},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t)}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity}},_formatFn:function(t){switch(t){case"processes":return r;case"startTime":case"finishTime":return this.vanchart.getTimeAxis().initLevel0?n.DONUT_ICON:n.PIE_ICON;case n.RADAR_CHART:if(t.options.columnType)return n.NORMAL_ICON;break;case n.FORCE_BUBBLE_CHART:case n.BUBBLE_CHART:return n.BUBBLE_ICON;case n.TREEMAP_CHART:return n.TREEMAP_ICON;case n.LINE_MAP:return n.NULL_MARKER;default:r=n.NORMAL_ICON}return t.type==n.POINT_MAP&&t.options.icon?t.options.icon.iconUrl:(t.options.image&&e.isSupportSVG()?r=t.options.image:i&&(r=i.symbol,t.type!=n.SCATTER_CHART||e.isImageMarker(r)||(r=n.SCATTER_ICON+i.symbol)),r)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},_setComponentBounds:function(t,e){this.isFloat||this.options&&this.options.onZero?this._updateFloatBounds(t,e):this._updateComponentBounds(t,e)},isHorizontal:function(){var t=this.getPosition();return t==n.TOP||t==n.BOTTOM},isVertical:function(){return!this.isHorizontal()},getPosition:function(){return this.options.position},_updateFloatBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=this._floatX,a=this._floatY,o=i.x+i.width-r,s=i.y+i.height-a;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r,y:a,width:e,height:s}}},_updateComponentBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a+s-e,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r+o-e,y:a,width:e,height:s}}this.vanchart.setPlotBounds(i),this._clipPlotBounds(t,e)},_clipPlotBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:i={x:r,y:a+e,width:o,height:s-e};break;case n.BOTTOM:i={x:r,y:a,width:o,height:s-e};break;case n.LEFT:i={x:r+e,y:a,width:o-e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:i={x:r,y:a,width:o-e,height:s}}this.vanchart.setPlotBounds(i)},_recordForPlotBounds:function(t,e){e=Math.ceil(e),t===n.RIGHT_TOP&&(t=n.RIGHT),this.vanchart.clipPool[t]=Math.max(this.vanchart.clipPool[t]||0,e)},_getBackgroundColor:function(){var t=this.option,e="string"==typeof t.plotBackgroundColor,n="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:n?t.backgroundColor:"white";return i.colorToHex(r)},_maxHeight:function(t){var e=this.vanchart.height;return t||this.options.maxHeight?this._getPercentValue(this.options.maxHeight,e):e},_maxWidth:function(t){var e=this.vanchart.width;return t||this.options.maxWidth?this._getPercentValue(this.options.maxWidth,e):e},_getTickContent:function(t,i){return i?e.format(t,i):t},getDefaultMarkerRadius:function(){return a},getPlotBounds:function(){return this.vanchart.bounds},getChartBounds:function(){return this.vanchart.getChartBounds()},getParentDom:function(){return this.vanchart.getParentDom()},getDivParentDom:function(){return this.vanchart.getDivParentDom()},getTooltipComponent:function(){return this.vanchart.components.tooltip},remove:function(){},_bindData:e.bindData,invisible:function(){return e.hasDefined(this.options.visible)&&this.options.visible===!1},_innerClip:function(t){var i=this,n=i.bounds,r=i.vanchart,a=r.renderer,o=e.makeBounds(0,0,n.width,n.height);if(this._clip?a.updateClip(this._clip,o):this._clip=a.createClip(o),"vgroup"===t.type){var s=0,h=0,l=h+o.width,u=s+o.height;t.divG.style({clip:"rect("+s+"px "+l+"px "+u+"px "+h+"px)"}),a.clip(t.renderG,this._clip)}else a.clip(t,this._clip)}});return o}),define("chart/gantt/defaultValues",["require"],function(t){return{PADDING:"0.25rem",WEEKEND_COLOR:"rgba(169, 195, 200, 0.1)",OUTLINE:{fill:"none",stroke:"rgba(207, 207, 207, 1)","stroke-width":1},TWEENLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":1},INNERLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":.5},MINUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16h-4.3v0.3h4.3V16z"}]},PLUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16H0.2v-1.9h-0.3V16h-2v0.3h2v2h0.3v-2h1.9C2.1,16.3,2.1,16,2.1,16z"}]},THUMB_PATH:{size:[4.6,7.1],graphics:[{fill:"#F2F2F2",d:"M-0.008,13.717h-2.1v4.5l2.2,2.2l0,0l2.1-2.2v-4.5H-0.008"},{fill:"#727171",d:"M-0.008,20.617l-2.3-2.4v-4.7h4.6v4.7L-0.008,20.617z M-2.008,18.117l2,2l2-2v-4.3h-4V18.117z"}]}}}),define("chart/gantt/levelDomain",["require"],function(t){function e(t){return l[t][0]}function i(t){return l[t][1]}function n(t,e){return u*t*Math.pow(2,e)}var r=1e3,a=60*r,o=60*a,s=24*o,h=181*s,l=[["year","halfYear"],["year","halfYear"],["year","quarter"],["halfYear","month"],["quarter","month"],["quarter","month"],["month","week"],["week","day"],["month","date"],["month","date"],["date","meridiem"],["date","qDay"],["date","hour"]],u=3/h;return{r0:u,LEN:l.length,Ratio:n,upUnit:e,subUnit:i}}),define("chart/gantt/helper",[],function(){function t(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:n,y1:a,x2:r,y2:a})}function e(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:a,y1:n,x2:a,y2:r})}function i(t,e,i,n,r,a,o,s){return s||(s=e.append(t.rect().style(i))),s.attr({x:n,y:r,width:a,height:o})}function n(t,e,i,n){function r(t,a,o,s,h){i&&i(t,a,o,s,h);var l,u=t[e];u&&(l=u.length)&&u.map(function(e,i){r(e,a+1,l,i,t)}),n&&n(t,a,o,s,h)}r(t,0,0,0,null)}function r(t){return t.reduce(function(t,e){return t+e},0)}function a(t,e){var i=r(t);return t.map(function(t){return t/i*e})}function o(t){var e=t;return e>=0&&1>=e?e:1}return{lineH:t,lineV:e,rect:i,traverse:n,sum:r,distribValues:a,getValidProgress:o}}),define("chart/gantt/LevelBar",["require","../../component/Base","../../Constants","../../utils/BaseUtils","../../ComponentLibrary","./defaultValues","../../dom/EventObject","./levelDomain","./helper"],function(t){var e=t("../../component/Base"),i=t("../../Constants"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./defaultValues"),o=t("../../dom/EventObject"),s=t("./levelDomain").LEN,h=t("./helper"),l=(h.lineV,h.lineH),u=a.MINUS_PATH,c=a.PLUS_PATH,d=a.THUMB_PATH,f=d.size[0],p=12,g=12,m=64,v=m-f,_=v/(s-1),y=e.extend({doLayout:function(){this._setComponentBounds(i.BOTTOM,p);var t=this.vanchart.bounds;this.bounds={x:t.x,y:t.y+t.height,height:p,width:t.width}},render:function(){if(!this.group){var t=this.vanchart.renderer;this.group=t.group().add(),this.group.attr("transform",n.makeTranslate(this.bounds)).attr("class","level-bar"),this._bar(t),this._slider(t)}},isEnabled:function(){return this.enabled&&this.vanchart.getTimeAxis().isZoomEnabled()},setLevel:function(t){null!=t&&(this.enabled=!0,this._setThumbLevel(t))},_setThumbLevel:function(t){var e=f/2+_*t;this.thumbG.attr("transform",n.makeTranslate({x:e,y:-17}))},_bar:function(t){this.group.append(t.rect().attr({x:0,y:0,width:this.bounds.width,height:this.bounds.height}).style({stroke:"none",fill:this._gradient(t)}))},_gradient:function(t){if(!n.isSupportSVG())return"rgb(220, 220, 220)";var e={x1:0,y1:0,x2:0,y2:1},i=[{offset:"0%","stop-color":"rgb(220, 220, 220)"},{offset:"75%","stop-color":"rgb(181, 181, 181)"},{offset:"100%","stop-color":"rgb(137, 137, 137)"}],r=t.colorGradient(e,i);return"url(#"+n.stamp(r)+")"},_slider:function(t){var e=this.group.append(t.group());e.attr("transform",n.makeTranslate({x:this._getLineStartX(),y:p/2})),l(t,e,{fill:"none",stroke:"#727171","stroke-width":.5},0,m,0),this.minusG=this._getIconGroup(t,u,-u.size[0]/2),this.plusG=this._getIconGroup(t,c,m+c.size[0]/2),this.thumbG=this._getIconGroup(t,d,m/2),["minus","plus","thumb"].map(function(t){var i=this[t+"G"];e.append(i);var n=new o(this.iconEvents(t));n.control=this,this.vanchart.registerInteractiveTarget(n,i)},this)},_getLineStartX:function(){return this.bounds.width-m-g},eventsMap:{minus:["tap"],plus:["tap"],thumb:["panstart","panmove","panend"]},iconEvents:function(t){var e=this.eventsMap[t],i={};return e.map(function(e){i[e]=this["on"+t+e]},this),i},onminustap:function(t){this.control._changeLevel(-1)},onplustap:function(t){this.control._changeLevel(1)},onthumbpanstart:function(t){},onthumbpanmove:function(t){var e=this.control,i=e.bounds,n=t.containerPoint,r=n.x-i.x-e._getLineStartX()-f/2;r=Math.min(Math.max(0,r),v);var a=Math.round(r/_);e._changeToLevel(a)},onthumbpanend:function(t){},_changeToLevel:function(t){this.isEnabled()&&(this.vanchart.changeToLevel(t),this._setThumbLevel(this.vanchart.getTimeAxis().getLevel()))},_changeLevel:function(t){var e=this.vanchart.getTimeAxis().getLevel()+t;this._changeToLevel(e)},_getIconGroup:function(t,e,i){var r=t.group();return r.attr("transform",n.makeTranslate({x:i,y:-17})),r.append(t.path().attr(e.graphics[0])),r.append(t.path().attr(e.graphics[1])),r}});return r.register(r.LEVELBAR,y),y}),define("chart/gantt/Table",["require","../../component/Base"],function(t){var e=t("../../component/Base");return e.extend({_getHeader:function(){return this.options.header},_getBody:function(){return this.options.body}})}),define("chart/gantt/ScrollbarItem",["require","../../dom/Evented","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../utils/BaseUtils"),n=(i.isSupportSVG(),12),r="rgba(233, 233, 233, 0.6)",a="rgba(207, 207, 207, 0.6)",o=.5,s=6,h="rgba(160, 160, 160, 0.6)",l="rgba(88, 88, 88, 0.6)",u=s/2,c=e.extend({initialize:function(t){this.opt=t,this.pos={x:0,y:0};var e=t.manager.vanchart,l=t.manager.renderer;this.group=t.group.append(l.group()),this.group.style("transition","opacity 0.3s"),this.group.attr("transform",i.makeTranslate([t.x,t.y])); - var c,d,f,p,g;"x"===t.dir?(c=this.opt.length,d=n,f=this.opt.barLength,p=s,g="y"):(c=n,d=this.opt.length,f=s,p=this.opt.barLength,g="x"),this.background=this.group.append(l.rect().attr({width:c,height:d}).style({fill:r,stroke:a,"stroke-width":o}));var m={rx:u,ry:u,width:f,height:p};m[g]=(n-s)/2,this.bar=this.group.append(l.rect().attr(m).style("fill",h)),e.registerInteractiveTarget(this,this.bar)},show:function(t){t!==this._showed&&(this._showed=t,i.isSupportSVG()?this.group.style("opacity",t?"1":"0"):this.group.style("display",t?"":"none"))},remove:function(){this.group.remove()},setPos:function(t,e){(t!==this.opt.x||e!==this.opt.y)&&(this.group.attr("transform",i.makeTranslate([t,e])),this.opt.x=t,this.opt.y=e)},setSize:function(t,e){if(t!==this.opt.length||e!==this.opt.barLength){(e>t||0>t||0>e)&&(t=e=0);var i="x"===this.opt.dir?"width":"height";this.background.attr(i,t),this.bar.attr(i,e),this.opt.length=t,this.opt.barLength=e}},setPct:function(t){this.setBarPos(this._getRemainLength()*t)},getBarPos:function(){return this.pos[this.opt.dir]},setBarPos:function(t){t=Math.max(0,Math.min(t,this._getRemainLength())),this.getBarPos()!==t&&(this.pos[this.opt.dir]=t,this.bar.attr("transform",i.makeTranslate(this.pos)))},_getRemainLength:function(){return this.opt.length-this.opt.barLength},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},onMouseOver:function(){this.bar.attr({fill:l})},onMouseOut:function(){this.bar.attr({fill:h})},onPanStart:function(t){this.initPos=this.getBarPos(),this.initPointPos=t.containerPoint},onPanMove:function(t){var e=t.containerPoint[this.opt.dir]-this.initPointPos[this.opt.dir];this.setBarPos(this.initPos+e),this.opt.manager["on"+this.opt.dir](this.getBarPos()/this._getRemainLength())},onPanEnd:function(){this.opt.manager.vanchart.handler.panTarget=null}});return c.SIZE=n,c}),define("chart/gantt/Scrollbar",["require","../../dom/Evented","../../utils/BaseUtils","./ScrollbarItem"],function(t){function e(t){return+t.toFixed(3)}var i=t("../../dom/Evented"),n=t("../../utils/BaseUtils"),r=t("./ScrollbarItem"),a=20;return i.extend({initialize:function(t){this.view=t.view,this.vanchart=t.view.vanchart,this.renderer=t.view.renderer,this.group=t.group,this.options=t,this.options.autoHide=t.autoHide!==!1,this.x=this.y=0,this._isScrollX(t)&&(this.barX=this._barBottom()),this._isScrollY(t)&&(this.barY=this._barRight());var e=t.onChangeName||"innerChange",i=t.onResizeName||"resize",n=t.onOverName||"mouseover";this.view.on(e,this.setPos,this).on(i,this.setSize,this),t.autoHide&&(this.barX&&this.barX.show(!1),this.barY&&this.barY.show(!1),this.view.on(n,this.show,this))},show:function(t){this.barX&&this.barX.show(t),this.barY&&this.barY.show(t)},setPos:function(t){if(t.initiator!==this){if(this.barX&&null!=t.x){var e=t.x/(this.options.width-this.options.innerWidth);this.barX.setPct(e)}if(this.barY&&null!=t.y){var i=t.y/(this.options.height-this.options.innerHeight);this.barY.setPct(i)}}},setSize:function(t){if(t.scrollX=this.options.scrollX,t.scrollY=this.options.scrollY,this.options.scrollX){var e=this._isScrollX(t);if(e&&!this.barX&&(this.barX=this._barBottom()),!e&&this.barX&&(this.barX.remove(),this.barX=null),e&&this.barX){var i=this._getLengths(t,"width");this.barX.setPos(0,t.height-r.SIZE),this.barX.setSize(i.length,i.barLength)}}if(this.options.scrollY){var a=this._isScrollY(t);if(a&&!this.barY&&(this.barY=this._barBottom()),!a&&this.barY&&(this.barY.remove(),this.barX=null),a&&this.barY){var i=this._getLengths(t,"height");this.barY.setPos(t.width-r.SIZE,0),this.barY.setSize(i.length,i.barLength)}}n.extend(this.options,t)},_barBottom:function(){var t=this._getLengths(this.options,"width");return this._bar("x",0,this.options.height-r.SIZE,t.length,t.barLength)},_barRight:function(){var t=this._getLengths(this.options,"height");return this._bar("y",this.options.width-r.SIZE,0,t.length,t.barLength)},_getLengths:function(t,e){var i=t[e],n="width"===e?t.innerWidth:t.innerHeight,o=i-(this._isScrollBoth(t)?r.SIZE:0);return{length:o,barLength:Math.max(i/n*o,a)}},_bar:function(t,e,i,n,a){return new r({manager:this,group:this.group,x:e,y:i,length:n,barLength:a,dir:t})},onx:function(t){this.fire("scrollX",{initiator:this,x:t*(this.options.width-this.options.innerWidth)})},ony:function(t){this.fire("scrollY",{initiator:this,y:t*(this.options.height-this.options.innerHeight)})},_isScrollX:function(t){return t.scrollX&&e(t.width)this.model.bounds.y+this.model.tableDims.headerHeight},_shouldXMove:function(t){return i.containsPoint(this.model.bounds,t)},onScrollX:function(t){this._setInnerPos(t)},onScrollY:function(t){this._setInnerPos(t)},_setInnerPos:function(t){var e,n;return t&&(null!=t.x&&(e=t.x),null!=t.y&&(n=t.y)),null==e&&(e=this.innerPosX),null==n&&(n=this.innerPosY),e=u(c(this.model.bounds.width-this._getInnerWidth(),e),0),n=u(c(this.visibleBodyHeight-this.innerBodyHeight,n),0),e!==this.innerPosX||n!==this.innerPosY?(this._showShadow&&this._showShadow(0!==e),this._getGroup("header").attr("transform",i.makeTranslate([e,0])),this._getGroup("inner-body").attr("transform",i.makeTranslate([e,n])),this.innerPosX=e,this.innerPosY=n,{x:e,y:n}):!1},onresizeStart:function(t){this._initX=this.model.bounds.x,this._initWidth=this.model.bounds.width,this._initPointX=t.containerPoint.x},onresizeMove:function(){this.update(),this._fireResize()},_fireResize:function(){this.fire("resize",{width:this.model.bounds.width,height:this.visibleBodyHeight,innerWidth:this._getInnerWidth(),innerHeight:this.innerBodyHeight}),this._setInnerPos()},onover:function(t){this.fire("mouseover",i.containsPoint(this.model.bounds,t.containerPoint))}})}),define("chart/gantt/ProcessesView",["require","./TableView","../../utils/BaseUtils","./Scrollbar","../../dom/DomUtils","./helper","./defaultValues"],function(t){var e=t("./TableView"),i=(t("../../utils/BaseUtils"),t("./Scrollbar"),t("../../dom/DomUtils").toBack),n=t("./helper"),r=t("./defaultValues"),a=n.lineV,o=n.lineH,s=n.rect,h=n.traverse,l=n.sum,u=r.OUTLINE,c=r.INNERLINE,d=r.TWEENLINE;return e.extend({className:"processesGroup",update:function(){var t=this.renderer,e=this.model.bounds;t.updateClip(this.clip,{width:e.width,height:e.height}),this._header(),this._body(),this._outline()},_getInnerWidth:function(){return l(this.model.tableDims.widths)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model.tableDims.widths,n=this.model.tableDims.headerHeight,r=this.model._getHeader(),h=this._getGroup("header");h||(h=this._addGroup("header",e),this._headerEles={},this._headerEles.gs=[]);var l=a.bind(null,t,h),u=o.bind(null,t,h),c=s.bind(null,t,h),f=this._headerEles.gs,p=-1,g=0;i.map(function(t,e){f[++p]=c({fill:this._getOptionsColor(r[e])},g,0,t,n,f[p]),e&&(f[++p]=l(d,0,n,g,f[p])),f[++p]=this._drawText(h,r[e].style,n/2,g+t/2,r[e].text,f[p]),g+=t},this);var m=d["stroke-width"]/2;f[++p]=u(d,0,g,n-m,f[p])},_body:function(){this._bodyEles||this._prepareBody();var t=this.renderer,e=this._getGroup("inner-body-back"),n=this._bodyEles.gs,r=-1,l=a.bind(null,t,e),u=o.bind(null,t,e),f=s.bind(null,t,e),p=this.model._getBody(),g=this.model.tableDims.widths,m=[],v=g.reduce(function(t,e,i){return m[i]=t,t+e},0),_=this.model.tableDims.rowNum,y=this.model.tableDims.rowHeight,x=0,b=g.map(function(){return 0}),T=this._drawText.bind(this);h(this.model._getCateRoot(),"categories",null,function(t,i,a,o){if(i){var s=i-1,h=b[s],l=x+1;if(a-1>o){++x;var f=1===i?d:c;n[++r]=u(f,m[s],v,y*x,n[r]);for(var _=b.length;--_>=s;)b[_]=x}var A=t.name;null!=A&&""!==A&&(n[++r]=T(e,p[s].style,y*(h+l)/2,m[s]+g[s]/2,A,n[r]))}}),++x;for(var A=x;_>=A;){var C=A===x?d:c;n[++r]=u(C,0,v,y*A,n[r]),++A}var L=0,P=this.innerBodyHeight;g.map(function(a,o){p[o]&&(++r,n[r]||(n[r]=e.append(t.rect()),n[r].style({fill:this._getOptionsColor(p[o])}),i(n[r].node())),f(null,L,0,a,P,n[r])),o&&(n[++r]=l(d,0,P,L,n[r])),L+=a},this)},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds;if(!this._outlineEles){var n=u["stroke-width"]/2,r=a.bind(null,t,e,u),s=o.bind(null,t,e,u);r(0,i.height,n),s(0,this.vanchart.bounds.width,n),s(0,this.vanchart.bounds.width,i.height-n)}this._outlineEles=a(t,e,c,0,i.height,i.width-c["stroke-width"]/2,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!1})},_drawText:function(t,e,i,n,r,a){return a||(a=t.append(this.renderer.text().style(e).textContent(r))),a.attr({x:n,y:i,dy:".35em","margin-top":"-0.5em"}).vMiddle(),a},onresizeMove:function(t){var i=this.model.bounds,n=t.containerPoint.x-this._initPointX;i.width=this._initWidth+n||0,this.model.expandPanelWidth(i.width),e.prototype.onresizeMove.call(this)}})}),define("chart/gantt/Processes",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./ProcessesView","./helper","./defaultValues"],function(t){var e=t("./Table"),i=t("../../utils/BaseUtils"),n=t("../../ComponentLibrary"),r=t("./ProcessesView"),a=t("./helper"),o=a.traverse,s=a.sum,h=a.distribValues,l=t("./defaultValues").PADDING,u=0,c=3,d=i.getTextDimension,f=Math.max,p=e.extend({_refresh:function(){u=i.paddingConvertWithScale(l)},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{width:this._calcPanelWidth(),headerHeight:this.tableDims.headerHeight,rowHeight:this.tableDims.rowHeight,rowNum:this.tableDims.rowNum}},setPanelDims:function(t){this.tableDims.headerHeight=t.headerHeight,this.tableDims.rowNum=t.rowNum,this.bounds={x:t.x,y:t.y,width:t.pWidth,height:t.height}},_calcPanelWidth:function(){var t,e,i=s(this.tableDims.widths);if(t=this.options.width){var n=this.vanchart.bounds;e=n.width*t,e>i&&this.expandPanelWidth(e)}else e=i;return e},expandPanelWidth:function(t){t<=s(this.tightWidths)||(this.tableDims.widths=h(this.tableDims.widths,t))},_calcTableDims:function(){var t=this._getHeader(),e=this._getBody(),i=this._getCateRoot(),n=this._calcHeaderDim(t),r=this._calcRowDim(n.widths,e,i);return{headerHeight:n.height,rowHeight:r.height,widths:r.widths,rowNum:r.num}},_calcHeaderDim:function(t){if(!t||!t.length)return{height:0,widths:[]};var e=0,i=t.map(function(t){var i=d(t.text,t.style,!1);return e=f(e,i.height*c),i.width+2*u});return{height:e,widths:i}},_calcRowDim:function(t,e,i){var n=this.procMap={},r=this.cateMap={},a=0,s=0;return o(i,"categories",function(i,o,h,l,u){if(o){var p=o-1,g=d(i.name,e[p].style,!1);t[p]=f(t[p],g.width);var m=i.categories;m&&m.length>1||(a=f(a,g.height*c),r[i.processesId]=s),m&&m.length||++s,n[i.processesId]={options:i,parent:n[u.processesId]}}}),t=t.map(function(t){return t+2*u}),this.tightWidths=t.slice(),{num:s,height:a,widths:t}},_getCateRoot:function(){return this.options},render:function(){Object.keys(this.procMap).length&&(this.view||(this.view=new r(this,this.vanchart)),this.view.render())}});return n.register(n.PROCESSES,p),p}),define("dateUnits/dateFormat",["require"],function(t){function e(t,e,i){var n=""+Math.abs(t),r=e-n.length,a=t>=0;return(a?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function i(t,i,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),t&&(f[t]=a),i&&(f[i[0]]=function(){return e(a.apply(this,arguments),i[1],i[2])})}function n(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function r(t){var e,i,r=t.match(c);for(e=0,i=r.length;i>e;e++)f[r[e]]?r[e]=f[r[e]]:r[e]=n(r[e]);return function(e){var n,a="";for(n=0;i>n;n++)a+=r[n]instanceof Function?r[n].call(e,t):r[n];return a}}function a(t,e){return d[e]=d[e]||r(e),d[e](t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))}function s(t,e){return o(e.get(t),-2)+u.duration[t]}function h(t,e){return null==p[e]&&("string"==typeof u.duration[e]?p[e]=s.bind(null,e):p[e]=u.duration[e]),p[e](t)}function l(t){for(var e in t)"_"!==e.charAt(0)&&("base"===e?t.base(i,u):u[e]=t[e])}var u={duration:{year:"years",month:"months",day:"days",hour:"hours",minute:"minutes",second:"seconds"},halfYears:["H1","H2"],quarters:"Q1_Q2_Q3_Q4".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),meridiem:["am","pm"],qDay:"0h~6h_6h~12h_12h~18h_18h~24h".split("_")},c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w{1,3}|wo|W[o|W]?|Q{2,3}|Qo?|[yY]{2,6}|gg(ggg?)?|GG(GGG?)?|e{2,6}|E|a|A|hh?|HH?H?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,d={},f={},p={},g=i;return g("y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["yy",2],0,function(){return this.year()%100}),g(0,["yyyy",4],0,"year"),g("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["YY",2],0,function(){return this.year()%100}),g(0,["YYYY",4],0,"year"),g(0,["yyyyy",5],0,"year"),g(0,["yyyyyy",6,!0],0,"year"),g("N",0,0,function(){return u.halfYears[this.halfYear()-1]}),g("Q",["QQ",2],0,"quarter"),g("QQQ",0,0,function(){return u.quarters[this.quarter()-1]}),g("M",["MM",2],"Mo",function(){return this.month()+1}),g("MMM",0,0,function(){return u.monthsShort[this.month()]}),g("MMMM",0,0,function(){return u.months[this.month()]}),g("w",["ww",2],0,"week"),g("www",0,0,function(){return"Week"+this.week()}),g("e",["ee",2],0,"day"),g("eee",0,0,function(){return u.weekdaysShort[this.day()]}),g("eeee",0,0,function(){return u.weekdays[this.day()]}),g("eeeeee",0,0,function(){return u.weekdaysMin[this.day()]}),g("d",["dd",2],0,"date"),g("a",0,0,function(){return u.meridiem[this.meridiem()-1]}),g("I",0,0,function(){return u.qDay[this.qDay()-1]}),g("H",["HH",2],0,"hour"),g("HHH",0,0,function(){return this.hour()+"h"}),g("m",["mm",2],0,"minute"),g("s",["ss",2],0,"second"),{formatDate:a,formatDuration:h,setLocale:l}}),define("dateUnits/dateDuration",["require","./dateFormat"],function(t){var e=t("./dateFormat").formatDuration,i=1e3,n=60*i,r=60*n,a=24*r,o=365*a,s=30*a,h=function(t){this._ms=+t},l=(h.prototype={valueOf:function(){return this._ms},as:function(t){return e(this,t)},get:function(t){var e=this._ms;switch(t){case"millisecond":break;case"second":e/=i;break;case"hour":e/=r;break;case"minute":e/=n;break;case"day":e/=a;break;case"month":e/=s;break;case"year":e/=o;break;default:throw new Error("Unknown unit "+t)}return e}},function(t){return new h(t)});return l}),define("dateUnits/dateUnits",["require","./dateFormat","./dateDuration"],function(t){function e(t,e,i){var n=Math.floor((t-e)/(i-e+1)),r=t-(i-e+1)*n;return{c:n,r:r}}function i(t){return t%4===0&&t%100!==0||t%400===0}function n(t){return i(t)?366:365}function r(t){var e=new Date(t,0,4).getDay()||7;return 4-e}function a(t){var e=r(t),i=r(t+1);return(n(t)-e+i)/7}var o=t("./dateFormat"),s=t("./dateDuration"),h=o.formatDate,l=864e5,u=["year","month","halfYear","quarter","week","day","date","meridiem","qDay","hour","minute","second","millisecond"],c={};u.map(function(t){c[t+"s"]=t});var d=function(t){this._d=t},f=d.prototype={valueOf:function(){return+this._d},year:function(t){return null!=t?(this._d.setFullYear(t),this):this._d.getFullYear()},month:function(t){return null!=t?(this._d.setMonth(t),this):this._d.getMonth()},halfYear:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.year(this.year()+i.c),this.month(1===i.r?0:6),this}return this.month()<6?1:2},quarter:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.year(this.year()+i.c),this.month(3*(i.r-1)),this}return Math.ceil((this.month()+1)/3)},dayOfYear:function(){return Math.floor((this._d-new Date(this.year(),0,1))/l)+1},weekOfYear:function(){var t=Math.floor((this.dayOfYear()-(this.day()||7)+10)/7),e=this.year();return 1>t?(e-=1,t=a(e)):t>a(e)&&(t-=a(e),e+=1),{week:t,year:e}},week:function(){return this.weekOfYear().week},day:function(t){if(null!=t){var e=t-(this.day()||7);return this._d.setDate(this.date()+e),this}return this._d.getDay()},date:function(t){return null!=t?(this._d.setDate(t),this):this._d.getDate()},meridiem:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.date(this.date()+i.c),this.hours(1===i.r?0:12),this}return this.hours()<12?1:2},qDay:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.date(this.date()+i.c),this.hour(6*(i.r-1)),this}return Math.ceil((this.hour()+1)/6)},hour:function(t){return null!=t?(this._d.setHours(t),this):this._d.getHours()},minute:function(t){return null!=t?(this._d.setMinutes(t),this):this._d.getMinutes()},second:function(t){return null!=t?(this._d.setSeconds(t),this):this._d.getSeconds()},millisecond:function(t){return null!=t?(this._d.setMilliseconds(t),this):this._d.getMilliseconds()},startOf:function(t){switch(t){case"year":this.month(0);case"halfYear":case"quarter":case"month":this.date(1);case"week":case"day":case"date":this.hours(0);case"hour":case"meridiem":case"qDay":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.day(1):-1!==["quarter","halfYear","meridiem","qDay"].indexOf(t)&&this[t](this[t]()),this},endOf:function(t){return t&&"millisecond"!==t?this.add(1,t).startOf(t).add(-1,"millisecond"):this},add:function(t,e){if(e=c[e]||e,"halfYear"===e)this.add(6*t,"month");else if("quarter"===e)this.add(3*t,"month");else if("week"===e)this.add(7*t,"date");else if("meridiem"===e)this.add(12*t,"hour");else if("qDay"===e)this.add(6*t,"hour");else{"day"===e&&(e="date");var i=this.get(e);this[e](i+t)}return this},isWeekend:function(){var t=this.day();return 6===t||0===t}};u.map(function(t){f[t+"s"]=f[t]}),f.get=function(t){return this[t]()},f.format=function(t){return h(this,t)};var p=function(t){var e;return e=t instanceof d?new Date(t._d):t?new Date(t):new Date,new d(e)};return p.isLeapYear=i,p.daysInYear=n,p.firstWeekOffset=r,p.weeksInYear=a,p.setLocale=o.setLocale,p.duration=s,p}),define("chart/gantt/TimeAxisView",["require","./TableView","../../utils/BaseUtils","./levelDomain","../../dateUnits/dateUnits","./helper","./defaultValues"],function(t){function e(t,e){for(var i=-1,n=t.length;++i=e.left},r:function(t,e){return t<=e.right},_checkTextBounds:function(t,e){var i,n,r,a=e.data[e.i],o=-this.innerPosX,s=-this.innerPosX+this.model.bounds.width;"left"===t?(i=o,n=i,r=Math.min(a.right,s)):(i=s,n=Math.max(a.left,o),r=i);var h=this.l(i,a),l=this.r(i,a);h&&l?(a.width||(a.width=f(a.content,a.style).width),r-n>=a.width?a.ele.attr("x",(n+r)/2).vMiddle():a.ele.attr("x",-100)):(a.ele.attr("x",a.x).vMiddle(),h?l||++e.i:--e.i)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model,n=i.bounds.width,r=i.tableDims.heights,a=h(r),l=i._getHeader();this._headerEles||(this._headerEles={upLines:[],upTexts:[],subLines:[],subTexts:[]},this._headerEles.gs=[]);var u=this._headerEles.gs,f=-1,g=this._headerEles,m=this.model._headerData;u[++f]=s(t,e,{fill:this._getOptionsColor(l[0])},0,0,n,r[0],u[f]),u[++f]=s(t,e,{fill:this._getOptionsColor(l[1])},0,r[0],n,r[1],u[f]);var v=d["stroke-width"]/2;u[++f]=o(t,e,d,0,n,r[0]-v,u[f]),u[++f]=o(t,e,d,0,n,a-v,u[f]);var _=this._getGroup("header")||this._addGroup("header",e);["upLines","subLines"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.line().datum(e).style(c))});g[e]=n.concat(i.update).map(function(t){return t.attr(t.datum())})}),["upTexts","subTexts"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.text().datum(e).style(e.style))});g[e]=n.concat(i.update).map(function(t){var e=t.datum();return e.ele=t,t.textContent(e.content).attr({x:e.x,y:e.y,dy:".35em","margin-top":"-0.5em"}).vMiddle(),t})})},_body:function(){this._bodyEles||(this._prepareBody(),this._shadow()),this._bodyData={hLines:[],vLines:[],rects:[]};var t=this._bodyEles,e=this._bodyData,i=this.renderer,n=this._getGroup("inner-body-back"),r=this.model.tableDims.rowHeight,a=this.model.tableDims.rowNum,o=this.innerBodyHeight;e.rects=this.model._weekendsWidths;var s=p(t.rects,e.rects);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.rect().datum(t).style({fill:l.WEEKEND_COLOR}))});t.rects=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x:e.from,y:0,width:e.to-e.from,height:o})}),e.vLines=this.model._headerData.subLines;var s=p(t.vLines,e.vLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.vLines=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x1:e.x1,y1:0,x2:e.x2,y2:o})});for(var u=0;++u<=a;)e.hLines.push({x1:0,y1:u*r,x2:this._getInnerWidth(),y2:u*r});var s=p(t.hLines,e.hLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.hLines=h.concat(s.update).map(function(t){return t.attr(t.datum())})},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds,r=a.bind(null,t,e,u),s=u["stroke-width"]/2;if(!this._outlineEles){var h=o.bind(null,t,e,u);h(0,this.vanchart.bounds.width,s),h(0,this.vanchart.bounds.width,i.height-s)}var l=i.width-s;n.isSupportSVG()||(l=Math.floor(l)),this._outlineEles=r(0,i.height,l,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!0})},_shadow:function(){var t={x1:0,y1:0,x2:1,y2:0},e=[{offset:"0%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0.2"},{offset:"75%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0"}],i=this.renderer.colorGradient(t,e),r="url(#"+n.stamp(i)+")";this._shadowRect=this._getGroup("body").append(this.renderer.rect()).style("transition","opacity 0.2s").attr({x:0,y:0,width:10,height:this.model.bounds.height,fill:r}),this._showShadow(!1)},_showShadow:function(t){t!==this._shadowShowed&&(this._shadowShowed=t,this._shadowRect.style("opacity",t?"1":"0"))},onresizeMove:function(t){var e=this.model.bounds,n=this._initPointX-t.containerPoint.x;e.x=this._initX-n,e.width=this._initWidth+n||0,i.prototype.onresizeMove.call(this)}})}),define("chart/gantt/levelText",["require","../../locale/localeText"],function(t){function e(){return r("ganttLevels")||a}function i(t,i){return t.format(e()[i][0])}function n(t,i){return t.format(e()[i][1])}var r=t("../../locale/localeText"),a=[["yyyy","N"],["yyyy","N"],["yyyy","QQQ"],["N[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["MMM[,]yyyy","www"],["d[,]MMM[,]yyyy","eee"],["MMM[,]yyyy","d"],["MMM","d"],["d[,]MMM","a"],["d[,]MMM","I"],["d[,]MMM","HHH"]];return{getUpText:i,getSubText:n}}),define("chart/gantt/TimeAxis",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./TimeAxisView","./levelDomain","../../dateUnits/dateUnits","../../utils/Scale","./helper","./levelText","./levelText","./defaultValues"],function(t){function e(t,e,i,n,r){t.add(1,e);var a=(t-i)*n;return r.push(a),a}var i=t("./Table"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./TimeAxisView"),o=t("./levelDomain"),s=t("../../dateUnits/dateUnits"),h=t("../../utils/Scale"),l=t("./helper"),u=l.sum,c=l.distribValues,d=t("./levelText").getUpText,f=t("./levelText").getSubText,p=t("./defaultValues").PADDING,g=0,m=3,v=o.upUnit,_=o.subUnit,y=o.LEN,x=o.Ratio,b=n.getTextDimension,T=n.getTextHeight,A=n.object2date,C=n.isEmpty,L=Math.max,P=Math.min,M=i.extend({_refresh:function(){g=n.paddingConvertWithScale(p),this.lastScale=this.scale,this.scale=h.linear()},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{headerHeight:u(this.tableDims.heights)}},setPanelDims:function(t){var e=t.headerHeight;this.tableDims.headerHeight=e,this.tableDims.rowHeight=t.rowHeight,this.tableDims.rowNum=t.rowNum;var i=u(this.tableDims.heights);e>i&&(this.tableDims.heights=c(this.tableDims.heights,e)),this.bounds={x:t.x+t.pWidth,y:t.y,width:t.tWidth,height:t.height}},_calcTableDims:function(){var t=this._getHeaderHeights();return{heights:t}},_getHeaderHeights:function(){return this._getHeader().map(function(t){return T(t.style)*m})},calcSeries:function(t,e){var i=Number.MAX_VALUE,n=0,r={},a={},o=[];t.map(function(t){t.points.map(function(t){var h=t.options,u=A(h.startTime),c=A(h.finishTime),d=A(h.markTime);if(isNaN(u.getTime())||isNaN(c.getTime()))return void(t.isNull=!0);var f=t.options.processesId;if(null!=e[f]){if(t.progress=l.getValidProgress(h.progress),h.tooltip.follow=!0,!t.processes){var p=f,g=e[p];for(t.processes=[g.options];g=g.parent;)t.processes.unshift(g.options)}C(t.options.id)||(a[h.id]=t);var m=r[f]=r[f]||{min:Number.MAX_VALUE,max:0};d&&!isNaN(d.getTime())&&(o.push(t),m.min=P(m.min,d),m.max=L(m.max,d)),m.min=P(m.min,u,c),m.max=L(m.max,u,c),i=P(m.min,i),n=L(m.max,n),t.startTime=s(u),t.finishTime=s(c),t.markTime=s(d),t.duration=s.duration(c-u)}})}),this.domainMap=r,this.dateDomain=[i,n],this.idMap=a,this.markArray=o,i>n&&(this.dateDomain=[])},render:function(){if(this.dateDomain.length)if(this.view)this.view.render();else{this.view=new a(this,this.vanchart),this.view.render();var t=this._calcFirstViewMovement();this.view.changeInner({x:t})}},_calcFirstViewMovement:function(){var t=s(this.dateDomain[0]),e=_(this.level),i=+t.startOf(e),n=+t.add(-1,e);return this.scale(n)-this.scale(i)},renderContent:function(){this.dateDomain.length&&this.view.updateContent()},calcScale:function(){function t(t){if(p){var e=D[D.length-1];P.isWeekend()&&!t?(!e||e&&e.finish)&&D.push({from:w,finish:!1}):e&&!e.finish&&(e.to=w,e.finish=!0)}}if(this.dateDomain.length){var i=this._headerData={upLines:[],upTexts:[],subLines:[],subTexts:[]},n=this.tableDims.heights,r=u(n),a=this._getHeader(),o=this.dateDomain,h=this._getEm(),l=this.getLevel(),c=x(h,l),p=this.shouldShowWeekends(),g=v(l),m=_(l),y=s(o[0]),b=s(o[1]),T=s(y).startOf(m).add(-1,m),A=s(b).endOf(m).add(1,m),C=s(T).startOf(g),L=s(C),P=s(T),M=(L-T)*c,w=(P-T)*c,E=[M],S=[w],O=e.bind(null,L,g,T,c,E),k=e.bind(null,P,m,T,c,S),D=this._weekendsWidths=[],R=(A-T)*c;for(this.scale.domain([T,A]).range([0,R]),this.innerWidth=Math.max(R,this.bounds.width);w=L?(i.upLines.push({x1:M,y1:0,x2:M,y2:n[0]}),i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=d(L,l),I=O(),i.upTexts.push({style:a[0].style,left:M,right:I,x:(I+M)/2,y:n[0]/2,content:B}),M=I):i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=f(P,l),I=k(),i.subTexts.push({style:a[1].style,left:w,right:I,x:(I+w)/2,y:n[0]+n[1]/2,content:B}),w=I}t(!0)}},getLevel:function(){if(null==this.level){if(!this.dateDomain.length)return;var t=this.setLevel(this.options.zoomLevel);t||this.setLevel(this._guessLevel()),this.initLevel=this.level}return this.level},setLevel:function(t){return null==t||0>t||t>y-1?!1:(this.level=t,!0)},_guessLevel:function(){for(var t=this.dateDomain,e=this._getEm(),i=this.bounds.width,n=i/(t[1]-t[0]),r=y;--r>-1;){var a=x(e,r);if(n>a)break}return Math.max(0,r)},_getEm:function(){var t=this._getHeader(),e=s(),i=b(d(e,0),t[0].style).width+2*g,n=6*b(f(e,0),t[1].style).width,r=n/6;return i>n&&(r=i/6),r},isZoomEnabled:function(){return this.options.zoom},shouldShowWeekends:function(){return this.level>6&&this.options.showWeekends}});return r.register(r.TIMEAXIS,M),M}),define("chart/gantt/Link",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants"],function(t){function e(t,e){return t.filter(function(t){ - return t.type&&f[t.type.toLowerCase()]&&t.lineWidth&&e[t.from]&&e[t.from].isVisible()&&e[t.to]&&e[t.to].isVisible()}).map(function(t){return i(t,e)},this)}function i(t,e){var i=n(t,e),r={d:i.line},a={fill:"none",stroke:t.lineColor,"stroke-width":t.lineWidth,"stroke-dasharray":h.DASH_TYPE[t.dashStyle||"Solid"]},o={d:i.arrow},s={fill:t.lineColor,stroke:"none"};return{lineAttr:r,lineStyle:a,arrowAttr:o,arrowStyle:s}}function n(t,e){var i=t.type.toLowerCase(),n=r(i,0,e[t.from]),o=r(i,1,e[t.to]),s=n[1],h=o[0],d=s[0],f=h[0],p=l,g=[null,(s[1]+h[1])/2];if(s[1]===h[1])g=[s[0],s[1]-e[t.from].rect.height/2-c],p=u;else switch(i){case"fs":d>f&&(g[0]=f);break;case"ff":f>d&&(p=u);break;case"ss":d>f&&(p=u);break;case"sf":default:f>d&&(g[0]=f)}var m=n;return null!=g[0]&&m.push(g),m=m.concat(o),{line:p(m),arrow:a(o[1],i.charAt(1))}}function r(t,e,i){var n,r=t.charAt(e),a=i.rect,o=a.y+a.height/2,s=Math.max(a.height/2,2*d),h=["s"===r?a.x:a.x+a.width,o],l=[h[0]+("s"===r?-s:s),o];return n=e?[l,h]:[h,l]}function a(t,e){var i="M"+t[0]+","+t[1]+"l",n=d;return"s"===e&&(i+="-"),i+=n+","+n+"v-"+2*n+"z"}var o=t("../../vans/VanChart"),s=t("../../utils/PathGenerator"),h=t("../../Constants"),l=s.line().interpolate("step-before"),u=s.line().interpolate("step-after"),c=2,d=3,f={};f.fs=f.ff=f.sf=f.ss=!0,o.include({renderLinks:function(){this._linksGroup&&this._linksGroup.remove(),this._linksGroup=this._links=null;var t=this.options.plotOptions.links;if(t&&t.length&&(this._linksGroup||(this._linksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._links)){this._links=e(t,this.getTimeAxis().idMap);var i=this._linksGroup,n=this.renderer;this._links.map(function(t){t._line=i.append(n.path().attr(t.lineAttr).style(t.lineStyle)),t._arrow=i.append(n.path().attr(t.arrowAttr).style(t.arrowStyle))})}}})}),define("chart/gantt/Mark",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants","../../utils/BaseUtils"],function(t){function e(t,e,i,n,s){var h=t.group().attr("transform",o(e));if(r.isImageMarker(n)){var l=i,u=i;h.image=t.image({preserveAspectRatio:"none",x:-l/2,y:-u/2,width:l,height:u}),h.image.imageContent(n),h.append(h.image)}else{var c=a(n,i/2);h.append(t.path().attr("d",c).style({stroke:"none",fill:s}))}return h}var i=t("../../vans/VanChart"),n=t("../../utils/PathGenerator"),r=(t("../../Constants"),t("../../utils/BaseUtils")),a=n.getMarkerPath,o=r.makeTranslate;i.include({renderMarks:function(){if(this._marksGroup&&this._marksGroup.remove(),this._marksGroup=this._marks=null,this._marksGroup||(this._marksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._marks){var t=this.getTimeAxis(),i=t.markArray,n=t.scale,r=this._marksGroup,a=this.renderer;i.map(function(t){if(t.visible&&t.series.visible){var i=t.rect.height,o=n(t.markTime),s=t.rect.y+.5*i;r.append(e(a,[o,s],i,t.options.markType,t.options.markColor))}})}}})}),define("dateUnits/locale/zh-cn",[],function(){return{_locale:"zh-cn",duration:{year:"\u5e74",month:"\u6708",day:"\u5929",hour:"\u5c0f\u65f6",minute:"\u5206\u949f",second:"\u79d2"},halfYears:["\u4e0a","\u4e0b"],quarters:"\u4e00\u5b63\u5ea6_\u4e8c\u5b63\u5ea6_\u4e09\u5b63\u5ea6_\u56db\u5b63\u5ea6".split("_"),months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),meridiem:["\u4e0a\u5348","\u4e0b\u5348"],qDay:"0~6\u70b9_6~12\u70b9_12~18\u70b9_18~24\u70b9".split("_"),base:function(t,e){t("www",0,0,function(){return this.week()+"\u5468"})}}}),define("locale/zh-cn",["require"],function(t){return{_locale:"zh-cn",startTime:"\u5f00\u59cb",finishTime:"\u7ed3\u675f",duration:"\u6301\u7eed",progress:"\u8fdb\u5ea6",ganttLevels:[["yyyy[\u5e74]","N"],["yyyy[\u5e74]","N"],["yyyy[\u5e74]","QQQ"],["yyyy[,]N","MM"],["yyyy[,]QQQ","MMM"],["yyyy[,]QQQ","MMM"],["yyyy[\u5e74]MM[\u6708]","www"],["yyyy[\u5e74]MM[\u6708]dd[\u65e5]","eeeeee"],["yyyy[\u5e74]MM[\u6708]","d"],["MMM","d"],["MM[\u6708]dd[\u65e5]","a"],["MM[\u6708]dd[\u65e5]","I"],["MM[\u6708]dd[\u65e5]","H"]]}}),define("chart/gantt/Gantt",["require","../../Constants","../../vans/VanChart","../../vans/VanChartLayout","../../ComponentLibrary","../../utils/BaseUtils","../../locale/localeText","./GanttSeries","./LevelBar","./Processes","./TimeAxis","./Link","./Mark","../../dateUnits/locale/zh-cn","../../locale/zh-cn","../../dateUnits/dateUnits","../../vans/VanChartLibrary"],function(t){var e=t("../../Constants"),i=t("../../vans/VanChart"),n=t("../../vans/VanChartLayout"),r=t("../../ComponentLibrary"),a=t("../../utils/BaseUtils"),o=t("../../locale/localeText");t("./GanttSeries"),t("./LevelBar"),t("./Processes"),t("./TimeAxis"),t("./Link"),t("./Mark"),t("../../dateUnits/locale/zh-cn"),t("../../locale/zh-cn");var s=r.PROCESSES,h=r.TIMEAXIS,l=r.LEVELBAR,u=Math.max,c=10,d=i.extend({vanChartType:e.GANTT_CHART,initialize:function(e){if(e.language){var n=o.normalizeLocale(e.language);if(!/^en/.test(n)){var r=t("../../dateUnits/dateUnits"),a=t("../../dateUnits/locale/"+n);r.setLocale(a);var s=t("../../locale/"+n);o.setLocale(s)}}i.prototype.initialize.apply(this,arguments),this.handler.on("resizeEnd",this.onResizeEnd,this)},refresh:function(t){if(this.getTimeAxis()){this.remove();var e=this;e.panBounds=e.backGroup=e.processesGroup=e.timeaxisGroup=e.frontGroup=null,r.ComponentsOrder.map(function(t){t in e.components&&(e.components[t].remove(),e.components[t]=null)}),e.components={},this.initialize(t,this.wrapDom,this.vancharts)}else i.prototype.refresh.call(this,t)},resize:function(){this.refresh(this.options)},layoutComponentsAndCharts:function(){var t=this;t.bounds=t._getDefaultBounds(),r.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()});var e=this.getProcesses(),i=this.getTimeAxis();if(!this.panBounds){var a=this._calcDims(e,i);this.panBounds=this._calcPanBounds(a),this.resizeBounds=this._calcResizeBounds(a),e.setPanelDims(a),i.setPanelDims(a)}i.calcSeries(this.series,e.procMap),i.calcScale(),n.calculateSeries(this),n.calculateSeriesShapes(this),this.render()},render:function(){this.vancharts.endLoading();var t=this,e=this.renderer;["backGroup","processesGroup","timeaxisGroup","frontGroup"].forEach(function(i){if(!t[i]){var n=t[i]=e.group().addClass(i).add();if("processesGroup"===i||"timeaxisGroup"===i){var r=i+"-body";n=t[r]=n.append(e.group().addClass(r)),r=i+"-inner-body",t[r]=n.append(e.group().addClass(r))}}});var i=t["timeaxisGroup-inner-body"];["clipSeriesGroup","seriesGroup","seriesTextRenderGroup"].forEach(function(n){t[n]||(t[n]=i.append(e.group().addClass(n)))});var n=this.getTimeAxis();this._addDivClipGroup({x:0,y:0,width:n.bounds.width,height:n.bounds.height-n.tableDims.headerHeight}),this.seriesTextDivGroup.attr("transform",a.makeTranslate([n.bounds.x+this.bounds.x,n.tableDims.headerHeight+this.bounds.y])),this._renderBackground(),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.renderComponents();var r=this.getComponent(l);r&&r.setLevel(this.getTimeAxis().getLevel()),this._consoleDone()},changeToLevel:function(t){var e=this.getTimeAxis(),i=e.getLevel();t!==i&&(e.setLevel(t),e.calcScale(),e.renderContent(),this.reRenderWholePlot())},reRenderWholePlot:function(){n.calculateSeriesShapes(this),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.getComponent(r.LEGEND_COMPONENT).render()},_calcDims:function(t,e){var i=this.bounds,n=i.width,r=t.getInitPanelDims(),a=r.width,o=r.headerHeight,s=e.getInitPanelDims(),h=n-a;o=u(o,s.headerHeight);var l=r.rowHeight*r.rowNum,c=i.height-o,d=r.rowNum;return c>l&&(d=Math.floor(c/r.rowHeight)),{x:i.x,y:i.y,pWidth:a,tWidth:h,height:i.height,headerHeight:o,rowHeight:r.rowHeight,rowNum:d}},getProcesses:function(){return this.getComponent(s)},getTimeAxis:function(){return this.getComponent(h)},isResizeEnabled:function(){return this.getComponent(s).options.resize},_calcPanBounds:function(t){return{x:t.x,y:t.y,width:t.pWidth+t.tWidth,height:t.height}},_calcResizeBounds:function(t){return{x:t.x+t.pWidth-c/2,y:t.y,width:c,height:t.height}},onResizeEnd:function(){this.resizeBounds.x=this.getTimeAxis().bounds.x-c/2},onScrollY:function(t){this.fire("moveY",t)}});return t("../../vans/VanChartLibrary").register(e.GANTT_CHART,d),d}),define("utils/LoadingUtils",[],function(){function t(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",!i[e]&&!document.getElementById(e)){var n=document.createElement("div"),r=document.createElement("div");n.id=e,n.style.backgroundColor="white",n.style.opacity=.75,n.style.filter="alpha(opacity=75)",n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.left=0,n.style.top=0,n.style.zIndex=9999,(void 0!=r.style.animation||void 0!=r.style.webkitAnimation)&&(r.style.left="50%",r.style.top="50%",r.className="loader-inner ball-scale-ripple-multiple",r.innerHTML="
"),n.appendChild(r),t.appendChild(n),i[e]=n}}function e(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",i[e])t.removeChild(i[e]),i[e]=null;else{var n=document.getElementById(e);n&&t.removeChild(n)}}var i={};return{startLoading:t,endLoading:e}}),define("component/Tooltip",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary","./FormattedText"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../utils/ColorUtils")),r=t("../ComponentLibrary"),a=t("./FormattedText"),o=.4,s=e.extend({_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:2000;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;pointer-events:none;",_style:function(t){if(!t)return"";var e=[];if(t.animation&&!t.follow){var r="left "+o+"s,top "+o+"s";e.push("transition:"+r),e.push("-moz-transition:"+r),e.push("-webkit-transition:"+r),e.push("-o-transition:"+r)}if(t.style){var a=i.cssNormalization(t.style);for(var s in a)"color"==s?e.push(s+":"+n.colorToHex(a[s])):e.push(s+":"+a[s])}if(t.backgroundColor)if("string"==typeof t.backgroundColor)if(i.isSupportSVG())e.push("background-Color:"+t.backgroundColor);else{var h=n.colorToHexAlpha(t.backgroundColor),l="#"+("0"+(255*h.alpha|0).toString(16)).slice(-2)+h.hex.replace("#","");e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+l+", endColorstr="+l+", GradientType=0)")}else if("object"==typeof t.backgroundColor){var u=t.backgroundColor,c=n.colorToHex(u.startColor),d=n.colorToHex(u.endColor),f="left",p="left top",g="right top",m=1;u.x1==u.x2&&(f="top",p="left top",g="left bottom",m=0),e.push("background: -ms-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -moz-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -webkit-gradient(linear, "+p+", "+g+", color-stop(0, "+c+"), color-stop(1, "+d+"))"),e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+c+", endColorstr="+d+", GradientType="+m+")")}null!=t.borderWidth&&e.push("border-width:"+t.borderWidth+"px"),null!=t.borderColor&&e.push("border-color:"+t.borderColor),null!=t.borderRadius&&(e.push("border-radius:"+t.borderRadius+"px"),e.push("-moz-border-radius:"+t.borderRadius+"px"),e.push("-webkit-border-radius:"+t.borderRadius+"px"),e.push("-o-border-radius:"+t.borderRadius+"px")),t.shadow&&e.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)");var v=t.padding;return null!=v&&void 0!=v&&(v=i.reformCssArray(v),e.push("padding:"+v[0]+"px "+v[1]+"px "+v[2]+"px "+v[3]+"px")),e=e.join(";")+";"},doLayout:function(t){this._tDom||(t=t||this.vanchart.getDivParentDom(),this._tDom=document.createElement("div"),this._hiddenDom=document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.style.position="absolute",this._hiddenDom.style.visibility="hidden",t.appendChild(this._tDom),t.appendChild(this._hiddenDom),this._tooltipHideTick=null)},remove:function(){if(this._tDom){var t=this.vanchart.getDivParentDom();t.removeChild(this._tDom),t.removeChild(this._hiddenDom)}},showWithPoint:function(t,e,n){if(t&&t.options.tooltip&&t.series.vanchart.renderer){var r=n||t,o=r.options.tooltip,s=t.series,h=a.tooltipGenerator(r),l=this.calculateTooltipDivDim(o,h),u=s.getTooltipPos(t,l,e);u&&(this._show(u,o,h),this._tooltipRect=i.makeBounds(u,l))}},_getTooltipText:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return t.indexOf("Trident/7.0")>0||t.indexOf("Edge/")>0||e>0&&10===parseInt(t.substring(e+5,t.indexOf(".",e)),10)?function(t){t+="";for(var e,i="",n=!0,r=-1,a=t.length;++r"===e&&(n=!0),i+=e;return i}:function(t){return t}}(),_show:function(t,e,i){t&&e&&i&&!this.vanchart.isMouseDown&&(clearTimeout(this._tooltipHideTick),this._tDom.innerHTML=this._getTooltipText(i),this._tDom.style.cssText=this._gCssText+this._style(e)+"left:"+t[0]+"px;top:"+t[1]+"px;")},hide:function(){clearTimeout(this._tooltipHideTick),this._tooltipHideTick=setTimeout(function(){this._tDom.style.display="none"}.bind(this),400)},immediateHide:function(){this._tDom.style.display="none"},calculateTooltipDivDim:function(t,e){t=t||"";var i=this._hiddenDom;i.innerHTML=e,i.style.cssText=this._gCssText+this._style(t)+"visibility:hidden;";var n=i.offsetWidth,r=i.offsetHeight;return{width:n,height:r}},render:function(){}});return r.register(r.TOOLTIP_COMPONENT,s),s}),define("Carousel",["require","./utils/BaseUtils","./utils/QueryUtils","./dom/DomUtils","./utils/ColorUtils","./utils/PathUtils","./Constants","./utils/BezierEasing","./vector/SvgRenderer","./vector/VmlRenderer","./component/Tooltip"],function(t){function e(t){var e=t.title;return e.text&&e.useHtml?c.getPlainText(e.text):e.text||""}function i(t,e){Object.keys(e).map(function(i){"string"==typeof e[i]&&(t.style[i]=e[i])})}function n(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.85*i[1],100*(i[2]+.15)/115),"hex")}function r(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.75*i[1],100*(i[2]+.25)/125),"hex")}function a(t,e){var i=t.className.split(" ");-1===i.indexOf(e)&&(t.className+=" "+e)}function o(t,e){var i=t.className.split(" "),n=i.indexOf(e);-1!==n&&(i.splice(n,n),t.className=i.join(" "))}function s(t,e,i){if(c.isSupportSVG()){var n=""+C[e]+"";t.innerHTML=n,t.querySelector("g").setAttribute("fill",i),e===m.RADAR_CHART&&t.querySelector("g").setAttribute("stroke",i)}else t.innerHTML=''}function h(t,e){if(c.isSupportSVG())t.style.background=e,t.innerHTML='';else{var i=u("shape");i.path=g.circlePath(15,15,15),i.stroked="False",i.fillcolor=e;var n=u("fill");n.color=e,n.opacity=.5,i.appendChild(n),t.appendChild(i);var r=u("shape");r.path=/vanchart-arrow-left/.test(t.className)?"m19,22 l9,15 l19,9 e":"m11,22 l21,15 l11,9 e",r.filled="False",r.strokecolor="#ffffff",t.appendChild(r),Hammer.on(t,"mouseover",function(){n.opacity=.2}),Hammer.on(t,"mouseout",function(){n.opacity=.5})}}function l(t){var e=u("shape");e.style.width="100%",e.style.height="100%",e.coordsize="10 10",e.path=g.circlePath(5,5,5),e.stroked="False",e.fillcolor="#7f7f7f";var i=u("fill");i.color="#7f7f7f",i.opacity=.5,e.appendChild(i),t.appendChild(e)}function u(t){var e=_.prototype.create(t);return e.style.cssText=P,e.coordsize="1 1",e}var c=t("./utils/BaseUtils"),d=t("./utils/QueryUtils"),f=t("./dom/DomUtils"),p=t("./utils/ColorUtils"),g=t("./utils/PathUtils"),m=t("./Constants"),v=t("./utils/BezierEasing"),_=(t("./vector/SvgRenderer"),t("./vector/VmlRenderer")),y=t("./component/Tooltip"),x=3.4375,b={type:m.BUTTON,color:"#7f7f7f",interval:1e3,style:{fontSize:"16px",color:"#ffffff"}},T={borderWidth:1,borderColor:"#000000",borderRadius:2,backgroundColor:"rgba(255, 255, 255, 0.5)",padding:5,shadow:!0,animation:!0,style:{fontSize:"12px",fontFamily:"MicrosoftYaHei, sans-serif",color:"#515151"}},A=function(t){function u(i,n){var r=e(i),a=N[n];return a.mText&&(a.mText.textContent?a.mText.textContent=r:a.mText.innerText=r,R(a)),a._title=r,w(i,t.charts[n],Y[n],n)}function g(t,e,o){t&&t.switchStyle||D();var s=t.options,l=d.merge(b,t.switchStyle,!0);c.isSupportSVG()||l.style.color&&(l.style.color=p.colorToHex(l.style.color)),I=o,B=l.type,Z=s.length,G=G||f.create("div","vanchart-menu",o),U=U||f.create("div","vanchart-cc",o),o.style.overflow="hidden",$.doLayout(o);var u=l.color;switch(e.splice(Z).map(function(t){t.remove()}),N.splice(Z).map(function(t){f.remove(t)}),Y.splice(Z).map(function(t){f.remove(t)}),a(U,"van-ani"),q=q>=Z?0:q,B){case m.CAROUSEL:G.style.bottom=0,G.style.height="18px",G.style.width="100%",G.mWrap=G.mWrap||f.create("div","vanchart-menu-wrap",G),U.style.cssText="top:0;bottom: 18px;left:"+100*-q+"%;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-18+"px"),H=H||f.create("div","vanchart-arrow-wrap",o),z=z||f.create("div","vanchart-arrow-wrap",o),z.style.right=0;var g=H.arrowLeft=H.arrowLeft||f.create("div","vanchart-arrow vanchart-arrow-left",H),v=z.arrowRight=z.arrowRight||f.create("div","vanchart-arrow vanchart-arrow-right",z);h(g,u),h(v,u);var y=l.interval;return J.left&&J.left.off("tap"),J.left=J.left||new Hammer(g),J.left.on("tap",function(t){t.preventDefault(),D(y);var e=(Z+q-1)%Z;S(e,m.LEFT),O(e)}),J.right&&J.right.off("tap"),J.right=J.right||new Hammer(v),J.right.on("tap",function(t){t.preventDefault(),D(y);var e=(q+1)%Z;S(e,m.RIGHT),O(e)}),J.dom&&J.dom.off(o,"mouseover mouseout"),J.dom=Hammer.on(o,"mouseover",function(){D()}).on(o,"mouseout",function(){D(y)}),D(y),_(s,e);case m.BUTTON:default:var T=n(u),A="width:100%;top:0;background-color:"+u+";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="+T+", endColorstr="+p.colorToHex(u)+", GradientType=0);";A+="background-image: -webkit-gradient(linear, left top, left bottom, from("+T+"), to("+u+"));",A+="background-image: -moz-linear-gradient(top"+T+", "+u+");",A+="background-image: -webkit-linear-gradient(top"+T+", "+u+");",A+="background-image: linear-gradient(to bottom"+T+", "+u+");",G.style.cssText=A,i(G,l.style),K=c.getTextHeight(l.style);var C=K*x;return U.style.cssText="left:"+100*-q+"%;top:"+C+"px;bottom: 0;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-C+"px"),L(s,e,l.style.color,r(u))}}function _(t,e){F=F||f.create("div","vanchart-chart",U),F.style.width=100/Z+"%",F.style.marginLeft=-100/Z+"%",et&&(F.style.width=I.clientWidth+"px",F.style.marginLeft=-I.clientWidth+"px");var i=t.map(function(t,i){return A(t,i),w(t,e[i],Y[i],i)});return W=W||f.create("div","vanchart-chart",U),W.style.width=100/Z+"%",W.style.marginRight=-100/Z+"%",et&&(W.style.width=I.clientWidth+"px",W.style.marginLeft=-I.clientWidth+"px"),i}function A(t,i){var n=e(t),r=N[i];if(!Y[i]){if(Y[i]=f.create("div","vanchart-chart",U),N[i]=r=f.create("div","vanchart-menu-dot",G.mWrap),!c.isSupportSVG()){r.style.background="none";var o=f.create("div","vanchart-menu-dot-ie",r);l(o)}i||a(r,"van-on")}r._title=n,r.i=i,Hammer.on(r,"mouseover",function(){C(r)}),Hammer.on(r,"mouseout",function(){$.immediateHide()}),new Hammer(r).on("tap",function(t){t.preventDefault(),S(i),O(i)})}function C(t){var e=$.calculateTooltipDivDim(T,t._title),i=[I.clientWidth/2-(Z-1)/2*16+16*t.i-e.width/2,I.clientHeight-18-e.height];i[0]=Math.min(Math.max(i[0],0),I.clientWidth-e.width),$._show(i,T,t._title)}function L(t,e,i,n){return t.map(function(t,r){return P(t,r,i,n),w(t,e[r],Y[r],r)})}function P(t,i,n,r){var a=e(t),o=N[i];if(Y[i]||(Y[i]=f.create("div","vanchart-chart",U),N[i]=o=f.create("div","vanchart-menu-btn",G),o.mIcon=f.create("span","vanchart-menu-icon",o),o.mText=f.create("span","vanchart-menu-text",o),c.isSupportSVG()||o.insertAdjacentHTML("afterBegin",''),i||(o.style.background=r)),s(o.mIcon,t.chartType,n),o.style.width=100/Z+"%",!c.isSupportSVG()){var h=I.clientWidth/Z;et&&(h-=2*K+1),o.style.width=h+"px",0!==o.offsetTop&&(o.style.width=h-1+"px")}o.mText.textContent?o.mText.textContent=a:o.mText.innerText=a,o._title=a,o.i=i,R(o),Hammer.on(o,"mouseover",function(){o.style.background=r,M(o)}),Hammer.on(o,"mouseout",function(){q!==i&&(o.style.background=""),$.immediateHide()}),new Hammer(o).on("tap",function(t){t.preventDefault(),N[q].style.background="",N[i].style.background=r,O(i)})}function M(t){var e=!1;if(e=c.isSupportSVG()?t.scrollWidth>t.clientWidth:t.scrollWidth>=t.clientWidth,e||""===t.mText.innerHTML){var i=$.calculateTooltipDivDim(T,t._title),n=[I.clientWidth*(t.i+.5)/Z-i.width/2,t.offsetHeight];n[0]=Math.min(Math.max(n[0],0),I.clientWidth-i.width),$._show(n,T,t._title)}}function w(e,i,n,r){if(n.style.width=100/Z+"%",!c.isSupportSVG()||n.offsetLeft=n?(u=h,t.style[e]=u+l):(u=o+(h-o)*r(c/n),t.style[e]=u+l,c+=d,Q=window.setTimeout(a,d))}window.clearTimeout(Q);var o=parseFloat(t.style[e])||0,s=i.match(/([\d.E-]+)(.*)/i),h=+s[1],l=s[2],u=o,c=0,d=17;a()}function D(t){window.clearInterval(j),t&&(j=window.setInterval(function(){var t=(q+1)%Z;S(t,m.RIGHT),O(t)},t))}function R(t){t.clientWidth<=22+3*K&&(t.mText.innerHTML="",t.mText.style.marginLeft=0,et||(t.style.padding=0))}var B=null,I=null,G=null,N=[],H=null,z=null,U=null,F=null,V=null,W=null,X=null,Y=[],q=0,Z=0,j=null,Q=null,K=0,J={left:null,right:null,dom:null},$=new y({},m.TOOLBAR_COMPONENT,{}),tt="transition"in document.getElementsByTagName("body")[0].style,et=/MSIE 7/.test(navigator.userAgent);return{init:g,refresh:u}},C={};C[m.PIE_CHART]=' ',C[m.BAR_CHART]=' ',C[m.COLUMN_CHART]=' ',C[m.LINE_CHART]='',C[m.AREA_CHART]=' ',C[m.GAUGE_CHART]=' ',C[m.RADAR_CHART]=' ',C[m.SCATTER_CHART]=' ',C[m.BUBBLE_CHART]=C[m.FORCE_BUBBLE_CHART]=' ',C[""]=' ',C[m.MULTIPIE_CHART]=' ',C[m.AREA_MAP]=C[m.HEAT_MAP]=C[m.POINT_MAP]='', - C[m.TREEMAP_CHART]=' ',C[m.FUNNEL_CHART]=' ',C[m.GANTT_CHART]=' ',C[m.STRUCTURE_CHART]='';var L={};L[m.PIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAEM/vv4Bgr59AcFAg348jFhddAAAAjElEQVQY02MAArGSDx6JDGDAav//w//PASAmo/5/IPv/JwEgW/g/mP1fEcjWh7I/AVX/h7L/L2AQhrMvMOTD2b8Z6uHsfwz+ULZK1ByG/2B25smtLfYQ9hewLEQNRACoFwZ+AM2EgW9Au2DAkIEVzg6AuO0/xG1wRYpgv0CEBaB+/A/2I8Tv/zVAfgcA4kmspsM258YAAAAASUVORK5CYII=",L[m.BAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAElBMVEUAAAD///////////////////8+Uq06AAAABXRSTlMAQIAgEDB5ccoAAAA+SURBVBjTY0AGoqGhgTjZBICjoKCgCFw9SAMm20hJSUkZlwFwNWAgANELBgrobEdBMDDAZQZEPRQI4GQjAwAQhxXw9o2YjgAAAABJRU5ErkJggg==",L[m.COLUMN_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAG1BMVEUAAAD////////////////////////////////rTT7CAAAACHRSTlMAgEC/IGCPMNAZ/cwAAAAuSURBVBjTY4ADRSEEW6KRALvYDMHWaCbAtmgiwHZSgbOBiG5skJcDRRgcRYEMADB5J9shBWGXAAAAAElFTkSuQmCC",L[m.LINE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMA74C/IM9AEN+vYDCfcFCP7HfXwgAAAG9JREFUGNPNjzsOxDAIRA0Yf+J1du5/2siKIQ1dmlA9PQ2gSa8nHznSBIo0gOgGlAPdm+M4HQuK4Qn8jEU88QdoZw6MZ0+lQ/Li5muDFpYGrokpu9UbJjUmtqaqdQeqAN2aYln7hx41nbwzLDN9Yi4tRQMa2y+S7gAAAABJRU5ErkJggg==",L[m.AREA_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgklEQVR42mL4DwQMtACjBg8zg4FCBhRbiMPg+f8hIIFqBiMZCgMGFBuMxVAQeE+q4UD1AnCDgVT/f9zgPlgxcYaC4uc8Ayws/xMG5wkZDjX0Pdix/0kD8/EY6gAzlByDsRqOzcfkGIySDHEFIyMFGWEClC7AJslIqyw9avAQNhggwABVPsGVrLOsUQAAAABJRU5ErkJggg==",L[m.GAUGE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAgL9A3zAQn89wII/vr2A5/8HrAAAAnUlEQVQY02NAA5kq/52mQZjZ/0FgG4jJ6v/fXbDk/5cAIDvmvzJDKIPR/6MMDGz+HxkYjBkY5L8kMLD/FwCzGf8XMKz/xABmM+j/Ytj/GUjPBGL73wz9DUBaEIg5fjAAlYPYIA0M/ydA2ZxA9gMgfQaI+f5D1NyFqOm/AHUh7w+G/b+g7PXfGeK/Q9n1XxmYtKDsRQoMbHAvJTAQAQCj4DRASabatgAAAABJRU5ErkJggg==",L[m.RADAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAEO+A32DPr7+fQFAwIHCP1A0rdQAAAMpJREFUGNOFUFlyRCEIlEXcfdz/tAHxVSr5mOmyQJu2UdI39Mob/pOjcuOK9KeQmbPJbd3CS3oqblWQVpiqnEx00tYnjlXqemlo+ISqZHhwBN25AOih0aQDGxhNuI2QbmGh16ByKSLT9w/FAw6aar0v89zItKMhqzJan3tf8i4qe3aWvHxLE81LQ5IKZU7nImu2Y3gvhcQjvBGsLHTat9srTZ0n+V8Ap4fuYd+h4rxCMkNp6YIEwhZwNfkdeWG+fxIfxQsQfdHTB/wA4h0GZUKWX6QAAAAASUVORK5CYII=",L[m.SCATTER_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgUlEQVR42mJgGAVA8P//fwFaGFoAxP8ZaWCwAZByGHRhCPYuEKyntsH7oQb/x6WGhUyzF0LpCyMnoRtAkw+6uAMQnwdFIrlhfB5Ko6d3BSA2IDuMgS6aD8T9eDICeV6mNBzn/0eA+dQ0GB1QxeVMtExSDTQJCljBDMQKI7t6AggwAFyzgSCZYutPAAAAAElFTkSuQmCC",L[m.BUBBLE_CHART]=L[m.FORCE_BUBBLE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAnUlEQVR42mJgGAVQwEiswv///ysAqQQodwIjI+MHqrgAaPD7/wiwn1qGOvxHA1QLM1JdzEKC2YbIYUz31AANNgFqG9oPDar3TFR2sAGUFoCnUSCeD4oUKG1AposNgHg9ECdgTUpQEEBpuNzHYfB9Sg3GBwzINZdQ5H0YlEFhgJZd/0P5BhQXm9CckgBNfyDvbwAWiw9GaxWqAIAAAwA2evfwKvysMwAAAABJRU5ErkJggg==",L[""]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAQL/PMBBwgCDvn49gUN+vfvzE8AAAAGJJREFUGNPdjUEOgDAIBFkordpW+f9rNdqUQ3mBeyBhMiwURBNFYQu4HsK60E1aUNAlA+7sUgpQmdXMZh/vDORyPs8cJ+l4T7dEjhsPB8DE+bh0LD4IJkRO3K7Agj/xTzjKDUJoCsaJEKt8AAAAAElFTkSuQmCC",L[m.MULTIPIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMAMpkDn0AnIBSz24Dmv4dKOhoQCuzKrJqMLfnyuaZ5dGZaUkIN0pRsCVisMQAAAOZJREFUGNN90dtygyAUhWHWEhA0Gg8xappz0pb3f8LKdkrTXvS/45s9DHtQL8G6TP0qcxYKS3n2gm0UVX9ugblPatFca63IsX4AfdLtB0nF2BbIhHPcNVkV6jBo8Txqj2bkfheCCmG3eA08ZfhC/RYii483GZ9BDkF4qSBLYGE8NDeJw4mUx+DGlU2ssdY9ZeWrFl7bkHcI48gicUHdCFt4+sRHTrCRHcoT33+GL3Cy+wxPVvHlh4Hcfy/fwXi9nL0ntTfo1JqDmSrGqglxxeQw57Iszwbx4lSWYy3/+2td27ad4D99Ae8gE70h03waAAAAAElFTkSuQmCC",L[m.AREA_MAP]=L[m.HEAT_MAP]=L[m.POINT_MAP]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAA5ElEQVR42mJgGHHg////AkDsAMQK1DZ4/38IeE/QcJACIDYgwlAHqIH/kQxvAOLz2BTPB0kA8X1CLoC6FtlgOEBXiA76QWGIx1cO/7GDfpCCAqjzcYH76MEC4hNQr8CAyys4QANUIzqAmbEe7kMcCkkF76HxooCeDqkB1mNLMtQAAdhyznkqGHwfawoikDKIBQ64EnwA1Ob9aLFNLFBgIDK7CpAQByDHNMD0s+AymJGR8QDUgngiyqIHQHwQiPlJLcHeIwXRe7QI+w/1mQLOMCZU7iKxQWXIfVoU7uS5blADgAADACOwXahZ5pbvAAAAAElFTkSuQmCC",L[m.TREEMAP_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAOUlEQVR42mL8DwQMRABGIAAqnclAJGBioBEYNXjU4FGDh5XBLEDMRyuD1YhUe3Y08kYNHqQGAwQYAL9YCMfrIWhGAAAAAElFTkSuQmCC",L[m.FUNNEL_CHART]="iVBORw0KGgoAAAANSUhEUgAAABcAAAAXBAMAAAASBMmTAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMAQMCAIGAw0FAQ8HCwS1BQUgAAAHVJREFUGNNjwA2Y78LAZQYGDjjnKgMDC5xzDahuLYxzAcjRhXEKgJxEQShIAHIcYRwHIGcvTFkAkOML40wActih7DsgJ3Aj7ETYehPsuloIRwHT3UlKYNAAZMKMuzUBzGFEGAZxKkJ/LojjAOWwGhsbW2CYCwC1z2uuESf9qgAAAABJRU5ErkJggg==",L[m.GANTT_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMABOgQCPvZzN3OhMOofnrCZD03jzDs0ryWiXNsXyUjDd9TUkQqHhgfRKpZAAAAmElEQVQY043P2Q6DIBRF0SsiKMrgXKfamf//w1qxQJo0uh73y8kBmEMDYxyA9SI1WrGB310+R9o4ie7mZW1zeXU5bBuaLKhQfQ4HBB7bgKOGbOJuqL45007G8p3MahJvLmVfLcXAjtncE8BEE3NrZXOhfXv5gXxgzaEH/nu2qZQyXUiajUqNavpdQ5wxVuafXEWWJoJzwYo3Z10TfT0w3LEAAAAASUVORK5CYII=",L[m.STRUCTURE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAhFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8g2+bRAAAAK3RSTlMAA/v3JXcSB9yNRSycF/Dsu7akmJSCTTMOC9HEwKWIWTof4taqoH1wZ1Ydf35d9gAAAO1JREFUGNNVUAlygzAMlA+wMZAQroTc6d3q///rYkHcahikWe+sdkVSitbhOQ2vOyu4/KUyZj4+0ft+gc9sNJdCnBrmSuCCNfuDkDPMHCIlbzS/k1MoUIzhG+D5s/UlKjr6wp6XHJhsHysVxh8K1b3vxJV4bTfM277LV5fSc88aywqalORZHRiGiW2UTfAFGErP9pVbnhz1wvZxT7rSnhEVS6+WqMzGiE7h8TiBzV1Z+fYTUwHcejan2mZDmCN/MPQ2NVEbu+g5oiPkNLQauaBTEvkKtR2mm/R0/3MR7/n9Nhz+xPifP0GL93SGVL8LLRIgop0Y4gAAAABJRU5ErkJggg==";var P="position:absolute;width:1px;height:1px;behavior:url(#default#VML);";return A}),define("VanCharts",["require","./vans/VanChart","./vans/VanChartMap","./vans/VanChartForceBubble","./vans/VanChartWordCloud","./vans/VanChartStructure","./chart/gantt/Gantt","./utils/BaseUtils","./Constants","./utils/LoadingUtils","./Carousel","./vans/VanChartLibrary"],function(t){function e(t){s.initConst();var e=t.getAttribute(h.INSTANCES_KEY);e||(e=h.INSTANCES_KEY+d++,t.setAttribute(h.INSTANCES_KEY,e));var n=f[e]||new i(t);return f[e]=n,n}function i(t){this.dom=t,this.charts=[],this.carousel=u&&u(this),this.dom.style.cssText+=";overflow:hidden;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;",this.dom.onselectstart=this.dom.ondrag=function(){return!1}}function n(t){s.initPaddingScale(t)}function r(t,i){var n,r,o=t.options;try{r=window.top.document,n=window.top}catch(h){n=window,r=n.document}var l=r.body,u=7998;if(null==i)for(var c,d=-1,f=document.body.children.length;++dt;t++)this.charts[t].remove(),this.charts[t]=null},startLoading:function(){this.dom&&l.startLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))},endLoading:function(){this.dom&&l.endLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))}},window.VanCharts={version:"8.5.0",buildTime:"5/9/2017 09:08:58 GMT+0800 (CST)",showLightBox:r,hideLightBox:a,init:e,initPaddingScale:n,acceptPoint:o,instances:f}}),define("chart/Bar",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../utils/BezierEasing","./Series","../ComponentLibrary","../dom/Browser","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../utils/BezierEasing"),a=t("./Series"),o=(t("../ComponentLibrary"),t("../dom/Browser"),400),s=150,h=250,l=6,u=.35,c=1,d=3,f=2,p=a.extend({doLayout:function(){var t=this.getSeriesOffsetAndWidth(),i=this,r=i.vanchart,a=i.type==n.COLUMN_CHART,o=r.isInverted(),s="x",h="y";a||(s="y",h="x");var l=a&&!o||!a&&o,u=i[s+"Axis"],c=i[h+"Axis"],d=c.getZeroPos(),f=0;u.isOnZero()&&(f=u.options.lineWidth),this.points.forEach(function(n){var r=n.options,p=u.scale(u.getAxisValue(r[s],n)),g=c.scale(r[h+"0"]),m=c.getAxisValue(r[h],n)+r[h+"0"],v=c.scale(m-c.getStartPosValue());g===1/0&&(g=c.scale.range()[0]);var _,y,x,b;_=p+t.offset-t.width/2,y=Math.min(g,v),x=t.width,b=Math.abs(g-v),y===d?(y+=f/2,b-=f/2):y+b===d&&(b-=f/2),b=Math.max(b,0);var T={};l?(T.x=_,T.y=y,T.width=x,T.height=b):(T.x=y,T.y=_,T.width=b,T.height=x),n.rect=e.rectSubPixelOpt(T,r.borderWidth),n.rect.rx=n.rect.ry=n.options.borderRadius,n.isNull||i._calculateAnimationInitRect(n,a,o)})},getSeriesOffsetAndWidth:function(){var t=this,i=t.options,n=0,r={},a=0,o=0,s=this.vanchart.seriesOfType(this.type),h=this.getBaseAxisType();s.forEach(function(e){e[h]==t[h]&&e.visible&&(e.stack&&!r[e.stack]?(n++,r[e.stack]=!0,t.stack&&t.stack==e.stack&&(a=n-1)):e.stack||(n++,t==e&&(a=n-1))),e[h]==t[h]&&(o+=e.points.length)});var l=t[h],u=0,c=0;if(l.isCategory()){var d=i.categoryGap,p=i.gap,g=l.getTickLength();d=e.getPercentValue(d,g),u=(g-d)/n,c=d/2+u*(a+.5),p=e.getPercentValue(p,u),u-=p}else{var m=l._getRange();m=Math.abs(m[1]-m[0]),u=m/o/3,c=0}return{width:e.hasDefined(i.width)?i.width:Math.max(u,f),offset:c}},_getPointKey:function(t){return this.type==n.BAR_CHART?t.y:t.x},getTargetKey:function(){return this.type==n.BAR_CHART?"x":"y"},getBaseAxisType:function(){return this.type==n.COLUMN_CHART?"xAxis":"yAxis"},getTrendLineXYValues:function(t){for(var e=[],i=[],r=t.points,a=t.type==n.COLUMN_CHART?t.yAxis:t.xAxis,o=t.type==n.COLUMN_CHART?t.xAxis:t.yAxis,s=o.isHorizontal(),h=a.isAxisReversed(),l=[],u=0,c=r.length;c>u;u++){var d=r[u];!d.isNull&&d.rect&&l.push(d.rect)}return l.sort(function(t,e){return s?t.x-e.x:t.y-e.y}),l.forEach(function(t){var n,r;s?(n=t.x+t.width/2,r=h?t.y+t.height:t.y):(n=h?t.x:t.x+t.width,r=t.y+t.height/2),e.push(n),i.push(r)}),[e,i,o.getPosition()]},_calculateAnimationInitRect:function(t,e,i){var r,a,o=e?"y":"x",s=t.options,h=t.series[o+"Axis"],l=h.getAxisValue(s[o],t),u=h.getStartPos(),c=l>=0,d=e&&!i||!e&&i;d?c^h.isAxisReversed()?(r=n.BOTTOM_TO_TOP,a={x:t.rect.x,y:u,width:t.rect.width,height:0}):(r=n.TOP_TO_BOTTOM,a={x:t.rect.x,y:t.rect.y,width:t.rect.width,height:0}):c^h.isAxisReversed()?(r=n.LEFT_TO_RIGHT,a={x:t.rect.x,y:t.rect.y,width:0,height:t.rect.height}):(r=n.RIGHT_TO_LEFT,a={x:t.rect.x+t.rect.width,y:t.rect.y,width:0,height:t.rect.height}),t.location=r,t.initRect=a},_calculateLabelPos:function(t){var i=this,r=i.points.filter(function(t){return t.visible});r.forEach(function(r){var a=r.options.dataLabels;if(a&&a.enabled){var o;a.align&&(o=i._calculateAlignLabelPos(r,a.align));var s=r.location==n.TOP_TO_BOTTOM||r.location==n.BOTTOM_TO_TOP;a.autoAdjust&&(o=i._calculateAutoLabelPos(r,o,s,t)),o&&(r.labelPos=o,t.addBounds(e.makeBounds(r.labelPos,r.labelDim)))}})},_calculateAlignLabelPos:function(t,e){var i=t.labelDim,r=t.rect,a=this.vanchart.bounds,o=(a.width,a.height,t.location==n.TOP_TO_BOTTOM||t.location==n.BOTTOM_TO_TOP),s=t.location==n.BOTTOM_TO_TOP||t.location==n.LEFT_TO_RIGHT,h=r.x+r.width/2,l=r.y+r.height/2;if(i){var u,c;switch(e){case n.CENTER:u=h-i.width/2,c=l-i.height/2;break;case n.INSIDE:o?(u=h-i.width/2,c=s?r.y+d:r.y+r.height-d-i.height):(c=l-i.height/2,u=s?r.x+r.width-d-i.width:r.x+d);break;case n.OUTSIDE:o?(u=h-i.width/2,c=s?r.y-d-i.height:r.y+r.height+d):(c=l-i.height/2,u=s?r.x+r.width+d:r.x-d-i.width)}return{x:u,y:c}}},_getMoreLabelDefaultCenter:function(t,e){var i=this.type==n.COLUMN_CHART,r=this.vanchart.isInverted();return i&&!r||!i&&r?{centerX:t.rect.x+t.rect.width/2,centerY:t.rect.y-e.height/2}:{centerX:t.rect.x+t.rect.width+e.width/2,centerY:t.rect.y+t.rect.height/2}}});return p.include({_getFixedPos:function(t,e){var i,r,a=this.vanchart.bounds,o=t.rect;return 0===t.initRect.height?(i=a.x+o.x+o.width+c,r=t.location==n.BOTTOM_TO_TOP?a.y+o.y:a.y+o.y+o.height):(r=a.y+o.y+o.height+c,i=t.location==n.LEFT_TO_RIGHT?a.x+o.x+o.width-e.width:a.x+o.x-e.width),[i,r]},getPointGraphicKey:function(){return"rect"},getFillFilter:function(t,r){if(e.isSupportSVG()){var a=this,o=r.options,s=a.vanchart,h=s.renderer;if(o.image){var l,u,c=r.rect;switch(r.location){case n.BOTTOM_TO_TOP:l=c.x,u=c.y+c.height%o.imageHeight;break;case n.TOP_TO_BOTTOM:case n.LEFT_TO_RIGHT:l=c.x,u=c.y;break;case n.RIGHT_TO_LEFT:l=c.x+c.width%o.imageWidth,u=c.y}var d={x:l,y:u,width:o.imageWidth,height:o.imageHeight,patternUnits:"userSpaceOnUse"},f={x:0,y:0,width:o.imageWidth,height:o.imageHeight};return r.imagePattern?h.updateImagePattern(r.imagePattern,d,f,r.options.image):r.imagePattern=h.imagePattern(d,f,r.options.image),"url(#"+e.stamp(r.imagePattern)+")"}if(s.options.style==n.STYLE_GRADUAL){var p,g,m,v;switch(p=g=m=v="0%",r.location){case n.BOTTOM_TO_TOP:g="100%";break;case n.TOP_TO_BOTTOM:v="100%";break;case n.LEFT_TO_RIGHT:m="100%";break;case n.RIGHT_TO_LEFT:p="100%"}var _={x1:p,y1:g,x2:m,y2:v},y={offset:"0%","stop-color":t},x={offset:"100%","stop-color":i.getColorWithDivider(t,.9)};return r.colorGradient?h.updateColorGradient(r.colorGradient,_,[y,x]):r.colorGradient=h.colorGradient(_,[y,x]),"url(#"+e.stamp(r.colorGradient)+")"}}return t},_calculateAnimationDelay:function(){if(this.stack)return 0;if(this.state==n.STATE_SHOW){for(var t=this.vanchart.seriesOfType(this.type),e=0,i=t.length;i>e;e++)if(t[e].state==n.STATE_TO_DROP)return s}else if(this.state==n.STATE_TO_SHOW)return h;return 0},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:r.css.swing,duration:o,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:r.css.swing,duration:h,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:r.css.swing,duration:s,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},effectAnimation:function(t){function e(){return l.rect().addTo(u).attr(c).style(d)}function i(t){return.5*f*t}function r(t){return 0>t?0:t}function a(t,e,n){t.style(d).effectTransition().delay(e).ease("linear").duration(n).styleTween("stroke-opacity",function(){return function(t){return.8*(1-t)}}).styleTween("stroke-width",function(){return i}).attrTween("x",function(){return function(t){return c.x-i(t)/2+1}}).attrTween("y",function(){return function(t){return c.y-i(t)/2+1}}).attrTween("width",function(){return function(t){return r(c.width+i(t)-2)}}).attrTween("height",function(){return function(t){return r(c.height+i(t)-2)}})}var o=t.options,s=t.series,h=s.vanchart,l=h.renderer;if(!o.image){var u=s._getPointEffectGroup(t),c=t.rect,d={fill:"none",stroke:t.color,"stroke-opacity":0,"stroke-width":0},f=t.location===n.BOTTOM_TO_TOP||t.location===n.TOP_TO_BOTTOM?c.width:c.height,p=u.firstG=u.firstG||e(),g=u.secondG=u.secondG||e(),m=u.thirdG=u.thirdG||e(),v=s._getEffectTime(t),_=v/s.getDefaultEffectTime();a(p,0,1600*_),a(g,600*_,1600*_),a(m,1200*_,1600*_)}},getDefaultEffectTime:function(){return 2800},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t),"fill-opacity":t.opacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}}}),t("../ChartLibrary").register(n.BAR_CHART,p),t("../ChartLibrary").register(n.COLUMN_CHART,p),p}),define("chart/PieSeries",["require","../utils/BaseUtils","./Series"],function(t){var e=t("../utils/BaseUtils"),i=t("./Series"),n=2,r=[.9,.85,.8,.75,.7,.65,.6,.55,.5],a="right-top",o="right-bottom",s="left-top",h="left-bottom",l=Math.PI/180;return{calcOutsideLabel:function(t,e,i,n){var a=this,o={};if(t.map(function(t){var e=a.getLocByArc(a.getCenterAngle(t));o[e]=o[e]||[],o[e].push(t)}),n)return o=a.ignoreMin(o,n),a.placeOutSideLabels(o,n),n;n=Math.min(i[0]-e.x,e.x+e.width-i[0],i[1]-e.y,e.y+e.height-i[1]);for(var s=0,h=r.length;h>s;s++){var l=n*r[s],u=a.ignoreMin(o,l);if(a.placeOutSideLabels(u,l),a.testWithinBounds(u,i,e))break}return l},calculateInsideLabelBounds:function(t){var e=this;t.map(function(i,n){var r=t[n],a=e.getCenterAngle(r),o=e._getInnerRadius(r),s=e._getOuterRadius(r),h=o+(s-o)/2,l=e._getArcPoint(h,a),u=l[0]-r.labelDim.width/2,c=l[1]-r.labelDim.height/2;r.labelPos={x:u,y:c}})},calculateLeadLineStartPos:function(t){var e=this;t.map(function(t){var i=e._getOuterRadius(t),n=e.getCenterAngle(t);t.labelPos&&(t.labelPos.startPos={x:(i+1)*Math.sin(n),y:(i+1)*Math.cos(n+Math.PI)})})},getCenterAngle:function(t){var i=this.chartInfo.rotate||0,n=i+(this._getStartAngle(t)+this._getEndAngle(t))/2;return e.makeValueInRange(0,2*Math.PI,n)},getLocByArc:function(t){return t%=2*Math.PI,tn;n++){var a=e[n].labelDim;i+=a.height}if(i>1.2*t){var o=i-1.2*t;e.sort(function(t,e){return t.value-e.value});for(var n=0,r=e.length;r>n&&!(0>o);n++){var s=e[n].labelDim.height;o-=s}e=e.slice(n,e.length)}var h=this;return e.sort(function(t,e){return h.getCenterAngle(t)-h.getCenterAngle(e)}),e},placeOutSideLabels:function(t,e){var i=this;Object.keys(t).map(function(n){i.findNiceBounds(!0,t[n],e,n)||i.findNiceBounds(!1,t[n],e,n)})},findNiceBounds:function(t,e,i,n){var r,s,h=1.2*i,u=.1*i,c=this._getStartAndEndAngle(n),d=t?c.endAngle:c.startAngle,f=t?l:-l;e.map(function(t){t.labelPos=null});for(var p=0,g=e.length;g>p;p++){var m=t?p:g-p-1,v=t?Math.max:Math.min,_=e[m],y=_.labelDim,x=this.getCenterAngle(_);x=s?v(x,s):x;for(var b=!1,T=x;t?d>T:T>d;T+=f){var A=h*Math.sin(T),C=h*Math.cos(T+Math.PI),L=this._getLabelBounds(n,A,C,u,y);if(r?!this._isOverlapOrShadow(r,L):!0){b=!0,s=T;break}}if(!b)return!1;var P,M={x:A,y:C};P=n==a||n==o?{x:A+u,y:C}:{x:A-u,y:C},r=L,_.labelPos={x:L.x,y:L.y,midPos:M,endPos:P}}return!0},_getStartAndEndAngle:function(t){switch(t){case a:return{startAngle:0,endAngle:Math.PI/2};case o:return{startAngle:Math.PI/2,endAngle:Math.PI};case h:return{startAngle:Math.PI,endAngle:3*Math.PI/2};case s:return{startAngle:3*Math.PI/2,endAngle:2*Math.PI}}},_getLabelBounds:function(t,e,i,r,s){var h,l;return h=t==a||t==o?e+r+n:e-r-n-s.width,l=i-s.height/2,{x:h,y:l,width:s.width,height:s.height}},_isOverlapOrShadow:function(t,i){var n=Math.max(t.y,i.y),r=Math.min(t.y+t.height/2,i.y+i.height/2),a=Math.max(t.y+t.height/2,i.y+i.height/2),o=Math.min(t.y+t.height,i.y+i.height);return e.rectangleOverlapped(t,i)||r>=n||o>=a},testWithinBounds:function(t,i,n){for(var r in t){var l,u,c,d,f;switch(u=c=0,r){case a:case o:c=n.y-i[1],d=n.width+n.x-i[0],f=n.height;break;case h:case s:u=n.x-i[0],c=n.y-i[1],d=-u,f=n.height}l={x:u,y:c,width:d,height:f};for(var p=0;p=Math.PI&&a<3*Math.PI/2?s-=e.width:a>=3*Math.PI/2&&c>a&&(h-=e.height,s-=e.width),[s,h]},_calculateLabelPos:function(){for(var t=this.options.roseType,e=this.points.filter(function(t){return t.visible}),n=[],r=[],a=0,o=e.length;o>a;a++){var s=e[a],h=s.options.dataLabels;s.visible&&h&&h.enabled&&(h.align==i.OUTSIDE?n.push(s):r.push(s))}this._calculateOutsideLabelBounds(n),this.options.radius||(r.length&&!n.length||!r.length&&!n.length)&&(this.chartInfo.radius=this.chartInfo.radius/d-f);var l=this.options.innerRadius,u=this.chartInfo.radius;if(l&&(l="string"==typeof l&&-1!=l.indexOf("%")?parseFloat(l)*u/100:parseFloat(l)),this.chartInfo.innerRadius=l,this.points.forEach(function(t){t.innerRadius=l}),t){var c=u-l,p=0;e.forEach(function(t){p=Math.max(p,Math.abs(t.getTargetValue()))});var g=c/p;(isNaN(g)||!isFinite(g))&&(g=0),e.forEach(function(t){t.outerRadius=l+g*Math.abs(t.getTargetValue())})}else e.forEach(function(t){t.outerRadius=u});this.calculateLeadLineStartPos(n),this.calculateInsideLabelBounds(r)},_calculateLabelPosWhenRadiusFixed:function(){for(var t=this.points.filter(function(t){return t.visible}),e=[],n=[],r=0,a=t.length;a>r;r++){var o=t[r],s=o.options.dataLabels;s&&s.enabled&&(s.align==i.OUTSIDE?e.push(o):n.push(o))}this._calculateLabelBoundsForFixed([this.chartInfo.centerX,this.chartInfo.centerY],this.chartInfo.radius,e),this.calculateLeadLineStartPos(e),this.calculateInsideLabelBounds(n)},_calculateOutsideLabelBounds:function(t){if(t.length){t.forEach(function(t){t.labelPos=null});var e=this.chartInfo,i=e.radius,n=[e.centerX,e.centerY];this.options.radius?this.calcOutsideLabel(t,this.bounds,n,i):this.chartInfo.radius=this.calcOutsideLabel(t,this.bounds,n)}},_calculateLabelBoundsForFixed:function(t,e,i){var n=this.chartInfo,e=n.radius,t=[n.centerX,n.centerY];this.calcOutsideLabel(i,this.bounds,t,e)},_calculateSeriesBounds:function(){for(var t=this.vanchart.seriesOfType(i.PIE_CHART),e=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].options.center&&t[r].options.radius&&n++;for(var o=e.width/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.options.center)return{x:e.x+r*o,y:e.y,width:o,height:e.height}},_getTranslate:function(){return[this.chartInfo.centerX,this.chartInfo.centerY]},_getArcData:function(t){return n.hasDefined(t.startAngle)?{startAngle:t.startAngle,endAngle:t.endAngle,outerRadius:t.outerRadius}:void 0},_getMoreLabelDefaultCenter:function(t,e){var i=this.getCenterAngle(t),n=t.series.chartInfo.innerRadius+(t.outerRadius-t.series.chartInfo.innerRadius)/2,r=this._getArcPoint(n,i);return{centerX:r[0],centerY:r[1]}},effectAnimation:function(t){h.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return h.AREA_STYLE_EFFECT_TIME},getHighLightStyle:function(t){return{fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getPressedStyle:function(t){return{fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getAttrs:function(t){var e=l.arc().innerRadius(t.innerRadius);return{d:e(this._getArcData(t))}},getPointGraphicKey:function(){return"path"},_calculateAnimationDelay:function(){for(var t=0,e=0,i=0,n=this.points.length;n>i;i++){var r=this.points[i];r.visible&&r.series.visible&&t++,r.graphic&&e++}return e==t?0:1},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},getPointInitAnimationAttr:function(t){var e=t.series,i=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var n={startAngle:e.startAngle,endAngle:e.startAngle,outerRadius:t.outerRadius};if(!e.initialAnimationMoving){var r=e.getPreVisiblePoint(t);if("first"!=r&&r.lastShape){var a=Math.abs(r.lastShape.endAngle-r.endAngle),o=t.startAngle+a;n={startAngle:o,endAngle:o,outerRadius:t.outerRadius}}}var s=u(n,e._getArcData(t));return this._current_=s(1),function(t){return i(s(t))}}}}},getPointUpdateAnimationAttr:function(t,e){var i=t.series,n=l.arc().innerRadius(i.chartInfo.innerRadius),r=g,a=p;return e||(r=m,a=v),{ease:r,duration:a,attrTween:{d:function(){var e=i._getArcData(t),r=this._current_||e,a=u(r,e);return this._current_=a(1),function(t){return n(a(t))}}}}},getPointDropAnimationAttr:function(t){var e=t.series,i=(e.options,e.startAngle),n=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var r=this._current_,a=e.getPreVisiblePoint(t),o=i;if("first"!=a&&a.lastShape){var s=Math.abs(a.lastShape.endAngle-a.endAngle);o=t.startAngle+s}var h={startAngle:o,endAngle:o,outerRadius:r.outerRadius},l=u(r,h);return this._current_=l(1),function(t){return n(l(t))}}}}},getPreVisiblePoint:function(t){for(var e=t.series.points,i="first",n=0,r=e.length;r>n;n++){if(e[n]==t)return i;e[n].visible&&(i=e[n])}return i},getFillFilter:function(t,e){var a=this,o=a.vanchart.options;if(o.style==i.STYLE_GRADUAL&&n.isSupportSVG()){var a=this,s=a.vanchart,h=s.renderer,l={cx:"0%",cy:"0%",r:Math.max(e.outerRadius,0)+"px",gradientUnits:"userSpaceOnUse"},u={offset:e.innerRadius/Math.max(e.outerRadius,1)*100+"%","stop-color":r.getColorWithDivider(t,.8)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c],"radialGradient"),"url(#"+n.stamp(e.colorGradient)+")"}return t},_onPointMouseOver:function(t){this._onState(t,!0)},_onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){var n=this,r=l.arc().innerRadius(t.innerRadius),a=e?n.getHighLightStyle(t):n.getStyle(t),o=t.outerRadius*d,s=t.outerRadius;e&&(o=t.outerRadius,s=t.outerRadius*d);var h=u(o,s),c={startAngle:t.startAngle,endAngle:t.endAngle};t.graphic.style(a).interrupt(i.SELECT_ANIMATION).transition(i.SELECT_ANIMATION).animate({ease:"elastic",duration:800,attrTween:{d:function(){return function(t){return r.outerRadius(h(t))(c)}}}})},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.vanchart.renderer.group().addTo(this.group)),this.pathGroup},_getPointTextLabelGroup:function(){return this.textLabelGroup||(this.textLabelGroup=this.vanchart.renderer.vgroup().add(),this.group.append(this.textLabelGroup.renderG),this.textLabelGroup.divG.attr("transform",n.makeTranslate(this._getTranslate()))),this.textLabelGroup},isSeriesAccumulated:function(){return!0}});return _.include(o),t("../ChartLibrary").register(i.PIE_CHART,_),_}),define("chart/Line",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../utils/Class","../utils/BezierEasing","../utils/ColorUtils","../dom/DomUtils","../EffectHelper","../utils/PathGenerator","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../utils/Class"),a=t("../utils/BezierEasing"),o=t("../utils/ColorUtils"),s=t("../dom/DomUtils"),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=2,c=800,d=250,f=.65,p="quad-in-out",g=a.css.swing,m=function(t){var e=t.indexFromLeft/t.series.points.length;return c*(.5>e?Math.sqrt(e/2):1-Math.sqrt(2-2*e)/2)},v=n.extend({doLayout:function(){var t,e=this,i=e.vanchart,n=e.xAxis,r=e.yAxis,a=e.options.connectNulls,o=n.scale.rangeBand?n.scale.rangeBand()/2:0,s=i.isInverted(),h=s?"posY":"posX",u=r.getStartPosValue(),c=[];if(this.options.large){var d={},f={};e.points.forEach(function(e){t=e.options;var i=n.scale(n.getAxisValue(t.x,e))+o,a=r.scale(r.getAxisValue(t.y,e)+t.y0-u),h=r.scale(t.y0);isFinite(a)||(e.isNull=!0),s?(e.posX=a,e.posY=i,e.posX0=h):(e.posX=i,e.posY=a,e.posY0=h),d[e.posX]&&f[e.posY]||(d[e.posX]=!0,f[e.posY]=!0,c.push(e))},this)}else c=e.points;var p=!0,g=[];e.y0=Number.MAX_VALUE,e.y=-Number.MAX_VALUE,c.forEach(function(i,l){if(t=i.options,this.options.large)c=i.posX,d=i.posY;else{var c=n.scale(n.getAxisValue(t.x,i))+o,d=r.scale(r.getAxisValue(t.y,i)+t.y0-u),f=r.scale(t.y0);s?(i.posX=d,i.posY=c,i.posX0=f):(i.posX=c,i.posY=d,i.posY0=f)}i.indexFromLeft=l,(!a||a&&!i.isNull)&&(g.length>0&&(p=p&&g[g.length-1][h]<=(s?d:c)),g.push(i)),Math.abs(t.y0)e.y&&(e.y=Math.abs(t.y+t.y0))},this),p||(g.sort(function(t,e){return t[h]-e[h]}),g.forEach(function(t,e){t.indexFromLeft=e}));var m=l.line().interpolate(e.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull}),v=l.area().interpolate(e.interpolate);v=s?v.y(function(t){return t.posY}).x0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posX:t.posX0}).x1(function(t){return t.posX}):v.x(function(t){return t.posX}).y0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posY:t.posY0}).y1(function(t){return t.posY}),v=v.defined(function(t){return!t.isNull}),this.linePath=m(g),this.areaPath=v(g),this.dataBands=this._calculateDataBands()},_getPreviousStackingPoint:function(t){if(i.hasDefined(t.series.stack))for(var e=t.points,n=0,r=e.length;r>n;n++){var a=e[n].series;if(a.stack==t.series.stack&&a.visible&&e[n+1]==t)return e[n]}},_calculateDataBands:function(){var t=this.vanchart.bounds,e=this,i=this.options.bands||[],n=e.color,r=e.opacity,a=e.fillColor,o=e.fillColorOpacity,s=e.yAxis,h=s.scale.domain(),l=s.isHorizontal(),u=t.width,c=t.height,d=[];if(d.push({clipBounds:{x:0,y:0,width:u,height:c},color:n,fillColor:a,fillColorOpacity:o}),!i||!i.length)return d;for(var f=0,p=i.length;p>f;f++){var g=Math.max(h[0],i[f].from),m=Math.min(h[1],i[f].to);g=s.scale(g),m=s.scale(m);var v={x:0,y:Math.min(g,m),width:u,height:Math.abs(g-m)};l&&(v={x:Math.min(g,m),y:0,width:Math.abs(g-m),height:c}),d.push({clipBounds:v,color:i[f].color||n,opacity:i[f].opacity||r,fillColor:i[f].fillColor||a,fillColorOpacity:i[f].fillColorOpacity||o})}return d},_getFixedPos:function(t){var e=t.options.marker.radius||4.5,i=this.vanchart.bounds,n=i.x+t.posX+e,r=i.y+t.posY+e;return[n,r]},_calculateLabelPos:function(t){var n=this,r=this.vanchart.isInverted(),a=(n.points.length,this.vanchart.bounds);n.points.forEach(function(o,s){var h=o.options.dataLabels;if(h&&h.enabled){var l,c,d,f=h.align==e.TOP,p=o.labelDim,g=u;if(!p)return;var m=o.options.marker;m&&m.symbol&&(g+=m.radius||4.5),r?(c=f?o.posX+g:o.posX-g-p.width,d=o.posY-p.height/2,0>=d?d=o.posY:d+p.height>=a.height&&(d=o.posY-p.height)):(c=o.posX-p.width/2,d=f?o.posY-g-p.height:o.posY+g,0>=c?c=o.posX:c+p.width>=a.width&&(c=o.posX-p.width)),l={x:c,y:d},h.autoAdjust&&(l=n._calculateAutoLabelPos(o,l,!r,t)),l&&(o.labelPos=l,t.addBounds(i.makeBounds(o.labelPos,o.labelDim)))}})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},getAttrs:function(t){return{transform:i.makeTranslate([t.posX,t.posY])}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){h.markerEffectAnimation(t)},getDefaultEffectTime:function(){return h.MARKER_EFFECT_TIME},getHighLightStyle:function(){},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},_updatePointGraphicStyle:function(t){this._updateMarker(t)},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return[{delay:m(t),ease:"ease-out-in",duration:150,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1.5)"}},{duration:150,ease:"ease-out-in",attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}]},getPointUpdateAnimationAttr:function(t){return{ease:g,duration:d,attr:{transform:"translate("+t.posX+","+t.posY+")"}}},getClosestPoint:function(t){var e,i=this.vanchart.isInverted(),n=i?"y":"x",r=i?"posY":"posX",a=Number.MAX_VALUE,o=this.vanchart.hoverSeries,s=this.vanchart.bounds,h=s[n]-(i?t.y:t.x);return o.points.forEach(function(t){var i=Math.abs(t[r]+h);a>i&&!t.isNull&&(e=t,a=i)}),e},_onSeriesMouseOver:function(t){n.prototype._onSeriesMouseOver.call(this,t),this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOver()}),i.toFront(this.group.node())},_onSeriesMouseOut:function(t){this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOut()}),this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null},drawPoints:function(){n.prototype.drawPoints.call(this);for(var t=this.dataBandsGraphic.length-1;t>=0;t--)this.dataBandsGraphic[t].toBack()},drawSeries:function(){var t,e,i=this,n=this.vanchart,r=(n.renderer,this.dataBands);for(this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,this.dataBandsGraphic=this.dataBandsGraphic||[],t=r.length,e=this.dataBandsGraphic.length;e>t;t++)this.dataBandsGraphic[t].remove(),this.dataBandsGraphic[t]=null;for(t=0,e=r.length;e>t;t++)this.dataBandsGraphic[t]?this.dataBandsGraphic[t].refresh(r[t]):this.dataBandsGraphic[t]=new _(r[t],i);this.dataBandsGraphic.length=r.length}}),_=r.extend({initialize:function(t,e){this.series=e,this.refresh(t)},refresh:function(t){this.options=t,this.render()},render:function(){var t=this.options,n=this.series,r=n.group,a=n.vanchart,o=a.renderer,s=this._getLineStyle(n,t),h=this._getAreaStyle(n,t),l=i.isSupportSVG(),u=t.clipBounds,f=n.type==e.AREA_CHART,m=!this.linePath||this.linePath.removed();return this.clipRect?o.updateClip(this.clipRect,u):this.clipRect=o.createClip({x:u.x,y:u.y,width:u.width,height:u.height}),n.visible?(this.linePath=this.linePath||o.path().attr("d",n.linePath).addTo(r),this.linePath.style(s),this.linePath.isLineChart=!0,l&&o.clip(this.linePath,this.clipRect),f&&(this.areaPath=this.areaPath||o.path().attr("d",n.areaPath),this.areaPath.style(h).addTo(r),this.areaPath.isLineChart=!0,l&&o.clip(this.areaPath,this.clipRect)),void(m?(this.linePath.attr("d",n.linePath),this.areaPath&&this.areaPath.attr("d",n.areaPath),l&&this.clipRect.rect.attr(a.isInverted()?"height":"width",0).animate({ease:p,duration:c,attr:u})):(this.linePath.animate({ease:g,duration:d,attr:{d:n.linePath}}),this.areaPath&&this.areaPath.animate({ease:g,duration:d,attr:{d:n.areaPath}}),l&&this.clipRect.rect.animate({ease:g,duration:d,attr:u})))):(this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),void(this.linePath=this.areaPath=null))},toBack:function(){s.toBack(this.linePath&&this.linePath.node()),s.toBack(this.areaPath&&this.areaPath.node())},_getAreaStyle:function(t,i){var n,r,a=t.vanchart.highlightTarget;return a?(n=i.fillColor,r=a==t.name?1:.3):(n=this._getFillFilter(i.fillColor,t),r=t.vanchart.options.style==e.STYLE_GRADUAL?1:i.fillColorOpacity),{fill:n,"fill-opacity":r}},_getLineStyle:function(t,e){var i=e.opacity,n=t.vanchart.highlightTarget;return n&&(i=n==t.name?1:.3),{fill:"none",stroke:e.color,"stroke-width":t.options.lineWidth,"stroke-opacity":i}},_getFillFilter:function(t,n){if(i.isSupportSVG()){var r=n.vanchart,a=r.renderer,o=n.vanchart.options;if(o.style==e.STYLE_GRADUAL){var s,h,l,u;s=h=l=u="0%";var c=Math.abs(n.y)/Math.abs(n.y-n.y0)||0;r.isInverted()===!0?(s=100*(1-c)+"%",l="100%"):h=100*c+"%";var d={x1:s,y1:h,x2:l,y2:u},f={offset:"0%","stop-color":t,"stop-opacity":0},p={offset:"100%","stop-color":t,"stop-opacity":.8};return this.colorGradient?a.updateColorGradient(this.colorGradient,d,[f,p]):this.colorGradient=a.colorGradient(d,[f,p]),"url(#"+i.stamp(this.colorGradient)+")"}}return t},_onSeriesMouseOver:function(){this.linePath.style({stroke:o.getHighLightColor(this.options.color),"stroke-width":this.series.options.lineWidth+1}),this.series.type==e.AREA_CHART&&this.areaPath.style({fill:o.getHighLightColor(this.options.fillColor),"fill-opacity":0===this.options.fillColorOpacity?0:f})},_onSeriesMouseOut:function(){this.linePath&&this.linePath.style(this._getLineStyle(this.series,this.options)),this.areaPath&&this.areaPath.style(this._getAreaStyle(this.series,this.options))},remove:function(){this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),this.clipRect&&this.clipRect.remove(),this.linePath=this.areaPath=this.clipRect=null}});return t("../ChartLibrary").register(e.LINE_CHART,v),t("../ChartLibrary").register(e.AREA_CHART,v),v}),define("chart/Radar",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../utils/BoundsManager"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this.columnType=this.options.columnType,this.stack=this.columnType?"radar-column"+this.options.stack:this.options.stack,this},_getAxisTypes:function(){return["angleAxis","radiusAxis","polar"]},getBaseAxisType:function(){return"angleAxis"},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e.polar);r&&(r.series.push(t),t[n]=r)}})},_getDefaultFillColorOpacity:function(){return this.options.columnType?1:.15},_getTranslate:function(){return this.getCenter()},getCenter:function(){return this.polar&&this.polar.center},getRadius:function(){return this.polar&&this.polar.radius},doLayout:function(){var t=this,e=t.polar,i=e.radiusAxis,n=e.angleAxis,r=(this.getCenter(),this.getRadius(),n.piece),a=i.scale,o=n.scale,s=i.indicator,h=function(t){return isNaN(a(t))?0:a(t)};t.points.sort(function(t,e){return o(t.category)-o(e.category)});var l;t.points.forEach(function(e){l=e.options;var n=e.category,a=l.y0,u=e.value+l.y0;e.innerRadius=s?t._cateValueScale(n,a):h(a),e.outerRadius=s?t._cateValueScale(n,u):h(u),e.animateInitRadius=i.getStartPos(),e.radian=o(e.category)*r;var c=t._getArcPoint(e.outerRadius,e.radian);e.posX=c[0],e.posY=c[1],this._calcLabelPos(e)},this),t.pathSegment=t._getPathSegment(t.points,t.options.connectNulls)},_calculateLabelPos:function(){},getTargetKey:function(){return"y"},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getPathSegment:function(t,e){var i=this,n=i.polar,r=n.angleAxis,a=r.scale;t=[].concat(t),t.sort(function(t,e){return a(t.category)-a(e.category)});var o=[],s=[];if(e)o.push(s),t.forEach(function(t){t.isNull||s.push([t.posX,t.posY])});else{for(var h=0,l=t.length,u=l-1;u>0;u--){var c=t[u],d=t[u-1];!c.isNull&&d.isNull&&(h=u)}for(var u=0;l>u;u++){var f=t[(u+h)%l];f.isNull&&s.length?(s.length>1&&o.push(s),s=[]):f.isNull||s.push([f.posX,f.posY])}s.length&&o.push(s)}return o},_getRadarSeriesPath:function(t,e,n){var r="",a=[];if(1===t.length){a=t[0];var o=a.length==this.angleAxis.getCategoryCount()||e;n=!o&&n,r=n?"M0,0":"";for(var s=0,h=a.length;h>s;s++){var l=s||n?"L":"M";r+=l+i.dealFloatPrecision(a[s][0])+","+i.dealFloatPrecision(a[s][1])}r+=o||n?"Z":""}else t.forEach(function(t){r+=n?"M0,0":"",t.forEach(function(t,e){r+=(e||n?"L":"M")+i.dealFloatPrecision(t[0])+","+i.dealFloatPrecision(t[1])}),r+=n?"Z":""});return r},_getInitPathSegment:function(t){var e=[];return t.forEach(function(t){var i=[];e.push(i),t.forEach(function(){i.push([0,0])})}),e},_cateValueScale:function(t,e){var i,n=this,r=n.radiusAxis,a=r._cateScale;return r._cateDomain.forEach(function(e){e.name===t&&(i=e.domain)}),a.domain(i),isNaN(a(e))?0:a(e)}}));return n}),define("chart/LineRadar",["require","../utils/BaseUtils","../dom/DomUtils","../EffectHelper","../utils/Interpolator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../dom/DomUtils"),n=t("../EffectHelper"),r=t("../utils/Interpolator"),a=t("../Constants"),o=t("./Radar"),s=500,h="back-out",l=500,u="exp-out",c="radar-top",d="radar-bottom",f="radar-left",p="radar-right",g=8,m=o.extend({columnType:!1,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius+g,t.radian),n=t.labelDim;switch(e){case c:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2};break;case d:t.labelPos={x:-n.width/2,y:i[1]};break;case f:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},drawPoints:function(){o.prototype.drawPoints.call(this),i.toBack(this.radarPath&&this.radarPath.node())},drawSeries:function(){this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null;var t=this,e=t.vanchart,i=e.renderer,n=t.fillColor&&t.fillColorOpacity,a=this._getRadarPathStyle();t.visible?(this.radarPath=this.radarPath||i.path().addTo(t.group),this.radarPath.style(a),this.radarPath.animate({duration:s,ease:h,attrTween:{d:function(){var e=!!this._pathSegment_;if(e&&this._pathSegment_.length==t.pathSegment.length)for(var i=this._pathSegment_,a=0,o=i.length;o>a&&e;a++)i[a].length!=t.pathSegment[a].length&&(e=!1);var s=e?this._pathSegment_:t._getInitPathSegment(t.pathSegment),h=r.interpolateArray(s,t.pathSegment);return this._pathSegment_=t.pathSegment,function(e){return t._getRadarSeriesPath(h(e),t.options.connectNulls,n)}}}})):(this.radarPath&&this.radarPath.animate({duration:l,ease:u,attrTween:{d:function(){var e=t._getInitPathSegment(t.pathSegment),i=r.interpolateArray(t.pathSegment,e);return function(e){return t._getRadarSeriesPath(i(e),t.options.connectNulls,n)}}}}).remove(),this.radarPath=null)},_getRadarPathStyle:function(){var t=this,e=t.fillColor&&t.fillColorOpacity,i=t.fillColorOpacity,n=t.opacity,r=t.vanchart.highlightTarget;return r&&(i=r==t.name?1:.3,n=r==t.name?1:.3),{fill:e?t.fillColor:"none","fill-opacity":i,stroke:t.color,"stroke-width":t.options.lineWidth,"stroke-opacity":n}},getStyle:function(){return{}},effectAnimation:function(t){n.markerEffectAnimation(t)},getDefaultEffectTime:function(){return n.MARKER_EFFECT_TIME},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},_updatePointGraphicStyle:function(t){this._updateMarker(t)},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_calculateLabelPos:function(){},_getFixedPos:function(t){var e,i,n=isNaN(t.options.marker.radius)?4.5:t.options.marker.radius,r=this.getCenter();return e=r[0]+t.posX+n,i=r[1]+t.posY+n,[e,i]},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var i=this;i.radarPath&&i.radarPath.style({"stroke-width":i.options.lineWidth+1}),e.toFront(i.group.node())},_onSeriesMouseOut:function(){var t=this;this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,t.radarPath&&t.radarPath.style(t._getRadarPathStyle())},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(){return{transform:"translate(0, 0) scale(0.01)"}},getPointInitAnimationAttr:function(t){return{duration:s,ease:h,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:h,duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},getClosestPoint:function(t){var e,i=this.getCenter(),n=Number.MAX_VALUE;return this.points.forEach(function(r){var a=r.posX+i[0]-t.x,o=r.posY+i[1]-t.y,s=Math.sqrt(a*a+o*o);n>s&&!r.isNull&&(e=r,n=s)}),e}});return t("../ChartLibrary").register(a.LINE_RADAR,m),m}),define("chart/ColumnRadar",["require","../EffectHelper","../utils/Interpolator","../utils/PathGenerator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../EffectHelper"),i=t("../utils/Interpolator"),n=t("../utils/PathGenerator"),r=t("../Constants"),a=t("./Radar"),o=500,s="back-out",h=500,l="exp-out",u=6,c=.35,d="radar-top",f="radar-bottom",p="radar-left",g="radar-right",m=8,v=a.extend({columnType:!0,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius-m,t.radian),n=t.labelDim;switch(e){case d:t.labelPos={x:-n.width/2,y:i[1]};break;case g:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2};break;case f:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t){var e=this._getArcPoint(t.outerRadius/2,t.radian);return{centerX:e[0],centerY:e[1]}},effectAnimation:function(t){e.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return e.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{fill:t.color,"fill-opacity":t.opacity,stroke:t.borderColor,"stroke-width":t.options.borderWidth,"stroke-opacity":1}},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.color,"fill-opacity":1,"stroke-width":u,"stroke-opacity":c}},getPressedStyle:function(t){return{fill:t.clickColor,"fill-opacity":t.clickOpacity}},getPointGraphicKey:function(){return"path"},_getRadarColumnPath:function(t,e,i){var r=.375*this.polar.angleAxis.piece,a=i-r,o=i+r,s=n.arc().innerRadius(t).outerRadius(e).startAngle(a).endAngle(o);return s()},getPointInitAnimationAttr:function(t){var e=this;return{ease:s,duration:o,attrTween:{d:function(){this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius;var n=i(t.animateInitRadius,t.innerRadius),r=i(t.animateInitRadius,t.outerRadius);return function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointUpdateAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(this._innerRadius_,t.innerRadius),r=i(this._outerRadius_,t.outerRadius);return this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius,function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointDropAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(t.outerRadius,t.innerRadius);return function(i){return e._getRadarColumnPath(t.innerRadius,n(i),t.radian)}}}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_getFixedPos:function(t,e){var i=t.radian,n=this.getCenter(),r=t.posX+n[0],a=t.posY+n[1];return i=Math.PI&&i<3*Math.PI/2?r-=e.width:i>=3*Math.PI/2&&i<2*Math.PI&&(a-=e.height,r-=e.width),[r,a]}});return t("../ChartLibrary").register(r.COLUMN_RADAR,v),v}),define("chart/Bubble",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=500,o=500,s=300,h=300,l=e.extend({doLayout:function(){this._calculateBubblePosition()},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||"-"==e.size||i.hasNotDefined(e.size)},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},_calculateLabelPos:function(){},_calculateMinMax4Radius:function(){for(var t=this,e=t.points,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=0,a=e.length;a>r;r++){var o=e[r],s=o.getTargetValue();o.visible&&!o.isNull&&(0>s&&!o.options.displayNegative||o.options.minSize||o.options.maxSize||(n=Math.max(n,isNaN(s)?0:Math.abs(s)),i=Math.min(i,isNaN(s)?0:Math.abs(s))))}t.seriesAbsMinValue=i,t.seriesAbsMaxValue=n},_calculateBubbleRadius:function(){var t=this,e=t.options,r=Math.max(t.maxSize,t.minSize),a=Math.min(t.minSize,t.maxSize),o=e.sizeBy==n.SIZE_BY_AREA,s=this.seriesAbsMaxValue,h=this.seriesAbsMinValue;if(!this._sizeByCurrentSeries()){var l=this._calculateChartMinMax();s=i.pick(l.max,l[1]),h=i.pick(l.min,l[0])}var u=s-h,c=o?(r*r-a*a)/u:(r-a)/u;c=isFinite(c)?c:0;var d=i.pick(this.vanchart.scale,1),f=this.getTargetKey();this.points.forEach(function(t){var e=c*(Math.abs(t.value)-h),i=o?Math.sqrt(a*a+e):a+e;if(t.options.minSize||t.options.maxSize){var n=isNaN(t.options.minSize)?t.options.maxSize:t.options.minSize;i=o?2*Math.sqrt(n):n}i=t[f]<0&&!t.options.displayNegative?0:i,t.radius=i/2*d})},_sizeByCurrentSeries:function(){return i.hasDefined(this.options.minSize)&&i.hasDefined(this.options.maxSize)},_calculateChartMinMax:function(){var t=this.vanchart.seriesOfType(this.type),e=Number.MAX_VALUE,i=-e;return t.forEach(function(t){t._sizeByCurrentSeries()||(e=Math.min(e,t.seriesAbsMinValue),i=Math.max(i,t.seriesAbsMaxValue))}),{min:e,max:i}},_calculateBubblePosition:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=n.options,a=e.scale.rangeBand?e.scale.rangeBand()/2:0,o=e.scale(e.getAxisValue(r.x))+a,s=i.scale(i.getAxisValue(r.y));n.posX=t?s:o,n.posY=t?o:s;var h=n.labelDim&&!n.isNull&&!(n.getTargetValue()<0&&!r.displayNegative);h&&r.dataLabels&&r.dataLabels.enabled&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.labelDim.height/2})})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.radius||0;if(i.isMap()){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_getMoreLabelDefaultCenter:function(t){return{centerX:t.posX,centerY:t.posY}},getPointGraphicKey:function(){return"circle"},effectAnimation:function(t){r.bubbleEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},getPointInitAttr:function(t){return{transform:i.makeTranslate([t.posX,t.posY]),r:0}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime||0,ease:"bounce",duration:this.state==n.STATE_TO_SHOW?h:a,attr:{r:t.radius}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:o,attr:{r:t.radius,transform:i.makeTranslate({x:t.posX,y:t.posY})}}},getPointDropAnimationAttr:function(){return{ease:"back-in",duration:s,attr:{r:0}}},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.renderer;return e.bubbleShadowFilter=e.bubbleShadowFilter||n.createDropShadowFilter(0,0,.2,2),"url(#"+i.stamp(e.bubbleShadowFilter)+")"},getStyle:function(t){var e=t.series,n={stroke:t.color,"stroke-opacity":1,"stroke-width":0,fill:t.color,"fill-opacity":t.opacity};return t.options.shadow&&!i.isMS&&(n.filter=e._getShadowFilter()),n},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.mouseOverColor,"fill-opacity":1}},getPressedStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.clickColor,"fill-opacity":t.clickOpacity}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ease:"back-out",duration:200,style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ - ease:"back-out",duration:0,style:i})}});return t("../ChartLibrary").register(n.BUBBLE_CHART,l),l}),define("chart/Scatter",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../utils/PathGenerator","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=t("../utils/PathGenerator"),o=300,s=500,h=2,l=e.extend({doLayout:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=e.scale.rangeBand?e.scale.rangeBand()/2:0,a=e.scale(e.getAxisValue(n.options.x))+r,o=i.scale(i.getAxisValue(n.options.y));n.posX=t?o:a,n.posY=t?a:o,n.labelDim&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.options.marker.radius-h-n.labelDim.height})});var n=this,r=a.line().interpolate(n.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull});this.points.sort(function(t,e){return t.posX-e.posX}),this.linePath=r(this.points)},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||i.hasNotDefined(e.y)},_calculateLabelPos:function(t){},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.options.marker&&t.options.marker.radius||0;if("vanChartMap"==i.vanChartType){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_animateEnd:function(){this._showLabels(),this._drawEffectPoints();var t=this,e=t.vanchart,n=e.renderer;t.group||(t.group=t._createGroup(n,e).attr("transform",i.makeTranslate(t._getTranslate())).attr("class",t.className+" "+t.type)),t.lineGraphic=t.lineGraphic||n.path({d:t.linePath}).addTo(t.group).style({fill:"none","pointer-events":"none","stroke-width":t.options.lineWidth,stroke:t.color})},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){r.markerEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},getAttrs:function(t){return{transform:i.makeTranslate({x:t.posX,y:t.posY})}},_updatePointGraphicStyle:function(t){this._updateMarker(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime,ease:"back-out",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointDropAnimationAttr:function(t){return{ease:"back-in",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(0)"}}},drawSeries:function(){var t=this;t.visible&&t.lineGraphic&&t.lineGraphic.animate({duration:s,ease:"back-out",d:t.linePath}),t.visible||t.lineGraphic&&t.lineGraphic.remove()},getStyle:function(t){var e=t.options.marker,i=this._isHollowMarker(e.symbol);return i?{fill:"none",stroke:e.fillColor,"stroke-opacity":e.fillColorOpacity,"stroke-width":2}:{fill:e.fillColor,"fill-opacity":e.fillColorOpacity,stroke:"none"}},_onPointMouseOver:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOver(t)},_onPointMouseOut:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOut(t)}});return t("../ChartLibrary").register(n.SCATTER_CHART,l),l}),define("chart/Gauge",["require","../Constants","../utils/BaseUtils","./Series","../utils/QueryUtils","../utils/BoundsManager","../utils/ColorUtils","../component/FormattedText"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./Series"),r=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),t("../utils/ColorUtils")),a=t("../component/FormattedText"),o=n.extend({DEFAULT_PADDING:5,LINE_GAP:.3,VERTICAL_GAP:.3,HORIZONTAL_GAP:.8,ANIMATION_TIME:1e3,EASE_TYPE:"quad-out",refresh:function(t,e){return n.prototype.refresh.call(this,t,e),t=this.options,this.gaugeType=t.style,this.center=null,t.center&&(this.center=[this._getPercentValue(t.center[0],this.vanchart.width),this._getPercentValue(t.center[1],this.vanchart.height)]),i.convertToREMUseDefault16PX(t.seriesLabel&&t.seriesLabel.style),i.convertToREMUseDefault16PX(t.valueLabel&&t.valueLabel.style),i.convertToREMUseDefault16PX(t.percentageLabel&&t.percentageLabel.style),this},doLayout:function(){var t=this._calculateGaugeBounds(),e=this,i=e.options;if(!t&&!i.radius&&!e.center)throw new Error("gauge has no bounds");this.bounds=t,this._calculatePercentage(),e.defaultBands=(i.bands||[]).concat(e._getDefaultBands(e.gaugeAxis.scale.domain())),e.points.forEach(function(t){var i=e._getColorFromBands(t.getTargetValue(),e.defaultBands);i&&(i=r.getStandardColorAndOpacity(i),t.color=i.hex,t.opacity=i.alpha),t.mouseOverColor=r.getHighLightColor(t.color),t.clickColor=r.getClickColor(t.color)}),this._doLayout()},_doLayout:function(){this._dealPercentLabel(),this._dealValueLabel(),this._fixCenterAndRadius()},calculateLabelInfo:function(t){},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getAxisTypes:function(){return["gaugeAxis"]},getDataToDraw:function(){return[]},_calculatePercentage:function(){if(this.points.length){var t=this.gaugeAxis,e=t.scale.domain(),i=this.points;i.forEach(function(t){t.points=i,t.percentage=(t.value-e[0])/(e[1]-e[0])})}},_calculateLabelPos:function(){},_getTranslate:function(){return[Math.round(this.centerX),Math.round(this.centerY)]},_validPoint:function(){var t=this.points.filter(function(t){return!t.isNull});return t[0]||this.points[0]},_dealSeriesLabel:function(){var t=this,e=t.options;if(t.seriesLabelContent="",t.seriesLabelDim={width:0,height:0},e.seriesLabel&&e.seriesLabel.enabled){var i=e.seriesLabel.style,n=t._validPoint();a.dataLabelGenerator(n,e.seriesLabel);var r=n.labelContent,o=n.labelDim;t.seriesLabelContent=r&&r[0]?r[0].text:"",t.seriesLabelStyle=i,t.seriesLabelDim=o}},_dealPercentLabel:function(){var t=this,e=t.options,n=e.percentageLabel;t.percentageLabelContent="",t.percentageLabelDim={width:0,height:0};var r=t.points[0];if(r&&!r.isNull&&n&&n.enabled){var o=i.clone(n.style);o.color||(o.color=r.color),a.dataLabelGenerator(r,n);var s=r.labelContent,h=r.labelDim;t.percentageLabelContent=s&&s[0]?s[0].text:"",t.percentageLabelStyle=o,t.percentageLabelDim=h}},_dealValueLabel:function(){var t=this,e=t.options,n=e.valueLabel,r=n.style,o=n.useHtml,s=n.formatter;if(t.valueLabelContent="",t.valueLabelDim={width:0,height:0},n&&n.enabled){for(var h=[],l=0,u=t.points.length;u>l;l++){var c=t.points[l];if(!c.isNull){var d=a.calculateSingleLineLabelContent(s,c),f=i.getTextDimension(d,r,o);h.push({labelContent:d,labelDim:f,labelStyle:r})}}t.valueLabelContent=h}},_getDefaultBands:function(t){var e=this.options.color,n=[];if(e)n.push({from:t[0],to:t[1],color:e});else{var r=t[0],a=t[1],o=i.accDiv(a-r,3),s=i.accAdd(r,o),h=i.accAdd(s,o),l=this.vanchart.options.colors;n=[{from:r,to:s,color:l[0]},{from:s,to:h,color:l[1]},{from:h,to:a,color:l[2]}]}return n},_getColorFromBands:function(t,e){if(e&&e.length)for(var i=0,n=e.length;n>i;i++){var r=e[i],a=Math.min(r.from,r.to),o=Math.max(r.from,r.to);if(t>=a&&o>=t)return r.color}},_calculateGaugeBounds:function(){for(var t=this.vanchart.seriesOfType(e.GAUGE_CHART),i=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].center&&t[r].options.radius&&n++;for(var o=this.options.layout==e.HORIZONTAL_LAYOUT,s=o?"width":"height",h=i[s]/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.center)return o?{x:i.x+r*h,y:i.y,width:h,height:i.height}:{x:i.x,y:i.y+r*h,width:i.width,height:h};return{x:0,y:0,width:0,height:0}},_getFixedPos:function(t,e){var i,n,r=t.series,a=r.style;return"pointer_semi"==a?(i=r.centerX-e.width/2,n=r.centerY+.14*r.radius+10):(i=r.centerX+r.radius+10,n=r.centerY-e.height/2),[i,n]},_animateEnd:function(){},_getPointTextLabelGroup:function(){if(!this.textGraphicGroup){var t=this.vanchart,e=(t.seriesTextRenderGroup,t.seriesTextDivGroup);this.textGraphicGroup=t.renderer.vgroup(),this.textGraphicGroup.renderG.addTo(this.group),e.append(this.textGraphicGroup.divG)}return this.textGraphicGroup.divG.attr("transform",i.makeTranslate(this._getTranslate())),this.textGraphicGroup},_drawGaugeLabels:function(t){var e=this,i=e.vanchart;e._removeNormalLabels(t);var n=0;i._needShowMoreLabel()&&e.visible&&(e._drawDiffMoreLabels(),n=1e3),i.setTimeout(e.className+"more_label_animate",function(){i._removeChangeDataState(e),e._clearMoreLabels(),e._drawNormalLabels(t)},n)},_drawDiffMoreLabels:function(){var t=this.points[0];t&&!t.isNull&&this._showAndExitMoreLabel(t,0,0)},_removeNormalLabels:function(t){for(var e=t.labels||[],i=0,n=e.length;n>i;i++)e[i]&&e[i].remove(),e[i]=null},_drawNormalLabels:function(t){var e=this,n=e.options,a=e.vanchart,o=a.renderer;if(t.labels=[],e.seriesLabelContent&&e._drawLabel(t,e.seriesLabelContent,e.seriesLabelPos,e.seriesLabelDim,e.seriesLabelStyle,n.seriesLabel.useHtml),e.percentageLabelContent&&e._drawLabel(t,e.percentageLabelContent,e.percentageLabelPos,e.percentageLabelDim,e.percentageLabelStyle,n.percentageLabel.useHtml),e.valueLabelContent&&e.valueLabelContent.length){if(e.valueLabelBackground){var s=i.rectSubPixelOpt(e.valueLabelBackground,0);s.rx=s.rx=.02*e.radius;var h=e.options.valueLabel;t.labels.push(t.append(o.rect(s).style({fill:h.backgroundColor,"fill-opacity":r.getColorOpacity(h.backgroundColor),filter:"url(#"+i.stamp(e.innerFilter)+")"})))}for(var l=0,u=e.valueLabelContent.length;u>l;l++){var h=e.valueLabelContent[l];e._drawLabel(t,h.labelContent,h.labelPos,h.labelDim,h.labelStyle,n.valueLabel.useHtml)}}},_drawLabel:function(t,e,n,r,a,o){if(n){var s=this,h=s.vanchart,l=h.renderer,u=i.getTextHeight(a);t.labels.push(t.append(l.vtext(o).attr({x:n.x,y:n.y,dy:.85*u}).textContent(e).style(a)))}},_onSinglePointerTap:function(t){this.points&&1===this.points.length&&this.points[0].onClick(t.srcEvent)},_onSeriesMouseOver:function(t){this.points&&1===this.points.length&&this.vanchart.showTooltip(this.points[0],t)},_onSeriesMouseOut:function(){this.vanchart.hideTooltip()},getClosestPoint:function(){return 1===this.points.length?this.points[0]:null},_getStroke:function(t){return i.isSupportSVG()?"url(#"+i.stamp(t)+")":t},getEvents:function(){return{mousemove:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,tap:this._onSinglePointerTap,press:this.onSeriesPress,pressup:this.onSeriesPressUp}},isSupportLegendHighlight:function(){return!1},isSeriesAccumulated:function(){return!0}});return o}),define("chart/PointerGauge",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","../utils/BoundsManager","../utils/PathGenerator","../utils/Interpolator","../utils/Scale","./Gauge","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../utils/BoundsManager"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=t("../utils/Scale"),h=t("./Gauge"),l=150,u=90,c=h.extend({gaugeType:e.POINTER_GAUGE,_doLayout:function(){this._dealSeriesLabel(),this._dealValueLabel(),"pointer"==this.options.style?this._fixPointerCenter():this._fixPointerSemiCenter()},_drawDiffMoreLabels:function(){var t=this,e=t.points,n=i.getTextHeight(t._getMoreLabelStyle()),r=n*e.length+n/2*(e.length-1),a=Math.max(0,(t.radius-r)/2),o="pointer"==t.options.style?a:-t.radius+a;e.forEach(function(e){t._showAndExitMoreLabel(e,0,o+n/2),o+=n+n/2})},getDataToDraw:function(){return this.points},_fixPointerCenter:function(){var t=this,i=t.options,n=i.radius,r=t.center,a=i.seriesLabel.align||e.BOTTOM;if(r)t.centerX=r[0],t.centerY=r[1],t.radius=n;else{var o=t.bounds,s=20+t.seriesLabelDim.height,h=o.height-s,l=o.x+o.width/2,u=o.y+o.height/2;if(n=n||Math.min(o.width,h)/2-t.DEFAULT_PADDING,a==e.BOTTOM){if(u+n+s>o.y+o.height){var c=o.height-(2*n+s);c>=0&&(u=o.y+n+c/2)}}else if(u-n-s=0&&(u=o.y+n+s+c/2)}t.centerX=l,t.centerY=u,t.radius=n}if(t.seriesLabelContent){var d=t.seriesLabelDim;t.seriesLabelPos={x:-d.width/2,y:a==e.BOTTOM?n+20:-n-20-d.height}}t.valueLabelContent&&this._dealValueLabelContent(t,n)},_fixPointerSemiCenter:function(){var t=this,i=t.options,n=i.radius,r=i.seriesLabel.align;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=n;else{var a=t.bounds,o=20+t.seriesLabelDim.height,s=a.height-o;n=n||Math.min(a.width/2,s/1.14)-t.DEFAULT_PADDING;var h=a.x+a.width/2,l=a.y+a.height/2+n/2;if(r==e.BOTTOM){if(l+.14*n+o>a.y+a.height){var u=a.height-(1.14*n+o);u>=0&&(l=a.y+n+u/2)}}else if(l-n-o=0&&(l=a.y+n+o+u/2)}t.centerX=h,t.centerY=l,t.radius=n}if(t.seriesLabelContent){var c=t.seriesLabelDim;t.seriesLabelPos={x:-c.width/2,y:r==e.BOTTOM?.14*n+20:-n-20-c.height}}t.valueLabelContent&&this._dealSemiValueLabelContent(t,n)},_dealValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-150),i.toRadian(150)]),l=i.getTextHeight(a.labelStyle),u=.16*e+l/2,c=n.valueLabel.style,d=n.valueLabel.useHtml,f=i.getTextHeight(c),p=this._getPointerTickBoundsManager(r,e,h,l),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=u,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x],A=Math.min(-T.labelDim.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C))break;if(g.isOverlapped(C))break;for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",c,d);A=Math.min(-M.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,c,d),A=Math.min(-T.labelDim.width/2-f/4,y)),T.labelPos={x:-T.labelDim.width/2,y:u+f/2},u+=f*(1+this.LINE_GAP),y=A,v++}t.valueLabelContent.length=v,t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:f*(1+this.LINE_GAP)*v+f}},_dealSemiValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-90),i.toRadian(90)]),l=n.valueLabel.style,u=n.valueLabel.useHtml,c=i.getTextHeight(l),d=i.getTextHeight(a.labelStyle),f=-(.11*e+d/2)-c,p=this._getPointerTickBoundsManager(r,e,h,d),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=f,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x];_-=c*(1+this.LINE_GAP);var A=Math.min(-T.labelDim.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C)){_+=c*(1+this.LINE_GAP);break}if(g.isOverlapped(C)){_+=c*(1+this.LINE_GAP);break}for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",l,u);A=Math.min(-M.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,l,u),A=Math.min(-T.labelDim.width/2-c/4,y)),y=A,v++}t.valueLabelContent.length=v;for(var x=0;v>x;x++){var T=t.valueLabelContent[x];T.labelPos={x:-T.labelDim.width/2,y:_+c/2+x*c*(1+this.LINE_GAP)}}t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:c*(1+this.LINE_GAP)*v+c}},_boundsInCircle:function(t){for(var e=this.radius,i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x,y:t.y+t.height},{x:t.x+t.width,y:t.y+t.height}],n=0;4>n;n++){var r=i[n],a=Math.abs(r.x),o=Math.abs(r.y);if(Math.pow(a*a+o*o,.5)>e)return!1}return!0},_getPointerTickBoundsManager:function(t,e,i,n){var a=new r,o=new r,s=.84*e,h=t.tickData,l=this,u=.5*n;h.forEach(function(t){var e=i(t.tickValue),n=l._getPointerTickCenter(t,s,i);l._addToBoundsManager(e,{x:n.x-t.tickDim.width/2-u,y:n.y-t.tickDim.height/2-u,width:t.tickDim.width+u,height:t.tickDim.height+u},a,o)});var c=t.getMinorTickData()||[],d=.85*e,f=.1*e;return c.forEach(function(t){var e,n,r=i(t),s=l._getArcPoint(d,r);r-Math.PI/4&&t3*-Math.PI/4)&&n.addBounds(e),i.addBounds(e)},_getPointerTickCenter:function(t,e,i){var n,r,a=i(t.tickValue),o=this._getArcPoint(e,a),s=o[0],h=o[1],l=t.tickDim,u=Math.atan(l.width/l.height);if(Math.abs(a)=u&&a<=Math.PI-u){var c=l.width/2;n=s-c,r=h-c*h/s}else if(a>=u-Math.PI&&-u>=a){var c=l.width/2;n=s+c,r=h+c*h/s}else{var c=l.height/2;n=s-c*s/h,r=h-c}return{x:n,y:r}},drawSeries:function(){var t=this,e=t.vanchart,i=e.renderer,n=t.group;this.backgruondPath||(this.backgruondPath=i.path().addTo(n),this.hingePath=i.path().addTo(n),this.labelGroup=this._getPointTextLabelGroup(),this.axisGroup=this.labelGroup,this.needleGroup=i.group().addTo(n),this.pointerHingePath=i.path().addTo(n)),e.registerInteractiveTarget(this,n),this.labelGroup=this._getPointTextLabelGroup(),this.dropFilter||(this.dropFilter=i.createDropShadowFilter(0,2,.1,2),this.innerFilter=i.createInnerShadowFilter(0,2,.1,2)),"pointer"==this.options.style?this._drawPointer(180,.16,.07):this._drawPointer(98,.11,.055)},onSeriesPress:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius*1.25),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius*1.25),this.pointerHingePath.attr("d",t())},onSeriesPressUp:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius),this.pointerHingePath.attr("d",t())},_getScale:function(){var t=this,e=t.options.style,n="pointer"==e?l:u,r=t.gaugeAxis.scale.domain();return s.linear().domain(r).range([i.toRadian(-n),i.toRadian(n)])},getStyle:function(t){var e=t.options;return{fill:e.needle,"fill-opacity":n.getColorOpacity(e.needle)}},getPointGraphicKey:function(){return"path"},_getPointGraphicGroup:function(){return this.needleGroup},getPointInitAnimationAttr:function(t){var e=t.series,n=e._getScale();return{duration:e.ANIMATION_TIME,ease:e.EASE_TYPE,attrTween:{d:function(){var r=this._current_||n.domain()[0];this._current_=i.getValueInDomain(t.value,n.domain());var a=o(r,this._current_);return function(t){return e._getArrowPath(a(t))}}}}},getPointUpdateAnimationAttr:function(t){return this.getPointInitAnimationAttr(t)},_getArrowPath:function(t){var e=this._getScale()(t),i=this.radius,n=this._getArcPoint(.9*i,e),r=this._getArcPoint(.02*i,e+Math.PI/2),a=this._getArcPoint(.02*i,e-Math.PI/2);return"M"+n[0]+","+n[1]+"L"+r[0]+","+r[1]+"L"+a[0]+","+a[1]+"Z"},_drawPointer:function(t,e,r){var o=this,s=o.options,h=o.radius,l=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),u=a.arc().startAngle(i.toRadian(-t)).endAngle(i.toRadian(t)).innerRadius(0).outerRadius(h).toCenter(!1);o.backgruondPath.attr("d",u()).style({fill:s.paneBackgroundColor,"fill-opacity":n.getColorOpacity(s.paneBackgroundColor),filter:"url(#"+i.stamp(o.dropFilter)+")"}),l.outerRadius(e*h),o.hingePath.attr("d",l()).style({fill:s.hingeBackgroundColor,"fill-opacity":n.getColorOpacity(s.hingeBackgroundColor),filter:"url(#"+i.stamp(o.innerFilter)+")"}),this._drawPointerTicks(),this._drawGaugeLabels(o.labelGroup),l.outerRadius(r*h),o.pointerHingePath.attr("d",l()).style({fill:s.hinge,"fill-opacity":n.getColorOpacity(s.hinge),filter:"url(#"+i.stamp(o.dropFilter)+")"})},_drawPointerTicks:function(){var t=this,e=t.defaultBands,n=t.vanchart,r=t.gaugeAxis,a=n.renderer,o=this.axisGroup,s=r.getTickData(),h=r.getMinorTickData(),l=r.options,u=l.labelStyle,c=l.useHtml,d=.95*t.radius,f=.84*t.radius,p=this._getScale();this.ticks=this.ticks||[];var g,m,v=r._bindData(this.ticks,s,function(t){return p(t.tickValue)}),_=[];for(v.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),_=v.enter.map(function(t){var e=o.append(a.line().datum(t));return i.hasDefined(t.tickContent)&&(e.text=o.append(a.vtext(c))),e}),this.ticks=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var y=_[g],x=y.datum(),b=p(x.tickValue),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.1*t.radius,b),C=t._getColorFromBands(x.tickValue,e);y.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1});var L=t._getPointerTickCenter(x,f,p);y.text&&y.text.textContent(x.tickContent).style(u).attr({x:L.x-x.tickDim.width/2,y:L.y-x.tickDim.height/2,dy:".85em"})}this.minorTics=this.minorTics||[];var g,m,v=r._bindData(this.minorTics,h),_=[];for(g=0,m=v.exit.length;m>g;g++)v.exit[g].remove();for(g=0,m=v.enter.length;m>g;g++)_.push(o.append(a.line().datum(v.enter[g])));for(this.minorTics=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var P=_[g],M=P.datum(),b=p(M),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.05*t.radius,b),C=t._getColorFromBands(M,e);P.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1})}}});return t("../ChartLibrary").register(e.POINTER_GAUGE,c),t("../ChartLibrary").register(e.POINTER_SEMI_GAUGE,c),c}),define("chart/SlotGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/PathGenerator","../utils/Scale","./Gauge","../utils/Interpolator","../component/FormattedText","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/PathGenerator"),a=t("../utils/Scale"),o=t("./Gauge"),s=t("../utils/Interpolator"),h=t("../component/FormattedText"),l=o.extend({gaugeType:e.SLOT_GAUGE,_getFixedPos:function(t,e){var i=t.series,n=i.centerX+1.08*i.radius+10,r=i.centerY-e.height/2;return[n,r]},_dealValueLabel:function(){var t=this,e=t.options,i=t.points[0];if(i&&!i.isNull){for(var r=e.valueLabel,a=r.useHtml,o=r.formatter,s=h.createMultiLineLabelContent(o,i),l=r.style,u=[],c=0,d=s.length;d>c;c++)u.push({labelContent:s[c],labelStyle:l,labelDim:n.getTextDimension(s[c],l,a)});t.valueLabelContent=u}},_fixCenterAndRadius:function(){var t=this,e=t.options,i=e.radius;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=i;else{var r=t.bounds;i||(i=Math.min(r.width/2,r.height/2),i=i/1.08-t.DEFAULT_PADDING);var a=r.x+r.width/2,o=r.y+r.height/2;t.centerX=a,t.centerY=o,t.radius=i}if(t.percentageLabelContent&&t.valueLabelContent&&t.valueLabelContent.length>0){t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height*(1+t.LINE_GAP)};for(var s=0,h=0,l=t.valueLabelContent.length;l>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=u.labelDim.height*(1+t.LINE_GAP)}}else if(t.percentageLabelContent)t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height/2};else if(t.valueLabelContent&&t.valueLabelContent.length>0)for(var c=n.getTextHeight(e.valueLabel.style),d=t.valueLabelContent.length,f=c*d+c*(d-1)/2,s=-f/2,h=0;d>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=c*(1+t.LINE_GAP)}},drawSeries:function(){var t=this,e=t.options,o=t.points[0],h=t.vanchart,l=h.renderer,u=t.group;this.backgruondPath||(this.backgruondPath=l.path().addTo(u),this.slotBackground=l.path().addTo(u),this.needlePath=l.circle().addTo(u)),this.labelGroup=this._getPointTextLabelGroup(),this.innderShadow||(this.innderShadow=l.createInnerShadowFilter(0,2,.05,0),this.dropShadow=l.createDropShadowFilter(0,2,.05,0));var c=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),d=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),f=t.gaugeAxis.scale.domain(),p=a.linear().domain(f).range([n.toRadian(-135),n.toRadian(135)]);if(t.backgruondPath.attr("d",d()).style({fill:"none",stroke:e.slotBackgroundColor,"stroke-linecap":"round","stroke-width":.16*t.radius,filter:"url(#"+n.stamp(this.innderShadow)+")"}),o&&!o.isNull){var g=p(f[0]),m=p(n.getValueInDomain(o.value,f)),v=n.toDegree(m-g),_=(t._getColorFromBands(f[0],t.defaultBands),o.color);t.slotBackground.style({fill:"none",stroke:i.colorToHex(_),"stroke-linecap":"round","stroke-width":.16*t.radius});var y=this._getArcPoint(t.radius,g);if(t.needlePath.attr("cx",y[0]).attr("cy",y[1]).attr("r",.048*t.radius).style({fill:e.needle,"fill-opacity":i.getColorOpacity(e.needle),filter:"url(#"+n.stamp(this.dropShadow)+")"}),t.vanchart.renderer.isAnimation)t.slotBackground.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||g;var t=s(this._lastRadian_,m);return this._lastRadian_=m,function(e){return c.endAngle(t(e))()}}}}),t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{transform:function(){this._lastRotate_=this._lastRotate_||0;var t=s(this._lastRotate_,v);return this._lastRotate_=v,function(e){return"rotate("+t(e)+")"}}}});else{var x=c.endAngle(m)(),b=t._getArcPoint(t.radius,m),T=b[0],A=b[1],C=.008*t.radius;if(Math.abs(m-g)<1e-6){var c="a"+C+","+C+" 0 1,0 ";x="M"+(T-C)+","+A+c+2*C+",0 "+c+2*-C+",0 "}t.slotBackground.attr("d",x),t.needlePath.attr({cx:b[0],cy:b[1]})}this._drawGaugeLabels(this.labelGroup)}},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];if(e){var n=i.getHighLightColor(e.color),r=i.getHighLightColor(this.options.needle);this.slotBackground.style({stroke:i.colorToHex(n)}),this.needlePath.style({fill:r})}},_onSeriesMouseOut:function(t){o.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.slotBackground.style({stroke:e.color}),this.needlePath.style({fill:e.options.needle}))},onSeriesPress:function(){var t=this.points[0];if(t){var e=i.getColorWithDivider(t.color,1/.95),n=i.getColorWithDivider(this.options.needle,1/.95);this.slotBackground.style({stroke:i.colorToHex(e)}),this.needlePath.style({fill:n})}},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.SLOT_GAUGE,l),l}),define("chart/RingGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","./Gauge","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("./Gauge"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=r.extend({gaugeType:e.RING_GAUGE,_fixCenterAndRadius:function(){var t,e,i=this,n=i.options,r=n.radius;if(i.center)t=i.center[0],e=i.center[1];else{var a=i.bounds;r=r||Math.min(a.width/2,a.height/2)-i.DEFAULT_PADDING,t=a.x+a.width/2,e=a.y+a.height/2}i.centerX=t,i.centerY=e,i.radius=r;var o=0,s=i.valueLabelContent?i.valueLabelContent[0]:null;i.percentageLabelContent&&s?o=i.percentageLabelDim.height*(1+i.LINE_GAP)+s.labelDim.height:i.percentageLabelContent?o=i.percentageLabelDim.height:s&&(o=s.labelDim.height);var h=-o/2;i.percentageLabelContent&&(i.percentageLabelPos={x:-i.percentageLabelDim.width/2,y:h},h+=i.percentageLabelDim.height*(1+i.LINE_GAP)),s&&(s.labelPos={x:-s.labelDim.width/2,y:h})},drawSeries:function(){var t=this,e=t.options,r=t.vanchart,s=r.renderer,h=t.group;if(this.backgruondPath||(this.backgruondPath=s.path().addTo(h),this.ringPath=s.path().addTo(h),this.innerBackgroundPath=s.path().addTo(h),this.innerStroke=s.path().addTo(h),this.outerStroke=s.path().addTo(h)),this.labelGroup=this._getPointTextLabelGroup(),!this.colorGradient){var l={x1:"0%",y1:"0%",x2:"0%",y2:"100%"},u={offset:"0%","stop-color":"#ffffff"},c={offset:"100%","stop-color":"#dddddd"};this.colorGradient=s.colorGradient(l,[u,c]),u["stop-color"]="#dddddd",c["stop-color"]="#ffffff",this.clickedGradient=s.colorGradient(l,[u,c]),n.isSupportSVG()||(this.colorGradient="#ffffff",this.clickedGradient="#dddddd")}var d=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0).outerRadius(t.radius),f=t.gaugeAxis.scale.domain(),p=(t._getColorFromBands(f[0],t.defaultBands),.8*t.radius),g=p+2,m=p-1.5;this.backgruondPath.attr("d",d()).style({fill:e.paneBackgroundColor,"fill-opacity":i.getColorOpacity(e.paneBackgroundColor)});var v=t.points[0];if(v){var _=a.arc().startAngle(0).innerRadius(0).outerRadius(t.radius),y=v.color,x=Math.max(v.percentage,0),b=2*Math.PI*x*(e.clockwise?1:-1);this.ringPath.style({fill:i.colorToHex(y),"fill-opacity":i.getColorOpacity(y)}),this.ringPath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||0;var t=o(this._lastRadian_,b);return this._lastRadian_=b,function(e){return _.endAngle(t(e))()}}}})}this.innerBackgroundPath.attr("d",d.outerRadius(p)()).style({fill:e.innerPaneBackgroundColor,"fill-opacity":i.getColorOpacity(e.innerPaneBackgroundColor)}),this.outerStroke.attr("d",d.outerRadius(g)()).style({fill:"none",stroke:"#000000","stroke-opacity":.05,"stroke-width":4}),this.innerStroke.attr("d",d.outerRadius(m)()).style({fill:"none",stroke:this._getStroke(this.colorGradient),"stroke-width":3}),this._drawGaugeLabels(this.labelGroup)},_onSeriesMouseOver:function(t){r.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.mouseOverColor}))},_onSeriesMouseOut:function(t){r.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.color}))},onSeriesPress:function(){var t=this.points[0];t&&(this.innerStroke.style({stroke:this._getStroke(this.clickedGradient)}),this.ringPath.style({fill:t.clickColor}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.RING_GAUGE,s),s}),define("chart/ThermometerGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/Scale","./Gauge","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./Gauge"),o=6,s=4,h=5,l=.001,u=a.extend({gaugeType:e.THERMOMETER_GAUGE,_drawDiffMoreLabels:function(){function t(t,e){return t-e/2}var i=this.points[0];if(i&&!i.isNull){var n=this.gaugeAxis.scale.domain(),a=this.options.thermometerLayout==e.VERTICAL_LAYOUT,o=r.linear().domain(n).range(a?[this.radius,-this.radius]:[-this.radius,this.radius]),s=o(i.y),l=a?0-2*h:s,u=a?s:0-2*h;this._showAndExitMoreLabel(i,l,u,t,t)}},_fixCenterAndRadius:function(){var t=(this.points[0],this),i=t.options.thermometerLayout==e.HORIZONTAL_LAYOUT?this._fixHorizontalThermometerCenter():this._fixVerticalThermometerCenter(),n=i.centerX,r=i.centerY,a=i.radius,o=t.valueLabelContent?t.valueLabelContent[0]:null;if(t.percentageLabelContent&&(t.percentageLabelPos.x-=n,t.percentageLabelPos.y-=r,t.percentageLabelPos.y=Math.min(t.percentageLabelPos.y,a-t.percentageLabelDim.height)),o){o.labelPos.x-=n,o.labelPos.y-=r;var s=a-o.labelDim.height-o.labelPos.y;0>s&&(o.labelPos.y+=s,t.percentageLabelContent&&(t.percentageLabelPos.y+=s))}t.centerX=n,t.centerY=r,t.radius=a},_fixHorizontalThermometerCenter:function(){var t,i,n,r=this,a=r.options,l=r.gaugeAxis,u=a.percentageLabel,c=a.valueLabel,d=r.valueLabelContent?r.valueLabelContent[0]:null,f=r.options.radius,p=this._getThermometerSize();if(r.center)t=r.center[0],i=r.center[1],n=i;else{var g=r.bounds;n=g.y+(g.height-p)/2,t=g.x+g.width/2,f=f||g.width/2-l.getMaxTickWidth()-r.DEFAULT_PADDING}return(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.TOP&&c.align==e.TOP?(r.center&&(n-=r.percentageLabelDim.height*(1+r.LINE_GAP), - n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)):(r.percentageLabelContent&&u.align==e.TOP&&(r.center&&(n-=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP)),d&&c.align==e.TOP&&(r.center&&(n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)))),r.center?n=i+5:(n+=l.getTickHeight()+s+o+s+2*h,i=n-5),(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.BOTTOM&&c.align==e.BOTTOM?(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n}):(r.percentageLabelContent&&u.align==e.BOTTOM&&(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n}),d&&c.align==e.BOTTOM&&(n+=d.labelDim.height*r.HORIZONTAL_GAP,d.labelPos={x:-d.labelDim.width/2+t,y:n}))),{centerX:t,centerY:i,radius:f}},_fixVerticalThermometerCenter:function(){var t,i,a,l=this,u=l.options,c=l.gaugeAxis,d=u.percentageLabel,f=u.valueLabel,p=u.radius,g=l.points[0],m=c.scale.domain(),v=l.valueLabelContent?l.valueLabelContent[0]:null,_=this._getThermometerSize();if(l.center)t=l.center[0],i=l.center[1],a=t-2*h;else{var y=l.bounds;a=y.x+(y.width-_)/2,i=y.y+y.height/2,p=p||y.height/2-c.getTickHeight()-l.DEFAULT_PADDING}var x=r.linear().domain(m).range([p,-p]),b=i+x(n.getValueInDomain(g.value,m));return l.percentageLabelDim&&(b-=l.percentageLabelDim.height/3),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.LEFT&&f.align==e.LEFT?(l.center||(a+=Math.max(l.percentageLabelDim.width,v.labelDim.width),t=a+h),l.percentageLabelPos={x:a-l.percentageLabelDim.width,y:b},v.labelPos={x:a-v.labelDim.width,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)},a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height)):(l.percentageLabelContent&&d.align==e.LEFT&&(l.center&&(a-=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),l.percentageLabelPos={x:a,y:b},a+=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),v&&f.align==e.LEFT&&(l.center&&(a-=v.labelDim.width+l.LINE_GAP*v.labelDim.height),v.labelPos={x:a,y:b},a+=v.labelDim.width+l.LINE_GAP*v.labelDim.height))),l.center?a=t-h:t=a+h,a+=2*h+s+o+s+c.getMaxTickWidth(),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.RIGHT&&f.align==e.RIGHT?(a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height),l.percentageLabelPos={x:a,y:b},v.labelPos={x:a,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)}):(l.percentageLabelContent&&d.align==e.RIGHT&&(l.percentageLabelPos={x:a+l.LINE_GAP*l.percentageLabelDim.height,y:b}),v&&f.align==e.RIGHT&&(v.labelPos={x:a+l.LINE_GAP*v.labelDim.height,y:b}))),{centerX:t,centerY:i,radius:p}},_getThermometerSize:function(){var t=this,i=t.options,n=i.valueLabel,r=t.gaugeAxis,a=t.valueLabelContent?t.valueLabelContent[0]:null,l=i.percentageLabel;if(t.options.thermometerLayout==e.HORIZONTAL_LAYOUT){var u=0;return t.percentageLabelContent&&a?l.align==n.align&&(u+=t.percentageLabelDim.height+a.labelDim.height,u+=t.LINE_GAP*t.percentageLabelDim.height,u+=t.HORIZONTAL_GAP*(n.align==e.TOP?a.labelDim.height:t.percentageLabelDim.height)):t.percentageLabelContent?u+=(1+t.HORIZONTAL_GAP)*t.percentageLabelDim.height:a&&(u+=(1+t.HORIZONTAL_GAP)*a.labelDim.height),u+=2*h+s+o+s+r.getTickHeight()}var c=0;return t.percentageLabelContent&&a?l.align==n.align?(c+=Math.max(t.percentageLabelDim.width,a.labelDim.width),c+=t.VERTICAL_GAP*Math.max(t.percentageLabelDim.height,a.labelDim.height)):(c+=t.percentageLabelDim.width+a.labelDim.width,c+=t.VERTICAL_GAP*(t.percentageLabelDim.height+a.labelDim.height)):t.percentageLabelContent?c+=t.percentageLabelDim.width+t.VERTICAL_GAP*t.percentageLabelDim.height:a&&(c+=a.labelDim.width+t.VERTICAL_GAP*a.labelDim.height),c+=r.getMaxTickWidth(),c+=2*h+s+o+s},drawSeries:function(){var t=this,a=t.options,o=t.points[0],s=t.vanchart,u=s.renderer,c=t.group,d=t.gaugeAxis,f=d.scale.domain(),p=t.options.thermometerLayout==e.VERTICAL_LAYOUT,g=n.getValueInDomain(o.value,f),m=o.color,v=t.radius;if(!this.backgruondLine){this.backgruondLine=u.line().addTo(c),this.thermometerLine=u.line().addTo(c),this.needlePath=u.circle().addTo(c),this.axisGroup=u.group().addTo(c);var _=m,y=i.mixColorWithHSB(_,0,-.1,.1),x=i.getStandardColorAndOpacity(_).alpha;1>x&&(y=i.mixColorWithAlpha(y,x));var b="0%",T="0%";p?T="100%":b="100%";var A={offset:"0%","stop-color":p?_:y},C={offset:"100%","stop-color":p?y:_};this.colorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var L=i.getColorWithDivider(_,1/.95),P=i.mixColorWithHSB(_,0,-.1,.1);A={offset:"0%","stop-color":p?L:P},C={offset:"100%","stop-color":p?P:L},this.clickedColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var M=i.getColorWithDivider(o.mouseOverColor,1/.95),w=i.mixColorWithHSB(o.mouseOverColor,0,-.1,.1);A={offset:"0%","stop-color":p?M:w},C={offset:"100%","stop-color":p?w:M},this.mouseOverColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]),n.isSupportSVG()||(this.colorGradient=_,this.clickedColorGradient=L,this.mouseOverColorGradient=M)}this.labelGroup=this._getPointTextLabelGroup();var E=r.linear().domain(f).range([-v,v]),S="x1",O="y1",b="x2",T="y2",k="cx",D="cy",R=E(g),B=-v;p&&(S="y1",O="x1",b="y2",T="x2",k="cy",D="cx",B=v,R=E.range([v,-v])(g));var I=n.pick(t.thermometerLine.node()._lastX_,B);if(t.thermometerLine.node()._lastX_=R,t.backgruondLine.attr(S,-v).attr(O,0).attr(b,v).attr(T,l).style({fill:"none",stroke:a.slotBackgroundColor,"stroke-width":2*h,"stroke-linecap":"round"}),!o.isNull){t.thermometerLine.attr(S,B).attr(O,0).attr(T,l).attr(b,I).style({stroke:t._getStroke(t.colorGradient),"stroke-width":2*h,"stroke-linecap":"round"}),t.needlePath.attr("r",.9*h).attr(k,I).attr(D,0).style({fill:a.needle,"fill-opacity":i.getColorOpacity(a.needle),"stroke-width":.6*h,stroke:t._needleStrokeColor(o)});var G={};G[b]=R,t.thermometerLine.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G}),G={},G[k]=R,t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G})}this._drawGaugeLabels(this.labelGroup),this._drawThermometerTicks(E)},_needleStrokeColor:function(t){return i.mixColorWithHSB(t.color,0,.1,-.1)},_drawThermometerTicks:function(t){var i=this,r=(i.options.bands,i.vanchart),a=i.gaugeAxis,o=r.renderer,s=this.labelGroup,h=a.getTickData(),l=a.getMinorTickData(),u=a.options,c=u.labelStyle,d=u.useHtml,f="x1",p="y1",g="x2",m="y2",v=-9,_=-15,y=-13,x=-19,b=function(t,e){return{x:e-t.tickDim.width/2,y:x-.85*t.tickDim.height,dy:"0.85em"}};i.options.thermometerLayout==e.VERTICAL_LAYOUT&&(f="y1",p="x1",g="y2",m="x2",v=9,_=15,y=13,x=19,b=function(t,e){return{x:x,y:e-t.tickDim.height/2,dy:".85em"}}),this.ticks=this.ticks||[];var T,A,C=a._bindData(this.ticks,h,function(e){return t(e.tickValue)}),L=[];for(C.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),L=C.enter.map(function(t){var e=s.append(o.line().datum(t));return n.hasDefined(t.tickContent)&&(e.text=s.append(o.vtext(d))),e}),this.ticks=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var P=L[T],M=P.datum(),w=n.lineSubPixelOpt(t(M.tickValue),1);P.attr(f,w).attr(p,v).attr(g,w).attr(m,_).style({stroke:u.tickColor,"stroke-width":u.tickWidth}),P.text&&P.text.textContent(M.tickContent).style(c).attr(b(M,w))}this.minorTics=this.minorTics||[];var T,A,C=a._bindData(this.minorTics,l),L=[];for(T=0,A=C.exit.length;A>T;T++)C.exit[T].remove();for(T=0,A=C.enter.length;A>T;T++)L.push(s.append(o.line().datum(C.enter[T])));for(this.minorTics=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var E=L[T],S=E.datum(),w=n.lineSubPixelOpt(t(S),1);E.attr(f,w).attr(p,v).attr(g,w).attr(m,y).style({stroke:u.minorTickColor,"stroke-width":u.minorTickWidth})}},_getFixedPos:function(t,i){var n,r,a=t.series,l=a.options,u=a.options.thermometerLayout,c=a.percentageLabelContent,d=a.valueLabelContent;if(u==e.HORIZONTAL_LAYOUT){n=a.centerX-i.width/2;var f=a.centerY;if(r=f+h+10,c&&c.length&&l.percentageLabel.align==e.BOTTOM&&(r=f+a.percentageLabelPos.y+a.percentageLabelDim.height+10),d&&d.length&&l.valueLabel.align==e.BOTTOM){var p=a.valueLabelContent[0];r=f+p.labelPos.y+p.labelDim.height+10}}else{r=a.centerY-i.height/2;var g=a.gaugeAxis.getMaxTickWidth(),m=a.centerX;if(n=m+h+s+o+s+g+10,c&&c.length&&l.percentageLabel.align==e.RIGHT&&(n=m+a.percentageLabelPos.x+a.percentageLabelDim.width+10),d&&d.length&&l.valueLabel.align==e.RIGHT){var p=a.valueLabelContent[0];n=Math.max(n,m+p.labelPos.x+p.labelDim.width+10)}}return[n,r]},_onSeriesMouseOver:function(t){a.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.mouseOverColorGradient)),this.needlePath.style({stroke:i.getHighLightColor(i.mixColorWithHSB(e.color,0,.1,-.1)),fill:i.getHighLightColor(this.options.needle)}))},_onSeriesMouseOut:function(t){a.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.colorGradient)),this.needlePath.style({stroke:this._needleStrokeColor(e),fill:this.options.needle}))},onSeriesPress:function(){var t=this.points[0];t&&(this.thermometerLine.style("stroke",this._getStroke(this.clickedColorGradient)),this.needlePath.style({stroke:i.getClickColor(t.color),fill:i.getClickColor(this.options.needle)}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.THERMOMETER_GAUGE,u),u}),define("chart/TreeSeries",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../Constants","./Point","../dom/Evented"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("./Point")),r=(t("../dom/Evented"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this._refresh(),this._initChildren(),this},_initChildren:function(){this.traverseInitData(this.visitBefore,null),this.points=this.root.children,this.root.options.tooltip=null},_getPointKey:function(t){return t.name},getTargetKey:function(){return"value"},_getChildrenKey:function(){return"children"},traverseData:function(t,e,i){function r(o,s,h,l){o.children||(o.children=o.options[a._getChildrenKey()]);var u=o.children;if(o.parent=h,o.depth=s,o.level=s,o.height=0,o.ancestor=l,e&&e.call(a,o),u&&(c=u.length))for(var c,d=-1;++df;f++){var g,m=!1;o.children.forEach(function(t){var e=a._getPointKey(t);i.hasDefined(e)&&e==a._getPointKey(c[f])&&(t._lastValue=t[a.getTargetKey()],t.refresh(c[f]),m=!0,g=t,d.push(t))}),m||(g=new n(c[f],a),d.push(g)),0===h&&(u=g),g.index=f,r(g,c[f],h+1,o,u),o.height=Math.max(o.height,g.visible?g.height+1:0)}for(var v=0,_=o.children.length;_>v;)-1===i.indexOf(d,o.children[v])?(o.children[v].clearChild(),_--):v++;o.children=d}else for(var p=o.children.length;--p>-1;)o.children[p].clearChild();e&&e.call(a,o)}var a=this,o={children:this.options.data,name:this.name};this.root?this.root.refresh(o):this.root=new n(o,a),r(this.root,o,0,null,null)},visitBefore:function(t){1===t.depth&&(t.color=this.vanchart.getDefaultSeriesColor(t.name))},visitAfter:function(){},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_calculatePercentage:function(t,e){var i=0;t.forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){t.percentage=Math.abs(t[e])/i})},_onPointMouseOver:function(t){var e=t.series,i=e.vanchart,n=i.hoverPoint;n&&this._onPointMouseOut(n),t.depth&&(e.onPointMouseOver(t),i.hoverPoint=t)},_onPointMouseOut:function(t){var e=t.series;e.onPointMouseOut(t),e.vanchart.hideTooltip()},isSeriesAccumulated:function(){return!0},getLegendKey:function(t){for(var e=t.parent;e&&e.parent!=this.root;)e=e.parent;return e?e.name:""},isTreeSeries:function(){return!0}}));return r}),define("chart/MultiPie",["require","../Constants","../utils/BaseUtils","../utils/Scale","./TreeSeries","./PieSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/Scale"),r=t("./TreeSeries"),a=t("./PieSeries"),o=t("../utils/QueryUtils"),s=t("../utils/ColorUtils"),h=(t("../utils/BoundsManager"),t("./Point"),t("../utils/BezierEasing")),l=t("../EffectHelper"),u=t("../utils/PathGenerator"),c=t("../utils/Interpolator"),d=2/3,f=15,p=5,g=2*Math.PI,m=1e-10,v=1e3,_=300,y=400,x="bounce",b=h.css.swing,T=h.css.swing,A=r.extend(a).extend({arc:u.arc().startAngle(function(t){return t.x}).endAngle(function(t){return t.x+t.dx}).innerRadius(function(t){return t.y}).outerRadius(function(t){return t.y+t.dy}),_refresh:function(){this.chartInfo={rotate:0},this.sx=n.linear(),this.sy=n.linear()},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1?h*(1-d)/(s-1):0,o=s>1?h*d:h),n(t,c,p,p,a,l,o)},_setColor:function(t,i,n){if(t&&i&&n){if(t.options.color)t.color=t.options.color;else{var r,a,o=s.getRGBAColorArray(t.ancestor.color),h=s.rgb2hsb(o[0],o[1],o[2]),l=(t.depth-1)/n;i===e.GRADUAL_LIGHTER?(r=-h[1]*l,a=(1-h[2])*l):(r=(1-h[1])*l,a=-h[2]*l),t.color=s.mixColorWithHSB(t.ancestor.color,0,r,a)}if(t.options.mouseOverColor)t.mouseOverColor=t.options.mouseOverColor;else{var r,a;i===e.GRADUAL_LIGHTER?(r=.1,a=-.05):(r=-.1,a=.05),t.mouseOverColor=s.mixColorWithHSB(t.options.tooltip&&t.options.tooltip.enabled&&t.options.tooltip.shared?t.ancestor.color:t.color,0,r,a)}var u=s.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=u.hex,t.opacity=u.alpha}},_calculateLabelPos:function(){var t=this,i=[],n=[];t.nodes.map(function(r){r.labelPos=null,r.dx=Math.PI&&r<3*Math.PI/2?o-=e.width:r>=3*Math.PI/2&&g>r&&(s-=e.height,o-=e.width),[o,s]},drillDown:function(t){function i(t){var e=t.children,n=t;if(e&&(r=e.length))for(var r,a=-1;++an.depth&&(n=o)}return n}if(this.drilldownNow!==t){for(var n,r=t;(n=r.parent)&&n.depth;)if(r=n,!n.name)return;this.drilldownNow=t;var a,s,h=this.chartInfo.radius,l=this.chartInfo.innerRadius;if(t.depth){var u=t.ancestor.parent.height;if(0===t.height)a=[t.parent._y,t._y,t._y+t._dy],s=[0,f,h];else if(t.height+t.depth!==u){var c=i(t);a=[t.parent._y,t._y,t._y+t._dy,c._y+c._dy,h],s=[0,f,h/2,h,h]}else a=[t.parent._y,t._y,t._y+t._dy,h],s=[0,f,h/2,h]}else a=[0,l,h],s=[0,l,h];var d=t.depth+t.height;this.sx.domain([t._x,t._x+t._dx]),this.sy.domain(a).range(s),this.nodes.map(function(t){t.depth&&t.dataLabels&&t.dataLabels.enabled&&t.dataLabels._align===e.OUTSIDE&&(t.depth===d?t.dataLabels.align=e.OUTSIDE:t.dataLabels.align=e.INSIDE,o.merge(t,this.calculateLabelInfo(t),!0)),t.x=this.safeAngle(t._x),t.dx=this.safeAngle(t._x+t._dx)-t.x,t.y=this.safeRadius(t._y),t.dy=this.safeRadius(t._y+t._dy)-t.y,t===this.drilldownNow.parent&&(t.dx=this.safeAngle(7))},this),this._calculateLabelPos(),this.drawDrillDown(t)}},safeAngle:function(t){return Math.max(this.startAngle,Math.min(this.endAngle,this.sx(t)))},safeRadius:function(t){return Math.max(0,this.sy(t))},_getTranslate:function(){return this.chartInfo.center},_getMoreLabelDefaultCenter:function(t,e){var i=t.rotate||0,n=i+t.x+t.dx/2,r=t.y+t.dy/2,a=this._getArcPoint(r,n);return{centerX:a[0],centerY:a[1]}},effectAnimation:function(t,e){l.areaStyleEffectAnimation(t,e)},getDefaultEffectTime:function(){return l.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{display:t.name||!t.depth?"":"none",fill:t.color,"fill-opacity":t.depth?t.opacity:0,stroke:t.options.borderColor,"stroke-opacity":t.options.borderOpacity,"stroke-width":t.options.borderWidth}},getAttrs:function(t){return{d:this.arc(t)}},getPointGraphicKey:function(){return"path"},getChartNodes:function(){return this.nodes},getCenter:function(){return this.center},getRadius:function(){return this.radius},getDrilldown:function(){return this.options.drilldown},_getPointGraphicGroup:function(){return this.wrapGroup||(this.wrapGroup=this.group.append(this.vanchart.renderer.group()),this.pathGroup=this.wrapGroup.append(this.vanchart.renderer.group()),this.drawRing()),this.pathGroup},drawRing:function(){this.ringPath||(this.ringPath=this.group.append(this.vanchart.renderer.path()),this.ringPath.attr({d:u.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(f).outerRadius(f+p)()}).style({display:"none",fill:"rgba(0,0,0,0.1)","pointer-events":"none"}))},drawDrillDown:function(t){var e=this,n=e.vanchart.renderer.isAnimation;e._removeDataLabels();var r=e.arc;if(n){var a=0;e.nodes.filter(function(t){return t.graphic}).map(function(i){i.graphic.transition().ease("cubic-in-out").each("start",function(){++a}).duration(v).style("fill",function(){return i.color}).attrTween("d",function(){var t=c(i._view,{x:i.x,y:i.y,dx:i.dx,dy:i.dy});return function(e){var n=t(e);return i._view=n,r(n)}}).attrTween("opacity",function(){return function(t){return i.depth&&i._view.y+i._view.dy>=f?1:0}}).each("end",function(){i.graphic.attr("opacity",i.depth&&i.dx&&i.y+i.dy>f?1:0),--a||(e._animateEnd(),e.ringPath.style("display",t&&t.depth?"":"none"))})}),t.depth||e.ringPath.transition().style("display","none")}else e.nodes.map(function(t){t.graphic.attr({d:r(t),opacity:t.depth&&t.dx&&t.y+t.dy>f?1:0})}),e._animateEnd(t),i.isSupportSVG()||e.root.graphic.style({fill:"rgba(0,0,0,0)"}),e.ringPath.style("display",t.depth?"":"none")},_animateEnd:function(){this.vanchart.renderer&&(this.ordered=this.orderType,this._showLabels(),this._drawEffectPoints())},_isOrderChanged:function(){return this.ordered!==this.orderType},initialAnimation:function(){this.wrapGroup.animate({duration:550,ease:"linear",attrTween:{transform:function(){var t=c(-180,0);return function(e){var i=t(e);return"rotate("+i+")"}}}}),this.pathGroup.animate([{duration:400,ease:"linear",attrTween:{transform:function(){var t=c(0,.9);return function(e){var i=t(e);return"scale("+i+")"}}}},{duration:1e3,ease:"elastic",attrTween:{transform:function(){var t=c(.9,1);return function(e){var i=t(e);return"scale("+i+")"}}}}])},getPointUpdateAnimationAttr:function(t){var e=this.arc,i=this._isOrderChanged(),n=i?T:x,r=i?y:v;return t.graphic.attr("opacity",t.depth?1:0),this.ringPath.style("display",this.drilldownNow.depth?"":"none"),{ease:n,duration:r,attrTween:{d:function(){var i=c(t._view,{x:t.x,y:t.y,dx:t.dx,dy:t.dy});return function(n){var r=i(n);return t._view=r,e(r)}}}}},getPointInitAnimationAttr:function(t){var e,i;i=this.initialAnimationMoving?{x:t.x,y:t.y,dx:t.dx,dy:t.dy}:{x:t.x1,y:t.y1,dx:t.dx1,dy:t.dy1},e=this.arc(i),t._view=i;var n={d:e,opacity:t.depth?1:0};return this.initialAnimationMoving?{attr:n}:(t.graphic.attr(n),this.getPointUpdateAnimationAttr(t))},getPointDropAnimationAttr:function(t){return this.getPointUpdateAnimationAttr(t)},onPointMouseOver:function(t){this._onState(t,!0)},onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){if(t.options.tooltip&&t.options.tooltip.shared)for(var i,n=t;(i=n.parent)&&i.depth&&i.y+i.dy!==f;)n=i,i.series._onSingleState(i,e);t.series._onSingleState(t,e)},_onSingleState:function(t,n){var r=t.series,a=r.options.animation,o={},s={};t.depth&&t._view.y1+t._view.dy1===f?s={opacity:n?1:0}:o={"fill-opacity":n?1:t.opacity,fill:n?t.mouseOverColor:t.color},a?(t.graphic.style(o),t.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(_).ease(b).attr(s)):(t.graphic.attr(s).style(o),t.depth||i.isSupportSVG()||t.graphic.style("fill","rgba(0,0,0,0)"))},onPointTap:function(t){this.getDrilldown()&&this.drillDown(t)},isSupportLegendHighlight:function(){return!1}});return A.prototype._calculateLabelPosWhenRadiusFixed=A.prototype._calculateLabelPos,t("../ChartLibrary").register(e.MULTIPIE_CHART,A),A}),define("chart/TreeMap",["require","../Constants","../utils/BaseUtils","./TreeSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../EffectHelper","../vans/TreeMapLayout","../utils/Scale","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./TreeSeries"),r=(t("../utils/QueryUtils"),t("../utils/ColorUtils")),a=(t("../utils/BoundsManager"),t("./Point"),t("../EffectHelper")),o=t("../vans/TreeMapLayout").treemapLayout,s=t("../utils/Scale"),h=t("../utils/Interpolator"),l=6,u=800,c="out-bounce",d=1e3,f=800,p=100,g=n.extend({nodes:[],root:null,zoomNow:null,sx:null,sy:null,zoom:null,_refresh:function(){this.sx=s.linear(),this.sy=s.linear()},visitBefore:function(t){this._setColor(t)},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1&&!t.options.children&&(t.options.color?t.color=t.options.color:t.color=t.ancestor.color,t.options.mouseOverColor?t.mouseOverColor=t.options.mouseOverColor:t.options.color?t.mouseOverColor=r.getHighLightColor(t.options.color):t.mouseOverColor=t.ancestor.mouseOverColor,t.options.clickColor?t.clickColor=t.options.clickColor:t.options.color?t.clickColor=r.getClickColor(t.options.color):t.clickColor=t.ancestor.clickColor);var e=r.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=e.hex,t.opacity=e.alpha,t.borderColor=t.options.borderColor,t.borderOpacity=t.options.borderOpacity},_calculateLabelPos:function(){},_calcLabelPos:function(t){var n=t.options.dataLabels;if(n&&n.enabled){switch(n.align){case e.CENTER:n._align=e.CENTER,t.labelPos={x:t.x+(t.dx-t.labelDim.width)/2,y:t.y+(t.dy-t.labelDim.height)/2};break;case e.TOP:default:n._align=e.LEFT,t.labelPos={x:t.x+l,y:t.y+l}}var r={x:t.x,y:t.y,width:t.dx,height:t.dy},a={x:t.labelPos.x,y:t.labelPos.y,width:t.labelDim.width,height:t.labelDim.height};i.containsRect(r,a)||(t.labelPos=null)}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.dx/2,centerY:t.y+t.dy/2}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.x+t.dx/2,t.y+t.dy/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointGraphicKey:function(){return"rect"},_getFixedPos:function(t){var e=this.vanchart.bounds,i=e.x+t.x+t.dx,n=e.y+t.y;return[i,n]},zoomTo:function(t){t=this.zoomNow===t.parent?this.root:t.parent;var e=this.sx.domain([t.x,t.x+t.dx]),i=this.sy.domain([t.y,t.y+t.dy]),n=this.vanchart.bounds,r=n.width/t.dx,a=n.height/t.dy;this.nodes.map(function(t){t.dx=r*t._dx,t.dy=a*t._dy,t.x=e(t._x),t.y=i(t._y),this._calcLabelPos(t),t.clearPointEffect(),t.graphic.interrupt()},this),this.vanchart.fire("animationStart"),this.zoomNow=t},getChartNodes:function(){return this.nodes},getZoom:function(){return this.options.zoom},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.group.append(this.vanchart.renderer.group())),this.pathGroup},initialAnimation:function(){var t=this._getPointGraphicGroup(),e=this.vanchart.bounds,i=e.width/2,n=e.height/2;t.animate({duration:u,ease:c,attrTween:{transform:function(){var t=h(0,1);return function(e){var r=t(e);return"matrix("+r+",0,0,"+r+","+(i-r*i)+","+(n-r*n)+")"}}}})},_pointExpandAttr:function(t){return{x:-t.dx/2,y:-t.dy/2,width:t.dx,height:t.dy,transform:"translate("+(t.x+t.dx/2)+","+(t.y+t.dy/2)+")"}},_pointContractAttr:function(t){return{x:0,y:0,width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}},getPointInitAttr:function(t){return this.initialAnimationMoving?this._pointExpandAttr(t):this._pointContractAttr(t)},getPointUpdateAnimationAttr:function(t){var e=this;return t.visible?{ease:"quad-in-out",duration:d,attr:this._pointExpandAttr(t)}:e.getPointDropAnimationAttr(t)},getPointInitAnimationAttr:function(t){return this.initialAnimationMoving?{}:this.getPointUpdateAnimationAttr(t)},getPointDropAnimationAttr:function(t){return{ease:"quad-in-out",duration:f,attr:{width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}}},onPointMouseOver:function(t){t.series._onState.call(t,!0)},onPointMouseOut:function(t){t.series._onState.call(t,!1)},_onState:function(t){var i=this,n=i.series,r=n.animation,a={"fill-opacity":t?1:i.opacity,fill:t?i.mouseOverColor:i.color};r?i.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(p).style(a):i.graphic.style(a)},onPointTap:function(t){t.series.getZoom()&&t.series.zoomTo(t)}});t("../ChartLibrary").register(e.TREEMAP_CHART,g)}),define("chart/Funnel",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../utils/BezierEasing","../EffectHelper","../component/FormattedText","../utils/ColorUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../utils/BezierEasing")),a=t("../EffectHelper"),o=t("../component/FormattedText"),s=t("../utils/ColorUtils"),h=.03,l=.05,u=.03,c=.05,d=u+c,f=.4,p=6,g=.35,m=400,v=400,_=500,y=500,x=e.extend({_getAxisTypes:function(){return[]},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},_calculatePercentage:function(){var t,e=this.points.filter(function(t){return t._bottomPoint=null,!t.isNull&&t.visible}),i=e.length;e.forEach(function(e,n){t?(t._bottomPoint=e,e.percentage=Math.abs(e.value/(t.value||1))):e.percentage=1,e.delayTime=m*Math.sqrt(n/i),t=e})},calculateLabelInfo:function(){},_outSideSpecialLabel:function(t){var e=t.labelContent;return e&&(e.nameLabelContent||e.valueLabelContent)},doLayout:function(){var t=this;t.points.forEach(function(t){o.dataLabelGenerator(t)}),this._calculatePosAndSize()},_calculateTotalValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i+=Math.abs(t[e])}),i},_calculateSeriesMaxValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i=Math.max(i,Math.abs(t[e]))}),i},_calculatePosAndSize:function(){var t=this,e=t.vanchart,i=e.bounds,n=function(t){return!t.isNull&&t.visible},r=t.getTargetKey(),a=i.width,o=i.height,s=a*(1-2*h),u=o*(1-2*l),c=t._calculateTotalLabelSize();s-=c.useWidth>0?c.useWidth+i.width*d:0,t.useCurveConnectorLine=!1;var f,p=t.points.filter(n),g=p.length; - if(!(1>g)){var m=p[0],v=p[g-1],_=m.labelDim?m.labelDim.height:0,y=v.labelDim?v.labelDim.height:0;if(t.options.useSameSlantAngle){var x=t._calculateTotalValue(n,r),b=Math.abs(m[r])*u/x,T=Math.abs(v[r])*u/x,A=Math.max(0,_-b)/2;u-=A,u-=Math.max(0,y-T)/2,p.forEach(function(e){e.posX=Math.round(A*s/2/u),e.width=Math.round(s-2*e.posX),e.posY=Math.round(A),e.height=Math.round(Math.abs(e[r])*u/x),A+=e.height,t._calculateInsideLabelPos(e,f),f=e})}else{var C=t._calculateSeriesMaxValue(n,r),L=u/g,P=Math.max(0,_-L)/2;u-=P,u-=Math.max(0,y-L)/2,p.forEach(function(e,i){e.width=Math.round(s*Math.abs(e[r])/C),e.posX=Math.round((s-e.width)/2),e.posY=Math.round(P+i*L),e.height=Math.round(L),t._calculateInsideLabelPos(e,f),f=e})}t._calculateOutSideLabelPos(n,c.useWidth,c.useHeight)}},_calculateInsideLabelPos:function(t,e){var i=t.options.dataLabels;i&&i.enabled&&(i.align==n.INSIDE?t.labelPos={x:t.posX+t.width/2-t.labelDim.width/2,y:t.posY+t.height/2-t.labelDim.height/2}:e&&(this.useCurveConnectorLine=this.useCurveConnectorLine||t.height+e.heightg){var a=t.labelContent,o=t.labelDim,h=o.height,l=r.useCurveConnectorLine?g:t.posY+t.height/2-h/2,c=t._bottomPoint,d=((c?c.width:0)-t.width)/4,m={x:p,y:l+h/2},v={x:p-s,y:l+h/2},_={x:t.posX+t.width+d,y:t.posY+t.height/2};if(t.labelPos={x:p,y:l,endPos:m,midPos:v,startPos:_},g+=t.labelDim.height+f,r._outSideSpecialLabel(t)){var y=a.nameLabelContent,x=a.valueLabelContent,b=o.nameValueGap,T=Math.min(e,r.maxValueLabelWidth);if(y){var A=y.dim,C=y.text,L=e-b-T;C=r._omitLabel(C,L,y.style),y.text=C,y.x=0,y.y=(h-A.height)/2}if(x){var P=x.dim,M=x.text;M=r._omitLabel(M,T,x.style),x.text=M,x.x=e-T,x.y=(h-P.height)/2}}}})},_omitLabel:function(t,e,n){for(var r=i.getTextDimension(t,n,!1),a=!1;r.width>e&&t.length;)t=t.substr(0,Math.floor(.9*t.length)),r=i.getTextDimension(t+"...",n,!1),a=!0;return a&&t&&(t+="..."),t},_calculateTotalLabelSize:function(){var t=this,e=t.vanchart,i=e.bounds,r=0,a=0;return t.points.filter(function(t){return!t.isNull&&t.visible&&t.options.dataLabels&&t.options.dataLabels.enabled}).forEach(function(e){e.options.dataLabels.align==n.OUTSIDE&&(r=+t.maxNameLabelWidth||+t.maxValueLabelWidth?Math.max(r,(t.maxNameLabelWidth||0)+(t.maxValueLabelWidth||0)+e.labelDim.nameValueGap):Math.max(r,e.labelDim.width),a+=e.labelDim.height)}),r=Math.min(r,i.width*f),{useWidth:r,useHeight:a}},_calculateLabelPos:function(){},_getFixedPos:function(t){var e=t.series._getTranslate();return[e[0]+t.posX+t.width/2,e[1]+t.posY+t.height/2]},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.width/2,centerY:t.posY+t.height/2}},getFillFilter:function(t,e){var r=e.series,a=r.vanchart,o=a.options;if(o.style==n.STYLE_GRADUAL&&i.isSupportSVG()){var h=a.renderer,l={x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u={offset:"0%","stop-color":s.getColorWithDivider(t,.9)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c]),"url(#"+i.stamp(e.colorGradient)+")"}return t},_getPointPath:function(t){var e=t._bottomPoint,i=-t.width/2+","+-t.height/2,n=t.width/2+","+-t.height/2;if(e){var r=e.width/2+","+t.height/2,a=-e.width/2+","+t.height/2;return"M"+i+"L"+n+"L"+r+"L"+a+"Z"}var o="0,"+t.height/2;return"M"+i+"L"+n+"L"+o+"L"+o+"Z"},getPointGraphicKey:function(){return"path"},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},getPressedStyle:function(t){return{stroke:t.clickColor||t.color,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.posX+t.width/2,t.posY+t.height/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointInitAttr:function(t){return{transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(0.01)"}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving;return{delay:i?t.delayTime:0,ease:i?r.css["ease-out-quart"]:r.css.swing,duration:i?v:y,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){var e=t.series;return{ease:r.css.swing,duration:_,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+")"}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:200,ease:"back-out",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:0,ease:"back-out",style:i})},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width*h,t.y+t.height*l]},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._outSideSpecialLabel(e)?t._createOutSideTextGraphic(e):t._createTextGraphic(e)})},_createOutSideTextGraphic:function(t){var e=t.series,n=t.options.dataLabels,r=function(t){return e.visible&&!t.isNull&&t.visible&&t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&n&&n.enabled};if(r(t)){var a=e.vanchart,o=a.renderer,s=t.labelContent,h=t.labelPos.x,l=t.labelPos.y,u=n.useHtml,c=this._getPointTextLabelGroup(),d=o.vtext(u).attr("transform",i.makeTranslate([h,l])).style({"pointer-events":"none"}),f=function(t){if(t){var e=t.dim,i=t.text,r=t.style;o.vtspan(u).style({width:n.labelWidth+"px",height:n.labelHeight+"px"}).attr("y",t.y).attr("x",t.x).attr("dy",.85*e.height).attr("dx",0).textContent(i).style(r).addTo(d)}};f(s.nameLabelContent),f(s.valueLabelContent),t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(n.FUNNEL_CHART,x),x}),define("chart/WordCloud",["require","./Series","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../Constants"),n=t("../utils/BezierEasing"),r=(t("../EffectHelper"),t("../utils/BaseUtils")),a=800,o=600,s=320,h=320,l=e.extend({isNullValue:function(t){var e=t.options.value;return"-"==e||r.hasNotDefined(e)||r.hasNotDefined(t.name)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=t.word,n=t.labelDim,a=t.series._getTranslate(),o=n.width/2,s=n.height/2,h=r.toRadian(i.rotate),l=h===Math.PI/2?s:o*Math.cos(h)-s*Math.sin(h),u=o*Math.sin(h)+s*Math.cos(h),c=.35*n.height*Math.cos(h),d=.35*n.height*Math.sin(h);return r.isSupportSVG()?[a[0]+i.x+l+d,a[1]+i.y+u-c]:[a[0]+i.x+n.width,a[1]+i.y+n.height]},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width/2,t.y+t.height/2]},effectAnimation:function(t){var e=t.word,i=t.series,r=i._getEffectTime(t);t.graphic.style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px").effectTransition().ease(n.css["ease-out-quint"]).duration(.5*r).style("font-size",1.2*e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 3px 3px 5px").transition().ease(n.css["ease-in-quint"]).duration(.5*r).style("font-size",e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px")},getDefaultEffectTime:function(){return 2e3},_showLabels:function(){},_getPointGraphicGroup:function(){return this.vanchart.group},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return t.graphic=i[e](),t.graphic.textContent(t.word.text),t.graphic},getPointGraphicKey:function(){return"text"},getStyle:function(t){var e=t.word;return e?{"font-size":e.size+"px","font-family":e.fontFamily,fill:t.color,"text-shadow":"","stroke-width":0,"stroke-opacity":1,"fill-opacity":t.opacity,filter:""}:{}},getHighLightStyle:function(t){function e(){for(var t=[0,15,35,50,65,85,1/0],e=[2,4,6,8,10,12],i=0,r=e.length;r>i;i++)if(n>t[i]&&n<=t[i+1])return e[i]}var i=t.word,n=i.size,a={"font-size":n+"px","font-family":i.fontFamily,fill:t.color,stroke:"white","stroke-opacity":1,"stroke-width":e(),"text-shadow":"rgba(91,91,91,0.75) 3px 3px 4px"};if(r.isMS){var o=t.series,s=o.vanchart,h=s.renderer;s.wordCloudShadowFilter=s.wordCloudShadowFilter||h.createDropShadowFilter(3,3,.75,4),a.filter="url(#"+r.stamp(s.wordCloudShadowFilter)+")"}return a},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t),n=e.vanchart,a=n.renderer;t.effectInterval&&(clearInterval(t.effectInterval),t.graphic.interrupt()),!t.mouseOverGraphic&&r.isSupportSVG()&&(t.mouseOverGraphic=a.text().attr("class","mouseOverGraphic").style("pointer-events","none").textContent(t.name).addTo(n.mouseOverGroup)),t.mouseOverGraphic&&t.mouseOverGraphic.attr(e.getPointInitAttr(t)).style(e.getStyle(t)).style("fill-opacity",1),t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.mouseOverGraphic&&t.mouseOverGraphic.style("fill-opacity",0),t.graphic.style(i),e.drawPointEffect(t)},_getInitFontSize:function(){var t=this,e=t.vanchart;return e.minFontSize/2+"px"},getPointInitAttr:function(t){var e=t.word;return e?{"text-anchor":"middle",transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}:{}},getPointInitStyle:function(){return{"font-size":this._getInitFontSize()}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving,r=t.word;return{ease:n.css["ease-out-quart"],duration:i?a:h,style:{"font-size":r.size+"px"}}},getPointUpdateAnimationAttr:function(t){var e=t.word;return{ease:n.css["ease-out-quart"],duration:o,style:{"font-size":e.size+"px"},attr:{transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}}},getPointDropAnimationAttr:function(t){return{ease:n.css["ease-in-quart"],duration:s,style:{"font-size":"0px"}}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(i.WORD_CLOUD_CHART,l),l}),define("chart/Structure",["require","./Series","./Point","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("./Point"),n=t("../Constants"),r=(t("../utils/BezierEasing"),t("../EffectHelper"),t("../utils/BaseUtils")),a=e.extend({getTargetKey:function(){return"value"},_getPointKey:function(t,e,i){return e=t.parent||e,i=t.level||i||0,(e?e.name:"")+t.name+i},isNullValue:function(t){return!1},_dealData:function(t){function e(t,a,o,s){var c,d=n._getPointKey(a,t,o),f=s[d];if(f?(f._lastValue=f[n.getTargetKey()],f.moreLabelG&&f.moreLabelG.remove(),f.moreLabelG=null,f.refresh(a),c=f,s[d]=null):c=new i(a,n),c.level=o,u=Math.max(o,u),t&&(c.parent=t,t.children=t.children||[],-1==r.indexOf(t.children,c)&&t.children.push(c)),h.push(c),t&&l.push({source:t,target:c}),a.children){var s={};c.children&&c.children.forEach(function(t){s[n._getPointKey(t)]=t}),a.children.forEach(function(t){e(c,t,o+1,s)});for(var d in s)s[d]&&s[d].clearChild()}return c}var n=this,a=n.vanchart,o=t[0],s=a.ancestor;if(a.nodes&&a.nodes.forEach(function(t){t._events=null,t.graphic&&t.graphic.remove(),t.textGraphic&&t.textGraphic.remove(),t.textGraphic=t.graphic=null}),a.edges&&a.edges.forEach(function(t){t.linkGraphic&&t.linkGraphic.remove(),t.linkGraphic=null}),o){var h=[],l=[],u=0,c={};s&&(c[n._getPointKey(s)]=s),s=e(null,o,0,c);for(var d in c)c[d]&&c[d].remove();a.ancestor=s,a.maxLevel=u,a.nodes=h,a.edges=l,n.points=h}},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=this.vanchart,n=i.bounds,r=(t.radius+1)/1.414;return[n.x+t.posX+r,n.y+t.posY+r]},getStyle:function(t){var e=t.options;return{fill:t.color,"fill-opacity":e.fillColorOpacity,stroke:t.borderColor||t.color,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth}},getHighLightStyle:function(t){var e=t.options;return{fill:t.mouseOverColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},getPressedStyle:function(t){var e=t.options;return{fill:t.clickColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.options.image||t.graphic.nodeGraphic.animate({duration:200,ease:"back-out",style:i,attr:{r:t.radius+2}})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.options.image||t.graphic.nodeGraphic.style(i).attr("r",t.radius)}});return t("../ChartLibrary").register(n.STRUCTURE_CHART,a),a}),define("chart/ForceBubble",["require","./Bubble","../Constants","../utils/BaseUtils","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Bubble"),i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../EffectHelper"),a=e.extend({_calculateBubblePosition:function(){},_getFixedPos:function(t){var e=t.radius||0,i=this.vanchart.bounds,n=i.x+t.x+e,r=i.y+t.y+e;return[n,r]},_getAxisTypes:function(){return[]},getTargetKey:function(){return"y"},_getMoreLabelDefaultCenter:function(t){return{centerX:t.x,centerY:t.y}},isNullValue:function(t){var e=t.options;return"-"==e.x||"-"==e.y},_getPointKey:function(t){return""+(t.options?t.options.x:t.x)},effectAnimation:function(t){r.forceBubbleEffectAnimation(t,t)},getPointInitAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:0,y:0})}},getPointInitAnimationAttr:function(t){return{}},getPointUpdateAnimationAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:t.x,y:t.y})}},remove:function(){this.points.forEach(function(t){t.graphic&&(t.graphic.remove(),t.graphic=null)}),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}});return t("../ChartLibrary").register(i.FORCE_BUBBLE_CHART,a),a}),define("chart/Map",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../EffectHelper","../ChartLibrary","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../EffectHelper"),a=n.extend({initialize:function(t,e,i){n.prototype.initialize.call(this,t,e,i),this.on(this.getEvents(),this)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},effectAnimation:function(t){var i=this.type===e.POINT_MAP?r.pointMapEffectAnimation:r.areaMapEffectAnimation;t.layers.forEach(function(e){i(e,t)})},getDefaultEffectTime:function(){return this.type==e.POINT_MAP?r.POINT_MAP_EFFECT_TIME:r.AREA_STYLE_EFFECT_TIME},_getFixedPos:function(t){var i=t.series.vanchart,n=t.series.type,r=t.getLatLng();if(r){var a=i.latLngToContainerPoint(r);if(n==e.AREA_MAP){var o=0,s=0;return t.options.dataLabels&&t.labelDim&&t.labelPos&&(o=t.labelDim.width/2,s=t.labelDim.height/2),[a.x+o,a.y+s]}return[a.x,a.y]}},getHighLightStyle:function(t){return{stroke:t.borderColor,fill:t.mouseOverColor,"fill-opacity":t.opacity,"stroke-width":2,"stroke-opacity":t.borderOpacity,filter:this._getShadowFilter()}},getStyle:function(t){var e=t.series.vanchart.getCurrentGeo();return t.isNull?e.defaultAreaStyle():n.prototype.getStyle.call(this,t)},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.mapRenderer;return e.mapShadowFilter=e.mapShadowFilter||n.createDropShadowFilter(0,1,.5,2),"url(#"+i.stamp(e.mapShadowFilter)+")"},_onPointMouseOver:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getHighLightStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}},_onPointMouseOut:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}}});return t("../ChartLibrary").register(e.POINT_MAP,a),t("../ChartLibrary").register(e.AREA_MAP,a),t("../ChartLibrary").register(e.HEAT_MAP,a),a}),define("chart/map/LineMapDataNormalizer",["require","../../utils/BaseUtils"],function(t){function e(t,e){var i=t.name||t,n=e.getFeaturesByName(i);return n&&n.length?n.map(function(t){return{name:i,lnglat:t.geometry.coordinates}}):void 0}function i(t,e,i,r){if(t&&e){var a=0,o=t[0]||t;do{var s=0,h=e[0]||e;do{var l={};n(l,i),l.from=o,l.to=h,r.push(l)}while(h=e[++s])}while(o=t[++a])}}var n=t("../../utils/BaseUtils").extend;return function(t,n){n._loadGeo();for(var r,a=[],o=-1;r=t[++o];){var s,h,l=r.from&&r.from.lnglat,u=r.to&&r.to.lnglat;l&&u?a.push(r):(s=l?r.from:e(r.from,n),h=u?r.to:e(r.to,n),i(s,h,r,a))}return a}}),define("chart/LineMap",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","./Series","./map/LineMapDataNormalizer","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../ComponentLibrary")),r=t("./Series"),a=t("./map/LineMapDataNormalizer"),o=6,s=Math.PI,h=r.extend({doLayout:i.emptyFn,_calculateLabelPos:i.emptyFn,_loadData:function(t){var e=this.vanchart.getComponent(n.GEO_COMPONENT);return a(t,e)},useCanvas:i.trueFn,getTargetKey:function(){return"value"},_getPointKey:function(t){return t=t.options||t,t.from.lnglat.join()+t.to.lnglat.join()},_getFixedPos:function(t,e){var n=i.computeArc(t.ax,t.ay,t.bx,t.by,t.curveness),r=(n[3]+n[4])/2;r%=2*s;var a=n[2]+o,h=a*Math.cos(r)+n[0],l=a*Math.sin(r)+n[1];return s/2>=r||(s>=r?h-=e.width:1.5*s>=r?(h-=e.width,l-=e.height):l-=e.height),[h,l]},remove:function(){this.points.map(function(t){t.remove()}),this.points=[]},isSupportLegendHighlight:function(){return!1}});return t("../ChartLibrary").register(e.LINE_MAP,h),h}),define("component/BaseAxis",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","../utils/BoundsManager","./Base","../utils/BezierEasing"],function(t){var e,i,n=t("../Constants"),r=t("../utils/BaseUtils"),a=(t("../utils/QueryUtils"),t("../ComponentLibrary")),o=(t("../utils/BoundsManager"),t("./Base")),s=t("../utils/BezierEasing"),h=400,l=s.css.swing,u=function(){return null==e&&(e=r.paddingConvertWithScale("0.1875rem")),e},c=5,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=5,p=4,g=100,m=5,v="main",_="minor",y=15,x=o.extend({labelRotation:0,_refresh:function(){this.series=[],this.isRangePoints=!0,this.piece=null,this.forecast=[0,0],this._zoomDomain=this._dataDomain=this._domain=this._tickStart=this._step=0,this.initScale();var t=this.options,e=t.title;r.convertToREMUseDefault16PX(t.labelStyle),r.convertToREMUseDefault16PX(e&&e.style),t.tickPadding=isNaN(t.tickPadding)?6:t.tickPadding,t.tickLength=t.enableTick?isNaN(t.tickLength)?4:t.tickLength:0,t.minorTickLength=t.enableMinorTick?isNaN(t.minorTickLength)?2:t.minorTickLength:0},_calculateSize:function(t){var e=this.options;this.tickLabelLength=this._getTickLabelLength(t);var i=this._getAxisTitleLength();i+=i>0?d():0;var n=this.tickLabelLength+i,r=this.isHorizontal(),a=this.vanchart.isInverted();if(r){var o=a?e.maxWidth:e.maxHeight;n=o?Math.min(this._maxHeight(o),n):n}else{var o=a?e.maxHeight:e.maxWidth;n=o?Math.min(this._maxWidth(o),n):n}this._size=Math.round(n)},_recordAxisSize:function(){this.isOnZero()||(this.vanchart.axisSize[this.getPosition()]+=this._size)},calculateDomainFromData:function(t){if(!t){var e=this.series;if(this.byPercent=!1,!this._isBaseAxis())for(var i=0,n=e.length;n>i&&!this.byPercent;i++)this.byPercent=e[i].options.stackByPercent;t=this._getDomainFromData()}this.indicator&&this._calculateCateDomainData(),this._dataDomain=t;var r=this.vanchart.getComponent(a.ZOOM_COMPONENT),o=this._zoomDomain||r&&r.getZoomInitDomain(this);if(this._isBaseAxis()&&o){var s=parseFloat(o[0]),h=parseFloat(o[1]);if(!isNaN(s)&&!isNaN(h)){var l=s;s=Math.min(s,h),h=Math.max(l,h)}this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],isNaN(s)?null:s,isNaN(h)?null:h)}else{var u=this.options;this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],u.min,u.max)}this._calculateDateFormat&&this._calculateDateFormat()},_calculateNiceDomain:function(t,e,i,n){var r=this.options;return r.log?this._calculateLogNiceDomain(t,e,i,n):this.byPercent?this._calculatePercentValueDomain(t,e,i,n):this._calculateValueNiceDomain(t,e,i,n)},calculateDomainFromZoom:function(){var t=this._zoomDomain,e=this.options;if(this._isBaseAxis())this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],t[0],t[1]);else{var i=r.hasDefined(e.min)?Math.max(e.min,t[0]):t[0],n=r.hasDefined(e.max)?Math.min(e.max,t[1]):t[1];if(i>n)return;var o=this.type==a.VALUE_AXIS_COMPONENT&&r.hasNotDefined(e.min),s=this.isLog()?1:0;i=o?Math.min(s,i):i,this._calculateNiceDomain(t[0],t[1],i,n)}},isCategory:function(){return this.type==a.CATEGORY_AXIS_COMPONENT},zoomRefresh:function(t){this._zoomDomain=t,this.calculateDomainFromZoom()},axisZoom:function(t,e){var i,n,o=this.type==a.DATE_AXIS_COMPONENT,s=o?1e3:1e-11,h=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-h.x,n=Math.max(t.x,e.x)-h.x,i=Math.max(i,0),n=Math.min(n,h.width)):(i=Math.min(t.y,e.y)-h.y,n=Math.max(t.y,e.y)-h.y,i=Math.max(i,0),n=Math.min(n,h.height));var l=this.scale.invert(i),u=this.scale.invert(n);o&&(l=r.date2int(l),u=r.date2int(u)),Math.abs(l-u)=15&&(i=Math.round(2*(i-m))),e=Math.max(e-p,0)+m,i=Math.max(i-g,0)+m,t[n.LEFT]=Math.max(t[n.LEFT]||0,e),t[n.RIGHT]=Math.max(t[n.RIGHT]||0,i)}else t[n.TOP]=Math.max(t[n.TOP]||0,i),t[n.BOTTOM]=Math.max(t[n.BOTTOM]||0,e)},updateAxisSizeAndBounds:function(){this._setComponentBounds(this.getPosition(),this._size)},fixScaleAndTickData:function(){this.scale.domain(this._domain).rangeRound(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},dealOnZero:function(){var t=this.options;if(t.onZero){var e=t.onZero===!0?0:t.onZero,i=this.componentType==a.X_AXIS_COMPONENT?a.Y_AXIS_COMPONENT:a.X_AXIS_COMPONENT;i=this.vanchart.getComponent(i).getAxis(e);var r,o,s,h,l=i.getZeroPos(),u=this.vanchart.bounds;this.isHorizontal()?(r=u.x,o=l+u.y-(this.getPosition()==n.TOP?this.bounds.height:0),s=u.width,h=this.bounds.height):(r=l+u.x-(this.getPosition()==n.LEFT?this.bounds.width:0),o=u.y,s=this.bounds.width,h=u.height),this.bounds={x:r,y:o,width:s,height:h}}},_getTickLabelLength:function(t){var e=this.options,i=0,n=0,r=this.isHorizontal();if(e.showLabel&&(i=isNaN(+e.tickPadding)?u():e.tickPadding),e.enableTick&&(i+=isNaN(+e.tickLength)?c:e.tickLength),t)t.forEach(function(t){var e=t.tickDim;n=Math.max(n,r?e.height:e.width)});else for(var a=this._getTickValues(),o=0,s=a.length;s>o;o++){var h=this._getTickDim(this._getTickContent(a[o],e.formatter));n=Math.max(r?h.height:h.width,n)}return i+(e.showLabel?n:0)},_getTickDim:function(t){var e=this.options,i=e.useHtml,n=e.labelRotation||0,a=e.labelStyle||{};return r.getTextDimensionWithRotation(t,a,i,n)},_updateOriginTickData:function(){var t=this._getTickValues(),e=this.options,i=e.formatter,n=e.useHtml;isNaN(e.labelRotation)?e.autoRotate?this.labelRotation=this.getLabelAutoRotation(t,e,i):this.labelRotation=0:this.labelRotation=e.labelRotation,this.tickData=[];for(var o=e.labelStyle||{},s=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},o),h=0,l=t.length;l>h;h++){var u=t[h],c=this._getTickContent(u,i);this.type===a.CATEGORY_AXIS_COMPONENT&&c&&(c=c.trim());var d,f,p=o,g=this.labelRotation;90===Math.abs(g)&&r.hasChn(c)&&(g=360,p=s),d=r.getTextDimension(c,p,n),f=r.getTextDimRotated(d,g),n&&(f.width=isNaN(parseFloat(e.labelWidth))?f.width:parseFloat(e.labelWidth),f.height=isNaN(parseFloat(e.labelHeight))?f.height:parseFloat(e.labelHeight)),this.tickData.push({tickValue:u,tickContent:c,tickDim:f,tickRectDim:d,labelRotation:g})}},_isBaseAxis:function(){return this.series.length?this.componentType==this.series[0].getBaseAxisType():!1},getLabelAutoRotation:function(){return 0},_getAxisTitleLength:function(){var t=this.options.title,e=0;if(t){var i,n;this.titleRotation=t.rotation,r.hasChn(t.text)&&90===Math.abs(t.rotation)&&(this.titleRotation=360,t.style=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},t.style)),i=r.getTextDimension(t.text,t.style,t.useHtml),n=r.getTextDimRotated(i,this.titleRotation),this.titleRectDim=i,this.titleDim=n,e=this.isHorizontal()?n.height:n.width}return e},getAxisTitleBounds:function(){var t=this.bounds,e=this.tickLabelLength+d(),i=this.getPosition(),r=t.x,a=t.y,o=t.width,s=t.height;switch(i){case n.LEFT:o-=e;break;case n.BOTTOM:a+=e,s-=e;break;case n.RIGHT:r+=e,o-=e;break;case n.TOP:s-=e}return{x:r,y:a,width:Math.max(o,0),height:Math.max(s,0)}},getTickLength:function(){var t=this.scale.range();return Math.abs(t[0]-t[1])/Math.max(this.tickData.length,1)},adjustDomain4Radius:function(){if(this.type===a.VALUE_AXIS_COMPONENT||this.type===a.DATE_AXIS_COMPONENT){var t=this._domain,e=this.type==a.DATE_AXIS_COMPONENT,i=this._getRange(),o=this._dataDomain,s=Math.max((t[0]+"").length,(t[1]+"").length);e&&(t=[r.int2date(t[0]),r.int2date(t[1])]);var h=this.scale.domain(t).range(i),l=this,u=this._isBaseAxis(),c=this.componentType===a.X_AXIS_COMPONENT?"x":"y",d=Number.MAX_VALUE,f=-Number.MAX_VALUE;if(this.series.map(function(t){if(t.visible&&((t.type===n.BUBBLE_CHART||t.type===n.SCATTER_CHART)&&t.points.map(function(t){var e=h(l.getAxisValue(t[c],t));if(t.visible&&!t.isNull&&!isNaN(e)){var i=r.pick(t.radius,t.options.marker&&t.options.marker.radius);d=Math.min(d,e-i),f=Math.max(f,e+i)}}),u&&(t.type===n.COLUMN_CHART||t.type===n.BAR_CHART||t.type===n.LINE_CHART||t.type===n.AREA_CHART))){var e=t.points;if(!e.length)return;var i,a=h(o[0]),s=h(o[1]),p=Math.min(a,s),g=Math.max(a,s);i=t.type===n.COLUMN_CHART||t.type===n.BAR_CHART?t.getSeriesOffsetAndWidth().width/2:e[0].options.marker&&e[0].options.marker.radius||1,isNaN(p)||(d=Math.min(d,p-i)),isNaN(g)||(f=Math.max(f,g+i))}}),d===Number.MAX_VALUE||f===-Number.MAX_VALUE)return;var p=h.invert(d),g=h.invert(f);e&&(p=r.date2int(p),g=r.date2int(g)),this.calculateDomainFromData([Math.min(Math.min(p,g),o[0]),Math.max(Math.max(p,g),o[1])]);var m=Math.max((this._domain[0]+"").length,(this._domain[1]+"").length);if(m>s)return!0}},_getRange:function(){return this._getPlotRange()},_getPlotRange:function(){var t=this.vanchart.bounds;return this.isHorizontal()?this.isAxisReversed()?[t.width,0]:[0,t.width]:this.isAxisReversed()?[0,t.height]:[t.height,0]},_getPlotBands:function(){var t=this.options.plotBands,e=this.scale,i=!(!e.rangeBand||!e.rangeBand());if("string"==typeof t){var n=t;t=[];for(var a=this._getTickValuesWithEndValue(),o=i?-1:0,s=a.length-1;s>o;s-=2)t.push({color:n,from:i?a[s]:a[s-1],to:a[s]})}else{t=t||[];for(var h=[],l=0,u=t.length;u>l;l++){var c=t[l];r.hasDefined(c.from)&&r.hasDefined(c.to)&&h.push(c)}t=h}return t},_getTickValuesWithEndValue:function(){var t=this._getTickValues(),e=this._domain[1],i=this.type==a.DATE_AXIS_COMPONENT;if(t.length){var n=t[t.length-1];i?r.date2int(n)n&&t.push(e)}return t},getTickData:function(){return this.tickData},getMinorTickData:function(){var t=[],e=this.options,i=this._step;if(this.options.enableMinorTick&&this.tickData.length)if(this.type==a.CATEGORY_AXIS_COMPONENT){var n=Math.round(this.getTickLength()/5),o=this.tickData.length;o=this.isRangePoints?o-1:o;for(var s=0;o>s;s++)for(var h=this.tickData[s].tickPos,l=1;5>l;l++)t.push(h+n*l)}else{for(var u=e.minorTickInterval?e.minorTickInterval:i/5,s=0,c=this.tickData.length;c-1>s;s++){var d=this.tickData[s].tickValue,f=this.tickData[s+1].tickValue,p=d instanceof Date&&f instanceof Date;d=p?r.date2int(d):d,f=p?r.date2int(f):f;for(var g=r.accAdd(d,u);f>g;g=r.accAdd(g,u))t.push(p?r.int2date(g):g)}var m=this.tickData[this.tickData.length-1].tickValue,v=this.scale.domain()[1],p=m instanceof Date&&v instanceof Date;if(m=p?r.date2int(m):m,v=p?r.date2int(v):v,v>m)for(var g=m+u;v>=g;g+=u)t.push(p?r.int2date(g):g);var _=this.tickData[0].tickValue,y=this.scale.domain()[0];if(p=_ instanceof Date&&y instanceof Date,_=p?r.date2int(_):_,y=p?r.date2int(y):y,_>y)for(g=_-u;g>=y;g-=u)t.push(p?r.int2date(g):g)}return t},getMaxTickWidth:function(){var t=0;return this.tickData.forEach(function(e){t=Math.max(t,e.tickDim.width)}),t},getTickHeight:function(){return this.options.labelStyle&&this.options.showLabel?r.getTextHeight(this.options.labelStyle):0},_calculateTickPosAndStep:function(){var t=this.options,e=this.scale,i=this.getTickLength(),n=e.rangeBand?e.rangeBand()/2:0;if(this.tickData.forEach(function(t){t.tickPos=e(t.tickValue),t.tickLabelPos=t.tickPos+n}),t.showLabel)if(t.step){var a=0;this.tickData.forEach(function(e){a++%t.step&&(e.tickContent="")})}else{var o,s=this.isHorizontal(),h=1,l=1,u=Math.abs(Math.abs(this.labelRotation)-(s?0:90)),c=u>=15&&90!==u;o=r.toRadian(u);var d,f,p,g,m=-1,v=Math.sin(o);this.tickData.forEach(function(t){if(""!==t.tickContent)if(c)g=t.tickRectDim.height,f=Math.abs(t.tickPos-d),p=(g+m)/2,f*v>p||-1===m?(h=1,d=t.tickPos,m=g):(h++,l=Math.max(l,h));else{var e=s?t.tickDim.width:t.tickDim.height;i&&(l=Math.max(l,Math.ceil(e/i)))}});var a=0;this.tickData.forEach(function(t){a++%l&&(t.tickContent="")})}else this.tickData.forEach(function(t){t.tickContent=""})},_getAxisOriginPoint:function(){var t,e,i=this.bounds,r=this.getPosition();switch(r){case n.TOP:t=i.x,e=i.y+i.height;break;case n.BOTTOM:t=i.x,e=i.y;break;case n.LEFT:t=i.x+i.width,e=i.y;break;case n.RIGHT:t=i.x,e=i.y}return{x:t,y:e}},getPosition:function(){var t=this.componentType==a.X_AXIS_COMPONENT?"bottom":"left",e=this.options.position||t;if(!this.vanchart.isInverted())return e;switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}},isAxisReversed:function(){return this.componentType===a.X_AXIS_COMPONENT&&this.vanchart.isInverted()?!this.options.reversed:this.options.reversed},isOnZero:function(){return this.options.onZero},getLineWidth:function(){return this.options.lineWidth},showArrow:function(){return this.options.showArrow},getTitleAlign:function(){var t=this.options.title;if(!t)return null;var e=t.align||"center";if(this.vanchart.isInverted())switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}return e},_calculateLogNiceDomain:function(t,e,i,n){var a=this.options,o=a.log,s=parseInt(r.pick(a.tickInterval,1));t=t>=1?1:t,t=0>=t?1:t,t=r.pick(i,t),e=r.pick(n,e),t=Math.pow(o,Math.floor(r.log(o,t))),e=Math.pow(o,Math.ceil(r.log(o,e))),this._domain=[t,e],this._tickStart=t,this._step=s},_calculatePercentValueDomain:function(t,e,i,n){var a=this.options,o=r.pick(i,0),s=r.pick(n,1),h=r.pick(a.tickInterval,.25); - this._domain=[o,s],this._tickStart=o,this._step=h},_calculateValueNiceDomain:function(t,e,i,n){var o=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),s=this.options;o&&(t>0?t=0:0>e&&(e=0)),t=r.hasDefined(i)?i:t,e=r.hasDefined(n)?n:e,t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var h=s.tickInterval||this._linearTickInterval(t,e),l=this._linearNiceDomain(t,e,h);t=r.hasDefined(i)?i:l[0],e=r.hasDefined(n)?n:l[1],t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var u=l[0];if(r.hasDefined(i)){var c=r.accMul(Math.ceil(r.accDiv(r.accAdd(i,-u),h)),h);u=r.accAdd(u,c)}this._domain=[t,e],this._tickStart=u,this._step=h},_linearTickInterval:function(t,e,i){i=i||this._getDefaultTickCount();var n=e-t,r=Math.pow(10,Math.floor(Math.log(n/i)/Math.LN10)),o=i/n*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),this.type===a.DATE_AXIS_COMPONENT&&(r=Math.max(r,1e3)),r},_linearNiceDomain:function(t,e,i){return t=r.accMul(Math.floor(t/i),i),e=r.accMul(Math.ceil(e/i),i),[t,e]},_getDefaultTickCount:function(){return this.vanchart.options.chartType==n.RADAR_CHART?p:f},getIndexByPosition:function(t){var e,i=this.getPlotBounds(),n=this.scale,o=n(this.isAxisReversed()?n.domain()[n.domain().length-1]:n.domain()[0]);e=this.isHorizontal()?t[0]-i.x-o:t[1]-i.y-o;var s;switch(this.type){case a.DATE_AXIS_COMPONENT:s=r.date2int(n.invert(e));break;default:s=n.invert(e)}return s=Math.round(s)},_valueInDomain:function(){return!0},render:function(){this.lastScale=this.scale&&this.scale.copy();var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=this.createComponentGroup(),e.clip(this.clipAxisGroup=this.createComponentGroup(),t.plotClip));var i=this.bounds,n={x:i.x,y:i.y,width:i.width,height:i.height};this.isHorizontal()?(n.x=0,n.width=t.width):(n.y=0,n.height=t.height),this.axisGroupClip?e.updateClip(this.axisGroupClip,n):(this.axisGroupClip=e.createClip(n),e.clip(this.axisGroup,this.axisGroupClip)),this.axisLineGroup||(this.axisLineGroup=e.group().addTo(t.seriesGroup)),0!==this.series.length&&(this._drawPlotBands(),this._drawGridLine(),this._drawTickLine(),this._drawTickLabel(),this._drawPlotLines(),this._drawAxisTitle(),this._drawAxisLine())},isLog:function(){return this.options.log},getZeroPos:function(){switch(this.type){case a.VALUE_AXIS_COMPONENT:return this.isLog()?this.scale(1):this.scale(0);case a.DATE_AXIS_COMPONENT:return this.scale(r.int2date(0));case a.CATEGORY_AXIS_COMPONENT:return 0}},_drawPlotBands:function(){var t,e,i,n,a,o=this._getPlotBands(),s=this.scale,u=s.rangeBand,c=u?s.rangeBand():0,d=this.vanchart.renderer,f=this.vanchart.bounds,p=this,g=p.isHorizontal(),m=0,v=0,_=f.width,y=f.height;for(this.plotBandsGroup||(this.plotBandsGroup=d.group().addTo(this.clipAxisGroup),this.plotBands=[]),this.plotBandsGroup.attr({transform:r.makeTranslate(f)}),t=o.length;tt;t++){var x=o[t],b=s(x.from),T=s(x.to);i=Math.min(b,T),n=Math.max(b+c,T+c),i=Math.max(g?m:v,i),n=Math.min(g?_:y,n),a=g?{x:i,y:v,width:Math.max(n-i,0),height:y}:{x:m,y:i,width:_,height:Math.max(n-i,0)},this.plotBands[t]=this.plotBands[t]||d.rect(a).addTo(this.plotBandsGroup),this.plotBands[t].style({fill:x.color}).animate({duration:h,ease:l,attr:a})}},_drawAxisLine:function(){var t=this.options,e=t.lineWidth,i=t.lineColor,n=this.getPlotBounds(),a=this._getAxisOriginPoint(),o="x1",s="y1",h="x2",l="y2",u=n.width,c=this.vanchart.renderer;this.isHorizontal()||(o="y1",s="x1",h="y2",l="x2",u=n.height);var d=r.lineSubPixelOpt(0,e);this.axisLine||(this.axisLine=c.line().addTo(this.axisLineGroup));var f={};if(f[o]=0,f[h]=u,f[s]=f[l]=d,f.transform=r.makeTranslate(a),this.axisLine.attr(f).style({stroke:i,"stroke-width":e}),this.showArrow()){this.arrowGroup||(this.arrowGroup=c.group().addTo(this.axisLineGroup));var p=this.arrowGroup.line||c.line().addTo(this.arrowGroup),g=this.arrowGroup.path||c.path().addTo(this.arrowGroup);this.arrowGroup.line=p,this.arrowGroup.path=g,this.isHorizontal()?(this.arrowGroup.attr("transform",r.makeTranslate([a.x+n.width,a.y])),p.attr({x1:0,y1:d,x2:6,y2:d}).style({stroke:i,"stroke-width":e}),g.attr({d:"M2,-4 L10,0 L2,4 L6,0 L2,-4"}).style({fill:i})):(this.arrowGroup.attr("transform",r.makeTranslate(a)),p.attr({x1:d,y1:0,x2:d,y2:-6}).style({stroke:i,"stroke-width":e}),g.attr({d:"M-4,-2 L0,-10 L4,-2 L0,-6 L-4,-2"}).style({fill:i}))}else this.arrowGroup&&this.arrowGroup.remove()},_drawGridLine:function(){var t=this.options,e=this.getPlotBounds(),i=this.getTickData(),o=this.scale,s=this.lastScale||o,u=t.gridLineColor,c=t.gridLineWidth;0===c&&(u="");var d=r.lineSubPixelOpt(0,c),f=this.vanchart.renderer,p="x1",g="y1",m="x2",v="y2",_=e.height;this.isHorizontal()||(p="y1",g="x1",m="y2",v="x2",_=e.width),this.gridLinesGroup||(this.gridLinesGroup=f.group().addTo(this.clipAxisGroup),this.gridLines=[]),this.gridLinesGroup.attr("transform",r.makeTranslate(e));for(var y=this.type==a.CATEGORY_AXIS_COMPONENT?[{tickPos:this.getPosition()==n.BOTTOM?e.width:e.height-1}]:[],x=this._bindData(this.gridLines,i.concat(y),function(t){return t.tickValue}),b=[],T=0,A=x.exit.length;A>T;T++){var C=x.exit[T].datum(),L=o(C.tickValue),P={};P[p]=L,P[m]=L,x.exit[T].animate({duration:h,ease:l,attr:P,style:{opacity:0}}).remove()}for(var T=0,A=x.enter.length;A>T;T++){var C=x.enter[T],M=f.line().style({stroke:u,"stroke-width":c}).addTo(this.gridLinesGroup),w=s(C.tickValue)+d,L=C.tickPos+d;w=isNaN(w)?L:w,M.attr(p,w).attr(m,w).attr(g,0).attr(v,_);var P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l}),M.datum(C),b.push(M)}b=b.concat(x.update);for(var T=0,A=b.length;A>T;T++){var M=b[T].style({stroke:u,"stroke-width":c}),C=M.datum(),L=C.tickPos+d,P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l})}this.gridLines=b},_drawTickLine:function(){function t(t,e,n){var o,s,h=m._bindData(t,e),l=[];for(o=0,s=h.exit.length;s>o;o++)h.exit[o].remove();for(o=0,s=h.enter.length;s>o;o++)l.push(g.line().datum(h.enter[o]).addTo(m.tickLinesGroup));for(l=l.concat(h.update),o=0,s=l.length;s>o;o++){var u,c=l[o].datum(),d={};u=r.hasDefined(c.tickPos)?c.tickPos:m.type==a.CATEGORY_AXIS_COMPONENT?c:m.scale(c);var f=i.x,p=i.y;m.isHorizontal()||(f=i.y,p=i.x),d[y]=u+n.det+f,d[b]=d[y],d[x]=p,d[T]=(A*n.tickLength||0)+p,l[o].attr(d).style({stroke:n.tickColor,"stroke-width":n.tickWidth})}return l}var e=this.options,i=this._getAxisOriginPoint(),o=this.getPosition(),s=this.getTickData(),h=e.enableTick?e.tickLength||0:0,l=e.tickWidth||1,u=e.tickColor,c=this.getMinorTickData(),d=e.enableMinorTick?e.minorTickLength||0:0,f=e.minorTickColor,p=e.minorTickWidth||1,g=this.vanchart.renderer,m=this,y="x1",x="y1",b="x2",T="y2";this.isHorizontal()||(y="y1",x="x1",b="y2",T="x2");var A=o==n.TOP||o==n.LEFT?-1:1,C=r.lineSubPixelOpt(0,l),L=r.lineSubPixelOpt(0,p);this.tickLinesGroup||(this.tickLinesGroup=g.group().addTo(this.axisGroup),this.tickLines={},this.tickLines[v]=[],this.tickLines[_]=[]),this.tickLines[v]=t(this.tickLines[v],s,{det:C,tickWidth:l,tickLength:h,tickColor:u}),this.tickLines[_]=t(this.tickLines[_],c,{det:L,tickWidth:p,tickLength:d,tickColor:f})},_drawPlotLines:function(){function t(t){return{stroke:t.color,"stroke-width":t.width,"stroke-dasharray":t.dataArray}}function e(t){return f.text().textContent(t.text).style(t.style).attr({x:t.textX,y:t.textY,"text-anchor":"left",dy:.85*t.textDim.height})}function i(t,i){i._textG&&(i._textG.remove(),i._textG=null),t.text&&t.textDim&&(i._textG=e(t).addTo(i))}var o=this.options.plotLines||[],s=(this.getPosition(),this.vanchart.bounds),h=this.scale,l=this.type==a.DATE_AXIS_COMPONENT,c=[],d=this,f=this.vanchart.renderer;o.forEach(function(t){if(!r.isEmpty(t.value)){var e,i,a,o,f=h(l?r.object2date(t.value):t.value)+(h.rangeBand?h.rangeBand()/2:0),p=r.lineSubPixelOpt(f,t.width);if(d.isHorizontal()){if(0>f||f>s.width)return;e=i=p,a=0,o=s.height}else{if(0>f||f>s.height)return;e=0,i=s.width,a=o=p}var g,m,v,_;if(t.label&&t.label.text&&t.label.style){_=t.label.style,v=t.label.text;var y=t.label.align,x=r.getTextDimension(v,_,t.label.useHtml);switch(y){case n.TOP:g=e-x.width,m=a;break;case n.BOTTOM:g=e-x.width,m=o-x.height;break;case n.LEFT:g=e,m=a-x.height-u();break;case n.RIGHT:g=i-x.width,m=o-x.height-u()}}c.push({color:t.color,line:{x1:e,y1:a,x2:i,y2:o},width:t.width,dataArray:n.DASH_TYPE[t.dashStyle],text:v,textDim:x,style:_,textX:g,textY:m})}}),this.plotLinesGroup||(this.plotLinesGroup=f.group().addTo(this.vanchart.backGroup),this.plotLines=[]),this.plotLinesGroup.attr("transform",r.makeTranslate(s));var p,g,m=this._bindData(this.plotLines,c);for(this.plotLines=[],p=0,g=m.exit.length;g>p;p++)m.exit[p].remove();for(p=0,g=m.enter.length;g>p;p++){var v=m.enter[p],_=f.group();this.plotLines.push(_),_._lineG=_.append(f.line(v.line).style(t(v))),i(v,_),_.addTo(this.plotLinesGroup)}for(p=0,g=m.update.length;g>p;p++){var _=m.update[p],v=_.datum();_._lineG.attr(v.line).style(t(v)),i(v,_),this.plotLines.push(_)}},_drawTickLabel:function(){this._drawSvgTickLabel()},_drawSvgTickLabel:function(){var t=this,e=this.vanchart,i=e.renderer,n=this.scale,a=this.lastScale||n,o=this.options,s=o.labelStyle,u=o.useHtml,c=this.getTickData().filter(function(t){return""!==t.tickContent});this.tickLabelsGroup||(this.tickLabelsGroup=i.vgroup().add(),this.axisGroup.append(this.tickLabelsGroup.renderG),this.tickLabels=[]);var d,f,p=this._bindData(this.tickLabels,c,function(t){return t.tickValue}),g=[],m={duration:h,ease:l,style:{opacity:0}};for(d=0,f=p.exit.length;f>d;d++){var v=p.exit[d].datum(),_=n(v.tickValue);p.exit[d].animate(r.extend({},m,t.isHorizontal()?{x:_}:{y:_}))}for(d=0,f=p.enter.length;f>d;d++){var v=p.enter[d],y=this._getLabelAttr(a,v),x=this.tickLabelsGroup.append(i.vtext(u).textContent(v.tickContent).style({opacity:0})),b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.attr(y),x.datum(v),g.push(x)}for(g=g.concat(p.update),d=0,f=g.length;f>d;d++){var x=g[d],v=x.datum();x.textContent(v.tickContent).style(s);var y=this._getLabelAttr(n,v),T=this._valueInDomain(v.tickValue)?1:0;if(this.useHtmlLabel())x.attr(y).style({opacity:T}),x.vRotate(v.labelRotation);else{var b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.animate({ease:l,duration:h,attr:y,style:{opacity:T}})}}this.tickLabels=g},_getLabelAttr:function(t,e){var i,a,o=this._getAxisOriginPoint(),s=t.rangeBand?t.rangeBand()/2:0,h=t(e.tickValue)+s,l=this.options,u=this.isHorizontal(),c=l.enableTick?l.tickLength:0,d=l.tickPadding+c||0,f=e.labelRotation||0,p=(l.labelStyle,l.useHtml),g=this.getPosition(),m=g==n.TOP||g==n.LEFT?-1:1,v=e.tickRectDim,_=e.tickDim,y=0,x=0,b=0,T=.85*v.height,A=r.toRadian(f);360===f&&(b=p||r.isMS?0:.85*v.width/2,T=0,a="tb-rl"),u?(i=Math.abs(f%90)<15?0:f>0?1:-1,x+=m*(_.height-v.height)/2,y+=m*i*(_.width-Math.abs(v.height*Math.sin(A)))/2,g===n.TOP&&(x-=v.height),x+=m*d,y+=o.x+h-v.width/2,x+=o.y):(i=Math.abs(f%90)>85?0:f>0?1:-1,y+=m*(_.width-v.width)/2,x+=m*i*(_.height-v.height*Math.cos(A))/2,g===n.LEFT&&(y-=v.width),y+=m*d,y+=o.x,x+=o.y+h-v.height/2);var C=p?"px":"",L="translate("+y+C+" "+x+C+")",P={transform:L,dy:T,dx:b,writingMode:a,"writing-mode":a};return p&&a&&(P["-webkit-writing-mode"]="vertical-rl"),P},_drawAxisTitle:function(){var t=this.options,e=t.title;if(!e||!e.text)return this.titleGroup&&this.titleGroup.remove(),void(this.titleGroup=null);var i=this.vanchart.renderer,a=this.axisGroup,o=e.useHtml,s=this.titleRotation,h=this.getTitleAlign(),l=e.text,u=e.style,c=this.titleDim,d=this.titleRectDim,f=this.getAxisTitleBounds();this.titleGroup||(this.titleGroup=i.vgroup().add(),a.append(this.titleGroup.renderG)),this.titleGroup.attr({transform:r.makeTranslate(f)});var p=this.titleGroup;p.text||(p.text=p.append(i.vtext(o)));var g=0,m=0,v=0,_=.85*d.height;switch(h){case n.TOP:m=0;break;case n.BOTTOM:m=f.height-c.height;break;case n.LEFT:g=0;break;case n.RIGHT:g=f.width-c.width;break;case n.CENTER:default:this.isHorizontal()?g=(f.width-c.width)/2:m=(f.height-c.height)/2}360===this.titleRotation?(v=o||r.isMS?0:.85*d.width/2,_=0):(g+=(c.width-d.width)/2,m+=(c.height-d.height)/2),p.text.textContent(l).attr({x:g,y:m,dy:_,dx:v}).style(u),s%360&&p.text.vRotate(s)},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.clipAxisGroup&&this.clipAxisGroup.remove(),this.axisGroup=this.clipAxisGroup=null,this.axisLineGroup&&this.axisLineGroup.remove(),this.axisLineGroup=null,this.tickLabelsGroup&&this.tickLabelsGroup.remove(),this.tickLabelsGroup=null}});return x}),define("component/CategoryAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./BaseAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=function(){return null==e&&(e=n.paddingConvertWithScale("0.1875rem")),e},h=i.extend({type:a.CATEGORY_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=o.ordinal()},calculateDomainFromData:function(){this._dataDomain=this._getDomainFromData();var t=this.vanchart.getComponent(a.ZOOM_COMPONENT);this._zoomDomain=this._zoomDomain||t&&t.getZoomDomain(this),this._domain=this._zoomDomain||this._dataDomain},calculateDomainFromZoom:function(){this._domain=this._zoomDomain},_getStartAndEndTick:function(){return[this._domain[0],this._domain[this._domain.length-1]]},_getDomainFromData:function(){var t=this.options,e=this.series,i=this,n={},a=t.categories||[];return a.forEach(function(t){n[t]=!0}),e.forEach(function(t){this.getTrendLineForecast(t);for(var e=0,o=t.points.length;o>e;e++){var s=t.points[e].category;n[s]||(n[s]=!0,a.push(s))}t.type!==r.AREA_CHART&&(i.isRangePoints=!1)},this),this.addTrendLineCategories(a)},setCategories:function(t){var e=this._dataDomain;this._dataDomain=this.addTrendLineCategories(t);var i=this.vanchart.getComponent(a.ZOOM_COMPONENT);if(this._isBaseAxis()&&i&&i.zoomToolEnabled()){i.updateRangeLeftAndRight(this,e,t);var n=i&&i.getZoomDomain(this);this._zoomDomain=n,this.calculateDomainFromZoom()}else this._domain=this._dataDomain,this._zoomDomain=null;this.fixScaleAndTickData()},addTrendLineCategories:function(t){function e(t,e){return Array.apply(null,Array(t)).map(e)}if(this.forecast&&(this.forecast[0]||this.forecast[1])){var i=0;t=e(-this.forecast[0],function(){return Array(2+i++).join(" ")}).concat(t).concat(e(this.forecast[1],function(){return Array(2+i++).join(" ")}))}return t},getOriginalCategories:function(){return this.forecast&&(this.forecast[0]||this.forecast[1])?this._dataDomain.slice(-this.forecast[0],this._dataDomain.length-this.forecast[1]):this._dataDomain},updateAxisSizeAndBounds:function(){this._updateOriginTickData(),this._calculateSize(this.tickData),this._setComponentBounds(this.getPosition(),this._size)},_getTickValuesWithEndValue:function(){return this._getTickValues()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain),this.isRangePoints?this.scale.rangePoints(this._getRange()):this.scale.rangeBands(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},_getRange:function(){var t=this._getPlotRange();if(this._dataDomain.length==this._domain.length)return t;var e,i=Math.abs(t[1]-t[0]);e=this.isRangePoints?i/Math.max(this._domain.length-1,1):i/this._domain.length;var r=n.indexOf(this._dataDomain,this._domain[0]),a=this._dataDomain.length-n.indexOf(this._dataDomain,this._domain[this._domain.length-1])-1;if(!(this.isAxisReversed()^this.isHorizontal())){var o=r;r=a,a=o}var s=-r*e,h=i+a*e;return this.isHorizontal()?this.isAxisReversed()?[h,s]:[s,h]:this.isAxisReversed()?[s,h]:[h,s]},getLabelAutoRotation:function(t,e,i){if(e.autoRotate&&!e.labelRotation){var r,a,o=this.vanchart.isInverted(),h=t.reduce(function(t,e){return n.getTextDimension(t).width>n.getTextDimension(e).width?t:e}),l=this._getTickContent(h,i),u=n.getTextDimensionWithRotation(l,e.labelStyle,e.useHtml,e.labelRotation),c=Math.max.apply(null,this._getPlotRange())/this._domain.length-s();o?(r=u.height,a=u.width):(r=u.width,a=u.height);var d=Math.sqrt(r*r+a*a);if(a>c)return-90;if(r>c){var f=Math.acos(c/d),p=Math.atan(a/r),g=f+p;return-n.toDegree(g)}}},getCategoryCount:function(){return this._dataDomain.length},indexOfLabel:function(t){return n.indexOf(this._dataDomain,t)},getTickLength:function(){var t=this.scale.domain(),e=this.scale.rangeExtent(),i=Math.abs(e[1]-e[0]);return this.isRangePoints&&t.length<=1?i:this.isRangePoints?i/(t.length-1):this.scale.rangeBand()},_getTickValues:function(){return this._domain},getCategories:function(){return this._dataDomain},axisZoom:function(t,e){var i,r,a=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-a.x,r=Math.max(t.x,e.x)-a.x):(i=Math.min(t.y,e.y)-a.y,r=Math.max(t.y,e.y)-a.y);var s=this.scale.domain(),h=this._getRange(),l=o.quantize().domain(h).range(s),u=n.indexOf(this._dataDomain,l(i)),c=n.indexOf(this._dataDomain,l(r));this.zoomRefresh(this._dataDomain.slice(Math.min(u,c),Math.max(u,c)+1))},getIndexByPosition:function(t){return this._getIndexByXYCoordinate(t)},_getIndexByXYCoordinate:function(t){var e,i=this.getPlotBounds(),n=this.scale,r=this.isHorizontal(),a=this.isAxisReversed()^!r,o=n(a?n.domain()[n.domain().length-1]:n.domain()[0]);e=r?t[0]-i.x-o:t[1]-i.y-o;var s,h=this.getCategories();if(h.length>1){var l=Math.abs(n(n.domain()[1])-n(n.domain()[0]));s=a?h.length-1-e/l:e/l}else s=0;return s=this.isRangePoints?Math.round(s):a?Math.ceil(s):Math.floor(s)},getPointsInCategory:function(t){var e=this.vanchart.bounds,i=this.scale.domain(),n=this._getRange(),r=o.quantize().domain(n).range(i),a=r(this.isHorizontal()?t.x-e.x:t.y-e.y);return this.vanchart.getValidPointsPara(a)},drawHighlightBackground:function(t){var e=t[0].category,i="line";t.map(function(t){var e=t.series;(e.type===r.BAR_CHART||e.type===r.COLUMN_CHART)&&(i="band")});var a=this.getPlotBounds(),o=this.isHorizontal(),s=this.scale,h=s.rangeBand?s.rangeBand():0,l=s(e),u=l+h,c=this.vanchart.renderer,d="x",f="y",p="width",g="height",m=a.height,v="x1",_="x2",y="y1",x="y2";switch(o||(d="y",f="x",p="height",g="width",m=a.width,v="y1",_="y2",y="x1",x="x2"),i){case"band":this.highlightBand||(this.highlightBand=c.rect().style({fill:"rgb(98,179,240)","fill-opacity":.2}).addTo(this.clipAxisGroup)),this.highlightBand.attr("transform",n.makeTranslate(a)).attr(d,l).attr(f,0).attr(p,Math.abs(l-u)).attr(g,m),this.highlightLine&&this.highlightLine.remove(),this.highlightLine=null;break;case"line":default:h&&(l=(l+u)/2),this.highlightLine||(this.highlightLine=c.line().style({stroke:"rgb(140,140,140)","stroke-width":1}).addTo(this.clipAxisGroup)),this.highlightLine.attr("transform",n.makeTranslate(a)).attr(v,l).attr(y,0).attr(_,l).attr(x,m),this.highlightBand&&this.highlightBand.remove(),this.highlightBand=null}},removeHighlightBackground:function(){this.highlightBand&&this.highlightBand.remove(),this.highlightLine&&this.highlightLine.remove(),this.highlightBand=null,this.highlightLine=null}});return a.register(a.CATEGORY_AXIS_COMPONENT,h),h}),define("component/ValueAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../utils/QueryUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=e.extend({type:n.VALUE_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=this.options.log?r.log().base(this.options.log):r.linear()},getAxisValue:function(t,e){return this.byPercent?e.percentage:+t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Number.MAX_VALUE,e=-t,i=!0,n=this.series,r={},a=!1,o=0,s=n.length;s>o&&!a;o++)a=n[o].visible;for(var o=0,s=n.length;s>o;o++)(n[o].visible||!a)&&(this._getSeriesValue(r,n[o]),this.getTrendLineForecast(n[o]));var h=0;for(var l in r){var u=r[l];h=u[1]-u[0]||0;for(var c=0,d=u.length;d>c;c++)isNaN(u[c])||this.options.log&&u[c]<=0||(t=Math.min(t,u[c]),e=Math.max(e,u[c]),i=!1)}return this._isBaseAxis()&&h&&this.forecast&&(t+=h*this.forecast[0],e+=h*this.forecast[1]),i&&(t=0,e=100),[t,e]},_getSeriesValue:function(t,e){var r=e.name||"",a=this.componentType==n.X_AXIS_COMPONENT?"x":"y";if(i.hasNotDefined(e.stack)||this._isBaseAxis())t[r]=t[r]||[],e.points.forEach(function(e){!e.isNull&&e.visible&&t[r].push(e.options[a])});else{var o=e.stack+e.type+"STACK_POSITIVE",s=e.stack+e.type+"STACK_NEGATIVE";t[o]=t[o]||[],t[s]=t[s]||[],e.points.forEach(function(e,i){if(!e.isNull&&e.visible){var n=+e.options[a];n>0?null!=t[o][i]&&void 0!=t[o][i]?t[o][i]+=n:t[o][i]=n:null!=t[s][i]&&void 0!=t[s][i]?t[s][i]+=n:t[s][i]=n}})}},getStartPos:function(){return this.scale(this.getStartPosValue())},getStartPosValue:function(){var t=this.options;return t.log&&1!==t.log?1:0},_getTickValues:function(){var t=[];if(this.options.log)for(var e,n=0;(e=this._tickStart*Math.pow(this.options.log,n))<=this._domain[1];)t.push(e),n+=this._step;else for(var r=this._tickStart;r<=this._domain[1];r=i.accAdd(r,this._step))t.push(r);return t}});return n.register(n.VALUE_AXIS_COMPONENT,a),a}),define("component/DateAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=1e3,o=60*a,s=60*o,h=24*s,l=31*h,u=12*l,c=e.extend({type:n.DATE_AXIS_COMPONENT,getAxisValue:function(t){return i.object2date(t)},fixScaleAndTickData:function(){var t=[i.int2date(this._domain[0]),i.int2date(this._domain[1])];this.scale.domain(t).rangeRound(this._getRange()),this._calculateDateFormat(),this._updateOriginTickData(),this._calculateTickPosAndStep()},_calculateDateFormat:function(){var t=this._step,e="Dyyyy";a>=t?e="Dss":o>=t?e="Dmm:ss":s>=t?e="Dhh:mm":h>=t?e="Ddd-hh":l>=t?e="DMM-dd":u>=t&&(e="Dyyyy-MM"),this.dateFormat=e},_getTickContent:function(t,e){function n(t){return window.FR&&window.FR.contentFormat(t,r)||t}var r=this.dateFormat;return e=e||n,i.format(t,e)},initScale:function(){this.lastScale=this.scale,this.scale=r.linear()},_getStartAndEndTick:function(){return[i.int2date(this._domain[0]),i.int2date(this._domain[1])]},_getTickValues:function(){for(var t=[],e=this._tickStart;e<=this._domain[1];e=i.accAdd(e,this._step))t.push(i.int2date(e));return t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Math.ceil(Number.MAX_VALUE),e=-t,n=this.series,r=!1,a=0,o=0,s=n.length;s>o;o++){var h=n[o],l=h[this.componentType];if(l==this&&h.visible){this.getTrendLineForecast(n[o]);var u=h.points;u.length>1&&(a=this.getValueFromData(u[1])-this.getValueFromData(u[0])||0);for(var o=0,s=u.length;s>o;o++){var c=this.getValueFromData(u[o]);c.getTime&&(r=!0,c=i.date2int(c),t=Math.min(t,c),e=Math.max(e,c))}}}return this._isBaseAxis()&&a&&this.forecast&&(t+=a*this.forecast[0],e+=a*this.forecast[1]),r||(t=e=(new Date).getTime()),e=t>=e?t+1e3:e,[t,e]},getValueFromData:function(t){var e=this.componentType==n.X_AXIS_COMPONENT?0:1,r=this.componentType==n.X_AXIS_COMPONENT?"x":"y",a=i.isArray(t)?t[e]:t[r];return i.object2date(a)}});return n.register(n.DATE_AXIS_COMPONENT,c),c}),define("component/Axis",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","./CategoryAxis","./ValueAxis","./DateAxis"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("./CategoryAxis"),o=t("./ValueAxis"),s=t("./DateAxis"),h=e.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=i.isArray(t)?t:[t];for(var e=t.length,n=e;n=0;n--)if(t[n].axisIndex=n,this._axisList[n]&&this._axisList[n].type!=t[n].type&&(this._axisList[n].remove(),this._axisList[n]=null),this._axisList[n])this._axisList[n].refresh(t[n]);else{var h,l=t[n].type||r.VALUE_AXIS_COMPONENT;l==r.VALUE_AXIS_COMPONENT?h=o:l==r.CATEGORY_AXIS_COMPONENT?h=a:l==r.DATE_AXIS_COMPONENT&&(h=s),this._axisList[n]=new h(t[n],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].calculateDomainFromData(),this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},reCalculateSize:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},updateAxisClip:function(){for(var t={},e=this._axisList.length,i=e-1;i>=0;i--)this._axisList[i].updateClipBounds(t);this._recordForPlotBounds(n.LEFT,t[n.LEFT]||0),this._recordForPlotBounds(n.RIGHT,t[n.RIGHT]||0),this._recordForPlotBounds(n.TOP,t[n.TOP]||0),this._recordForPlotBounds(n.BOTTOM,t[n.BOTTOM]||0)},updateAxisSizeAndBounds:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].updateAxisSizeAndBounds()},adjustDomain4Radius:function(){for(var t=!1,e=this._axisList.length,i=e-1;i>=0;i--)t=this._axisList[i].adjustDomain4Radius()||t;return t},fixBoundsByPlot:function(){for(var t=this.vanchart.bounds,e={},r=0,a=this._axisList.length;a>r;r++){var o=this._axisList[r],s=o.getPosition();o.isOnZero()?(l?o.bounds.width=t.width:o.bounds.height=t.height,o.fixScaleAndTickData()):(e[s]=e[s]||[],e[s].push(o))}for(var s in e)for(var h=e[s],l=s==n.TOP||s==n.BOTTOM,r=0,u=h.length;u>r;r++){var o=h[r],c=o.bounds,d=h[r-1]&&h[r-1].bounds||t;if(l){var f=s==n.TOP?d.y-c.height:d.y+d.height;o.bounds=i.makeBounds(d.x,f,d.width,c.height)}else{var p=s==n.LEFT?d.x-c.width:d.x+d.width;o.bounds=i.makeBounds(p,d.y,c.width,d.height)}o.fixScaleAndTickData()}},getAxis:function(t){return t>=this._axisList.length&&(t=0),this._axisList[t]},getAxisCount:function(){return this._axisList.length},axisZoom:function(t,e){this._axisList.forEach(function(i){i.axisZoom(t,e)})},dealOnZero:function(){this._axisList.forEach(function(t){t.dealOnZero()})},render:function(){for(var t=0,e=this._axisList.length;e>t;t++)this._axisList[t].render()}});return r.register(r.X_AXIS_COMPONENT,h),r.register(r.Y_AXIS_COMPONENT,h),h}),define("component/GaugeAxis",["require","../Constants","./Axis","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("./Axis")),i=t("../ComponentLibrary"),n=e.extend({initAttributesWithSeries:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){var i=this._axisList[e];i.calculateDomainFromData(),i.scale.domain(i._domain),i._updateOriginTickData(),i.options.showLabel||i.tickData.forEach(function(t){t.tickContent=""})}},doLayout:function(){},render:function(){}});return i.register(i.GAUGE_AXIS_COMPONENT,n),n}),define("component/LegendItem",["require","../dom/Evented","../Constants","../utils/BaseUtils","./LegendIconFactory","../ComponentLibrary"],function(t){var e,i=t("../dom/Evented"),n=t("../Constants"),r=t("../utils/BaseUtils"),a=t("./LegendIconFactory"),o=t("../ComponentLibrary"),s=function(){return null==e&&(e=r.paddingConvertWithScale("0.5rem")),e},h=i.extend({initialize:function(t,e){this.legendX=0,this.legendY=0,this.legend=t,this.refresh(e)},refresh:function(t){this.options=t,t.renderItem=this},render:function(){var t=this.legend,e=t.vanchart,i=e.renderer,o=t.options.style;this.graphic||(this.graphic=t.legendItemsGroup.append(i.group()),this.options.isTrendLine||this.graphic.style({cursor:"pointer"})),e.registerInteractiveTarget(this,this.graphic);var h=this.graphic,l=this.options,u=l.visible?l.color:l.hiddenColor,c=a.getLegendIconSize(l.legendIconType),d=r.getTextDimension(l.itemName,o,t.options.useHtml),f=Math.max(c.height,d.height);this.graphic.attr({transform:r.makeTranslate([this.legendX,Math.round(this.legendY+f/2)])}),a.hasIcon(l.legendIconType)?(h.image&&h.image.remove(),h.image=null,h.path=h.path||i.path().addTo(h),h.path.attr("d",a.getLegendIconPath(l.legendIconType)).attr("transform",r.makeTranslate([0,-c.height/2])).style({fill:u,"fill-opacity":l.opacity}),l.series.type==n.BUBBLE_CHART&&h.path.style("stroke",u).style("stroke-width",1)):(h.path&&h.path.remove(),h.path=null,h.image=h.image||i.image().addTo(h),h.image.attr({x:0,y:-c.height/2,width:12,height:12,preserveAspectRatio:"none"}).imageContent(l.legendIconType));var p=r.isSupportSVG()?{dy:"0.32em"}:{};h.text=h.text||h.append(i.vtext()),h.text.textContent(l.itemName||"").style("margin-top","-0.7em").attr(p).attr("x",c.width+s()).style({cursor:this.options.isTrendLine?"default":"pointer","white-space":"nowrap"}).style(o).style({fill:l.visible?o.color:l.hiddenColor})},getEvents:function(){return this.options.isTrendLine?{}:{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},onMouseOver:function(){this.legend.options.hover?r.getFormatterFunction(this.legend.options.hover)():(this.graphic&&this.graphic.text&&this.graphic.text.style({fill:this.options.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(this.options.itemName)))},onMouseOut:function(t){var e=this,i=e.legend,n=e.options,r=n.visible?i.options.style.color:n.hiddenColor;this.graphic&&this.graphic.text&&this.graphic.text.style({fill:r})},onTap:function(){if(this.legend.options.click)return void r.getFormatterFunction(this.legend.options.click)();for(var t=this.options.bindName,e=this.legend.vanchart,i=e.series,a={},s=0,h=i.length;h>s;s++){var l=i[s];if(l.isSeriesAccumulated()){var u="name";l.points.map(function(e){e[u]==t&&(e.visible=!e.visible)})}else l.name===t&&(l.visible=!l.visible,l.state=l.visible?n.STATE_TO_SHOW:n.STATE_TO_DROP,l._getAxisTypes().forEach(function(t){var e=l[t];!e||e._isBaseAxis()||a[r.stamp(e)]||(a[r.stamp(e)]=!0,e.calculateDomainFromData(),e.componentType===o.X_AXIS_COMPONENT||e.componentType===o.Y_AXIS_COMPONENT?e.adjustDomain4Radius():e.fixScaleAndTickData())}))}this.options.visible=!this.options.visible,this.options.pairLegendOpt&&(this.options.pairLegendOpt.visible=this.options.visible,this.options.pairLegendOpt.renderItem.render(),this.options.pairLegendOpt.renderItem.onMouseOut()),e.reRenderWholePlot()},remove:function(){this.graphic&&this.graphic.remove(),this.graphic=null}});return h}),define("component/Legend",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","./LegendItem","../dom/Evented","../utils/BezierEasing","../ComponentLibrary"],function(t){var e,i,n,r,a=t("./Base"),o=t("../utils/BaseUtils"),s=t("../Constants"),h=t("./LegendIconFactory"),l=t("./LegendItem"),u=t("../dom/Evented"),c=t("../utils/BezierEasing"),d=t("../ComponentLibrary"),f=function(){return null==e&&(e=o.paddingConvertWithScale("0.312rem")),e},p=function(){return null==i&&(i=o.paddingConvertWithScale("0.5rem")),i},g=12,m=function(){return null==n&&(n=o.paddingConvertWithScale("0.25rem")),n},v=function(){return null==r&&(r=o.paddingConvertWithScale("1rem")),r},_="rgb(67,67,72)",y="rgb(204,204,204)",x=a.extend({doLayout:function(){return this.invisible()?void this.remove():(this.items=this.items||[],this.yPanEnabled=!1,this.xPanEnabled=!1,this.hasPages=!1,this._updateLegendItems(),void this._layoutLegendItemBounds())},_updateLegendItems:function(){var t,e,i=this.vanchart.series,n={},r={},a=this,o=this.vanchart,h=[];for(t=0,e=i.length;e>t;t++){var u=i[t],c=u.type;if(c!=s.GAUGE_CHART)if(u.isSeriesAccumulated()){var d="name";u.points.map(function(t){if(!n[t[d]]){var e={color:o.getDefaultSeriesColor(t[d]),opacity:t.opacity,bindName:t[d],itemName:t[d],visible:t.visible};a._mergeCommonLegendAttr(u,e),n[t[d]]=!0,h.push(e)}})}else{if(!n[u.name]){var f={color:u.color,opacity:u.opacity,bindName:u.name,itemName:u.name,visible:u.visible};a._mergeCommonLegendAttr(u,f),n[u.name]=f,h.push(f)}if(u.options.trendLine&&!r[u.name]){var f={isTrendLine:!0,color:u.options.trendLine.color,opacity:u.opacity,bindName:u.name,itemName:u.options.trendLine.name,visible:u.visible};a._mergeCommonLegendAttr(u,f), - f.legendIconType=void 0,n[u.name].pairLegendOpt=f,f.pairLegendOpt=n[u.name],r[u.name]=f,h.push(f)}}}for(t=h.length,e=this.items.length;e>t;t++)this.items[t].remove(),this.items[t]=null;for(t=0,e=h.length;e>t;t++)this.items[t]?this.items[t].refresh(h[t]):this.items[t]=new l(a,h[t]);this.items.length=h.length},_mergeCommonLegendAttr:function(t,e){var i=this.options,n=i.hiddenColor,r=i.hoverColor||i.style.color;o.extend(e,{series:t,hiddenColor:n,hoverColor:r,legendIconType:this._getLegendType(t),lineIndex:0})},_layoutLegendItemBounds:function(){var t=this.options,e=t.position||s.RIGHT;if(this.items.length)if(e==s.TOP||e==s.BOTTOM){var i=this._layoutHorizontalLegendItemBounds(),n=i.height,r=this._maxHeight();this.yPanEnabled=t.maxHeight&&n>r,this.maxYPan=-i.height+20;var a=(this.yPanEnabled?r:n)+2*f();this._setComponentBounds(e,a);var o=this.bounds.x+f(),h=this.bounds.y+f(),l=this.bounds.height-2*f()+2*(this.options.borderWidth||0),u=this.bounds.width-2*f(),c=i.width-2*f();o+=(u-c)/2,this.bounds={x:o,y:h,width:c,height:l}}else{var p=0;if((e==s.RIGHT||e==s.RIGHT_TOP)&&!this.isFloat){var v=this.vanchart.getComponent(d.TOOLBAR_COMPONENT);v&&(p=37);var _=this.vanchart.getComponent(d.TITLE_COMPONENT);_&&_.bounds&&!_.isFloat&&(p-=_.bounds.height)}var i=this._layoutVerticalLegendItemBounds(),n=i.width,y=this._maxWidth(),l=this.vanchart.bounds.height-(this.isFloat?0:2*f())-p;if(this.hasPages=i.height-m()>l,this.hasPages){l-=g+f(),this.pageIndex=this.pageIndex||0,this.translateMap=[0];for(var x=0,b=0,T=this.items.length;T>b;b++){var A=this.items[b].legendY;A-x>l&&(x=A-m(),this.translateMap.push(-A))}this.pageCount=this.translateMap.length,n=Math.max(n,this._getPageButtonWidth(this.pageCount))}this.yPanEnabled=this.hasPages,this.xPanEnabled=t.maxWidth&&n>y,this.maxYPan=-i.height+20,this.maxXPan=y-n;var C=(this.xPanEnabled?y:n)+(this.isFloat?0:2*f());this._setComponentBounds(e,C);var o=this.bounds.x+(this.isFloat?0:f()),h=this.bounds.y+(this.isFloat?0:f()),u=this.bounds.width-(this.isFloat?0:2*f()),l=this.bounds.height-(this.isFloat?0:2*f())-p,L=Math.min(i.height,l);h=Math.max(p,h),this.isFloat||e==s.RIGHT_TOP||(h+=Math.round((l-L)/2)),this.bounds={x:o,y:h,width:u,height:L}}},_getPageButtonWidth:function(t){var e={fontFamily:this.options.style.fontFamily||"Verdana",fontSize:"14px"},i=t+"/"+t,n=(f(),o.getTextDimension(i,e,!1));return 2*g+n.width},_layoutVerticalLegendItemBounds:function(){for(var t=0,e=f(),i=this.options.borderWidth||0,n=0,r=this.items.length;r>n;n++){var a=this.items[n],s=a.options,l=o.getTextDimension(s.itemName,this.options.style,this.options.useHtml),u=h.getLegendIconSize(this.items[n].legendIconType);t=Math.max(l.width+p()+u.width,t),a.legendX=f()+i/2,a.legendY=e,e+=Math.max(l.height,u.height)+m()}return{width:2*f()+t,height:e+f()}},_layoutHorizontalLegendItemBounds:function(){for(var t=this.vanchart.bounds,e=t.width-4*f(),i=f(),n=f(),r=i,a=[],s=[],l=0,u=0,c=this.items.length;c>u;u++){var d=this.items[u],g=d.options,m=h.getLegendIconSize(g.legendIconType),_=o.getTextDimension(g.itemName,this.options.style,this.options.useHtml),y=Math.min(m.width+p()+_.width,e-1);e>i+y?(d.legendX=i,d.legendY=n):(a.push({items:s,usedWidth:i}),l=0,i=f(),n+=Math.max(_.height,m.height),d.legendX=i,d.legendY=n,s=[]),s.push(d),l=Math.max(l,_.height),i+=y+v(),r=Math.max(i,r)}return a.push({items:s,usedWidth:i}),a.forEach(function(t){var e=t.usedWidth,i=t.items,n=Math.max((r-e)/2,0);i.forEach(function(t){t.legendX+=n})}),n+=l,{width:Math.round(r)+f(),height:Math.round(n)+f()}},render:function(){if(!this.invisible()&&this.items.length){var t=this.bounds,e=this,i=e.vanchart,n=i.renderer;this.legendGroup||(this.legendGroup=this.createComponentGroup(),this.backgroundGroup=n.group().addTo(this.legendGroup),this.clipGroup=n.group().addTo(this.legendGroup),this.legendItemsGroup=n.group().addTo(this.clipGroup),i.registerInteractiveTarget(this,this.legendGroup)),this.legendGroup.attr("transform",o.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,o.makeBounds(0,0,t.width,t.height));for(var r=0,a=this.items.length;a>r;r++)this.items[r].render();var s={x:0,y:0,width:t.width,height:t.height};this.hasPages?(s.height-=g,this.pageButton=this.pageButton||new b(e),this.pageButton.refresh()):this.pageButton&&(this.pageButton.remove(),this.pageButton=null),this.verticalClip?n.updateClip(this.verticalClip,s):(this.verticalClip=n.createClip(s),n.clip(this.clipGroup,this.verticalClip))}},getEvents:function(){return{mouseout:this.mouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},onWheel:function(t){var e=t.srcEvent;e.preventDefault(),this.getLegendPos(),this.moveLegend(-e.deltaX,-e.deltaY)},onPanStart:function(t){this.initPos=t.containerPoint,this.getLegendPos()},onPanMove:function(t){var e=t.containerPoint.x-this.initPos.x,i=t.containerPoint.y-this.initPos.y;this.moveLegend(e,i)},onPanEnd:function(){this.vanchart.handler.panTarget=null},getLegendPos:function(){var t=this.legendItemsGroup.trans||[0,0];this.initTranslateX=t[0],this.initTranslateY=t[1]},moveLegend:function(t,e){var i=0,n=0;if(this.xPanEnabled&&(i=t+this.initTranslateX,i=Math.max(this.maxXPan,Math.min(0,i))),this.yPanEnabled&&(n=e+this.initTranslateY,n=Math.max(this.maxYPan,Math.min(0,n))),this.hasPages&&this.pageButton){for(var r=this.translateMap.length-1,a=0,s=this.translateMap.length-1;s>a;a++){var h=this.translateMap[a],l=this.translateMap[a+1];h>=n&&n>l&&(r=a)}this.pageIndex!=r&&(this.pageIndex=r,this.pageButton.updatePage())}this.legendItemsGroup.attr("transform",o.makeTranslate([i,n])),this.legendItemsGroup.trans=[i,n]},remove:function(){this.legendGroup&&this.legendGroup.remove(),this.legendGroup=null,this.items&&(this.items.length=0)}}),b=u.extend({initialize:function(t){this.legend=t},refresh:function(){var t=this.legend,e=t.vanchart,i=e.renderer,n=t.bounds,r=t._getPageButtonWidth(t.pageCount),a=n.height,s=a-g,h=(n.width-r)/2;this.pageGroup||(this.pageGroup=i.group().addTo(t.legendGroup),e.registerInteractiveTarget(this,this.pageGroup),this.leftButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.rightButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.pageText=i.text().style({fontFamily:t.options.style.fontFamily||"Verdana",fontSize:"14px"}).addTo(this.pageGroup));var l=r-g,u=h+(r-l)/2,c=h+(r+l)/2,d=h+r/2;this.pageGroup.attr("transform",o.makeTranslate([0,s])),this.leftButton.attr("d",this._prePageButtonPath(u)),this.rightButton.attr("d",this._nextPageButtonPath(c)),this.pageText.attr({x:d,y:"-.14em",dy:".85em"}).attr("text-anchor","middle"),this.updatePage()},remove:function(){this.pageGroup&&(this.pageGroup.remove(),this.pageGroup=null)},updatePage:function(){var t=this.legend,e=t.pageIndex,i=t.pageCount;this.leftButton.style({fill:0>=e?y:_}),this.rightButton.style({fill:i-1>e?_:y});var n=e+1+"/"+i;this.pageText.textContent(n),this.pageText.vMiddle()},_prePageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=e/2*Math.sqrt(3),a=t+e/2,o=r;return"M"+t+","+i+"L"+n+","+r+"L"+a+","+o+"Z"},_nextPageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=i,a=t+e/2,o=i,s=t,h=e/2*Math.sqrt(3);return"M"+n+","+r+"L"+a+","+o+"L"+s+","+h+"Z"},onTap:function(t){var e=t.srcEvent,i=e.target||e.srcElement,n=this.legend;if(this.leftButton.node()==i){if(n.pageIndex<=0)return;n.pageIndex--}else if(this.rightButton.node()==i){if(n.pageIndex==n.pageCount-1)return;n.pageIndex++}n.legendItemsGroup.animate({duration:500,ease:c.css.swing,attr:{transform:"translate(0,"+n.translateMap[n.pageIndex]+")"}}),n.legendItemsGroup.trans=[0,n.translateMap[n.pageIndex]],this.updatePage()},getEvents:function(){return{tap:this.onTap}}});return d.register(d.LEGEND_COMPONENT,x),x}),define("component/Zoom",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=t("../utils/PathGenerator"),h=30,l=10,u="none",c="left-to-right",d="right-to-left",f=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},p=i.extend({_refresh:function(){this.rangeLeftTop=this.rangeRightBottom=null},doLayout:function(){if(this.byAxisType=this.vanchart.chartType()==r.BAR_CHART?"yAxis":"xAxis",this.byAxis=this.vanchart[this.byAxisType](),this.zoomToolEnabled()){var t=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT),e=0,i=this.byAxis.getPosition();(t||i==r.TOP||i==r.RIGHT||this.byAxis.isOnZero())&&(e=f()),this._setComponentBounds(this.byAxis.isHorizontal()?r.BOTTOM:r.LEFT,h+e)}},fixBoundsByPlot:function(){if(this.zoomToolEnabled()){for(var t,e=this.vanchart.components[this.byAxisType],i=e.getAxisCount(),o=0;i>o;o++){var s=e.getAxis(o),h=s.getPosition();(h==r.BOTTOM||h==r.LEFT)&&(t=s)}t=t||this.byAxis,h=t.getPosition();var l=this.vanchart.bounds;if(t.isHorizontal()){var u,c=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT);u=c?c.bounds.y+c.bounds.height+f():t.isOnZero()||h==r.TOP?l.y+l.height+f():t.bounds.y+t.bounds.height,this.bounds=n.makeBounds(l.x,u,l.width,this.bounds.height)}else{var d;d=t.isOnZero()||h==r.RIGHT?l.x-this.bounds.width:t.bounds.x-this.bounds.width,this.bounds=n.makeBounds(d,l.y,this.bounds.width,l.height)}}},initToolDomain:function(t){var e=this.options.zoomTool;e.from=n.hasDefined(e.from)&&""!==e.from?e.from:null,e.to=n.hasDefined(e.to)&&""!==e.to?e.to:null,t.type===a.DATE_AXIS_COMPONENT&&(e.from=n.date2int(n.object2date(e.from)),e.to=n.date2int(n.object2date(e.to)))},getZoomInitDomain:function(t){var e=this.byAxis;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var i=this.options.zoomTool;return this.initToolDomain(e),[i.from,i.to]}},getZoomDomain:function(t){var e=this.byAxis,i=t.isCategory()?e._dataDomain:e._domain;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var r=this.options.zoomTool;this.initToolDomain(e);var a=n.pick(this.rangeLeftTop,r.from,i[0]),o=n.pick(this.rangeRightBottom,r.to,i[i.length-1]);return this._getValidDomain(a,o,i,e.isCategory())}},getMinAndMaxPos:function(){var t=this.getZoomDomain(this.byAxis),e=this.axisScale,i=e(t[0]),n=e(t[t.length-1]);return[Math.min(i,n),Math.max(i,n)+(e.rangeBand?e.rangeBand():0)]},updateRangeLeftAndRight:function(t,e,i){var r=n.indexOf(e,this.rangeLeftTop),a=n.indexOf(e,this.rangeRightBottom),o=i.slice(Math.min(r,a),Math.max(r,a)+1);t.isAxisReversed()^t.isHorizontal()?(this.rangeLeftTop=o[0],this.rangeRightBottom=o[o.length-1]):(this.rangeLeftTop=o[o.length-1],this.rangeRightBottom=o[0])},_getValidDomain:function(t,e,i,r){var a;if(r){var o=i.length-1,s=0;return t=n.indexOf(i,t),e=n.indexOf(i,e),t=Math.min(Math.max(t,s),o),e=Math.min(Math.max(e,s),o),t>e&&(a=e,e=t,t=a),i.slice(t,e+1)}return t=parseFloat(t),e=parseFloat(e),t>e&&(a=e,e=t,t=a),[t,e]},zoomToolEnabled:function(){var t=this.options;return this.vanchart.series.length&&t&&t.zoomTool&&t.zoomTool.enabled&&n.isSupportSVG()},_getAxisScale:function(){var t=this.byAxis,e=t.scale.copy();if(t.type==a.CATEGORY_AXIS_COMPONENT)e.rangeBand?e.rangeBands(t._getPlotRange()):e.range(t._getPlotRange());else{var i=t._dataDomain,r=this.getZoomDomain(t),o=Math.min(i[0],r[0]),s=Math.max(i[1],r[1]);t.type==a.DATE_AXIS_COMPONENT&&(o=n.int2date(o),s=n.int2date(s)),e.domain([o,s])}return e},render:function(){if(this.remove(),!this.zoomBarGroup&&this.zoomToolEnabled()){this.axisScale=this._getAxisScale();var t=this,e=t.bounds,i=t.vanchart,r=(i.renderer,this.getMinAndMaxPos()),a=this.byAxis.isVertical(),o=r[0],s=r[1];this.zoomBarGroup||(this.zoomBarGroup=this.createComponentGroup().attr("transform",n.makeTranslate(e)).style("cursor",a?"ns-resize ":"ew-resize"),i.registerInteractiveTarget(this,this.zoomBarGroup)),this._createLines(),this.leftTopRect=this._createSideRect(a,o,!0),this.rightBottomRect=this._createSideRect(a,s,!1),this.centerRect=this._createCenterRect(a,o,s),this.leftTopButton=this._createButton(a,o,!0),this.rightBottomButton=this._createButton(a,s,!1);var h=this.leftTopButton.pos,u=this.rightBottomButton.pos;this.rangeLeftTop=this._getValueByPosition(h),this.rangeRightBottom=this._getValueByPosition(u+l)}},_createLines:function(){var t=this.axisScale,e=this.byAxisType,i=this.vanchart,r=i.renderer,l=(i.series,t.rangeBand?t.rangeBand()/2:0),u=i.cateMap,c=[],d=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=this.byAxis.isHorizontal(),g=this.byAxis.type===a.DATE_AXIS_COMPONENT;for(var m in u){var v=u[m];if(v[0].series[e]){var _=0;v.forEach(function(t){_+=t.getTargetValue()})}v[0].isNull||c.push({x:t(g?n.object2date(m):m)+l,y:_}),d=Math.min(d,_),f=Math.max(f,_)}var y=p?[h,0]:[0,h],x=o.linear().domain([d,f]).range(y),b=s.line().interpolate("linear").x(function(t){return p?t.x:x(t.y)}).y(function(t){return p?x(t.y):t.x});c.sort(function(t,e){return t.x-e.x}),this._line=this._line||r.path().style({fill:"none",stroke:"black","stroke-width":1}),this._line.attr("d",b(c)).addTo(this.zoomBarGroup),this._innerClip(this._line)},_createSideRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height",l=this.bounds.width;t&&(r="y",a="x",o="height",s="width",l=this.bounds.height);var u,c;return i?(u=0,c=e):(u=e,c=Math.abs(l-u)),n.rect().attr(r,u).attr(a,0).attr(o,c).attr(s,h).style({fill:"rgba(220,221,221,0.4)"}).addTo(this.zoomBarGroup)},_createCenterRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height";return t&&(r="y",a="x",o="height",s="width"),n.rect().attr(r,e+l).attr(a,0).attr(o,i-e-2*l).attr(s,h).style({fill:"rgba(255,255,255,0)",stroke:"#29ABE2","stroke-width":1}).addTo(this.zoomBarGroup)},_createButton:function(t,e,i){e=i?e:e-l;var n,r=this.vanchart.renderer,a=r.group().attr("transform",this._getButtonTranslate(t,e)),o={fill:"#FFFFFF",stroke:"#7ADAF4","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10};n=i?t?"M30,4v6H0L0,4C0,1.791,1.791,0,4,0h22C28.209,0,30,1.791,30,4z":"M4,30h6V0L4,0C1.791,0,0,1.791,0,4v22C0,28.209,1.791,30,4,30z":t?"M30,6V0H0v6c0,2.209,1.791,4,4,4h22C28.209,10,30,8.209,30,6z":"M6,30H0V0h6c2.209,0,4,1.791,4,4v22C10,28.209,8.209,30,6,30z",r.path().attr("d",n).style({fill:"#29ABE2"}).addTo(a);var s="x1",h="y1",u="x2",c="y2";return t&&(s="y1",h="x1",u="y2",c="x2"),r.line().attr(s,3).attr(h,11).attr(u,3).attr(c,18).style(o).addTo(a),r.line().attr(s,7).attr(h,11).attr(u,7).attr(c,18).style(o).addTo(a),a.pos=e,a.addTo(this.zoomBarGroup),a},_findDraggingTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement,r=this.byAxis.isHorizontal()?t.containerPoint.x-this.bounds.x:t.containerPoint.y-this.bounds.y,a=this._resizeable();n;){var o=this.leftTopButton.pos-r,s=r-(this.rightBottomButton.pos+l);if(o>0&&10>o&&a&&(e=this.leftTopButton),s>0&&10>s&&a&&(e=this.rightBottomButton),e)break;if(n==this.leftTopButton.node()&&a?e=this.leftTopButton:n==this.rightBottomButton.node()&&a?e=this.rightBottomButton:(n==this.centerRect.node()||n==this.zoomBarGroup.node())&&(e=this.centerRect),e)break;n=n.parentNode}return e},_panStart:function(t,e){this.target=e||this._findDraggingTarget(t),this.target&&(this.downPos=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,this.initPos=this.target.pos,this.initTranslate=0)},_panContainerMove:function(t){if(this.target){var e=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,i=e=0&&this.rightBottomButton.pos+l+n<=i){var s=this.leftTopButton.pos+n;this.leftTopButton.pos=s,this.leftTopButton.attr("transform",this._getButtonTranslate(o,s)),this.leftTopRect.attr(a,s);var h=this.rightBottomButton.pos+n;this.rightBottomButton.pos=h,this.rightBottomButton.attr("transform",this._getButtonTranslate(o,h)),this.rightBottomRect.attr(r,h+l).attr(a,i-(h+l)),this.centerRect.attr(r,s+l)}return this.initTranslate>0?c:d},_getValueByPosition:function(t){var e=this.byAxis,i=this.axisScale;switch(e.type){case a.CATEGORY_AXIS_COMPONENT:for(var r=i.domain(),o=i.range(),s=0,h=o.length-1;h>s;s++){if(t>=o[s]&&t=o[s+1])return r[s+1]}return o[0]>o[o.length-1]?r[0]:r[r.length-1];case a.DATE_AXIS_COMPONENT:return n.date2int(this.axisScale.invert(t));default:return this.axisScale.invert(t)}},_getButtonTranslate:function(t,e){var i=t?[0,e]:[e,0];return"translate("+i+")"},_zoomRefresh:function(t){var e,i=this.leftTopButton.pos,r=this.rightBottomButton.pos+l,o=this._getValueByPosition(i),s=this._getValueByPosition(r),h=this.vanchart,f=this.byAxis,p=f._dataDomain,g=n.indexOf,m=h.getComponent(a.DATA_SHEET_COMPONENT);if(f.isCategory()){if(t==u)e=this._getValidDomain(o,s,p,!0);else{var v=g(p,this.rangeLeftTop)-g(p,this.rangeRightBottom);if(v=Math.abs(v)+1,t==c&&s!=this.rangeRightBottom)if(f.isAxisReversed()^f.isHorizontal()){var _=g(p,s),y=_-v+1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var y=g(p,s),_=y+v-1;o=p[_],s=p[y],e=p.slice(y,_+1)}else if(t==d&&o!=this.rangeLeftTop)if(f.isAxisReversed()^f.isHorizontal()){var y=g(p,o),_=y+v-1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var _=g(p,o),y=_-v+1;o=p[_],s=p[y],e=p.slice(y,_+1)}else o=this.rangeLeftTop,s=this.rangeRightBottom}(this.rangeLeftTop!=o||this.rangeRightBottom!=s)&&(this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),m&&m.zoomRefresh(),h.reRenderSeries())}else e=this._getValidDomain(o,s,p,!1),this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),h.reRenderSeries()},_panEnd:function(){this.target=null},_resizeable:function(){return this.options&&this.options.zoomTool&&this.options.zoomTool.resize},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},remove:function(){this.zoomBarGroup&&this.zoomBarGroup.remove(),this.zoomBarGroup=null}});return t("../ComponentLibrary").register(a.ZOOM_COMPONENT,p),p}),define("component/ToolbarIcon",["require","./Base","../utils/BaseUtils","../Constants","../dom/Evented"],function(t){function e(){return{fill:"black","fill-opacity":.05}}function i(){return{fill:"black","fill-opacity":.1}}function n(){return{fill:"black","fill-opacity":0}}function r(){return{fill:"black","fill-opacity":.05}}var a=2,o=32,s=(t("./Base"),t("../utils/BaseUtils")),h=t("../Constants"),l=t("../dom/Evented"),u=l.extend({initialize:function(t,e,i,n){this.iconType=t,this.toolbar=e,this.visible=n,this.pos=i,this.currentPos={x:i.x,y:i.y}},render:function(){var t=this.toolbar,i=t.vanchart,r=i.renderer,s=this;this.iconG||(this.iconG=r.group().style({cursor:"pointer"}).addTo(t.toolbarGroup)),i.registerInteractiveTarget(this,this.iconG),this.iconG.attr("transform","translate("+s.pos.x+","+s.pos.y+")").style({display:this.visible?"":"none"}),this.iconG.rect=this.iconG.rect||r.rect().attr("width",o).attr("height",o).attr("rx",a).attr("ry",a).addTo(this.iconG),this.iconG.rect.style(t.hidden?n():e()),this.iconG.path=this.iconG.path||this._getIconPathGraphic(i,r,s)},_getIconPathGraphic:function(t,e,i){switch(this.iconType){case h.REFRESH_ICON:return e.path().attr("d",i.getRefreshIconPath()).style({fill:"#FF9933"}).addTo(this.iconG);case h.SORT:return t.orderType==h.ASCENDING?e.path().attr("d",i.getDecreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG):e.path().attr("d",i.getIncreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG);case h.EXPORT_ICON:return e.path().attr("d",i.getExportIconPath()).style({fill:"#6666CC"}).addTo(this.iconG);case h.FULL_SCREEN_ICON:return t.vancharts.fullScreenFather?e.path().attr("d",i.getMinIconPath()).style({fill:"#33CC66"}).addTo(this.iconG):e.path().attr("d",i.getMaxIconPath()).style({fill:"#33CC66"}).addTo(this.iconG);case h.MENU_ICON:return e.path().attr("d",i.getMenuIconPath()).style({"stroke-width":2,stroke:"#AAAAAA"}).addTo(this.iconG)}},refreshMove:function(t,e){var i=this.pos,n=this.currentPos,r=n.x-t,a=r+e;this.iconG.animate({ease:"circle-out",duration:220,attr:{transform:"translate("+r+","+i.y+")"}}).transition({ease:"circle-in",duration:220,attr:{transform:"translate("+a+","+i.y+")"}}),this.currentPos.x=a},refreshMoveWithoutAnimation:function(t,e){var i=this.currentPos.x-t+e;this.iconG.attr("transform","translate("+i+","+this.pos.y+")"),this.currentPos.x=i},showIcon:function(){this.visible=!0,arguments.length?this._iconAnimation(arguments[0],arguments[1]):this.iconG.style({display:""})},hideIcon:function(){this.visible=!1,arguments.length?this._iconAnimation(arguments[0],arguments[1]):(this.iconG.style({display:"none"}),this.iconG.attr("transform","translate("+this.pos.x+","+this.pos.y+")"),this.currentPos.x=this.pos.x)},_iconAnimation:function(t,i){var r=this.iconG,a=this.pos,o=this.visible;s.isSupportSVG()?setTimeout(function(){r.style({display:o?"":"none"});var i=4*t,s=a.x-i;r.animate([{ease:"circle-out",duration:100,attr:{transform:"translate("+s+","+a.y+")"}},{ease:"circle-in",duration:100,attr:{transform:"translate("+a.x+","+a.y+")"}}]),r.rect.style(o?n():e()).animate({ease:"linear",duration:200,style:o?e():n()})},i):(r.attr("transform","translate("+a.x+","+a.y+")").style({display:o?"":"none"}),r.rect.style(o?e():n())),this.currentPos.x=this.pos.x},onMouseOver:function(){this.iconG.rect.style(this.toolbar.hidden?r():i())},onMouseOut:function(){this.iconG.rect.style(this.toolbar.hidden?n():e())},onTap:function(){var t=this.toolbar,e=t.vanchart,i=(e.renderer,this),n=e.getDivParentDom();switch(i.iconType){case h.REFRESH_ICON:e.clearAllEffects(),e.refreshRestore(),i.hideIcon();break;case h.SORT:e.orderType==h.ASCENDING?(e.orderType=h.DESCENDING,i.iconG.path.attr({d:i.getIncreaseIconPath()})):(e.orderType=h.ASCENDING,i.iconG.path.attr({d:i.getDecreaseIconPath()})),t.refreshEnabled()&&t.refreshIcon.showIcon(),e.orderData();break;case h.EXPORT_ICON:var r=this.toolbar.options.toImage;r&&r.imageUrl&&s.toPng(r.imageUrl);break;case h.FULL_SCREEN_ICON:e.vancharts.fullScreenFather?e.vancharts.hideLightBox(n,e.vancharts.fullScreenFather):e.vancharts.showLightBox(e);break;case h.MENU_ICON:t.showOrHide()}},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},getMaxIconPath:function(){return"M24,8v6.5L21.5,12l-3,3L17,13.5l3-3L17.5,8H24z M15,18.5l-3,3l2.5,2.5H8v-6.5l2.5,2.5l3-3L15,18.5z"},getMinIconPath:function(){return"M15,17v6.5L12.5,21l-3,3L8,22.5l3-3L8.5,17H15z M24,9.5l-3,3l2.5,2.5H17V8.5l2.5,2.5l3-3L24,9.5z"},getIncreaseIconPath:function(){return"M8,20h16v2H8V20z M10,16h2v3h-2V16z M13,14h2v5h-2V14z M16,12h2v7h-2V12z M19,9h2v10h-2V9z"},getDecreaseIconPath:function(){return"M8,20h16v2H8V20z M10,9h2v10h-2V9z M13,12h2v7h-2V12z M16,15h2v4h-2V15z M19,16h2v3h-2V16z"},getExportIconPath:function(){return"M22,8H8v16h16V10L22,8z M16,10h2v4h-2V10z M22,22H10V10h1v5h9v-5h1.171L22,10.829V22z"},getRefreshIconPath:function(){return"M21.656,10.344C20.209,8.896,18.209,8,16,8c-3.43,0-6.354,2.158-7.492,5.19l1.873,0.703C11.234,11.619,13.428,10,16,10c1.657,0,3.156,0.672,4.243,1.757L18,14h6V8L21.656,10.344z M16,22c-1.657,0-3.156-0.671-4.243-1.757L14,18H8v6l2.344-2.344C11.791,23.104,13.791,24,16,24c3.43,0,6.354-2.158,7.492-5.19l-1.873-0.703C20.766,20.381,18.572,22,16,22z"},getMenuIconPath:function(){return"M8,10L24,10 M8,15L24,15 M8,20L24,20"}});return u}),define("component/ToolBar",["require","./Base","../utils/BaseUtils","../Constants","./ToolbarIcon","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./ToolbarIcon"),a=t("../ComponentLibrary"),o=32,s=1,h=5,l=[n.GANTT_CHART,n.TREEMAP_CHART,n.WORD_CLOUD_CHART,n.FUNNEL_CHART,n.STRUCTURE_CHART,n.SCATTER_CHART,n.BUBBLE_CHART,n.FORCE_BUBBLE_CHART,n.AREA_MAP,n.POINT_MAP,n.LINE_MAP,n.HEAT_MAP],u=e.extend({doLayout:function(){var t=this.options,e=t.hidden,i=this.sortEnable()?["sort","toImage","fullScreen"]:["toImage","fullScreen"],a=[n.REFRESH_ICON];i.forEach(function(e){t[e]&&t[e].enabled&&a.push(e)}),e&&a.push(n.MENU_ICON);var l=o+s,u=a.length*l+h;if(this.startX=this.vanchart.width-u,!this.toolbarGroup){this.toolbarIcons=[],this.hidden=e;for(var c=0,d=a.length;d>c;c++){var f={x:c*l,y:h},p=a[c],g=!e;p==n.MENU_ICON?this.menuIcon=new r(p,this,f,!0):p==n.REFRESH_ICON?this.refreshIcon=new r(p,this,f,!1):this.toolbarIcons.push(new r(p,this,f,g))}this.isFloat=!0}},sortEnable:function(){var t,e=!0,i=this.vanchart.options,n=i.series;return i.chartType&&(t=i.chartType),n&&n.forEach(function(i){if(i.type){if(t&&t!=i.type)return void(e=!1);t=i.type}}),e&&-1==l.indexOf(t)},render:function(){this.vanchart.renderer;return this.toolbarGroup?void this.toolbarGroup.attr("transform",i.makeTranslate([this.startX,0])):(this.toolbarGroup=this.createComponentGroup().attr("transform",i.makeTranslate([this.startX,0])),this.toolbarIcons.forEach(function(t){t.render()}),this.menuIcon&&this.menuIcon.render(),void(this.refreshIcon&&this.refreshIcon.render()))},showOrHide:function(){this.hidden?this.show():this.hide(),this.hidden=!this.hidden},hide:function(){for(var t=this.toolbarIcons,e=t.length,i=[],n=0;e>n;n++)i.push(100+80*n);for(var n=0;e>n;n++){var r=e-n;t[n].hideIcon(r,i[n])}var a=4*(e+1),o=4*(e+1)+33*e;this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},show:function(){for(var t=[0],e=this.toolbarIcons,i=e.length,n=0;i-1>n;n++)t.push(100+80*n);for(var n=0;i>n;n++){var r=i-n;e[n].showIcon(r,t[n])}var a=4*(i+1)+33*i,o=4*(i+1);this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},showRefreshIconWhenZoom:function(){if(!this.refreshIcon.visible&&this.refreshEnabled())if(this.menuIcon)if(this.hidden){var t=this.toolbarIcons.length,e=4*(t+1),i=4*(t+1)+33*t;this.refreshIcon.refreshMoveWithoutAnimation(e,i),this.refreshIcon.showIcon()}else this.refreshIcon.showIcon();else this.refreshIcon.showIcon()},refreshEnabled:function(){return!(this.options.refresh&&this.options.refresh.enabled===!1)},getToolBarInitWidth:function(){return this.options.enabled?this.options.hidden?o+h:this.toolbarIcons.length*(o+s)-s+h:0},remove:function(){this.toolbarGroup&&this.toolbarGroup.remove(),this.toolbarGroup=null}});return a.register(a.TOOLBAR_COMPONENT,u),u}),define("component/RangeLegend",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=(t("../utils/ColorUtils"),t("../ComponentLibrary")),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s=i.extend({doLayout:function(){if(this.invisible())return void this.remove();var t=this.options,e=t.position||r.RIGHT,i=o()*(this.isFloat?2:4);if(e==r.TOP||e==r.BOTTOM?this._layoutHorizontal(e,i):this._layoutVertical(e,i),!this.isFloat){var n=this.options.borderWidth+2*o();if(this.bounds.x+=n/2,this.bounds.y+=n/2,this.bounds.width-=n,this.bounds.height-=n,e==r.BOTTOM){var s=this.vanchart.getComponent(a.ZOOM_COMPONENT);s&&s.zoomToolEnabled()&&s.bounds&&(this.bounds.y+=s.bounds.height||0)}if(e==r.RIGHT_TOP){var h=this.vanchart.getComponent(a.TOOLBAR_COMPONENT);h&&(this.bounds.y=Math.max(37,this.bounds.y))}}},_layoutHorizontal:function(t,e){var i=this.calculateHorizontalDim(),n=i.height+e;n=this.options.maxHeight?Math.min(n,this._maxHeight()):n,this._setComponentBounds(t,n);var r=i.width+e;this.isFloat||(this.bounds.x+=Math.max((this.bounds.width-r)/2,0)),this.bounds.width=r},_layoutVertical:function(t,e){var i=this.calculateVerticalDim(),n=i.width+e;n=this.options.maxWidth?Math.min(n,this._maxWidth()):n,this._setComponentBounds(t,n);var a=i.height+e;this.isFloat||t==r.RIGHT_TOP||(this.bounds.y+=Math.max((this.bounds.height-a)/2,0)),this.bounds.height=a},render:function(){if(!this.invisible()){var t=this.bounds,e=this,i=e.vanchart,r=i.renderer;this.group||(this.backgroundGroup=r.group().addTo(this.getComponentParentGroup()),this.group=r.vgroup().add(this.getComponentParentGroup()),this.legendGroup=this.group.append(r.vgroup()));var a;a=this.useHtmlLabel()?this.legendGroup.divG:this.legendGroup.renderG,i.registerInteractiveTarget(this,a),this._innerClip(this.group),this.group.attr("transform",n.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,t),this.renderBody(this.legendGroup,t)}},getEvents:function(){return{mouseout:this.mouseOut}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},remove:function(){this.group&&this.group.remove(),this.group=null}});return s}),define("component/IntervalRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","../dom/EventObject","./RangeLegend","../ComponentLibrary"],function(t){var e,i,n,r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("../utils/ColorUtils"),s=t("../dom/EventObject"),h=t("./RangeLegend"),l=t("../ComponentLibrary"),u=function(){return null==e&&(e=r.paddingConvertWithScale("0.625rem")),e},c=15,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=25,p=function(){return null==n&&(n=r.paddingConvertWithScale("0.125rem")),n},g=h.extend({type:l.INTERVAL_RANGE_LEGEND,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};if(!r.isArray(e)){var i=e.splitNumber||5,n=e.color||this.vanchart.options.colors[0],a=this.vanchart.isHeatMap()?["rgb(0,0,255)","rgb(0,255,0)","rgb(255,255,0)","rgb(255,0,0)"]:o.createColorsWithHsb(n,i),h=this.vanchart.getChartMinMaxValue(),l=r.calculateAutoMinMaxAndGap(h[0],h[1],i),u=l[0],c=l[2];if(e=[],this.vanchart.isHeatMap())for(var d=[0,.25,.55,.85,1],f=r.accMul(c,i),p=1;5>p;p++)e.push({from:r.accAdd(u,r.accMul(f,d[p-1])),to:r.accAdd(u,r.accMul(f,d[p])),color:a[p-1]});else for(var p=0;i>p;p++)e.push({from:r.accAdd(u,r.accMul(c,i-p-1)),to:r.accAdd(u,r.accMul(c,i-p)),color:a[p]})}this.items=this.items||[];for(var g=e.length,m=this.items.length,v=g;m>v;v++)this.items[v].graphic&&this.items[v].graphic.remove(),this.items[v]=null;for(var _=t.formatter,y=0;g>y;y++){var x=this.items[y]||new s(this.getItemEvents());this.items[y]=x;var b=e[y];x.from=b.from,x.to=b.to,x.color=b.color,x.label=this._getIntervalLabelContent(b.from,b.to,_),x.visible=!0,x.hiddenColor=t.hiddenColor,x.hoverColor=t.hoverColor,x.points=[],x.legend=this}this.items.length=g;var T=this,A=this.vanchart.series;this.items.sort(function(t,e){var i=Math.min(t.from,t.to),n=Math.min(e.from,e.to);return T.isHorizontal()?i-n:n-i});for(var p=0,C=A.length;C>p;p++){var L=A[p],P=L.getTargetKey(),M=L.points;M.forEach(function(t){var e=t[P],i=T._getPointItem(e);i&&(i.points.push(t),t._rangeItem=i)})}},_getMin:function(){var t=this.isHorizontal()?0:this.items.length-1;return this.items[t].from},_getMax:function(){var t=this.isHorizontal()?this.items.length-1:0;return this.items[t].to},_getGradient:function(){for(var t={0:"white"},e=this._getMin(),i=this._getMax(),n=i-e,r=this.items.length-1;r>=0;r--){ - var a=this.items[r];t[(a.to-e)/n]=a.color}return t},_getIntervalLabelContent:function(t,e,i){return i?r.format({from:t,to:e},i):t+"-"+e},_getPointItem:function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e],r=Math.min(n.from,n.to),a=Math.max(n.from,n.to);if(t>=r&&a>=t)return n}},calculateHorizontalDim:function(){var t=this.items.length,e=0,i=0;if(t>0){var n=r.getTextDimension(this.items[0].label,this.options.style,this.options.useHtml),a=r.getTextDimension(this.items[t-1].label,this.options.style,this.options.useHtml),o=Math.max(0,n.width-f,a.width-f);e=t*f+(t-1)*p()+o,i=c+2*d()+2*n.height}return{width:e,height:i}},calculateVerticalDim:function(){var t=this.items.length,e=0,i=0,n=this.options.style,a=this;return this.items.forEach(function(t){var o=r.getTextDimension(t.label,n,a.options.useHtml);e=Math.max(e,o.width),i=Math.max(0,o.height-f)}),{width:e+c+d(),height:t*f+(t-1)*p()+i}},getColorWithSize:function(t){var e=this._getPointItem(t);return e&&e.color},renderBody:function(t,e){this.isHorizontal()?this._renderHorizontalInterval(t,e):this._renderVerticalInterval(t,e)},_renderHorizontalInterval:function(t,e){var i=this.items,n=(e.width-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([n,u()])),this._absX=e.x+n,this._absY=e.y+u();var a=this.options.style,o=this.vanchart,s=o.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var n=e.graphic;o.registerInteractiveTarget(e,h?n.divG:n.renderG);var u=e.label,m=r.getTextDimension(u,a,g.options.useHtml),v=m.height,_=v+d(),y=_+c+d();n.rect=n.rect||n.append(s.rect()),n.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",l).attr("y",_).attr("width",f).attr("height",c);var x=l+f/2-m.width/2,b=i%2===0?0:y;g._renderItemLabel(e,n,x,b,m,i),l+=f+p()})},_renderVerticalInterval:function(t,e){var i=this.items,n=this.vanchart,a=(e.height-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([u(),a])),this._absX=e.x+u(),this._absY=e.y+a;var o=this.options.style,s=this.vanchart.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var a=e.graphic;n.registerInteractiveTarget(e,h?a.divG:a.renderG);var u=r.getTextDimension(e.label,o,h);a.rect=a.rect||a.append(s.rect()),a.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",0).attr("y",l).attr("width",c).attr("height",f);var m=Math.round(c+d()),v=Math.round(l+f/2-u.height/2);g._renderItemLabel(e,a,m,v,u,i),l+=f+p()})},_renderItemLabel:function(t,e,i,n,a,o){var s=this,h=s.vanchart,l=h.renderer,u=s.options,c=t.label,d=u.style,f=this.useHtmlLabel(),p=t.visible?d.color:t.hiddenColor;d=r.extend({},d),d.color=p,e.text=e.text||e.append(l.vtext(f)),e.text.textContent(c).attr("dy",".88em").attr("transform",r.makeTranslate({x:i,y:n})).style(d)},_getItemIconStyle:function(t){return{fill:t.visible?t.color:t.hiddenColor,"fill-opacity":1,stroke:"none"}},getItemEvents:function(){return{mouseover:this.onItemMouseOver,mousemove:this.onItemMouseMove,mouseout:this.onItemMouseOut,tap:this.onItemTap}},onItemMouseOver:function(t){var e=this,i=e.legend,n=e.graphic&&e.graphic.text;i.useHtmlLabel()?n.style("color",o.colorToHex(e.hoverColor)):n.style({fill:e.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(e))},onItemMouseMove:function(t){},onItemMouseOut:function(t){var e=this,i=e.legend,n=i.options,r=e.graphic&&e.graphic.text,a=n.style.color,s=e.visible?a:e.hiddenColor;i.useHtmlLabel()?r.style("color",o.colorToHex(s)):r.style({fill:s})},onItemTap:function(t){var e=this,i=e.legend,n=i.options,r=i.vanchart,s=e.graphic&&e.graphic.text,h=e.graphic&&e.graphic.rect;e.visible=!e.visible;var l=n.style.color,u=e.visible?e.color:e.hiddenColor,c=e.visible?l:e.hiddenColor;if(h.style({fill:u}),i.useHtmlLabel()?s.style("color",o.colorToHex(c)):s.style({fill:c}),e.points&&e.points.length>0){var d="vanChartMap"==r.vanChartType;e.points.forEach(function(t){var i=t.series.type===a.LINE_MAP;if((!d||d&&t.points&&t.points[0]==t||i)&&(t.visible=e.visible,d&&!i))for(var n=t.points,r=1,o=n.length;o>r;r++)n[r].visible=t.visible}),r.filterRender()}}});return l.register(l.INTERVAL_RANGE_LEGEND,g),g}),define("component/GradientRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","./RangeLegend","../ComponentLibrary","../utils/Scale","../utils/Interpolator"],function(t){var e,i,n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../utils/ColorUtils"),o=t("./RangeLegend"),s=t("../ComponentLibrary"),h=t("../utils/Scale"),l=t("../utils/Interpolator"),u=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},c=15,d=100,f=15,p=10,g=function(){return null==i&&(i=n.paddingConvertWithScale("0.3125rem")),i},m="M7.236,10H13c1.105,0,2-0.895,2-2V2c0-1.105-0.895-2-2-2L2.618,0C1.875,0,1.391,0.782,1.724,1.447l3.724,7.447C5.786,9.572,6.479,10,7.236,10z",v="M7.236,0L13,0c1.105,0,2,0.895,2,2v6c0,1.105-0.895,2-2,2H2.618c-0.743,0-1.227-0.782-0.894-1.447l3.724-7.447C5.786,0.428,6.479,0,7.236,0z",_="M0,7.236V13c0,1.105,0.895,2,2,2h6c1.105,0,2-0.895,2-2V2.618c0-0.743-0.782-1.227-1.447-0.894L1.106,5.447C0.428,5.786,0,6.479,0,7.236z",y="M10,7.236V13c0,1.105-0.895,2-2,2H2c-1.105,0-2-0.895-2-2L0,2.618c0-0.743,0.782-1.227,1.447-0.894l7.447,3.724C9.572,5.786,10,6.479,10,7.236z",x=o.extend({type:s.GradientRangeLegend,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};this.valueAndColors=e.color||this._getDefaultValueAndColors();var i=e.min,r=e.max;if(n.hasNotDefined(i)&&n.hasNotDefined(r)){var a=this.vanchart.getChartMinMaxValue(),o=n.calculateAutoMinMaxAndGap(a[0],a[1],Math.max(2,this.valueAndColors.length-1));i=o[0],r=o[1]}this.min=n.pick(e.min,i),this.max=n.pick(e.max,r),this.minPos=0,this.maxPos=d,this.valueAndColors.sort(function(t,e){return t[0]-e[0]});for(var s=[],u=[],c=0,f=this.valueAndColors.length;f>c;c++)s[c]=this.valueAndColors[c][0],u[c]=this.valueAndColors[c][1];this.valueScale=h.linear().domain([this.min,this.max]).range([0,1]),this.colorScale=h.linear().domain(s).range(u).interpolate(l.interpolate).interpolate(l.interpolate)},_getMin:function(){return this.min},_getMax:function(){return this.max},_getGradient:function(){var t={};return this.valueAndColors.forEach(function(e){t[e[0]]=e[1]}),t},_getDefaultValueAndColors:function(){var t=a.createColorsWithHsb(this.vanchart.options.colors[0],3);return[[0,t[2]],[.5,t[1]],[1,t[0]]]},calculateHorizontalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=Math.max(t.width,e.width,p),r=d+2*i,a=c+f+g()+t.height;return{width:r,height:a}},calculateVerticalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=c+f+g()+Math.max(t.width,e.width),r=2*Math.max(t.height/2,p/2),a=d+2*r;return{width:i,height:a}},getColorWithSize:function(t){return t>=this.min&&t<=this.max?this.colorScale(this.valueScale(t)):null},_getGradientMinLabelContent:function(){return this._getGradientLabelWithFormatter(this.min)},_getGradientMaxLabelContent:function(){return this._getGradientLabelWithFormatter(this.max)},_getGradientLabelWithFormatter:function(t){var e=this.options.formatter;return e?n.format(t,e):t},_getGradientLabelContent:function(t){return this._getGradientLabelWithFormatter(this._gradientScale(t))},_gradientScale:function(t){var e=n.accDiv(n.accAdd(this.max,-this.min),d);return t=n.accMul(e,this.isHorizontal()?t:d-t),t=n.accAdd(t,this.min)},_getBarBackgroundStyle:function(){return{fill:"#eaeaea","stroke-width":0}},_getGradientFillColor:function(t,e){var i={x1:"0%",y1:t?"0%":"100%",x2:t?"100%":"0%",y2:"0%"},r=[];return this.valueAndColors.forEach(function(t){var e=t[0],i=t[1];r.push({offset:e,"stop-color":i})}),this._bar.colorGradient?e.updateColorGradient(this._bar.colorGradient,i,r):this._bar.colorGradient=e.colorGradient(i,r),"url(#"+n.stamp(this._bar.colorGradient)+")"},_updateHorizontalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:this.minPos,y:0,width:this.maxPos-this.minPos,height:c};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},_updateVerticalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:0,y:this.minPos,width:c,height:this.maxPos-this.minPos};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},renderBody:function(t,e){var i=this,r=i.vanchart,a=r.renderer,o=(r.bounds,i.isHorizontal()),s=o?(e.width-d)/2:u(),h=o?u():(e.height-d)/2;t.attr("transform",n.makeTranslate([s,h])),this._absX=e.x+s,this._absY=e.y+h,this._barBackground=this._barBackground||t.append(a.rect()),this._bar=this._bar||t.append(a.rect()),this._minButton=this._minButton||t.append(a.path().style({cursor:"pointer"})),this._maxButton=this._maxButton||t.append(a.path().style({cursor:"pointer"})),this._minLabel=this._minLabel||t.append(a.vtext(this.useHtmlLabel())),this._maxLabel=this._maxLabel||t.append(a.vtext(this.useHtmlLabel()));var l={rx:2,ry:2,x:0,y:0,width:o?d:c,height:o?c:d};this._barBackground.style(this._getBarBackgroundStyle()).attr(l),this._bar.attr(l).style({fill:this._getGradientFillColor(o,a),"stroke-width":0}),n.isSupportSVG()||a._updateGradientFill(this._bar,this._bar.colorGradient),this._minButton.attr("d",o?_:m),this._maxButton.attr("d",o?y:v),this._minLabel.attr("dy",".85em").style(this.options.style),this._maxLabel.attr("dy",".85em").style(this.options.style),this._updateMax(),this._updateMin()},_updateMin:function(){this.isHorizontal()?this._updateHorizontalMinBar():this._updateVerticalMinBar()},_updateMax:function(){this.isHorizontal()?this._updateHorizontalMaxBar():this._updateVerticalMaxBar()},_updateVerticalMinBar:function(){this._minButton.attr("transform","translate("+c+","+this.maxPos+")").style({fill:this.colorScale((d-this.maxPos)/d)});var t=this._getGradientLabelContent(this.maxPos),e=n.getTextDimension(t,this.options.style,!0),i=Math.round(c+f+g()),r=Math.round(this.maxPos+p/2-e.height/2);this._minLabel.textContent(t).attr("transform",n.makeTranslate({x:i,y:r})),this._updateVerticalGradientClipRect()},_updateHorizontalMinBar:function(){var t=this.minPos-p;this._minButton.attr("transform","translate("+t+","+c+")").style({fill:this.colorScale(this.minPos/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(this.minPos-i.width),a=Math.round(c+f+g());this._minLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateHorizontalGradientClipRect()},_updateVerticalMaxBar:function(){var t=this.minPos-p;this._maxButton.attr("transform","translate("+c+","+t+")").style({fill:this.colorScale((d-this.minPos)/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(c+f+g()),a=Math.round(this.minPos-p/2-i.height/2);this._maxLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateVerticalGradientClipRect()},_updateHorizontalMaxBar:function(){this._maxButton.attr("transform","translate("+this.maxPos+","+c+")").style({fill:this.colorScale(this.maxPos/d)});var t=this._getGradientLabelContent(this.maxPos),e=Math.round(this.maxPos),i=Math.round(c+f+g());this._maxLabel.textContent(t).attr("transform",n.makeTranslate({x:e,y:i})),this._updateHorizontalGradientClipRect()},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},_panStart:function(t){var e=this.options.position;this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y,this.eventTarget=e==r.TOP||e==r.BOTTOM?this._findHorizontalTarget():this._findVerticalTarget()},_findHorizontalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentXthis._absX+this.maxPos-t?this._maxButton:void 0},_findVerticalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentYthis._absY+this.maxPos-t?this._minButton:void 0},_panMove:function(t){this.eventTarget==this._minButton?this._minButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y):this.eventTarget==this._maxButton&&this._maxButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y)},_minButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.minPos;this.minPos+=Math.round(i-t),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}else{var a=this.maxPos;this.maxPos+=Math.round(n-e),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMin(),this.refreshPoints())},_maxButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.maxPos;this.maxPos+=Math.round(i-t),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}else{var a=this.minPos;this.minPos+=Math.round(n-e),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMax(),this.refreshPoints())},_panEnd:function(t){this.eventTarget=null},refreshPoints:function(){for(var t,e=this._gradientScale(this.minPos),i=this._gradientScale(this.maxPos),n=this.vanchart,a=n.series,o=!1,s="vanChartMap"==n.vanChartType,h=0,l=a.length;l>h;h++){var u=a[h];u.points.forEach(function(n){var a=n.series.type===r.LINE_MAP;if(!s||s&&n.points&&n.points[0]==n||a){var h=n.visible,l=n.getTargetValue();if(n.visible=l>=e&&i>=l||l>=i&&e>=l,o=o||h!=n.visible,s&&!a){t=n.points;for(var u=1,c=t.length;c>u;u++)t[u].visible=n.visible}}})}o&&n.filterRender()}});return s.register(s.GradientRangeLegend,x),x}),define("component/Polar",["require","../Constants","../utils/BaseUtils","./Base","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("../utils/BaseUtils")),i=t("./Base"),n=(t("../ComponentLibrary"),i.extend({_refresh:function(){this.series=[]},_isBaseAxis:function(){return!0},doLayout:function(){var t=this.options,i=t.radius,n=t.center;if(!n||0===n.length){var r=this.vanchart.bounds;n=[r.width/2+r.x,r.height/2+r.y]}this.setCenter(n),e.hasDefined(i)?this.setRadius(i):this.radius=null;var a=this.vanchart.options.plotOptions,o=a.radar&&a.radar.shape||a.shape;this.shape=o||this.shape},setRadius:function(t){t&&(this.radius=this._getPercentValue(t,Math.min(this.vanchart.width,this.vanchart.height)/2))},setCenter:function(t){t&&(this.center=[],this.center[0]=this._getPercentValue(t[0],this.vanchart.width),this.center[1]=this._getPercentValue(t[1],this.vanchart.height))},render:function(){var t=this.vanchart.renderer,e=this.radiusAxis,i={d:e._getRadiusGridPath(e.scale.domain()[1])};this.clip?t.updateClip(this.clip,i):this.clip=t.createClip(i,"path"),this.radiusAxis.render(),this.angleAxis.render()}}));return n}),define("component/AngleAxis",["require","./Base","./CategoryAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator"],function(t){var e,i=(t("./Base"),t("./CategoryAxis")),n=t("../utils/BaseUtils"),r=(t("../Constants"),t("../ComponentLibrary"),t("../utils/Scale")),a=t("../utils/PathGenerator"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s="radar-top",h="radar-bottom",l="radar-left",u="radar-right",c=i.extend({_refresh:function(t){this.series=[],this.piece=null,this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.angleAxis=this},doLayout:function(){this.calculateDomainFromData(),this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this.piece=2*Math.PI/Math.max(this._dataDomain.length,1),this._updateOriginTickData(),this._updatePolarBounds(),this._calculateTickData()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this._updateOriginTickData(),this._calculateTickData()},_calculateTickData:function(){var t,e=this.polar.radius;this.isBreakLabels&&(t=this._getTestBoundsAndRadius().testBounds),this.tickData.map(function(i){this._getCateLabelBounds(e,i,t)},this)},_getTestBoundsAndRadius:function(){var t=this.vanchart.bounds,e=this.polar.center,i=[e[1]-t.y,t.x+t.width-e[0],t.y+t.height-e[1],e[0]-t.x],n=Math.min.apply(null,i);n-=o();var r={x:-i[3],y:-i[0],width:t.width,height:t.height};return{testBounds:r,radius:n}},_updatePolarBounds:function(){if(!this.polar.radius){var t=this._getTestBoundsAndRadius(),e=t.radius,i=t.testBounds;this.options.showLabel&&(this._testRadius(e,i)||(e=this._findNiceRadius(i),this._testRadius(e,i))),this.polar.setRadius(e)}},getIndexByPosition:function(t){return this._getIndexByPolarCoordinate(t)},_getIndexByPolarCoordinate:function(t){var e=this.polar.center,i=this.polar.radius,r=this.isAxisReversed(),a=t[0]-e[0],o=e[1]-t[1];if(a*a+o*o>i*i)return-1;var s,h=n.getArcByPoint(a,o),l=this.getCategories();if(l.length>1){var u=2*Math.PI/l.length;s=r?l.length-1-h/u:h/u}else s=0;return s=Math.round(s),s%=l.length},getAngleGridLineData:function(){var t=[],e=this.polar.angleAxis,i=e.scale.domain(),r=this;return i.forEach(function(i){var a=e.scale(i)*e.piece,o=r.polar.radius;t.push(n.getArcPoint(o,a))}),t=t.length?t:[n.getArcPoint(this.polar.radius,0)]},getCateAngleGridLineData:function(){var t=this.getAngleGridLineData(),e=this.polar.angleAxis.scale.domain();return t.map(function(t,i){return{name:e[i],pos:t}})},_testRadius:function(t,e){for(var i=0,r=this.tickData.length;r>i;i++){var a=this.tickData[i],o=this._getCateLabelBounds(t,a);if(!n.containsRect(e,o))return!1}return!0},_getCateLabelBounds:function(t,e,i){var r,a=e.tickValue,c=e.tickRectDim,d=this.scale.domain(),f=d.indexOf(a),p=n.getArcPoint(t+o(),f*this.piece),g=this.options,m=this._getPolarPosition(a),v=n.extend({width:"","white-space":"","text-align":""},g.labelStyle);switch(m){case s:r={style:v,x:-c.width/2,y:-t-.65*c.height-o()};break;case u:if(r={style:v,x:p[0],y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x+c.width>i.x+i.width){var _=i.x+i.width-p[0],y=n.extend({width:_+"px","white-space":"normal","text-align":"left"},g.labelStyle);c=n.getTextWrapDimension(e.tickContent,y),r={style:y,x:p[0],y:p[1]-c.height/2}}break;case h:r={style:v,x:-c.width/2,y:t+o()};break;case l:if(r={style:v,x:p[0]-c.width,y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x0&&n>i?u:i==n?h:i>n?l:void 0},_findNiceRadius:function(t){var e=[-t.y,t.width+t.x,t.height+t.y,-t.x],i=Math.min.apply(null,e),n=i,r=this.scale.domain(),a=this;return this.tickData.forEach(function(t){if(t.tickContent){var i,o=t.tickValue,c=t.tickDim,d=r.indexOf(o),f=a._getPolarPosition(o);switch(f){case s:i=e[0]-c.height;break;case u:i=(e[1]-c.width)/Math.abs(Math.sin(d*a.piece));break;case h:i=e[2]-c.height;break;case l:i=(e[3]-c.width)/Math.abs(Math.sin(d*a.piece))}n=Math.min(n,i)}}),2*i/3>n&&(n=2*i/3,this.options.labelRotation||this.options.useHtml||(this.isBreakLabels=!0)),n-o()},getPointsInCategory:function(t){var e=this.polar.center,i=this.polar.radius,a=t.x-e[0],o=e[1]-t.y;if(a*a+o*o>i*i)return null;var s=n.getArcByPoint(a,o),h=this.scale.domain(),l=this.scale.rangeExtent(),u=r.quantize().domain(l).range(h),c=h.length,d=Math.round(s/(2*Math.PI)*c)%c,f=u(d);return this.vanchart.getValidPointsPara(f)},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawAxisLine(this.axisGroup),this._drawGridLine(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawAxisLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis,n=this,r=n.options.lineWidth,a=n.options.lineColor,o=i.scale.domain()[1];this.axisLine||(this.axisLine=t.append(e.path())),this.axisLine.attr({d:i._getRadiusGridPath(o)}).style({fill:"none",stroke:a,"stroke-width":r})},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis.options,n=i.lineWidth,r=i.lineColor;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var a=this.gridLinesGroup,o=this.getAngleGridLineData(),s=this._bindData(this.gridLines,o);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return a.append(e.line()).datum(t)});this.gridLines=h.concat(s.update).map(function(t){var e=t.datum();return t.style({stroke:r,"stroke-width":n}).attr({x1:0,y1:0,x2:e[0],y2:e[1]})})},_drawTickLabel:function(t){this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.options,r=this.isBreakLabels,a=n.useHtml||r,o=i.tickData;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]),a&&this.tickLabels.length&&"div"!==this.tickLabels[0].type&&(this.tickLabels.map(function(t){t.remove()}),this.tickLabels=[]);var s=this.tickLabelsGroup,h=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(h.exit.map(function(t){t.remove()}),n.showLabel){var l=h.enter.map(function(t){return s.append(e.vtext(a).datum(t))});this.tickLabels=l.concat(h.update).filter(function(t){return t.datum().tickPos}).map(function(t){var e=t.datum(),i=e.tickPos.x,n=e.tickPos.y,r="div"===t.type?"px":"",a={transform:"translate("+i+r+" "+n+r+")",dy:"0.85em"};return t.textContent(e.tickContent).style(e.tickPos.style).attr(a),t.vRotate(e.labelRotation),t})}},drawHighlightBackground:function(t){var e=t[0].category,i=this.scale,r=this.series[0]&&this.series[0].options.columnType||!1,o=this.vanchart.renderer,s=i.domain(),h=this.polar.radius,l=i(e)/s.length*2*Math.PI;if(r){var u=1/s.length*2*Math.PI*.5,c=l-u,d=l+u,f=a.arc().innerRadius(0).outerRadius(h).startAngle(c).endAngle(d);this.highlightBand||(this.highlightBand=this.axisGroup.append(o.path().style({fill:"rgba(98,179,240,0.2)"}))),this.highlightBand.attr("d",f())}else{var p=n.getArcPoint(h,l);this.highlightLine||(this.highlightLine=this.axisGroup.append(o.line({stroke:"rgb(140,140,140)","stroke-width":"1"}))),this.highlightLine.attr("x2",p[0]).attr("y2",p[1])}},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.axisGroup=null}});return c}),define("component/RadiusAxis",["require","./Base","./ValueAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/PathGenerator","../utils/Interpolator","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./ValueAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/PathGenerator"),s=t("../utils/Interpolator"),h=t("../utils/Scale"),l=function(){return null==e&&(e=n.paddingConvertWithScale("0.125rem")),e},u=i.extend({_refresh:function(t){this.series=[],this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.radiusAxis=this},doLayout:function(){var t=this.series;this.indicator=t.length&&t[0].options.indicator&&t[0].options.indicator.enabled,this.calculateDomainFromData(),this.scale.domain(this._domain).range([0,this.polar.radius]),this._initCateScale(this._domain,[0,this.polar.radius]),this._updateOriginTickData()},_initCateScale:function(t,e){var i=h.linear().domain(t).range(e);this._cateScale=i},_calculateCateDomainData:function(){var t,e=this,i=e.series,r=(i.vanchart,i.length&&i[0].options),o=r.indicator,s=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),h=Number.MAX_VALUE,l=-h,u={};this._cateDataDomain=[],o.data&&o.data.length&&(t=o.data.map(function(t){return{name:t.name,domain:[t.min,t.max]}}));for(var c=!1,d=0,f=i.length;f>d&&!c;d++)c=i[d].visible;i.forEach(function(t){if(t.visible||!c){var i=!(n.hasNotDefined(t.stack)||e._isBaseAxis());t.points.forEach(function(t){var e=t.category,n=t.value;!t.isNull&&t.visible&&(i?(u[e]=u[e]||[0,0],n>=0?u[e][1]+=n:u[e][0]+=n):(u[e]=u[e]||[h,l],u[e][0]=Math.min(u[e][0],n),u[e][1]=Math.max(u[e][1],n)))})}});for(key in u)this._cateDataDomain.push({useIndicator:!1,name:key,domain:u[key]});var p=function(t){s&&(t[0]>0?t[0]=0:t[1]<0&&(t[1]=0))};t&&t.forEach(function(t){var i=t.name,n=t.domain[0],r=t.domain[1];e._cateDataDomain.forEach(function(t){if(i===t.name){if(null==n&&null==r)return;if(null!=n&&null!=r&&n>=r)return;var e=t.domain[0],a=t.domain[1],o=n||(s&&e>0?0:e),h=r||(s&&0>a?0:a),l=!1,u=!1;n&&(l=!0),r&&(u=!0),l&&!u?h=o>=h?o+100:h:u&&!l&&(o=o>h?h-100:o),t.useIndicator=!0,t.domain=[o,h]}})}),this._cateDataDomain.forEach(function(t){t.useIndicator||p(t.domain)}),this._calculateCateNiceDomain(),this._updateCategoryTickData()},_calculateCateNiceDomain:function(){var t=this,e=t.series;e.vanchart;this._cateTickStart=[],this._cateStep=[],this._cateDomain=[];var i=!1,n=this._getDefaultTickCount();if(this._cateDataDomain.forEach(function(e){var r,a,o,s=e.name,h=e.domain,l=e.useIndicator;e.useIndicator?(i=!0,o=h[0],a=[h[0],h[1]],r=parseFloat((h[1]-h[0])/n)):(r=t._linearTickInterval(h[0],h[1]),a=t._linearNiceDomain(h[0],h[1],r),o=a[0]),t._cateTickStart.push(o),t._cateDomain.push({useIndicator:l,name:s,domain:a}),t._cateStep.push(r)}),!i){var r=this._getCateTickValues().map(function(t){return t.labels.length});n=Math.max.apply(Math,r)}this._cateDomain.forEach(function(e,i){var r=e.domain[0],a=e.domain[1],o=e.useIndicator;o||(_step=Math.ceil((a-r)/n),e.domain[1]=r+_step*n,t._cateStep[i]=_step)})},_updateCategoryTickData:function(){var t=this,e=this._getCateTickValues();this.cateTickData=[];for(var i=0,n=e.length;n>i;i++){for(var r=e[i].name,a=e[i].labels,o=[],s=0,h=a.length;h>s;s++)o.push(t._labelInfoFormatter(a[s]));t.cateTickData.push({name:r,tickData:o})}},_labelInfoFormatter:function(t){var e=this,i=this.options,r=i.formatter,o=i.useHtml,s=i.labelStyle||{},h=n.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},s),l=e._getTickContent(t,r);e.type===a.CATEGORY_AXIS_COMPONENT&&(l=l.trim());var u,c,d=s,f=e.labelRotation;return 90===Math.abs(f)&&n.hasChn(l)&&(f=360,d=h),u=n.getTextDimension(l,d,o),c=n.getTextDimRotated(u,f),o&&(c.width=isNaN(parseFloat(i.labelWidth))?c.width:parseFloat(i.labelWidth),c.height=isNaN(parseFloat(i.labelHeight))?c.height:parseFloat(i.labelHeight)),{tickValue:t,tickContent:l,tickDim:c,tickRectDim:u,labelRotation:f}},_getCateTickValues:function(){if(!this._cateDataDomain)return[];var t=[],e=this;return this._cateDomain.forEach(function(i,r){for(var a=[],o=e._cateTickStart[r],s=e._cateStep[r],h=i.domain[1];h>=o;o=n.accAdd(o,s))a.push(o);t.push({name:i.name,labels:a})}),t},fixScaleAndTickData:function(){this.scale.domain(this._domain).range([0,this.polar.radius]),this._updateOriginTickData()},getRadiusPlotBands:function(){var t=this._getPlotBands(),e=[],i=this;return t.forEach(function(t){e.push({path:i._getRadiusPlotBandsPath(t.from,t.to),color:t.color})}),e},_getRadiusPlotBandsPath:function(t,e){var i=this.polar.shape;if(i===r.POLYGON_RADAR)return this._getRadiusGridPath(Math.min(t,e))+this._getRadiusGridPath(Math.max(t,e),!0);var n=o.arc().startAngle(0).endAngle(2*Math.PI);return n.innerRadius(this.scale(Math.min(t,e))).outerRadius(this.scale(Math.max(t,e)))()},getPlotLines:function(){var t=this.options.plotLines||[],e=this,i=[];return t.forEach(function(t){var n,a,o;t.label&&t.label.text&&t.label.style&&(n=t.label.text,a=t.label.style,o=t.label.align),i.push({color:t.color,value:t.value,width:t.width,dataArray:r.DASH_TYPE[t.dashStyle],text:n,baseY:-e.scale(t.value),textAnchor:o==r.LEFT?"end":"start",style:a})}),i},_getRadiusGridPath:function(t,e){var i=this._getRadiusGridData(t,e);return this._getRadiusGridPathByData(i)},_getRadiusGridData:function(t,e,i){var a=i||this.scale,o=this.polar.angleAxis,s=this.polar.shape;if(s===r.POLYGON_RADAR){var h=[],l=o.scale,u=l.domain();return u.forEach(function(e){var i=l(e)*o.piece,r=a(t);h.push(n.getArcPoint(r,i))}),e&&h.reverse(),h}return a(t)},_getRadiusGridPathByData:function(t){if(n.isArray(t)){var e="";if(t.length){for(var i=0,r=t.length;r>i;i++){var a=i?"L":"M";e+=a+n.dealFloatPrecision(t[i][0])+","+n.dealFloatPrecision(t[i][1])}e+="Z"}return e}var s=o.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0);return s.outerRadius(t)()},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup),e.clip(this.axisGroup.renderG,this.polar.clip)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawPlotBands(this.axisGroup),this.indicator?this._drawCateGridLine(this.axisGroup):this._drawGridLine(this.axisGroup),this._drawPlotLines(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i.scale,r=i.options,a=i.getTickData(),o=r.gridLineColor,h=r.gridLineWidth;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var l=this.gridLinesGroup,u=this._bindData(this.gridLines,a);u.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var c=u.enter.map(function(t){return l.append(e.path()).datum(t)});this.gridLines=c.concat(u.update).map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawCateGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=i.cateTickData[0].tickData,o=r.gridLineColor,h=r.gridLineWidth,l=i._cateDomain[0].domain;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var u=this.gridLinesGroup,c=this._bindData(this.gridLines,a);c.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue,!1,n);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var d=c.enter.map(function(t){return u.append(e.path()).datum(t)});this.gridLines=d.concat(c.update).map(function(t){var e=t.datum();n.domain(l);var r=i._getRadiusGridData(e.tickValue,!1,n);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawPlotLines:function(t){var e=this.vanchart.renderer,i=this.getPlotLines();this.plotLinesGroup||(this.plotLinesGroup=t.append(e.vgroup()),this.plotLines=[]);var n=this.plotLinesGroup,r=this._bindData(this.plotLines,i);r.exit.map(function(t){t.text&&t.text.remove(),t.remove()});var a=r.enter.map(function(t){var i=n.append(e.path().datum(t));return t.text&&(i.text=n.append(e.vtext())),i});this.plotLines=a.concat(r.update).map(function(t){var e=t.datum(),i=this._getRadiusGridPath(e.value);return t.style({fill:"none",stroke:e.color,"stroke-width":e.width,"stroke-dasharray":e.dataArray}).animate({attr:{d:i}}),t.text&&t.text.textContent(e.text).style(e.style).attr({y:e.baseY}),t},this)},_drawPlotBands:function(t){var e=this.vanchart.renderer,i=this.getRadiusPlotBands();this.plotBandsGroup||(this.plotBandsGroup=t.append(e.group()),this.plotBands=[]);var n=this.plotBandsGroup,r=this._bindData(this.plotBands,i); - r.exit.map(function(t){t.remove()});var a=r.enter.map(function(t){return n.append(e.path()).datum(t)});this.plotBands=a.concat(r.update).map(function(t){var e=t.datum();return t.style("fill",e.color).animate({attr:{d:e.path}}),t},this)},_drawTickLabel:function(t){this.indicator?this._drawCateSvgTickLabel(t):this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.scale,r=i.lastScale||i.scale,a=i.options,o=i.getTickData().slice(0,-1),s=a.labelStyle,h=a.useHtml;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]);var u=this.tickLabelsGroup,c=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(c.exit.map(function(t){t.remove()}),a.showLabel){var d=c.enter.map(function(t){return u.append(e.vtext(h).datum(t))});this.tickLabels=d.concat(c.update).map(function(t){var e=t.datum();t.textContent(e.tickContent).style(s);var i=-(e.tickRectDim.width+e.tickDim.width)/2-l(),a=-n(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,o={transform:"translate("+i+" "+a+")",dy:"0.85em"};if(h)t.attr(o),t.vRotate(e.labelRotation);else{var u=e.labelRotation%360?t.vRotate(e.labelRotation).rotateStr:"";o.transform+=u;var c=-(e.tickRectDim.width+e.tickDim.width)/2-l(),d=-r(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,f={transform:"translate("+c+" "+d+")",dy:"0.85em"};f.transform+=u,t.attr(f).animate({attr:o})}return t})}},_drawCateSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=(i.getTickData().slice(0,-1),r.labelStyle),o=r.useHtml;this.cateTickLabelsGroup||(this.cateTickLabelsGroup=t.append(e.vgroup()),this.cateTickLabels=[],this._cateDataDomain.forEach(function(){i.cateTickLabels.push([])}));var s=this.cateTickLabelsGroup,h=function(t,e){var i=t>=0?"RIGHT":"LEFT",n=e>=0?"BOTTOM":"TOP";return i+"_"+n},u=function(t,e,i,n,r,a,o){var s=l(),h=(n+a)/2,u=(r+o)/2;switch(t){case"LEFT_TOP":_x=e+s,_y=i+s;break;case"RIGHT_TOP":_x=e-h-s,_y=i+s;break;case"RIGHT_BOTTOM":_x=e+-h-s,_y=i-u-s;break;case"LEFT_BOTTOM":_x=e+s,_y=i-u-s}return{x:_x,y:_y}},c=this.series[0].angleAxis.getCateAngleGridLineData(),d=(this.cateTickData.map(function(t){return t.tickData.length}),n.domain()),f=n.range();this.cateTickData.forEach(function(t,l){var d,f=t.name,p=i._bindData(i.cateTickLabels[l],t.tickData,function(t){return t.tickValue});c.forEach(function(t){t.name==f&&(d=t.pos)}),p.exit.map(function(t){t.remove()});var g=d[0],m=d[1],v=h(g,m);if(r.showLabel){var _=p.enter.map(function(t){return s.append(e.vtext(o).datum(t))});i.cateTickLabels[l]=_.concat(p.update).map(function(t,e,r){var s=t.datum();t.textContent(s.tickContent).style(a),n.domain(i._cateDomain[l].domain),n.range([0,g]);var h=n(s.tickValue);n.range([0,m]);var c=n(s.tickValue),d=u(v,h,c,s.tickRectDim.width,s.tickRectDim.height,s.tickDim.width,s.tickDim.height),f=d.x,p=d.y,_={transform:"translate("+f+" "+p+")",dy:"0.85em"};if(o)t.attr(_),t.vRotate(s.labelRotation);else{var y=s.labelRotation%360?t.vRotate(s.labelRotation).rotateStr:"";_.transform+=y;var x=f,b=p,T={transform:"translate("+x+" "+b+")",dy:"0.85em"};T.transform+=y,t.attr(T).animate({attr:_})}return t})}}),n.range(f).domain(d)}});return u}),define("component/PolarAxis",["require","./Base","../utils/BaseUtils","../Constants","./Axis","./Polar","./AngleAxis","./RadiusAxis","../ComponentLibrary"],function(t){var e=(t("./Base"),t("../utils/BaseUtils")),i=(t("../Constants"),t("./Axis")),n=t("./Polar"),r=t("./AngleAxis"),a=t("./RadiusAxis"),o=t("../ComponentLibrary"),s=i.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=e.isArray(t)?t:[t];for(var i=t.length,s=i;s=0;s--)if(t[s].axisIndex=s,this._axisList[s]&&this._axisList[s].type!=t[s].type&&(this._axisList[s].remove(),this._axisList[s]=null),this._axisList[s])this._axisList[s].refresh(t[s]);else{var h;if(this.componentType===o.POLAR_COMPONENT)h=n;else{var l=t[s].type||o.VALUE_AXIS_COMPONENT;l==o.VALUE_AXIS_COMPONENT?h=a:l==o.CATEGORY_AXIS_COMPONENT&&(h=r)}this._axisList[s]=new h(t[s],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].doLayout()},render:function(){this._axisList.map(function(t){t.componentType===o.POLAR_COMPONENT&&t.render()})}});return o.register(o.RADIUS_AXIS_COMPONENT,s),o.register(o.ANGLE_AXIS_COMPONENT,s),o.register(o.POLAR_COMPONENT,s),s}),define("component/Title",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},s=i.extend({doLayout:function(){var t=this.options;if(t.text){var e,i=this.vanchart.bounds,s=i.width,h=i.height;if(this.isFloat)s-=this._floatX-i.x,h-=this._floatY-i.y;else{var l=this.vanchart.components[a.TOOLBAR_COMPONENT];this.initBarWidth=l&&l.getToolBarInitWidth()||0,s-=this.initBarWidth,"center"===t.align&&(s-=this.initBarWidth)}if(s-=2*o(),h-=2*o(),e=n.getTextDimension(t.text,t.style,t.useHtml),e.width>s){var u=n.clone(t.style);u.width=Math.max(s,0)+"px",e=n.getTextWrapDimension(t.text,u,t.useHtml)}else e.width+=.5;if(e.height=Math.min(this._maxHeight(),h,e.height),this.isFloat)this.bounds={x:this._floatX,y:this._floatY,width:e.width+2*o(),height:e.height+2*o()};else{var c=e.height+2*o();this._setComponentBounds(r.TOP,c)}if(this.isFloat)this.textBounds={x:o(),y:o(),width:e.width,height:e.height};else{var d;switch(t.align){case"right":d=s-e.width;break;case"center":d=this.bounds.width/2-e.width/2;break;case"left":default:d=this.bounds.x+o()}this.textBounds={x:d,y:o(),width:e.width,height:e.height}}if(t.useHtml)this.labels=[],this.labels.push({text:t.text,dim:e,style:t.style});else{var f=n.splitText(t.text,t.style,this.textBounds.width);this.labels=f.map(function(e){return{text:e,dim:n.getTextDimension(e,t.style,t.useHtml),style:t.style}})}}},render:function(){if(!this.textBounds||this.textBounds.width<0||this.textBounds.height<0)return void this.remove();var t=this.vanchart,e=t.renderer;this.titleGroup||(this.titleGroup=e.vgroup(),this.titleGroup.renderG.addTo(this.isFloat?t.frontGroup:t.backGroup),this.titleGroup.divG.add(),this.titleGroup.divG.style("pointer-events","auto")),this.titleGroup.attr("transform",n.makeTranslate([this.bounds.x,this.bounds.y])),this._innerClip(this.titleGroup),this.drawBackground(this.titleGroup.renderG),this.drawTitle(this.titleGroup)},drawBackground:function(t){var e=this.options,i=this.bounds;e.backgroundColor&&this.vanchart._renderRectangleBackground(t,e,{x:0,y:0,width:i.width,height:i.height})},drawTitle:function(t){this.text&&(this.text.remove(),this.text=null);var e=this.vanchart.renderer,i=this.options,a=this.textBounds,o=i.useHtml,s=i.align,h=e.vtext(o).attr({transform:n.makeTranslate([a.x,a.y]),width:a.width+"px","text-align":s,"white-space":"normal"});this.text=h;var l=o?{}:n.isMS?{dy:"1em"}:{"dominant-baseline":"central",dy:a.height/this.labels.length/2},u=0;this.labels.map(function(t){var i,n=t.dim;switch(s){case r.LEFT:i=0;break;case r.RIGHT:i=a.width-n.width;break;case r.CENTER:default:i=(a.width-n.width)/2}h.append(e.vtspan(o).attr({y:u,x:0,dx:i}).attr(l).textContent(t.text).style(t.style)),u+=n.height}),t.append(h)},remove:function(){this.titleGroup&&this.titleGroup.remove(),this._clip&&this._clip.remove(),this.titleGroup=this._clip=null}});return a.register(a.TITLE_COMPONENT,s),s}),define("utils/GeoUtils",["require","./Bounds"],function(t){function e(t,e){t&&l.hasOwnProperty(t.type)&&l[t.type](t,e)}function i(t,e){for(var i,n=-1,r=t.length;++nn;n++){var o=i[n].properties.center;o&&(o[0]*=e,o[1]*=e)}for(var s=r(t),n=0,a=s.length;a>n;n++)s[n][0]*=e,s[n][1]*=e}function o(t){var e=new s(r(t));return[[e.min.x,e.min.y],[e.max.x,e.max.y]]}var s=t("./Bounds"),h={Feature:function(t,i){e(t.geometry,i)},FeatureCollection:function(t,i){for(var n=t.features,r=-1,a=n.length;++rr;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!r.ielt9){n.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,a=!1;for(var o in this._tiles){var s=this._tiles[o];if(s.current&&s.loaded){var h=Math.min(1,(t-s.loaded)/200);n.setOpacity(s.el,h),1>h?e=!0:(s.active&&(a=!0),s.active=!0)}}a&&!this._noPrune&&this._pruneTiles(),e&&(i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=n.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var r in this._levels)this._levels[r].el.children.length||r===t?this._levels[r].el.style.zIndex=e-Math.abs(t-r):(n.remove(this._levels[r].el),this._removeTilesAtZoom(r),delete this._levels[r]);var a=this._levels[t],o=this._map;return a||(a=this._levels[t]={},a.el=n.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=e,a.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),a.zoom=t,this._setZoomTransform(a,o.getCenter(),o.getZoom()),i.falseFn(a.el.offsetWidth)),this._level=a,a}},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||in?this._retainParent(r,o,s,n):!1)},_retainChildren:function(t,e,i,n){for(var r=2*t;2*t+2>r;r++)for(var o=2*e;2*e+2>o;o++){var s=new a(r,o);s.z=i+1;var h=this._tileCoordsToKey(s),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n>i+1&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,i,n){var r=Math.round(e);(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r1)return void this._setView(t,i);for(var f=r.min.y;f<=r.max.y;f++)for(var p=r.min.x;p<=r.max.x;p++){var g=new a(p,f);if(g.z=this._tileZoom,this._isValidTile(g)){var m=this._tiles[this._tileCoordsToKey(g)];m?m.current=!0:h.push(g)}}if(h.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==h.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(p=0;pi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return s.create(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i),a=e.unproject(n,t.z),o=e.unproject(r,t.z);return this.options.noWrap||(a=e.wrapLatLng(a),o=e.wrapLatLng(o)),new s(a,o)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new a(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(n.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){n.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=i.falseFn,t.onmousemove=i.falseFn,r.ielt9&&this.options.opacity<1&&n.setOpacity(t,this.options.opacity),r.android&&!r.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var r=this._getTilePos(t),a=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i.bind(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&i.requestAnimFrame(i.bind(this._tileReady,this,t,null,o)),n.setPosition(o,r),this._tiles[a]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,a){if(this._map){e&&this.fire("tileerror",{error:e,tile:a,coords:t});var o=this._tileCoordsToKey(t);a=this._tiles[o],a&&(a.loaded=+new Date,this._map._fadeAnimated?(n.setOpacity(a.el,0),i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),e||(n.addClass(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),r.ielt9||!this._map._fadeAnimated?i.requestAnimFrame(this._pruneTiles,this):setTimeout(i.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new a(this._wrapX?i.wrapNum(t.x,this._wrapX):t.x,this._wrapY?i.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});return h}),define("chart/map/layer/TileLayer",["require","./GridLayer","../../../utils/BaseUtils","../../../dom/DomUtils","../CRS","../../../dom/Browser"],function(t){var e=t("./GridLayer"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=t("../CRS"),a=t("../../../dom/Browser"),o="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",s=e.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=i.setOptions(this,e),e.detectRetina&&a.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split(""))},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Hammer.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),Hammer.on(n,"error",i.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:a.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return i.template(this._url,i.extend(e,this.options))},_tileOnLoad:function(t,e){a.ielt9?setTimeout(i.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,i=e.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return null!==r&&r>n?i.divideBy(t.getZoomScale(r,n)).round():null!==a&&n>a?i.divideBy(t.getZoomScale(a,n)).round():i},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==r&&r>t?r:null!==a&&t>a?a:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=i.falseFn,e.onerror=i.falseFn,e.complete||(e.src=o,n.remove(e)))}});return s.WMS=s.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i.extend({},this.defaultWmsParams);for(var r in e)r in this.options||(n[r]=e[r]);e=i.setOptions(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&a.retina?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,s.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),n=this._crs.project(e.getNorthWest()),a=this._crs.project(e.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===r.EPSG4326?[a.y,n.x,n.y,a.x]:[n.x,a.y,a.x,n.y]).join(","),h=s.prototype.getTileUrl.call(this,t);return h+i.getParamString(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i.extend(this.wmsParams,t),e||this.redraw(),this}}),s}),define("chart/map/layer/Control",["require","../../../utils/Class","../../../utils/BaseUtils","../../../dom/DomUtils"],function(t){var e=t("../../../utils/Class"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=e.extend({options:{position:"bottomleft"},initialize:function(t){i.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),r=t._controlCorners[i];return n.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this},remove:function(){return this._map?(n.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});return r.Attribution=r.extend({options:{position:"bottomright",prefix:""},initialize:function(t){i.setOptions(this,t),this._attributions={}},onAdd:function(t){return t.attributionControl=this,this._container=n.create("div","leaflet-control-attribution"),this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),r.Zoom=r.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=n.create("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i.style.position="absolute",i.style.left=r._topLeft.x+"px",i.style.top=r._topLeft.y+"px",i.style["z-index"]=800,i.style["pointer-events"]="auto",i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,r,a){var o=n.create("a",i,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Hammer.on(o,"mousedown dblclick",n.stopPropagation).on(o,"click",n.stop).on(o,"click",a.bind(this)).on(o,"click",this._refocusOnMap.bind(this)),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";n.removeClass(this._zoomInButton,e),n.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&n.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&n.addClass(this._zoomInButton,e)}}),r}),define("chart/map/layer/FeatureGroup",["require","./../../../vector/shape/LayerGroup","../LatLngBounds"],function(t){var e=t("./../../../vector/shape/LayerGroup"),i=t("../LatLngBounds"),n=e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e.prototype.addLayer.call(this,t),this)},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),e.prototype.removeLayer.call(this,t),this):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new i;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}});return n}),define("utils/LineUtils",["require","./Point2D"],function(t){var e=t("./Point2D");return{simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=void 0+""?Uint8Array:Array,r=new n(i);r[0]=r[i-1]=1,this._simplifyDPStep(t,r,e,0,i-1);var a,o=[];for(a=0;i>a;a++)r[a]&&o.push(t[a]);return o},_simplifyDPStep:function(t,e,i,n,r){var a,o,s,h=0;for(o=n+1;r-1>=o;o++)s=this._sqClosestPointOnSegment(t[o],t[n],t[r],!0),s>h&&(a=o,h=s);h>i&&(e[a]=1,this._simplifyDPStep(t,e,i,n,a),this._simplifyDPStep(t,e,i,a,r))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,r=0,a=t.length;a>n;n++)this._sqDist(t[n],t[r])>e&&(i.push(t[n]),r=n);return a-1>r&&i.push(t[a-1]),i},clipSegment:function(t,e,i,n,r){var a,o,s,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=h||l,o=this._getEdgeIntersection(t,e,a,i,r),s=this._getBitCode(o,i),a===h?(t=o,h=s):(e=o,l=s)}},_getEdgeIntersection:function(t,i,n,r,a){var o,s,h=i.x-t.x,l=i.y-t.y,u=r.min,c=r.max;return 8&n?(o=t.x+h*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+h*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/h):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/h),new e(o,s,a)},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,i,n,r){var a,o=i.x,s=i.y,h=n.x-o,l=n.y-s,u=h*h+l*l;return u>0&&(a=((t.x-o)*h+(t.y-s)*l)/u,a>1?(o=n.x,s=n.y):a>0&&(o+=h*a,s+=l*a)),h=t.x-o,l=t.y-s,r?h*h+l*l:new e(o,s)},clipPolygon:function(t,e,i){var n,r,a,o,s,h,l,u,c,d=[1,4,2,8];for(r=0,l=t.length;l>r;r++)t[r]._code=this._getBitCode(t[r],e);for(o=0;4>o;o++){for(u=d[o],n=[],r=0,l=t.length,a=l-1;l>r;a=r++)s=t[r],h=t[a],s._code&u?h._code&u||(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)):(h._code&u&&(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)),n.push(s));t=n}return t}}}),define("chart/map/layer/GeoJSON",["require","./FeatureGroup","../../../utils/BaseUtils","../../../utils/Point2D","../../../utils/Bounds","../LatLng","../LatLngBounds","../Marker","../../../vector/shape/Path","../../../utils/LineUtils"],function(t){var e=t("./FeatureGroup"),i=t("../../../utils/BaseUtils"),n=t("../../../utils/Point2D"),r=t("../../../utils/Bounds"),a=t("../LatLng"),o=t("../LatLngBounds"),s=(t("../Marker"), - t("../../../vector/shape/Path")),h=t("../../../utils/LineUtils"),l=e.extend({initialize:function(t,e){i.setOptions(this,e),this._layers={},this._featureLayerMap={},t&&this.addData(t)},addData:function(t){var e,n,r,a=i.isArray(t)?t:t.features;if(a){for(e=0,n=a.length;n>e;e++)r=a[e],(r.geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=this.geometryToLayer(t,o);return s?(s.options=i.extend({},this.options),this._featureLayerMap[i.stamp(t)]=s,this.addLayer(s)):this},getLayerByFeature:function(t){return this._featureLayerMap[i.stamp(t)]},geometryToLayer:function(t,i){var n,r,a,o="Feature"===t.type?t.geometry:t,s=o?o.coordinates:null,h=[],l=i&&i.coordsToLatLng||this.coordsToLatLng;if(!s&&!o)return null;switch(o.type){case"Polygon":case"MultiPolygon":return n=this.coordsToLatLngs(s,"Polygon"===o.type?1:2,l),new c(n,i);case"GeometryCollection":for(r=0,a=o.geometries.length;a>r;r++){var u=this.geometryToLayer({geometry:o.geometries[r],type:"Feature",properties:t.properties},i);u&&h.push(u)}return new e(h)}},coordsToLatLng:function(t){return new a(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){for(var n,r=[],a=0,o=t.length;o>a;a++)n=e?this.coordsToLatLngs(t[a],e-1,i):(i||this.coordsToLatLng)(t[a]),r.push(n);return r},latLngToCoords:function(t){return void 0!==t.alt?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],r=0,a=t.length;a>r;r++)n.push(e?l.latLngsToCoords(t[r],e-1,i):l.latLngToCoords(t[r]));return!e&&i&&n.push(n[0]),n},asFeature:function(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}}),u=s.extend({initialize:function(t,e){i.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,a=h._sqClosestPointOnSegment,o=0,s=this._parts.length;s>o;o++)for(var l=this._parts[o],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=a(t,e,i,!0);n>d&&(n=d,r=a(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s=this._rings[0],h=s.length;if(!h)return null;for(t=0,e=0;h-1>t;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;h-1>t;t++)if(r=s[t],a=s[t+1],i=r.distanceTo(a),n+=i,n>e)return o=(n-e)/i,this._map.layerPointToLatLng([a.x-o*(a.x-r.x),a.y-o*(a.y-r.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=a.create(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return u._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=u._flat(t),n=0,r=t.length;r>n;n++)i?(e[n]=a.create(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new r;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new n(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof a,s=t.length;if(o){for(r=[],n=0;s>n;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}else for(n=0;s>n;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);var e,i,n,r,a,o,s,l=this._parts;for(e=0,n=0,r=this._rings.length;r>e;e++)for(s=this._rings[e],i=0,a=s.length;a-1>i;i++)o=h.clipSegment(s[i],s[i+1],t,i,!0),o&&(l[n]=l[n]||[],l[n].push(o[0]),(o[1]!==s[i+1]||i===a-2)&&(l[n].push(o[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;n>i;i++)t[i]=h.simplify(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._updatePoly()},_updatePoly:function(t){this._path.attr("d",this.pointsToPath(this._parts,t))},pointsToPath:function(t,e){var i,n,r,a,o,s,h="";for(i=0,r=t.length;r>i;i++){for(o=t[i],n=0,a=o.length;a>n;n++)s=o[n],h+=(n?"L":"M")+s.x+" "+s.y;h+=e?"z":""}return h||"M0 0"},_containsPoint:function(t,e){var i,n,r,a,o,s,l=this._clickTolerance();if(!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;a>i;i++)for(s=this._parts[i],n=0,o=s.length,r=o-1;o>n;r=n++)if((e||0!==n)&&h.pointToSegmentDistance(t,s[r],s[n])<=l)return!0;return!1}});u._flat=function(t){return!i.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]};var c=u.extend({isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s,h,l=this._rings[0],u=l.length;if(!u)return null;for(a=o=s=0,t=0,e=u-1;u>t;e=t++)i=l[t],n=l[e],r=i.y*n.x-n.y*i.x,o+=(i.x+n.x)*r,s+=(i.y+n.y)*r,a+=3*r;return h=0===a?l[0]:[o/a,s/a],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=u.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof a&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){u.prototype._setLatLngs.call(this,t),u._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return u._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options["stroke-width"],i=new n(e,e);if(t=new r(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var a,o=0,s=this._rings.length;s>o;o++)a=h.clipPolygon(this._rings[o],t,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._updatePoly(!0)},_containsPoint:function(t){var e,i,n,r,a,o,s,h,l=!1;if(!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;s>r;r++)for(e=this._parts[r],a=0,h=e.length,o=h-1;h>a;o=a++)i=e[a],n=e[o],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||u.prototype._containsPoint.call(this,t,!0)}});return l}),define("utils/getJson",["require","./BaseUtils"],function(t){function e(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function i(t){return 1===t.length?function(e,i){t(null==e?i:null)}:t}function n(t,n,r,o){function s(){var t,i=c.status;(!i&&e(c)||i>=200&&300>i||304===i)&&(t=r.call(h,c),o(t))}var h={},l=a.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,d=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=s:c.onreadystatechange=function(){c.readyState>3&&s()},h.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",h)},h.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",h):n},h.responseType=function(t){return arguments.length?(d=t,h):d},h.response=function(t){return r=t,h},["get","post"].forEach(function(t){h[t]=function(){return h.send.apply(h,[t].concat(a.toArray(arguments)))}}),h.send=function(e,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),c.open(e,t,!1),null==n||"accept"in u||(u.accept=n+",*/*"),c.setRequestHeader)for(var a in u)c.setRequestHeader(a,u[a]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=d&&(c.responseType=d),null!=r&&h.on("error",r).on("load",function(t){r(null,t)}),l.beforesend.call(h,c),c.send(null==i?null:i),h},h.abort=function(){return c.abort(),h},a.rebind(h,l,"on"),null==o?h:h.get(i(o))}function r(t){return JSON.parse(t.responseText)}var a=t("./BaseUtils");return function(t,e){return n(t,"application/json",r,e)}}),define("component/Geo",["require","./Base","../utils/BaseUtils","../utils/QueryUtils","../utils/GeoUtils","../Constants","../ComponentLibrary","../chart/map/layer/ImageOverlay","../chart/map/layer/TileLayer","../chart/map/layer/Control","../chart/map/layer/GeoJSON","../utils/getJson","../chart/map/CRS","../chart/map/LatLngBounds"],function(t){function e(t){var e;return t&&"object"==typeof t?e=t:window.FR&&window.FR.ajax?FR.ajax({type:"GET",url:t,dataType:"json",async:!1,success:function(t){e=t}}):f(t,function(t){e=t}),e}var i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../utils/QueryUtils"),a=t("../utils/GeoUtils"),o=t("../Constants"),s=t("../ComponentLibrary"),h={},l=t("../chart/map/layer/ImageOverlay"),u=t("../chart/map/layer/TileLayer"),c=t("../chart/map/layer/Control"),d=t("../chart/map/layer/GeoJSON"),f=t("../utils/getJson"),p=t("../chart/map/CRS"),g=t("../chart/map/LatLngBounds"),m="Point",v="LineString",_="MultiLineString",y=i.extend({_refresh:function(){this._loaded=!1;var t=n.stamp(this.vanchart);h[t]=h[t]||{}},doLayout:function(){this._loadGeo();var t,e=this.vanchart,i=this.options;n.hasDefined(i.zoomListener)?t=i.zoomListener:n.hasDefined(i.zoomLevel)&&(t=i.zoomLevel);var r=i.viewCenter?[i.viewCenter[1],i.viewCenter[0]]:null;if(!isNaN(+t)&&r)e.setView(r,t);else{if(isNaN(+t))e.fitBounds(this._getFitBounds());else{e.fitBounds(this._getFitBounds(),{animate:!1});var r=e.getCenter();e.setView(r,t)}r&&e.panTo(r)}this._topLeft={x:0,y:e.bounds.y}},render:function(){var t=this.options,e=this.jsonData,i=n.stamp(this.vanchart),r=t.tileLayer||this.vanchart.options.geo.tileLayer,a=t.attribution||this.vanchart.options.geo.attribution||"",o=t.wmsUrl||this.vanchart.options.geo.wmsUrl,s=t.wmsLayer||this.vanchart.options.geo.wmsLayer,d=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;if(this._imageBackgroundLayer=this._tileLayer=this._wmsLayer=null,this._isImageMap()&&(t.imageUrl||e.imageString)){var f=t.imageUrl||"data:image/"+e.imageSuffix+";base64,"+e.imageString,p=[[0,0],[e.imageHeight*this.scale,e.imageWidth*this.scale]];this._imageBackgroundLayer=new l(f,p).addTo(this.vanchart)}else r?(this._attribution=h[i][a]||(new c.Attribution).addAttribution(a),h[i][a]=this._attribution,this._tileLayer=h[i][r]||new u(r),h[i][r]=this._tileLayer,h[i][r].addTo(this.vanchart),h[i][a].addTo(this.vanchart)):o&&(this._wmsLayer=h[i][o]||new u.WMS(o,{layers:s.join(",")}),h[i][o]=this._wmsLayer,h[i][o].addTo(this.vanchart));this.renderAreaFeatures(),t.control&&(t._topLeft=this._topLeft,this._zoomControl=new c.Zoom(t).addTo(this.vanchart));var g=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;d&&d!=g&&this.vanchart.removeLayer(d)},needsNullArea:function(){var t=this.vanchart;return t.isAreaMap()||t.isHeatMap()||t.seriesOfType(o.AREA_MAP).length},renderAreaFeatures:function(){if(this.needsNullArea()){var t=this.defaultAreaStyle();this.geoJsonLayer=this.geoJsonLayer||new d(this.jsonData,t),this.geoJsonLayer.addTo(this.vanchart)}},getLayerByFeature:function(t){return this.geoJsonLayer.getLayerByFeature(t)},defaultAreaStyle:function(){var t=this.vanchart.options.plotOptions,e=[t[o.AREA_MAP],t];return{fill:n.pick(r.queryList(e,"nullColor"),"#cccccc"),"fill-opacity":n.pick(r.queryList(e,"opacity"),.75),"stroke-width":n.pick(r.queryList(e,"borderWidth"),1),stroke:n.pick(r.queryList(e,"borderColor"),"#ffffff"),"stroke-opacity":n.pick(r.queryList(e,"borderOpacity"),1)}},geoName:function(){return this.options.name},_loadGeo:function(){if(this._loaded||this._dataUrl==this.options.data)return void(this._loaded=!0);this._loaded=!0,this._dataUrl=this.options.data,this.geoJsonLayer&&this.geoJsonLayer.remove(),this.geoJsonLayer=null;var t=this.options,i=this,n=this.vanchart;i._validPointName={},i._validAreaName={},i._extendedLineFeature=[],t.data?i.jsonData=e(t.data):i.jsonData={};for(var r=i.jsonData&&i.jsonData.features||[],o=0,s=r.length;s>o;o++){var h=r[o],l=h.geometry;l.type==m?(i._validPointName[h.properties.name]=i._validPointName[h.properties.name]||[],i._validPointName[h.properties.name].push(h)):l.type==v||l.type==_?i._extendedLineFeature.push(h):(i._validAreaName[h.properties.name]=i._validAreaName[h.properties.name]||[],i._validAreaName[h.properties.name].push(h))}if(this.scale=1,this._isImageMap()){var u=n.width,c=n.height,d=u/i.jsonData.imageWidth,f=c/i.jsonData.imageHeight;this.scale=Math.min(d,f),a.scaleGeo(i.jsonData,i.scale)}n.options.crs=this._isImageMap()?p.Simple:p.EPSG3857},getDataPointLngLat:function(t,e){if(!e||t.options.lnglat)return t.options.lnglat;var i=t.series&&t.series.type==o.AREA_MAP?e.properties.center:e.geometry.coordinates;if(!i)if(this._isImageMap()){var n=this.jsonData.imageWidth,r=0,s=this.jsonData.imageHeight,h=0,l=a.getAllPoints(e);l.forEach(function(t){isNaN(t[0])||isNaN(t[1])||(n=Math.min(n,t[0]),r=Math.max(r,t[0]),s=Math.min(s,t[1]),h=Math.max(h,t[1]))}),i=[(r+n)/2,(h+s)/2]}else{var u=a.bounds(e),c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2;i=[c,d]}return i},getZoomListener:function(){return this.options.zoomListener||this.options.zoomLevel},getFeaturesByName:function(t,e){return this._loadGeo(),this._validAreaName&&this._validPointName?e==o.AREA_MAP?this._validAreaName[t]:this._validPointName[t]:void 0},_isImageMap:function(){return this.jsonData&&this.jsonData.imageWidth},_getFitBounds:function(){function t(t){var a=t.lnglat||t.options.lnglat;if(a)e=!1;else{var o=i.getFeaturesByName(t.name,t.series.type);a=i.getDataPointLngLat(t,o&&o[0])}a&&(n=Math.min(n,a[0]),r=Math.max(r,a[0]),s=Math.min(s,a[1]),h=Math.max(h,a[1]))}var e=!0,i=this,n=180,r=-180,s=90,h=-90;if(this._isImageMap())n=this.jsonData.imageWidth*this.scale,r=0,s=this.jsonData.imageHeight*this.scale,h=0;else{for(var l=this.vanchart.series,u=0,c=l.length;c>u;u++)l[u].visible&&l[u].type!=o.AREA_MAP&&(l[u].type===o.LINE_MAP?l[u].points.forEach(function(e){t(e.options.from),t(e.options.to)}):l[u].points.forEach(t));if(e&&this.jsonData){var d=a.bounds(this.jsonData),f=d[0],p=d[1];return[[f[1],f[0]],[p[1],p[0]]]}}return[[s,n],[h,r]]},remove:function(){this.geoJsonLayer&&this.geoJsonLayer.remove(),this._imageBackgroundLayer&&this.vanchart.removeLayer(this._imageBackgroundLayer),this._attribution&&this._attribution.remove(),this._tileLayer&&this._tileLayer.remove(),this._wmsLayer&&this._wmsLayer.remove(),this._imageBackgroundLayer=this._attribution=this._tileLayer=this._wmsLayer},resize:function(){if(this._isImageMap()){var t=(this.options,this.jsonData),e=this.scale,i=this.vanchart,n=i.width,r=i.height,s=n/t.imageWidth,h=r/t.imageHeight;if(this.scale=Math.min(s,h),a.scaleGeo(t,this.scale/e),this._imageBackgroundLayer){var l=[[0,0],[t.imageHeight*this.scale,t.imageWidth*this.scale]];this._imageBackgroundLayer.setBounds(g.create(l))}this.geoJsonLayer&&(this.geoJsonLayer.remove(),this.geoJsonLayer=null,i.validPoints.forEach(function(t){t.series.type==o.AREA_MAP&&(t.layers=null)}))}}});return s.register(s.GEO_COMPONENT,y),y}),define("component/DrillTools",["require","./Base","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=.417,s=.583,h=.25,l=.333,u=.1665,c=e.extend({_refresh:function(){this.iconData=[]},doLayout:function(){var t=i.getTextDimension("test",this.options.style);this._setComponentBounds(r.TOP,t.height*(2*u+1))},getBookMarkPath:function(t){var e=this.options.style,n=t.layerIndex,r=i.getTextDimension(t.geo.geoName(),e),a=(0===n?o:s)+h;a=r.height*a+r.width;var c=r.height*l,d=(1+2*u)*r.height,f=[0,0],p=[a,0],g=[a+c,d/2],m=[a,d],v=[0,d];return"M"+f+"L"+p+"L"+g+"L"+m+"L"+v+"Z"},isCurrent:function(t){var e=this.iconData[this.iconData.length-1];return e.series==t.series},textColor:function(t){return this.isCurrent(t)?this.options.currentColor:this.options.style.color},mouseOverColor:function(t){var e;if(!(e=this.options.mouseOverColor)){var i=this.textColor(t),r=n.getRGBAColorArray(i),a=n.rgb2hsb(r[0],r[1],r[2]),o=n.hsb2rgb(a[0],a[1]/2,(a[2]+1)/2);e=n.toColor(o,"rgb")}return e},leftPadding:function(t){return 0===t.layerIndex?o:s},calculateExitAnimation:function(t){for(var e=600,i=0,n=t.length;n>i;i++)t[i].time=e,e=Math.max(e-100,0);var r=0;for(i=n-1;i>=0;i--)t[i].time?(t[i].delay=r,r+=200):t[i].delay=0},getMarkPos:function(t){for(var e=0,i=0;i=0;a--){var o=this.iconData[a];if(this.drillItems[a]){var s=this.drillItems[a];s.path.attr({d:t.getBookMarkPath(o)}),s.text.style({fill:this.textColor(o)}).textContent(o.geo.geoName())}else o.aniStart=this.getMarkAnimationStartPos(o),o.aniEnd=this.getMarkPos(o),this.drillItems[a]=this._createItem(o)}var h=this.drillItems.splice(this.iconData.length,this.drillItems.length);this.calculateExitAnimation(h);for(var a=0,l=h.length;l>a;a++){var o=h[a];o.animate({duration:o.time,delay:o.delay,ease:"quad-in",attr:{transform:i.makeTranslate([o.datum().aniStart,0]),opacity:0}}).remove()}this.drillItems.length=this.iconData.length},_createItem:function(t){var e=this,n=e.vanchart,r=n.renderer,a=this.options,o=i.getTextDimension(t.geo.geoName(),a.style).height,s=r.group().style({cursor:"pointer"}).datum(t);return s.path=r.path({d:e.getBookMarkPath(t)}).style({fill:a.backgroundColor,filter:"url(#"+i.stamp(this.shadow)+")"}).addTo(s),s.text=r.text().attr({x:e.leftPadding(t)*o,y:u*o,dy:".85em"}).style(a.style).style({fill:this.textColor(t)}).textContent(t.geo.geoName()).addTo(s),s.attr("transform",i.makeTranslate([t.aniStart,0])).addTo(this.dToolsGroup).animate({duration:500,ease:"cubic-out",attr:{transform:i.makeTranslate([t.aniEnd,0])}}),i.toBack(s.node()),s},_findDrillTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement;n;){for(var r=this.drillItems.length-1;r>=0;r--)this.drillItems[r].node()==n&&(e=this.drillItems[r]);if(e||n==this.dToolsGroup.node())break;n=n.parentNode}return e},onTap:function(t){var e=this._findDrillTarget(t),n=this.drillItems.indexOf(e),r=this.vanchart.layerMap[n];if(e&&r){var r=e.datum();if(this.options.click&&r.drillUpDataPoint){var a=i.getFormatterFunction(this.options.click);a(r.drillUpDataPoint,t.srcEvent)}this.vanchart.drillUp(r)}},onMouseOver:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.mouseOverColor(e.datum())})},onMouseOut:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.textColor(e.datum())})},getEvents:function(){return{tap:this.onTap,mouseover:this.onMouseOver,mouseout:this.onMouseOut}},remove:function(){this.dToolsGroup&&this.dToolsGroup.remove(),this.dToolsGroup=null,this.iconData=this.drillItems=[]}});return a.register(a.DRILL_TOOLS,c),c}),define("component/DataSheet",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","../ComponentLibrary","../utils/BezierEasing"],function(t){var e,i,n=t("./Base"),r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("./LegendIconFactory"),s=t("../ComponentLibrary"),h=t("../utils/BezierEasing"),l=400,u=h.css.swing,c=function(){return null==e&&(e=r.paddingConvertWithScale("0.25rem")),e},d=function(){return null==i&&(i=r.paddingConvertWithScale("0.125rem")),i},f=18,p={color:"#666666",fontSize:"14px",fontFamily:"Verdana"},g=n.extend({doLayout:function(){this._recordForPlotBounds(a.LEFT,Math.round(this.getSeriesNameLength()))},reCalculateSize:function(){this.doLayout()},updateAxisSizeAndBounds:function(){this.maxCateLineHeight=this.maxSeriesLineHeight=null,this._setComponentBounds(a.BOTTOM,this._calculateLineHeight())},_calculateLineHeight:function(){this.calculateShowText();var t=this._categoryStyle(),e=0,i=r.getTextHeight(this._seriesStyle()),n=r.getTextHeight(this._valueStyle());this.maxCateLineHeight=2*c()+this.maxCateLine*r.getTextHeight(t)+(this.maxCateLine-1)*c(),this.maxSeriesLineHeight=[];for(var a=0,o=this.seriesNames.length;o>a;a++){var s=this.maxSeriesLine[a],h=2*c()+s*i+(s-1)*c(),l=this.maxValueLine[a],u=2*c()+l*n+(l-1)*c();this.maxSeriesLineHeight[a]=Math.max(h,u),e+=this.maxSeriesLineHeight[a]}return this.sheetHeight=Math.ceil(this.maxCateLineHeight+e),this.sheetHeight},calculateShowText:function(){this.maxCateLine=0,this.maxValueLine=[],this.showTextMap=this.showTextMap||{};var t=this.vanchart.xAxis(),e=t._dataDomain,i=t._domain,n=this._categoryStyle(),a=r.getTextHeight(n)+c(),o=this.vanchart.bounds.width/i.length,s=this;e.forEach(function(t){var e=r.splitText(t,n,o,c());if(s.maxCateLineHeight){var h=Math.min(parseInt(s.maxCateLineHeight/a,10),e.length);e=e.slice(0,h)}-1!=r.indexOf(i,t)&&(s.maxCateLine=Math.max(s.maxCateLine,e.length)),s.showTextMap[t]=s.showTextMap[t]||{},s.showTextMap[t].categoryArray=e});var h=this._valueStyle(),l=r.getTextHeight(h)+c(),u=this.options.formatter,d=this.vanchart.series;d.forEach(function(t,e){for(var n=t.points,a=0,d=n.length;d>a;a++){var f=n[a],p=f.getTargetValue(),g=f.category,m=f.isNull?"-":s._getTickContent(p,u),v=r.splitText(m,h,o,c());if(s.maxSeriesLineHeight&&s.maxSeriesLineHeight[e]){var _=Math.min(parseInt(s.maxSeriesLineHeight[e]/l,10),v.length);v=v.slice(0,_)}s.showTextMap[g].value=s.showTextMap[g].value||[],s.showTextMap[g].value[e]=s.showTextMap[g].value[e]||{},s.showTextMap[g].value[e].valueArray=v,-1!=r.indexOf(i,g)&&(s.maxValueLine[e]=Math.max(s.maxValueLine[e]||0,v.length))}})},fixBoundsByPlot:function(){var t=this.vanchart.bounds,e=this.vanchart.getComponent(s.X_AXIS_COMPONENT),i=t.y+t.height;e&&e._axisList.length&&e._axisList.forEach(function(t){t.getPosition()==a.BOTTOM&&(i=Math.max(i,t.bounds.y+t.bounds.height))}),this.bounds={x:t.x-this.maxSeriesWidth,y:i,width:this.maxSeriesWidth+t.width,height:this.sheetHeight}},getSeriesNameLength:function(){this.seriesNames=[],this.maxSeriesLine=[],this.seriesIconType=[];var t=this,e=t.vanchart,i=e.series,n=this._seriesStyle(),a=e.getChartBounds().width/4-(f+2*d()),s=0,h=0;return i.forEach(function(e){var i=r.getTextDimension(e.name,n,!1).width+2*c();if(i>a){var l=r.splitText(e.name,n,a,c());t.maxSeriesLine.push(l.length),t.seriesNames.push(l),s=a}else t.maxSeriesLine.push(1),t.seriesNames.push([e.name]),s=Math.max(i,s);var u=t._getLegendType(e);t.seriesIconType.push(u),h=Math.max(h,o.getLegendIconSize(u).width)}),this.maxSeriesWidth=Math.ceil(s+2*d()+h),this.maxSeriesWidth+c()},_categoryStyle:function(){var t=this.vanchart.xAxis(),e=t?t.options.labelStyle:p;return r.convertToREMUseDefault16PX(e)},_seriesStyle:function(){var t=this.vanchart.getComponent(s.LEGEND_COMPONENT),e=t?t.options.style:p;return r.convertToREMUseDefault16PX(e)},_valueStyle:function(){return r.convertToREMUseDefault16PX(this.options.style)},getTextPadding:function(){return c()},render:function(){if(this.remove(),this.vanchart.series.length){this.calculateShowText();var t=this.vanchart,e=this.bounds,i=t.renderer,n={x:this.maxSeriesWidth,y:0,width:e.width-this.maxSeriesWidth,height:e.height};this.animationClip=i.createClip(n),this.dataSheetGroup=this.createComponentGroup().attr("transform",r.makeTranslate(this.bounds)),this.animationGroup=i.group().addTo(this.dataSheetGroup),i.clip(this.animationGroup,this.animationClip),this._drawBaseTable(),this._drawTableContent()}},_drawBaseTable:function(){var t=this.options,e=this.maxSeriesWidth,i=this.maxCateLineHeight,n=this.vanchart,r=n.renderer,a=this.dataSheetGroup,o=this.bounds.width,s=this.bounds.height,h={fill:"none",stroke:t.borderColor,"stroke-width":t.borderWidth};r.path().attr("d","M"+e+",0L"+o+",0L"+o+" "+s+"L0,"+s+"L0,"+i).style(h).addTo(a);for(var l=0,u=this.seriesNames.length;u>l;l++)r.line().attr("x1",0).attr("y1",i).attr("x2",o).attr("y2",i).style(h).addTo(a),i+=this.maxSeriesLineHeight[l];this._drawSeries()},_drawTableContent:function(){for(var t=this.vanchart,e=t.xAxis(),i=t.renderer,n=e._domain,a=e._dataDomain,o=this.getPlotBounds().width,s=o/n.length,h=-r.indexOf(a,n[0])*s+this.maxSeriesWidth,c={fill:"none",stroke:this.options.borderColor,"stroke-width":this.options.borderWidth},d=0,f=a.length;f>d;d++){var p=this.showTextMap[a[d]],g=h+s*d;this._drawCategory(p,g,s),this._drawValues(p,g,s);var m={x1:g,y1:0,x2:g,y2:this.bounds.height};p._line=p._line||i.line(m).style(c).addTo(this.animationGroup),p._line.animate({duration:l,ease:u,attr:{x1:g,x2:g}})}},zoomRefresh:function(){this.calculateShowText(),this._drawTableContent()},_drawCategory:function(t,e,i){var n=t.categoryArray,a=this.vanchart.renderer;t._category=t._category||[];for(var o,s,h=this._categoryStyle(),c=r.getTextHeight(h),d=this.getTextPadding(),f=this._getStartY(n,h,this.maxCateLineHeight),p=0;pc;c++)t.value.push({valueArray:[""]})}for(var f,p,g=0;gp;p++){for(var m=i[p],v=this.maxSeriesLineHeight[p],_=h+this._getStartY(m,l,v)+.85*u,y=0;ya;a++){var h=n[a],l=h.options.trendLine;if(l&&h.visible){var u;switch(l.type){case r.LINEAR:u=i.linear;break;case r.LOGARITHMIC:u=i.logarithmic;break;case r.POLYNOMIAL:u=i.polynomial;break;default:case r.EXPONENTIAL:u=i.exponential}var c=h.getTrendLineXYValues(h);if(!(c[0].length<=1)){var d,f,p=e(c[2]);p?(f=c[0],d=c[1]):(d=c[0],f=c[1]);var g=u(d,f,this.extendXs(d,l.period)),m=o.line().interpolate("cardinal");p&&m.x(function(t){return t[1]}).y(function(t){return t[0]});var v={d:m(g),trendLine:l};t.push(v)}}}this.trendLines=t},extendXs:function(t,e){function i(t,e){return Array.apply(null,Array(t)).map(e)}if(e&&2===e.length&&t.length>1){var n=t[1]-t[0];return i(-e[0],function(e,i){return t[0]-(i+1)*n}).reverse().concat(t).concat(i(e[1],function(e,i){return t[t.length-1]+(i+1)*n}))}return t},linear:function(t,e,n){var r,a,o,s,h=i(t,e);return r=n[0],o=h[0]*r+h[1],a=n[n.length-1],s=h[0]*a+h[1],[[r,o],[a,s]]},logarithmic:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,n);t.map(function(t,i){0>=o&&(t+=-o+1),r.push(Math.log(t)),a.push(e[i])});var s=i(r,a);return n.map(function(t){var e=t;return 0>=o&&(t+=-o+1),[e,s[0]*Math.log(t)+s[1]]})},exponential:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,e);t.map(function(t,i){0>=o&&(e[i]+=-o+1),r.push(t),a.push(Math.log(e[i]))});var s=i(r,a),h=s[0];return s[0]=Math.exp(s[1]),s[1]=h,n.map(function(t){var e=s[0]*Math.exp(t*s[1]);return 0>=o&&(e-=-o+1),[t,e]})},polynomial:function(t,e,i){var n=Math.min(t.length-1,6);n++;for(var r,a=[],o=[],s=0;n>s;s++)a[s]=[],o[s]=[];var s,h,l,u,c=[],d=[],f=[];for(s=0;n>s;s++)for(h=0;hu;u++)r*=t[h];a[s][h]=r}for(s=0;n>s;s++)for(l=0;n>l;l++){for(r=0,h=0;hs;s++){for(r=0,h=0;hs;s++)o[s][0]=o[s][0]/o[0][0];for(s=1;n>s;s++)for(h=s;n>h;h++){var p=0;for(l=0;s>l;l++)p+=o[l][h]*o[s][l];if(o[s][h]=o[s][h]-p,h+1!=n){var g=0;for(l=0;s>l;l++)g+=o[l][s]*o[h+1][l];o[h+1][s]=(o[h+1][s]-g)/o[s][s]}}for(d[0]=c[0],s=1;n>s;s++){for(r=0,h=0;s>h;h++)r+=o[s][h]*d[h];d[s]=c[s]-r}for(f[n-1]=d[n-1]/o[n-1][n-1],s=n-2;s>=0;s--){for(r=0,h=s+1;n>h;h++)r+=o[s][h]*f[h];f[s]=(d[s]-r)/o[s][s]}return i.map(function(t){return[t,f.reduce(function(e,i,n){return e+i*Math.pow(t,n)},0)]})},_renderTrendLine:function(){this.calcTrendLines();var t=this.trendLines,e=this.bounds,i=this.renderer;if(!this.trendLineGroup){if(!this.trendLines||!this.trendLines.length)return;this.trendLineGroup=this.seriesGroup.append(i.group()),i.clip(this.trendLineGroup,this.plotClip)}this.trendLineGroup.trendLines=this.trendLineGroup.trendLines||[];for(var a=this.trendLineGroup.trendLines,o=0,s=t.length;s>o;o++){var h=t[o],l={d:h.d},u={fill:"none",stroke:h.trendLine.color,"stroke-width":h.trendLine.width,"stroke-dasharray":r.DASH_TYPE[h.trendLine.dashStyle]};a[o]?a[o].attr(l).style(u):a[o]=i.path(l).style(u).addTo(this.trendLineGroup),a[o].attr("transform",n.makeTranslate(e))}for(var o=t.length;o Date: Tue, 12 Sep 2017 13:50:25 +0800 Subject: [PATCH 02/14] icon_text_trigger --- bi/case.js | 75 ++++++++++++++++++++++++++ dist/bundle.js | 75 ++++++++++++++++++++++++++ dist/bundle.min.js | 24 ++++----- dist/case.js | 75 ++++++++++++++++++++++++++ src/case/trigger/trigger.icon.text.js | 76 +++++++++++++++++++++++++++ 5 files changed, 313 insertions(+), 12 deletions(-) create mode 100644 src/case/trigger/trigger.icon.text.js diff --git a/bi/case.js b/bi/case.js index 01949c87c..c5d73ef20 100644 --- a/bi/case.js +++ b/bi/case.js @@ -12545,6 +12545,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, { } }); BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.IconTextTrigger + * @extends BI.Trigger + */ +BI.IconTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.IconTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [{ + el: { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + ref: function (_ref) { + self.icon = _ref; + }, + disableSelected: true + }, + width: 24 + }, + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setIcon: function (iconCls) { + this.icon.setIcon(iconCls); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** * 文字trigger * * Created by GUY on 2015/9/15. diff --git a/dist/bundle.js b/dist/bundle.js index 68ba4b972..2823e14c5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -76860,6 +76860,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, { } }); BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.IconTextTrigger + * @extends BI.Trigger + */ +BI.IconTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.IconTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [{ + el: { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + ref: function (_ref) { + self.icon = _ref; + }, + disableSelected: true + }, + width: 24 + }, + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setIcon: function (iconCls) { + this.icon.setIcon(iconCls); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** * 文字trigger * * Created by GUY on 2015/9/15. diff --git a/dist/bundle.min.js b/dist/bundle.min.js index c631a248e..c4fa335f5 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -1,4 +1,4 @@ -/*! fineui 11-09-2017 */ +/*! fineui 12-09-2017 */ function accAdd(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}function accSub(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}function accMul(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}function accDiv(arg1,arg2){var t1=0,t2=0,r1,r2;try{t1=arg1.toString().split(".")[1].length}catch(e){}try{t2=arg2.toString().split(".")[1].length}catch(e){}with(Math)return r1=Number(arg1.toString().replace(".","")),r2=Number(arg2.toString().replace(".","")),t2>t1?r1/r2*pow(10,t2-t1):r1/r2/pow(10,t1-t2)}window.BI||(window.BI={}),BI.servletURL="https://fanruan.coding.me/fineui/dist/",BI.resourceURL="https://fanruan.coding.me/fineui/dist/resource/",BI.i18n={"BI-Basic_OK":"确定","BI-Basic_Sure":"确定","BI-Basic_Clears":"清空","BI-Basic_Cancel":"取消","BI-Basic_Time":"时间","BI-Basic_Simple_Sunday":"日","BI-Basic_Simple_Monday":"一","BI-Basic_Simple_Tuesday":"二","BI-Basic_Simple_Wednesday":"三","BI-Basic_Simple_Thursday":"四","BI-Basic_Simple_Friday":"五","BI-Basic_Simple_Saturday":"六","BI-Multi_Date_Year":"年","BI-Multi_Date_Month":"月","BI-Multi_Date_Quarter":"季度","BI-Basic_Unrestricted":"无限制","BI-Quarter_1":"第1季度","BI-Quarter_2":"第2季度","BI-Quarter_3":"第3季度","BI-Quarter_4":"第4季度","BI-Basic_Value":"值","BI-Load_More":"加载更多","BI-Select_All":"全选","BI-Basic_Auto":"自动","BI-No_More_Data":"无更多数据","BI-No_Selected_Value":"没有可选项","BI-Basic_Clear":"清除","BI-Multi_Date_Relative_Current_Time":"相对当前时间","BI-Multi_Date_Year_Prev":"年前","BI-Multi_Date_Year_Next":"年后","BI-Multi_Date_Year_Begin":"年初","BI-Multi_Date_Year_End":"年末","BI-Multi_Date_Quarter_Prev":"个季度前","BI-Multi_Date_Quarter_Next":"个季度后","BI-Multi_Date_Quarter_Begin":"季度初","BI-Multi_Date_Quarter_End":"季度末","BI-Multi_Date_Month_Prev":"个月前","BI-Multi_Date_Month_Next":"个月后","BI-Multi_Date_Month_Begin":"月初","BI-Multi_Date_Month_End":"月末","BI-Multi_Date_Week_Prev":"周前","BI-Multi_Date_Week_Next":"周后","BI-Multi_Date_Day_Prev":"天前","BI-Multi_Date_Day_Next":"天后","BI-Multi_Date_Today":"今天"},function(a,b){function c(a){var b=a.length,c=ia.type(a);return!ia.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
t
",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""; })),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){ return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.toolbar.isSelected()},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate()}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:30,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var a=this.options;a.vertical,a.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev row-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[74,111,-9,28],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager),BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-active",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height-2,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:30})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){return this.options.isNeedFreeze===!0?this.options.freezeCols.length:0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(g-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(h-g-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a1)for(var c=0;c1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{ -baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse()); -var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j); -}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0); -}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{ -height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={ -type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){ -return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""), -this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:c.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+b.iconClass,ref:function(b){a.icon=b},disableSelected:!0},width:24},{el:this.text},{el:this.trigerButton,width:c.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setIcon:function(a){this.icon.setIcon(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a; +}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i), +f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments); +}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: +this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c; +return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b); +}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage(); +return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(), +a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE)); +}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d Date: Tue, 12 Sep 2017 14:36:05 +0800 Subject: [PATCH 03/14] =?UTF-8?q?singleSlider=E5=80=BC=E6=B2=A1=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/addons/slider/slider/singleslider/singleslider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/addons/slider/slider/singleslider/singleslider.js b/src/addons/slider/slider/singleslider/singleslider.js index ac70baa2c..d3e28472e 100644 --- a/src/addons/slider/slider/singleslider/singleslider.js +++ b/src/addons/slider/slider/singleslider/singleslider.js @@ -105,7 +105,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var percent = self._getPercentByValue(this.getValue()); + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); self.fireEvent(BI.SingleSlider.EVENT_CHANGE); From a0acef3ed43521b6f4047797e93b63cf23093083 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 12 Sep 2017 14:38:13 +0800 Subject: [PATCH 04/14] =?UTF-8?q?singleSlider=E5=80=BC=E6=B2=A1=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/slider.js | 4 +++- bi/widget.css | 2 +- dist/bundle.css | 2 +- dist/bundle.min.css | 2 +- dist/slider.js | 4 +++- dist/widget.css | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bi/slider.js b/bi/slider.js index 4d6770f4b..9bc2cf3c5 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -137,7 +137,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var percent = self._getPercentByValue(this.getValue()); + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); self.fireEvent(BI.SingleSlider.EVENT_CHANGE); diff --git a/bi/widget.css b/bi/widget.css index 08bf6b8b8..401e34c4d 100644 --- a/bi/widget.css +++ b/bi/widget.css @@ -433,7 +433,7 @@ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/dist/bundle.css b/dist/bundle.css index e110b84c2..93d69e840 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -3210,7 +3210,7 @@ li.CodeMirror-hint-active { /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 0bb3e9b10..7a397accf 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file diff --git a/dist/slider.js b/dist/slider.js index 4d6770f4b..9bc2cf3c5 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -137,7 +137,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var percent = self._getPercentByValue(this.getValue()); + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); self.fireEvent(BI.SingleSlider.EVENT_CHANGE); diff --git a/dist/widget.css b/dist/widget.css index 08bf6b8b8..401e34c4d 100644 --- a/dist/widget.css +++ b/dist/widget.css @@ -433,7 +433,7 @@ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); From bd7bdffc8980e0cdc7f6088b6ebb2e333dd2536e Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 12 Sep 2017 14:59:53 +0800 Subject: [PATCH 05/14] update --- bi/base.js | 70826 ++++++++-------- bi/case.js | 25192 +++--- bi/slider.js | 12 +- demo/js/widget/slider/demo.slider.js | 79 +- dist/demo.js | 295 +- dist/slider.js | 12 +- .../singleslider/button/iconbutton.slider.js | 8 +- .../slider/singleslider/singleslider.js | 2 +- .../singleslider/singleslider.normal.js | 2 +- 9 files changed, 48249 insertions(+), 48179 deletions(-) diff --git a/bi/base.js b/bi/base.js index dcf07f9dd..fefa9aac9 100644 --- a/bi/base.js +++ b/bi/base.js @@ -1,32567 +1,32567 @@ -/*! - * jQuery Mousewheel 3.1.13 - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - */ - -(function (factory) { - if ( typeof define === 'function' && define.amd ) { - // AMD. Register as an anonymous module. - define(['../core/jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS style for Browserify - module.exports = factory; - } else { - // Browser globals - factory(jQuery); - } -}(function ($) { - - var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], - toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? - ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], - slice = Array.prototype.slice, - nullLowestDeltaTimeout, lowestDelta; - - if ( $.event.fixHooks ) { - for ( var i = toFix.length; i; ) { - $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; - } - } - - var special = $.event.special.mousewheel = { - version: '3.1.12', - - setup: function() { - if ( this.addEventListener ) { - for ( var i = toBind.length; i; ) { - this.addEventListener( toBind[--i], handler, false ); - } - } else { - this.onmousewheel = handler; - } - }, - - teardown: function() { - if ( this.removeEventListener ) { - for ( var i = toBind.length; i; ) { - this.removeEventListener( toBind[--i], handler, false ); - } - } else { - this.onmousewheel = null; - } - }, - - settings: { - adjustOldDeltas: true, // see shouldAdjustOldDeltas() below - normalizeOffset: true // calls getBoundingClientRect for each event - } - }; - - $.fn.extend({ - mousewheel: function(fn) { - return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); - }, - - unmousewheel: function(fn) { - return this.unbind('mousewheel', fn); - } - }); - - - function handler(event) { - var orgEvent = event || window.event, - args = slice.call(arguments, 1), - delta = 0, - deltaX = 0, - deltaY = 0, - absDelta = 0, - offsetX = 0, - offsetY = 0; - event = $.event.fix(orgEvent); - event.type = 'mousewheel'; - - // Old school scrollwheel delta - if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } - if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } - if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } - if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } - - // Firefox < 17 horizontal scrolling related to DOMMouseScroll event - if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { - deltaX = deltaY * -1; - deltaY = 0; - } - - // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy - delta = deltaY === 0 ? deltaX : deltaY; - - // New school wheel delta (wheel event) - if ( 'deltaY' in orgEvent ) { - deltaY = orgEvent.deltaY * -1; - delta = deltaY; - } - if ( 'deltaX' in orgEvent ) { - deltaX = orgEvent.deltaX; - if ( deltaY === 0 ) { delta = deltaX * -1; } - } - - // No change actually happened, no reason to go any further - if ( deltaY === 0 && deltaX === 0 ) { return; } - - // Need to convert lines and pages to pixels if we aren't already in pixels - // There are three delta modes: - // * deltaMode 0 is by pixels, nothing to do - // * deltaMode 1 is by lines - // * deltaMode 2 is by pages - if ( orgEvent.deltaMode === 1 ) { - var lineHeight = 40; - delta *= lineHeight; - deltaY *= lineHeight; - deltaX *= lineHeight; - } else if ( orgEvent.deltaMode === 2 ) { - var pageHeight = 800; - delta *= pageHeight; - deltaY *= pageHeight; - deltaX *= pageHeight; - } - - // Store lowest absolute delta to normalize the delta values - absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); - - if ( !lowestDelta || absDelta < lowestDelta ) { - lowestDelta = absDelta; - - // Adjust older deltas if necessary - if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { - lowestDelta /= 40; - } - } - - // Adjust older deltas if necessary - if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { - // Divide all the things by 40! - delta /= 40; - deltaX /= 40; - deltaY /= 40; - } - - // Get a whole, normalized value for the deltas - delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); - deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); - deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); - - // Normalise offsetX and offsetY properties - if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { - var boundingRect = this.getBoundingClientRect(); - offsetX = event.clientX - boundingRect.left; - offsetY = event.clientY - boundingRect.top; - } - - // Add information to the event object - event.deltaX = deltaX; - event.deltaY = deltaY; - event.deltaFactor = lowestDelta; - event.offsetX = offsetX; - event.offsetY = offsetY; - // Go ahead and set deltaMode to 0 since we converted to pixels - // Although this is a little odd since we overwrite the deltaX/Y - // properties with normalized deltas. - event.deltaMode = 0; - - // Add event and delta to the front of the arguments - args.unshift(event, delta, deltaX, deltaY); - - // Clearout lowestDelta after sometime to better - // handle multiple device types that give different - // a different lowestDelta - // Ex: trackpad = 3 and mouse wheel = 120 - if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } - nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); - - return ($.event.dispatch || $.event.handle).apply(this, args); - } - - function nullLowestDelta() { - lowestDelta = null; - } - - function shouldAdjustOldDeltas(orgEvent, absDelta) { - // If this is an older event and the delta is divisable by 120, - // then we are assuming that the browser is treating this as an - // older mouse wheel event and that we should divide the deltas - // by 40 to try and get a more usable deltaFactor. - // Side note, this actually impacts the reported scroll distance - // in older browsers and can cause scrolling to be slower than native. - // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. - return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; - } - -}));/** - * 当没有元素时有提示信息的view - * - * Created by GUY on 2015/9/8. - * @class BI.Pane - * @extends BI.Widget - * @abstract - */ -BI.Pane = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pane", - tipText: BI.i18nText("BI-No_Selected_Item"), - overlap: true, - onLoaded: BI.emptyFn - }) - }, - - _init: function () { - BI.Pane.superclass._init.apply(this, arguments); - }, - - _assertTip: function () { - var o = this.options; - if (!this._tipText) { - this._tipText = BI.createWidget({ - type: "bi.label", - cls: "bi-tips", - text: o.tipText, - height: 25 - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this._tipText], - bgap: 25 - }); - } - }, - - loading: function () { - var self = this, o = this.options; - if (o.overlap === true) { - if (!BI.Layers.has(this.getName())) { - BI.createWidget({ - type: 'bi.vtape', - items: [{ - el: { - type: "bi.layout", - cls: "loading-background" - }, - height: 30 - }], - element: BI.Layers.make(this.getName(), this) - }); - } - BI.Layers.show(self.getName()); - } else if (BI.isNull(this._loading)) { - this._loading = BI.createWidget({ - type: "bi.layout", - cls: "loading-background", - height: 30 - }); - this._loading.element.css("zIndex", 1); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this._loading, - left: 0, - right: 0, - top: 0 - }] - }) - } - }, - - loaded: function () { - var self = this, o = this.options; - BI.Layers.remove(self.getName()); - this._loading && this._loading.destroy(); - this._loading && (this._loading = null); - o.onLoaded(); - self.fireEvent(BI.Pane.EVENT_LOADED); - }, - - check: function () { - this.setTipVisible(BI.isEmpty(this.options.items)); - }, - - setTipVisible: function (b) { - if (b === true) { - this._assertTip(); - this._tipText.setVisible(true); - } else { - this._tipText && this._tipText.setVisible(false); - } - }, - - populate: function (items) { - this.options.items = items || []; - this.check(); - }, - - empty: function () { - - } -}); -BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** - * guy - * 这仅仅只是一个超类, 所有简单控件的基类 - * 1、类的控制, - * 2、title的控制 - * 3、文字超过边界显示3个点 - * 4、cursor默认pointor - * @class BI.Single - * @extends BI.Widget - * @abstract - */ -BI.Single = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-single", - readonly: false, - title: null, - warningTitle: null, - tipType: null, // success或warning - value: null - }) - }, - - _showToolTip: function (e, opt) { - opt || (opt = {}); - var self = this; - var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); - var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); - if (BI.isKey(title)) { - BI.Tooltips.show(e, this.getName(), title, type, this, opt); - } - }, - - _hideTooltip: function () { - var self = this; - var tooltip = BI.Tooltips.get(this.getName()); - if (BI.isNotNull(tooltip)) { - tooltip.element.fadeOut(200, function () { - BI.Tooltips.remove(self.getName()); - }); - } - }, - - _init: function () { - BI.Single.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isKey(o.title) || BI.isKey(o.warningTitle) - || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { - this.enableHover(); - } - }, - - enableHover: function (opt) { - opt || (opt = {}); - var self = this; - if (!this._hoverBinded) { - this.element.on("mouseenter.title" + this.getName(), function (e) { - self._e = e; - if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { - self.timeout = BI.delay(function () { - self._showToolTip(self._e || e, opt); - }, 200); - } else if (self.getTipType() === "success" || self.isEnabled()) { - self.timeout = BI.delay(function () { - self._showToolTip(self._e || e, opt); - }, 500); - } - }); - this.element.on("mousemove.title" + this.getName(), function (e) { - self._e = e; - if (!self.element.__isMouseInBounds__(e)) { - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - } - }); - this.element.on("mouseleave.title" + this.getName(), function () { - self._e = null; - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - }); - this._hoverBinded = true; - } - }, - - disabledHover: function () { - //取消hover事件 - if (BI.isNotNull(this.timeout)) { - clearTimeout(this.timeout); - } - this._hideTooltip(); - $(this.element).unbind("mouseenter.title" + this.getName()) - .unbind("mousemove.title" + this.getName()) - .unbind("mouseleave.title" + this.getName()); - this._hoverBinded = false; - }, - - populate: function (items) { - this.items = items || []; - }, - - //opt: {container: '', belowMouse: false} - setTitle: function (title, opt) { - this.options.title = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - setWarningTitle: function (title, opt) { - this.options.warningTitle = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - getTipType: function () { - return this.options.tipType; - }, - - isReadOnly: function () { - return !!this.options.readonly; - }, - - getTitle: function () { - var title = this.options.title; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - getWarningTitle: function () { - var title = this.options.warningTitle; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - setValue: function (val) { - if (!this.options.readonly) { - this.options.value = val; - } - }, - - getValue: function () { - return this.options.value; - } -});/** - * guy 表示一行数据,通过position来定位位置的数据 - * @class BI.Text - * @extends BI.Single - */ -BI.Text = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Text.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text", - textAlign: "left", - whiteSpace: "normal", - lineHeight: null, - handler: null,//如果传入handler,表示处理文字的点击事件,不是区域的 - hgap: 0, - vgap: 0, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - text: "", - py: "" - }) - }, - - _init: function () { - BI.Text.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.hgap + o.lgap > 0) { - this.element.css({ - "padding-left": o.hgap + o.lgap + "px" - }) - } - if (o.hgap + o.rgap > 0) { - this.element.css({ - "padding-right": o.hgap + o.rgap + "px" - }) - } - if (o.vgap + o.tgap > 0) { - this.element.css({ - "padding-top": o.vgap + o.tgap + "px" - }) - } - if (o.vgap + o.bgap > 0) { - this.element.css({ - "padding-bottom": o.vgap + o.bgap + "px" - }) - } - if (BI.isNumber(o.height)) { - this.element.css({"lineHeight": o.height + "px"}); - } - if (BI.isNumber(o.lineHeight)) { - this.element.css({"lineHeight": o.lineHeight + "px"}); - } - this.element.css({ - "textAlign": o.textAlign, - "whiteSpace": o.whiteSpace - }); - if (o.handler) { - this.text = BI.createWidget({ - type: "bi.layout", - tagName: 'span' - }); - this.text.element.click(function () { - o.handler(self.getValue()); - }); - BI.createWidget({ - type: "bi.default", - element: this, - items: [this.text] - }); - } else { - this.text = this; - } - if (BI.isKey(o.text)) { - this.setText(o.text); - } else if (BI.isKey(o.value)) { - this.setText(o.value); - } - if (BI.isKey(o.keyword)) { - this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); - } - }, - - doRedMark: function (keyword) { - var o = this.options; - this.text.element.__textKeywordMarked__(o.text || o.value, keyword, o.py); - }, - - unRedMark: function () { - var o = this.options; - this.text.element.__textKeywordMarked__(o.text || o.value, "", o.py); - }, - - doHighLight: function () { - this.text.element.addClass("bi-high-light"); - }, - - unHighLight: function () { - this.text.element.removeClass("bi-high-light"); - }, - - setValue: function (text) { - BI.Text.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.setText(text); - } - }, - - setStyle: function (css) { - this.text.element.css(css) - }, - - setText: function (text) { - BI.Text.superclass.setText.apply(this, arguments); - this.options.text = text; - this.text.element.text((text + "").replaceAll(" ", " ")); - } -}); - -BI.shortcut("bi.text", BI.Text);/** - * guy - * @class BI.BasicButton - * @extends BI.Single - * - * 一般的button父级 - */ -BI.BasicButton = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), - value: "", - text: "", - stopEvent: false, - stopPropagation: false, - selected: false, - once: false, //点击一次选中有效,再点无效 - forceSelected: false, //点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发 - forceNotSelected: false, //无论怎么点击都不会被选中 - disableSelected: false, //使能选中 - - shadow: false, - isShadowShowingOnSelected: false, //选中状态下是否显示阴影 - trigger: null, - handler: BI.emptyFn - }) - }, - _init: function () { - BI.BasicButton.superclass._init.apply(this, arguments); - var opts = this.options; - if (opts.selected === true) { - BI.nextTick(BI.bind(function () { - this.setSelected(opts.selected); - }, this)); - } - BI.nextTick(BI.bind(this.bindEvent, this)); - - if (opts.shadow) { - this._createShadow(); - } - }, - - _createShadow: function () { - var self = this, o = this.options; - - var assertMask = function () { - if (!self.$mask) { - self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, { - type: "bi.layout", - cls: "bi-button-mask" - }); - self.$mask.invisible(); - BI.createWidget({ - type: "bi.absolute", - element: self, - items: [{ - el: self.$mask, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - } - }; - - this.element.mouseup(function () { - if (!self._hover && !o.isShadowShowingOnSelected) { - assertMask(); - self.$mask.invisible(); - } - }); - this.element.on("mouseenter." + this.getName(), function (e) { - if (self.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) { - assertMask(); - self.$mask.visible(); - } - } - }); - this.element.on("mousemove." + this.getName(), function (e) { - if (!self.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && !self._hover) { - assertMask(); - self.$mask.invisible(); - } - } - }); - this.element.on("mouseleave." + this.getName(), function () { - if (self.isEnabled() && !self._hover) { - assertMask(); - self.$mask.invisible(); - } - }); - }, - - bindEvent: function () { - var self = this; - var o = this.options, hand = this.handle(); - if (!hand) { - return; - } - hand = hand.element; - var triggerArr = (o.trigger || "").split(","); - BI.each(triggerArr, function (idx, trigger) { - switch (trigger) { - case "mouseup": - var mouseDown = false; - hand.mousedown(function () { - mouseDown = true; - ev(e); - }); - hand.mouseup(function (e) { - if (mouseDown === true) { - clk(e); - } - mouseDown = false; - ev(e); - }); - break; - case "mousedown": - var mouseDown = false; - var selected = false; - hand.mousedown(function (e) { - // if (e.button === 0) { - $(document).bind("mouseup." + self.getName(), function (e) { - // if (e.button === 0) { - if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { - // self.setSelected(!self.isSelected()); - self._trigger(); - } - mouseDown = false; - $(document).unbind("mouseup." + self.getName()); - // } - }); - if (mouseDown === true) { - return; - } - if (self.isSelected()) { - selected = true; - } else { - clk(e); - } - mouseDown = true; - ev(e); - // } - }); - hand.mouseup(function (e) { - // if (e.button === 0) { - if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { - clk(e); - } - mouseDown = false; - selected = false; - $(document).unbind("mouseup." + self.getName()); - // } - }); - break; - case "dblclick": - hand.dblclick(clk); - break; - case "lclick": - var mouseDown = false; - var interval; - hand.mousedown(function (e) { - $(document).bind("mouseup." + self.getName(), function (e) { - interval && clearInterval(interval); - interval = null; - mouseDown = false; - $(document).unbind("mouseup." + self.getName()); - }); - if (mouseDown === true) { - return; - } - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { - return; - } - interval = setInterval(function () { - self.doClick(); - }, 100); - mouseDown = true; - ev(e); - }); - break; - default: - if (o.stopEvent || o.stopPropagation) { - hand.mousedown(function (e) { - ev(e); - }); - hand.mouseup(function (e) { - ev(e); - }); - } - hand.click(clk); - break; - } - }); - - //之后的300ms点击无效 - var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true); - - function ev(e) { - if (o.stopEvent) { - e.stopEvent(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - } - - function clk(e) { - ev(e); - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { - return; - } - onClick.apply(self, arguments); - } - }, - - _trigger: function () { - var o = this.options; - if(!this.isEnabled()){ - return; - } - if (!this.isDisableSelected()) { - this.isForceSelected() ? this.setSelected(true) : - (this.isForceNotSelected() ? this.setSelected(false) : - this.setSelected(!this.isSelected())); - } - if (this.isValid()) { - o.handler.call(this, this.getValue(), this); - var v = this.getValue(); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this); - this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this); - } - }, - - _doClick: function (e) { - if (this.isValid()) { - this.beforeClick(e); - } - this._trigger(); - if (this.isValid()) { - this.doClick(e); - } - }, - - beforeClick: function () { - - }, - - doClick: function () { - - }, - - handle: function () { - return this; - }, - - hover: function () { - this._hover = true; - this.handle().element.addClass("hover"); - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(true); - } - }, - - dishover: function () { - this._hover = false; - this.handle().element.removeClass("hover"); - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(false); - } - }, - - setSelected: function (b) { - var o = this.options; - o.selected = b; - if (b) { - this.handle().element.addClass("active"); - } else { - this.handle().element.removeClass("active"); - } - if (o.shadow && !o.isShadowShowingOnSelected) { - this.$mask && this.$mask.setVisible(false); - } - }, - - isSelected: function () { - return this.options.selected; - }, - - isOnce: function () { - return this.options.once; - }, - - isForceSelected: function () { - return this.options.forceSelected; - }, - - isForceNotSelected: function () { - return this.options.forceNotSelected; - }, - - isDisableSelected: function () { - return this.options.disableSelected; - }, - - setText: function (text) { - this.options.text = text; - }, - - getText: function () { - return this.options.text; - }, - - _setEnable: function (enable) { - BI.BasicButton.superclass._setEnable.apply(this, arguments); - if (enable === true) { - this.element.removeClass("base-disabled disabled"); - } else if (enable === false) { - this.element.addClass("base-disabled disabled"); - } - if (!enable) { - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(false); - } - } - }, - - empty: function () { - $(document).unbind("mouseup." + this.getName()); - BI.BasicButton.superclass.empty.apply(this, arguments); - }, - - destroy: function () { - BI.BasicButton.superclass.destroy.apply(this, arguments); - } -}); -BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** - * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 - * - * Created by GUY on 2015/9/9. - * @class BI.NodeButton - * @extends BI.BasicButton - * @abstract - */ -BI.NodeButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function() { - var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls: (conf.baseCls || "") + " bi-node", - open: false - }) - }, - - _init:function() { - BI.NodeButton.superclass._init.apply(this, arguments); - var self = this; - BI.nextTick(function(){ - self.setOpened(self.isOpened()); - }) - }, - - doClick: function(){ - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.setOpened(!this.isOpened()); - }, - - isOnce: function(){ - return false; - }, - - isOpened: function(){ - return !!this.options.open; - }, - - setOpened: function(b){ - this.options.open = !!b; - }, - - triggerCollapse: function(){ - if(this.isOpened()) { - this.setOpened(false); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); - } - }, - - triggerExpand: function(){ - if(!this.isOpened()) { - this.setOpened(true); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); - } - } -});/** - * guy - * tip提示 - * zIndex在10亿级别 - * @class BI.Tip - * @extends BI.Single - * @abstract - */ -BI.Tip = BI.inherit(BI.Single, { - _defaultConfig: function() { - var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-tip", - zIndex: BI.zIndex_tip - }) - }, - - _init : function() { - BI.Tip.superclass._init.apply(this, arguments); - this.element.css({"zIndex": this.options.zIndex}); - } -});/** - * Created by GUY on 2015/6/26. - * @class BI.ButtonGroup - * @extends BI.Widget - */ - -BI.ButtonGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-button-group", - behaviors: {}, - items: [], - chooseType: BI.Selection.Single, - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }) - }, - - _init: function () { - BI.ButtonGroup.superclass._init.apply(this, arguments); - var behaviors = {}; - BI.each(this.options.behaviors, function (key, rule) { - behaviors[key] = BI.BehaviorFactory.createBehavior(key, { - rule: rule - }) - }); - this.behaviors = behaviors; - this.populate(this.options.items); - }, - - _createBtns: function (items) { - var o = this.options; - return BI.createWidgets(BI.createItems(items, { - type: "bi.text_button" - })); - }, - - _btnsCreator: function (items) { - var self = this, args = Array.prototype.slice.call(arguments), o = this.options; - var buttons = this._createBtns(items); - args[0] = buttons; - - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }); - BI.each(buttons, function (i, btn) { - btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - self.setValue(btn.getValue()); - break; - case BI.ButtonGroup.CHOOSE_TYPE_NONE: - self.setValue([]); - break; - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - } - }); - btn.on(BI.Events.DESTROY, function () { - BI.remove(self.buttons, btn); - }) - }); - - return buttons; - }, - - _packageBtns: function (btns) { - var o = this.options; - for (var i = o.layouts.length - 1; i > 0; i--) { - btns = BI.map(btns, function (k, it) { - return BI.extend({}, o.layouts[i], { - items: [ - BI.extend({}, o.layouts[i].el, { - el: it - }) - ] - }) - }) - } - return btns; - }, - - _packageSimpleItems: function (btns) { - var o = this.options; - return BI.map(o.items, function (i, item) { - if (BI.stripEL(item) === item) { - return btns[i]; - } - return BI.extend({}, item, { - el: btns[i] - }) - }) - }, - - _packageItems: function (items, packBtns) { - return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); - }, - - _packageLayout: function (items) { - var o = this.options, layout = BI.deepClone(o.layouts[0]); - - var lay = BI.formatEL(layout).el; - while (lay && lay.items && !BI.isEmpty(lay.items)) { - lay = BI.formatEL(lay.items[0]).el; - } - lay.items = items; - return layout; - }, - - //如果是一个简单的layout - _isSimpleLayout: function () { - var o = this.options; - return o.layouts.length === 1 && !BI.isArray(o.items[0]) - }, - - doBehavior: function () { - var args = Array.prototype.slice.call(arguments); - args.unshift(this.buttons); - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }) - }, - - prependItems: function (items) { - var o = this.options; - var btns = this._btnsCreator.apply(this, arguments); - this.buttons = BI.concat(btns, this.buttons); - - if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) { - this.layouts.prependItems(btns); - return; - } - - items = this._packageItems(items, this._packageBtns(btns)); - this.layouts.prependItems(this._packageLayout(items).items); - }, - - addItems: function (items) { - var o = this.options; - var btns = this._btnsCreator.apply(this, arguments); - this.buttons = BI.concat(this.buttons, btns); - - //如果是一个简单的layout - if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) { - this.layouts.addItems(btns); - return; - } - - items = this._packageItems(items, this._packageBtns(btns)); - this.layouts.addItems(this._packageLayout(items).items); - }, - - removeItemAt: function (indexes) { - BI.removeAt(this.buttons, indexes); - this.layouts.removeItemAt(indexes); - }, - - removeItems: function (values) { - values = BI.isArray(values) ? values : [values]; - var deleted = []; - BI.each(this.buttons, function (i, button) { - if (BI.deepContains(values, button.getValue())) { - deleted.push(i); - } - }); - BI.removeAt(this.buttons, deleted); - this.layouts.removeItemAt(deleted); - }, - - populate: function (items) { - items = items || []; - this.empty(); - this.options.items = items; - - this.buttons = this._btnsCreator.apply(this, arguments); - if (this._isSimpleLayout()) { - items = this._packageSimpleItems(this.buttons); - } else { - items = this._packageItems(items, this._packageBtns(this.buttons)); - } - - this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); - }, - - setNotSelectedValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setSelected && item.setSelected(false); - } else { - item.setSelected && item.setSelected(true); - } - }); - }, - - setEnabledValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setEnable(true); - } else { - item.setEnable(false); - } - }); - }, - - setValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setSelected && item.setSelected(true); - } else { - item.setSelected && item.setSelected(false); - } - }); - }, - - getNotSelectedValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !(item.isSelected && item.isSelected())) { - v.push(item.getValue()); - } - }); - return v; - }, - - getValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && item.isSelected && item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getAllButtons: function () { - return this.buttons; - }, - - getAllLeaves: function () { - return this.buttons; - }, - - getSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isSelected && item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getNotSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isSelected && !item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getIndexByValue: function (value) { - var index = -1; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.getValue() === value) { - index = i; - return true; - } - }); - return index; - }, - - getNodeById: function (id) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.options.id === id) { - node = item; - return true; - } - }); - return node; - }, - - getNodeByValue: function (value) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.getValue() === value) { - node = item; - return true; - } - }); - return node; - }, - - empty: function () { - BI.ButtonGroup.superclass.empty.apply(this, arguments); - this.options.items = []; - }, - - destroy: function () { - BI.ButtonGroup.superclass.destroy.apply(this, arguments); - this.options.items = []; - } -}); -BI.extend(BI.ButtonGroup, { - CHOOSE_TYPE_SINGLE: BI.Selection.Single, - CHOOSE_TYPE_MULTI: BI.Selection.Multi, - CHOOSE_TYPE_ALL: BI.Selection.All, - CHOOSE_TYPE_NONE: BI.Selection.None, - CHOOSE_TYPE_DEFAULT: BI.Selection.Default -}); -BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.button_group", BI.ButtonGroup);/** - * Created by GUY on 2015/8/10. - * @class BI.ButtonTree - * @extends BI.ButtonGroup - */ - -BI.ButtonTree = BI.inherit(BI.ButtonGroup, { - _defaultConfig: function () { - return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-button-tree" - }) - }, - - _init: function () { - BI.ButtonTree.superclass._init.apply(this, arguments); - }, - - setNotSelectedValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (!BI.isFunction(item.setSelected)) { - item.setNotSelectedValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setSelected(false); - } else { - item.setSelected(true); - } - }); - }, - - setEnabledValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.isFunction(item.setEnabledValue)) { - item.setEnabledValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setEnable(true); - } else { - item.setEnable(false); - } - }); - }, - - setValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (!BI.isFunction(item.setSelected)) { - item.setValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setSelected(true); - } else { - item.setSelected(false); - } - }); - }, - - getNotSelectedValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - v = BI.concat(v, item.getNotSelectedValue()); - return; - } - if (item.isEnabled() && item.isSelected && !item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - v = BI.concat(v, item.getValue()); - return; - } - if (item.isEnabled() && item.isSelected && item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - btns = btns.concat(item.getSelectedButtons()); - return; - } - if (item.isSelected && item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getNotSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - btns = btns.concat(item.getNotSelectedButtons()); - return; - } - if (item.isSelected && !item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - //获取所有的叶子节点 - getAllLeaves: function () { - var leaves = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - leaves = leaves.concat(item.getAllLeaves()); - return; - } - if (item.isEnabled()) { - leaves.push(item); - } - }); - return leaves; - }, - - getIndexByValue: function (value) { - var index = -1; - BI.any(this.buttons, function (i, item) { - var vs = item.getValue(); - if (item.isEnabled() && (vs === value || BI.contains(vs, value))) { - index = i; - return true; - } - }); - return index; - }, - - getNodeById: function (id) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled()) { - if (item.attr("id") === id) { - node = item; - return true; - } else if (BI.isFunction(item.getNodeById)) { - if (node = item.getNodeById(id)) { - return true; - } - } - } - }); - return node; - }, - - getNodeByValue: function (value) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled()) { - if (BI.isFunction(item.getNodeByValue)) { - if (node = item.getNodeByValue(value)) { - return true; - } - } else if (item.attr("value") === value) { - node = item; - return true; - } - } - }); - return node; - } -}); -BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.button_tree", BI.ButtonTree);/** - * guy - * 异步树 - * @class BI.TreeView - * @extends BI.Pane - */ -BI.TreeView = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-tree", - paras: {}, - itemsCreator: BI.emptyFn - }) - }, - _init: function () { - BI.TreeView.superclass._init.apply(this, arguments); - this._stop = false; - - this._createTree(); - this.tip = BI.createWidget({ - type: "bi.loading_bar", - invisible: true, - handler: BI.bind(this._loadMore, this) - }); - BI.createWidget({ - type: "bi.vertical", - scrollable: true, - scrolly: false, - element: this, - items: [this.tip] - }); - - }, - - _createTree: function () { - this.id = "bi-tree" + BI.UUID(); - if (this.nodes) { - this.nodes.destroy(); - } - if (this.tree) { - this.tree.destroy(); - } - this.tree = BI.createWidget({ - type: "bi.layout", - element: "
    " - }); - BI.createWidget({ - type: "bi.default", - element: this.element, - items: [this.tree] - }); - }, - - //选择节点触发方法 - _selectTreeNode: function (treeId, treeNode) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this); - this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this); - }, - - //配置属性 - _configSetting: function () { - var paras = this.options.paras; - var self = this; - var setting = { - async: { - enable: true, - url: getUrl, - autoParam: ["id", "name"], - otherParam: BI.cjkEncodeDO(paras) - }, - check: { - enable: true - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true, - dblClickExpand: false - }, - callback: { - beforeExpand: beforeExpand, - onAsyncSuccess: onAsyncSuccess, - onAsyncError: onAsyncError, - beforeCheck: beforeCheck, - onCheck: onCheck, - onExpand: onExpand, - onCollapse: onCollapse, - onClick: onClick - } - }; - var className = "dark", perTime = 100; - - function onClick(event, treeId, treeNode) { - self.nodes.checkNode(treeNode, !treeNode.checked, true, true); - } - - function getUrl(treeId, treeNode) { - var parentNode = self._getParentValues(treeNode); - treeNode.times = treeNode.times || 1; - var param = "id=" + treeNode.id - + "×=" + (treeNode.times++) - + "&parentValues= " + window.encodeURIComponent(BI.jsonEncode(parentNode)) - + "&checkState=" + window.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); - - return BI.servletURL + '?op=' + self.options.op + '&cmd=' + self.options.cmd + "&" + param; - } - - function beforeExpand(treeId, treeNode) { - if (!treeNode.isAjaxing) { - if (!treeNode.children) { - treeNode.times = 1; - ajaxGetNodes(treeNode, "refresh"); - } - return true; - } else { - BI.Msg.toast("Please Wait。", "warning"); - return false; - } - } - - function onAsyncSuccess(event, treeId, treeNode, msg) { - treeNode.halfCheck = false; - if (!msg || msg.length === 0 || /^[\s,\S]*<\/html>$/gi.test(msg) || self._stop) { - return; - } - var zTree = self.nodes; - var totalCount = treeNode.count || 0; - - //尝试去获取下一组节点,若获取值为空数组,表示获取完成 - // TODO by GUY - if (treeNode.children.length > totalCount) { - treeNode.count = treeNode.children.length; - BI.delay(function () { - ajaxGetNodes(treeNode); - }, perTime); - } else { - //treeNode.icon = ""; - zTree.updateNode(treeNode); - zTree.selectNode(treeNode.children[0]); - //className = (className === "dark" ? "":"dark"); - } - } - - function onAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) { - var zTree = self.nodes; - BI.Msg.toast("Error!", "warning"); - //treeNode.icon = ""; - //zTree.updateNode(treeNode); - } - - function ajaxGetNodes(treeNode, reloadType) { - var zTree = self.nodes; - if (reloadType == "refresh") { - //treeNode.icon = BI.servletURL +"?op=resource&resource=/com/fr/bi/web/css/base/third/ztree/img/loading.gif"; - zTree.updateNode(treeNode); - } - zTree.reAsyncChildNodes(treeNode, reloadType, true); - } - - function beforeCheck(treeId, treeNode) { - treeNode.halfCheck = false; - if (treeNode.checked === true) { - //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy - //所有的半选状态都需要取消halfCheck=true的情况 - function track(children) { - BI.each(children, function (i, ch) { - if (ch.halfCheck === true) { - ch.halfCheck = false; - track(ch.children); - } - }) - } - - track(treeNode.children); - var treeObj = self.nodes; - var nodes = treeObj.getSelectedNodes(); - $.each(nodes, function (index, node) { - node.halfCheck = false; - }) - } - } - - function onCheck(event, treeId, treeNode) { - self._selectTreeNode(treeId, treeNode); - } - - function onExpand(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - function onCollapse(event, treeId, treeNode) { - } - - return setting; - }, - - _getParentValues: function (treeNode) { - if (!treeNode.getParentNode()) { - return []; - } - var parentNode = treeNode.getParentNode(); - var result = this._getParentValues(parentNode); - result = result.concat([this._getNodeValue(parentNode)]); - return result; - }, - - _getNodeValue: function (node) { - //去除标红 - return node.value == null ? node.text.replace(/<[^>]+>/g, "").replaceAll(" ", " ") : node.value; - }, - - //获取半选框值 - _getHalfSelectedValues: function (map, node) { - var self = this; - var checkState = node.getCheckStatus(); - //将未选的去掉 - if (checkState.checked === false && checkState.half === false) { - return; - } - //如果节点已展开,并且是半选 - if (BI.isNotEmptyArray(node.children) && checkState.half === true) { - var children = node.children; - BI.each(children, function (i, ch) { - self._getHalfSelectedValues(map, ch); - }); - return; - } - var parent = node.parentValues || self._getParentValues(node); - var path = parent.concat(this._getNodeValue(node)); - if (BI.isNotEmptyArray(node.children) || checkState.half === false) { - this._buildTree(map, path); - return; - } - var storeValues = BI.deepClone(this.options.paras.selectedValues); - var treeNode = this._getTree(storeValues, path); - this._addTreeNode(map, parent, this._getNodeValue(node), treeNode); - }, - - _getTree: function (map, values) { - var cur = map; - BI.any(values, function (i, value) { - if (cur[value] == null) { - return true; - } - cur = cur[value]; - }); - return cur; - }, - - _addTreeNode: function (map, values, key, value) { - var cur = map; - BI.each(values, function (i, value) { - if (cur[value] == null) { - cur[value] = {}; - } - cur = cur[value]; - }); - cur[key] = value; - }, - - //构造树节点 - _buildTree: function (map, values) { - var cur = map; - BI.each(values, function (i, value) { - if (cur[value] == null) { - cur[value] = {}; - } - cur = cur[value]; - }) - }, - - //获取选中的值 - _getSelectedValues: function () { - var self = this; - var hashMap = {}; - var rootNoots = this.nodes.getNodes(); - track(rootNoots); - function track(nodes) { - BI.each(nodes, function (i, node) { - var checkState = node.getCheckStatus(); - if (checkState.checked === true || checkState.half === true) { - if (checkState.half === true) { - self._getHalfSelectedValues(hashMap, node); - } else { - var parentValues = node.parentValues || self._getParentValues(node); - var values = parentValues.concat([self._getNodeValue(node)]); - self._buildTree(hashMap, values); - } - } - }) - } - - return hashMap; - }, - - //处理节点 - _dealWidthNodes: function (nodes) { - var self = this, o = this.options; - var ns = BI.Tree.arrayFormat(nodes); - BI.each(ns, function (i, n) { - n.title = n.title || n.text || n.value; - //处理标红 - if (BI.isKey(o.paras.keyword)) { - n.text = $("
    ").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html(); - } else { - n.text = (n.text + "").replaceAll(" ", " "); - } - }); - return nodes; - }, - - _loadMore: function () { - var self = this, o = this.options; - this.tip.setLoading(); - var op = BI.extend({}, o.paras, { - times: ++this.times - }); - o.itemsCreator(op, function (res) { - if (self._stop === true) { - return; - } - var hasNext = !!res.hasNext, nodes = res.items || []; - - if (!hasNext) { - self.tip.setEnd(); - } else { - self.tip.setLoaded(); - } - if (nodes.length > 0) { - self.nodes.addNodes(null, self._dealWidthNodes(nodes)); - } - }); - }, - - //生成树内部方法 - _initTree: function (setting) { - var self = this, o = this.options; - self.fireEvent(BI.Events.INIT); - this.times = 1; - var tree = this.tree; - tree.empty(); - this.loading(); - this.tip.setVisible(false); - var callback = function (nodes) { - if (self._stop === true) { - return; - } - self.nodes = $.fn.zTree.init(tree.element, setting, nodes); - }; - var op = BI.extend({}, o.paras, { - times: 1 - }); - - o.itemsCreator(op, function (res) { - if (self._stop === true) { - return; - } - var hasNext = !!res.hasNext, nodes = res.items || []; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes)); - } - self.setTipVisible(nodes.length <= 0); - self.loaded(); - if (!hasNext) { - self.tip.invisible(); - } else { - self.tip.setLoaded(); - } - op.times === 1 && self.fireEvent(BI.Events.AFTERINIT); - }); - }, - - //构造树结构, - initTree: function (nodes, setting) { - var setting = setting || { - async: { - enable: false - }, - check: { - enable: false - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true - }, - callback: {} - }; - this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); - }, - - start: function () { - this._stop = false; - }, - - stop: function () { - this._stop = true; - }, - - //生成树方法 - stroke: function (config) { - delete this.options.keyword; - BI.extend(this.options.paras, config); - var setting = this._configSetting(); - this._createTree(); - this.start(); - this._initTree(setting); - }, - - populate: function () { - this.stroke.apply(this, arguments); - }, - - hasChecked: function () { - var treeObj = this.nodes; - return treeObj.getCheckedNodes(true).length > 0; - }, - - checkAll: function (checked) { - function setNode(children) { - BI.each(children, function (i, child) { - child.halfCheck = false; - setNode(child.children); - }); - } - - BI.each(this.nodes.getNodes(), function (i, node) { - node.halfCheck = false; - setNode(node.children); - }); - this.nodes && this.nodes.checkAllNodes(checked); - }, - - expandAll: function (flag) { - this.nodes && this.nodes.expandAll(flag); - }, - - //设置树节点的状态 - setValue: function (value, param) { - this.checkAll(false); - this.updateValue(value, param); - this.refresh(); - }, - - setSelectedValue: function (value) { - this.options.paras.selectedValues = BI.deepClone(value || {}); - }, - - updateValue: function (values, param) { - if (!this.nodes) { - return; - } - param || (param = "value"); - var treeObj = this.nodes; - BI.each(values, function (v, op) { - var nodes = treeObj.getNodesByParam(param, v, null); - BI.each(nodes, function (j, node) { - BI.extend(node, {checked: true}, op); - treeObj.updateNode(node); - }) - }); - }, - - refresh: function () { - this.nodes && this.nodes.refresh(); - }, - - getValue: function () { - if (!this.nodes) { - return null; - } - return this._getSelectedValues(); - }, - - destroyed: function () { - this.stop(); - this.nodes && this.nodes.destroy(); - } -}); -BI.extend(BI.TreeView, { - REQ_TYPE_INIT_DATA: 1, - REQ_TYPE_ADJUST_DATA: 2, - REQ_TYPE_SELECT_DATA: 3, - REQ_TYPE_GET_SELECTED_DATA: 4 -}); - -BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TreeView.EVENT_INIT = BI.Events.INIT; -BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT; - -BI.shortcut("bi.tree_view", BI.TreeView);/** - * guy - * 同步树 - * @class BI.AsyncTree - * @extends BI.TreeView - */ -BI.AsyncTree = BI.inherit(BI.TreeView, { - _defaultConfig: function () { - return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {}) - }, - _init: function () { - BI.AsyncTree.superclass._init.apply(this, arguments); - }, - - //配置属性 - _configSetting: function () { - var paras = this.options.paras; - var self = this; - var setting = { - async: { - enable: false, - otherParam: BI.cjkEncodeDO(paras) - }, - check: { - enable: true - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true, - dblClickExpand: false - }, - callback: { - beforeCheck: beforeCheck, - onCheck: onCheck, - beforeExpand: beforeExpand, - onExpand: onExpand, - onCollapse: onCollapse, - onClick: onClick - } - }; - - function onClick(event, treeId, treeNode) { - var zTree = $.fn.zTree.getZTreeObj(treeId); - zTree.checkNode(treeNode, !treeNode.checked, true, true); - } - - function beforeCheck(treeId, treeNode) { - treeNode.halfCheck = false; - if (treeNode.checked === true) { - //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy - //所有的半选状态都需要取消halfCheck=true的情况 - function track(children) { - BI.each(children, function (i, ch) { - if (ch.halfCheck === true) { - ch.halfCheck = false; - track(ch.children); - } - }) - } - - track(treeNode.children); - - var treeObj = $.fn.zTree.getZTreeObj(treeId); - var nodes = treeObj.getSelectedNodes(); - BI.each(nodes, function (index, node) { - node.halfCheck = false; - }) - } - } - - function beforeExpand(treeId, treeNode) { - self._beforeExpandNode(treeId, treeNode); - } - - function onCheck(event, treeId, treeNode) { - self._selectTreeNode(treeId, treeNode); - } - - function onExpand(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - function onCollapse(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - return setting; - }, - - _selectTreeNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); - var name = this._getNodeValue(treeNode); -// var values = parentValues.concat([name]); - if (treeNode.checked === true) { - } else { - var tNode = treeNode; - var pNode = this._getTree(this.options.paras.selectedValues, parentValues); - if (BI.isNotNull(pNode[name])) { - delete pNode[name]; - } - while (tNode != null && BI.isEmpty(pNode)) { - parentValues = parentValues.slice(0, parentValues.length - 1); - tNode = tNode.getParentNode(); - if (tNode != null) { - pNode = this._getTree(this.options.paras.selectedValues, parentValues); - name = this._getNodeValue(tNode); - delete pNode[name]; - } - } - } - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - }, - - //展开节点 - _beforeExpandNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = treeNode.parentValues || self._getParentValues(treeNode); - var op = BI.extend({}, o.paras, { - id: treeNode.id, - times: 1, - parentValues: parentValues.concat(this._getNodeValue(treeNode)), - checkState: treeNode.getCheckStatus() - }); - var complete = function (d) { - var nodes = d.items || []; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes), !!d.hasNext); - } - }; - var times = 1; - - function callback(nodes, hasNext) { - self.nodes.addNodes(treeNode, nodes); - - if (hasNext === true) { - BI.delay(function () { - times++; - op.times = times; - o.itemsCreator(op, complete); - }, 100); - } - } - - if (!treeNode.children) { - o.itemsCreator(op, complete) - } - }, - - _join: function (valueA, valueB) { - var self = this; - var map = {}; - track([], valueA, valueB); - track([], valueB, valueA); - function track(parent, node, compare) { - BI.each(node, function (n, item) { - if (BI.isNull(compare[n])) { - self._addTreeNode(map, parent, n, item); - } else if (BI.isEmpty(compare[n])) { - self._addTreeNode(map, parent, n, {}); - } else { - track(parent.concat([n]), node[n], compare[n]); - } - }) - } - - return map; - }, - - hasChecked: function () { - return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments); - }, - - getValue: function () { - if (!this.nodes) { - return {}; - } - var checkedValues = this._getSelectedValues(); - if (BI.isEmpty(checkedValues)) { - return BI.deepClone(this.options.paras.selectedValues); - } - if (BI.isEmpty(this.options.paras.selectedValues)) { - return checkedValues; - } - return this._join(checkedValues, this.options.paras.selectedValues); - }, - - //生成树方法 - stroke: function (config) { - delete this.options.keyword; - BI.extend(this.options.paras, config); - var setting = this._configSetting(); - this._initTree(setting); - } -}); - -BI.shortcut("bi.async_tree", BI.AsyncTree);/** - * guy - * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点 - * @class BI.PartTree - * @extends BI.AsyncTree - */ -BI.PartTree = BI.inherit(BI.AsyncTree, { - _defaultConfig: function () { - return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {}) - }, - - _init: function () { - BI.PartTree.superclass._init.apply(this, arguments); - }, - - _loadMore: function () { - var self = this, o = this.options; - var op = BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_INIT_DATA, - times: ++this.times - }); - this.tip.setLoading(); - o.itemsCreator(op, function (d) { - var hasNext = !!d.hasNext, nodes = d.items || []; - o.paras.lastSearchValue = d.lastSearchValue; - if (self._stop === true) { - return; - } - if (!hasNext) { - self.tip.setEnd(); - } else { - self.tip.setLoaded(); - } - if (nodes.length > 0) { - self.nodes.addNodes(null, self._dealWidthNodes(nodes)); - } - }); - }, - - _selectTreeNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); - var name = this._getNodeValue(treeNode); - if (treeNode.checked === true) { - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - } else { - //如果选中的值中不存在该值不处理 - var t = this.options.paras.selectedValues; - var p = parentValues.concat(name); - for (var i = 0, len = p.length; i < len; i++) { - t = t[p[i]]; - if (t == null) { - return; - } - if (BI.isEmpty(t)) { - break; - } - } - o.itemsCreator(BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_SELECT_DATA, - notSelectedValue: name, - parentValues: parentValues - }), function (new_values) { - self.options.paras.selectedValues = new_values; - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - }); - } - }, - - _getSelectedValues: function () { - var self = this; - var hashMap = {}; - var rootNoots = this.nodes.getNodes(); - track(rootNoots); - function track(nodes) { - BI.each(nodes, function (i, node) { - var checkState = node.getCheckStatus(); - if (checkState.checked === false) { - return true; - } - var parentValues = node.parentValues || self._getParentValues(node); - //把文字中的html去掉,其实就是把文字颜色去掉 - var values = parentValues.concat([self._getNodeValue(node)]); - self._buildTree(hashMap, values); -// if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){ -// continue; -// } - if (BI.isNotEmptyArray(node.children)) { - track(node.children); - return true; - } - if (checkState.half === true) { - self._getHalfSelectedValues(hashMap, node); - } - }) - } - - return hashMap; - }, - - _initTree: function (setting, keyword) { - var self = this, o = this.options; - this.times = 1; - var tree = this.tree; - tree.empty(); - self.tip.setVisible(false); - this.loading(); - var op = BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_INIT_DATA, - times: this.times - }); - var complete = function (d) { - if (self._stop === true || keyword != o.paras.keyword) { - return; - } - var hasNext = !!d.hasNext, nodes = d.items || []; - o.paras.lastSearchValue = d.lastSearchValue; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes)); - } - self.setTipVisible(nodes.length <= 0); - self.loaded(); - if (!hasNext) { - self.tip.invisible(); - } else { - self.tip.setLoaded(); - } - self.fireEvent(BI.Events.AFTERINIT); - }; - - function callback(nodes) { - if (self._stop === true) { - return; - } - self.nodes = $.fn.zTree.init(tree.element, setting, nodes); - } - - BI.delay(function () { - o.itemsCreator(op, complete); - }, 100); - }, - - getValue: function () { - var o = this.options; - var result = BI.PartTree.superclass.getValue.apply(this, arguments); - o.itemsCreator({ - type: BI.TreeView.REQ_TYPE_ADJUST_DATA, - selectedValues: result - }, function (res) { - result = res; - }); - return result; - }, - - //生成树方法 - stroke: function (config) { - var o = this.options; - delete o.paras.keyword; - BI.extend(o.paras, config); - delete o.paras.lastSearchValue; - var setting = this._configSetting(); - this._initTree(setting, o.paras.keyword); - } -}); - -BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController(); -BI.Layers = new BI.LayerController(); -BI.Maskers = new BI.MaskersController(); -BI.Bubbles = new BI.BubblesController(); -BI.Tooltips = new BI.TooltipsController(); -BI.Popovers = new BI.FloatBoxController(); -BI.Broadcasts = new BI.BroadcastController(); -BI.StyleLoaders = new BI.StyleLoaderManager();/** - * canvas绘图 - * - * Created by GUY on 2015/11/18. - * @class BI.Canvas - * @extends BI.Widget - */ -BI.Canvas = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-canvas" - }) - }, - - _init: function () { - BI.Canvas.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var canvas = document.createElement("canvas"); - if (!document.createElement('canvas').getContext) { - canvas = window.G_vmlCanvasManager.initElement(canvas); - } - this.element.append(canvas); - canvas.width = o.width; - canvas.height = o.height; - $(canvas).width("100%"); - $(canvas).height("100%"); - this.canvas = canvas; - this._queue = []; - }, - - _getContext: function () { - if (!this.ctx) { - this.ctx = this.canvas.getContext('2d'); - } - return this.ctx; - }, - - _attr: function (key, value) { - var self = this; - if (BI.isNull(key)) { - return; - } - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self._queue.push({k: k, v: v}); - }); - return; - } - this._queue.push({k: key, v: value}); - }, - - _line: function (x0, y0) { - var self = this; - var args = [].slice.call(arguments, 2); - if (BI.isOdd(args.length)) { - this._attr(BI.last(args)); - args = BI.initial(args); - } - this._attr("moveTo", [x0, y0]); - var odd = BI.filter(args, function (i) { - return i % 2 === 0; - }); - var even = BI.filter(args, function (i) { - return i % 2 !== 0; - }); - args = BI.zip(odd, even); - BI.each(args, function (i, point) { - self._attr("lineTo", point); - }); - }, - - line: function (x0, y0, x1, y1) { - this._line.apply(this, arguments); - this._attr("stroke", []); - }, - - rect: function (x, y, w, h, color) { - this._attr("fillStyle", color); - this._attr("fillRect", [x, y, w, h]); - }, - - circle: function (x, y, radius, color) { - this._attr({ - fillStyle: color, - beginPath: [], - arc: [x, y, radius, 0, Math.PI * 2, true], - closePath: [], - fill: [] - }); - }, - - hollow: function () { - this._attr("beginPath", []); - this._line.apply(this, arguments); - this._attr("closePath", []); - this._attr("stroke", []); - }, - - solid: function () { - this.hollow.apply(this, arguments); - this._attr("fill", []); - }, - - gradient: function (x0, y0, x1, y1, start, end) { - var grd = this._getContext().createLinearGradient(x0, y0, x1, y1); - grd.addColorStop(0, start); - grd.addColorStop(1, end); - return grd; - }, - - reset: function () { - this._getContext().clearRect(0, 0, this.canvas.width, this.canvas.height); - }, - - stroke: function (callback) { - var self = this; - BI.nextTick(function () { - var ctx = self._getContext(); - BI.each(self._queue, function (i, q) { - if (BI.isFunction(ctx[q.k])) { - ctx[q.k].apply(ctx, q.v); - } else { - ctx[q.k] = q.v; - } - }); - self._queue = []; - callback && callback(); - }); - } -}); -BI.shortcut("bi.canvas", BI.Canvas);/** - * CollectionView - * - * Created by GUY on 2016/1/15. - * @class BI.CollectionView - * @extends BI.Widget - */ -BI.CollectionView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection", - // width: 400, //必设 - // height: 300, //必设 - overflowX: true, - overflowY: true, - cellSizeAndPositionGetter: BI.emptyFn, - horizontalOverscanSize: 0, - verticalOverscanSize: 0, - scrollLeft: 0, - scrollTop: 0, - items: [] - }); - }, - - _init: function () { - BI.CollectionView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - this._debounceRelease = BI.debounce(function () { - self._scrollLock = false; - }, 1000 / 60); - this.container = BI.createWidget({ - type: "bi.absolute" - }); - this.element.scroll(function () { - if (self._scrollLock === true) { - return; - } - o.scrollLeft = self.element.scrollLeft(); - o.scrollTop = self.element.scrollTop(); - self._calculateChildrenToRender(); - self.fireEvent(BI.CollectionView.EVENT_SCROLL, { - scrollLeft: o.scrollLeft, - scrollTop: o.scrollTop - }); - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - scrollable: o.overflowX === true && o.overflowY === true, - scrolly: o.overflowX === false && o.overflowY === true, - scrollx: o.overflowX === true && o.overflowY === false, - items: [this.container] - }); - if (o.items.length > 0) { - this._calculateSizeAndPositionData(); - this._populate(); - } - if (o.scrollLeft !== 0 || o.scrollTop !== 0) { - BI.nextTick(function () { - self.element.scrollTop(o.scrollTop); - self.element.scrollLeft(o.scrollLeft); - }); - } - }, - - _calculateSizeAndPositionData: function () { - var o = this.options; - var cellMetadata = []; - var sectionManager = new BI.SectionManager(); - var height = 0; - var width = 0; - - for (var index = 0, len = o.items.length; index < len; index++) { - var cellMetadatum = o.cellSizeAndPositionGetter(index); - - if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || - cellMetadatum.width == null || isNaN(cellMetadatum.width) || - cellMetadatum.x == null || isNaN(cellMetadatum.x) || - cellMetadatum.y == null || isNaN(cellMetadatum.y)) { - throw Error(); - } - - height = Math.max(height, cellMetadatum.y + cellMetadatum.height); - width = Math.max(width, cellMetadatum.x + cellMetadatum.width); - - cellMetadatum.index = index; - cellMetadata[index] = cellMetadatum; - sectionManager.registerCell(cellMetadatum, index); - } - - this._cellMetadata = cellMetadata; - this._sectionManager = sectionManager; - this._height = height; - this._width = width; - }, - - _cellRenderers: function (height, width, x, y) { - this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y); - return this._cellGroupRenderer() - }, - - _cellGroupRenderer: function () { - var self = this, o = this.options; - var rendered = []; - BI.each(this._lastRenderedCellIndices, function (i, index) { - var cellMetadata = self._sectionManager.getCellMetadata(index); - rendered.push(cellMetadata); - }); - return rendered; - }, - - _calculateChildrenToRender: function () { - var self = this, o = this.options; - var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()); - var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()); - var left = Math.max(0, scrollLeft - o.horizontalOverscanSize); - var top = Math.max(0, scrollTop - o.verticalOverscanSize); - var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize); - var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize); - if (right > 0 && bottom > 0) { - //如果滚动的区间并没有超出渲染的范围 - if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { - return; - } - var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top); - var renderedCells = [], renderedKeys = [], renderedWidgets = {}; - //存储所有的left和top - var lefts = {}, tops = {}; - for (var i = 0, len = childrenToDisplay.length; i < len; i++) { - var datum = childrenToDisplay[i]; - lefts[datum.x] = datum.x; - lefts[datum.x + datum.width] = datum.x + datum.width; - tops[datum.y] = datum.y; - tops[datum.y + datum.height] = datum.y + datum.height; - } - lefts = BI.toArray(lefts); - tops = BI.toArray(tops); - var leftMap = BI.invert(lefts); - var topMap = BI.invert(tops); - //存储上下左右四个边界 - var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {}; - var assertMinBorder = function (border, offset) { - if (border[offset] == null) { - border[offset] = Number.MAX_VALUE; - } - }; - var assertMaxBorder = function (border, offset) { - if (border[offset] == null) { - border[offset] = 0; - } - }; - for (var i = 0, len = childrenToDisplay.length; i < len; i++) { - var datum = childrenToDisplay[i]; - var index = BI.deepIndexOf(this.renderedKeys, datum.index); - var child; - if (index > -1) { - if (datum.width !== this.renderedCells[index]._width) { - this.renderedCells[index]._width = datum.width; - this.renderedCells[index].el.setWidth(datum.width); - } - if (datum.height !== this.renderedCells[index]._height) { - this.renderedCells[index]._height = datum.height; - this.renderedCells[index].el.setHeight(datum.height); - } - if (this.renderedCells[index]._left !== datum.x) { - this.renderedCells[index].el.element.css("left", datum.x + "px"); - } - if (this.renderedCells[index]._top !== datum.y) { - this.renderedCells[index].el.element.css("top", datum.y + "px"); - } - renderedCells.push(child = this.renderedCells[index]); - } else { - child = BI.createWidget(BI.extend({ - type: "bi.label", - width: datum.width, - height: datum.height - }, o.items[datum.index], { - cls: (o.items[datum.index].cls || "") + " container-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), - _left: datum.x, - _top: datum.y - })); - renderedCells.push({ - el: child, - left: datum.x, - top: datum.y, - _left: datum.x, - _top: datum.y, - _width: datum.width, - _height: datum.height - }); - } - var startTopIndex = topMap[datum.y] | 0; - var endTopIndex = topMap[datum.y + datum.height] | 0; - for (var k = startTopIndex; k <= endTopIndex; k++) { - var t = tops[k]; - assertMinBorder(leftBorder, t); - assertMaxBorder(rightBorder, t); - leftBorder[t] = Math.min(leftBorder[t], datum.x); - rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width); - } - var startLeftIndex = leftMap[datum.x] | 0; - var endLeftIndex = leftMap[datum.x + datum.width] | 0; - for (var k = startLeftIndex; k <= endLeftIndex; k++) { - var l = lefts[k]; - assertMinBorder(topBorder, l); - assertMaxBorder(bottomBorder, l); - topBorder[l] = Math.min(topBorder[l], datum.y); - bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height); - } - - renderedKeys.push(datum.index); - renderedWidgets[i] = child; - } - //已存在的, 需要添加的和需要删除的 - var existSet = {}, addSet = {}, deleteArray = []; - BI.each(renderedKeys, function (i, key) { - if (BI.deepContains(self.renderedKeys, key)) { - existSet[i] = key; - } else { - addSet[i] = key; - } - }); - BI.each(this.renderedKeys, function (i, key) { - if (BI.deepContains(existSet, key)) { - return; - } - if (BI.deepContains(addSet, key)) { - return; - } - deleteArray.push(i); - }); - BI.each(deleteArray, function (i, index) { - //性能优化,不调用destroy方法防止触发destroy事件 - self.renderedCells[index].el._destroy(); - }); - var addedItems = []; - BI.each(addSet, function (index) { - addedItems.push(renderedCells[index]) - }); - this.container.addItems(addedItems); - //拦截父子级关系 - this.container._children = renderedWidgets; - this.container.attr("items", renderedCells); - this.renderedCells = renderedCells; - this.renderedKeys = renderedKeys; - - //Todo 左右比较特殊 - var minX = BI.min(leftBorder); - var maxX = BI.max(rightBorder); - - var minY = BI.max(topBorder); - var maxY = BI.min(bottomBorder); - - this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; - } - }, - - _getMaxScrollLeft: function () { - return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); - }, - - _getMaxScrollTop: function () { - return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); - }, - - _populate: function (items) { - var o = this.options; - this._reRange(); - if (items && items !== this.options.items) { - this.options.items = items; - this._calculateSizeAndPositionData(); - } - if (o.items.length > 0) { - this.container.setWidth(this._width); - this.container.setHeight(this._height); - - this._calculateChildrenToRender(); - this.element.scrollTop(o.scrollTop); - this.element.scrollLeft(o.scrollLeft); - } - }, - - setScrollLeft: function (scrollLeft) { - if (this.options.scrollLeft === scrollLeft) { - return; - } - this._scrollLock = true; - this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollLeft(this.options.scrollLeft); - }, - - setScrollTop: function (scrollTop) { - if (this.options.scrollTop === scrollTop) { - return; - } - this._scrollLock = true; - this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollTop(this.options.scrollTop); - }, - - setOverflowX: function (b) { - var self = this; - if (this.options.overflowX !== !!b) { - this.options.overflowX = !!b; - BI.nextTick(function () { - self.element.css({overflowX: !!b ? "auto" : "hidden"}); - }); - } - }, - - setOverflowY: function (b) { - var self = this; - if (this.options.overflowY !== !!b) { - this.options.overflowY = !!b; - BI.nextTick(function () { - self.element.css({overflowY: !!b ? "auto" : "hidden"}); - }); - } - }, - - getScrollLeft: function () { - return this.options.scrollLeft; - }, - - getScrollTop: function () { - return this.options.scrollTop; - }, - - getMaxScrollLeft: function () { - return this._getMaxScrollLeft(); - }, - - getMaxScrollTop: function () { - return this._getMaxScrollTop(); - }, - - //重新计算children - _reRange: function () { - this.renderRange = {}; - }, - - _clearChildren: function () { - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - BI.each(this.renderedCells, function (i, cell) { - cell.el._destroy(); - }); - this._clearChildren(); - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - }, - - populate: function (items) { - if (items && items !== this.options.items) { - this.restore(); - } - this._populate(items); - } -}); -BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut('bi.collection_view', BI.CollectionView);/** - * @class BI.Combo - * @extends BI.Widget - */ -BI.Combo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-combo", - trigger: "click", - toggle: true, - direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right - isDefaultInit: false, - destroyWhenHide: false, - isNeedAdjustHeight: true,//是否需要高度调整 - isNeedAdjustWidth: true, - stopEvent: false, - stopPropagation: false, - adjustLength: 0,//调整的距离 - adjustXOffset: 0, - adjustYOffset: 0, - hideChecker: BI.emptyFn, - offsetStyle: "left", //left,right,center - el: {}, - popup: {}, - comboClass: "bi-combo-popup", - hoverClass: "bi-combo-hover" - }) - }, - - _init: function () { - BI.Combo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._initCombo(); - this._initPullDownAction(); - this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); - } - } - }); - - self.element.on("mouseenter." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self.element.addClass(o.hoverClass); - } - }); - self.element.on("mouseleave." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self.element.removeClass(o.hoverClass); - } - }); - - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.combo} - ] - }); - o.isDefaultInit && (this._assertPopupView()); - BI.Resizers.add(this.getName(), BI.bind(function () { - if (this.isViewVisible()) { - this._hideView(); - } - }, this)); - }, - - _toggle: function () { - this._assertPopupViewRender(); - if (this.popupView.isVisible()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - var st = function (e) { - if (o.stopEvent) { - e.stopEvent(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - }; - BI.each(evs, function (i, ev) { - switch (ev) { - case "hover": - self.element.on("mouseenter." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } - }); - self.element.on("mouseleave." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); - self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - }); - break; - case "click": - var debounce = BI.debounce(function (e) { - if (self.combo.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isViewVisible()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); - self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true); - self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { - debounce(e); - st(e); - }); - break; - } - }); - }, - - _initCombo: function () { - this.combo = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this; - if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { - type: "bi.popup_view" - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - self.combo.setValue(self.getValue()); - self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.popupView.setVisible(false); - BI.nextTick(function () { - self.fireEvent(BI.Combo.EVENT_AFTER_INIT); - }); - } - }, - - _assertPopupViewRender: function () { - this._assertPopupView(); - if (!this._rendered) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - this._rendered = true; - } - }, - - _hideIf: function (e) { - // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) { - // return; - // } - if (this.element.find(e.target).length > 0) { - return; - } - var isHide = this.options.hideChecker.apply(this, [e]); - if (isHide === false) { - return; - } - this._hideView(); - }, - - _hideView: function () { - this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); - if (this.options.destroyWhenHide === true) { - this.popupView && this.popupView.destroy(); - this.popupView = null; - this._rendered = false; - } else { - this.popupView && this.popupView.invisible(); - } - this.element.removeClass(this.options.comboClass); - - $(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); - this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); - }, - - _popupView: function () { - this._assertPopupViewRender(); - this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); - - this.popupView.visible(); - this.adjustWidth(); - this.adjustHeight(); - - this.element.addClass(this.options.comboClass); - $(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); - this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); - }, - - adjustWidth: function () { - var o = this.options; - if (!this.popupView) { - return; - } - if (o.isNeedAdjustWidth === true) { - this.resetListWidth(""); - var width = this.popupView.element.outerWidth(); - var maxW = this.element.outerWidth() || o.width; - if (width > maxW + 80) { - maxW = maxW + 80; - } else if (width > maxW) { - maxW = width; - } - this.resetListWidth(maxW < 100 ? 100 : maxW); - } - }, - - adjustHeight: function () { - var o = this.options, p = {}; - if (!this.popupView) { - return; - } - var isVisible = this.popupView.isVisible(); - this.popupView.visible(); - switch (o.direction) { - case "bottom": - case "bottom,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle); - break; - case "top": - case "top,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); - break; - case "left": - case "left,bottom": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle); - break; - case "right": - case "right,bottom": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle); - break; - case "top,left": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle); - break; - case "bottom,left": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle); - break; - case "left,top": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle); - break; - case "right,top": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle); - break; - case "top,custom": - case "custom,top": - p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); - break; - case "custom,bottom": - case "bottom,custom": - p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); - break; - case "left,custom": - case "custom,left": - p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); - delete p.top; - delete p.adaptHeight; - break; - case "custom,right": - case "right,custom": - p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); - delete p.top; - delete p.adaptHeight; - break; - } - - if ("adaptHeight" in p) { - this.resetListHeight(p['adaptHeight']); - } - if ("left" in p) { - this.popupView.element.css({ - left: p.left - }); - } - if ("top" in p) { - this.popupView.element.css({ - top: p.top - }); - } - this.position = p; - this.popupView.setVisible(isVisible); - }, - - resetListHeight: function (h) { - this._assertPopupView(); - this.popupView.resetHeight && this.popupView.resetHeight(h); - }, - - resetListWidth: function (w) { - this._assertPopupView(); - this.popupView.resetWidth && this.popupView.resetWidth(w); - }, - - populate: function (items) { - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - this.combo.populate.apply(this.combo, arguments); - }, - - _setEnable: function (arg) { - BI.Combo.superclass._setEnable.apply(this, arguments); - !arg && this.element.removeClass(this.options.hoverClass); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - this._assertPopupView(); - this.combo.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - this._assertPopupView(); - return this.popupView && this.popupView.getValue(); - }, - - isViewVisible: function () { - return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible(); - }, - - showView: function () { - if (this.isEnabled() && this.combo.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - getPopupPosition: function () { - return this.position; - }, - - toggle: function () { - this._toggle(); - }, - - destroy: function () { - $(document).unbind("mousedown." + this.getName()) - .unbind("mousewheel." + this.getName()) - .unbind("mouseenter." + this.getName()) - .unbind("mousemove." + this.getName()) - .unbind("mouseleave." + this.getName()); - BI.Resizers.remove(this.getName()); - BI.Combo.superclass.destroy.apply(this, arguments); - } -}); -BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Combo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Combo.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Combo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Combo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Combo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.combo", BI.Combo);/** - * - * 某个可以展开的节点 - * - * Created by GUY on 2015/9/10. - * @class BI.Expander - * @extends BI.Widget - */ -BI.Expander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-expander", - trigger: "click", - toggle: true, - //direction: "bottom", //top,bottom四个方向 - isDefaultInit: false, //是否默认初始化子节点 - el: {}, - popup: {}, - expanderClass: "bi-expander-popup", - hoverClass: "bi-expander-hover" - }) - }, - - _init: function () { - BI.Expander.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._expanded = !!o.el.open; - this._initExpander(); - this._initPullDownAction(); - this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); - } - } - }); - - this.element.hover(function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self.element.addClass(o.hoverClass); - } - }, function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self.element.removeClass(o.hoverClass); - } - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.expander} - ] - }); - o.isDefaultInit && this._assertPopupView(); - if (this.expander.isOpened() === true) { - this._popupView(); - } - }, - - _toggle: function () { - this._assertPopupViewRender(); - if (this.popupView.isVisible()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - BI.each(evs, function (i, e) { - switch (e) { - case "hover": - self.element[e](function (e) { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } - }, function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - }); - break; - default : - if (e) { - self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { - if (self.expander.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isExpanded()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true)); - } - break; - } - }) - }, - - _initExpander: function () { - this.expander = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this; - if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { - type: "bi.button_group", - cls: "expander-popup", - layouts: [{ - type: "bi.vertical", - hgap: 0, - vgap: 0 - }] - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - //self.setValue(self.getValue()); - self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj); - } - }); - this.popupView.setVisible(this.isExpanded()); - BI.nextTick(function () { - self.fireEvent(BI.Expander.EVENT_AFTER_INIT); - }); - } - }, - - _assertPopupViewRender: function () { - this._assertPopupView(); - if (!this._rendered) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - this._rendered = true; - } - }, - - _hideView: function () { - this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW); - this._expanded = false; - this.expander.setOpened(false); - this.popupView && this.popupView.invisible(); - this.element.removeClass(this.options.expanderClass); - - this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW); - }, - - _popupView: function () { - this._assertPopupViewRender(); - this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW); - this._expanded = true; - this.expander.setOpened(true); - this.popupView.visible(); - this.element.addClass(this.options.expanderClass); - this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW); - }, - - populate: function (items) { - //this._assertPopupView(); - this.popupView && this.popupView.populate.apply(this.popupView, arguments); - this.expander.populate.apply(this.expander, arguments); - }, - - _setEnable: function (arg) { - BI.Expander.superclass._setEnable.apply(this, arguments); - !arg && this.element.removeClass(this.options.hoverClass); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - //this._assertPopupView(); - this.expander.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - //this._assertPopupView(); - return this.popupView ? this.popupView.getValue() : []; - }, - - isViewVisible: function () { - return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible(); - }, - - isExpanded: function () { - return this._expanded; - }, - - showView: function () { - if (this.isEnabled() && this.expander.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - getAllLeaves: function () { - return this.popupView && this.popupView.getAllLeaves(); - }, - - getNodeById: function (id) { - if (this.expander.options.id === id) { - return this.expander; - } - return this.popupView && this.popupView.getNodeById(id); - }, - - getNodeByValue: function (value) { - if (this.expander.getValue() === value) { - return this.expander; - } - return this.popupView && this.popupView.getNodeByValue(value); - }, - - destroy: function () { - BI.Expander.superclass.destroy.apply(this, arguments); - } -}); -BI.Expander.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Expander.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Expander.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Expander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Expander.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Expander.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.expander", BI.Expander);/** - * Created by GUY on 2015/8/10. - */ - -BI.ComboGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-combo-group bi-list-item", - - //以下这些属性对每一个combo都是公用的 - trigger: "click,hover", - direction: "right", - adjustLength: 0, - isDefaultInit: false, - isNeedAdjustHeight: false, - isNeedAdjustWidth: false, - - el: {type: "bi.text_button", text: "", value: ""}, - children: [], - - popup: { - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - } - } - }) - }, - - _init: function () { - BI.ComboGroup.superclass._init.apply(this, arguments); - this.populate(this.options.el); - }, - - populate: function (item) { - var self = this, o = this.options; - var children = o.children; - if (BI.isEmpty(children)) { - throw new Error("ComboGroup构造错误"); - } - BI.each(children, function (i, ch) { - var son = BI.formatEL(ch).el.children; - ch = BI.formatEL(ch).el; - if (!BI.isEmpty(son)) { - ch.el = BI.clone(ch); - ch.children = son; - ch.type = "bi.combo_group"; - ch.action = o.action; - ch.height = o.height; - ch.direction = o.direction; - ch.isDefaultInit = o.isDefaultInit; - ch.isNeedAdjustHeight = o.isNeedAdjustHeight; - ch.isNeedAdjustWidth = o.isNeedAdjustWidth; - ch.adjustLength = o.adjustLength; - ch.popup = o.popup; - } - }) - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - height: o.height, - trigger: o.trigger, - direction: o.direction, - isDefaultInit: o.isDefaultInit, - isNeedAdjustWidth: o.isNeedAdjustWidth, - isNeedAdjustHeight: o.isNeedAdjustHeight, - adjustLength: o.adjustLength, - el: item, - popup: BI.extend({}, o.popup, { - el: BI.extend({ - items: children - }, o.popup.el) - }) - }) - this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj); - } - }) - }, - - getValue: function () { - return this.combo.getValue(); - }, - - setValue: function (v) { - this.combo.setValue(v); - } -}); -BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-virtual-group", - items: [], - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }) - }, - - render: function () { - this.populate(this.options.items); - }, - - _packageBtns: function (items) { - var o = this.options; - - for (var i = o.layouts.length - 1; i > 0; i--) { - items = BI.map(items, function (k, it) { - return BI.extend({}, o.layouts[i], { - items: [ - BI.extend({}, o.layouts[i].el, { - el: BI.stripEL(it) - }) - ] - }) - }) - } - return items; - }, - - _packageItems: function (items, packBtns) { - return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); - }, - - _packageLayout: function (items) { - var o = this.options, layout = BI.deepClone(o.layouts[0]); - - var lay = BI.formatEL(layout).el; - while (lay && lay.items && !BI.isEmpty(lay.items)) { - lay = BI.formatEL(lay.items[0]).el; - } - lay.items = items; - return layout; - }, - - addItems: function (items) { - this.layouts.addItems(items); - }, - - prependItems: function (items) { - this.layouts.prependItems(items); - }, - - setValue: function (v) { - this.layouts.setValue(v); - }, - - getValue: function () { - return this.layouts.getValue(); - }, - - empty: function () { - this.layouts.empty(); - }, - - populate: function (items) { - var self = this; - items = items || []; - this.options.items = items; - items = this._packageBtns(items); - if (!this.layouts) { - this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); - } else { - this.layouts.populate(items); - } - } -}); -BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.virtual_group", BI.VirtualGroup);/** - * 加载控件 - * - * Created by GUY on 2015/8/31. - * @class BI.Loader - * @extends BI.Widget - */ -BI.Loader = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-loader", - - direction: "top", - isDefaultInit: true,//是否默认初始化数据 - logic: { - dynamic: true, - scrolly: true - }, - - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, - - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, - - //下面是分页信息 - count: false, - prev: false, - next: {}, - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn - }) - }, - - _prevLoad: function () { - var self = this, o = this.options; - this.prev.setLoading(); - o.itemsCreator.apply(this, [{times: --this.times}, function () { - self.prev.setLoaded(); - self.prependItems.apply(self, arguments); - }]); - }, - - _nextLoad: function () { - var self = this, o = this.options; - this.next.setLoading(); - o.itemsCreator.apply(this, [{times: ++this.times}, function () { - self.next.setLoaded(); - self.addItems.apply(self, arguments); - }]); - }, - - _init: function () { - BI.Loader.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.itemsCreator === false) { - o.prev = false; - o.next = false; - } - if (o.prev !== false) { - this.prev = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.prev)); - this.prev.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._prevLoad(); - } - }); - } - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - chooseType: 0, - items: o.items, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Loader.EVENT_CHANGE, obj); - } - }); - - if (o.next !== false) { - this.next = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.next)); - this.next.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._nextLoad(); - } - }) - } - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ - scrolly: true - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next) - })))); - - o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { - o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); - }, this)); - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - hasPrev: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasPrev.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - hasNext: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasNext.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - prependItems: function (items) { - this.count += items.length; - if (this.next !== false) { - if (this.hasPrev()) { - this.options.items = this.options.items.concat(items); - this.prev.setLoaded(); - } else { - this.prev.setEnd(); - } - } - this.button_group.prependItems.apply(this.button_group, arguments); - }, - - addItems: function (items) { - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.options.items = this.options.items.concat(items); - this.next.setLoaded(); - } else { - this.next.setEnd(); - } - } - this.button_group.addItems.apply(this.button_group, arguments); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { - o.itemsCreator.apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("arguments can not be null!!!"); - } - self.populate.apply(self, arguments); - o.onLoaded(); - }]); - return; - } - this.options.items = items; - this.times = 1; - this.count = 0; - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.next.setLoaded(); - } else { - this.next.invisible(); - } - } - if (BI.isObject(this.prev)) { - if (this.hasPrev()) { - this.prev.setLoaded(); - } else { - this.prev.invisible(); - } - } - this.button_group.populate.apply(this.button_group, arguments); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - }, - - empty: function () { - this.button_group.empty(); - BI.each([this.prev, this.next], function (i, ob) { - ob && ob.setVisible(false); - }); - }, - - destroy: function () { - BI.Loader.superclass.destroy.apply(this, arguments); - } -}); -BI.Loader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.loader", BI.Loader);/** - * Created by GUY on 2015/6/26. - */ - -BI.Navigation = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), { - direction: "bottom",//top, bottom, left, right, custom - logic: { - dynamic: false - }, - single: false, - defaultShowIndex: false, - tab: false, - cardCreator: function (v) { - return BI.createWidget(); - }, - - afterCardCreated: BI.emptyFn, - afterCardShow: BI.emptyFn - }) - }, - - render: function () { - var self = this, o = this.options; - this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); - this.cardMap = {}; - this.showIndex = 0; - this.layout = BI.createWidget({ - type: "bi.card" - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) - })))); - - - new BI.ShowListener({ - eventObj: this.tab, - cardLayout: this.layout, - cardNameCreator: function (v) { - return self.showIndex + v; - }, - cardCreator: function (v) { - var card = o.cardCreator(v); - self.cardMap[v] = card; - return card; - }, - afterCardCreated: BI.bind(this.afterCardCreated, this), - afterCardShow: BI.bind(this.afterCardShow, this) - }); - }, - - mounted: function () { - var o = this.options; - if (o.defaultShowIndex !== false) { - this.setSelect(o.defaultShowIndex); - } - }, - - _deleteOtherCards: function (currCardName) { - var self = this, o = this.options; - if (o.single === true) { - BI.each(this.cardMap, function (name, card) { - if (name !== (currCardName + "")) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - } - }); - } - }, - - afterCardCreated: function (v) { - var self = this; - this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Navigation.EVENT_CHANGE, obj); - } - }); - this.options.afterCardCreated.apply(this, arguments); - }, - - afterCardShow: function (v) { - this.showIndex = v; - this._deleteOtherCards(v); - this.options.afterCardShow.apply(this, arguments); - }, - - populate: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.populate.apply(card, arguments); - } - }, - - _assertCard: function (v) { - if (!this.layout.isCardExisted(v)) { - var card = this.options.cardCreator(v); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); - this.afterCardCreated(v); - } - }, - - setSelect: function (v) { - this._assertCard(v); - this.layout.showCardByName(v); - this._deleteOtherCards(v); - if (this.showIndex !== v) { - this.showIndex = v; - BI.nextTick(BI.bind(this.afterCardShow, this, v)); - } - }, - - getSelect: function () { - return this.showIndex; - }, - - getSelectedCard: function () { - if (BI.isKey(this.showIndex)) { - return this.cardMap[this.showIndex]; - } - }, - - /** - * @override - */ - setValue: function (v) { - var card = this.layout.getShowingCard(); - if (card) { - card.setValue(v); - } - }, - - /** - * @override - */ - getValue: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.getValue(); - } - }, - - empty: function () { - this.layout.deleteAllCard(); - this.cardMap = {}; - }, - - destroy: function () { - BI.Navigation.superclass.destroy.apply(this, arguments); - } -}); -BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.navigation", BI.Navigation);/** - * 搜索逻辑控件 - * - * Created by GUY on 2015/9/28. - * @class BI.Searcher - * @extends BI.Widget - */ - -BI.Searcher = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-searcher", - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - - isDefaultInit: false, - isAutoSearch: true, //是否自动搜索 - isAutoSync: true, //是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一 - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - - //isAutoSearch为false时启用 - onSearch: function (op, callback) { - callback([]) - }, - - el: { - type: "bi.search_editor" - }, - - popup: { - type: "bi.searcher_view" - }, - - adapter: null, - masker: { //masker层 - offset: {} - } - }) - }, - - _init: function () { - BI.Searcher.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.editor = BI.createWidget(o.el, { - type: "bi.search_editor" - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap, - items: [this.editor] - }); - o.isDefaultInit && (this._assertPopupView()); - - var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, true); - this.editor.on(BI.Controller.EVENT_CHANGE, function (type) { - switch (type) { - case BI.Events.STARTEDIT: - self._startSearch(); - break; - case BI.Events.EMPTY: - self._stopSearch(); - break; - case BI.Events.CHANGE: - search(); - break; - case BI.Events.PAUSE: - self._pauseSearch(); - break; - } - }) - }, - - _assertPopupView: function () { - var self = this, o = this.options; - if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) { - this.popupView = BI.createWidget(o.popup, { - type: "bi.searcher_view", - chooseType: o.chooseType - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - if (o.isAutoSync) { - var values = o.adapter && o.adapter.getValue(); - if (!obj.isSelected()) { - o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); - } else { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - o.adapter && o.adapter.setValue([obj.getValue()]); - break; - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - values.push(obj.getValue()); - o.adapter && o.adapter.setValue(values); - break; - } - } - } - self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); - } - }); - BI.nextTick(function () { - self.fireEvent(BI.Searcher.EVENT_AFTER_INIT); - }); - } - if (o.masker && !BI.Maskers.has(this.getName())) { - BI.Maskers.create(this.getName(), o.adapter, BI.extend({ - container: this, - render: this.popupView - }, o.masker)); - } - }, - - _startSearch: function () { - this._assertPopupView(); - this._stop = false; - this._isSearching = true; - this.fireEvent(BI.Searcher.EVENT_START); - this.popupView.startSearch && this.popupView.startSearch(); - //搜索前先清空dom - // BI.Maskers.get(this.getName()).empty(); - BI.nextTick(function (name) { - BI.Maskers.show(name); - }, this.getName()); - }, - - _pauseSearch: function () { - var o = this.options, name = this.getName(); - this._stop = true; - BI.nextTick(function (name) { - BI.Maskers.hide(name); - }, this.getName()); - if (this._isSearching === true) { - this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch(); - this.fireEvent(BI.Searcher.EVENT_PAUSE); - } - this._isSearching = false; - }, - - _stopSearch: function () { - var o = this.options, name = this.getName(); - this._stop = true; - BI.Maskers.hide(name); - if (this._isSearching === true) { - this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); - this.fireEvent(BI.Searcher.EVENT_STOP); - } - this._isSearching = false; - }, - - _search: function () { - var self = this, o = this.options, keyword = this.editor.getValue(); - if (keyword === "" || this._stop) { - return; - } - if (o.isAutoSearch) { - var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || []; - var finding = BI.Func.getSearchResult(items, keyword); - var matched = finding.matched, finded = finding.finded; - this.popupView.populate(finded, matched, keyword); - o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue()); - self.fireEvent(BI.Searcher.EVENT_SEARCHING); - return; - } - this.popupView.loading && this.popupView.loading(); - o.onSearch({ - times: 1, - keyword: keyword, - selectedValues: o.adapter && o.adapter.getValue() - }, function (searchResult, matchResult) { - if (!self._stop) { - var args = [].slice.call(arguments); - if (args.length > 0) { - args.push(keyword); - } - BI.Maskers.show(self.getName()); - self.popupView.populate.apply(self.popupView, args); - o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue()); - self.popupView.loaded && self.popupView.loaded(); - self.fireEvent(BI.Searcher.EVENT_SEARCHING); - } - }); - }, - - setAdapter: function (adapter) { - this.options.adapter = adapter; - BI.Maskers.remove(this.getName()); - }, - - doSearch: function () { - if (this.isSearching()) { - this._search(); - } - }, - - stopSearch: function () { - this._stopSearch();//先停止搜索,然后再去设置editor为空 - //important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常) - try { - this.editor.blur(); - } catch (e) { - if (!this.editor.blur) { - throw new Error("editor没有实现blur方法"); - } - } finally { - this.editor.setValue(""); - } - }, - - isSearching: function () { - return this._isSearching; - }, - - isViewVisible: function () { - return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName()); - }, - - getView: function () { - return this.popupView; - }, - - hasMatched: function () { - this._assertPopupView(); - return this.popupView.hasMatched(); - }, - - adjustHeight: function () { - if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) { - BI.Maskers.show(this.getName()); - } - }, - - adjustView: function () { - this.isViewVisible() && BI.Maskers.show(this.getName()); - }, - - setValue: function (v) { - this._assertPopupView(); - this.popupView && this.popupView.setValue(v); - }, - - getKeyword: function () { - return this.editor.getValue(); - }, - - getKeywords: function () { - return this.editor.getKeywords(); - }, - - getValue: function () { - var o = this.options; - if (o.isAutoSync && o.adapter && o.adapter.getValue) { - return o.adapter.getValue(); - } - if (this.isSearching()) { - return this.popupView.getValue(); - } else if (o.adapter && o.adapter.getValue) { - return o.adapter.getValue(); - } else { - return this.popupView.getValue(); - } - }, - - populate: function (result, searchResult, keyword) { - var o = this.options; - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - if (o.isAutoSync && o.adapter && o.adapter.getValue) { - this.popupView.setValue(o.adapter.getValue()); - } - }, - - empty: function () { - this.popupView && this.popupView.empty(); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - BI.Searcher.superclass.destroy.apply(this, arguments); - } -}); -BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Searcher.EVENT_START = "EVENT_START"; -BI.Searcher.EVENT_STOP = "EVENT_STOP"; -BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING"; -BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - -BI.shortcut("bi.searcher", BI.Searcher);/** - * - * 切换显示或隐藏面板 - * - * Created by GUY on 2015/11/2. - * @class BI.Switcher - * @extends BI.Widget - */ -BI.Switcher = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-switcher", - direction: BI.Direction.Top, - trigger: "click", - toggle: true, - el: {}, - popup: {}, - adapter: null, - masker: {}, - switcherClass: "bi-switcher-popup", - hoverClass: "bi-switcher-hover" - }) - }, - - _init: function () { - BI.Switcher.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._initSwitcher(); - this._initPullDownAction(); - this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); - } - } - }); - - this.element.hover(function () { - if (self.isEnabled() && self.switcher.isEnabled()) { - self.element.addClass(o.hoverClass); - } - }, function () { - if (self.isEnabled() && self.switcher.isEnabled()) { - self.element.removeClass(o.hoverClass); - } - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.switcher} - ] - }); - o.isDefaultInit && (this._assertPopupView()); - }, - - _toggle: function () { - this._assertPopupView(); - if (this.isExpanded()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - BI.each(evs, function (i, e) { - switch (e) { - case "hover": - self.element[e](function (e) { - if (self.isEnabled() && self.switcher.isEnabled()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } - }, function () { - if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - }); - break; - default : - if (e) { - self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { - if (self.switcher.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.switcher.isEnabled()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isExpanded()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true)); - } - break; - } - }) - }, - - _initSwitcher: function () { - this.switcher = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this, o = this.options; - if (!this._created) { - this.popupView = BI.createWidget(o.popup, { - type: "bi.button_group", - element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)), - cls: "switcher-popup", - layouts: [{ - type: "bi.vertical", - hgap: 0, - vgap: 0 - }] - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj); - } - }); - if (o.direction !== BI.Direction.Custom && !o.adapter) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - } - this._created = true; - BI.nextTick(function () { - self.fireEvent(BI.Switcher.EVENT_AFTER_INIT); - }); - } - }, - - _hideView: function () { - this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW); - var self = this, o = this.options; - o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); - BI.nextTick(function () { - o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); - self.element.removeClass(o.switcherClass); - self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW); - }); - }, - - _popupView: function () { - var self = this, o = this.options; - this._assertPopupView(); - this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW); - o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true); - BI.nextTick(function (name) { - o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true); - self.element.addClass(o.switcherClass); - self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW); - }, this.getName()); - }, - - populate: function (items) { - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - this.switcher.populate.apply(this.switcher, arguments); - }, - - _setEnable: function (arg) { - BI.Switcher.superclass._setEnable.apply(this, arguments); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - this._assertPopupView(); - this.switcher.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - this._assertPopupView(); - return this.popupView ? this.popupView.getValue() : []; - }, - - setAdapter: function (adapter) { - this.options.adapter = adapter; - BI.Maskers.remove(this.getName()); - }, - - isViewVisible: function () { - return this.isEnabled() && this.switcher.isEnabled() && - (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible())); - }, - - isExpanded: function () { - return this.isViewVisible(); - }, - - showView: function () { - if (this.isEnabled() && this.switcher.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - adjustView: function () { - this.isViewVisible() && BI.Maskers.show(this.getName()); - }, - - getAllLeaves: function () { - return this.popupView && this.popupView.getAllLeaves(); - }, - - getNodeById: function (id) { - if (this.switcher.attr("id") === id) { - return this.switcher; - } - return this.popupView && this.popupView.getNodeById(id); - }, - - getNodeByValue: function (value) { - if (this.switcher.getValue() === value) { - return this.switcher; - } - return this.popupView && this.popupView.getNodeByValue(value); - }, - - empty: function () { - this.popupView && this.popupView.empty(); - }, - - destroy: function () { - BI.Switcher.superclass.destroy.apply(this, arguments); - } -}); -BI.Switcher.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Switcher.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Switcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Switcher.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Switcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Switcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.switcher", BI.Switcher);/** - * Created by GUY on 2015/6/26. - */ - -BI.Tab = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-tab", - direction: "top",//top, bottom, left, right, custom - single: false, //是不是单页面 - logic: { - dynamic: false - }, - defaultShowIndex: false, - tab: false, - cardCreator: function (v) { - return BI.createWidget(); - } - }) - }, - - render: function () { - var self = this, o = this.options; - if (BI.isObject(o.tab)) { - this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); - this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - } - this.cardMap = {}; - this.layout = BI.createWidget({ - type: "bi.card" - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) - })))); - - var listener = new BI.ShowListener({ - eventObj: this.tab, - cardLayout: this.layout, - cardCreator: function (v) { - var card = o.cardCreator.apply(self, arguments); - self.cardMap[v] = card; - return card; - }, - afterCardShow: function (v) { - self._deleteOtherCards(v); - self.curr = v; - } - }); - listener.on(BI.ShowListener.EVENT_CHANGE, function (value) { - self.fireEvent(BI.Tab.EVENT_CHANGE, value, self); - }); - }, - - _deleteOtherCards: function (currCardName) { - var self = this, o = this.options; - if (o.single === true) { - BI.each(this.cardMap, function (name, card) { - if (name !== (currCardName + "")) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - } - }); - } - }, - - _assertCard: function (v) { - if (!this.layout.isCardExisted(v)) { - var card = this.options.cardCreator(v); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); - } - }, - - mounted: function () { - var o = this.options; - if (o.defaultShowIndex !== false) { - this.setSelect(o.defaultShowIndex); - } - }, - - setSelect: function (v) { - this.tab && this.tab.setValue(v); - this._assertCard(v); - this.layout.showCardByName(v); - this._deleteOtherCards(v); - if (this.curr !== v) { - this.curr = v; - } - }, - - removeTab: function (cardname) { - var self = this, o = this.options; - BI.any(this.cardMap, function (name, card) { - if (BI.isEqual(name, (cardname + ""))) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - return true; - } - }); - }, - - getSelect: function () { - return this.curr; - }, - - getSelectedTab: function () { - return this.layout.getShowingCard(); - }, - - getTab: function (v) { - this._assertCard(v); - return this.layout.getCardByName(v); - }, - - setValue: function (v) { - var card = this.layout.getShowingCard(); - if (card) { - card.setValue(v); - } - }, - - getValue: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.getValue(); - } - }, - - populate: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.populate && card.populate.apply(card, arguments); - } - }, - - empty: function () { - this.layout.deleteAllCard(); - this.cardMap = {}; - }, - - destroy: function () { - this.cardMap = {}; - BI.Tab.superclass.destroy.apply(this, arguments); - } -}); -BI.Tab.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.tab", BI.Tab);/** - * 表示当前对象 - * - * Created by GUY on 2015/9/7. - * @class BI.EL - * @extends BI.Widget - */ -BI.EL = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-el", - el: {}, - layout: {} - }); - }, - _init: function () { - BI.EL.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.ele = BI.createWidget(o.el); - BI.createWidget(o.layout, { - type: "bi.adaptive", - element: this, - items: [this.ele] - }); - this.ele.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - }, - - setValue: function (v) { - this.ele.setValue(v); - }, - - getValue: function () { - return this.ele.getValue(); - }, - - populate: function () { - this.ele.populate.apply(this, arguments); - } -}); -BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -// This is CodeMirror (http://codemirror.net), a code editor -// implemented in JavaScript on top of the browser's DOM. -// -// You can find some technical background for some of the code below -// at http://marijnhaverbeke.nl/blog/#cm-internals . - -(function(mod) { - this.CodeMirror = mod(); -})(function() { - "use strict"; - - // BROWSER SNIFFING - - // Kludges for bugs and behavior differences that can't be feature - // detected are enabled based on userAgent etc sniffing. - - var gecko = /gecko\/\d/i.test(navigator.userAgent); - var ie_upto10 = /MSIE \d/.test(navigator.userAgent); - var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); - var ie = ie_upto10 || ie_11up; - var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]); - var webkit = /WebKit\//.test(navigator.userAgent); - var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); - var chrome = /Chrome\//.test(navigator.userAgent); - var presto = /Opera\//.test(navigator.userAgent); - var safari = /Apple Computer/.test(navigator.vendor); - var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); - var phantom = /PhantomJS/.test(navigator.userAgent); - - var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); - // This is woefully incomplete. Suggestions for alternative methods welcome. - var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); - var mac = ios || /Mac/.test(navigator.platform); - var windows = /win/i.test(navigator.platform); - - var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/); - if (presto_version) presto_version = Number(presto_version[1]); - if (presto_version && presto_version >= 15) { presto = false; webkit = true; } - // Some browsers use the wrong event properties to signal cmd/ctrl on OS X - var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); - var captureRightClick = gecko || (ie && ie_version >= 9); - - // Optimize some code when these features are not used. - var sawReadOnlySpans = false, sawCollapsedSpans = false; - - // EDITOR CONSTRUCTOR - - // A CodeMirror instance represents an editor. This is the object - // that user code is usually dealing with. - - function CodeMirror(place, options) { - if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); - - this.options = options = options ? copyObj(options) : {}; - // Determine effective options based on given values and defaults. - copyObj(defaults, options, false); - setGuttersForLineNumbers(options); - - var doc = options.value; - if (typeof doc == "string") doc = new Doc(doc, options.mode); - this.doc = doc; - - var input = new CodeMirror.inputStyles[options.inputStyle](this); - var display = this.display = new Display(place, doc, input); - display.wrapper.CodeMirror = this; - updateGutters(this); - themeChanged(this); - if (options.lineWrapping) - this.display.wrapper.className += " CodeMirror-wrap"; - if (options.autofocus && !mobile) display.input.focus(); - initScrollbars(this); - - this.state = { - keyMaps: [], // stores maps added by addKeyMap - overlays: [], // highlighting overlays, as added by addOverlay - modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info - overwrite: false, - delayingBlurEvent: false, - focused: false, - suppressEdits: false, // used to disable editing during key handlers when in readOnly mode - pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll - draggingText: false, - highlight: new Delayed(), // stores highlight worker timeout - keySeq: null, // Unfinished key sequence - specialChars: null - }; - - var cm = this; - - // Override magic textarea content restore that IE sometimes does - // on our hidden textarea on reload - if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20); - - registerEventHandlers(this); - ensureGlobalHandlers(); - - startOperation(this); - this.curOp.forceUpdate = true; - attachDoc(this, doc); - - if ((options.autofocus && !mobile) || cm.hasFocus()) - setTimeout(bind(onFocus, this), 20); - else - onBlur(this); - - for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) - optionHandlers[opt](this, options[opt], Init); - maybeUpdateLineNumberWidth(this); - if (options.finishInit) options.finishInit(this); - for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); - endOperation(this); - // Suppress optimizelegibility in Webkit, since it breaks text - // measuring on line wrapping boundaries. - if (webkit && options.lineWrapping && - getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") - display.lineDiv.style.textRendering = "auto"; - } - - // DISPLAY CONSTRUCTOR - - // The display handles the DOM integration, both for input reading - // and content drawing. It holds references to DOM nodes and - // display-related state. - - function Display(place, doc, input) { - var d = this; - this.input = input; - - // Covers bottom-right square when both scrollbars are present. - d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); - d.scrollbarFiller.setAttribute("cm-not-content", "true"); - // Covers bottom of gutter when coverGutterNextToScrollbar is on - // and h scrollbar is present. - d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); - d.gutterFiller.setAttribute("cm-not-content", "true"); - // Will contain the actual code, positioned to cover the viewport. - d.lineDiv = elt("div", null, "CodeMirror-code"); - // Elements are added to these to represent selection and cursors. - d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); - d.cursorDiv = elt("div", null, "CodeMirror-cursors"); - // A visibility: hidden element used to find the size of things. - d.measure = elt("div", null, "CodeMirror-measure"); - // When lines outside of the viewport are measured, they are drawn in this. - d.lineMeasure = elt("div", null, "CodeMirror-measure"); - // Wraps everything that needs to exist inside the vertically-padded coordinate system - d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], - null, "position: relative; outline: none"); - // Moved around its parent to cover visible view. - d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); - // Set to the height of the document, allowing scrolling. - d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); - d.sizerWidth = null; - // Behavior of elts with overflow: auto and padding is - // inconsistent across browsers. This is used to ensure the - // scrollable area is big enough. - d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); - // Will contain the gutters, if any. - d.gutters = elt("div", null, "CodeMirror-gutters"); - d.lineGutter = null; - // Actual scrollable element. - d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); - d.scroller.setAttribute("tabIndex", "-1"); - // The element in which the editor lives. - d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); - - // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) - if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } - if (!webkit && !(gecko && mobile)) d.scroller.draggable = true; - - if (place) { - if (place.appendChild) place.appendChild(d.wrapper); - else place(d.wrapper); - } - - // Current rendered range (may be bigger than the view window). - d.viewFrom = d.viewTo = doc.first; - d.reportedViewFrom = d.reportedViewTo = doc.first; - // Information about the rendered lines. - d.view = []; - d.renderedView = null; - // Holds info about a single rendered line when it was rendered - // for measurement, while not in view. - d.externalMeasured = null; - // Empty space (in pixels) above the view - d.viewOffset = 0; - d.lastWrapHeight = d.lastWrapWidth = 0; - d.updateLineNumbers = null; - - d.nativeBarWidth = d.barHeight = d.barWidth = 0; - d.scrollbarsClipped = false; - - // Used to only resize the line number gutter when necessary (when - // the amount of lines crosses a boundary that makes its width change) - d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; - // Set to true when a non-horizontal-scrolling line widget is - // added. As an optimization, line widget aligning is skipped when - // this is false. - d.alignWidgets = false; - - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - - // Tracks the maximum line length so that the horizontal scrollbar - // can be kept static when scrolling. - d.maxLine = null; - d.maxLineLength = 0; - d.maxLineChanged = false; - - // Used for measuring wheel scrolling granularity - d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; - - // True when shift is held down. - d.shift = false; - - // Used to track whether anything happened since the context menu - // was opened. - d.selForContextMenu = null; - - d.activeTouch = null; - - input.init(d); - } - - // STATE UPDATES - - // Used to get the editor into a consistent state again when options change. - - function loadMode(cm) { - cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); - resetModeState(cm); - } - - function resetModeState(cm) { - cm.doc.iter(function(line) { - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - }); - cm.doc.frontier = cm.doc.first; - startWorker(cm, 100); - cm.state.modeGen++; - if (cm.curOp) regChange(cm); - } - - function wrappingChanged(cm) { - if (cm.options.lineWrapping) { - addClass(cm.display.wrapper, "CodeMirror-wrap"); - cm.display.sizer.style.minWidth = ""; - cm.display.sizerWidth = null; - } else { - rmClass(cm.display.wrapper, "CodeMirror-wrap"); - findMaxLine(cm); - } - estimateLineHeights(cm); - regChange(cm); - clearCaches(cm); - setTimeout(function(){updateScrollbars(cm);}, 100); - } - - // Returns a function that estimates the height of a line, to use as - // first approximation until the line becomes visible (and is thus - // properly measurable). - function estimateHeight(cm) { - var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; - var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); - return function(line) { - if (lineIsHidden(cm.doc, line)) return 0; - - var widgetsHeight = 0; - if (line.widgets) for (var i = 0; i < line.widgets.length; i++) { - if (line.widgets[i].height) widgetsHeight += line.widgets[i].height; - } - - if (wrapping) - return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; - else - return widgetsHeight + th; - }; - } - - function estimateLineHeights(cm) { - var doc = cm.doc, est = estimateHeight(cm); - doc.iter(function(line) { - var estHeight = est(line); - if (estHeight != line.height) updateLineHeight(line, estHeight); - }); - } - - function themeChanged(cm) { - cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + - cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); - clearCaches(cm); - } - - function guttersChanged(cm) { - updateGutters(cm); - regChange(cm); - setTimeout(function(){alignHorizontally(cm);}, 20); - } - - // Rebuild the gutter elements, ensure the margin to the left of the - // code matches their width. - function updateGutters(cm) { - var gutters = cm.display.gutters, specs = cm.options.gutters; - removeChildren(gutters); - for (var i = 0; i < specs.length; ++i) { - var gutterClass = specs[i]; - var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); - if (gutterClass == "CodeMirror-linenumbers") { - cm.display.lineGutter = gElt; - gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; - } - } - gutters.style.display = i ? "" : "none"; - updateGutterSpace(cm); - } - - function updateGutterSpace(cm) { - var width = cm.display.gutters.offsetWidth; - cm.display.sizer.style.marginLeft = width + "px"; - } - - // Compute the character length of a line, taking into account - // collapsed ranges (see markText) that might hide parts, and join - // other lines onto it. - function lineLength(line) { - if (line.height == 0) return 0; - var len = line.text.length, merged, cur = line; - while (merged = collapsedSpanAtStart(cur)) { - var found = merged.find(0, true); - cur = found.from.line; - len += found.from.ch - found.to.ch; - } - cur = line; - while (merged = collapsedSpanAtEnd(cur)) { - var found = merged.find(0, true); - len -= cur.text.length - found.from.ch; - cur = found.to.line; - len += cur.text.length - found.to.ch; - } - return len; - } - - // Find the longest line in the document. - function findMaxLine(cm) { - var d = cm.display, doc = cm.doc; - d.maxLine = getLine(doc, doc.first); - d.maxLineLength = lineLength(d.maxLine); - d.maxLineChanged = true; - doc.iter(function(line) { - var len = lineLength(line); - if (len > d.maxLineLength) { - d.maxLineLength = len; - d.maxLine = line; - } - }); - } - - // Make sure the gutters options contains the element - // "CodeMirror-linenumbers" when the lineNumbers option is true. - function setGuttersForLineNumbers(options) { - var found = indexOf(options.gutters, "CodeMirror-linenumbers"); - if (found == -1 && options.lineNumbers) { - options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); - } else if (found > -1 && !options.lineNumbers) { - options.gutters = options.gutters.slice(0); - options.gutters.splice(found, 1); - } - } - - // SCROLLBARS - - // Prepare DOM reads needed to update the scrollbars. Done in one - // shot to minimize update/measure roundtrips. - function measureForScrollbars(cm) { - var d = cm.display, gutterW = d.gutters.offsetWidth; - var docH = Math.round(cm.doc.height + paddingVert(cm.display)); - return { - clientHeight: d.scroller.clientHeight, - viewHeight: d.wrapper.clientHeight, - scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, - viewWidth: d.wrapper.clientWidth, - barLeft: cm.options.fixedGutter ? gutterW : 0, - docHeight: docH, - scrollHeight: docH + scrollGap(cm) + d.barHeight, - nativeBarWidth: d.nativeBarWidth, - gutterWidth: gutterW - }; - } - - function NativeScrollbars(place, scroll, cm) { - this.cm = cm; - var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); - var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); - place(vert); place(horiz); - - on(vert, "scroll", function() { - if (vert.clientHeight) scroll(vert.scrollTop, "vertical"); - }); - on(horiz, "scroll", function() { - if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal"); - }); - - this.checkedOverlay = false; - // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). - if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; - } - - NativeScrollbars.prototype = copyObj({ - update: function(measure) { - var needsH = measure.scrollWidth > measure.clientWidth + 1; - var needsV = measure.scrollHeight > measure.clientHeight + 1; - var sWidth = measure.nativeBarWidth; - - if (needsV) { - this.vert.style.display = "block"; - this.vert.style.bottom = needsH ? sWidth + "px" : "0"; - var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); - // A bug in IE8 can cause this value to be negative, so guard it. - this.vert.firstChild.style.height = - Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; - } else { - this.vert.style.display = ""; - this.vert.firstChild.style.height = "0"; - } - - if (needsH) { - this.horiz.style.display = "block"; - this.horiz.style.right = needsV ? sWidth + "px" : "0"; - this.horiz.style.left = measure.barLeft + "px"; - var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); - this.horiz.firstChild.style.width = - (measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; - } else { - this.horiz.style.display = ""; - this.horiz.firstChild.style.width = "0"; - } - - if (!this.checkedOverlay && measure.clientHeight > 0) { - if (sWidth == 0) this.overlayHack(); - this.checkedOverlay = true; - } - - return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}; - }, - setScrollLeft: function(pos) { - if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos; - }, - setScrollTop: function(pos) { - if (this.vert.scrollTop != pos) this.vert.scrollTop = pos; - }, - overlayHack: function() { - var w = mac && !mac_geMountainLion ? "12px" : "18px"; - this.horiz.style.minHeight = this.vert.style.minWidth = w; - var self = this; - var barMouseDown = function(e) { - if (e_target(e) != self.vert && e_target(e) != self.horiz) - operation(self.cm, onMouseDown)(e); - }; - on(this.vert, "mousedown", barMouseDown); - on(this.horiz, "mousedown", barMouseDown); - }, - clear: function() { - var parent = this.horiz.parentNode; - parent.removeChild(this.horiz); - parent.removeChild(this.vert); - } - }, NativeScrollbars.prototype); - - function NullScrollbars() {} - - NullScrollbars.prototype = copyObj({ - update: function() { return {bottom: 0, right: 0}; }, - setScrollLeft: function() {}, - setScrollTop: function() {}, - clear: function() {} - }, NullScrollbars.prototype); - - CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; - - function initScrollbars(cm) { - if (cm.display.scrollbars) { - cm.display.scrollbars.clear(); - if (cm.display.scrollbars.addClass) - rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); - } - - cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) { - cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); - // Prevent clicks in the scrollbars from killing focus - on(node, "mousedown", function() { - if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0); - }); - node.setAttribute("cm-not-content", "true"); - }, function(pos, axis) { - if (axis == "horizontal") setScrollLeft(cm, pos); - else setScrollTop(cm, pos); - }, cm); - if (cm.display.scrollbars.addClass) - addClass(cm.display.wrapper, cm.display.scrollbars.addClass); - } - - function updateScrollbars(cm, measure) { - if (!measure) measure = measureForScrollbars(cm); - var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; - updateScrollbarsInner(cm, measure); - for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { - if (startWidth != cm.display.barWidth && cm.options.lineWrapping) - updateHeightsInViewport(cm); - updateScrollbarsInner(cm, measureForScrollbars(cm)); - startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; - } - } - - // Re-synchronize the fake scrollbars with the actual size of the - // content. - function updateScrollbarsInner(cm, measure) { - var d = cm.display; - var sizes = d.scrollbars.update(measure); - - d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; - d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; - - if (sizes.right && sizes.bottom) { - d.scrollbarFiller.style.display = "block"; - d.scrollbarFiller.style.height = sizes.bottom + "px"; - d.scrollbarFiller.style.width = sizes.right + "px"; - } else d.scrollbarFiller.style.display = ""; - if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { - d.gutterFiller.style.display = "block"; - d.gutterFiller.style.height = sizes.bottom + "px"; - d.gutterFiller.style.width = measure.gutterWidth + "px"; - } else d.gutterFiller.style.display = ""; - } - - // Compute the lines that are visible in a given viewport (defaults - // the the current scroll position). viewport may contain top, - // height, and ensure (see op.scrollToPos) properties. - function visibleLines(display, doc, viewport) { - var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; - top = Math.floor(top - paddingTop(display)); - var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; - - var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); - // Ensure is a {from: {line, ch}, to: {line, ch}} object, and - // forces those lines into the viewport (if possible). - if (viewport && viewport.ensure) { - var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; - if (ensureFrom < from) { - from = ensureFrom; - to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); - } else if (Math.min(ensureTo, doc.lastLine()) >= to) { - from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); - to = ensureTo; - } - } - return {from: from, to: Math.max(to, from + 1)}; - } - - // LINE NUMBERS - - // Re-align line numbers and gutter marks to compensate for - // horizontal scrolling. - function alignHorizontally(cm) { - var display = cm.display, view = display.view; - if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; - var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; - var gutterW = display.gutters.offsetWidth, left = comp + "px"; - for (var i = 0; i < view.length; i++) if (!view[i].hidden) { - if (cm.options.fixedGutter && view[i].gutter) - view[i].gutter.style.left = left; - var align = view[i].alignable; - if (align) for (var j = 0; j < align.length; j++) - align[j].style.left = left; - } - if (cm.options.fixedGutter) - display.gutters.style.left = (comp + gutterW) + "px"; - } - - // Used to ensure that the line number gutter is still the right - // size for the current document size. Returns true when an update - // is needed. - function maybeUpdateLineNumberWidth(cm) { - if (!cm.options.lineNumbers) return false; - var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; - if (last.length != display.lineNumChars) { - var test = display.measure.appendChild(elt("div", [elt("div", last)], - "CodeMirror-linenumber CodeMirror-gutter-elt")); - var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; - display.lineGutter.style.width = ""; - display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; - display.lineNumWidth = display.lineNumInnerWidth + padding; - display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; - display.lineGutter.style.width = display.lineNumWidth + "px"; - updateGutterSpace(cm); - return true; - } - return false; - } - - function lineNumberFor(options, i) { - return String(options.lineNumberFormatter(i + options.firstLineNumber)); - } - - // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, - // but using getBoundingClientRect to get a sub-pixel-accurate - // result. - function compensateForHScroll(display) { - return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; - } - - // DISPLAY DRAWING - - function DisplayUpdate(cm, viewport, force) { - var display = cm.display; - - this.viewport = viewport; - // Store some values that we'll need later (but don't want to force a relayout for) - this.visible = visibleLines(display, cm.doc, viewport); - this.editorIsHidden = !display.wrapper.offsetWidth; - this.wrapperHeight = display.wrapper.clientHeight; - this.wrapperWidth = display.wrapper.clientWidth; - this.oldDisplayWidth = displayWidth(cm); - this.force = force; - this.dims = getDimensions(cm); - this.events = []; - } - - DisplayUpdate.prototype.signal = function(emitter, type) { - if (hasHandler(emitter, type)) - this.events.push(arguments); - }; - DisplayUpdate.prototype.finish = function() { - for (var i = 0; i < this.events.length; i++) - signal.apply(null, this.events[i]); - }; - - function maybeClipScrollbars(cm) { - var display = cm.display; - if (!display.scrollbarsClipped && display.scroller.offsetWidth) { - display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; - display.heightForcer.style.height = scrollGap(cm) + "px"; - display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; - display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; - display.scrollbarsClipped = true; - } - } - - // Does the actual updating of the line display. Bails out - // (returning false) when there is nothing to be done and forced is - // false. - function updateDisplayIfNeeded(cm, update) { - var display = cm.display, doc = cm.doc; - - if (update.editorIsHidden) { - resetView(cm); - return false; - } - - // Bail out if the visible area is already rendered and nothing changed. - if (!update.force && - update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && - display.renderedView == display.view && countDirtyView(cm) == 0) - return false; - - if (maybeUpdateLineNumberWidth(cm)) { - resetView(cm); - update.dims = getDimensions(cm); - } - - // Compute a suitable new viewport (from & to) - var end = doc.first + doc.size; - var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); - var to = Math.min(end, update.visible.to + cm.options.viewportMargin); - if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom); - if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo); - if (sawCollapsedSpans) { - from = visualLineNo(cm.doc, from); - to = visualLineEndNo(cm.doc, to); - } - - var different = from != display.viewFrom || to != display.viewTo || - display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; - adjustView(cm, from, to); - - display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); - // Position the mover div to align with the current scroll position - cm.display.mover.style.top = display.viewOffset + "px"; - - var toUpdate = countDirtyView(cm); - if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) - return false; - - // For big changes, we hide the enclosing element during the - // update, since that speeds up the operations on most browsers. - var focused = activeElt(); - if (toUpdate > 4) display.lineDiv.style.display = "none"; - patchDisplay(cm, display.updateLineNumbers, update.dims); - if (toUpdate > 4) display.lineDiv.style.display = ""; - display.renderedView = display.view; - // There might have been a widget with a focused element that got - // hidden or updated, if so re-focus it. - if (focused && activeElt() != focused && focused.offsetHeight) focused.focus(); - - // Prevent selection and cursors from interfering with the scroll - // width and height. - removeChildren(display.cursorDiv); - removeChildren(display.selectionDiv); - display.gutters.style.height = 0; - - if (different) { - display.lastWrapHeight = update.wrapperHeight; - display.lastWrapWidth = update.wrapperWidth; - startWorker(cm, 400); - } - - display.updateLineNumbers = null; - - return true; - } - - function postUpdateDisplay(cm, update) { - var viewport = update.viewport; - for (var first = true;; first = false) { - if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { - // Clip forced viewport to actual scrollable area. - if (viewport && viewport.top != null) - viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; - // Updated line heights might result in the drawn area not - // actually covering the viewport. Keep looping until it does. - update.visible = visibleLines(cm.display, cm.doc, viewport); - if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) - break; - } - if (!updateDisplayIfNeeded(cm, update)) break; - updateHeightsInViewport(cm); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - setDocumentHeight(cm, barMeasure); - updateScrollbars(cm, barMeasure); - } - - update.signal(cm, "update", cm); - if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { - update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); - cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; - } - } - - function updateDisplaySimple(cm, viewport) { - var update = new DisplayUpdate(cm, viewport); - if (updateDisplayIfNeeded(cm, update)) { - updateHeightsInViewport(cm); - postUpdateDisplay(cm, update); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - setDocumentHeight(cm, barMeasure); - updateScrollbars(cm, barMeasure); - update.finish(); - } - } - - function setDocumentHeight(cm, measure) { - cm.display.sizer.style.minHeight = measure.docHeight + "px"; - var total = measure.docHeight + cm.display.barHeight; - cm.display.heightForcer.style.top = total + "px"; - cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + "px"; - } - - // Read the actual heights of the rendered lines, and update their - // stored heights to match. - function updateHeightsInViewport(cm) { - var display = cm.display; - var prevBottom = display.lineDiv.offsetTop; - for (var i = 0; i < display.view.length; i++) { - var cur = display.view[i], height; - if (cur.hidden) continue; - if (ie && ie_version < 8) { - var bot = cur.node.offsetTop + cur.node.offsetHeight; - height = bot - prevBottom; - prevBottom = bot; - } else { - var box = cur.node.getBoundingClientRect(); - height = box.bottom - box.top; - } - var diff = cur.line.height - height; - if (height < 2) height = textHeight(display); - if (diff > .001 || diff < -.001) { - updateLineHeight(cur.line, height); - updateWidgetHeight(cur.line); - if (cur.rest) for (var j = 0; j < cur.rest.length; j++) - updateWidgetHeight(cur.rest[j]); - } - } - } - - // Read and store the height of line widgets associated with the - // given line. - function updateWidgetHeight(line) { - if (line.widgets) for (var i = 0; i < line.widgets.length; ++i) - line.widgets[i].height = line.widgets[i].node.offsetHeight; - } - - // Do a bulk-read of the DOM positions and sizes needed to draw the - // view, so that we don't interleave reading and writing to the DOM. - function getDimensions(cm) { - var d = cm.display, left = {}, width = {}; - var gutterLeft = d.gutters.clientLeft; - for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { - left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; - width[cm.options.gutters[i]] = n.clientWidth; - } - return {fixedPos: compensateForHScroll(d), - gutterTotalWidth: d.gutters.offsetWidth, - gutterLeft: left, - gutterWidth: width, - wrapperWidth: d.wrapper.clientWidth}; - } - - // Sync the actual display DOM structure with display.view, removing - // nodes for lines that are no longer in view, and creating the ones - // that are not there yet, and updating the ones that are out of - // date. - function patchDisplay(cm, updateNumbersFrom, dims) { - var display = cm.display, lineNumbers = cm.options.lineNumbers; - var container = display.lineDiv, cur = container.firstChild; - - function rm(node) { - var next = node.nextSibling; - // Works around a throw-scroll bug in OS X Webkit - if (webkit && mac && cm.display.currentWheelTarget == node) - node.style.display = "none"; - else - node.parentNode.removeChild(node); - return next; - } - - var view = display.view, lineN = display.viewFrom; - // Loop over the elements in the view, syncing cur (the DOM nodes - // in display.lineDiv) with the view as we go. - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (lineView.hidden) { - } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet - var node = buildLineElement(cm, lineView, lineN, dims); - container.insertBefore(node, cur); - } else { // Already drawn - while (cur != lineView.node) cur = rm(cur); - var updateNumber = lineNumbers && updateNumbersFrom != null && - updateNumbersFrom <= lineN && lineView.lineNumber; - if (lineView.changes) { - if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false; - updateLineForChanges(cm, lineView, lineN, dims); - } - if (updateNumber) { - removeChildren(lineView.lineNumber); - lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); - } - cur = lineView.node.nextSibling; - } - lineN += lineView.size; - } - while (cur) cur = rm(cur); - } - - // When an aspect of a line changes, a string is added to - // lineView.changes. This updates the relevant part of the line's - // DOM structure. - function updateLineForChanges(cm, lineView, lineN, dims) { - for (var j = 0; j < lineView.changes.length; j++) { - var type = lineView.changes[j]; - if (type == "text") updateLineText(cm, lineView); - else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims); - else if (type == "class") updateLineClasses(lineView); - else if (type == "widget") updateLineWidgets(cm, lineView, dims); - } - lineView.changes = null; - } - - // Lines with gutter elements, widgets or a background class need to - // be wrapped, and have the extra elements added to the wrapper div - function ensureLineWrapped(lineView) { - if (lineView.node == lineView.text) { - lineView.node = elt("div", null, null, "position: relative"); - if (lineView.text.parentNode) - lineView.text.parentNode.replaceChild(lineView.node, lineView.text); - lineView.node.appendChild(lineView.text); - if (ie && ie_version < 8) lineView.node.style.zIndex = 2; - } - return lineView.node; - } - - function updateLineBackground(lineView) { - var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; - if (cls) cls += " CodeMirror-linebackground"; - if (lineView.background) { - if (cls) lineView.background.className = cls; - else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } - } else if (cls) { - var wrap = ensureLineWrapped(lineView); - lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); - } - } - - // Wrapper around buildLineContent which will reuse the structure - // in display.externalMeasured when possible. - function getLineContent(cm, lineView) { - var ext = cm.display.externalMeasured; - if (ext && ext.line == lineView.line) { - cm.display.externalMeasured = null; - lineView.measure = ext.measure; - return ext.built; - } - return buildLineContent(cm, lineView); - } - - // Redraw the line's text. Interacts with the background and text - // classes because the mode may output tokens that influence these - // classes. - function updateLineText(cm, lineView) { - var cls = lineView.text.className; - var built = getLineContent(cm, lineView); - if (lineView.text == lineView.node) lineView.node = built.pre; - lineView.text.parentNode.replaceChild(built.pre, lineView.text); - lineView.text = built.pre; - if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { - lineView.bgClass = built.bgClass; - lineView.textClass = built.textClass; - updateLineClasses(lineView); - } else if (cls) { - lineView.text.className = cls; - } - } - - function updateLineClasses(lineView) { - updateLineBackground(lineView); - if (lineView.line.wrapClass) - ensureLineWrapped(lineView).className = lineView.line.wrapClass; - else if (lineView.node != lineView.text) - lineView.node.className = ""; - var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; - lineView.text.className = textClass || ""; - } - - function updateLineGutter(cm, lineView, lineN, dims) { - if (lineView.gutter) { - lineView.node.removeChild(lineView.gutter); - lineView.gutter = null; - } - var markers = lineView.line.gutterMarkers; - if (cm.options.lineNumbers || markers) { - var wrap = ensureLineWrapped(lineView); - var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + - (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + - "px; width: " + dims.gutterTotalWidth + "px"); - cm.display.input.setUneditable(gutterWrap); - wrap.insertBefore(gutterWrap, lineView.text); - if (lineView.line.gutterClass) - gutterWrap.className += " " + lineView.line.gutterClass; - if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) - lineView.lineNumber = gutterWrap.appendChild( - elt("div", lineNumberFor(cm.options, lineN), - "CodeMirror-linenumber CodeMirror-gutter-elt", - "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " - + cm.display.lineNumInnerWidth + "px")); - if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { - var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; - if (found) - gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + - dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); - } - } - } - - function updateLineWidgets(cm, lineView, dims) { - if (lineView.alignable) lineView.alignable = null; - for (var node = lineView.node.firstChild, next; node; node = next) { - var next = node.nextSibling; - if (node.className == "CodeMirror-linewidget") - lineView.node.removeChild(node); - } - insertLineWidgets(cm, lineView, dims); - } - - // Build a line's DOM representation from scratch - function buildLineElement(cm, lineView, lineN, dims) { - var built = getLineContent(cm, lineView); - lineView.text = lineView.node = built.pre; - if (built.bgClass) lineView.bgClass = built.bgClass; - if (built.textClass) lineView.textClass = built.textClass; - - updateLineClasses(lineView); - updateLineGutter(cm, lineView, lineN, dims); - insertLineWidgets(cm, lineView, dims); - return lineView.node; - } - - // A lineView may contain multiple logical lines (when merged by - // collapsed spans). The widgets for all of them need to be drawn. - function insertLineWidgets(cm, lineView, dims) { - insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); - if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) - insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); - } - - function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { - if (!line.widgets) return; - var wrap = ensureLineWrapped(lineView); - for (var i = 0, ws = line.widgets; i < ws.length; ++i) { - var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); - if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true"); - positionLineWidget(widget, node, lineView, dims); - cm.display.input.setUneditable(node); - if (allowAbove && widget.above) - wrap.insertBefore(node, lineView.gutter || lineView.text); - else - wrap.appendChild(node); - signalLater(widget, "redraw"); - } - } - - function positionLineWidget(widget, node, lineView, dims) { - if (widget.noHScroll) { - (lineView.alignable || (lineView.alignable = [])).push(node); - var width = dims.wrapperWidth; - node.style.left = dims.fixedPos + "px"; - if (!widget.coverGutter) { - width -= dims.gutterTotalWidth; - node.style.paddingLeft = dims.gutterTotalWidth + "px"; - } - node.style.width = width + "px"; - } - if (widget.coverGutter) { - node.style.zIndex = 5; - node.style.position = "relative"; - if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; - } - } - - // POSITION OBJECT - - // A Pos instance represents a position within the text. - var Pos = CodeMirror.Pos = function(line, ch) { - if (!(this instanceof Pos)) return new Pos(line, ch); - this.line = line; this.ch = ch; - }; - - // Compare two positions, return 0 if they are the same, a negative - // number when a is less, and a positive number otherwise. - var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; }; - - function copyPos(x) {return Pos(x.line, x.ch);} - function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; } - function minPos(a, b) { return cmp(a, b) < 0 ? a : b; } - - // INPUT HANDLING - - function ensureFocus(cm) { - if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } - } - - function isReadOnly(cm) { - return cm.options.readOnly || cm.doc.cantEdit; - } - - // This will be set to an array of strings when copying, so that, - // when pasting, we know what kind of selections the copied text - // was made out of. - var lastCopied = null; - - function applyTextInput(cm, inserted, deleted, sel, origin) { - var doc = cm.doc; - cm.display.shift = false; - if (!sel) sel = doc.sel; - - var paste = cm.state.pasteIncoming || origin == "paste"; - var textLines = splitLines(inserted), multiPaste = null; - // When pasing N lines into N selections, insert one line per selection - if (paste && sel.ranges.length > 1) { - if (lastCopied && lastCopied.join("\n") == inserted) - multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines); - else if (textLines.length == sel.ranges.length) - multiPaste = map(textLines, function(l) { return [l]; }); - } - - // Normal behavior is to insert the new text into every selection - for (var i = sel.ranges.length - 1; i >= 0; i--) { - var range = sel.ranges[i]; - var from = range.from(), to = range.to(); - if (range.empty()) { - if (deleted && deleted > 0) // Handle deletion - from = Pos(from.line, from.ch - deleted); - else if (cm.state.overwrite && !paste) // Handle overwrite - to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); - } - var updateInput = cm.curOp.updateInput; - var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, - origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}; - makeChange(cm.doc, changeEvent); - signalLater(cm, "inputRead", cm, changeEvent); - } - if (inserted && !paste) - triggerElectric(cm, inserted); - - ensureCursorVisible(cm); - cm.curOp.updateInput = updateInput; - cm.curOp.typing = true; - cm.state.pasteIncoming = cm.state.cutIncoming = false; - } - - function handlePaste(e, cm) { - var pasted = e.clipboardData && e.clipboardData.getData("text/plain"); - if (pasted) { - e.preventDefault(); - runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, "paste"); }); - return true; - } - } - - function triggerElectric(cm, inserted) { - // When an 'electric' character is inserted, immediately trigger a reindent - if (!cm.options.electricChars || !cm.options.smartIndent) return; - var sel = cm.doc.sel; - - for (var i = sel.ranges.length - 1; i >= 0; i--) { - var range = sel.ranges[i]; - if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue; - var mode = cm.getModeAt(range.head); - var indented = false; - if (mode.electricChars) { - for (var j = 0; j < mode.electricChars.length; j++) - if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { - indented = indentLine(cm, range.head.line, "smart"); - break; - } - } else if (mode.electricInput) { - if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) - indented = indentLine(cm, range.head.line, "smart"); - } - if (indented) signalLater(cm, "electricInput", cm, range.head.line); - } - } - - function copyableRanges(cm) { - var text = [], ranges = []; - for (var i = 0; i < cm.doc.sel.ranges.length; i++) { - var line = cm.doc.sel.ranges[i].head.line; - var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; - ranges.push(lineRange); - text.push(cm.getRange(lineRange.anchor, lineRange.head)); - } - return {text: text, ranges: ranges}; - } - - function disableBrowserMagic(field) { - field.setAttribute("autocorrect", "off"); - field.setAttribute("autocapitalize", "off"); - field.setAttribute("spellcheck", "false"); - } - - // TEXTAREA INPUT STYLE - - function TextareaInput(cm) { - this.cm = cm; - // See input.poll and input.reset - this.prevInput = ""; - - // Flag that indicates whether we expect input to appear real soon - // now (after some event like 'keypress' or 'input') and are - // polling intensively. - this.pollingFast = false; - // Self-resetting timeout for the poller - this.polling = new Delayed(); - // Tracks when input.reset has punted to just putting a short - // string into the textarea instead of the full selection. - this.inaccurateSelection = false; - // Used to work around IE issue with selection being forgotten when focus moves away from textarea - this.hasSelection = false; - this.composing = null; - }; - - function hiddenTextarea() { - var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none"); - var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); - // The textarea is kept positioned near the cursor to prevent the - // fact that it'll be scrolled into view on input from scrolling - // our fake cursor out of view. On webkit, when wrap=off, paste is - // very slow. So make the area wide instead. - if (webkit) te.style.width = "1000px"; - else te.setAttribute("wrap", "off"); - // If border: 0; -- iOS fails to open keyboard (issue #1287) - if (ios) te.style.border = "1px solid black"; - disableBrowserMagic(te); - return div; - } - - TextareaInput.prototype = copyObj({ - init: function(display) { - var input = this, cm = this.cm; - - // Wraps and hides input textarea - var div = this.wrapper = hiddenTextarea(); - // The semihidden textarea that is focused when the editor is - // focused, and receives input. - var te = this.textarea = div.firstChild; - display.wrapper.insertBefore(div, display.wrapper.firstChild); - - // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) - if (ios) te.style.width = "0px"; - - on(te, "input", function() { - if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null; - input.poll(); - }); - - on(te, "paste", function(e) { - if (handlePaste(e, cm)) return true; - - cm.state.pasteIncoming = true; - input.fastPoll(); - }); - - function prepareCopyCut(e) { - if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); - if (input.inaccurateSelection) { - input.prevInput = ""; - input.inaccurateSelection = false; - te.value = lastCopied.join("\n"); - selectInput(te); - } - } else if (!cm.options.lineWiseCopyCut) { - return; - } else { - var ranges = copyableRanges(cm); - lastCopied = ranges.text; - if (e.type == "cut") { - cm.setSelections(ranges.ranges, null, sel_dontScroll); - } else { - input.prevInput = ""; - te.value = ranges.text.join("\n"); - selectInput(te); - } - } - if (e.type == "cut") cm.state.cutIncoming = true; - } - on(te, "cut", prepareCopyCut); - on(te, "copy", prepareCopyCut); - - on(display.scroller, "paste", function(e) { - if (eventInWidget(display, e)) return; - cm.state.pasteIncoming = true; - input.focus(); - }); - - // Prevent normal selection in the editor (we handle our own) - on(display.lineSpace, "selectstart", function(e) { - if (!eventInWidget(display, e)) e_preventDefault(e); - }); - - on(te, "compositionstart", function() { - var start = cm.getCursor("from"); - input.composing = { - start: start, - range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) - }; - }); - on(te, "compositionend", function() { - if (input.composing) { - input.poll(); - input.composing.range.clear(); - input.composing = null; - } - }); - }, - - prepareSelection: function() { - // Redraw the selection and/or cursor - var cm = this.cm, display = cm.display, doc = cm.doc; - var result = prepareSelection(cm); - - // Move the hidden textarea near the cursor to prevent scrolling artifacts - if (cm.options.moveInputWithCursor) { - var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); - var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); - result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, - headPos.top + lineOff.top - wrapOff.top)); - result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, - headPos.left + lineOff.left - wrapOff.left)); - } - - return result; - }, - - showSelection: function(drawn) { - var cm = this.cm, display = cm.display; - removeChildrenAndAdd(display.cursorDiv, drawn.cursors); - removeChildrenAndAdd(display.selectionDiv, drawn.selection); - if (drawn.teTop != null) { - this.wrapper.style.top = drawn.teTop + "px"; - this.wrapper.style.left = drawn.teLeft + "px"; - } - }, - - // Reset the input to correspond to the selection (or to be empty, - // when not typing and nothing is selected) - reset: function(typing) { - if (this.contextMenuPending) return; - var minimal, selected, cm = this.cm, doc = cm.doc; - if (cm.somethingSelected()) { - this.prevInput = ""; - var range = doc.sel.primary(); - minimal = hasCopyEvent && - (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); - var content = minimal ? "-" : selected || cm.getSelection(); - this.textarea.value = content; - if (cm.state.focused) selectInput(this.textarea); - if (ie && ie_version >= 9) this.hasSelection = content; - } else if (!typing) { - this.prevInput = this.textarea.value = ""; - if (ie && ie_version >= 9) this.hasSelection = null; - } - this.inaccurateSelection = minimal; - }, - - getField: function() { return this.textarea; }, - - supportsTouch: function() { return false; }, - - focus: function() { - if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { - try { this.textarea.focus(); } - catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM - } - }, - - blur: function() { this.textarea.blur(); }, - - resetPosition: function() { - this.wrapper.style.top = this.wrapper.style.left = 0; - }, - - receivedFocus: function() { this.slowPoll(); }, - - // Poll for input changes, using the normal rate of polling. This - // runs as long as the editor is focused. - slowPoll: function() { - var input = this; - if (input.pollingFast) return; - input.polling.set(this.cm.options.pollInterval, function() { - input.poll(); - if (input.cm.state.focused) input.slowPoll(); - }); - }, - - // When an event has just come in that is likely to add or change - // something in the input textarea, we poll faster, to ensure that - // the change appears on the screen quickly. - fastPoll: function() { - var missed = false, input = this; - input.pollingFast = true; - function p() { - var changed = input.poll(); - if (!changed && !missed) {missed = true; input.polling.set(60, p);} - else {input.pollingFast = false; input.slowPoll();} - } - input.polling.set(20, p); - }, - - // Read input from the textarea, and update the document to match. - // When something is selected, it is present in the textarea, and - // selected (unless it is huge, in which case a placeholder is - // used). When nothing is selected, the cursor sits after previously - // seen text (can be empty), which is stored in prevInput (we must - // not reset the textarea when typing, because that breaks IME). - poll: function() { - var cm = this.cm, input = this.textarea, prevInput = this.prevInput; - // Since this is called a *lot*, try to bail out as cheaply as - // possible when it is clear that nothing happened. hasSelection - // will be the case when there is a lot of text in the textarea, - // in which case reading its value would be expensive. - if (this.contextMenuPending || !cm.state.focused || - (hasSelection(input) && !prevInput) || - isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq) - return false; - - var text = input.value; - // If nothing changed, bail. - if (text == prevInput && !cm.somethingSelected()) return false; - // Work around nonsensical selection resetting in IE9/10, and - // inexplicable appearance of private area unicode characters on - // some key combos in Mac (#2689). - if (ie && ie_version >= 9 && this.hasSelection === text || - mac && /[\uf700-\uf7ff]/.test(text)) { - cm.display.input.reset(); - return false; - } - - if (cm.doc.sel == cm.display.selForContextMenu) { - var first = text.charCodeAt(0); - if (first == 0x200b && !prevInput) prevInput = "\u200b"; - if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); } - } - // Find the part of the input that is actually new - var same = 0, l = Math.min(prevInput.length, text.length); - while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; - - var self = this; - runInOp(cm, function() { - applyTextInput(cm, text.slice(same), prevInput.length - same, - null, self.composing ? "*compose" : null); - - // Don't leave long text in the textarea, since it makes further polling slow - if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = ""; - else self.prevInput = text; - - if (self.composing) { - self.composing.range.clear(); - self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"), - {className: "CodeMirror-composing"}); - } - }); - return true; - }, - - ensurePolled: function() { - if (this.pollingFast && this.poll()) this.pollingFast = false; - }, - - onKeyPress: function() { - if (ie && ie_version >= 9) this.hasSelection = null; - this.fastPoll(); - }, - - onContextMenu: function(e) { - var input = this, cm = input.cm, display = cm.display, te = input.textarea; - var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; - if (!pos || presto) return; // Opera is difficult. - - // Reset the current text selection only if the click is done outside of the selection - // and 'resetSelectionOnContextMenu' option is true. - var reset = cm.options.resetSelectionOnContextMenu; - if (reset && cm.doc.sel.contains(pos) == -1) - operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); - - var oldCSS = te.style.cssText; - input.wrapper.style.position = "absolute"; - te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + - "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " + - (ie ? "rgba(255, 255, 255, .05)" : "transparent") + - "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; - if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712) - display.input.focus(); - if (webkit) window.scrollTo(null, oldScrollY); - display.input.reset(); - // Adds "Select all" to context menu in FF - if (!cm.somethingSelected()) te.value = input.prevInput = " "; - input.contextMenuPending = true; - display.selForContextMenu = cm.doc.sel; - clearTimeout(display.detectingSelectAll); - - // Select-all will be greyed out if there's nothing to select, so - // this adds a zero-width space so that we can later check whether - // it got selected. - function prepareSelectAllHack() { - if (te.selectionStart != null) { - var selected = cm.somethingSelected(); - var extval = "\u200b" + (selected ? te.value : ""); - te.value = "\u21da"; // Used to catch context-menu undo - te.value = extval; - input.prevInput = selected ? "" : "\u200b"; - te.selectionStart = 1; te.selectionEnd = extval.length; - // Re-set this, in case some other handler touched the - // selection in the meantime. - display.selForContextMenu = cm.doc.sel; - } - } - function rehide() { - input.contextMenuPending = false; - input.wrapper.style.position = "relative"; - te.style.cssText = oldCSS; - if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); - - // Try to detect the user choosing select-all - if (te.selectionStart != null) { - if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); - var i = 0, poll = function() { - if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && - te.selectionEnd > 0 && input.prevInput == "\u200b") - operation(cm, commands.selectAll)(cm); - else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); - else display.input.reset(); - }; - display.detectingSelectAll = setTimeout(poll, 200); - } - } - - if (ie && ie_version >= 9) prepareSelectAllHack(); - if (captureRightClick) { - e_stop(e); - var mouseup = function() { - off(window, "mouseup", mouseup); - setTimeout(rehide, 20); - }; - on(window, "mouseup", mouseup); - } else { - setTimeout(rehide, 50); - } - }, - - setUneditable: nothing, - - needsContentAttribute: false - }, TextareaInput.prototype); - - // CONTENTEDITABLE INPUT STYLE - - function ContentEditableInput(cm) { - this.cm = cm; - this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; - this.polling = new Delayed(); - this.gracePeriod = false; - } - - ContentEditableInput.prototype = copyObj({ - init: function(display) { - var input = this, cm = input.cm; - var div = input.div = display.lineDiv; - div.contentEditable = "true"; - disableBrowserMagic(div); - - on(div, "paste", function(e) { handlePaste(e, cm); }) - - on(div, "compositionstart", function(e) { - var data = e.data; - input.composing = {sel: cm.doc.sel, data: data, startData: data}; - if (!data) return; - var prim = cm.doc.sel.primary(); - var line = cm.getLine(prim.head.line); - var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length)); - if (found > -1 && found <= prim.head.ch) - input.composing.sel = simpleSelection(Pos(prim.head.line, found), - Pos(prim.head.line, found + data.length)); - }); - on(div, "compositionupdate", function(e) { - input.composing.data = e.data; - }); - on(div, "compositionend", function(e) { - var ours = input.composing; - if (!ours) return; - if (e.data != ours.startData && !/\u200b/.test(e.data)) - ours.data = e.data; - // Need a small delay to prevent other code (input event, - // selection polling) from doing damage when fired right after - // compositionend. - setTimeout(function() { - if (!ours.handled) - input.applyComposition(ours); - if (input.composing == ours) - input.composing = null; - }, 50); - }); - - on(div, "touchstart", function() { - input.forceCompositionEnd(); - }); - - on(div, "input", function() { - if (input.composing) return; - if (!input.pollContent()) - runInOp(input.cm, function() {regChange(cm);}); - }); - - function onCopyCut(e) { - if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); - if (e.type == "cut") cm.replaceSelection("", null, "cut"); - } else if (!cm.options.lineWiseCopyCut) { - return; - } else { - var ranges = copyableRanges(cm); - lastCopied = ranges.text; - if (e.type == "cut") { - cm.operation(function() { - cm.setSelections(ranges.ranges, 0, sel_dontScroll); - cm.replaceSelection("", null, "cut"); - }); - } - } - // iOS exposes the clipboard API, but seems to discard content inserted into it - if (e.clipboardData && !ios) { - e.preventDefault(); - e.clipboardData.clearData(); - e.clipboardData.setData("text/plain", lastCopied.join("\n")); - } else { - // Old-fashioned briefly-focus-a-textarea hack - var kludge = hiddenTextarea(), te = kludge.firstChild; - cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); - te.value = lastCopied.join("\n"); - var hadFocus = document.activeElement; - selectInput(te); - setTimeout(function() { - cm.display.lineSpace.removeChild(kludge); - hadFocus.focus(); - }, 50); - } - } - on(div, "copy", onCopyCut); - on(div, "cut", onCopyCut); - }, - - prepareSelection: function() { - var result = prepareSelection(this.cm, false); - result.focus = this.cm.state.focused; - return result; - }, - - showSelection: function(info) { - if (!info || !this.cm.display.view.length) return; - if (info.focus) this.showPrimarySelection(); - this.showMultipleSelections(info); - }, - - showPrimarySelection: function() { - var sel = window.getSelection(), prim = this.cm.doc.sel.primary(); - var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset); - var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset); - if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && - cmp(minPos(curAnchor, curFocus), prim.from()) == 0 && - cmp(maxPos(curAnchor, curFocus), prim.to()) == 0) - return; - - var start = posToDOM(this.cm, prim.from()); - var end = posToDOM(this.cm, prim.to()); - if (!start && !end) return; - - var view = this.cm.display.view; - var old = sel.rangeCount && sel.getRangeAt(0); - if (!start) { - start = {node: view[0].measure.map[2], offset: 0}; - } else if (!end) { // FIXME dangerously hacky - var measure = view[view.length - 1].measure; - var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; - end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; - } - - try { var rng = range(start.node, start.offset, end.offset, end.node); } - catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible - if (rng) { - sel.removeAllRanges(); - sel.addRange(rng); - if (old && sel.anchorNode == null) sel.addRange(old); - else if (gecko) this.startGracePeriod(); - } - this.rememberSelection(); - }, - - startGracePeriod: function() { - var input = this; - clearTimeout(this.gracePeriod); - this.gracePeriod = setTimeout(function() { - input.gracePeriod = false; - if (input.selectionChanged()) - input.cm.operation(function() { input.cm.curOp.selectionChanged = true; }); - }, 20); - }, - - showMultipleSelections: function(info) { - removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); - removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); - }, - - rememberSelection: function() { - var sel = window.getSelection(); - this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; - this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; - }, - - selectionInEditor: function() { - var sel = window.getSelection(); - if (!sel.rangeCount) return false; - var node = sel.getRangeAt(0).commonAncestorContainer; - return contains(this.div, node); - }, - - focus: function() { - if (this.cm.options.readOnly != "nocursor") this.div.focus(); - }, - blur: function() { this.div.blur(); }, - getField: function() { return this.div; }, - - supportsTouch: function() { return true; }, - - receivedFocus: function() { - var input = this; - if (this.selectionInEditor()) - this.pollSelection(); - else - runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; }); - - function poll() { - if (input.cm.state.focused) { - input.pollSelection(); - input.polling.set(input.cm.options.pollInterval, poll); - } - } - this.polling.set(this.cm.options.pollInterval, poll); - }, - - selectionChanged: function() { - var sel = window.getSelection(); - return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || - sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset; - }, - - pollSelection: function() { - if (!this.composing && !this.gracePeriod && this.selectionChanged()) { - var sel = window.getSelection(), cm = this.cm; - this.rememberSelection(); - var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); - var head = domToPos(cm, sel.focusNode, sel.focusOffset); - if (anchor && head) runInOp(cm, function() { - setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); - if (anchor.bad || head.bad) cm.curOp.selectionChanged = true; - }); - } - }, - - pollContent: function() { - var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); - var from = sel.from(), to = sel.to(); - if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false; - - var fromIndex; - if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { - var fromLine = lineNo(display.view[0].line); - var fromNode = display.view[0].node; - } else { - var fromLine = lineNo(display.view[fromIndex].line); - var fromNode = display.view[fromIndex - 1].node.nextSibling; - } - var toIndex = findViewIndex(cm, to.line); - if (toIndex == display.view.length - 1) { - var toLine = display.viewTo - 1; - var toNode = display.lineDiv.lastChild; - } else { - var toLine = lineNo(display.view[toIndex + 1].line) - 1; - var toNode = display.view[toIndex + 1].node.previousSibling; - } - - var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); - var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); - while (newText.length > 1 && oldText.length > 1) { - if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } - else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } - else break; - } - - var cutFront = 0, cutEnd = 0; - var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); - while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) - ++cutFront; - var newBot = lst(newText), oldBot = lst(oldText); - var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), - oldBot.length - (oldText.length == 1 ? cutFront : 0)); - while (cutEnd < maxCutEnd && - newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) - ++cutEnd; - - newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd); - newText[0] = newText[0].slice(cutFront); - - var chFrom = Pos(fromLine, cutFront); - var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); - if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { - replaceRange(cm.doc, newText, chFrom, chTo, "+input"); - return true; - } - }, - - ensurePolled: function() { - this.forceCompositionEnd(); - }, - reset: function() { - this.forceCompositionEnd(); - }, - forceCompositionEnd: function() { - if (!this.composing || this.composing.handled) return; - this.applyComposition(this.composing); - this.composing.handled = true; - this.div.blur(); - this.div.focus(); - }, - applyComposition: function(composing) { - if (composing.data && composing.data != composing.startData) - operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel); - }, - - setUneditable: function(node) { - node.setAttribute("contenteditable", "false"); - }, - - onKeyPress: function(e) { - e.preventDefault(); - operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); - }, - - onContextMenu: nothing, - resetPosition: nothing, - - needsContentAttribute: true - }, ContentEditableInput.prototype); - - function posToDOM(cm, pos) { - var view = findViewForLine(cm, pos.line); - if (!view || view.hidden) return null; - var line = getLine(cm.doc, pos.line); - var info = mapFromLineView(view, line, pos.line); - - var order = getOrder(line), side = "left"; - if (order) { - var partPos = getBidiPartAt(order, pos.ch); - side = partPos % 2 ? "right" : "left"; - } - var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); - result.offset = result.collapse == "right" ? result.end : result.start; - return result; - } - - function badPos(pos, bad) { if (bad) pos.bad = true; return pos; } - - function domToPos(cm, node, offset) { - var lineNode; - if (node == cm.display.lineDiv) { - lineNode = cm.display.lineDiv.childNodes[offset]; - if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true); - node = null; offset = 0; - } else { - for (lineNode = node;; lineNode = lineNode.parentNode) { - if (!lineNode || lineNode == cm.display.lineDiv) return null; - if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break; - } - } - for (var i = 0; i < cm.display.view.length; i++) { - var lineView = cm.display.view[i]; - if (lineView.node == lineNode) - return locateNodeInLineView(lineView, node, offset); - } - } - - function locateNodeInLineView(lineView, node, offset) { - var wrapper = lineView.text.firstChild, bad = false; - if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true); - if (node == wrapper) { - bad = true; - node = wrapper.childNodes[offset]; - offset = 0; - if (!node) { - var line = lineView.rest ? lst(lineView.rest) : lineView.line; - return badPos(Pos(lineNo(line), line.text.length), bad); - } - } - - var textNode = node.nodeType == 3 ? node : null, topNode = node; - if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { - textNode = node.firstChild; - if (offset) offset = textNode.nodeValue.length; - } - while (topNode.parentNode != wrapper) topNode = topNode.parentNode; - var measure = lineView.measure, maps = measure.maps; - - function find(textNode, topNode, offset) { - for (var i = -1; i < (maps ? maps.length : 0); i++) { - var map = i < 0 ? measure.map : maps[i]; - for (var j = 0; j < map.length; j += 3) { - var curNode = map[j + 2]; - if (curNode == textNode || curNode == topNode) { - var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); - var ch = map[j] + offset; - if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)]; - return Pos(line, ch); - } - } - } - } - var found = find(textNode, topNode, offset); - if (found) return badPos(found, bad); - - // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems - for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { - found = find(after, after.firstChild, 0); - if (found) - return badPos(Pos(found.line, found.ch - dist), bad); - else - dist += after.textContent.length; - } - for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { - found = find(before, before.firstChild, -1); - if (found) - return badPos(Pos(found.line, found.ch + dist), bad); - else - dist += after.textContent.length; - } - } - - function domTextBetween(cm, from, to, fromLine, toLine) { - var text = "", closing = false; - function recognizeMarker(id) { return function(marker) { return marker.id == id; }; } - function walk(node) { - if (node.nodeType == 1) { - var cmText = node.getAttribute("cm-text"); - if (cmText != null) { - if (cmText == "") cmText = node.textContent.replace(/\u200b/g, ""); - text += cmText; - return; - } - var markerID = node.getAttribute("cm-marker"), range; - if (markerID) { - var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); - if (found.length && (range = found[0].find())) - text += getBetween(cm.doc, range.from, range.to).join("\n"); - return; - } - if (node.getAttribute("contenteditable") == "false") return; - for (var i = 0; i < node.childNodes.length; i++) - walk(node.childNodes[i]); - if (/^(pre|div|p)$/i.test(node.nodeName)) - closing = true; - } else if (node.nodeType == 3) { - var val = node.nodeValue; - if (!val) return; - if (closing) { - text += "\n"; - closing = false; - } - text += val; - } - } - for (;;) { - walk(from); - if (from == to) break; - from = from.nextSibling; - } - return text; - } - - CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; - - // SELECTION / CURSOR - - // Selection objects are immutable. A new one is created every time - // the selection changes. A selection is one or more non-overlapping - // (and non-touching) ranges, sorted, and an integer that indicates - // which one is the primary selection (the one that's scrolled into - // view, that getCursor returns, etc). - function Selection(ranges, primIndex) { - this.ranges = ranges; - this.primIndex = primIndex; - } - - Selection.prototype = { - primary: function() { return this.ranges[this.primIndex]; }, - equals: function(other) { - if (other == this) return true; - if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false; - for (var i = 0; i < this.ranges.length; i++) { - var here = this.ranges[i], there = other.ranges[i]; - if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false; - } - return true; - }, - deepCopy: function() { - for (var out = [], i = 0; i < this.ranges.length; i++) - out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); - return new Selection(out, this.primIndex); - }, - somethingSelected: function() { - for (var i = 0; i < this.ranges.length; i++) - if (!this.ranges[i].empty()) return true; - return false; - }, - contains: function(pos, end) { - if (!end) end = pos; - for (var i = 0; i < this.ranges.length; i++) { - var range = this.ranges[i]; - if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) - return i; - } - return -1; - } - }; - - function Range(anchor, head) { - this.anchor = anchor; this.head = head; - } - - Range.prototype = { - from: function() { return minPos(this.anchor, this.head); }, - to: function() { return maxPos(this.anchor, this.head); }, - empty: function() { - return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; - } - }; - - // Take an unsorted, potentially overlapping set of ranges, and - // build a selection out of it. 'Consumes' ranges array (modifying - // it). - function normalizeSelection(ranges, primIndex) { - var prim = ranges[primIndex]; - ranges.sort(function(a, b) { return cmp(a.from(), b.from()); }); - primIndex = indexOf(ranges, prim); - for (var i = 1; i < ranges.length; i++) { - var cur = ranges[i], prev = ranges[i - 1]; - if (cmp(prev.to(), cur.from()) >= 0) { - var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); - var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; - if (i <= primIndex) --primIndex; - ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); - } - } - return new Selection(ranges, primIndex); - } - - function simpleSelection(anchor, head) { - return new Selection([new Range(anchor, head || anchor)], 0); - } - - // Most of the external API clips given positions to make sure they - // actually exist within the document. - function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} - function clipPos(doc, pos) { - if (pos.line < doc.first) return Pos(doc.first, 0); - var last = doc.first + doc.size - 1; - if (pos.line > last) return Pos(last, getLine(doc, last).text.length); - return clipToLen(pos, getLine(doc, pos.line).text.length); - } - function clipToLen(pos, linelen) { - var ch = pos.ch; - if (ch == null || ch > linelen) return Pos(pos.line, linelen); - else if (ch < 0) return Pos(pos.line, 0); - else return pos; - } - function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} - function clipPosArray(doc, array) { - for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]); - return out; - } - - // SELECTION UPDATES - - // The 'scroll' parameter given to many of these indicated whether - // the new cursor position should be scrolled into view after - // modifying the selection. - - // If shift is held or the extend flag is set, extends a range to - // include a given position (and optionally a second position). - // Otherwise, simply returns the range between the given positions. - // Used for cursor motion and such. - function extendRange(doc, range, head, other) { - if (doc.cm && doc.cm.display.shift || doc.extend) { - var anchor = range.anchor; - if (other) { - var posBefore = cmp(head, anchor) < 0; - if (posBefore != (cmp(other, anchor) < 0)) { - anchor = head; - head = other; - } else if (posBefore != (cmp(head, other) < 0)) { - head = other; - } - } - return new Range(anchor, head); - } else { - return new Range(other || head, head); - } - } - - // Extend the primary selection range, discard the rest. - function extendSelection(doc, head, other, options) { - setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options); - } - - // Extend all selections (pos is an array of selections with length - // equal the number of selections) - function extendSelections(doc, heads, options) { - for (var out = [], i = 0; i < doc.sel.ranges.length; i++) - out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); - var newSel = normalizeSelection(out, doc.sel.primIndex); - setSelection(doc, newSel, options); - } - - // Updates a single range in the selection. - function replaceOneSelection(doc, i, range, options) { - var ranges = doc.sel.ranges.slice(0); - ranges[i] = range; - setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options); - } - - // Reset the selection to a single range. - function setSimpleSelection(doc, anchor, head, options) { - setSelection(doc, simpleSelection(anchor, head), options); - } - - // Give beforeSelectionChange handlers a change to influence a - // selection update. - function filterSelectionChange(doc, sel) { - var obj = { - ranges: sel.ranges, - update: function(ranges) { - this.ranges = []; - for (var i = 0; i < ranges.length; i++) - this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), - clipPos(doc, ranges[i].head)); - } - }; - signal(doc, "beforeSelectionChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); - if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1); - else return sel; - } - - function setSelectionReplaceHistory(doc, sel, options) { - var done = doc.history.done, last = lst(done); - if (last && last.ranges) { - done[done.length - 1] = sel; - setSelectionNoUndo(doc, sel, options); - } else { - setSelection(doc, sel, options); - } - } - - // Set a new selection. - function setSelection(doc, sel, options) { - setSelectionNoUndo(doc, sel, options); - addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); - } - - function setSelectionNoUndo(doc, sel, options) { - if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) - sel = filterSelectionChange(doc, sel); - - var bias = options && options.bias || - (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); - setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); - - if (!(options && options.scroll === false) && doc.cm) - ensureCursorVisible(doc.cm); - } - - function setSelectionInner(doc, sel) { - if (sel.equals(doc.sel)) return; - - doc.sel = sel; - - if (doc.cm) { - doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true; - signalCursorActivity(doc.cm); - } - signalLater(doc, "cursorActivity", doc); - } - - // Verify that the selection does not partially select any atomic - // marked ranges. - function reCheckSelection(doc) { - setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); - } - - // Return a selection that does not partially select any atomic - // ranges. - function skipAtomicInSelection(doc, sel, bias, mayClear) { - var out; - for (var i = 0; i < sel.ranges.length; i++) { - var range = sel.ranges[i]; - var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear); - var newHead = skipAtomic(doc, range.head, bias, mayClear); - if (out || newAnchor != range.anchor || newHead != range.head) { - if (!out) out = sel.ranges.slice(0, i); - out[i] = new Range(newAnchor, newHead); - } - } - return out ? normalizeSelection(out, sel.primIndex) : sel; - } - - // Ensure a given position is not inside an atomic range. - function skipAtomic(doc, pos, bias, mayClear) { - var flipped = false, curPos = pos; - var dir = bias || 1; - doc.cantEdit = false; - search: for (;;) { - var line = getLine(doc, curPos.line); - if (line.markedSpans) { - for (var i = 0; i < line.markedSpans.length; ++i) { - var sp = line.markedSpans[i], m = sp.marker; - if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && - (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { - if (mayClear) { - signal(m, "beforeCursorEnter"); - if (m.explicitlyCleared) { - if (!line.markedSpans) break; - else {--i; continue;} - } - } - if (!m.atomic) continue; - var newPos = m.find(dir < 0 ? -1 : 1); - if (cmp(newPos, curPos) == 0) { - newPos.ch += dir; - if (newPos.ch < 0) { - if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); - else newPos = null; - } else if (newPos.ch > line.text.length) { - if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); - else newPos = null; - } - if (!newPos) { - if (flipped) { - // Driven in a corner -- no valid cursor position found at all - // -- try again *with* clearing, if we didn't already - if (!mayClear) return skipAtomic(doc, pos, bias, true); - // Otherwise, turn off editing until further notice, and return the start of the doc - doc.cantEdit = true; - return Pos(doc.first, 0); - } - flipped = true; newPos = pos; dir = -dir; - } - } - curPos = newPos; - continue search; - } - } - } - return curPos; - } - } - - // SELECTION DRAWING - - function updateSelection(cm) { - cm.display.input.showSelection(cm.display.input.prepareSelection()); - } - - function prepareSelection(cm, primary) { - var doc = cm.doc, result = {}; - var curFragment = result.cursors = document.createDocumentFragment(); - var selFragment = result.selection = document.createDocumentFragment(); - - for (var i = 0; i < doc.sel.ranges.length; i++) { - if (primary === false && i == doc.sel.primIndex) continue; - var range = doc.sel.ranges[i]; - var collapsed = range.empty(); - if (collapsed || cm.options.showCursorWhenSelecting) - drawSelectionCursor(cm, range, curFragment); - if (!collapsed) - drawSelectionRange(cm, range, selFragment); - } - return result; - } - - // Draws a cursor for the given range - function drawSelectionCursor(cm, range, output) { - var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine); - - var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); - cursor.style.left = pos.left + "px"; - cursor.style.top = pos.top + "px"; - cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; - - if (pos.other) { - // Secondary cursor, shown when on a 'jump' in bi-directional text - var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); - otherCursor.style.display = ""; - otherCursor.style.left = pos.other.left + "px"; - otherCursor.style.top = pos.other.top + "px"; - otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; - } - } - - // Draws the given range as a highlighted selection - function drawSelectionRange(cm, range, output) { - var display = cm.display, doc = cm.doc; - var fragment = document.createDocumentFragment(); - var padding = paddingH(cm.display), leftSide = padding.left; - var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; - - function add(left, top, width, bottom) { - if (top < 0) top = 0; - top = Math.round(top); - bottom = Math.round(bottom); - fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + - "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + - "px; height: " + (bottom - top) + "px")); - } - - function drawForLine(line, fromArg, toArg) { - var lineObj = getLine(doc, line); - var lineLen = lineObj.text.length; - var start, end; - function coords(ch, bias) { - return charCoords(cm, Pos(line, ch), "div", lineObj, bias); - } - - iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { - var leftPos = coords(from, "left"), rightPos, left, right; - if (from == to) { - rightPos = leftPos; - left = right = leftPos.left; - } else { - rightPos = coords(to - 1, "right"); - if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } - left = leftPos.left; - right = rightPos.right; - } - if (fromArg == null && from == 0) left = leftSide; - if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part - add(left, leftPos.top, null, leftPos.bottom); - left = leftSide; - if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); - } - if (toArg == null && to == lineLen) right = rightSide; - if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) - start = leftPos; - if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) - end = rightPos; - if (left < leftSide + 1) left = leftSide; - add(left, rightPos.top, right - left, rightPos.bottom); - }); - return {start: start, end: end}; - } - - var sFrom = range.from(), sTo = range.to(); - if (sFrom.line == sTo.line) { - drawForLine(sFrom.line, sFrom.ch, sTo.ch); - } else { - var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); - var singleVLine = visualLine(fromLine) == visualLine(toLine); - var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; - var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; - if (singleVLine) { - if (leftEnd.top < rightStart.top - 2) { - add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); - add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); - } else { - add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); - } - } - if (leftEnd.bottom < rightStart.top) - add(leftSide, leftEnd.bottom, null, rightStart.top); - } - - output.appendChild(fragment); - } - - // Cursor-blinking - function restartBlink(cm) { - if (!cm.state.focused) return; - var display = cm.display; - clearInterval(display.blinker); - var on = true; - display.cursorDiv.style.visibility = ""; - if (cm.options.cursorBlinkRate > 0) - display.blinker = setInterval(function() { - display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; - }, cm.options.cursorBlinkRate); - else if (cm.options.cursorBlinkRate < 0) - display.cursorDiv.style.visibility = "hidden"; - } - - // HIGHLIGHT WORKER - - function startWorker(cm, time) { - if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo) - cm.state.highlight.set(time, bind(highlightWorker, cm)); - } - - function highlightWorker(cm) { - var doc = cm.doc; - if (doc.frontier < doc.first) doc.frontier = doc.first; - if (doc.frontier >= cm.display.viewTo) return; - var end = +new Date + cm.options.workTime; - var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); - var changedLines = []; - - doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) { - if (doc.frontier >= cm.display.viewFrom) { // Visible - var oldStyles = line.styles; - var highlighted = highlightLine(cm, line, state, true); - line.styles = highlighted.styles; - var oldCls = line.styleClasses, newCls = highlighted.classes; - if (newCls) line.styleClasses = newCls; - else if (oldCls) line.styleClasses = null; - var ischange = !oldStyles || oldStyles.length != line.styles.length || - oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); - for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; - if (ischange) changedLines.push(doc.frontier); - line.stateAfter = copyState(doc.mode, state); - } else { - processLine(cm, line.text, state); - line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; - } - ++doc.frontier; - if (+new Date > end) { - startWorker(cm, cm.options.workDelay); - return true; - } - }); - if (changedLines.length) runInOp(cm, function() { - for (var i = 0; i < changedLines.length; i++) - regLineChange(cm, changedLines[i], "text"); - }); - } - - // Finds the line to start with when starting a parse. Tries to - // find a line with a stateAfter, so that it can start with a - // valid state. If that fails, it returns the line with the - // smallest indentation, which tends to need the least context to - // parse correctly. - function findStartLine(cm, n, precise) { - var minindent, minline, doc = cm.doc; - var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); - for (var search = n; search > lim; --search) { - if (search <= doc.first) return doc.first; - var line = getLine(doc, search - 1); - if (line.stateAfter && (!precise || search <= doc.frontier)) return search; - var indented = countColumn(line.text, null, cm.options.tabSize); - if (minline == null || minindent > indented) { - minline = search - 1; - minindent = indented; - } - } - return minline; - } - - function getStateBefore(cm, n, precise) { - var doc = cm.doc, display = cm.display; - if (!doc.mode.startState) return true; - var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; - if (!state) state = startState(doc.mode); - else state = copyState(doc.mode, state); - doc.iter(pos, n, function(line) { - processLine(cm, line.text, state); - var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo; - line.stateAfter = save ? copyState(doc.mode, state) : null; - ++pos; - }); - if (precise) doc.frontier = pos; - return state; - } - - // POSITION MEASUREMENT - - function paddingTop(display) {return display.lineSpace.offsetTop;} - function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} - function paddingH(display) { - if (display.cachedPaddingH) return display.cachedPaddingH; - var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); - var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; - var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; - if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data; - return data; - } - - function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; } - function displayWidth(cm) { - return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; - } - function displayHeight(cm) { - return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; - } - - // Ensure the lineView.wrapping.heights array is populated. This is - // an array of bottom offsets for the lines that make up a drawn - // line. When lineWrapping is on, there might be more than one - // height. - function ensureLineHeights(cm, lineView, rect) { - var wrapping = cm.options.lineWrapping; - var curWidth = wrapping && displayWidth(cm); - if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { - var heights = lineView.measure.heights = []; - if (wrapping) { - lineView.measure.width = curWidth; - var rects = lineView.text.firstChild.getClientRects(); - for (var i = 0; i < rects.length - 1; i++) { - var cur = rects[i], next = rects[i + 1]; - if (Math.abs(cur.bottom - next.bottom) > 2) - heights.push((cur.bottom + next.top) / 2 - rect.top); - } - } - heights.push(rect.bottom - rect.top); - } - } - - // Find a line map (mapping character offsets to text nodes) and a - // measurement cache for the given line number. (A line view might - // contain multiple lines when collapsed ranges are present.) - function mapFromLineView(lineView, line, lineN) { - if (lineView.line == line) - return {map: lineView.measure.map, cache: lineView.measure.cache}; - for (var i = 0; i < lineView.rest.length; i++) - if (lineView.rest[i] == line) - return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]}; - for (var i = 0; i < lineView.rest.length; i++) - if (lineNo(lineView.rest[i]) > lineN) - return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true}; - } - - // Render a line into the hidden node display.externalMeasured. Used - // when measurement is needed for a line that's not in the viewport. - function updateExternalMeasurement(cm, line) { - line = visualLine(line); - var lineN = lineNo(line); - var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); - view.lineN = lineN; - var built = view.built = buildLineContent(cm, view); - view.text = built.pre; - removeChildrenAndAdd(cm.display.lineMeasure, built.pre); - return view; - } - - // Get a {top, bottom, left, right} box (in line-local coordinates) - // for a given character. - function measureChar(cm, line, ch, bias) { - return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); - } - - // Find a line view that corresponds to the given line number. - function findViewForLine(cm, lineN) { - if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) - return cm.display.view[findViewIndex(cm, lineN)]; - var ext = cm.display.externalMeasured; - if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) - return ext; - } - - // Measurement can be split in two steps, the set-up work that - // applies to the whole line, and the measurement of the actual - // character. Functions like coordsChar, that need to do a lot of - // measurements in a row, can thus ensure that the set-up work is - // only done once. - function prepareMeasureForLine(cm, line) { - var lineN = lineNo(line); - var view = findViewForLine(cm, lineN); - if (view && !view.text) - view = null; - else if (view && view.changes) - updateLineForChanges(cm, view, lineN, getDimensions(cm)); - if (!view) - view = updateExternalMeasurement(cm, line); - - var info = mapFromLineView(view, line, lineN); - return { - line: line, view: view, rect: null, - map: info.map, cache: info.cache, before: info.before, - hasHeights: false - }; - } - - // Given a prepared measurement object, measures the position of an - // actual character (or fetches it from the cache). - function measureCharPrepared(cm, prepared, ch, bias, varHeight) { - if (prepared.before) ch = -1; - var key = ch + (bias || ""), found; - if (prepared.cache.hasOwnProperty(key)) { - found = prepared.cache[key]; - } else { - if (!prepared.rect) - prepared.rect = prepared.view.text.getBoundingClientRect(); - if (!prepared.hasHeights) { - ensureLineHeights(cm, prepared.view, prepared.rect); - prepared.hasHeights = true; - } - found = measureCharInner(cm, prepared, ch, bias); - if (!found.bogus) prepared.cache[key] = found; - } - return {left: found.left, right: found.right, - top: varHeight ? found.rtop : found.top, - bottom: varHeight ? found.rbottom : found.bottom}; - } - - var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; - - function nodeAndOffsetInLineMap(map, ch, bias) { - var node, start, end, collapse; - // First, search the line map for the text node corresponding to, - // or closest to, the target character. - for (var i = 0; i < map.length; i += 3) { - var mStart = map[i], mEnd = map[i + 1]; - if (ch < mStart) { - start = 0; end = 1; - collapse = "left"; - } else if (ch < mEnd) { - start = ch - mStart; - end = start + 1; - } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { - end = mEnd - mStart; - start = end - 1; - if (ch >= mEnd) collapse = "right"; - } - if (start != null) { - node = map[i + 2]; - if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) - collapse = bias; - if (bias == "left" && start == 0) - while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { - node = map[(i -= 3) + 2]; - collapse = "left"; - } - if (bias == "right" && start == mEnd - mStart) - while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { - node = map[(i += 3) + 2]; - collapse = "right"; - } - break; - } - } - return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}; - } - - function measureCharInner(cm, prepared, ch, bias) { - var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); - var node = place.node, start = place.start, end = place.end, collapse = place.collapse; - - var rect; - if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. - for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned - while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start; - while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end; - if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { - rect = node.parentNode.getBoundingClientRect(); - } else if (ie && cm.options.lineWrapping) { - var rects = range(node, start, end).getClientRects(); - if (rects.length) - rect = rects[bias == "right" ? rects.length - 1 : 0]; - else - rect = nullRect; - } else { - rect = range(node, start, end).getBoundingClientRect() || nullRect; - } - if (rect.left || rect.right || start == 0) break; - end = start; - start = start - 1; - collapse = "right"; - } - if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect); - } else { // If it is a widget, simply get the box for the whole widget. - if (start > 0) collapse = bias = "right"; - var rects; - if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) - rect = rects[bias == "right" ? rects.length - 1 : 0]; - else - rect = node.getBoundingClientRect(); - } - if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { - var rSpan = node.parentNode.getClientRects()[0]; - if (rSpan) - rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; - else - rect = nullRect; - } - - var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; - var mid = (rtop + rbot) / 2; - var heights = prepared.view.measure.heights; - for (var i = 0; i < heights.length - 1; i++) - if (mid < heights[i]) break; - var top = i ? heights[i - 1] : 0, bot = heights[i]; - var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, - right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, - top: top, bottom: bot}; - if (!rect.left && !rect.right) result.bogus = true; - if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } - - return result; - } - - // Work around problem with bounding client rects on ranges being - // returned incorrectly when zoomed on IE10 and below. - function maybeUpdateRectForZooming(measure, rect) { - if (!window.screen || screen.logicalXDPI == null || - screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) - return rect; - var scaleX = screen.logicalXDPI / screen.deviceXDPI; - var scaleY = screen.logicalYDPI / screen.deviceYDPI; - return {left: rect.left * scaleX, right: rect.right * scaleX, - top: rect.top * scaleY, bottom: rect.bottom * scaleY}; - } - - function clearLineMeasurementCacheFor(lineView) { - if (lineView.measure) { - lineView.measure.cache = {}; - lineView.measure.heights = null; - if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) - lineView.measure.caches[i] = {}; - } - } - - function clearLineMeasurementCache(cm) { - cm.display.externalMeasure = null; - removeChildren(cm.display.lineMeasure); - for (var i = 0; i < cm.display.view.length; i++) - clearLineMeasurementCacheFor(cm.display.view[i]); - } - - function clearCaches(cm) { - clearLineMeasurementCache(cm); - cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; - if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; - cm.display.lineNumChars = null; - } - - function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } - function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } - - // Converts a {top, bottom, left, right} box from line-local - // coordinates into another coordinate system. Context may be one of - // "line", "div" (display.lineDiv), "local"/null (editor), "window", - // or "page". - function intoCoordSystem(cm, lineObj, rect, context) { - if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { - var size = widgetHeight(lineObj.widgets[i]); - rect.top += size; rect.bottom += size; - } - if (context == "line") return rect; - if (!context) context = "local"; - var yOff = heightAtLine(lineObj); - if (context == "local") yOff += paddingTop(cm.display); - else yOff -= cm.display.viewOffset; - if (context == "page" || context == "window") { - var lOff = cm.display.lineSpace.getBoundingClientRect(); - yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); - var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); - rect.left += xOff; rect.right += xOff; - } - rect.top += yOff; rect.bottom += yOff; - return rect; - } - - // Coverts a box from "div" coords to another coordinate system. - // Context may be "window", "page", "div", or "local"/null. - function fromCoordSystem(cm, coords, context) { - if (context == "div") return coords; - var left = coords.left, top = coords.top; - // First move into "page" coordinate system - if (context == "page") { - left -= pageScrollX(); - top -= pageScrollY(); - } else if (context == "local" || !context) { - var localBox = cm.display.sizer.getBoundingClientRect(); - left += localBox.left; - top += localBox.top; - } - - var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); - return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; - } - - function charCoords(cm, pos, context, lineObj, bias) { - if (!lineObj) lineObj = getLine(cm.doc, pos.line); - return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); - } - - // Returns a box for a given cursor position, which may have an - // 'other' property containing the position of the secondary cursor - // on a bidi boundary. - function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { - lineObj = lineObj || getLine(cm.doc, pos.line); - if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj); - function get(ch, right) { - var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); - if (right) m.left = m.right; else m.right = m.left; - return intoCoordSystem(cm, lineObj, m, context); - } - function getBidi(ch, partPos) { - var part = order[partPos], right = part.level % 2; - if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { - part = order[--partPos]; - ch = bidiRight(part) - (part.level % 2 ? 0 : 1); - right = true; - } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { - part = order[++partPos]; - ch = bidiLeft(part) - part.level % 2; - right = false; - } - if (right && ch == part.to && ch > part.from) return get(ch - 1); - return get(ch, right); - } - var order = getOrder(lineObj), ch = pos.ch; - if (!order) return get(ch); - var partPos = getBidiPartAt(order, ch); - var val = getBidi(ch, partPos); - if (bidiOther != null) val.other = getBidi(ch, bidiOther); - return val; - } - - // Used to cheaply estimate the coordinates for a position. Used for - // intermediate scroll updates. - function estimateCoords(cm, pos) { - var left = 0, pos = clipPos(cm.doc, pos); - if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch; - var lineObj = getLine(cm.doc, pos.line); - var top = heightAtLine(lineObj) + paddingTop(cm.display); - return {left: left, right: left, top: top, bottom: top + lineObj.height}; - } - - // Positions returned by coordsChar contain some extra information. - // xRel is the relative x position of the input coordinates compared - // to the found position (so xRel > 0 means the coordinates are to - // the right of the character position, for example). When outside - // is true, that means the coordinates lie outside the line's - // vertical range. - function PosWithInfo(line, ch, outside, xRel) { - var pos = Pos(line, ch); - pos.xRel = xRel; - if (outside) pos.outside = true; - return pos; - } - - // Compute the character position closest to the given coordinates. - // Input must be lineSpace-local ("div" coordinate system). - function coordsChar(cm, x, y) { - var doc = cm.doc; - y += cm.display.viewOffset; - if (y < 0) return PosWithInfo(doc.first, 0, true, -1); - var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; - if (lineN > last) - return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); - if (x < 0) x = 0; - - var lineObj = getLine(doc, lineN); - for (;;) { - var found = coordsCharInner(cm, lineObj, lineN, x, y); - var merged = collapsedSpanAtEnd(lineObj); - var mergedPos = merged && merged.find(0, true); - if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) - lineN = lineNo(lineObj = mergedPos.to.line); - else - return found; - } - } - - function coordsCharInner(cm, lineObj, lineNo, x, y) { - var innerOff = y - heightAtLine(lineObj); - var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; - var preparedMeasure = prepareMeasureForLine(cm, lineObj); - - function getX(ch) { - var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure); - wrongLine = true; - if (innerOff > sp.bottom) return sp.left - adjust; - else if (innerOff < sp.top) return sp.left + adjust; - else wrongLine = false; - return sp.left; - } - - var bidi = getOrder(lineObj), dist = lineObj.text.length; - var from = lineLeft(lineObj), to = lineRight(lineObj); - var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; - - if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); - // Do a binary search between these bounds. - for (;;) { - if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { - var ch = x < fromX || x - fromX <= toX - x ? from : to; - var xDiff = x - (ch == from ? fromX : toX); - while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; - var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, - xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); - return pos; - } - var step = Math.ceil(dist / 2), middle = from + step; - if (bidi) { - middle = from; - for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); - } - var middleX = getX(middle); - if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} - else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} - } - } - - var measureText; - // Compute the default text height. - function textHeight(display) { - if (display.cachedTextHeight != null) return display.cachedTextHeight; - if (measureText == null) { - measureText = elt("pre"); - // Measure a bunch of lines, for browsers that compute - // fractional heights. - for (var i = 0; i < 49; ++i) { - measureText.appendChild(document.createTextNode("x")); - measureText.appendChild(elt("br")); - } - measureText.appendChild(document.createTextNode("x")); - } - removeChildrenAndAdd(display.measure, measureText); - var height = measureText.offsetHeight / 50; - if (height > 3) display.cachedTextHeight = height; - removeChildren(display.measure); - return height || 1; - } - - // Compute the default character width. - function charWidth(display) { - if (display.cachedCharWidth != null) return display.cachedCharWidth; - var anchor = elt("span", "xxxxxxxxxx"); - var pre = elt("pre", [anchor]); - removeChildrenAndAdd(display.measure, pre); - var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; - if (width > 2) display.cachedCharWidth = width; - return width || 10; - } - - // OPERATIONS - - // Operations are used to wrap a series of changes to the editor - // state in such a way that each change won't have to update the - // cursor and display (which would be awkward, slow, and - // error-prone). Instead, display updates are batched and then all - // combined and executed at once. - - var operationGroup = null; - - var nextOpId = 0; - // Start a new operation. - function startOperation(cm) { - cm.curOp = { - cm: cm, - viewChanged: false, // Flag that indicates that lines might need to be redrawn - startHeight: cm.doc.height, // Used to detect need to update scrollbar - forceUpdate: false, // Used to force a redraw - updateInput: null, // Whether to reset the input textarea - typing: false, // Whether this reset should be careful to leave existing text (for compositing) - changeObjs: null, // Accumulated changes, for firing change events - cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on - cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already - selectionChanged: false, // Whether the selection needs to be redrawn - updateMaxLine: false, // Set when the widest line needs to be determined anew - scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet - scrollToPos: null, // Used to scroll to a specific position - focus: false, - id: ++nextOpId // Unique ID - }; - if (operationGroup) { - operationGroup.ops.push(cm.curOp); - } else { - cm.curOp.ownsGroup = operationGroup = { - ops: [cm.curOp], - delayedCallbacks: [] - }; - } - } - - function fireCallbacksForOps(group) { - // Calls delayed callbacks and cursorActivity handlers until no - // new ones appear - var callbacks = group.delayedCallbacks, i = 0; - do { - for (; i < callbacks.length; i++) - callbacks[i](); - for (var j = 0; j < group.ops.length; j++) { - var op = group.ops[j]; - if (op.cursorActivityHandlers) - while (op.cursorActivityCalled < op.cursorActivityHandlers.length) - op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm); - } - } while (i < callbacks.length); - } - - // Finish an operation, updating the display and signalling delayed events - function endOperation(cm) { - var op = cm.curOp, group = op.ownsGroup; - if (!group) return; - - try { fireCallbacksForOps(group); } - finally { - operationGroup = null; - for (var i = 0; i < group.ops.length; i++) - group.ops[i].cm.curOp = null; - endOperations(group); - } - } - - // The DOM updates done when an operation finishes are batched so - // that the minimum number of relayouts are required. - function endOperations(group) { - var ops = group.ops; - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_R1(ops[i]); - for (var i = 0; i < ops.length; i++) // Write DOM (maybe) - endOperation_W1(ops[i]); - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_R2(ops[i]); - for (var i = 0; i < ops.length; i++) // Write DOM (maybe) - endOperation_W2(ops[i]); - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_finish(ops[i]); - } - - function endOperation_R1(op) { - var cm = op.cm, display = cm.display; - maybeClipScrollbars(cm); - if (op.updateMaxLine) findMaxLine(cm); - - op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || - op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || - op.scrollToPos.to.line >= display.viewTo) || - display.maxLineChanged && cm.options.lineWrapping; - op.update = op.mustUpdate && - new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); - } - - function endOperation_W1(op) { - op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); - } - - function endOperation_R2(op) { - var cm = op.cm, display = cm.display; - if (op.updatedDisplay) updateHeightsInViewport(cm); - - op.barMeasure = measureForScrollbars(cm); - - // If the max line changed since it was last measured, measure it, - // and ensure the document's width matches it. - // updateDisplay_W2 will use these properties to do the actual resizing - if (display.maxLineChanged && !cm.options.lineWrapping) { - op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; - cm.display.sizerWidth = op.adjustWidthTo; - op.barMeasure.scrollWidth = - Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); - op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); - } - - if (op.updatedDisplay || op.selectionChanged) - op.preparedSelection = display.input.prepareSelection(); - } - - function endOperation_W2(op) { - var cm = op.cm; - - if (op.adjustWidthTo != null) { - cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; - if (op.maxScrollLeft < cm.doc.scrollLeft) - setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); - cm.display.maxLineChanged = false; - } - - if (op.preparedSelection) - cm.display.input.showSelection(op.preparedSelection); - if (op.updatedDisplay) - setDocumentHeight(cm, op.barMeasure); - if (op.updatedDisplay || op.startHeight != cm.doc.height) - updateScrollbars(cm, op.barMeasure); - - if (op.selectionChanged) restartBlink(cm); - - if (cm.state.focused && op.updateInput) - cm.display.input.reset(op.typing); - if (op.focus && op.focus == activeElt()) ensureFocus(op.cm); - } - - function endOperation_finish(op) { - var cm = op.cm, display = cm.display, doc = cm.doc; - - if (op.updatedDisplay) postUpdateDisplay(cm, op.update); - - // Abort mouse wheel delta measurement, when scrolling explicitly - if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) - display.wheelStartX = display.wheelStartY = null; - - // Propagate the scroll position to the actual DOM scroller - if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { - doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); - display.scrollbars.setScrollTop(doc.scrollTop); - display.scroller.scrollTop = doc.scrollTop; - } - if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { - doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft)); - display.scrollbars.setScrollLeft(doc.scrollLeft); - display.scroller.scrollLeft = doc.scrollLeft; - alignHorizontally(cm); - } - // If we need to scroll a specific position into view, do so. - if (op.scrollToPos) { - var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), - clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); - if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords); - } - - // Fire events for markers that are hidden/unidden by editing or - // undoing - var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; - if (hidden) for (var i = 0; i < hidden.length; ++i) - if (!hidden[i].lines.length) signal(hidden[i], "hide"); - if (unhidden) for (var i = 0; i < unhidden.length; ++i) - if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); - - if (display.wrapper.offsetHeight) - doc.scrollTop = cm.display.scroller.scrollTop; - - // Fire change events, and delayed event handlers - if (op.changeObjs) - signal(cm, "changes", cm, op.changeObjs); - if (op.update) - op.update.finish(); - } - - // Run the given function in an operation - function runInOp(cm, f) { - if (cm.curOp) return f(); - startOperation(cm); - try { return f(); } - finally { endOperation(cm); } - } - // Wraps a function in an operation. Returns the wrapped function. - function operation(cm, f) { - return function() { - if (cm.curOp) return f.apply(cm, arguments); - startOperation(cm); - try { return f.apply(cm, arguments); } - finally { endOperation(cm); } - }; - } - // Used to add methods to editor and doc instances, wrapping them in - // operations. - function methodOp(f) { - return function() { - if (this.curOp) return f.apply(this, arguments); - startOperation(this); - try { return f.apply(this, arguments); } - finally { endOperation(this); } - }; - } - function docMethodOp(f) { - return function() { - var cm = this.cm; - if (!cm || cm.curOp) return f.apply(this, arguments); - startOperation(cm); - try { return f.apply(this, arguments); } - finally { endOperation(cm); } - }; - } - - // VIEW TRACKING - - // These objects are used to represent the visible (currently drawn) - // part of the document. A LineView may correspond to multiple - // logical lines, if those are connected by collapsed ranges. - function LineView(doc, line, lineN) { - // The starting line - this.line = line; - // Continuing lines, if any - this.rest = visualLineContinued(line); - // Number of logical lines in this visual line - this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; - this.node = this.text = null; - this.hidden = lineIsHidden(doc, line); - } - - // Create a range of LineView objects for the given lines. - function buildViewArray(cm, from, to) { - var array = [], nextPos; - for (var pos = from; pos < to; pos = nextPos) { - var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); - nextPos = pos + view.size; - array.push(view); - } - return array; - } - - // Updates the display.view data structure for a given change to the - // document. From and to are in pre-change coordinates. Lendiff is - // the amount of lines added or subtracted by the change. This is - // used for changes that span multiple lines, or change the way - // lines are divided into visual lines. regLineChange (below) - // registers single-line changes. - function regChange(cm, from, to, lendiff) { - if (from == null) from = cm.doc.first; - if (to == null) to = cm.doc.first + cm.doc.size; - if (!lendiff) lendiff = 0; - - var display = cm.display; - if (lendiff && to < display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers > from)) - display.updateLineNumbers = from; - - cm.curOp.viewChanged = true; - - if (from >= display.viewTo) { // Change after - if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) - resetView(cm); - } else if (to <= display.viewFrom) { // Change before - if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { - resetView(cm); - } else { - display.viewFrom += lendiff; - display.viewTo += lendiff; - } - } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap - resetView(cm); - } else if (from <= display.viewFrom) { // Top overlap - var cut = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cut) { - display.view = display.view.slice(cut.index); - display.viewFrom = cut.lineN; - display.viewTo += lendiff; - } else { - resetView(cm); - } - } else if (to >= display.viewTo) { // Bottom overlap - var cut = viewCuttingPoint(cm, from, from, -1); - if (cut) { - display.view = display.view.slice(0, cut.index); - display.viewTo = cut.lineN; - } else { - resetView(cm); - } - } else { // Gap in the middle - var cutTop = viewCuttingPoint(cm, from, from, -1); - var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cutTop && cutBot) { - display.view = display.view.slice(0, cutTop.index) - .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) - .concat(display.view.slice(cutBot.index)); - display.viewTo += lendiff; - } else { - resetView(cm); - } - } - - var ext = display.externalMeasured; - if (ext) { - if (to < ext.lineN) - ext.lineN += lendiff; - else if (from < ext.lineN + ext.size) - display.externalMeasured = null; - } - } - - // Register a change to a single line. Type must be one of "text", - // "gutter", "class", "widget" - function regLineChange(cm, line, type) { - cm.curOp.viewChanged = true; - var display = cm.display, ext = cm.display.externalMeasured; - if (ext && line >= ext.lineN && line < ext.lineN + ext.size) - display.externalMeasured = null; - - if (line < display.viewFrom || line >= display.viewTo) return; - var lineView = display.view[findViewIndex(cm, line)]; - if (lineView.node == null) return; - var arr = lineView.changes || (lineView.changes = []); - if (indexOf(arr, type) == -1) arr.push(type); - } - - // Clear the view. - function resetView(cm) { - cm.display.viewFrom = cm.display.viewTo = cm.doc.first; - cm.display.view = []; - cm.display.viewOffset = 0; - } - - // Find the view element corresponding to a given line. Return null - // when the line isn't visible. - function findViewIndex(cm, n) { - if (n >= cm.display.viewTo) return null; - n -= cm.display.viewFrom; - if (n < 0) return null; - var view = cm.display.view; - for (var i = 0; i < view.length; i++) { - n -= view[i].size; - if (n < 0) return i; - } - } - - function viewCuttingPoint(cm, oldN, newN, dir) { - var index = findViewIndex(cm, oldN), diff, view = cm.display.view; - if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) - return {index: index, lineN: newN}; - for (var i = 0, n = cm.display.viewFrom; i < index; i++) - n += view[i].size; - if (n != oldN) { - if (dir > 0) { - if (index == view.length - 1) return null; - diff = (n + view[index].size) - oldN; - index++; - } else { - diff = n - oldN; - } - oldN += diff; newN += diff; - } - while (visualLineNo(cm.doc, newN) != newN) { - if (index == (dir < 0 ? 0 : view.length - 1)) return null; - newN += dir * view[index - (dir < 0 ? 1 : 0)].size; - index += dir; - } - return {index: index, lineN: newN}; - } - - // Force the view to cover a given range, adding empty view element - // or clipping off existing ones as needed. - function adjustView(cm, from, to) { - var display = cm.display, view = display.view; - if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { - display.view = buildViewArray(cm, from, to); - display.viewFrom = from; - } else { - if (display.viewFrom > from) - display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); - else if (display.viewFrom < from) - display.view = display.view.slice(findViewIndex(cm, from)); - display.viewFrom = from; - if (display.viewTo < to) - display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); - else if (display.viewTo > to) - display.view = display.view.slice(0, findViewIndex(cm, to)); - } - display.viewTo = to; - } - - // Count the number of lines in the view whose DOM representation is - // out of date (or nonexistent). - function countDirtyView(cm) { - var view = cm.display.view, dirty = 0; - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty; - } - return dirty; - } - - // EVENT HANDLERS - - // Attach the necessary event handlers when initializing the editor - function registerEventHandlers(cm) { - var d = cm.display; - on(d.scroller, "mousedown", operation(cm, onMouseDown)); - // Older IE's will not fire a second mousedown for a double click - if (ie && ie_version < 11) - on(d.scroller, "dblclick", operation(cm, function(e) { - if (signalDOMEvent(cm, e)) return; - var pos = posFromMouse(cm, e); - if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; - e_preventDefault(e); - var word = cm.findWordAt(pos); - extendSelection(cm.doc, word.anchor, word.head); - })); - else - on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); - // Some browsers fire contextmenu *after* opening the menu, at - // which point we can't mess with it anymore. Context menu is - // handled in onMouseDown for these browsers. - if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); - - // Used to suppress mouse event handling when a touch happens - var touchFinished, prevTouch = {end: 0}; - function finishTouch() { - if (d.activeTouch) { - touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000); - prevTouch = d.activeTouch; - prevTouch.end = +new Date; - } - }; - function isMouseLikeTouchEvent(e) { - if (e.touches.length != 1) return false; - var touch = e.touches[0]; - return touch.radiusX <= 1 && touch.radiusY <= 1; - } - function farAway(touch, other) { - if (other.left == null) return true; - var dx = other.left - touch.left, dy = other.top - touch.top; - return dx * dx + dy * dy > 20 * 20; - } - on(d.scroller, "touchstart", function(e) { - if (!isMouseLikeTouchEvent(e)) { - clearTimeout(touchFinished); - var now = +new Date; - d.activeTouch = {start: now, moved: false, - prev: now - prevTouch.end <= 300 ? prevTouch : null}; - if (e.touches.length == 1) { - d.activeTouch.left = e.touches[0].pageX; - d.activeTouch.top = e.touches[0].pageY; - } - } - }); - on(d.scroller, "touchmove", function() { - if (d.activeTouch) d.activeTouch.moved = true; - }); - on(d.scroller, "touchend", function(e) { - var touch = d.activeTouch; - if (touch && !eventInWidget(d, e) && touch.left != null && - !touch.moved && new Date - touch.start < 300) { - var pos = cm.coordsChar(d.activeTouch, "page"), range; - if (!touch.prev || farAway(touch, touch.prev)) // Single tap - range = new Range(pos, pos); - else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap - range = cm.findWordAt(pos); - else // Triple tap - range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); - cm.setSelection(range.anchor, range.head); - cm.focus(); - e_preventDefault(e); - } - finishTouch(); - }); - on(d.scroller, "touchcancel", finishTouch); - - // Sync scrolling between fake scrollbars and real scrollable - // area, ensure viewport is updated when scrolling. - on(d.scroller, "scroll", function() { - if (d.scroller.clientHeight) { - setScrollTop(cm, d.scroller.scrollTop); - setScrollLeft(cm, d.scroller.scrollLeft, true); - signal(cm, "scroll", cm); - } - }); - - // Listen to wheel events in order to try and update the viewport on time. - on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); - on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); - - // Prevent wrapper from ever scrolling - on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); - - d.dragFunctions = { - simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);}, - start: function(e){onDragStart(cm, e);}, - drop: operation(cm, onDrop) - }; - - var inp = d.input.getField(); - on(inp, "keyup", function(e) { onKeyUp.call(cm, e); }); - on(inp, "keydown", operation(cm, onKeyDown)); - on(inp, "keypress", operation(cm, onKeyPress)); - on(inp, "focus", bind(onFocus, cm)); - on(inp, "blur", bind(onBlur, cm)); - } - - function dragDropChanged(cm, value, old) { - var wasOn = old && old != CodeMirror.Init; - if (!value != !wasOn) { - var funcs = cm.display.dragFunctions; - var toggle = value ? on : off; - toggle(cm.display.scroller, "dragstart", funcs.start); - toggle(cm.display.scroller, "dragenter", funcs.simple); - toggle(cm.display.scroller, "dragover", funcs.simple); - toggle(cm.display.scroller, "drop", funcs.drop); - } - } - - // Called when the window resizes - function onResize(cm) { - var d = cm.display; - if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth) - return; - // Might be a text scaling operation, clear size caches. - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - d.scrollbarsClipped = false; - cm.setSize(); - } - - // MOUSE EVENTS - - // Return true when the given mouse event happened in a widget - function eventInWidget(display, e) { - for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { - if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || - (n.parentNode == display.sizer && n != display.mover)) - return true; - } - } - - // Given a mouse event, find the corresponding position. If liberal - // is false, it checks whether a gutter or scrollbar was clicked, - // and returns null if it was. forRect is used by rectangular - // selections, and tries to estimate a character position even for - // coordinates beyond the right of the text. - function posFromMouse(cm, e, liberal, forRect) { - var display = cm.display; - if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null; - - var x, y, space = display.lineSpace.getBoundingClientRect(); - // Fails unpredictably on IE[67] when mouse is dragged around quickly. - try { x = e.clientX - space.left; y = e.clientY - space.top; } - catch (e) { return null; } - var coords = coordsChar(cm, x, y), line; - if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { - var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; - coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); - } - return coords; - } - - // A mouse down can be a single click, double click, triple click, - // start of selection drag, start of text drag, new cursor - // (ctrl-click), rectangle drag (alt-drag), or xwin - // middle-click-paste. Or it might be a click on something we should - // not interfere with, such as a scrollbar or widget. - function onMouseDown(e) { - var cm = this, display = cm.display; - if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return; - display.shift = e.shiftKey; - - if (eventInWidget(display, e)) { - if (!webkit) { - // Briefly turn off draggability, to allow widgets to do - // normal dragging things. - display.scroller.draggable = false; - setTimeout(function(){display.scroller.draggable = true;}, 100); - } - return; - } - if (clickInGutter(cm, e)) return; - var start = posFromMouse(cm, e); - window.focus(); - - switch (e_button(e)) { - case 1: - if (start) - leftButtonDown(cm, e, start); - else if (e_target(e) == display.scroller) - e_preventDefault(e); - break; - case 2: - if (webkit) cm.state.lastMiddleDown = +new Date; - if (start) extendSelection(cm.doc, start); - setTimeout(function() {display.input.focus();}, 20); - e_preventDefault(e); - break; - case 3: - if (captureRightClick) onContextMenu(cm, e); - else delayBlurEvent(cm); - break; - } - } - - var lastClick, lastDoubleClick; - function leftButtonDown(cm, e, start) { - if (ie) setTimeout(bind(ensureFocus, cm), 0); - else cm.curOp.focus = activeElt(); - - var now = +new Date, type; - if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) { - type = "triple"; - } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) { - type = "double"; - lastDoubleClick = {time: now, pos: start}; - } else { - type = "single"; - lastClick = {time: now, pos: start}; - } - - var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; - if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && - type == "single" && (contained = sel.contains(start)) > -1 && - (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) && - (cmp(contained.to(), start) > 0 || start.xRel < 0)) - leftButtonStartDrag(cm, e, start, modifier); - else - leftButtonSelect(cm, e, start, type, modifier); - } - - // Start a text drag. When it ends, see if any dragging actually - // happen, and treat as a click if it didn't. - function leftButtonStartDrag(cm, e, start, modifier) { - var display = cm.display, startTime = +new Date; - var dragEnd = operation(cm, function(e2) { - if (webkit) display.scroller.draggable = false; - cm.state.draggingText = false; - off(document, "mouseup", dragEnd); - off(display.scroller, "drop", dragEnd); - if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { - e_preventDefault(e2); - if (!modifier && +new Date - 200 < startTime) - extendSelection(cm.doc, start); - // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) - if (webkit || ie && ie_version == 9) - setTimeout(function() {document.body.focus(); display.input.focus();}, 20); - else - display.input.focus(); - } - }); - // Let the drag handler handle this. - if (webkit) display.scroller.draggable = true; - cm.state.draggingText = dragEnd; - // IE's approach to draggable - if (display.scroller.dragDrop) display.scroller.dragDrop(); - on(document, "mouseup", dragEnd); - on(display.scroller, "drop", dragEnd); - } - - // Normal selection, as opposed to text dragging. - function leftButtonSelect(cm, e, start, type, addNew) { - var display = cm.display, doc = cm.doc; - e_preventDefault(e); - - var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; - if (addNew && !e.shiftKey) { - ourIndex = doc.sel.contains(start); - if (ourIndex > -1) - ourRange = ranges[ourIndex]; - else - ourRange = new Range(start, start); - } else { - ourRange = doc.sel.primary(); - ourIndex = doc.sel.primIndex; - } - - if (e.altKey) { - type = "rect"; - if (!addNew) ourRange = new Range(start, start); - start = posFromMouse(cm, e, true, true); - ourIndex = -1; - } else if (type == "double") { - var word = cm.findWordAt(start); - if (cm.display.shift || doc.extend) - ourRange = extendRange(doc, ourRange, word.anchor, word.head); - else - ourRange = word; - } else if (type == "triple") { - var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0))); - if (cm.display.shift || doc.extend) - ourRange = extendRange(doc, ourRange, line.anchor, line.head); - else - ourRange = line; - } else { - ourRange = extendRange(doc, ourRange, start); - } - - if (!addNew) { - ourIndex = 0; - setSelection(doc, new Selection([ourRange], 0), sel_mouse); - startSel = doc.sel; - } else if (ourIndex == -1) { - ourIndex = ranges.length; - setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex), - {scroll: false, origin: "*mouse"}); - } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) { - setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0)); - startSel = doc.sel; - } else { - replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); - } - - var lastPos = start; - function extendTo(pos) { - if (cmp(lastPos, pos) == 0) return; - lastPos = pos; - - if (type == "rect") { - var ranges = [], tabSize = cm.options.tabSize; - var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); - var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); - var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); - for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); - line <= end; line++) { - var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); - if (left == right) - ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); - else if (text.length > leftPos) - ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); - } - if (!ranges.length) ranges.push(new Range(start, start)); - setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), - {origin: "*mouse", scroll: false}); - cm.scrollIntoView(pos); - } else { - var oldRange = ourRange; - var anchor = oldRange.anchor, head = pos; - if (type != "single") { - if (type == "double") - var range = cm.findWordAt(pos); - else - var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); - if (cmp(range.anchor, anchor) > 0) { - head = range.head; - anchor = minPos(oldRange.from(), range.anchor); - } else { - head = range.anchor; - anchor = maxPos(oldRange.to(), range.head); - } - } - var ranges = startSel.ranges.slice(0); - ranges[ourIndex] = new Range(clipPos(doc, anchor), head); - setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse); - } - } - - var editorSize = display.wrapper.getBoundingClientRect(); - // Used to ensure timeout re-tries don't fire when another extend - // happened in the meantime (clearTimeout isn't reliable -- at - // least on Chrome, the timeouts still happen even when cleared, - // if the clear happens after their scheduled firing time). - var counter = 0; - - function extend(e) { - var curCount = ++counter; - var cur = posFromMouse(cm, e, true, type == "rect"); - if (!cur) return; - if (cmp(cur, lastPos) != 0) { - cm.curOp.focus = activeElt(); - extendTo(cur); - var visible = visibleLines(display, doc); - if (cur.line >= visible.to || cur.line < visible.from) - setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); - } else { - var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; - if (outside) setTimeout(operation(cm, function() { - if (counter != curCount) return; - display.scroller.scrollTop += outside; - extend(e); - }), 50); - } - } - - function done(e) { - counter = Infinity; - e_preventDefault(e); - display.input.focus(); - off(document, "mousemove", move); - off(document, "mouseup", up); - doc.history.lastSelOrigin = null; - } - - var move = operation(cm, function(e) { - if (!e_button(e)) done(e); - else extend(e); - }); - var up = operation(cm, done); - on(document, "mousemove", move); - on(document, "mouseup", up); - } - - // Determines whether an event happened in the gutter, and fires the - // handlers for the corresponding event. - function gutterEvent(cm, e, type, prevent, signalfn) { - try { var mX = e.clientX, mY = e.clientY; } - catch(e) { return false; } - if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false; - if (prevent) e_preventDefault(e); - - var display = cm.display; - var lineBox = display.lineDiv.getBoundingClientRect(); - - if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); - mY -= lineBox.top - display.viewOffset; - - for (var i = 0; i < cm.options.gutters.length; ++i) { - var g = display.gutters.childNodes[i]; - if (g && g.getBoundingClientRect().right >= mX) { - var line = lineAtHeight(cm.doc, mY); - var gutter = cm.options.gutters[i]; - signalfn(cm, type, cm, line, gutter, e); - return e_defaultPrevented(e); - } - } - } - - function clickInGutter(cm, e) { - return gutterEvent(cm, e, "gutterClick", true, signalLater); - } - - // Kludge to work around strange IE behavior where it'll sometimes - // re-fire a series of drag-related events right after the drop (#1551) - var lastDrop = 0; - - function onDrop(e) { - var cm = this; - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) - return; - e_preventDefault(e); - if (ie) lastDrop = +new Date; - var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; - if (!pos || isReadOnly(cm)) return; - // Might be a file drop, in which case we simply extract the text - // and insert it. - if (files && files.length && window.FileReader && window.File) { - var n = files.length, text = Array(n), read = 0; - var loadFile = function(file, i) { - var reader = new FileReader; - reader.onload = operation(cm, function() { - text[i] = reader.result; - if (++read == n) { - pos = clipPos(cm.doc, pos); - var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}; - makeChange(cm.doc, change); - setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); - } - }); - reader.readAsText(file); - }; - for (var i = 0; i < n; ++i) loadFile(files[i], i); - } else { // Normal drop - // Don't do a replace if the drop happened inside of the selected text. - if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { - cm.state.draggingText(e); - // Ensure the editor is re-focused - setTimeout(function() {cm.display.input.focus();}, 20); - return; - } - try { - var text = e.dataTransfer.getData("Text"); - if (text) { - if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) - var selected = cm.listSelections(); - setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); - if (selected) for (var i = 0; i < selected.length; ++i) - replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); - cm.replaceSelection(text, "around", "paste"); - cm.display.input.focus(); - } - } - catch(e){} - } - } - - function onDragStart(cm, e) { - if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; - - e.dataTransfer.setData("Text", cm.getSelection()); - - // Use dummy image instead of default browsers image. - // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. - if (e.dataTransfer.setDragImage && !safari) { - var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); - img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (presto) { - img.width = img.height = 1; - cm.display.wrapper.appendChild(img); - // Force a relayout, or Opera won't use our image for some obscure reason - img._top = img.offsetTop; - } - e.dataTransfer.setDragImage(img, 0, 0); - if (presto) img.parentNode.removeChild(img); - } - } - - // SCROLL EVENTS - - // Sync the scrollable area and scrollbars, ensure the viewport - // covers the visible area. - function setScrollTop(cm, val) { - if (Math.abs(cm.doc.scrollTop - val) < 2) return; - cm.doc.scrollTop = val; - if (!gecko) updateDisplaySimple(cm, {top: val}); - if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; - cm.display.scrollbars.setScrollTop(val); - if (gecko) updateDisplaySimple(cm); - startWorker(cm, 100); - } - // Sync scroller and scrollbar, ensure the gutter elements are - // aligned. - function setScrollLeft(cm, val, isScroller) { - if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; - val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); - cm.doc.scrollLeft = val; - alignHorizontally(cm); - if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; - cm.display.scrollbars.setScrollLeft(val); - } - - // Since the delta values reported on mouse wheel events are - // unstandardized between browsers and even browser versions, and - // generally horribly unpredictable, this code starts by measuring - // the scroll effect that the first few mouse wheel events have, - // and, from that, detects the way it can convert deltas to pixel - // offsets afterwards. - // - // The reason we want to know the amount a wheel event will scroll - // is that it gives us a chance to update the display before the - // actual scrolling happens, reducing flickering. - - var wheelSamples = 0, wheelPixelsPerUnit = null; - // Fill in a browser-detected starting value on browsers where we - // know one. These don't have to be accurate -- the result of them - // being wrong would just be a slight flicker on the first wheel - // scroll (if it is large enough). - if (ie) wheelPixelsPerUnit = -.53; - else if (gecko) wheelPixelsPerUnit = 15; - else if (chrome) wheelPixelsPerUnit = -.7; - else if (safari) wheelPixelsPerUnit = -1/3; - - var wheelEventDelta = function(e) { - var dx = e.wheelDeltaX, dy = e.wheelDeltaY; - if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; - if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; - else if (dy == null) dy = e.wheelDelta; - return {x: dx, y: dy}; - }; - CodeMirror.wheelEventPixels = function(e) { - var delta = wheelEventDelta(e); - delta.x *= wheelPixelsPerUnit; - delta.y *= wheelPixelsPerUnit; - return delta; - }; - - function onScrollWheel(cm, e) { - var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; - - var display = cm.display, scroll = display.scroller; - // Quit if there's nothing to scroll here - if (!(dx && scroll.scrollWidth > scroll.clientWidth || - dy && scroll.scrollHeight > scroll.clientHeight)) return; - - // Webkit browsers on OS X abort momentum scrolls when the target - // of the scroll event is removed from the scrollable element. - // This hack (see related code in patchDisplay) makes sure the - // element is kept around. - if (dy && mac && webkit) { - outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { - for (var i = 0; i < view.length; i++) { - if (view[i].node == cur) { - cm.display.currentWheelTarget = cur; - break outer; - } - } - } - } - - // On some browsers, horizontal scrolling will cause redraws to - // happen before the gutter has been realigned, causing it to - // wriggle around in a most unseemly way. When we have an - // estimated pixels/delta value, we just handle horizontal - // scrolling entirely here. It'll be slightly off from native, but - // better than glitching out. - if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { - if (dy) - setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); - setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); - e_preventDefault(e); - display.wheelStartX = null; // Abort measurement, if in progress - return; - } - - // 'Project' the visible viewport to cover the area that is being - // scrolled into view (if we know enough to estimate it). - if (dy && wheelPixelsPerUnit != null) { - var pixels = dy * wheelPixelsPerUnit; - var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; - if (pixels < 0) top = Math.max(0, top + pixels - 50); - else bot = Math.min(cm.doc.height, bot + pixels + 50); - updateDisplaySimple(cm, {top: top, bottom: bot}); - } - - if (wheelSamples < 20) { - if (display.wheelStartX == null) { - display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; - display.wheelDX = dx; display.wheelDY = dy; - setTimeout(function() { - if (display.wheelStartX == null) return; - var movedX = scroll.scrollLeft - display.wheelStartX; - var movedY = scroll.scrollTop - display.wheelStartY; - var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || - (movedX && display.wheelDX && movedX / display.wheelDX); - display.wheelStartX = display.wheelStartY = null; - if (!sample) return; - wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); - ++wheelSamples; - }, 200); - } else { - display.wheelDX += dx; display.wheelDY += dy; - } - } - } - - // KEY EVENTS - - // Run a handler that was bound to a key. - function doHandleBinding(cm, bound, dropShift) { - if (typeof bound == "string") { - bound = commands[bound]; - if (!bound) return false; - } - // Ensure previous input has been read, so that the handler sees a - // consistent view of the document - cm.display.input.ensurePolled(); - var prevShift = cm.display.shift, done = false; - try { - if (isReadOnly(cm)) cm.state.suppressEdits = true; - if (dropShift) cm.display.shift = false; - done = bound(cm) != Pass; - } finally { - cm.display.shift = prevShift; - cm.state.suppressEdits = false; - } - return done; - } - - function lookupKeyForEditor(cm, name, handle) { - for (var i = 0; i < cm.state.keyMaps.length; i++) { - var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); - if (result) return result; - } - return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) - || lookupKey(name, cm.options.keyMap, handle, cm); - } - - var stopSeq = new Delayed; - function dispatchKey(cm, name, e, handle) { - var seq = cm.state.keySeq; - if (seq) { - if (isModifierKey(name)) return "handled"; - stopSeq.set(50, function() { - if (cm.state.keySeq == seq) { - cm.state.keySeq = null; - cm.display.input.reset(); - } - }); - name = seq + " " + name; - } - var result = lookupKeyForEditor(cm, name, handle); - - if (result == "multi") - cm.state.keySeq = name; - if (result == "handled") - signalLater(cm, "keyHandled", cm, name, e); - - if (result == "handled" || result == "multi") { - e_preventDefault(e); - restartBlink(cm); - } - - if (seq && !result && /\'$/.test(name)) { - e_preventDefault(e); - return true; - } - return !!result; - } - - // Handle a key from the keydown event. - function handleKeyBinding(cm, e) { - var name = keyName(e, true); - if (!name) return false; - - if (e.shiftKey && !cm.state.keySeq) { - // First try to resolve full name (including 'Shift-'). Failing - // that, see if there is a cursor-motion command (starting with - // 'go') bound to the keyname without 'Shift-'. - return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);}) - || dispatchKey(cm, name, e, function(b) { - if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) - return doHandleBinding(cm, b); - }); - } else { - return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); }); - } - } - - // Handle a key from the keypress event - function handleCharBinding(cm, e, ch) { - return dispatchKey(cm, "'" + ch + "'", e, - function(b) { return doHandleBinding(cm, b, true); }); - } - - var lastStoppedKey = null; - function onKeyDown(e) { - var cm = this; - cm.curOp.focus = activeElt(); - if (signalDOMEvent(cm, e)) return; - // IE does strange things with escape. - if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; - var code = e.keyCode; - cm.display.shift = code == 16 || e.shiftKey; - var handled = handleKeyBinding(cm, e); - if (presto) { - lastStoppedKey = handled ? code : null; - // Opera has no cut event... we try to at least catch the key combo - if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) - cm.replaceSelection("", null, "cut"); - } - - // Turn mouse into crosshair when Alt is held on Mac. - if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) - showCrossHair(cm); - } - - function showCrossHair(cm) { - var lineDiv = cm.display.lineDiv; - addClass(lineDiv, "CodeMirror-crosshair"); - - function up(e) { - if (e.keyCode == 18 || !e.altKey) { - rmClass(lineDiv, "CodeMirror-crosshair"); - off(document, "keyup", up); - off(document, "mouseover", up); - } - } - on(document, "keyup", up); - on(document, "mouseover", up); - } - - function onKeyUp(e) { - if (e.keyCode == 16) this.doc.sel.shift = false; - signalDOMEvent(this, e); - } - - function onKeyPress(e) { - var cm = this; - if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return; - var keyCode = e.keyCode, charCode = e.charCode; - if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} - if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return; - var ch = String.fromCharCode(charCode == null ? keyCode : charCode); - if (handleCharBinding(cm, e, ch)) return; - cm.display.input.onKeyPress(e); - } - - // FOCUS/BLUR EVENTS - - function delayBlurEvent(cm) { - cm.state.delayingBlurEvent = true; - setTimeout(function() { - if (cm.state.delayingBlurEvent) { - cm.state.delayingBlurEvent = false; - onBlur(cm); - } - }, 100); - } - - function onFocus(cm) { - if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false; - - if (cm.options.readOnly == "nocursor") return; - if (!cm.state.focused) { - signal(cm, "focus", cm); - cm.state.focused = true; - addClass(cm.display.wrapper, "CodeMirror-focused"); - // This test prevents this from firing when a context - // menu is closed (since the input reset would kill the - // select-all detection hack) - if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { - cm.display.input.reset(); - if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730 - } - cm.display.input.receivedFocus(); - } - restartBlink(cm); - } - function onBlur(cm) { - if (cm.state.delayingBlurEvent) return; - - if (cm.state.focused) { - signal(cm, "blur", cm); - cm.state.focused = false; - rmClass(cm.display.wrapper, "CodeMirror-focused"); - } - clearInterval(cm.display.blinker); - setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150); - } - - // CONTEXT MENU HANDLING - - // To make the context menu work, we need to briefly unhide the - // textarea (making it as unobtrusive as possible) to let the - // right-click take effect on it. - function onContextMenu(cm, e) { - if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return; - cm.display.input.onContextMenu(e); - } - - function contextMenuInGutter(cm, e) { - if (!hasHandler(cm, "gutterContextMenu")) return false; - return gutterEvent(cm, e, "gutterContextMenu", false, signal); - } - - // UPDATING - - // Compute the position of the end of a change (its 'to' property - // refers to the pre-change end). - var changeEnd = CodeMirror.changeEnd = function(change) { - if (!change.text) return change.to; - return Pos(change.from.line + change.text.length - 1, - lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); - }; - - // Adjust a position to refer to the post-change position of the - // same text, or the end of the change if the change covers it. - function adjustForChange(pos, change) { - if (cmp(pos, change.from) < 0) return pos; - if (cmp(pos, change.to) <= 0) return changeEnd(change); - - var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; - if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; - return Pos(line, ch); - } - - function computeSelAfterChange(doc, change) { - var out = []; - for (var i = 0; i < doc.sel.ranges.length; i++) { - var range = doc.sel.ranges[i]; - out.push(new Range(adjustForChange(range.anchor, change), - adjustForChange(range.head, change))); - } - return normalizeSelection(out, doc.sel.primIndex); - } - - function offsetPos(pos, old, nw) { - if (pos.line == old.line) - return Pos(nw.line, pos.ch - old.ch + nw.ch); - else - return Pos(nw.line + (pos.line - old.line), pos.ch); - } - - // Used by replaceSelections to allow moving the selection to the - // start or around the replaced test. Hint may be "start" or "around". - function computeReplacedSel(doc, changes, hint) { - var out = []; - var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - var from = offsetPos(change.from, oldPrev, newPrev); - var to = offsetPos(changeEnd(change), oldPrev, newPrev); - oldPrev = change.to; - newPrev = to; - if (hint == "around") { - var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; - out[i] = new Range(inv ? to : from, inv ? from : to); - } else { - out[i] = new Range(from, from); - } - } - return new Selection(out, doc.sel.primIndex); - } - - // Allow "beforeChange" event handlers to influence a change - function filterChange(doc, change, update) { - var obj = { - canceled: false, - from: change.from, - to: change.to, - text: change.text, - origin: change.origin, - cancel: function() { this.canceled = true; } - }; - if (update) obj.update = function(from, to, text, origin) { - if (from) this.from = clipPos(doc, from); - if (to) this.to = clipPos(doc, to); - if (text) this.text = text; - if (origin !== undefined) this.origin = origin; - }; - signal(doc, "beforeChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); - - if (obj.canceled) return null; - return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; - } - - // Apply a change to a document, and add it to the document's - // history, and propagating it to all linked documents. - function makeChange(doc, change, ignoreReadOnly) { - if (doc.cm) { - if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly); - if (doc.cm.state.suppressEdits) return; - } - - if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { - change = filterChange(doc, change, true); - if (!change) return; - } - - // Possibly split or suppress the update based on the presence - // of read-only spans in its range. - var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); - if (split) { - for (var i = split.length - 1; i >= 0; --i) - makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); - } else { - makeChangeInner(doc, change); - } - } - - function makeChangeInner(doc, change) { - if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return; - var selAfter = computeSelAfterChange(doc, change); - addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); - - makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); - var rebased = []; - - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); - }); - } - - // Revert a change stored in a document's history. - function makeChangeFromHistory(doc, type, allowSelectionOnly) { - if (doc.cm && doc.cm.state.suppressEdits) return; - - var hist = doc.history, event, selAfter = doc.sel; - var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; - - // Verify that there is a useable event (so that ctrl-z won't - // needlessly clear selection events) - for (var i = 0; i < source.length; i++) { - event = source[i]; - if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) - break; - } - if (i == source.length) return; - hist.lastOrigin = hist.lastSelOrigin = null; - - for (;;) { - event = source.pop(); - if (event.ranges) { - pushSelectionToHistory(event, dest); - if (allowSelectionOnly && !event.equals(doc.sel)) { - setSelection(doc, event, {clearRedo: false}); - return; - } - selAfter = event; - } - else break; - } - - // Build up a reverse change object to add to the opposite history - // stack (redo when undoing, and vice versa). - var antiChanges = []; - pushSelectionToHistory(selAfter, dest); - dest.push({changes: antiChanges, generation: hist.generation}); - hist.generation = event.generation || ++hist.maxGeneration; - - var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); - - for (var i = event.changes.length - 1; i >= 0; --i) { - var change = event.changes[i]; - change.origin = type; - if (filter && !filterChange(doc, change, false)) { - source.length = 0; - return; - } - - antiChanges.push(historyChangeFromChange(doc, change)); - - var after = i ? computeSelAfterChange(doc, change) : lst(source); - makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); - if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); - var rebased = []; - - // Propagate to the linked documents - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); - }); - } - } - - // Sub-views need their line numbers shifted when text is added - // above or below them in the parent document. - function shiftDoc(doc, distance) { - if (distance == 0) return; - doc.first += distance; - doc.sel = new Selection(map(doc.sel.ranges, function(range) { - return new Range(Pos(range.anchor.line + distance, range.anchor.ch), - Pos(range.head.line + distance, range.head.ch)); - }), doc.sel.primIndex); - if (doc.cm) { - regChange(doc.cm, doc.first, doc.first - distance, distance); - for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) - regLineChange(doc.cm, l, "gutter"); - } - } - - // More lower-level change function, handling only a single document - // (not linked ones). - function makeChangeSingleDoc(doc, change, selAfter, spans) { - if (doc.cm && !doc.cm.curOp) - return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); - - if (change.to.line < doc.first) { - shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); - return; - } - if (change.from.line > doc.lastLine()) return; - - // Clip the change to the size of this doc - if (change.from.line < doc.first) { - var shift = change.text.length - 1 - (doc.first - change.from.line); - shiftDoc(doc, shift); - change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), - text: [lst(change.text)], origin: change.origin}; - } - var last = doc.lastLine(); - if (change.to.line > last) { - change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), - text: [change.text[0]], origin: change.origin}; - } - - change.removed = getBetween(doc, change.from, change.to); - - if (!selAfter) selAfter = computeSelAfterChange(doc, change); - if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans); - else updateDoc(doc, change, spans); - setSelectionNoUndo(doc, selAfter, sel_dontScroll); - } - - // Handle the interaction of a change to a document with the editor - // that this document is part of. - function makeChangeSingleDocInEditor(cm, change, spans) { - var doc = cm.doc, display = cm.display, from = change.from, to = change.to; - - var recomputeMaxLength = false, checkWidthStart = from.line; - if (!cm.options.lineWrapping) { - checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); - doc.iter(checkWidthStart, to.line + 1, function(line) { - if (line == display.maxLine) { - recomputeMaxLength = true; - return true; - } - }); - } - - if (doc.sel.contains(change.from, change.to) > -1) - signalCursorActivity(cm); - - updateDoc(doc, change, spans, estimateHeight(cm)); - - if (!cm.options.lineWrapping) { - doc.iter(checkWidthStart, from.line + change.text.length, function(line) { - var len = lineLength(line); - if (len > display.maxLineLength) { - display.maxLine = line; - display.maxLineLength = len; - display.maxLineChanged = true; - recomputeMaxLength = false; - } - }); - if (recomputeMaxLength) cm.curOp.updateMaxLine = true; - } - - // Adjust frontier, schedule worker - doc.frontier = Math.min(doc.frontier, from.line); - startWorker(cm, 400); - - var lendiff = change.text.length - (to.line - from.line) - 1; - // Remember that these lines changed, for updating the display - if (change.full) - regChange(cm); - else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) - regLineChange(cm, from.line, "text"); - else - regChange(cm, from.line, to.line + 1, lendiff); - - var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); - if (changeHandler || changesHandler) { - var obj = { - from: from, to: to, - text: change.text, - removed: change.removed, - origin: change.origin - }; - if (changeHandler) signalLater(cm, "change", cm, obj); - if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); - } - cm.display.selForContextMenu = null; - } - - function replaceRange(doc, code, from, to, origin) { - if (!to) to = from; - if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; } - if (typeof code == "string") code = splitLines(code); - makeChange(doc, {from: from, to: to, text: code, origin: origin}); - } - - // SCROLLING THINGS INTO VIEW - - // If an editor sits on the top or bottom of the window, partially - // scrolled out of view, this ensures that the cursor is visible. - function maybeScrollWindow(cm, coords) { - if (signalDOMEvent(cm, "scrollCursorIntoView")) return; - - var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; - if (coords.top + box.top < 0) doScroll = true; - else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; - if (doScroll != null && !phantom) { - var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " + - (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " + - (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " + - coords.left + "px; width: 2px;"); - cm.display.lineSpace.appendChild(scrollNode); - scrollNode.scrollIntoView(doScroll); - cm.display.lineSpace.removeChild(scrollNode); - } - } - - // Scroll a given position into view (immediately), verifying that - // it actually became visible (as line heights are accurately - // measured, the position of something may 'drift' during drawing). - function scrollPosIntoView(cm, pos, end, margin) { - if (margin == null) margin = 0; - for (var limit = 0; limit < 5; limit++) { - var changed = false, coords = cursorCoords(cm, pos); - var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); - var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), - Math.min(coords.top, endCoords.top) - margin, - Math.max(coords.left, endCoords.left), - Math.max(coords.bottom, endCoords.bottom) + margin); - var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; - if (scrollPos.scrollTop != null) { - setScrollTop(cm, scrollPos.scrollTop); - if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; - } - if (scrollPos.scrollLeft != null) { - setScrollLeft(cm, scrollPos.scrollLeft); - if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; - } - if (!changed) break; - } - return coords; - } - - // Scroll a given set of coordinates into view (immediately). - function scrollIntoView(cm, x1, y1, x2, y2) { - var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); - if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); - if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); - } - - // Calculate a new scroll position needed to scroll the given - // rectangle into view. Returns an object with scrollTop and - // scrollLeft properties. When these are undefined, the - // vertical/horizontal position does not need to be adjusted. - function calculateScrollPos(cm, x1, y1, x2, y2) { - var display = cm.display, snapMargin = textHeight(cm.display); - if (y1 < 0) y1 = 0; - var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; - var screen = displayHeight(cm), result = {}; - if (y2 - y1 > screen) y2 = y1 + screen; - var docBottom = cm.doc.height + paddingVert(display); - var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; - if (y1 < screentop) { - result.scrollTop = atTop ? 0 : y1; - } else if (y2 > screentop + screen) { - var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); - if (newTop != screentop) result.scrollTop = newTop; - } - - var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; - var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); - var tooWide = x2 - x1 > screenw; - if (tooWide) x2 = x1 + screenw; - if (x1 < 10) - result.scrollLeft = 0; - else if (x1 < screenleft) - result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)); - else if (x2 > screenw + screenleft - 3) - result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw; - return result; - } - - // Store a relative adjustment to the scroll position in the current - // operation (to be applied when the operation finishes). - function addToScrollPos(cm, left, top) { - if (left != null || top != null) resolveScrollToPos(cm); - if (left != null) - cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; - if (top != null) - cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; - } - - // Make sure that at the end of the operation the current cursor is - // shown. - function ensureCursorVisible(cm) { - resolveScrollToPos(cm); - var cur = cm.getCursor(), from = cur, to = cur; - if (!cm.options.lineWrapping) { - from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; - to = Pos(cur.line, cur.ch + 1); - } - cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; - } - - // When an operation has its scrollToPos property set, and another - // scroll action is applied before the end of the operation, this - // 'simulates' scrolling that position into view in a cheap way, so - // that the effect of intermediate scroll commands is not ignored. - function resolveScrollToPos(cm) { - var range = cm.curOp.scrollToPos; - if (range) { - cm.curOp.scrollToPos = null; - var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); - var sPos = calculateScrollPos(cm, Math.min(from.left, to.left), - Math.min(from.top, to.top) - range.margin, - Math.max(from.right, to.right), - Math.max(from.bottom, to.bottom) + range.margin); - cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); - } - } - - // API UTILITIES - - // Indent the given line. The how parameter can be "smart", - // "add"/null, "subtract", or "prev". When aggressive is false - // (typically set to true for forced single-line indents), empty - // lines are not indented, and places where the mode returns Pass - // are left alone. - function indentLine(cm, n, how, aggressive) { - var doc = cm.doc, state; - if (how == null) how = "add"; - if (how == "smart") { - // Fall back to "prev" when the mode doesn't have an indentation - // method. - if (!doc.mode.indent) how = "prev"; - else state = getStateBefore(cm, n); - } - - var tabSize = cm.options.tabSize; - var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); - if (line.stateAfter) line.stateAfter = null; - var curSpaceString = line.text.match(/^\s*/)[0], indentation; - if (!aggressive && !/\S/.test(line.text)) { - indentation = 0; - how = "not"; - } else if (how == "smart") { - indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); - if (indentation == Pass || indentation > 150) { - if (!aggressive) return; - how = "prev"; - } - } - if (how == "prev") { - if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); - else indentation = 0; - } else if (how == "add") { - indentation = curSpace + cm.options.indentUnit; - } else if (how == "subtract") { - indentation = curSpace - cm.options.indentUnit; - } else if (typeof how == "number") { - indentation = curSpace + how; - } - indentation = Math.max(0, indentation); - - var indentString = "", pos = 0; - if (cm.options.indentWithTabs) - for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} - if (pos < indentation) indentString += spaceStr(indentation - pos); - - if (indentString != curSpaceString) { - replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); - line.stateAfter = null; - return true; - } else { - // Ensure that, if the cursor was in the whitespace at the start - // of the line, it is moved to the end of that space. - for (var i = 0; i < doc.sel.ranges.length; i++) { - var range = doc.sel.ranges[i]; - if (range.head.line == n && range.head.ch < curSpaceString.length) { - var pos = Pos(n, curSpaceString.length); - replaceOneSelection(doc, i, new Range(pos, pos)); - break; - } - } - } - } - - // Utility for applying a change to a line by handle or number, - // returning the number and optionally registering the line as - // changed. - function changeLine(doc, handle, changeType, op) { - var no = handle, line = handle; - if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); - else no = lineNo(handle); - if (no == null) return null; - if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); - return line; - } - - // Helper for deleting text near the selection(s), used to implement - // backspace, delete, and similar functionality. - function deleteNearSelection(cm, compute) { - var ranges = cm.doc.sel.ranges, kill = []; - // Build up a set of ranges to kill first, merging overlapping - // ranges. - for (var i = 0; i < ranges.length; i++) { - var toKill = compute(ranges[i]); - while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { - var replaced = kill.pop(); - if (cmp(replaced.from, toKill.from) < 0) { - toKill.from = replaced.from; - break; - } - } - kill.push(toKill); - } - // Next, remove those actual ranges. - runInOp(cm, function() { - for (var i = kill.length - 1; i >= 0; i--) - replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); - ensureCursorVisible(cm); - }); - } - - // Used for horizontal relative motion. Dir is -1 or 1 (left or - // right), unit can be "char", "column" (like char, but doesn't - // cross line boundaries), "word" (across next word), or "group" (to - // the start of next group of word or non-word-non-whitespace - // chars). The visually param controls whether, in right-to-left - // text, direction 1 means to move towards the next index in the - // string, or towards the character to the right of the current - // position. The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosH(doc, pos, dir, unit, visually) { - var line = pos.line, ch = pos.ch, origDir = dir; - var lineObj = getLine(doc, line); - var possible = true; - function findNextLine() { - var l = line + dir; - if (l < doc.first || l >= doc.first + doc.size) return (possible = false); - line = l; - return lineObj = getLine(doc, l); - } - function moveOnce(boundToLine) { - var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); - if (next == null) { - if (!boundToLine && findNextLine()) { - if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); - else ch = dir < 0 ? lineObj.text.length : 0; - } else return (possible = false); - } else ch = next; - return true; - } - - if (unit == "char") moveOnce(); - else if (unit == "column") moveOnce(true); - else if (unit == "word" || unit == "group") { - var sawType = null, group = unit == "group"; - var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); - for (var first = true;; first = false) { - if (dir < 0 && !moveOnce(!first)) break; - var cur = lineObj.text.charAt(ch) || "\n"; - var type = isWordChar(cur, helper) ? "w" - : group && cur == "\n" ? "n" - : !group || /\s/.test(cur) ? null - : "p"; - if (group && !first && !type) type = "s"; - if (sawType && sawType != type) { - if (dir < 0) {dir = 1; moveOnce();} - break; - } - - if (type) sawType = type; - if (dir > 0 && !moveOnce(!first)) break; - } - } - var result = skipAtomic(doc, Pos(line, ch), origDir, true); - if (!possible) result.hitSide = true; - return result; - } - - // For relative vertical movement. Dir may be -1 or 1. Unit can be - // "page" or "line". The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosV(cm, pos, dir, unit) { - var doc = cm.doc, x = pos.left, y; - if (unit == "page") { - var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); - y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); - } else if (unit == "line") { - y = dir > 0 ? pos.bottom + 3 : pos.top - 3; - } - for (;;) { - var target = coordsChar(cm, x, y); - if (!target.outside) break; - if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } - y += dir * 5; - } - return target; - } - - // EDITOR METHODS - - // The publicly visible API. Note that methodOp(f) means - // 'wrap f in an operation, performed on its `this` parameter'. - - // This is not the complete set of editor methods. Most of the - // methods defined on the Doc type are also injected into - // CodeMirror.prototype, for backwards compatibility and - // convenience. - - CodeMirror.prototype = { - constructor: CodeMirror, - focus: function(){window.focus(); this.display.input.focus();}, - - setOption: function(option, value) { - var options = this.options, old = options[option]; - if (options[option] == value && option != "mode") return; - options[option] = value; - if (optionHandlers.hasOwnProperty(option)) - operation(this, optionHandlers[option])(this, value, old); - }, - - getOption: function(option) {return this.options[option];}, - getDoc: function() {return this.doc;}, - - addKeyMap: function(map, bottom) { - this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); - }, - removeKeyMap: function(map) { - var maps = this.state.keyMaps; - for (var i = 0; i < maps.length; ++i) - if (maps[i] == map || maps[i].name == map) { - maps.splice(i, 1); - return true; - } - }, - - addOverlay: methodOp(function(spec, options) { - var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); - if (mode.startState) throw new Error("Overlays may not be stateful."); - this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); - this.state.modeGen++; - regChange(this); - }), - removeOverlay: methodOp(function(spec) { - var overlays = this.state.overlays; - for (var i = 0; i < overlays.length; ++i) { - var cur = overlays[i].modeSpec; - if (cur == spec || typeof spec == "string" && cur.name == spec) { - overlays.splice(i, 1); - this.state.modeGen++; - regChange(this); - return; - } - } - }), - - indentLine: methodOp(function(n, dir, aggressive) { - if (typeof dir != "string" && typeof dir != "number") { - if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; - else dir = dir ? "add" : "subtract"; - } - if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); - }), - indentSelection: methodOp(function(how) { - var ranges = this.doc.sel.ranges, end = -1; - for (var i = 0; i < ranges.length; i++) { - var range = ranges[i]; - if (!range.empty()) { - var from = range.from(), to = range.to(); - var start = Math.max(end, from.line); - end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; - for (var j = start; j < end; ++j) - indentLine(this, j, how); - var newRanges = this.doc.sel.ranges; - if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) - replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); - } else if (range.head.line > end) { - indentLine(this, range.head.line, how, true); - end = range.head.line; - if (i == this.doc.sel.primIndex) ensureCursorVisible(this); - } - } - }), - - // Fetch the parser token for a given character. Useful for hacks - // that want to inspect the mode state (say, for completion). - getTokenAt: function(pos, precise) { - return takeToken(this, pos, precise); - }, - - getLineTokens: function(line, precise) { - return takeToken(this, Pos(line), precise, true); - }, - - getTokenTypeAt: function(pos) { - pos = clipPos(this.doc, pos); - var styles = getLineStyles(this, getLine(this.doc, pos.line)); - var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; - var type; - if (ch == 0) type = styles[2]; - else for (;;) { - var mid = (before + after) >> 1; - if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; - else if (styles[mid * 2 + 1] < ch) before = mid + 1; - else { type = styles[mid * 2 + 2]; break; } - } - var cut = type ? type.indexOf("cm-overlay ") : -1; - return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1); - }, - - getModeAt: function(pos) { - var mode = this.doc.mode; - if (!mode.innerMode) return mode; - return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; - }, - - getHelper: function(pos, type) { - return this.getHelpers(pos, type)[0]; - }, - - getHelpers: function(pos, type) { - var found = []; - if (!helpers.hasOwnProperty(type)) return found; - var help = helpers[type], mode = this.getModeAt(pos); - if (typeof mode[type] == "string") { - if (help[mode[type]]) found.push(help[mode[type]]); - } else if (mode[type]) { - for (var i = 0; i < mode[type].length; i++) { - var val = help[mode[type][i]]; - if (val) found.push(val); - } - } else if (mode.helperType && help[mode.helperType]) { - found.push(help[mode.helperType]); - } else if (help[mode.name]) { - found.push(help[mode.name]); - } - for (var i = 0; i < help._global.length; i++) { - var cur = help._global[i]; - if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) - found.push(cur.val); - } - return found; - }, - - getStateAfter: function(line, precise) { - var doc = this.doc; - line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); - return getStateBefore(this, line + 1, precise); - }, - - cursorCoords: function(start, mode) { - var pos, range = this.doc.sel.primary(); - if (start == null) pos = range.head; - else if (typeof start == "object") pos = clipPos(this.doc, start); - else pos = start ? range.from() : range.to(); - return cursorCoords(this, pos, mode || "page"); - }, - - charCoords: function(pos, mode) { - return charCoords(this, clipPos(this.doc, pos), mode || "page"); - }, - - coordsChar: function(coords, mode) { - coords = fromCoordSystem(this, coords, mode || "page"); - return coordsChar(this, coords.left, coords.top); - }, - - lineAtHeight: function(height, mode) { - height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; - return lineAtHeight(this.doc, height + this.display.viewOffset); - }, - heightAtLine: function(line, mode) { - var end = false, lineObj; - if (typeof line == "number") { - var last = this.doc.first + this.doc.size - 1; - if (line < this.doc.first) line = this.doc.first; - else if (line > last) { line = last; end = true; } - lineObj = getLine(this.doc, line); - } else { - lineObj = line; - } - return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top + - (end ? this.doc.height - heightAtLine(lineObj) : 0); - }, - - defaultTextHeight: function() { return textHeight(this.display); }, - defaultCharWidth: function() { return charWidth(this.display); }, - - setGutterMarker: methodOp(function(line, gutterID, value) { - return changeLine(this.doc, line, "gutter", function(line) { - var markers = line.gutterMarkers || (line.gutterMarkers = {}); - markers[gutterID] = value; - if (!value && isEmpty(markers)) line.gutterMarkers = null; - return true; - }); - }), - - clearGutter: methodOp(function(gutterID) { - var cm = this, doc = cm.doc, i = doc.first; - doc.iter(function(line) { - if (line.gutterMarkers && line.gutterMarkers[gutterID]) { - line.gutterMarkers[gutterID] = null; - regLineChange(cm, i, "gutter"); - if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; - } - ++i; - }); - }), - - lineInfo: function(line) { - if (typeof line == "number") { - if (!isLine(this.doc, line)) return null; - var n = line; - line = getLine(this.doc, line); - if (!line) return null; - } else { - var n = lineNo(line); - if (n == null) return null; - } - return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, - textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, - widgets: line.widgets}; - }, - - getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};}, - - addWidget: function(pos, node, scroll, vert, horiz) { - var display = this.display; - pos = cursorCoords(this, clipPos(this.doc, pos)); - var top = pos.bottom, left = pos.left; - node.style.position = "absolute"; - node.setAttribute("cm-ignore-events", "true"); - this.display.input.setUneditable(node); - display.sizer.appendChild(node); - if (vert == "over") { - top = pos.top; - } else if (vert == "above" || vert == "near") { - var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), - hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); - // Default to positioning above (if specified and possible); otherwise default to positioning below - if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) - top = pos.top - node.offsetHeight; - else if (pos.bottom + node.offsetHeight <= vspace) - top = pos.bottom; - if (left + node.offsetWidth > hspace) - left = hspace - node.offsetWidth; - } - node.style.top = top + "px"; - node.style.left = node.style.right = ""; - if (horiz == "right") { - left = display.sizer.clientWidth - node.offsetWidth; - node.style.right = "0px"; - } else { - if (horiz == "left") left = 0; - else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; - node.style.left = left + "px"; - } - if (scroll) - scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); - }, - - triggerOnKeyDown: methodOp(onKeyDown), - triggerOnKeyPress: methodOp(onKeyPress), - triggerOnKeyUp: onKeyUp, - - execCommand: function(cmd) { - if (commands.hasOwnProperty(cmd)) - return commands[cmd](this); - }, - - triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), - - findPosH: function(from, amount, unit, visually) { - var dir = 1; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - cur = findPosH(this.doc, cur, dir, unit, visually); - if (cur.hitSide) break; - } - return cur; - }, - - moveH: methodOp(function(dir, unit) { - var cm = this; - cm.extendSelectionsBy(function(range) { - if (cm.display.shift || cm.doc.extend || range.empty()) - return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually); - else - return dir < 0 ? range.from() : range.to(); - }, sel_move); - }), - - deleteH: methodOp(function(dir, unit) { - var sel = this.doc.sel, doc = this.doc; - if (sel.somethingSelected()) - doc.replaceSelection("", null, "+delete"); - else - deleteNearSelection(this, function(range) { - var other = findPosH(doc, range.head, dir, unit, false); - return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}; - }); - }), - - findPosV: function(from, amount, unit, goalColumn) { - var dir = 1, x = goalColumn; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - var coords = cursorCoords(this, cur, "div"); - if (x == null) x = coords.left; - else coords.left = x; - cur = findPosV(this, coords, dir, unit); - if (cur.hitSide) break; - } - return cur; - }, - - moveV: methodOp(function(dir, unit) { - var cm = this, doc = this.doc, goals = []; - var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected(); - doc.extendSelectionsBy(function(range) { - if (collapse) - return dir < 0 ? range.from() : range.to(); - var headPos = cursorCoords(cm, range.head, "div"); - if (range.goalColumn != null) headPos.left = range.goalColumn; - goals.push(headPos.left); - var pos = findPosV(cm, headPos, dir, unit); - if (unit == "page" && range == doc.sel.primary()) - addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top); - return pos; - }, sel_move); - if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++) - doc.sel.ranges[i].goalColumn = goals[i]; - }), - - // Find the word at the given position (as returned by coordsChar). - findWordAt: function(pos) { - var doc = this.doc, line = getLine(doc, pos.line).text; - var start = pos.ch, end = pos.ch; - if (line) { - var helper = this.getHelper(pos, "wordChars"); - if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; - var startChar = line.charAt(start); - var check = isWordChar(startChar, helper) - ? function(ch) { return isWordChar(ch, helper); } - : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} - : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; - while (start > 0 && check(line.charAt(start - 1))) --start; - while (end < line.length && check(line.charAt(end))) ++end; - } - return new Range(Pos(pos.line, start), Pos(pos.line, end)); - }, - - toggleOverwrite: function(value) { - if (value != null && value == this.state.overwrite) return; - if (this.state.overwrite = !this.state.overwrite) - addClass(this.display.cursorDiv, "CodeMirror-overwrite"); - else - rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); - - signal(this, "overwriteToggle", this, this.state.overwrite); - }, - hasFocus: function() { return this.display.input.getField() == activeElt(); }, - - scrollTo: methodOp(function(x, y) { - if (x != null || y != null) resolveScrollToPos(this); - if (x != null) this.curOp.scrollLeft = x; - if (y != null) this.curOp.scrollTop = y; - }), - getScrollInfo: function() { - var scroller = this.display.scroller; - return {left: scroller.scrollLeft, top: scroller.scrollTop, - height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, - width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, - clientHeight: displayHeight(this), clientWidth: displayWidth(this)}; - }, - - scrollIntoView: methodOp(function(range, margin) { - if (range == null) { - range = {from: this.doc.sel.primary().head, to: null}; - if (margin == null) margin = this.options.cursorScrollMargin; - } else if (typeof range == "number") { - range = {from: Pos(range, 0), to: null}; - } else if (range.from == null) { - range = {from: range, to: null}; - } - if (!range.to) range.to = range.from; - range.margin = margin || 0; - - if (range.from.line != null) { - resolveScrollToPos(this); - this.curOp.scrollToPos = range; - } else { - var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left), - Math.min(range.from.top, range.to.top) - range.margin, - Math.max(range.from.right, range.to.right), - Math.max(range.from.bottom, range.to.bottom) + range.margin); - this.scrollTo(sPos.scrollLeft, sPos.scrollTop); - } - }), - - setSize: methodOp(function(width, height) { - var cm = this; - function interpret(val) { - return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; - } - if (width != null) cm.display.wrapper.style.width = interpret(width); - if (height != null) cm.display.wrapper.style.height = interpret(height); - if (cm.options.lineWrapping) clearLineMeasurementCache(this); - var lineNo = cm.display.viewFrom; - cm.doc.iter(lineNo, cm.display.viewTo, function(line) { - if (line.widgets) for (var i = 0; i < line.widgets.length; i++) - if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; } - ++lineNo; - }); - cm.curOp.forceUpdate = true; - signal(cm, "refresh", this); - }), - - operation: function(f){return runInOp(this, f);}, - - refresh: methodOp(function() { - var oldHeight = this.display.cachedTextHeight; - regChange(this); - this.curOp.forceUpdate = true; - clearCaches(this); - this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); - updateGutterSpace(this); - if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) - estimateLineHeights(this); - signal(this, "refresh", this); - }), - - swapDoc: methodOp(function(doc) { - var old = this.doc; - old.cm = null; - attachDoc(this, doc); - clearCaches(this); - this.display.input.reset(); - this.scrollTo(doc.scrollLeft, doc.scrollTop); - this.curOp.forceScroll = true; - signalLater(this, "swapDoc", this, old); - return old; - }), - - getInputField: function(){return this.display.input.getField();}, - getWrapperElement: function(){return this.display.wrapper;}, - getScrollerElement: function(){return this.display.scroller;}, - getGutterElement: function(){return this.display.gutters;} - }; - eventMixin(CodeMirror); - - // OPTION DEFAULTS - - // The default configuration options. - var defaults = CodeMirror.defaults = {}; - // Functions to run when options are changed. - var optionHandlers = CodeMirror.optionHandlers = {}; - - function option(name, deflt, handle, notOnInit) { - CodeMirror.defaults[name] = deflt; - if (handle) optionHandlers[name] = - notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; - } - - // Passed to option handlers when there is no old value. - var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; - - // These two are, on init, called from the constructor because they - // have to be initialized before the editor can start at all. - option("value", "", function(cm, val) { - cm.setValue(val); - }, true); - option("mode", null, function(cm, val) { - cm.doc.modeOption = val; - loadMode(cm); - }, true); - - option("indentUnit", 2, loadMode, true); - option("indentWithTabs", false); - option("smartIndent", true); - option("tabSize", 4, function(cm) { - resetModeState(cm); - clearCaches(cm); - regChange(cm); - }, true); - option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { - cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); - if (old != CodeMirror.Init) cm.refresh(); - }); - option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); - option("electricChars", true); - option("inputStyle", mobile ? "contenteditable" : "textarea", function() { - throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME - }, true); - option("rtlMoveVisually", !windows); - option("wholeLineUpdateBefore", true); - - option("theme", "default", function(cm) { - themeChanged(cm); - guttersChanged(cm); - }, true); - option("keyMap", "default", function(cm, val, old) { - var next = getKeyMap(val); - var prev = old != CodeMirror.Init && getKeyMap(old); - if (prev && prev.detach) prev.detach(cm, next); - if (next.attach) next.attach(cm, prev || null); - }); - option("extraKeys", null); - - option("lineWrapping", false, wrappingChanged, true); - option("gutters", [], function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("fixedGutter", true, function(cm, val) { - cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; - cm.refresh(); - }, true); - option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true); - option("scrollbarStyle", "native", function(cm) { - initScrollbars(cm); - updateScrollbars(cm); - cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); - cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); - }, true); - option("lineNumbers", false, function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("firstLineNumber", 1, guttersChanged, true); - option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); - option("showCursorWhenSelecting", false, updateSelection, true); - - option("resetSelectionOnContextMenu", true); - option("lineWiseCopyCut", true); - - option("readOnly", false, function(cm, val) { - if (val == "nocursor") { - onBlur(cm); - cm.display.input.blur(); - cm.display.disabled = true; - } else { - cm.display.disabled = false; - if (!val) cm.display.input.reset(); - } - }); - option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true); - option("dragDrop", true, dragDropChanged); - - option("cursorBlinkRate", 530); - option("cursorScrollMargin", 0); - option("cursorHeight", 1, updateSelection, true); - option("singleCursorHeightPerLine", true, updateSelection, true); - option("workTime", 100); - option("workDelay", 100); - option("flattenSpans", true, resetModeState, true); - option("addModeClass", false, resetModeState, true); - option("pollInterval", 100); - option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;}); - option("historyEventDelay", 1250); - option("viewportMargin", 10, function(cm){cm.refresh();}, true); - option("maxHighlightLength", 10000, resetModeState, true); - option("moveInputWithCursor", true, function(cm, val) { - if (!val) cm.display.input.resetPosition(); - }); - - option("tabindex", null, function(cm, val) { - cm.display.input.getField().tabIndex = val || ""; - }); - option("autofocus", null); - - // MODE DEFINITION AND QUERYING - - // Known modes, by name and by MIME - var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; - - // Extra arguments are stored as the mode's dependencies, which is - // used by (legacy) mechanisms like loadmode.js to automatically - // load a mode. (Preferred mechanism is the require/define calls.) - CodeMirror.defineMode = function(name, mode) { - if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; - if (arguments.length > 2) - mode.dependencies = Array.prototype.slice.call(arguments, 2); - modes[name] = mode; - }; - - CodeMirror.defineMIME = function(mime, spec) { - mimeModes[mime] = spec; - }; - - // Given a MIME type, a {name, ...options} config object, or a name - // string, return a mode config object. - CodeMirror.resolveMode = function(spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { - spec = mimeModes[spec]; - } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { - var found = mimeModes[spec.name]; - if (typeof found == "string") found = {name: found}; - spec = createObj(found, spec); - spec.name = found.name; - } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { - return CodeMirror.resolveMode("application/xml"); - } - if (typeof spec == "string") return {name: spec}; - else return spec || {name: "null"}; - }; - - // Given a mode spec (anything that resolveMode accepts), find and - // initialize an actual mode object. - CodeMirror.getMode = function(options, spec) { - var spec = CodeMirror.resolveMode(spec); - var mfactory = modes[spec.name]; - if (!mfactory) return CodeMirror.getMode(options, "text/plain"); - var modeObj = mfactory(options, spec); - if (modeExtensions.hasOwnProperty(spec.name)) { - var exts = modeExtensions[spec.name]; - for (var prop in exts) { - if (!exts.hasOwnProperty(prop)) continue; - if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; - modeObj[prop] = exts[prop]; - } - } - modeObj.name = spec.name; - if (spec.helperType) modeObj.helperType = spec.helperType; - if (spec.modeProps) for (var prop in spec.modeProps) - modeObj[prop] = spec.modeProps[prop]; - - return modeObj; - }; - - // Minimal default mode. - CodeMirror.defineMode("null", function() { - return {token: function(stream) {stream.skipToEnd();}}; - }); - CodeMirror.defineMIME("text/plain", "null"); - - // This can be used to attach properties to mode objects from - // outside the actual mode definition. - var modeExtensions = CodeMirror.modeExtensions = {}; - CodeMirror.extendMode = function(mode, properties) { - var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); - copyObj(properties, exts); - }; - - // EXTENSIONS - - CodeMirror.defineExtension = function(name, func) { - CodeMirror.prototype[name] = func; - }; - CodeMirror.defineDocExtension = function(name, func) { - Doc.prototype[name] = func; - }; - CodeMirror.defineOption = option; - - var initHooks = []; - CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; - - var helpers = CodeMirror.helpers = {}; - CodeMirror.registerHelper = function(type, name, value) { - if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []}; - helpers[type][name] = value; - }; - CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { - CodeMirror.registerHelper(type, name, value); - helpers[type]._global.push({pred: predicate, val: value}); - }; - - // MODE STATE HANDLING - - // Utility functions for working with state. Exported because nested - // modes need to do this for their inner modes. - - var copyState = CodeMirror.copyState = function(mode, state) { - if (state === true) return state; - if (mode.copyState) return mode.copyState(state); - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) val = val.concat([]); - nstate[n] = val; - } - return nstate; - }; - - var startState = CodeMirror.startState = function(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; - }; - - // Given a mode and a state (for that mode), find the inner mode and - // state at the position that the state refers to. - CodeMirror.innerMode = function(mode, state) { - while (mode.innerMode) { - var info = mode.innerMode(state); - if (!info || info.mode == mode) break; - state = info.state; - mode = info.mode; - } - return info || {mode: mode, state: state}; - }; - - // STANDARD COMMANDS - - // Commands are parameter-less actions that can be performed on an - // editor, mostly used for keybindings. - var commands = CodeMirror.commands = { - selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);}, - singleSelection: function(cm) { - cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); - }, - killLine: function(cm) { - deleteNearSelection(cm, function(range) { - if (range.empty()) { - var len = getLine(cm.doc, range.head.line).text.length; - if (range.head.ch == len && range.head.line < cm.lastLine()) - return {from: range.head, to: Pos(range.head.line + 1, 0)}; - else - return {from: range.head, to: Pos(range.head.line, len)}; - } else { - return {from: range.from(), to: range.to()}; - } - }); - }, - deleteLine: function(cm) { - deleteNearSelection(cm, function(range) { - return {from: Pos(range.from().line, 0), - to: clipPos(cm.doc, Pos(range.to().line + 1, 0))}; - }); - }, - delLineLeft: function(cm) { - deleteNearSelection(cm, function(range) { - return {from: Pos(range.from().line, 0), to: range.from()}; - }); - }, - delWrappedLineLeft: function(cm) { - deleteNearSelection(cm, function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var leftPos = cm.coordsChar({left: 0, top: top}, "div"); - return {from: leftPos, to: range.from()}; - }); - }, - delWrappedLineRight: function(cm) { - deleteNearSelection(cm, function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); - return {from: range.from(), to: rightPos }; - }); - }, - undo: function(cm) {cm.undo();}, - redo: function(cm) {cm.redo();}, - undoSelection: function(cm) {cm.undoSelection();}, - redoSelection: function(cm) {cm.redoSelection();}, - goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, - goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, - goLineStart: function(cm) { - cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); }, - {origin: "+move", bias: 1}); - }, - goLineStartSmart: function(cm) { - cm.extendSelectionsBy(function(range) { - return lineStartSmart(cm, range.head); - }, {origin: "+move", bias: 1}); - }, - goLineEnd: function(cm) { - cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); }, - {origin: "+move", bias: -1}); - }, - goLineRight: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); - }, sel_move); - }, - goLineLeft: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - return cm.coordsChar({left: 0, top: top}, "div"); - }, sel_move); - }, - goLineLeftSmart: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var pos = cm.coordsChar({left: 0, top: top}, "div"); - if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head); - return pos; - }, sel_move); - }, - goLineUp: function(cm) {cm.moveV(-1, "line");}, - goLineDown: function(cm) {cm.moveV(1, "line");}, - goPageUp: function(cm) {cm.moveV(-1, "page");}, - goPageDown: function(cm) {cm.moveV(1, "page");}, - goCharLeft: function(cm) {cm.moveH(-1, "char");}, - goCharRight: function(cm) {cm.moveH(1, "char");}, - goColumnLeft: function(cm) {cm.moveH(-1, "column");}, - goColumnRight: function(cm) {cm.moveH(1, "column");}, - goWordLeft: function(cm) {cm.moveH(-1, "word");}, - goGroupRight: function(cm) {cm.moveH(1, "group");}, - goGroupLeft: function(cm) {cm.moveH(-1, "group");}, - goWordRight: function(cm) {cm.moveH(1, "word");}, - delCharBefore: function(cm) {cm.deleteH(-1, "char");}, - delCharAfter: function(cm) {cm.deleteH(1, "char");}, - delWordBefore: function(cm) {cm.deleteH(-1, "word");}, - delWordAfter: function(cm) {cm.deleteH(1, "word");}, - delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, - delGroupAfter: function(cm) {cm.deleteH(1, "group");}, - indentAuto: function(cm) {cm.indentSelection("smart");}, - indentMore: function(cm) {cm.indentSelection("add");}, - indentLess: function(cm) {cm.indentSelection("subtract");}, - insertTab: function(cm) {cm.replaceSelection("\t");}, - insertSoftTab: function(cm) { - var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; - for (var i = 0; i < ranges.length; i++) { - var pos = ranges[i].from(); - var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); - spaces.push(new Array(tabSize - col % tabSize + 1).join(" ")); - } - cm.replaceSelections(spaces); - }, - defaultTab: function(cm) { - if (cm.somethingSelected()) cm.indentSelection("add"); - else cm.execCommand("insertTab"); - }, - transposeChars: function(cm) { - runInOp(cm, function() { - var ranges = cm.listSelections(), newSel = []; - for (var i = 0; i < ranges.length; i++) { - var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; - if (line) { - if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1); - if (cur.ch > 0) { - cur = new Pos(cur.line, cur.ch + 1); - cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), - Pos(cur.line, cur.ch - 2), cur, "+transpose"); - } else if (cur.line > cm.doc.first) { - var prev = getLine(cm.doc, cur.line - 1).text; - if (prev) - cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1), - Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose"); - } - } - newSel.push(new Range(cur, cur)); - } - cm.setSelections(newSel); - }); - }, - newlineAndIndent: function(cm) { - runInOp(cm, function() { - var len = cm.listSelections().length; - for (var i = 0; i < len; i++) { - var range = cm.listSelections()[i]; - cm.replaceRange("\n", range.anchor, range.head, "+input"); - cm.indentLine(range.from().line + 1, null, true); - ensureCursorVisible(cm); - } - }); - }, - toggleOverwrite: function(cm) {cm.toggleOverwrite();} - }; - - - // STANDARD KEYMAPS - - var keyMap = CodeMirror.keyMap = {}; - - keyMap.basic = { - "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", - "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", - "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", - "Tab": "defaultTab", "Shift-Tab": "indentAuto", - "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", - "Esc": "singleSelection" - }; - // Note that the save and find-related commands aren't defined by - // default. User code or addons can define them. Unknown commands - // are simply ignored. - keyMap.pcDefault = { - "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", - "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", - "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", - "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", - "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", - "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", - "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", - fallthrough: "basic" - }; - // Very basic readline/emacs-style bindings, which are standard on Mac. - keyMap.emacsy = { - "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", - "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", - "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", - "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" - }; - keyMap.macDefault = { - "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", - "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", - "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", - "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", - "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", - "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", - fallthrough: ["basic", "emacsy"] - }; - keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; - - // KEYMAP DISPATCH - - function normalizeKeyName(name) { - var parts = name.split(/-(?!$)/), name = parts[parts.length - 1]; - var alt, ctrl, shift, cmd; - for (var i = 0; i < parts.length - 1; i++) { - var mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) cmd = true; - else if (/^a(lt)?$/i.test(mod)) alt = true; - else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true; - else if (/^s(hift)$/i.test(mod)) shift = true; - else throw new Error("Unrecognized modifier name: " + mod); - } - if (alt) name = "Alt-" + name; - if (ctrl) name = "Ctrl-" + name; - if (cmd) name = "Cmd-" + name; - if (shift) name = "Shift-" + name; - return name; - } - - // This is a kludge to keep keymaps mostly working as raw objects - // (backwards compatibility) while at the same time support features - // like normalization and multi-stroke key bindings. It compiles a - // new normalized keymap, and then updates the old object to reflect - // this. - CodeMirror.normalizeKeyMap = function(keymap) { - var copy = {}; - for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) { - var value = keymap[keyname]; - if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue; - if (value == "...") { delete keymap[keyname]; continue; } - - var keys = map(keyname.split(" "), normalizeKeyName); - for (var i = 0; i < keys.length; i++) { - var val, name; - if (i == keys.length - 1) { - name = keys.join(" "); - val = value; - } else { - name = keys.slice(0, i + 1).join(" "); - val = "..."; - } - var prev = copy[name]; - if (!prev) copy[name] = val; - else if (prev != val) throw new Error("Inconsistent bindings for " + name); - } - delete keymap[keyname]; - } - for (var prop in copy) keymap[prop] = copy[prop]; - return keymap; - }; - - var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) { - map = getKeyMap(map); - var found = map.call ? map.call(key, context) : map[key]; - if (found === false) return "nothing"; - if (found === "...") return "multi"; - if (found != null && handle(found)) return "handled"; - - if (map.fallthrough) { - if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") - return lookupKey(key, map.fallthrough, handle, context); - for (var i = 0; i < map.fallthrough.length; i++) { - var result = lookupKey(key, map.fallthrough[i], handle, context); - if (result) return result; - } - } - }; - - // Modifier key presses don't count as 'real' key presses for the - // purpose of keymap fallthrough. - var isModifierKey = CodeMirror.isModifierKey = function(value) { - var name = typeof value == "string" ? value : keyNames[value.keyCode]; - return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; - }; - - // Look up the name of a key as indicated by an event object. - var keyName = CodeMirror.keyName = function(event, noShift) { - if (presto && event.keyCode == 34 && event["char"]) return false; - var base = keyNames[event.keyCode], name = base; - if (name == null || event.altGraphKey) return false; - if (event.altKey && base != "Alt") name = "Alt-" + name; - if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name; - if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name; - if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name; - return name; - }; - - function getKeyMap(val) { - return typeof val == "string" ? keyMap[val] : val; - } - - // FROMTEXTAREA - - CodeMirror.fromTextArea = function(textarea, options) { - options = options ? copyObj(options) : {}; - options.value = textarea.value; - if (!options.tabindex && textarea.tabIndex) - options.tabindex = textarea.tabIndex; - if (!options.placeholder && textarea.placeholder) - options.placeholder = textarea.placeholder; - // Set autofocus to true if this textarea is focused, or if it has - // autofocus and no other element is focused. - if (options.autofocus == null) { - var hasFocus = activeElt(); - options.autofocus = hasFocus == textarea || - textarea.getAttribute("autofocus") != null && hasFocus == document.body; - } - - function save() {textarea.value = cm.getValue();} - if (textarea.form) { - on(textarea.form, "submit", save); - // Deplorable hack to make the submit method do the right thing. - if (!options.leaveSubmitMethodAlone) { - var form = textarea.form, realSubmit = form.submit; - try { - var wrappedSubmit = form.submit = function() { - save(); - form.submit = realSubmit; - form.submit(); - form.submit = wrappedSubmit; - }; - } catch(e) {} - } - } - - options.finishInit = function(cm) { - cm.save = save; - cm.getTextArea = function() { return textarea; }; - cm.toTextArea = function() { - cm.toTextArea = isNaN; // Prevent this from being ran twice - save(); - textarea.parentNode.removeChild(cm.getWrapperElement()); - textarea.style.display = ""; - if (textarea.form) { - off(textarea.form, "submit", save); - if (typeof textarea.form.submit == "function") - textarea.form.submit = realSubmit; - } - }; - }; - - textarea.style.display = "none"; - var cm = CodeMirror(function(node) { - textarea.parentNode.insertBefore(node, textarea.nextSibling); - }, options); - return cm; - }; - - // STRING STREAM - - // Fed to the mode parsers, provides helper functions to make - // parsers more succinct. - - var StringStream = CodeMirror.StringStream = function(string, tabSize) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - this.lineStart = 0; - }; - - StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == this.lineStart;}, - peek: function() {return this.string.charAt(this.pos) || undefined;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() { - if (this.lastColumnPos < this.start) { - this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); - this.lastColumnPos = this.start; - } - return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }, - indentation: function() { - return countColumn(this.string, null, this.tabSize) - - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);}, - hideFirstChars: function(n, inner) { - this.lineStart += n; - try { return inner(); } - finally { this.lineStart -= n; } - } - }; - - // TEXTMARKERS - - // Created with markText and setBookmark methods. A TextMarker is a - // handle that can be used to clear or find a marked position in the - // document. Line objects hold arrays (markedSpans) containing - // {from, to, marker} object pointing to such marker objects, and - // indicating that such a marker is present on that line. Multiple - // lines may point to the same marker when it spans across lines. - // The spans will have null for their from/to properties when the - // marker continues beyond the start/end of the line. Markers have - // links back to the lines they currently touch. - - var nextMarkerId = 0; - - var TextMarker = CodeMirror.TextMarker = function(doc, type) { - this.lines = []; - this.type = type; - this.doc = doc; - this.id = ++nextMarkerId; - }; - eventMixin(TextMarker); - - // Clear the marker. - TextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - var cm = this.doc.cm, withOp = cm && !cm.curOp; - if (withOp) startOperation(cm); - if (hasHandler(this, "clear")) { - var found = this.find(); - if (found) signalLater(this, "clear", found.from, found.to); - } - var min = null, max = null; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text"); - else if (cm) { - if (span.to != null) max = lineNo(line); - if (span.from != null) min = lineNo(line); - } - line.markedSpans = removeMarkedSpan(line.markedSpans, span); - if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) - updateLineHeight(line, textHeight(cm.display)); - } - if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { - var visual = visualLine(this.lines[i]), len = lineLength(visual); - if (len > cm.display.maxLineLength) { - cm.display.maxLine = visual; - cm.display.maxLineLength = len; - cm.display.maxLineChanged = true; - } - } - - if (min != null && cm && this.collapsed) regChange(cm, min, max + 1); - this.lines.length = 0; - this.explicitlyCleared = true; - if (this.atomic && this.doc.cantEdit) { - this.doc.cantEdit = false; - if (cm) reCheckSelection(cm.doc); - } - if (cm) signalLater(cm, "markerCleared", cm, this); - if (withOp) endOperation(cm); - if (this.parent) this.parent.clear(); - }; - - // Find the position of the marker in the document. Returns a {from, - // to} object by default. Side can be passed to get a specific side - // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the - // Pos objects returned contain a line object, rather than a line - // number (used to prevent looking up the same line twice). - TextMarker.prototype.find = function(side, lineObj) { - if (side == null && this.type == "bookmark") side = 1; - var from, to; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (span.from != null) { - from = Pos(lineObj ? line : lineNo(line), span.from); - if (side == -1) return from; - } - if (span.to != null) { - to = Pos(lineObj ? line : lineNo(line), span.to); - if (side == 1) return to; - } - } - return from && {from: from, to: to}; - }; - - // Signals that the marker's widget changed, and surrounding layout - // should be recomputed. - TextMarker.prototype.changed = function() { - var pos = this.find(-1, true), widget = this, cm = this.doc.cm; - if (!pos || !cm) return; - runInOp(cm, function() { - var line = pos.line, lineN = lineNo(pos.line); - var view = findViewForLine(cm, lineN); - if (view) { - clearLineMeasurementCacheFor(view); - cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; - } - cm.curOp.updateMaxLine = true; - if (!lineIsHidden(widget.doc, line) && widget.height != null) { - var oldHeight = widget.height; - widget.height = null; - var dHeight = widgetHeight(widget) - oldHeight; - if (dHeight) - updateLineHeight(line, line.height + dHeight); - } - }); - }; - - TextMarker.prototype.attachLine = function(line) { - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) - (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); - } - this.lines.push(line); - }; - TextMarker.prototype.detachLine = function(line) { - this.lines.splice(indexOf(this.lines, line), 1); - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); - } - }; - - // Collapsed markers have unique ids, in order to be able to order - // them, which is needed for uniquely determining an outer marker - // when they overlap (they may nest, but not partially overlap). - var nextMarkerId = 0; - - // Create a marker, wire it up to the right lines, and - function markText(doc, from, to, options, type) { - // Shared markers (across linked documents) are handled separately - // (markTextShared will call out to this again, once per - // document). - if (options && options.shared) return markTextShared(doc, from, to, options, type); - // Ensure we are in an operation. - if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); - - var marker = new TextMarker(doc, type), diff = cmp(from, to); - if (options) copyObj(options, marker, false); - // Don't connect empty markers unless clearWhenEmpty is false - if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) - return marker; - if (marker.replacedWith) { - // Showing up as a widget implies collapsed (widget replaces text) - marker.collapsed = true; - marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget"); - if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true"); - if (options.insertLeft) marker.widgetNode.insertLeft = true; - } - if (marker.collapsed) { - if (conflictingCollapsedRange(doc, from.line, from, to, marker) || - from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) - throw new Error("Inserting collapsed marker partially overlapping an existing one"); - sawCollapsedSpans = true; - } - - if (marker.addToHistory) - addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); - - var curLine = from.line, cm = doc.cm, updateMaxLine; - doc.iter(curLine, to.line + 1, function(line) { - if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) - updateMaxLine = true; - if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); - addMarkedSpan(line, new MarkedSpan(marker, - curLine == from.line ? from.ch : null, - curLine == to.line ? to.ch : null)); - ++curLine; - }); - // lineIsHidden depends on the presence of the spans, so needs a second pass - if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { - if (lineIsHidden(doc, line)) updateLineHeight(line, 0); - }); - - if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); - - if (marker.readOnly) { - sawReadOnlySpans = true; - if (doc.history.done.length || doc.history.undone.length) - doc.clearHistory(); - } - if (marker.collapsed) { - marker.id = ++nextMarkerId; - marker.atomic = true; - } - if (cm) { - // Sync editor state - if (updateMaxLine) cm.curOp.updateMaxLine = true; - if (marker.collapsed) - regChange(cm, from.line, to.line + 1); - else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css) - for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text"); - if (marker.atomic) reCheckSelection(cm.doc); - signalLater(cm, "markerAdded", cm, marker); - } - return marker; - } - - // SHARED TEXTMARKERS - - // A shared marker spans multiple linked documents. It is - // implemented as a meta-marker-object controlling multiple normal - // markers. - var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) { - this.markers = markers; - this.primary = primary; - for (var i = 0; i < markers.length; ++i) - markers[i].parent = this; - }; - eventMixin(SharedTextMarker); - - SharedTextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - this.explicitlyCleared = true; - for (var i = 0; i < this.markers.length; ++i) - this.markers[i].clear(); - signalLater(this, "clear"); - }; - SharedTextMarker.prototype.find = function(side, lineObj) { - return this.primary.find(side, lineObj); - }; - - function markTextShared(doc, from, to, options, type) { - options = copyObj(options); - options.shared = false; - var markers = [markText(doc, from, to, options, type)], primary = markers[0]; - var widget = options.widgetNode; - linkedDocs(doc, function(doc) { - if (widget) options.widgetNode = widget.cloneNode(true); - markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); - for (var i = 0; i < doc.linked.length; ++i) - if (doc.linked[i].isParent) return; - primary = lst(markers); - }); - return new SharedTextMarker(markers, primary); - } - - function findSharedMarkers(doc) { - return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), - function(m) { return m.parent; }); - } - - function copySharedMarkers(doc, markers) { - for (var i = 0; i < markers.length; i++) { - var marker = markers[i], pos = marker.find(); - var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); - if (cmp(mFrom, mTo)) { - var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); - marker.markers.push(subMark); - subMark.parent = marker; - } - } - } - - function detachSharedMarkers(markers) { - for (var i = 0; i < markers.length; i++) { - var marker = markers[i], linked = [marker.primary.doc];; - linkedDocs(marker.primary.doc, function(d) { linked.push(d); }); - for (var j = 0; j < marker.markers.length; j++) { - var subMarker = marker.markers[j]; - if (indexOf(linked, subMarker.doc) == -1) { - subMarker.parent = null; - marker.markers.splice(j--, 1); - } - } - } - } - - // TEXTMARKER SPANS - - function MarkedSpan(marker, from, to) { - this.marker = marker; - this.from = from; this.to = to; - } - - // Search an array of spans for a span matching the given marker. - function getMarkedSpanFor(spans, marker) { - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.marker == marker) return span; - } - } - // Remove a span from an array, returning undefined if no spans are - // left (we don't store arrays for lines without spans). - function removeMarkedSpan(spans, span) { - for (var r, i = 0; i < spans.length; ++i) - if (spans[i] != span) (r || (r = [])).push(spans[i]); - return r; - } - // Add a span to a line. - function addMarkedSpan(line, span) { - line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; - span.marker.attachLine(line); - } - - // Used for the algorithm that adjusts markers for a change in the - // document. These functions cut an array of spans at a given - // character position, returning an array of remaining chunks (or - // undefined if nothing remains). - function markedSpansBefore(old, startCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); - if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); - (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); - } - } - return nw; - } - function markedSpansAfter(old, endCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); - if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); - (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, - span.to == null ? null : span.to - endCh)); - } - } - return nw; - } - - // Given a change object, compute the new set of marker spans that - // cover the line in which the change took place. Removes spans - // entirely within the change, reconnects spans belonging to the - // same marker that appear on both sides of the change, and cuts off - // spans partially within the change. Returns an array of span - // arrays with one element for each line in (after) the change. - function stretchSpansOverChange(doc, change) { - if (change.full) return null; - var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; - var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; - if (!oldFirst && !oldLast) return null; - - var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; - // Get the spans that 'stick out' on both sides - var first = markedSpansBefore(oldFirst, startCh, isInsert); - var last = markedSpansAfter(oldLast, endCh, isInsert); - - // Next, merge those two ends - var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); - if (first) { - // Fix up .to properties of first - for (var i = 0; i < first.length; ++i) { - var span = first[i]; - if (span.to == null) { - var found = getMarkedSpanFor(last, span.marker); - if (!found) span.to = startCh; - else if (sameLine) span.to = found.to == null ? null : found.to + offset; - } - } - } - if (last) { - // Fix up .from in last (or move them into first in case of sameLine) - for (var i = 0; i < last.length; ++i) { - var span = last[i]; - if (span.to != null) span.to += offset; - if (span.from == null) { - var found = getMarkedSpanFor(first, span.marker); - if (!found) { - span.from = offset; - if (sameLine) (first || (first = [])).push(span); - } - } else { - span.from += offset; - if (sameLine) (first || (first = [])).push(span); - } - } - } - // Make sure we didn't create any zero-length spans - if (first) first = clearEmptySpans(first); - if (last && last != first) last = clearEmptySpans(last); - - var newMarkers = [first]; - if (!sameLine) { - // Fill gap with whole-line-spans - var gap = change.text.length - 2, gapMarkers; - if (gap > 0 && first) - for (var i = 0; i < first.length; ++i) - if (first[i].to == null) - (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)); - for (var i = 0; i < gap; ++i) - newMarkers.push(gapMarkers); - newMarkers.push(last); - } - return newMarkers; - } - - // Remove spans that are empty and don't have a clearWhenEmpty - // option of false. - function clearEmptySpans(spans) { - for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) - spans.splice(i--, 1); - } - if (!spans.length) return null; - return spans; - } - - // Used for un/re-doing changes from the history. Combines the - // result of computing the existing spans with the set of spans that - // existed in the history (so that deleting around a span and then - // undoing brings back the span). - function mergeOldSpans(doc, change) { - var old = getOldSpans(doc, change); - var stretched = stretchSpansOverChange(doc, change); - if (!old) return stretched; - if (!stretched) return old; - - for (var i = 0; i < old.length; ++i) { - var oldCur = old[i], stretchCur = stretched[i]; - if (oldCur && stretchCur) { - spans: for (var j = 0; j < stretchCur.length; ++j) { - var span = stretchCur[j]; - for (var k = 0; k < oldCur.length; ++k) - if (oldCur[k].marker == span.marker) continue spans; - oldCur.push(span); - } - } else if (stretchCur) { - old[i] = stretchCur; - } - } - return old; - } - - // Used to 'clip' out readOnly ranges when making a change. - function removeReadOnlyRanges(doc, from, to) { - var markers = null; - doc.iter(from.line, to.line + 1, function(line) { - if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { - var mark = line.markedSpans[i].marker; - if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) - (markers || (markers = [])).push(mark); - } - }); - if (!markers) return null; - var parts = [{from: from, to: to}]; - for (var i = 0; i < markers.length; ++i) { - var mk = markers[i], m = mk.find(0); - for (var j = 0; j < parts.length; ++j) { - var p = parts[j]; - if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue; - var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); - if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) - newParts.push({from: p.from, to: m.from}); - if (dto > 0 || !mk.inclusiveRight && !dto) - newParts.push({from: m.to, to: p.to}); - parts.splice.apply(parts, newParts); - j += newParts.length - 1; - } - } - return parts; - } - - // Connect or disconnect spans from a line. - function detachMarkedSpans(line) { - var spans = line.markedSpans; - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.detachLine(line); - line.markedSpans = null; - } - function attachMarkedSpans(line, spans) { - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.attachLine(line); - line.markedSpans = spans; - } - - // Helpers used when computing which overlapping collapsed span - // counts as the larger one. - function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; } - function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; } - - // Returns a number indicating which of two overlapping collapsed - // spans is larger (and thus includes the other). Falls back to - // comparing ids when the spans cover exactly the same range. - function compareCollapsedMarkers(a, b) { - var lenDiff = a.lines.length - b.lines.length; - if (lenDiff != 0) return lenDiff; - var aPos = a.find(), bPos = b.find(); - var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); - if (fromCmp) return -fromCmp; - var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); - if (toCmp) return toCmp; - return b.id - a.id; - } - - // Find out whether a line ends or starts in a collapsed span. If - // so, return the marker for that span. - function collapsedSpanAtSide(line, start) { - var sps = sawCollapsedSpans && line.markedSpans, found; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && - (!found || compareCollapsedMarkers(found, sp.marker) < 0)) - found = sp.marker; - } - return found; - } - function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); } - function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); } - - // Test whether there exists a collapsed span that partially - // overlaps (covers the start or end, but not both) of a new span. - // Such overlap is not allowed. - function conflictingCollapsedRange(doc, lineNo, from, to, marker) { - var line = getLine(doc, lineNo); - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) for (var i = 0; i < sps.length; ++i) { - var sp = sps[i]; - if (!sp.marker.collapsed) continue; - var found = sp.marker.find(0); - var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); - var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); - if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; - if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) || - fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight))) - return true; - } - } - - // A visual line is a line as drawn on the screen. Folding, for - // example, can cause multiple logical lines to appear on the same - // visual line. This finds the start of the visual line that the - // given line is part of (usually that is the line itself). - function visualLine(line) { - var merged; - while (merged = collapsedSpanAtStart(line)) - line = merged.find(-1, true).line; - return line; - } - - // Returns an array of logical lines that continue the visual line - // started by the argument, or undefined if there are no such lines. - function visualLineContinued(line) { - var merged, lines; - while (merged = collapsedSpanAtEnd(line)) { - line = merged.find(1, true).line; - (lines || (lines = [])).push(line); - } - return lines; - } - - // Get the line number of the start of the visual line that the - // given line number is part of. - function visualLineNo(doc, lineN) { - var line = getLine(doc, lineN), vis = visualLine(line); - if (line == vis) return lineN; - return lineNo(vis); - } - // Get the line number of the start of the next visual line after - // the given line. - function visualLineEndNo(doc, lineN) { - if (lineN > doc.lastLine()) return lineN; - var line = getLine(doc, lineN), merged; - if (!lineIsHidden(doc, line)) return lineN; - while (merged = collapsedSpanAtEnd(line)) - line = merged.find(1, true).line; - return lineNo(line) + 1; - } - - // Compute whether a line is hidden. Lines count as hidden when they - // are part of a visual line that starts with another line, or when - // they are entirely covered by collapsed, non-widget span. - function lineIsHidden(doc, line) { - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (!sp.marker.collapsed) continue; - if (sp.from == null) return true; - if (sp.marker.widgetNode) continue; - if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) - return true; - } - } - function lineIsHiddenInner(doc, line, span) { - if (span.to == null) { - var end = span.marker.find(1, true); - return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); - } - if (span.marker.inclusiveRight && span.to == line.text.length) - return true; - for (var sp, i = 0; i < line.markedSpans.length; ++i) { - sp = line.markedSpans[i]; - if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && - (sp.to == null || sp.to != span.from) && - (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && - lineIsHiddenInner(doc, line, sp)) return true; - } - } - - // LINE WIDGETS - - // Line widgets are block elements displayed above or below a line. - - var LineWidget = CodeMirror.LineWidget = function(doc, node, options) { - if (options) for (var opt in options) if (options.hasOwnProperty(opt)) - this[opt] = options[opt]; - this.doc = doc; - this.node = node; - }; - eventMixin(LineWidget); - - function adjustScrollWhenAboveVisible(cm, line, diff) { - if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) - addToScrollPos(cm, null, diff); - } - - LineWidget.prototype.clear = function() { - var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); - if (no == null || !ws) return; - for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); - if (!ws.length) line.widgets = null; - var height = widgetHeight(this); - updateLineHeight(line, Math.max(0, line.height - height)); - if (cm) runInOp(cm, function() { - adjustScrollWhenAboveVisible(cm, line, -height); - regLineChange(cm, no, "widget"); - }); - }; - LineWidget.prototype.changed = function() { - var oldH = this.height, cm = this.doc.cm, line = this.line; - this.height = null; - var diff = widgetHeight(this) - oldH; - if (!diff) return; - updateLineHeight(line, line.height + diff); - if (cm) runInOp(cm, function() { - cm.curOp.forceUpdate = true; - adjustScrollWhenAboveVisible(cm, line, diff); - }); - }; - - function widgetHeight(widget) { - if (widget.height != null) return widget.height; - var cm = widget.doc.cm; - if (!cm) return 0; - if (!contains(document.body, widget.node)) { - var parentStyle = "position: relative;"; - if (widget.coverGutter) - parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; - if (widget.noHScroll) - parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; - removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); - } - return widget.height = widget.node.offsetHeight; - } - - function addLineWidget(doc, handle, node, options) { - var widget = new LineWidget(doc, node, options); - var cm = doc.cm; - if (cm && widget.noHScroll) cm.display.alignWidgets = true; - changeLine(doc, handle, "widget", function(line) { - var widgets = line.widgets || (line.widgets = []); - if (widget.insertAt == null) widgets.push(widget); - else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); - widget.line = line; - if (cm && !lineIsHidden(doc, line)) { - var aboveVisible = heightAtLine(line) < doc.scrollTop; - updateLineHeight(line, line.height + widgetHeight(widget)); - if (aboveVisible) addToScrollPos(cm, null, widget.height); - cm.curOp.forceUpdate = true; - } - return true; - }); - return widget; - } - - // LINE DATA STRUCTURE - - // Line objects. These hold state related to a line, including - // highlighting info (the styles array). - var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { - this.text = text; - attachMarkedSpans(this, markedSpans); - this.height = estimateHeight ? estimateHeight(this) : 1; - }; - eventMixin(Line); - Line.prototype.lineNo = function() { return lineNo(this); }; - - // Change the content (text, markers) of a line. Automatically - // invalidates cached information and tries to re-estimate the - // line's height. - function updateLine(line, text, markedSpans, estimateHeight) { - line.text = text; - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - if (line.order != null) line.order = null; - detachMarkedSpans(line); - attachMarkedSpans(line, markedSpans); - var estHeight = estimateHeight ? estimateHeight(line) : 1; - if (estHeight != line.height) updateLineHeight(line, estHeight); - } - - // Detach a line from the document tree and its markers. - function cleanUpLine(line) { - line.parent = null; - detachMarkedSpans(line); - } - - function extractLineClasses(type, output) { - if (type) for (;;) { - var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); - if (!lineClass) break; - type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); - var prop = lineClass[1] ? "bgClass" : "textClass"; - if (output[prop] == null) - output[prop] = lineClass[2]; - else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) - output[prop] += " " + lineClass[2]; - } - return type; - } - - function callBlankLine(mode, state) { - if (mode.blankLine) return mode.blankLine(state); - if (!mode.innerMode) return; - var inner = CodeMirror.innerMode(mode, state); - if (inner.mode.blankLine) return inner.mode.blankLine(inner.state); - } - - function readToken(mode, stream, state, inner) { - for (var i = 0; i < 10; i++) { - if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode; - var style = mode.token(stream, state); - if (stream.pos > stream.start) return style; - } - throw new Error("Mode " + mode.name + " failed to advance stream."); - } - - // Utility for getTokenAt and getLineTokens - function takeToken(cm, pos, precise, asArray) { - function getObj(copy) { - return {start: stream.start, end: stream.pos, - string: stream.current(), - type: style || null, - state: copy ? copyState(doc.mode, state) : state}; - } - - var doc = cm.doc, mode = doc.mode, style; - pos = clipPos(doc, pos); - var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise); - var stream = new StringStream(line.text, cm.options.tabSize), tokens; - if (asArray) tokens = []; - while ((asArray || stream.pos < pos.ch) && !stream.eol()) { - stream.start = stream.pos; - style = readToken(mode, stream, state); - if (asArray) tokens.push(getObj(true)); - } - return asArray ? tokens : getObj(); - } - - // Run the given mode's parser over a line, calling f for each token. - function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) { - var flattenSpans = mode.flattenSpans; - if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; - var curStart = 0, curStyle = null; - var stream = new StringStream(text, cm.options.tabSize), style; - var inner = cm.options.addModeClass && [null]; - if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses); - while (!stream.eol()) { - if (stream.pos > cm.options.maxHighlightLength) { - flattenSpans = false; - if (forceToEnd) processLine(cm, text, state, stream.pos); - stream.pos = text.length; - style = null; - } else { - style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses); - } - if (inner) { - var mName = inner[0].name; - if (mName) style = "m-" + (style ? mName + " " + style : mName); - } - if (!flattenSpans || curStyle != style) { - while (curStart < stream.start) { - curStart = Math.min(stream.start, curStart + 50000); - f(curStart, curStyle); - } - curStyle = style; - } - stream.start = stream.pos; - } - while (curStart < stream.pos) { - // Webkit seems to refuse to render text nodes longer than 57444 characters - var pos = Math.min(stream.pos, curStart + 50000); - f(pos, curStyle); - curStart = pos; - } - } - - // Compute a style array (an array starting with a mode generation - // -- for invalidation -- followed by pairs of end positions and - // style strings), which is used to highlight the tokens on the - // line. - function highlightLine(cm, line, state, forceToEnd) { - // A styles array always starts with a number identifying the - // mode/overlays that it is based on (for easy invalidation). - var st = [cm.state.modeGen], lineClasses = {}; - // Compute the base array of styles - runMode(cm, line.text, cm.doc.mode, state, function(end, style) { - st.push(end, style); - }, lineClasses, forceToEnd); - - // Run overlays, adjust style array. - for (var o = 0; o < cm.state.overlays.length; ++o) { - var overlay = cm.state.overlays[o], i = 1, at = 0; - runMode(cm, line.text, overlay.mode, true, function(end, style) { - var start = i; - // Ensure there's a token end at the current position, and that i points at it - while (at < end) { - var i_end = st[i]; - if (i_end > end) - st.splice(i, 1, end, st[i+1], i_end); - i += 2; - at = Math.min(end, i_end); - } - if (!style) return; - if (overlay.opaque) { - st.splice(start, i - start, end, "cm-overlay " + style); - i = start + 2; - } else { - for (; start < i; start += 2) { - var cur = st[start+1]; - st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style; - } - } - }, lineClasses); - } - - return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}; - } - - function getLineStyles(cm, line, updateFrontier) { - if (!line.styles || line.styles[0] != cm.state.modeGen) { - var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); - line.styles = result.styles; - if (result.classes) line.styleClasses = result.classes; - else if (line.styleClasses) line.styleClasses = null; - if (updateFrontier === cm.doc.frontier) cm.doc.frontier++; - } - return line.styles; - } - - // Lightweight form of highlight -- proceed over this line and - // update state, but don't save a style array. Used for lines that - // aren't currently visible. - function processLine(cm, text, state, startAt) { - var mode = cm.doc.mode; - var stream = new StringStream(text, cm.options.tabSize); - stream.start = stream.pos = startAt || 0; - if (text == "") callBlankLine(mode, state); - while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { - readToken(mode, stream, state); - stream.start = stream.pos; - } - } - - // Convert a style as returned by a mode (either null, or a string - // containing one or more styles) to a CSS style. This is cached, - // and also looks for line-wide styles. - var styleToClassCache = {}, styleToClassCacheWithMode = {}; - function interpretTokenStyle(style, options) { - if (!style || /^\s*$/.test(style)) return null; - var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; - return cache[style] || - (cache[style] = style.replace(/\S+/g, "cm-$&")); - } - - // Render the DOM representation of the text of a line. Also builds - // up a 'line map', which points at the DOM nodes that represent - // specific stretches of text, and is used by the measuring code. - // The returned object contains the DOM node, this map, and - // information about line-wide styles that were set by the mode. - function buildLineContent(cm, lineView) { - // The padding-right forces the element to have a 'border', which - // is needed on Webkit to be able to get line-level bounding - // rectangles for it (in measureChar). - var content = elt("span", null, null, webkit ? "padding-right: .1px" : null); - var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content, - col: 0, pos: 0, cm: cm, - splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}; - lineView.measure = {}; - - // Iterate over the logical lines that make up this visual line. - for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { - var line = i ? lineView.rest[i - 1] : lineView.line, order; - builder.pos = 0; - builder.addToken = buildToken; - // Optionally wire in some hacks into the token-rendering - // algorithm, to deal with browser quirks. - if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) - builder.addToken = buildTokenBadBidi(builder.addToken, order); - builder.map = []; - var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); - insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); - if (line.styleClasses) { - if (line.styleClasses.bgClass) - builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); - if (line.styleClasses.textClass) - builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); - } - - // Ensure at least a single node is present, for measuring. - if (builder.map.length == 0) - builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); - - // Store the map and a cache object for the current logical line - if (i == 0) { - lineView.measure.map = builder.map; - lineView.measure.cache = {}; - } else { - (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); - (lineView.measure.caches || (lineView.measure.caches = [])).push({}); - } - } - - // See issue #2901 - if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) - builder.content.className = "cm-tab-wrap-hack"; - - signal(cm, "renderLine", cm, lineView.line, builder.pre); - if (builder.pre.className) - builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); - - return builder; - } - - function defaultSpecialCharPlaceholder(ch) { - var token = elt("span", "\u2022", "cm-invalidchar"); - token.title = "\\u" + ch.charCodeAt(0).toString(16); - token.setAttribute("aria-label", token.title); - return token; - } - - // Build up the DOM representation for a single token, and add it to - // the line map. Takes care to render special characters separately. - function buildToken(builder, text, style, startStyle, endStyle, title, css) { - if (!text) return; - var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text; - var special = builder.cm.state.specialChars, mustWrap = false; - if (!special.test(text)) { - builder.col += text.length; - var content = document.createTextNode(displayText); - builder.map.push(builder.pos, builder.pos + text.length, content); - if (ie && ie_version < 9) mustWrap = true; - builder.pos += text.length; - } else { - var content = document.createDocumentFragment(), pos = 0; - while (true) { - special.lastIndex = pos; - var m = special.exec(text); - var skipped = m ? m.index - pos : text.length - pos; - if (skipped) { - var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); - if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); - else content.appendChild(txt); - builder.map.push(builder.pos, builder.pos + skipped, txt); - builder.col += skipped; - builder.pos += skipped; - } - if (!m) break; - pos += skipped + 1; - if (m[0] == "\t") { - var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; - var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); - txt.setAttribute("role", "presentation"); - txt.setAttribute("cm-text", "\t"); - builder.col += tabWidth; - } else { - var txt = builder.cm.options.specialCharPlaceholder(m[0]); - txt.setAttribute("cm-text", m[0]); - if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); - else content.appendChild(txt); - builder.col += 1; - } - builder.map.push(builder.pos, builder.pos + 1, txt); - builder.pos++; - } - } - if (style || startStyle || endStyle || mustWrap || css) { - var fullStyle = style || ""; - if (startStyle) fullStyle += startStyle; - if (endStyle) fullStyle += endStyle; - var token = elt("span", [content], fullStyle, css); - if (title) token.title = title; - return builder.content.appendChild(token); - } - builder.content.appendChild(content); - } - - function splitSpaces(old) { - var out = " "; - for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; - out += " "; - return out; - } - - // Work around nonsense dimensions being reported for stretches of - // right-to-left text. - function buildTokenBadBidi(inner, order) { - return function(builder, text, style, startStyle, endStyle, title, css) { - style = style ? style + " cm-force-border" : "cm-force-border"; - var start = builder.pos, end = start + text.length; - for (;;) { - // Find the part that overlaps with the start of this text - for (var i = 0; i < order.length; i++) { - var part = order[i]; - if (part.to > start && part.from <= start) break; - } - if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css); - inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css); - startStyle = null; - text = text.slice(part.to - start); - start = part.to; - } - }; - } - - function buildCollapsedSpan(builder, size, marker, ignoreWidget) { - var widget = !ignoreWidget && marker.widgetNode; - if (widget) builder.map.push(builder.pos, builder.pos + size, widget); - if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { - if (!widget) - widget = builder.content.appendChild(document.createElement("span")); - widget.setAttribute("cm-marker", marker.id); - } - if (widget) { - builder.cm.display.input.setUneditable(widget); - builder.content.appendChild(widget); - } - builder.pos += size; - } - - // Outputs a number of spans to make up a line, taking highlighting - // and marked text into account. - function insertLineContent(line, builder, styles) { - var spans = line.markedSpans, allText = line.text, at = 0; - if (!spans) { - for (var i = 1; i < styles.length; i+=2) - builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)); - return; - } - - var len = allText.length, pos = 0, i = 1, text = "", style, css; - var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; - for (;;) { - if (nextChange == pos) { // Update current marker set - spanStyle = spanEndStyle = spanStartStyle = title = css = ""; - collapsed = null; nextChange = Infinity; - var foundBookmarks = []; - for (var j = 0; j < spans.length; ++j) { - var sp = spans[j], m = sp.marker; - if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { - foundBookmarks.push(m); - } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { - if (sp.to != null && sp.to != pos && nextChange > sp.to) { - nextChange = sp.to; - spanEndStyle = ""; - } - if (m.className) spanStyle += " " + m.className; - if (m.css) css = m.css; - if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; - if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; - if (m.title && !title) title = m.title; - if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) - collapsed = sp; - } else if (sp.from > pos && nextChange > sp.from) { - nextChange = sp.from; - } - } - if (collapsed && (collapsed.from || 0) == pos) { - buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, - collapsed.marker, collapsed.from == null); - if (collapsed.to == null) return; - if (collapsed.to == pos) collapsed = false; - } - if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) - buildCollapsedSpan(builder, 0, foundBookmarks[j]); - } - if (pos >= len) break; - - var upto = Math.min(len, nextChange); - while (true) { - if (text) { - var end = pos + text.length; - if (!collapsed) { - var tokenText = end > upto ? text.slice(0, upto - pos) : text; - builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, - spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css); - } - if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} - pos = end; - spanStartStyle = ""; - } - text = allText.slice(at, at = styles[i++]); - style = interpretTokenStyle(styles[i++], builder.cm.options); - } - } - } - - // DOCUMENT DATA STRUCTURE - - // By default, updates that start and end at the beginning of a line - // are treated specially, in order to make the association of line - // widgets and marker elements with the text behave more intuitive. - function isWholeLineUpdate(doc, change) { - return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && - (!doc.cm || doc.cm.options.wholeLineUpdateBefore); - } - - // Perform a change on the document data structure. - function updateDoc(doc, change, markedSpans, estimateHeight) { - function spansFor(n) {return markedSpans ? markedSpans[n] : null;} - function update(line, text, spans) { - updateLine(line, text, spans, estimateHeight); - signalLater(line, "change", line, change); - } - function linesFor(start, end) { - for (var i = start, result = []; i < end; ++i) - result.push(new Line(text[i], spansFor(i), estimateHeight)); - return result; - } - - var from = change.from, to = change.to, text = change.text; - var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); - var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; - - // Adjust the line structure - if (change.full) { - doc.insert(0, linesFor(0, text.length)); - doc.remove(text.length, doc.size - text.length); - } else if (isWholeLineUpdate(doc, change)) { - // This is a whole-line replace. Treated specially to make - // sure line objects move the way they are supposed to. - var added = linesFor(0, text.length - 1); - update(lastLine, lastLine.text, lastSpans); - if (nlines) doc.remove(from.line, nlines); - if (added.length) doc.insert(from.line, added); - } else if (firstLine == lastLine) { - if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); - } else { - var added = linesFor(1, text.length - 1); - added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - doc.insert(from.line + 1, added); - } - } else if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); - doc.remove(from.line + 1, nlines); - } else { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); - var added = linesFor(1, text.length - 1); - if (nlines > 1) doc.remove(from.line + 1, nlines - 1); - doc.insert(from.line + 1, added); - } - - signalLater(doc, "change", doc, change); - } - - // The document is represented as a BTree consisting of leaves, with - // chunk of lines in them, and branches, with up to ten leaves or - // other branch nodes below them. The top node is always a branch - // node, and is the document object itself (meaning it has - // additional methods and properties). - // - // All nodes have parent links. The tree is used both to go from - // line numbers to line objects, and to go from objects to numbers. - // It also indexes by height, and is used to convert between height - // and line object, and to find the total height of the document. - // - // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html - - function LeafChunk(lines) { - this.lines = lines; - this.parent = null; - for (var i = 0, height = 0; i < lines.length; ++i) { - lines[i].parent = this; - height += lines[i].height; - } - this.height = height; - } - - LeafChunk.prototype = { - chunkSize: function() { return this.lines.length; }, - // Remove the n lines at offset 'at'. - removeInner: function(at, n) { - for (var i = at, e = at + n; i < e; ++i) { - var line = this.lines[i]; - this.height -= line.height; - cleanUpLine(line); - signalLater(line, "delete"); - } - this.lines.splice(at, n); - }, - // Helper used to collapse a small branch into a single leaf. - collapse: function(lines) { - lines.push.apply(lines, this.lines); - }, - // Insert the given array of lines at offset 'at', count them as - // having the given height. - insertInner: function(at, lines, height) { - this.height += height; - this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); - for (var i = 0; i < lines.length; ++i) lines[i].parent = this; - }, - // Used to iterate over a part of the tree. - iterN: function(at, n, op) { - for (var e = at + n; at < e; ++at) - if (op(this.lines[at])) return true; - } - }; - - function BranchChunk(children) { - this.children = children; - var size = 0, height = 0; - for (var i = 0; i < children.length; ++i) { - var ch = children[i]; - size += ch.chunkSize(); height += ch.height; - ch.parent = this; - } - this.size = size; - this.height = height; - this.parent = null; - } - - BranchChunk.prototype = { - chunkSize: function() { return this.size; }, - removeInner: function(at, n) { - this.size -= n; - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var rm = Math.min(n, sz - at), oldHeight = child.height; - child.removeInner(at, rm); - this.height -= oldHeight - child.height; - if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } - if ((n -= rm) == 0) break; - at = 0; - } else at -= sz; - } - // If the result is smaller than 25 lines, ensure that it is a - // single leaf node. - if (this.size - n < 25 && - (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { - var lines = []; - this.collapse(lines); - this.children = [new LeafChunk(lines)]; - this.children[0].parent = this; - } - }, - collapse: function(lines) { - for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines); - }, - insertInner: function(at, lines, height) { - this.size += lines.length; - this.height += height; - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at <= sz) { - child.insertInner(at, lines, height); - if (child.lines && child.lines.length > 50) { - while (child.lines.length > 50) { - var spilled = child.lines.splice(child.lines.length - 25, 25); - var newleaf = new LeafChunk(spilled); - child.height -= newleaf.height; - this.children.splice(i + 1, 0, newleaf); - newleaf.parent = this; - } - this.maybeSpill(); - } - break; - } - at -= sz; - } - }, - // When a node has grown, check whether it should be split. - maybeSpill: function() { - if (this.children.length <= 10) return; - var me = this; - do { - var spilled = me.children.splice(me.children.length - 5, 5); - var sibling = new BranchChunk(spilled); - if (!me.parent) { // Become the parent node - var copy = new BranchChunk(me.children); - copy.parent = me; - me.children = [copy, sibling]; - me = copy; - } else { - me.size -= sibling.size; - me.height -= sibling.height; - var myIndex = indexOf(me.parent.children, me); - me.parent.children.splice(myIndex + 1, 0, sibling); - } - sibling.parent = me.parent; - } while (me.children.length > 10); - me.parent.maybeSpill(); - }, - iterN: function(at, n, op) { - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var used = Math.min(n, sz - at); - if (child.iterN(at, used, op)) return true; - if ((n -= used) == 0) break; - at = 0; - } else at -= sz; - } - } - }; - - var nextDocId = 0; - var Doc = CodeMirror.Doc = function(text, mode, firstLine) { - if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); - if (firstLine == null) firstLine = 0; - - BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); - this.first = firstLine; - this.scrollTop = this.scrollLeft = 0; - this.cantEdit = false; - this.cleanGeneration = 1; - this.frontier = firstLine; - var start = Pos(firstLine, 0); - this.sel = simpleSelection(start); - this.history = new History(null); - this.id = ++nextDocId; - this.modeOption = mode; - - if (typeof text == "string") text = splitLines(text); - updateDoc(this, {from: start, to: start, text: text}); - setSelection(this, simpleSelection(start), sel_dontScroll); - }; - - Doc.prototype = createObj(BranchChunk.prototype, { - constructor: Doc, - // Iterate over the document. Supports two forms -- with only one - // argument, it calls that for each line in the document. With - // three, it iterates over the range given by the first two (with - // the second being non-inclusive). - iter: function(from, to, op) { - if (op) this.iterN(from - this.first, to - from, op); - else this.iterN(this.first, this.first + this.size, from); - }, - - // Non-public interface for adding and removing lines. - insert: function(at, lines) { - var height = 0; - for (var i = 0; i < lines.length; ++i) height += lines[i].height; - this.insertInner(at - this.first, lines, height); - }, - remove: function(at, n) { this.removeInner(at - this.first, n); }, - - // From here, the methods are part of the public interface. Most - // are also available from CodeMirror (editor) instances. - - getValue: function(lineSep, lineFilter) { - var lines = getLines(this, this.first, this.first + this.size, lineFilter); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - setValue: docMethodOp(function(code) { - var top = Pos(this.first, 0), last = this.first + this.size - 1; - makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), - text: splitLines(code), origin: "setValue", full: true}, true); - setSelection(this, simpleSelection(top)); - }), - replaceRange: function(code, from, to, origin) { - from = clipPos(this, from); - to = to ? clipPos(this, to) : from; - replaceRange(this, code, from, to, origin); - }, - getRange: function(from, to, lineSep) { - var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - - getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, - - getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, - getLineNumber: function(line) {return lineNo(line);}, - - getLineHandleVisualStart: function(line) { - if (typeof line == "number") line = getLine(this, line); - return visualLine(line); - }, - - lineCount: function() {return this.size;}, - firstLine: function() {return this.first;}, - lastLine: function() {return this.first + this.size - 1;}, - - clipPos: function(pos) {return clipPos(this, pos);}, - - getCursor: function(start) { - var range = this.sel.primary(), pos; - if (start == null || start == "head") pos = range.head; - else if (start == "anchor") pos = range.anchor; - else if (start == "end" || start == "to" || start === false) pos = range.to(); - else pos = range.from(); - return pos; - }, - listSelections: function() { return this.sel.ranges; }, - somethingSelected: function() {return this.sel.somethingSelected();}, - - setCursor: docMethodOp(function(line, ch, options) { - setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); - }), - setSelection: docMethodOp(function(anchor, head, options) { - setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); - }), - extendSelection: docMethodOp(function(head, other, options) { - extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); - }), - extendSelections: docMethodOp(function(heads, options) { - extendSelections(this, clipPosArray(this, heads, options)); - }), - extendSelectionsBy: docMethodOp(function(f, options) { - extendSelections(this, map(this.sel.ranges, f), options); - }), - setSelections: docMethodOp(function(ranges, primary, options) { - if (!ranges.length) return; - for (var i = 0, out = []; i < ranges.length; i++) - out[i] = new Range(clipPos(this, ranges[i].anchor), - clipPos(this, ranges[i].head)); - if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex); - setSelection(this, normalizeSelection(out, primary), options); - }), - addSelection: docMethodOp(function(anchor, head, options) { - var ranges = this.sel.ranges.slice(0); - ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); - setSelection(this, normalizeSelection(ranges, ranges.length - 1), options); - }), - - getSelection: function(lineSep) { - var ranges = this.sel.ranges, lines; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this, ranges[i].from(), ranges[i].to()); - lines = lines ? lines.concat(sel) : sel; - } - if (lineSep === false) return lines; - else return lines.join(lineSep || "\n"); - }, - getSelections: function(lineSep) { - var parts = [], ranges = this.sel.ranges; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this, ranges[i].from(), ranges[i].to()); - if (lineSep !== false) sel = sel.join(lineSep || "\n"); - parts[i] = sel; - } - return parts; - }, - replaceSelection: function(code, collapse, origin) { - var dup = []; - for (var i = 0; i < this.sel.ranges.length; i++) - dup[i] = code; - this.replaceSelections(dup, collapse, origin || "+input"); - }, - replaceSelections: docMethodOp(function(code, collapse, origin) { - var changes = [], sel = this.sel; - for (var i = 0; i < sel.ranges.length; i++) { - var range = sel.ranges[i]; - changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin}; - } - var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); - for (var i = changes.length - 1; i >= 0; i--) - makeChange(this, changes[i]); - if (newSel) setSelectionReplaceHistory(this, newSel); - else if (this.cm) ensureCursorVisible(this.cm); - }), - undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), - redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), - undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), - redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), - - setExtending: function(val) {this.extend = val;}, - getExtending: function() {return this.extend;}, - - historySize: function() { - var hist = this.history, done = 0, undone = 0; - for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done; - for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone; - return {undo: done, redo: undone}; - }, - clearHistory: function() {this.history = new History(this.history.maxGeneration);}, - - markClean: function() { - this.cleanGeneration = this.changeGeneration(true); - }, - changeGeneration: function(forceSplit) { - if (forceSplit) - this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; - return this.history.generation; - }, - isClean: function (gen) { - return this.history.generation == (gen || this.cleanGeneration); - }, - - getHistory: function() { - return {done: copyHistoryArray(this.history.done), - undone: copyHistoryArray(this.history.undone)}; - }, - setHistory: function(histData) { - var hist = this.history = new History(this.history.maxGeneration); - hist.done = copyHistoryArray(histData.done.slice(0), null, true); - hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); - }, - - addLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - if (!line[prop]) line[prop] = cls; - else if (classTest(cls).test(line[prop])) return false; - else line[prop] += " " + cls; - return true; - }); - }), - removeLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - var cur = line[prop]; - if (!cur) return false; - else if (cls == null) line[prop] = null; - else { - var found = cur.match(classTest(cls)); - if (!found) return false; - var end = found.index + found[0].length; - line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; - } - return true; - }); - }), - - addLineWidget: docMethodOp(function(handle, node, options) { - return addLineWidget(this, handle, node, options); - }), - removeLineWidget: function(widget) { widget.clear(); }, - - markText: function(from, to, options) { - return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); - }, - setBookmark: function(pos, options) { - var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), - insertLeft: options && options.insertLeft, - clearWhenEmpty: false, shared: options && options.shared, - handleMouseEvents: options && options.handleMouseEvents}; - pos = clipPos(this, pos); - return markText(this, pos, pos, realOpts, "bookmark"); - }, - findMarksAt: function(pos) { - pos = clipPos(this, pos); - var markers = [], spans = getLine(this, pos.line).markedSpans; - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if ((span.from == null || span.from <= pos.ch) && - (span.to == null || span.to >= pos.ch)) - markers.push(span.marker.parent || span.marker); - } - return markers; - }, - findMarks: function(from, to, filter) { - from = clipPos(this, from); to = clipPos(this, to); - var found = [], lineNo = from.line; - this.iter(from.line, to.line + 1, function(line) { - var spans = line.markedSpans; - if (spans) for (var i = 0; i < spans.length; i++) { - var span = spans[i]; - if (!(lineNo == from.line && from.ch > span.to || - span.from == null && lineNo != from.line|| - lineNo == to.line && span.from > to.ch) && - (!filter || filter(span.marker))) - found.push(span.marker.parent || span.marker); - } - ++lineNo; - }); - return found; - }, - getAllMarks: function() { - var markers = []; - this.iter(function(line) { - var sps = line.markedSpans; - if (sps) for (var i = 0; i < sps.length; ++i) - if (sps[i].from != null) markers.push(sps[i].marker); - }); - return markers; - }, - - posFromIndex: function(off) { - var ch, lineNo = this.first; - this.iter(function(line) { - var sz = line.text.length + 1; - if (sz > off) { ch = off; return true; } - off -= sz; - ++lineNo; - }); - return clipPos(this, Pos(lineNo, ch)); - }, - indexFromPos: function (coords) { - coords = clipPos(this, coords); - var index = coords.ch; - if (coords.line < this.first || coords.ch < 0) return 0; - this.iter(this.first, coords.line, function (line) { - index += line.text.length + 1; - }); - return index; - }, - - copy: function(copyHistory) { - var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); - doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; - doc.sel = this.sel; - doc.extend = false; - if (copyHistory) { - doc.history.undoDepth = this.history.undoDepth; - doc.setHistory(this.getHistory()); - } - return doc; - }, - - linkedDoc: function(options) { - if (!options) options = {}; - var from = this.first, to = this.first + this.size; - if (options.from != null && options.from > from) from = options.from; - if (options.to != null && options.to < to) to = options.to; - var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); - if (options.sharedHist) copy.history = this.history; - (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); - copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; - copySharedMarkers(copy, findSharedMarkers(this)); - return copy; - }, - unlinkDoc: function(other) { - if (other instanceof CodeMirror) other = other.doc; - if (this.linked) for (var i = 0; i < this.linked.length; ++i) { - var link = this.linked[i]; - if (link.doc != other) continue; - this.linked.splice(i, 1); - other.unlinkDoc(this); - detachSharedMarkers(findSharedMarkers(this)); - break; - } - // If the histories were shared, split them again - if (other.history == this.history) { - var splitIds = [other.id]; - linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); - other.history = new History(null); - other.history.done = copyHistoryArray(this.history.done, splitIds); - other.history.undone = copyHistoryArray(this.history.undone, splitIds); - } - }, - iterLinkedDocs: function(f) {linkedDocs(this, f);}, - - getMode: function() {return this.mode;}, - getEditor: function() {return this.cm;} - }); - - // Public alias. - Doc.prototype.eachLine = Doc.prototype.iter; - - // Set up methods on CodeMirror's prototype to redirect to the editor's document. - var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); - for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) - CodeMirror.prototype[prop] = (function(method) { - return function() {return method.apply(this.doc, arguments);}; - })(Doc.prototype[prop]); - - eventMixin(Doc); - - // Call f for all linked documents. - function linkedDocs(doc, f, sharedHistOnly) { - function propagate(doc, skip, sharedHist) { - if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { - var rel = doc.linked[i]; - if (rel.doc == skip) continue; - var shared = sharedHist && rel.sharedHist; - if (sharedHistOnly && !shared) continue; - f(rel.doc, shared); - propagate(rel.doc, doc, shared); - } - } - propagate(doc, null, true); - } - - // Attach a document to an editor. - function attachDoc(cm, doc) { - if (doc.cm) throw new Error("This document is already in use."); - cm.doc = doc; - doc.cm = cm; - estimateLineHeights(cm); - loadMode(cm); - if (!cm.options.lineWrapping) findMaxLine(cm); - cm.options.mode = doc.modeOption; - regChange(cm); - } - - // LINE UTILITIES - - // Find the line object corresponding to the given line number. - function getLine(doc, n) { - n -= doc.first; - if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document."); - for (var chunk = doc; !chunk.lines;) { - for (var i = 0;; ++i) { - var child = chunk.children[i], sz = child.chunkSize(); - if (n < sz) { chunk = child; break; } - n -= sz; - } - } - return chunk.lines[n]; - } - - // Get the part of a document between two positions, as an array of - // strings. - function getBetween(doc, start, end) { - var out = [], n = start.line; - doc.iter(start.line, end.line + 1, function(line) { - var text = line.text; - if (n == end.line) text = text.slice(0, end.ch); - if (n == start.line) text = text.slice(start.ch); - out.push(text); - ++n; - }); - return out; - } - // Get the lines between from and to, as array of strings. - function getLines(doc, from, to, lineFilter) { - var out = []; - doc.iter(from, to, function(line) { - var text = line.text; - if(lineFilter){ - text = lineFilter(line); - } - out.push(text); - }); - return out; - } - - // Update the height of a line, propagating the height change - // upwards to parent nodes. - function updateLineHeight(line, height) { - var diff = height - line.height; - if (diff) for (var n = line; n; n = n.parent) n.height += diff; - } - - // Given a line object, find its line number by walking up through - // its parent links. - function lineNo(line) { - if (line.parent == null) return null; - var cur = line.parent, no = indexOf(cur.lines, line); - for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { - for (var i = 0;; ++i) { - if (chunk.children[i] == cur) break; - no += chunk.children[i].chunkSize(); - } - } - return no + cur.first; - } - - // Find the line at the given vertical position, using the height - // information in the document tree. - function lineAtHeight(chunk, h) { - var n = chunk.first; - outer: do { - for (var i = 0; i < chunk.children.length; ++i) { - var child = chunk.children[i], ch = child.height; - if (h < ch) { chunk = child; continue outer; } - h -= ch; - n += child.chunkSize(); - } - return n; - } while (!chunk.lines); - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i], lh = line.height; - if (h < lh) break; - h -= lh; - } - return n + i; - } - - - // Find the height above the given line. - function heightAtLine(lineObj) { - lineObj = visualLine(lineObj); - - var h = 0, chunk = lineObj.parent; - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i]; - if (line == lineObj) break; - else h += line.height; - } - for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { - for (var i = 0; i < p.children.length; ++i) { - var cur = p.children[i]; - if (cur == chunk) break; - else h += cur.height; - } - } - return h; - } - - // Get the bidi ordering for the given line (and cache it). Returns - // false for lines that are fully left-to-right, and an array of - // BidiSpan objects otherwise. - function getOrder(line) { - var order = line.order; - if (order == null) order = line.order = bidiOrdering(line.text); - return order; - } - - // HISTORY - - function History(startGen) { - // Arrays of change events and selections. Doing something adds an - // event to done and clears undo. Undoing moves events from done - // to undone, redoing moves them in the other direction. - this.done = []; this.undone = []; - this.undoDepth = Infinity; - // Used to track when changes can be merged into a single undo - // event - this.lastModTime = this.lastSelTime = 0; - this.lastOp = this.lastSelOp = null; - this.lastOrigin = this.lastSelOrigin = null; - // Used by the isClean() method - this.generation = this.maxGeneration = startGen || 1; - } - - // Create a history change event from an updateDoc-style change - // object. - function historyChangeFromChange(doc, change) { - var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; - attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); - linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); - return histChange; - } - - // Pop all selection events off the end of a history array. Stop at - // a change event. - function clearSelectionEvents(array) { - while (array.length) { - var last = lst(array); - if (last.ranges) array.pop(); - else break; - } - } - - // Find the top change event in the history. Pop off selection - // events that are in the way. - function lastChangeEvent(hist, force) { - if (force) { - clearSelectionEvents(hist.done); - return lst(hist.done); - } else if (hist.done.length && !lst(hist.done).ranges) { - return lst(hist.done); - } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { - hist.done.pop(); - return lst(hist.done); - } - } - - // Register a change in the history. Merges changes that are within - // a single operation, ore are close together with an origin that - // allows merging (starting with "+") into a single event. - function addChangeToHistory(doc, change, selAfter, opId) { - var hist = doc.history; - hist.undone.length = 0; - var time = +new Date, cur; - - if ((hist.lastOp == opId || - hist.lastOrigin == change.origin && change.origin && - ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) || - change.origin.charAt(0) == "*")) && - (cur = lastChangeEvent(hist, hist.lastOp == opId))) { - // Merge this change into the last event - var last = lst(cur.changes); - if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { - // Optimized case for simple insertion -- don't want to add - // new changesets for every character typed - last.to = changeEnd(change); - } else { - // Add new sub-event - cur.changes.push(historyChangeFromChange(doc, change)); - } - } else { - // Can not be merged, start a new event. - var before = lst(hist.done); - if (!before || !before.ranges) - pushSelectionToHistory(doc.sel, hist.done); - cur = {changes: [historyChangeFromChange(doc, change)], - generation: hist.generation}; - hist.done.push(cur); - while (hist.done.length > hist.undoDepth) { - hist.done.shift(); - if (!hist.done[0].ranges) hist.done.shift(); - } - } - hist.done.push(selAfter); - hist.generation = ++hist.maxGeneration; - hist.lastModTime = hist.lastSelTime = time; - hist.lastOp = hist.lastSelOp = opId; - hist.lastOrigin = hist.lastSelOrigin = change.origin; - - if (!last) signal(doc, "historyAdded"); - } - - function selectionEventCanBeMerged(doc, origin, prev, sel) { - var ch = origin.charAt(0); - return ch == "*" || - ch == "+" && - prev.ranges.length == sel.ranges.length && - prev.somethingSelected() == sel.somethingSelected() && - new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); - } - - // Called whenever the selection changes, sets the new selection as - // the pending selection in the history, and pushes the old pending - // selection into the 'done' array when it was significantly - // different (in number of selected ranges, emptiness, or time). - function addSelectionToHistory(doc, sel, opId, options) { - var hist = doc.history, origin = options && options.origin; - - // A new event is started when the previous origin does not match - // the current, or the origins don't allow matching. Origins - // starting with * are always merged, those starting with + are - // merged when similar and close together in time. - if (opId == hist.lastSelOp || - (origin && hist.lastSelOrigin == origin && - (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || - selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) - hist.done[hist.done.length - 1] = sel; - else - pushSelectionToHistory(sel, hist.done); - - hist.lastSelTime = +new Date; - hist.lastSelOrigin = origin; - hist.lastSelOp = opId; - if (options && options.clearRedo !== false) - clearSelectionEvents(hist.undone); - } - - function pushSelectionToHistory(sel, dest) { - var top = lst(dest); - if (!(top && top.ranges && top.equals(sel))) - dest.push(sel); - } - - // Used to store marked span information in the history. - function attachLocalSpans(doc, change, from, to) { - var existing = change["spans_" + doc.id], n = 0; - doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { - if (line.markedSpans) - (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; - ++n; - }); - } - - // When un/re-doing restores text containing marked spans, those - // that have been explicitly cleared should not be restored. - function removeClearedSpans(spans) { - if (!spans) return null; - for (var i = 0, out; i < spans.length; ++i) { - if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } - else if (out) out.push(spans[i]); - } - return !out ? spans : out.length ? out : null; - } - - // Retrieve and filter the old marked spans stored in a change event. - function getOldSpans(doc, change) { - var found = change["spans_" + doc.id]; - if (!found) return null; - for (var i = 0, nw = []; i < change.text.length; ++i) - nw.push(removeClearedSpans(found[i])); - return nw; - } - - // Used both to provide a JSON-safe object in .getHistory, and, when - // detaching a document, to split the history in two - function copyHistoryArray(events, newGroup, instantiateSel) { - for (var i = 0, copy = []; i < events.length; ++i) { - var event = events[i]; - if (event.ranges) { - copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); - continue; - } - var changes = event.changes, newChanges = []; - copy.push({changes: newChanges}); - for (var j = 0; j < changes.length; ++j) { - var change = changes[j], m; - newChanges.push({from: change.from, to: change.to, text: change.text}); - if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { - if (indexOf(newGroup, Number(m[1])) > -1) { - lst(newChanges)[prop] = change[prop]; - delete change[prop]; - } - } - } - } - return copy; - } - - // Rebasing/resetting history to deal with externally-sourced changes - - function rebaseHistSelSingle(pos, from, to, diff) { - if (to < pos.line) { - pos.line += diff; - } else if (from < pos.line) { - pos.line = from; - pos.ch = 0; - } - } - - // Tries to rebase an array of history events given a change in the - // document. If the change touches the same lines as the event, the - // event, and everything 'behind' it, is discarded. If the change is - // before the event, the event's positions are updated. Uses a - // copy-on-write scheme for the positions, to avoid having to - // reallocate them all on every rebase, but also avoid problems with - // shared position objects being unsafely updated. - function rebaseHistArray(array, from, to, diff) { - for (var i = 0; i < array.length; ++i) { - var sub = array[i], ok = true; - if (sub.ranges) { - if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } - for (var j = 0; j < sub.ranges.length; j++) { - rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); - rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); - } - continue; - } - for (var j = 0; j < sub.changes.length; ++j) { - var cur = sub.changes[j]; - if (to < cur.from.line) { - cur.from = Pos(cur.from.line + diff, cur.from.ch); - cur.to = Pos(cur.to.line + diff, cur.to.ch); - } else if (from <= cur.to.line) { - ok = false; - break; - } - } - if (!ok) { - array.splice(0, i + 1); - i = 0; - } - } - } - - function rebaseHist(hist, change) { - var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; - rebaseHistArray(hist.done, from, to, diff); - rebaseHistArray(hist.undone, from, to, diff); - } - - // EVENT UTILITIES - - // Due to the fact that we still support jurassic IE versions, some - // compatibility wrappers are needed. - - var e_preventDefault = CodeMirror.e_preventDefault = function(e) { - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - }; - var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) { - if (e.stopPropagation) e.stopPropagation(); - else e.cancelBubble = true; - }; - function e_defaultPrevented(e) { - return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; - } - var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);}; - - function e_target(e) {return e.target || e.srcElement;} - function e_button(e) { - var b = e.which; - if (b == null) { - if (e.button & 1) b = 1; - else if (e.button & 2) b = 3; - else if (e.button & 4) b = 2; - } - if (mac && e.ctrlKey && b == 1) b = 3; - return b; - } - - // EVENT HANDLING - - // Lightweight event framework. on/off also work on DOM nodes, - // registering native DOM handlers. - - var on = CodeMirror.on = function(emitter, type, f) { - if (emitter.addEventListener) - emitter.addEventListener(type, f, false); - else if (emitter.attachEvent) - emitter.attachEvent("on" + type, f); - else { - var map = emitter._handlers || (emitter._handlers = {}); - var arr = map[type] || (map[type] = []); - arr.push(f); - } - }; - - var off = CodeMirror.off = function(emitter, type, f) { - if (emitter.removeEventListener) - emitter.removeEventListener(type, f, false); - else if (emitter.detachEvent) - emitter.detachEvent("on" + type, f); - else { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - for (var i = 0; i < arr.length; ++i) - if (arr[i] == f) { arr.splice(i, 1); break; } - } - }; - - var signal = CodeMirror.signal = function(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2); - for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); - }; - - var orphanDelayedCallbacks = null; - - // Often, we want to signal events at a point where we are in the - // middle of some work, but don't want the handler to start calling - // other methods on the editor, which might be in an inconsistent - // state or simply not expect any other events to happen. - // signalLater looks whether there are any handlers, and schedules - // them to be executed when the last operation ends, or, if no - // operation is active, when a timeout fires. - function signalLater(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2), list; - if (operationGroup) { - list = operationGroup.delayedCallbacks; - } else if (orphanDelayedCallbacks) { - list = orphanDelayedCallbacks; - } else { - list = orphanDelayedCallbacks = []; - setTimeout(fireOrphanDelayed, 0); - } - function bnd(f) {return function(){f.apply(null, args);};}; - for (var i = 0; i < arr.length; ++i) - list.push(bnd(arr[i])); - } - - function fireOrphanDelayed() { - var delayed = orphanDelayedCallbacks; - orphanDelayedCallbacks = null; - for (var i = 0; i < delayed.length; ++i) delayed[i](); - } - - // The DOM events that CodeMirror handles can be overridden by - // registering a (non-DOM) handler on the editor for the event name, - // and preventDefault-ing the event in that handler. - function signalDOMEvent(cm, e, override) { - if (typeof e == "string") - e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; - signal(cm, override || e.type, cm, e); - return e_defaultPrevented(e) || e.codemirrorIgnore; - } - - function signalCursorActivity(cm) { - var arr = cm._handlers && cm._handlers.cursorActivity; - if (!arr) return; - var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); - for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) - set.push(arr[i]); - } - - function hasHandler(emitter, type) { - var arr = emitter._handlers && emitter._handlers[type]; - return arr && arr.length > 0; - } - - // Add on and off methods to a constructor's prototype, to make - // registering events on such objects more convenient. - function eventMixin(ctor) { - ctor.prototype.on = function(type, f) {on(this, type, f);}; - ctor.prototype.off = function(type, f) {off(this, type, f);}; - } - - // MISC UTILITIES - - // Number of pixels added to scroller and sizer to hide scrollbar - var scrollerGap = 30; - - // Returned or thrown by various protocols to signal 'I'm not - // handling this'. - var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; - - // Reused option objects for setSelection & friends - var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; - - function Delayed() {this.id = null;} - Delayed.prototype.set = function(ms, f) { - clearTimeout(this.id); - this.id = setTimeout(f, ms); - }; - - // Counts the column offset in a string, taking tabs into account. - // Used mostly to find indentation. - var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) end = string.length; - } - for (var i = startIndex || 0, n = startValue || 0;;) { - var nextTab = string.indexOf("\t", i); - if (nextTab < 0 || nextTab >= end) - return n + (end - i); - n += nextTab - i; - n += tabSize - (n % tabSize); - i = nextTab + 1; - } - }; - - // The inverse of countColumn -- find the offset that corresponds to - // a particular column. - function findColumn(string, goal, tabSize) { - for (var pos = 0, col = 0;;) { - var nextTab = string.indexOf("\t", pos); - if (nextTab == -1) nextTab = string.length; - var skipped = nextTab - pos; - if (nextTab == string.length || col + skipped >= goal) - return pos + Math.min(skipped, goal - col); - col += nextTab - pos; - col += tabSize - (col % tabSize); - pos = nextTab + 1; - if (col >= goal) return pos; - } - } - - var spaceStrs = [""]; - function spaceStr(n) { - while (spaceStrs.length <= n) - spaceStrs.push(lst(spaceStrs) + " "); - return spaceStrs[n]; - } - - function lst(arr) { return arr[arr.length-1]; } - - var selectInput = function(node) { node.select(); }; - if (ios) // Mobile Safari apparently has a bug where select() is broken. - selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; - else if (ie) // Suppress mysterious IE10 errors - selectInput = function(node) { try { node.select(); } catch(_e) {} }; - - function indexOf(array, elt) { - for (var i = 0; i < array.length; ++i) - if (array[i] == elt) return i; - return -1; - } - function map(array, f) { - var out = []; - for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); - return out; - } - - function nothing() {} - - function createObj(base, props) { - var inst; - if (Object.create) { - inst = Object.create(base); - } else { - nothing.prototype = base; - inst = new nothing(); - } - if (props) copyObj(props, inst); - return inst; - }; - - function copyObj(obj, target, overwrite) { - if (!target) target = {}; - for (var prop in obj) - if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) - target[prop] = obj[prop]; - return target; - } - - function bind(f) { - var args = Array.prototype.slice.call(arguments, 1); - return function(){return f.apply(null, args);}; - } - - var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; - var isWordCharBasic = CodeMirror.isWordChar = function(ch) { - return /\w/.test(ch) || ch > "\x80" && - (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); - }; - function isWordChar(ch, helper) { - if (!helper) return isWordCharBasic(ch); - if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; - return helper.test(ch); - } - - function isEmpty(obj) { - for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; - return true; - } - - // Extending unicode characters. A series of a non-extending char + - // any number of extending chars is treated as a single unit as far - // as editing and measuring is concerned. This is not fully correct, - // since some scripts/font/browsers also treat other configurations - // of code points as a group. - var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; - function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } - - // DOM UTILITIES - - function elt(tag, content, className, style) { - var e = document.createElement(tag); - if (className) e.className = className; - if (style) e.style.cssText = style; - if (typeof content == "string") e.appendChild(document.createTextNode(content)); - else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); - return e; - } - - var range; - if (document.createRange) range = function(node, start, end, endNode) { - var r = document.createRange(); - r.setEnd(endNode || node, end); - r.setStart(node, start); - return r; - }; - else range = function(node, start, end) { - var r = document.body.createTextRange(); - try { r.moveToElementText(node.parentNode); } - catch(e) { return r; } - r.collapse(true); - r.moveEnd("character", end); - r.moveStart("character", start); - return r; - }; - - function removeChildren(e) { - for (var count = e.childNodes.length; count > 0; --count) - e.removeChild(e.firstChild); - return e; - } - - function removeChildrenAndAdd(parent, e) { - return removeChildren(parent).appendChild(e); - } - - var contains = CodeMirror.contains = function(parent, child) { - if (child.nodeType == 3) // Android browser always returns false when child is a textnode - child = child.parentNode; - if (parent.contains) - return parent.contains(child); - do { - if (child.nodeType == 11) child = child.host; - if (child == parent) return true; - } while (child = child.parentNode); - }; - - function activeElt() { return document.activeElement; } - // Older versions of IE throws unspecified error when touching - // document.activeElement in some cases (during loading, in iframe) - if (ie && ie_version < 11) activeElt = function() { - try { return document.activeElement; } - catch(e) { return document.body; } - }; - - function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } - var rmClass = CodeMirror.rmClass = function(node, cls) { - var current = node.className; - var match = classTest(cls).exec(current); - if (match) { - var after = current.slice(match.index + match[0].length); - node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); - } - }; - var addClass = CodeMirror.addClass = function(node, cls) { - var current = node.className; - if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls; - }; - function joinClasses(a, b) { - var as = a.split(" "); - for (var i = 0; i < as.length; i++) - if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; - return b; - } - - // WINDOW-WIDE EVENTS - - // These must be handled carefully, because naively registering a - // handler for each editor will cause the editors to never be - // garbage collected. - - function forEachCodeMirror(f) { - if (!document.body.getElementsByClassName) return; - var byClass = document.body.getElementsByClassName("CodeMirror"); - for (var i = 0; i < byClass.length; i++) { - var cm = byClass[i].CodeMirror; - if (cm) f(cm); - } - } - - var globalsRegistered = false; - function ensureGlobalHandlers() { - if (globalsRegistered) return; - registerGlobalHandlers(); - globalsRegistered = true; - } - function registerGlobalHandlers() { - // When the window resizes, we need to refresh active editors. - var resizeTimer; - on(window, "resize", function() { - if (resizeTimer == null) resizeTimer = setTimeout(function() { - resizeTimer = null; - forEachCodeMirror(onResize); - }, 100); - }); - // When the window loses focus, we want to show the editor as blurred - on(window, "blur", function() { - forEachCodeMirror(onBlur); - }); - } - - // FEATURE DETECTION - - // Detect drag-and-drop - var dragAndDrop = function() { - // There is *some* kind of drag-and-drop support in IE6-8, but I - // couldn't get it to work yet. - if (ie && ie_version < 9) return false; - var div = elt('div'); - return "draggable" in div || "dragDrop" in div; - }(); - - var zwspSupported; - function zeroWidthElement(measure) { - if (zwspSupported == null) { - var test = elt("span", "\u200b"); - removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); - if (measure.firstChild.offsetHeight != 0) - zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); - } - var node = zwspSupported ? elt("span", "\u200b") : - elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); - node.setAttribute("cm-text", ""); - return node; - } - - // Feature-detect IE's crummy client rect reporting for bidi text - var badBidiRects; - function hasBadBidiRects(measure) { - if (badBidiRects != null) return badBidiRects; - var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); - var r0 = range(txt, 0, 1).getBoundingClientRect(); - if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) - var r1 = range(txt, 1, 2).getBoundingClientRect(); - return badBidiRects = (r1.right - r0.right < 3); - } - - // See if "".split is the broken IE version, if so, provide an - // alternative way to split lines. - var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { - var pos = 0, result = [], l = string.length; - while (pos <= l) { - var nl = string.indexOf("\n", pos); - if (nl == -1) nl = string.length; - var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); - var rt = line.indexOf("\r"); - if (rt != -1) { - result.push(line.slice(0, rt)); - pos += rt + 1; - } else { - result.push(line); - pos = nl + 1; - } - } - return result; - } : function(string){return string.split(/\r\n?|\n/);}; - - var hasSelection = window.getSelection ? function(te) { - try { return te.selectionStart != te.selectionEnd; } - catch(e) { return false; } - } : function(te) { - try {var range = te.ownerDocument.selection.createRange();} - catch(e) {} - if (!range || range.parentElement() != te) return false; - return range.compareEndPoints("StartToEnd", range) != 0; - }; - - var hasCopyEvent = (function() { - var e = elt("div"); - if ("oncopy" in e) return true; - e.setAttribute("oncopy", "return;"); - return typeof e.oncopy == "function"; - })(); - - var badZoomedRects = null; - function hasBadZoomedRects(measure) { - if (badZoomedRects != null) return badZoomedRects; - var node = removeChildrenAndAdd(measure, elt("span", "x")); - var normal = node.getBoundingClientRect(); - var fromRange = range(node, 0, 1).getBoundingClientRect(); - return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; - } - - // KEY NAMES - - var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", - 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", - 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", - 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 107: "=", 109: "-", 127: "Delete", - 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", - 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", - 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"}; - CodeMirror.keyNames = keyNames; - (function() { - // Number keys - for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i); - // Alphabetic keys - for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); - // Function keys - for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; - })(); - - // BIDI HELPERS - - function iterateBidiSections(order, from, to, f) { - if (!order) return f(from, to, "ltr"); - var found = false; - for (var i = 0; i < order.length; ++i) { - var part = order[i]; - if (part.from < to && part.to > from || from == to && part.to == from) { - f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); - found = true; - } - } - if (!found) f(from, to, "ltr"); - } - - function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } - function bidiRight(part) { return part.level % 2 ? part.from : part.to; } - - function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } - function lineRight(line) { - var order = getOrder(line); - if (!order) return line.text.length; - return bidiRight(lst(order)); - } - - function lineStart(cm, lineN) { - var line = getLine(cm.doc, lineN); - var visual = visualLine(line); - if (visual != line) lineN = lineNo(visual); - var order = getOrder(visual); - var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); - return Pos(lineN, ch); - } - function lineEnd(cm, lineN) { - var merged, line = getLine(cm.doc, lineN); - while (merged = collapsedSpanAtEnd(line)) { - line = merged.find(1, true).line; - lineN = null; - } - var order = getOrder(line); - var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); - return Pos(lineN == null ? lineNo(line) : lineN, ch); - } - function lineStartSmart(cm, pos) { - var start = lineStart(cm, pos.line); - var line = getLine(cm.doc, start.line); - var order = getOrder(line); - if (!order || order[0].level == 0) { - var firstNonWS = Math.max(0, line.text.search(/\S/)); - var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; - return Pos(start.line, inWS ? 0 : firstNonWS); - } - return start; - } - - function compareBidiLevel(order, a, b) { - var linedir = order[0].level; - if (a == linedir) return true; - if (b == linedir) return false; - return a < b; - } - var bidiOther; - function getBidiPartAt(order, pos) { - bidiOther = null; - for (var i = 0, found; i < order.length; ++i) { - var cur = order[i]; - if (cur.from < pos && cur.to > pos) return i; - if ((cur.from == pos || cur.to == pos)) { - if (found == null) { - found = i; - } else if (compareBidiLevel(order, cur.level, order[found].level)) { - if (cur.from != cur.to) bidiOther = found; - return i; - } else { - if (cur.from != cur.to) bidiOther = i; - return found; - } - } - } - return found; - } - - function moveInLine(line, pos, dir, byUnit) { - if (!byUnit) return pos + dir; - do pos += dir; - while (pos > 0 && isExtendingChar(line.text.charAt(pos))); - return pos; - } - - // This is needed in order to move 'visually' through bi-directional - // text -- i.e., pressing left should make the cursor go left, even - // when in RTL text. The tricky part is the 'jumps', where RTL and - // LTR text touch each other. This often requires the cursor offset - // to move more than one unit, in order to visually move one unit. - function moveVisually(line, start, dir, byUnit) { - var bidi = getOrder(line); - if (!bidi) return moveLogically(line, start, dir, byUnit); - var pos = getBidiPartAt(bidi, start), part = bidi[pos]; - var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); - - for (;;) { - if (target > part.from && target < part.to) return target; - if (target == part.from || target == part.to) { - if (getBidiPartAt(bidi, target) == pos) return target; - part = bidi[pos += dir]; - return (dir > 0) == part.level % 2 ? part.to : part.from; - } else { - part = bidi[pos += dir]; - if (!part) return null; - if ((dir > 0) == part.level % 2) - target = moveInLine(line, part.to, -1, byUnit); - else - target = moveInLine(line, part.from, 1, byUnit); - } - } - } - - function moveLogically(line, start, dir, byUnit) { - var target = start + dir; - if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; - return target < 0 || target > line.text.length ? null : target; - } - - // Bidirectional ordering algorithm - // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm - // that this (partially) implements. - - // One-char codes used for character types: - // L (L): Left-to-Right - // R (R): Right-to-Left - // r (AL): Right-to-Left Arabic - // 1 (EN): European Number - // + (ES): European Number Separator - // % (ET): European Number Terminator - // n (AN): Arabic Number - // , (CS): Common Number Separator - // m (NSM): Non-Spacing Mark - // b (BN): Boundary Neutral - // s (B): Paragraph Separator - // t (S): Segment Separator - // w (WS): Whitespace - // N (ON): Other Neutrals - - // Returns null if characters are ordered as they appear - // (left-to-right), or an array of sections ({from, to, level} - // objects) in the order in which they occur visually. - var bidiOrdering = (function() { - // Character types for codepoints 0 to 0xff - var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; - // Character types for codepoints 0x600 to 0x6ff - var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm"; - function charType(code) { - if (code <= 0xf7) return lowTypes.charAt(code); - else if (0x590 <= code && code <= 0x5f4) return "R"; - else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); - else if (0x6ee <= code && code <= 0x8ac) return "r"; - else if (0x2000 <= code && code <= 0x200b) return "w"; - else if (code == 0x200c) return "b"; - else return "L"; - } - - var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; - var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; - // Browsers seem to always treat the boundaries of block elements as being L. - var outerType = "L"; - - function BidiSpan(level, from, to) { - this.level = level; - this.from = from; this.to = to; - } - - return function(str) { - if (!bidiRE.test(str)) return false; - var len = str.length, types = []; - for (var i = 0, type; i < len; ++i) - types.push(type = charType(str.charCodeAt(i))); - - // W1. Examine each non-spacing mark (NSM) in the level run, and - // change the type of the NSM to the type of the previous - // character. If the NSM is at the start of the level run, it will - // get the type of sor. - for (var i = 0, prev = outerType; i < len; ++i) { - var type = types[i]; - if (type == "m") types[i] = prev; - else prev = type; - } - - // W2. Search backwards from each instance of a European number - // until the first strong type (R, L, AL, or sor) is found. If an - // AL is found, change the type of the European number to Arabic - // number. - // W3. Change all ALs to R. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (type == "1" && cur == "r") types[i] = "n"; - else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } - } - - // W4. A single European separator between two European numbers - // changes to a European number. A single common separator between - // two numbers of the same type changes to that type. - for (var i = 1, prev = types[0]; i < len - 1; ++i) { - var type = types[i]; - if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; - else if (type == "," && prev == types[i+1] && - (prev == "1" || prev == "n")) types[i] = prev; - prev = type; - } - - // W5. A sequence of European terminators adjacent to European - // numbers changes to all European numbers. - // W6. Otherwise, separators and terminators change to Other - // Neutral. - for (var i = 0; i < len; ++i) { - var type = types[i]; - if (type == ",") types[i] = "N"; - else if (type == "%") { - for (var end = i + 1; end < len && types[end] == "%"; ++end) {} - var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // W7. Search backwards from each instance of a European number - // until the first strong type (R, L, or sor) is found. If an L is - // found, then change the type of the European number to L. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (cur == "L" && type == "1") types[i] = "L"; - else if (isStrong.test(type)) cur = type; - } - - // N1. A sequence of neutrals takes the direction of the - // surrounding strong text if the text on both sides has the same - // direction. European and Arabic numbers act as if they were R in - // terms of their influence on neutrals. Start-of-level-run (sor) - // and end-of-level-run (eor) are used at level run boundaries. - // N2. Any remaining neutrals take the embedding direction. - for (var i = 0; i < len; ++i) { - if (isNeutral.test(types[i])) { - for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} - var before = (i ? types[i-1] : outerType) == "L"; - var after = (end < len ? types[end] : outerType) == "L"; - var replace = before || after ? "L" : "R"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // Here we depart from the documented algorithm, in order to avoid - // building up an actual levels array. Since there are only three - // levels (0, 1, 2) in an implementation that doesn't take - // explicit embedding into account, we can build up the order on - // the fly, without following the level-based algorithm. - var order = [], m; - for (var i = 0; i < len;) { - if (countsAsLeft.test(types[i])) { - var start = i; - for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} - order.push(new BidiSpan(0, start, i)); - } else { - var pos = i, at = order.length; - for (++i; i < len && types[i] != "L"; ++i) {} - for (var j = pos; j < i;) { - if (countsAsNum.test(types[j])) { - if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j)); - var nstart = j; - for (++j; j < i && countsAsNum.test(types[j]); ++j) {} - order.splice(at, 0, new BidiSpan(2, nstart, j)); - pos = j; - } else ++j; - } - if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)); - } - } - if (order[0].level == 1 && (m = str.match(/^\s+/))) { - order[0].from = m[0].length; - order.unshift(new BidiSpan(0, 0, m[0].length)); - } - if (lst(order).level == 1 && (m = str.match(/\s+$/))) { - lst(order).to -= m[0].length; - order.push(new BidiSpan(0, len - m[0].length, len)); - } - if (order[0].level == 2) - order.unshift(new BidiSpan(1, order[0].to, order[0].to)); - if (order[0].level != lst(order).level) - order.push(new BidiSpan(order[0].level, len, len)); - - return order; - }; - })(); - - // THE END - - CodeMirror.version = "5.4.1"; - - return CodeMirror; -});(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - var Pos = CodeMirror.Pos; - - function forEach(arr, f) { - for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); - } - - function arrayContains(arr, item) { - if (!Array.prototype.indexOf) { - var i = arr.length; - while (i--) { - if (arr[i] === item) { - return true; - } - } - return false; - } - return arr.indexOf(item) != -1; - } - - function scriptHint(editor, keywords, getToken, options) { - // Find the token at the cursor - var cur = editor.getCursor(), token = getToken(editor, cur); - if (/\b(?:string)\b/.test(token.type)) { - return; - } - token.state = CodeMirror.innerMode(editor.getMode(), token.state).state; - - if (!/^[\w$_]*$/.test(token.string)) { - token = { - start: cur.ch, end: cur.ch, string: "", state: token.state, - type: token.string == "." ? "property" : null - }; - } else if (token.end > cur.ch) { - token.end = cur.ch; - token.string = token.string.slice(0, cur.ch - token.start); - } - - var tprop = token; - // If it is a property, find out what it is a property of. - while (tprop.type == "property") { - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (tprop.string != ".") return; - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (!context) var context = []; - context.push(tprop); - } - return { - list: getCompletions(token, context, keywords, options), - from: Pos(cur.line, token.start), - to: Pos(cur.line, token.end) - }; - } - - function getFormulaKeywords() { - return BI.FormulaCollections; - } - - function formulaHint(editor, options) { - return scriptHint(editor, getFormulaKeywords(), - function (e, cur) { - return e.getTokenAt(cur); - }, - options); - }; - CodeMirror.registerHelper("hint", "formula", formulaHint); - - function getCompletions(token, context, keywords, options) { - var found = [], start = token.string; - if (!start) { - return found; - } - function maybeAdd(str) { - if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) { - found.push(str); - } - } - - if (context && context.length) { - context.pop(); - } else { - forEach(keywords, maybeAdd); - } - return found; - } -});(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - "use strict"; - - CodeMirror.defineMode('formula', function () { - function wordObj(words) { - var o = {}; - for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; - return o; - } - - var atoms = wordObj(['false', 'true']); - var keywords = wordObj(BI.FormulaCollections); - - function tokenBase(stream, state) { - if (stream.eatSpace()) { - return null; - } - var ch = stream.next(); - - if (ch === '"' || ch === '\'') { - nextUntilUnescaped(stream, ch); - return "string"; - } - if (/[\[\],\(\)]/.test(ch)) { - return 'bracket'; - } - - // richie:暂时不需要解析操作符号 - //if (/[+\-*\/=<>!&|]/.test(ch)) { - // return 'operator'; - //} - //if (/\d|\d./.test(ch)) { - // stream.eatWhile(/\d|\./); - // if (stream.eol() || !/\w/.test(stream.peek())) { - // return 'number'; - // } - //} - - - - stream.eatWhile(/[\w-]/); - var word = stream.current(); - if (atoms.hasOwnProperty(word)) { - return "atom"; - } - if (keywords.hasOwnProperty(word)) { - return "keyword"; - } - return null; - } - - function nextUntilUnescaped(stream, end) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (next === end && !escaped) { - return false; - } - escaped = !escaped && next === "\\"; - } - return escaped; - } - - function tokenize(stream, state) { - return (state.tokens[0] || tokenBase)(stream, state); - } - - return { - startState: function () { - return {tokens: []}; - }, - token: function (stream, state) { - return tokenize(stream, state); - }, - fold: "brace" - }; - }); - CodeMirror.defineMIME("text/fx-formula", "formula"); -});// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - "use strict"; - - var HINT_ELEMENT_CLASS = "CodeMirror-hint"; - var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; - - // This is the old interface, kept around for now to stay - // backwards-compatible. - CodeMirror.showHint = function (cm, getHints, options) { - if (!getHints) return cm.showHint(options); - if (options && options.async) getHints.async = true; - var newOpts = {hint: getHints}; - if (options) for (var prop in options) newOpts[prop] = options[prop]; - return cm.showHint(newOpts); - }; - - CodeMirror.defineExtension("showHint", function (options) { - // We want a single cursor position. - if (this.listSelections().length > 1 || this.somethingSelected()) return; - - if (this.state.completionActive) this.state.completionActive.close(); - var completion = this.state.completionActive = new Completion(this, options); - if (!completion.options.hint) return; - - CodeMirror.signal(this, "startCompletion", this); - completion.update(true); - }); - - function Completion(cm, options) { - this.cm = cm; - this.options = this.buildOptions(options); - this.widget = null; - this.debounce = 0; - this.tick = 0; - this.startPos = this.cm.getCursor(); - this.startLen = this.cm.getLine(this.startPos.line).length; - - var self = this; - cm.on("cursorActivity", this.activityFunc = function () { - self.cursorActivity(); - }); - } - - var requestAnimationFrame = window.requestAnimationFrame || function (fn) { - return setTimeout(fn, 1000 / 60); - }; - var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; - - Completion.prototype = { - close: function () { - if (!this.active()) return; - this.cm.state.completionActive = null; - this.tick = null; - this.cm.off("cursorActivity", this.activityFunc); - - if (this.widget && this.data) CodeMirror.signal(this.data, "close"); - if (this.widget) this.widget.close(); - CodeMirror.signal(this.cm, "endCompletion", this.cm); - }, - - active: function () { - return this.cm.state.completionActive == this; - }, - - pick: function (data, i) { - var completion = data.list[i]; - if (completion.hint) completion.hint(this.cm, data, completion); - else { - this.cm.replaceRange(getText(completion), completion.from || data.from, - completion.to || data.to, "complete"); - var to = this.cm.getCursor(); - this.cm.markText(completion.from || data.from, to, {className: "#function", atomic: true}); - this.cm.replaceSelection("() "); - to = this.cm.getCursor(); - to.ch = to.ch - 2; - this.cm.setCursor(to); - this.cm.focus(); - } - CodeMirror.signal(data, "pick", completion); - this.close(); - }, - - cursorActivity: function () { - if (this.debounce) { - cancelAnimationFrame(this.debounce); - this.debounce = 0; - } - - var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line); - if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || - pos.ch < this.startPos.ch || this.cm.somethingSelected() || - (pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) { - this.close(); - } else { - var self = this; - this.debounce = requestAnimationFrame(function () { - self.update(); - }); - if (this.widget) this.widget.disable(); - } - }, - - update: function (first) { - if (this.tick == null) return; - if (this.data) CodeMirror.signal(this.data, "update"); - if (!this.options.hint.async) { - this.finishUpdate(this.options.hint(this.cm, this.options), first); - } else { - var myTick = ++this.tick, self = this; - this.options.hint(this.cm, function (data) { - if (self.tick == myTick) self.finishUpdate(data, first); - }, this.options); - } - }, - - finishUpdate: function (data, first) { - this.data = data; - - var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle); - if (this.widget) this.widget.close(); - if (data && data.list.length) { - if (picked && data.list.length == 1) { - this.pick(data, 0); - } else { - this.widget = new Widget(this, data); - CodeMirror.signal(data, "shown"); - } - } - }, - - buildOptions: function (options) { - var editor = this.cm.options.hintOptions; - var out = {}; - for (var prop in defaultOptions) out[prop] = defaultOptions[prop]; - if (editor) for (var prop in editor) - if (editor[prop] !== undefined) out[prop] = editor[prop]; - if (options) for (var prop in options) - if (options[prop] !== undefined) out[prop] = options[prop]; - return out; - } - }; - - function getText(completion) { - if (typeof completion == "string") return completion; - else return completion.text; - } - - function buildKeyMap(completion, handle) { - var baseMap = { - Up: function () { - handle.moveFocus(-1); - }, - Down: function () { - handle.moveFocus(1); - }, - PageUp: function () { - handle.moveFocus(-handle.menuSize() + 1, true); - }, - PageDown: function () { - handle.moveFocus(handle.menuSize() - 1, true); - }, - Home: function () { - handle.setFocus(0); - }, - End: function () { - handle.setFocus(handle.length - 1); - }, - Enter: handle.pick, - Tab: handle.pick, - Esc: handle.close - }; - var custom = completion.options.customKeys; - var ourMap = custom ? {} : baseMap; - - function addBinding(key, val) { - var bound; - if (typeof val != "string") - bound = function (cm) { - return val(cm, handle); - }; - // This mechanism is deprecated - else if (baseMap.hasOwnProperty(val)) - bound = baseMap[val]; - else - bound = val; - ourMap[key] = bound; - } - - if (custom) - for (var key in custom) if (custom.hasOwnProperty(key)) - addBinding(key, custom[key]); - var extra = completion.options.extraKeys; - if (extra) - for (var key in extra) if (extra.hasOwnProperty(key)) - addBinding(key, extra[key]); - return ourMap; - } - - function getHintElement(hintsElement, el) { - while (el && el != hintsElement) { - if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el; - el = el.parentNode; - } - } - - function Widget(completion, data) { - this.completion = completion; - this.data = data; - this.picked = false; - var widget = this, cm = completion.cm; - - var hints = this.hints = document.createElement("ul"); - hints.className = "CodeMirror-hints"; - this.selectedHint = data.selectedHint || 0; - - var completions = data.list; - for (var i = 0; i < completions.length; ++i) { - var elt = hints.appendChild(document.createElement("li")), cur = completions[i]; - var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); - if (cur.className != null) className = cur.className + " " + className; - elt.className = className; - if (cur.render) cur.render(elt, data, cur); - else elt.appendChild(document.createTextNode(cur.displayText || getText(cur))); - elt.hintId = i; - } - - var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null); - var left = pos.left, top = pos.bottom, below = true; - hints.style.left = left + "px"; - hints.style.top = top + "px"; - // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. - var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); - var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); - (completion.options.container || document.body).appendChild(hints); - var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; - if (overlapY > 0) { - var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); - if (curTop - height > 0) { // Fits above cursor - hints.style.top = (top = pos.top - height) + "px"; - below = false; - } else if (height > winH) { - hints.style.height = (winH - 5) + "px"; - hints.style.top = (top = pos.bottom - box.top) + "px"; - var cursor = cm.getCursor(); - if (data.from.ch != cursor.ch) { - pos = cm.cursorCoords(cursor); - hints.style.left = (left = pos.left) + "px"; - box = hints.getBoundingClientRect(); - } - } - } - var overlapX = box.right - winW; - if (overlapX > 0) { - if (box.right - box.left > winW) { - hints.style.width = (winW - 5) + "px"; - overlapX -= (box.right - box.left) - winW; - } - hints.style.left = (left = pos.left - overlapX) + "px"; - } - - cm.addKeyMap(this.keyMap = buildKeyMap(completion, { - moveFocus: function (n, avoidWrap) { - widget.changeActive(widget.selectedHint + n, avoidWrap); - }, - setFocus: function (n) { - widget.changeActive(n); - }, - menuSize: function () { - return widget.screenAmount(); - }, - length: completions.length, - close: function () { - completion.close(); - }, - pick: function () { - widget.pick(); - }, - data: data - })); - - if (completion.options.closeOnUnfocus) { - var closingOnBlur; - cm.on("blur", this.onBlur = function () { - closingOnBlur = setTimeout(function () { - completion.close(); - }, 100); - }); - cm.on("focus", this.onFocus = function () { - clearTimeout(closingOnBlur); - }); - } - - var startScroll = cm.getScrollInfo(); - cm.on("scroll", this.onScroll = function () { - var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect(); - var newTop = top + startScroll.top - curScroll.top; - var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop); - if (!below) point += hints.offsetHeight; - if (point <= editor.top || point >= editor.bottom) return completion.close(); - hints.style.top = newTop + "px"; - hints.style.left = (left + startScroll.left - curScroll.left) + "px"; - }); - - CodeMirror.on(hints, "dblclick", function (e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) { - widget.changeActive(t.hintId); - widget.pick(); - } - }); - - CodeMirror.on(hints, "click", function (e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) { - widget.changeActive(t.hintId); - if (completion.options.completeOnSingleClick) widget.pick(); - } - }); - - CodeMirror.on(hints, "mousedown", function () { - setTimeout(function () { - cm.focus(); - }, 20); - }); - - CodeMirror.signal(data, "select", completions[0], hints.firstChild); - return true; - } - - Widget.prototype = { - close: function () { - if (this.completion.widget != this) return; - this.completion.widget = null; - this.hints.parentNode.removeChild(this.hints); - this.completion.cm.removeKeyMap(this.keyMap); - - var cm = this.completion.cm; - if (this.completion.options.closeOnUnfocus) { - cm.off("blur", this.onBlur); - cm.off("focus", this.onFocus); - } - cm.off("scroll", this.onScroll); - }, - - disable: function () { - this.completion.cm.removeKeyMap(this.keyMap); - var widget = this; - this.keyMap = { - Enter: function () { - widget.picked = true; - } - }; - this.completion.cm.addKeyMap(this.keyMap); - }, - - pick: function () { - this.completion.pick(this.data, this.selectedHint); - }, - - changeActive: function (i, avoidWrap) { - if (i >= this.data.list.length) - i = avoidWrap ? this.data.list.length - 1 : 0; - else if (i < 0) - i = avoidWrap ? 0 : this.data.list.length - 1; - if (this.selectedHint == i) return; - var node = this.hints.childNodes[this.selectedHint]; - node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); - node = this.hints.childNodes[this.selectedHint = i]; - node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; - if (node.offsetTop < this.hints.scrollTop) - this.hints.scrollTop = node.offsetTop - 3; - else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) - this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; - CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); - }, - - screenAmount: function () { - return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; - } - }; - - CodeMirror.registerHelper("hint", "auto", function (cm, options) { - var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; - if (helpers.length) { - for (var i = 0; i < helpers.length; i++) { - var cur = helpers[i](cm, options); - if (cur && cur.list.length) return cur; - } - } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { - if (words) return CodeMirror.hint.fromList(cm, {words: words}); - } else if (CodeMirror.hint.anyword) { - return CodeMirror.hint.anyword(cm, options); - } - }); - - CodeMirror.registerHelper("hint", "fromList", function (cm, options) { - var cur = cm.getCursor(), token = cm.getTokenAt(cur); - var found = []; - for (var i = 0; i < options.words.length; i++) { - var word = options.words[i]; - if (word.slice(0, token.string.length) == token.string) - found.push(word); - } - - if (found.length) return { - list: found, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end) - }; - }); - - CodeMirror.commands.autocomplete = CodeMirror.showHint; - - var defaultOptions = { - hint: CodeMirror.hint.auto, - completeSingle: true, - alignWithWord: true, - closeCharacters: /[\s()\[\]{};:>,]/, - closeOnUnfocus: true, - completeOnSingleClick: true, - container: null, - customKeys: null, - extraKeys: null - }; - - CodeMirror.defineOption("hintOptions", null); -});/** - * Created by User on 2017/3/21. - */ -BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"]; -/** - * 公式编辑控件 - * @class BI.FormulaEditor - * @extends BI.Widget - */ -BI.FormulaEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-formula-editor bi-card', - watermark: '', - value: '', - fieldTextValueMap: {}, - showHint: true, - lineHeight: 2 - }); - }, - _init: function () { - BI.FormulaEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.editor = CodeMirror(this.element[0], { - textWrapping: true, - lineWrapping: true, - lineNumbers: false, - mode: 'formula' - }); - o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); - this.editor.on("change", function (cm, change) { - self._checkWaterMark(); - if (o.showHint) { - CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false}); - } - BI.nextTick(function () { - self.fireEvent(BI.FormulaEditor.EVENT_CHANGE) - }); - }); - - this.editor.on("focus", function () { - self._checkWaterMark(); - self.fireEvent(BI.FormulaEditor.EVENT_FOCUS); - }); - - this.editor.on("blur", function () { - self.fireEvent(BI.FormulaEditor.EVENT_BLUR); - }); - - - if (BI.isKey(o.value)) { - self.setValue(o.value); - } - - if (BI.isKey(this.options.watermark)) { - var self = this; - this.watermark = BI.createWidget({ - type: "bi.label", - cls: "bi-water-mark", - text: this.options.watermark, - whiteSpace: "nowrap", - textAlign: "left" - }); - BI.createWidget({ - type: "bi.absolute", - element: self, - items: [{ - el: self.watermark, - left: 0, - top: 0 - }] - }); - - this.watermark.element.bind( - "mousedown", function (e) { - self.insertString(""); - self.editor.focus(); - e.stopEvent(); - } - ); - this.watermark.element.bind("click", function (e) { - self.editor.focus(); - e.stopEvent(); - }); - this.watermark.element.css({ - position: "absolute", - left: 3, - right: 3, - top: 6, - bottom: 0 - }); - } - }, - - _checkWaterMark: function () { - var o = this.options; - if (!this.disabledWaterMark && BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - disableWaterMark: function () { - this.disabledWaterMark = true; - this._checkWaterMark(); - }, - - focus: function () { - this.editor.focus(); - }, - - /** - * 添加字段 - * @param field - */ - insertField: function (field) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(field); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - insertFunction: function (fn) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(fn); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "#function", atomic: true}); - this.editor.replaceSelection("() "); - to = this.editor.getCursor(); - to.ch = to.ch - 2; - this.editor.setCursor(to); - this.editor.focus(); - }, - insertOperator: function (op) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(op); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "%operator", atomic: true}); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - setFunction: function (v) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(v); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "#function", atomic: true}); - }, - - insertString: function (str) { - this.editor.replaceSelection(str); - this.editor.focus(); - }, - - getFormulaString: function () { - return this.editor.getValue(); - }, - - getUsedFields: function () { - var fieldMap = this.options.fieldTextValueMap; - var fields = []; - this.editor.getValue(true, function (line) { - var value = line.text; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "fieldName": - var dId = fieldMap[value.substr(i.from, i.to - i.from)]; - if (!fields.contains(dId)) { - fields.push(dId); - } - - } - }); - }); - return fields; - }, - - getCheckString: function () { - return this.editor.getValue(true, function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - - switch (i.marker.className) { - case "fieldName": - var fieldNameLength = i.to - i.from; - value = value.substr(0, i.from + num) + "$a" + value.substr(i.to + num, value.length); - num = num + 2 - fieldNameLength; - break; - } - - }); - return value; - }); - }, - - getValue: function () { - var fieldMap = this.options.fieldTextValueMap; - return this.editor.getValue("\n", function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "fieldName": - var fieldNameLength = i.to - i.from; - var fieldId = fieldMap[value.substr(i.from + num, fieldNameLength)]; - value = value.substr(0, i.from + num) + "$\{" + fieldMap[value.substr(i.from + num, fieldNameLength)] + "\}" + value.substr(i.to + num, value.length); - num += fieldId.length - fieldNameLength + 3; - break; - } - }); - return value; - }); - }, - - setValue: function (value) { - this.editor.setValue(value); - }, - - setFieldTextValueMap: function (fieldTextValueMap) { - this.options.fieldTextValueMap = fieldTextValueMap; - }, - - refresh: function () { - var self = this; - BI.nextTick(function () { - self.editor.refresh(); - }); - } - -}); -BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.formula_editor", BI.FormulaEditor); -/** - * z-index在1亿层级 - * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现) - * @class BI.Msg - */ -$.extend(BI, { - Msg: function () { - - var messageShow, $mask, $pop; - - return { - alert: function (title, message, callback) { - this._show(false, title, message, callback); - }, - confirm: function (title, message, callback) { - this._show(true, title, message, callback); - }, - prompt: function (title, message, value, callback, min_width) { - // BI.Msg.prompt(title, message, value, callback, min_width); - }, - toast: function (message, level, context) { - context = context || $("body"); - var toast = BI.createWidget({ - type: "bi.toast", - level: level, - text: message - }); - BI.createWidget({ - type: "bi.absolute", - element: context, - items: [{ - el: toast, - left: "50%", - top: 0 - }] - }); - if (toast.element.outerWidth() > context.outerWidth()) { - toast.setWidth(context.width()); - } - toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); - toast.invisible(); - toast.element.slideDown(500, function () { - BI.delay(function () { - toast.element.slideUp(500, function () { - toast.destroy(); - }) - }, 5000) - }) - }, - _show: function (hasCancel, title, message, callback) { - $mask = $('
    ').css({ - position: 'absolute', - 'zIndex': BI.zIndex_tip - 2, - top: 0, - left: 0, - right: 0, - bottom: 0, - opacity: 0.5 - }).appendTo('body'); - $pop = $('
    ').css({ - position: 'absolute', - 'zIndex': BI.zIndex_tip - 1, - top: 0, - left: 0, - right: 0, - bottom: 0 - }).appendTo('body'); - var close = function () { - messageShow.destroy(); - $mask.remove(); - }; - var controlItems = []; - if (hasCancel === true) { - controlItems.push({ - el: { - type: 'bi.button', - text: BI.i18nText("BI-Basic_Cancel"), - height: 30, - level: 'ignore', - handler: function () { - close(); - if (BI.isFunction(callback)) { - callback.apply(null, [false]); - } - } - } - }); - } - controlItems.push({ - el: { - type: 'bi.button', - text: BI.i18nText("BI-Basic_OK"), - height: 30, - handler: function () { - close(); - if (BI.isFunction(callback)) { - callback.apply(null, [true]); - } - } - } - }); - var conf = { - element: $pop, - type: 'bi.center_adapt', - items: [ - { - type: 'bi.border', - cls: 'bi-message-content bi-card', - items: { - 'north': { - el: { - type: 'bi.border', - cls: 'bi-message-title bi-background', - items: { - center: { - el: { - type: 'bi.label', - text: title || BI.i18nText("BI-Basic_Prompt"), - textAlign: 'left', - hgap: 20, - height: 50 - } - }, - east: { - el: { - type: 'bi.icon_button', - cls: 'bi-message-close close-font', -// height: 50, - handler: function () { - close(); - } - }, - width: 60 - } - } - }, - height: 50 - }, - 'center': { - el: { - type: "bi.text", - cls: "bi-message-text", - tgap: 60, - hgap: 20, - lineHeight: 30, - whiteSpace: "normal", - text: message - } - }, - 'south': { - el: { - type: "bi.absolute", - items: [{ - el: { - type: 'bi.right_vertical_adapt', - hgap: 5, - items: controlItems - }, - top: 0, - left: 20, - right: 20, - bottom: 0 - }] - - }, - height: 60 - } - }, - width: 400, - height: 300 - } - ] - }; - - messageShow = BI.createWidget(conf); - } - }; - }() -});/** - * GridView - * - * Created by GUY on 2016/1/11. - * @class BI.GridView - * @extends BI.Widget - */ -BI.GridView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-view", - // width: 400, //必设 - // height: 300, //必设 - overflowX: true, - overflowY: true, - overscanColumnCount: 0, - overscanRowCount: 0, - rowHeightGetter: BI.emptyFn, //number类型或function类型 - columnWidthGetter: BI.emptyFn, //number类型或function类型 - // estimatedColumnSize: 100, //columnWidthGetter为function时必设 - // estimatedRowSize: 30, //rowHeightGetter为function时必设 - scrollLeft: 0, - scrollTop: 0, - items: [] - }); - }, - - _init: function () { - BI.GridView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - this._debounceRelease = BI.debounce(function () { - self._scrollLock = false; - }, 1000 / 60); - this.container = BI.createWidget({ - type: "bi.absolute" - }); - this.element.scroll(function () { - if (self._scrollLock === true) { - return; - } - o.scrollLeft = self.element.scrollLeft(); - o.scrollTop = self.element.scrollTop(); - self._calculateChildrenToRender(); - self.fireEvent(BI.GridView.EVENT_SCROLL, { - scrollLeft: o.scrollLeft, - scrollTop: o.scrollTop - }); - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - scrollable: o.overflowX === true && o.overflowY === true, - scrolly: o.overflowX === false && o.overflowY === true, - scrollx: o.overflowX === true && o.overflowY === false, - items: [this.container] - }); - if (o.items.length > 0) { - this._populate(); - } - if (o.scrollLeft !== 0 || o.scrollTop !== 0) { - BI.nextTick(function () { - self.element.scrollTop(o.scrollTop); - self.element.scrollLeft(o.scrollLeft); - }); - } - }, - - _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) { - return { - overscanStartIndex: Math.max(0, startIndex - overscanCellsCount), - overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount) - } - }, - - _calculateChildrenToRender: function () { - var self = this, o = this.options; - - var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()), - scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()), - overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount; - - if (height > 0 && width > 0) { - var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft); - var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop); - - if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) { - return; - } - var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft); - var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop); - - this._renderedColumnStartIndex = visibleColumnIndices.start; - this._renderedColumnStopIndex = visibleColumnIndices.stop; - this._renderedRowStartIndex = visibleRowIndices.start; - this._renderedRowStopIndex = visibleRowIndices.stop; - - var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex) - - var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex); - - var columnStartIndex = overscanColumnIndices.overscanStartIndex; - var columnStopIndex = overscanColumnIndices.overscanStopIndex; - var rowStartIndex = overscanRowIndices.overscanStartIndex; - var rowStopIndex = overscanRowIndices.overscanStopIndex; - - //算区间size - var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex); - var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex); - var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex); - var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex); - var top = minRowDatum.offset + verticalOffsetAdjustment; - var left = minColumnDatum.offset + horizontalOffsetAdjustment; - var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size; - var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size; - //如果滚动的区间并没有超出渲染的范围 - if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { - return; - } - - var renderedCells = [], renderedKeys = [], renderedWidgets = {}; - var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0; - var count = 0; - for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { - var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); - - for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { - var key = [rowIndex, columnIndex]; - var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); - - var index = BI.deepIndexOf(this.renderedKeys, key); - var child; - if (index > -1) { - if (columnDatum.size !== this.renderedCells[index]._width) { - this.renderedCells[index]._width = columnDatum.size; - this.renderedCells[index].el.setWidth(columnDatum.size); - } - if (rowDatum.size !== this.renderedCells[index]._height) { - this.renderedCells[index]._height = rowDatum.size; - this.renderedCells[index].el.setHeight(rowDatum.size); - } - if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) { - this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) + "px"); - } - if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) { - this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) + "px"); - } - renderedCells.push(child = this.renderedCells[index]); - } else { - child = BI.createWidget(BI.extend({ - type: "bi.label", - width: columnDatum.size, - height: rowDatum.size - }, o.items[rowIndex][columnIndex], { - cls: (o.items[rowIndex][columnIndex].cls || "") + " grid-cell" + (rowIndex === 0 ? " first-row" : "") + (columnIndex === 0 ? " first-col" : ""), - _rowIndex: rowIndex, - _columnIndex: columnIndex, - _left: columnDatum.offset + horizontalOffsetAdjustment, - _top: rowDatum.offset + verticalOffsetAdjustment - })); - renderedCells.push({ - el: child, - left: columnDatum.offset + horizontalOffsetAdjustment, - top: rowDatum.offset + verticalOffsetAdjustment, - _left: columnDatum.offset + horizontalOffsetAdjustment, - _top: rowDatum.offset + verticalOffsetAdjustment, - _width: columnDatum.size, - _height: rowDatum.size - }); - } - minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment); - maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size); - minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment); - maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size); - renderedKeys.push(key); - renderedWidgets[count++] = child; - } - } - //已存在的, 需要添加的和需要删除的 - var existSet = {}, addSet = {}, deleteArray = []; - BI.each(renderedKeys, function (i, key) { - if (BI.deepContains(self.renderedKeys, key)) { - existSet[i] = key; - } else { - addSet[i] = key; - } - }); - BI.each(this.renderedKeys, function (i, key) { - if (BI.deepContains(existSet, key)) { - return; - } - if (BI.deepContains(addSet, key)) { - return; - } - deleteArray.push(i); - }); - BI.each(deleteArray, function (i, index) { - //性能优化,不调用destroy方法防止触发destroy事件 - self.renderedCells[index].el._destroy(); - }); - var addedItems = []; - BI.each(addSet, function (index) { - addedItems.push(renderedCells[index]) - }); - this.container.addItems(addedItems); - //拦截父子级关系 - this.container._children = renderedWidgets; - this.container.attr("items", renderedCells); - this.renderedCells = renderedCells; - this.renderedKeys = renderedKeys; - this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; - } - }, - - _getMaxScrollLeft: function () { - return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); - }, - - _getMaxScrollTop: function () { - return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); - }, - - _populate: function (items) { - var self = this, o = this.options; - this._reRange(); - if (items && items !== this.options.items) { - this.options.items = items; - } - if (o.items.length > 0) { - this.columnCount = o.items[0].length; - this.rowCount = o.items.length; - } else { - this.rowCount = 0; - this.columnCount = 0; - } - this.container.setWidth(this.columnCount * o.estimatedColumnSize); - this.container.setHeight(this.rowCount * o.estimatedRowSize); - - this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize); - this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize); - - this._calculateChildrenToRender(); - this.element.scrollTop(o.scrollTop); - this.element.scrollLeft(o.scrollLeft); - }, - - setScrollLeft: function (scrollLeft) { - if (this.options.scrollLeft === scrollLeft) { - return; - } - this._scrollLock = true; - this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollLeft(this.options.scrollLeft); - }, - - setScrollTop: function (scrollTop) { - if (this.options.scrollTop === scrollTop) { - return; - } - this._scrollLock = true; - this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollTop(this.options.scrollTop); - }, - - setOverflowX: function (b) { - var self = this; - if (this.options.overflowX !== !!b) { - this.options.overflowX = !!b; - BI.nextTick(function () { - self.element.css({overflowX: !!b ? "auto" : "hidden"}); - }); - } - }, - - setOverflowY: function (b) { - var self = this; - if (this.options.overflowY !== !!b) { - this.options.overflowY = !!b; - BI.nextTick(function () { - self.element.css({overflowY: !!b ? "auto" : "hidden"}); - }); - } - }, - - getScrollLeft: function () { - return this.options.scrollLeft; - }, - - getScrollTop: function () { - return this.options.scrollTop; - }, - - getMaxScrollLeft: function () { - return this._getMaxScrollLeft(); - }, - - getMaxScrollTop: function () { - return this._getMaxScrollTop(); - }, - - setEstimatedColumnSize: function (width) { - this.options.estimatedColumnSize = width; - }, - - setEstimatedRowSize: function (height) { - this.options.estimatedRowSize = height; - }, - - //重新计算children - _reRange: function () { - this.renderRange = {}; - }, - - _clearChildren: function () { - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - BI.each(this.renderedCells, function (i, cell) { - cell.el._destroy(); - }); - this._clearChildren(); - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - }, - - populate: function (items) { - if (items && items !== this.options.items) { - this.restore(); - } - this._populate(items); - } -}); -BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut('bi.grid_view', BI.GridView);/** - * floatBox弹出层, - * @class BI.FloatBox - * @extends BI.Widget - */ -BI.FloatBox = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-float-box bi-card", - width: 600, - height: 500 - }) - }, - _init: function () { - BI.FloatBox.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.showAction = new BI.ShowAction({ - tar: this - }); - this._center = BI.createWidget(); - this._north = BI.createWidget(); - this.element.draggable && this.element.draggable({ - handle: ".bi-message-title", - drag: function (e, ui) { - var W = $("body").width(), H = $("body").height(); - if (ui.position.left + o.width > W) { - ui.position.left = W - o.width; - } - if (ui.position.top + o.height > H) { - ui.position.top = H - o.height; - } - if (ui.position.left < 0) { - ui.position.left = 0; - } - if (ui.position.top < 0) { - ui.position.top = 0; - } - } - }); - this._south = BI.createWidget(); - BI.createWidget({ - type: 'bi.border', - element: this, - items: { - 'north': { - el: { - type: 'bi.border', - cls: 'bi-message-title bi-background', - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: this._north, - left: 10, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: 'bi.icon_button', - cls: 'bi-message-close close-font', - height: 50, - handler: function () { - self.currentSectionProvider.close(); - } - }, - width: 60 - } - } - }, - height: 50 - }, - 'center': { - el: { - type: "bi.absolute", - items: [{ - el: this._center, - left: 10, - top: 10, - right: 10, - bottom: 10 - }] - } - }, - 'south': { - el: { - type: "bi.absolute", - items: [{ - el: this._south, - left: 10, - top: 0, - right: 10, - bottom: 0 - }] - }, - height: 60 - } - } - }) - }, - - populate: function (sectionProvider) { - var self = this; - if (this.currentSectionProvider && this.currentSectionProvider !== sectionProvider) { - this.currentSectionProvider.destroy(); - } - this.currentSectionProvider = sectionProvider; - sectionProvider.rebuildNorth(this._north); - sectionProvider.rebuildCenter(this._center); - sectionProvider.rebuildSouth(this._south); - sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () { - self.close(); - }) - }, - - show: function () { - this.showAction.actionPerformed(); - }, - - hide: function () { - this.showAction.actionBack(); - }, - - open: function () { - this.show(); - this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN); - }, - - close: function () { - this.hide(); - this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED); - }, - - setZindex: function (zindex) { - this.element.css({"z-index": zindex}); - }, - - destroyed: function () { - this.currentSectionProvider && this.currentSectionProvider.destroy(); - } -}); - -BI.shortcut("bi.float_box", BI.FloatBox); - -BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED"; -BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED"; -/** - * 下拉框弹出层, zIndex在1000w - * @class BI.PopupView - * @extends BI.Widget - */ -BI.PopupView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-popup-view", - maxWidth: 'auto', - minWidth: 100, - //maxHeight: 200, - minHeight: 25, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - direction: BI.Direction.Top, //工具栏的方向 - stopEvent: false,//是否停止mousedown、mouseup事件 - stopPropagation: false, //是否停止mousedown、mouseup向上冒泡 - logic: { - dynamic: true - }, - - tool: false, //自定义工具栏 - tabs: [], //导航栏 - buttons: [], //toolbar栏 - - el: { - type: "bi.button_group", - items: [], - chooseType: 0, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.PopupView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var fn = function (e) { - e.stopPropagation(); - }, stop = function (e) { - e.stopEvent(); - return false; - }; - this.element.css({ - "z-index": BI.zIndex_popup, - "min-width": o.minWidth + "px", - "max-width": o.maxWidth + "px" - }).bind({"click": fn}); - - this.element.bind("mousewheel", fn); - - o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn}); - o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop}); - this.tool = this._createTool(); - this.tab = this._createTab(); - this.view = this._createView(); - this.toolbar = this._createToolBar(); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.PopupView.EVENT_CHANGE); - } - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - scrolly: false, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap, - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, - BI.extend({ - cls: "list-view-outer bi-card bi-border" - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar) - }))) - ) - })))); - }, - - _createView: function () { - var o = this.options; - this.button_group = BI.createWidget(o.el, {type: "bi.button_group"}); - this.button_group.element.css({"min-height": o.minHeight + "px"}); - return this.button_group; - }, - - _createTool: function () { - var o = this.options; - if (false === o.tool) { - return; - } - return BI.createWidget(o.tool) - }, - - _createTab: function () { - var o = this.options; - if (o.tabs.length === 0) { - return; - } - return BI.createWidget({ - type: "bi.center", - cls: "list-view-tab", - height: 25, - items: o.tabs - }) - }, - - _createToolBar: function () { - var o = this.options; - if (o.buttons.length === 0) { - return; - } - - return BI.createWidget({ - type: "bi.center", - cls: "list-view-toolbar bi-high-light bi-border-top", - height: 30, - items: BI.createItems(o.buttons, { - once: false, - shadow: true, - isShadowShowingOnSelected: true - }) - }) - }, - - getView: function () { - return this.button_group; - }, - - populate: function (items) { - this.button_group.populate.apply(this.button_group, arguments); - }, - - resetWidth: function (w) { - this.options.width = w; - this.element.width(w); - }, - - resetHeight: function (h) { - var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 30) : 0, - tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0, - toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) : - this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"}) - }, - - setValue: function (selectedValues) { - this.tab && this.tab.setValue(selectedValues); - this.button_group.setValue(selectedValues); - }, - - getValue: function () { - return this.button_group.getValue(); - } -}); -BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.popup_view", BI.PopupView);/** - * 搜索面板 - * - * Created by GUY on 2015/9/28. - * @class BI.SearcherView - * @extends BI.Pane - */ - -BI.SearcherView = BI.inherit(BI.Pane, { - _defaultConfig: function () { - var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-searcher-view bi-card", - tipText: BI.i18nText("BI-No_Select"), - chooseType: BI.Selection.Single, - - matcher: {//完全匹配的构造器 - type: "bi.button_group", - behaviors: { - redmark: function () { - return true; - } - }, - items: [], - layouts: [{ - type: "bi.vertical" - }] - }, - searcher: { - type: "bi.button_group", - behaviors: { - redmark: function () { - return true; - } - }, - items: [], - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.SearcherView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.matcher = BI.createWidget(o.matcher, { - type: "bi.button_group", - chooseType: o.chooseType, - behaviors: { - redmark: function () { - return true; - } - }, - layouts: [{ - type: "bi.vertical" - }] - }); - this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); - } - }); - this.spliter = BI.createWidget({ - type: "bi.vertical", - height: 1, - hgap: 10, - items: [{ - type: "bi.layout", - height: 1, - cls: "searcher-view-spliter bi-background" - }] - }); - this.searcher = BI.createWidget(o.searcher, { - type: "bi.button_group", - chooseType: o.chooseType, - behaviors: { - redmark: function () { - return true; - } - }, - layouts: [{ - type: "bi.vertical" - }] - }); - this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.matcher, this.spliter, this.searcher] - }); - }, - - startSearch: function () { - - }, - - stopSearch: function () { - - }, - - setValue: function (v) { - this.matcher.setValue(v); - this.searcher.setValue(v); - }, - - getValue: function () { - return this.matcher.getValue().concat(this.searcher.getValue()); - }, - - populate: function (searchResult, matchResult, keyword) { - searchResult || (searchResult = []); - matchResult || (matchResult = []); - this.setTipVisible(searchResult.length + matchResult.length === 0); - this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult)); - this.matcher.populate(matchResult, keyword); - this.searcher.populate(searchResult, keyword); - }, - - empty: function () { - this.searcher.empty(); - this.matcher.empty(); - }, - - hasMatched: function () { - return this.matcher.getAllButtons().length > 0; - } -}); -BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.searcher_view", BI.SearcherView);/** - * 表示当前对象 - * - * Created by GUY on 2017/5/23. - * @class BI.ListView - * @extends BI.Widget - */ -BI.ListView = BI.inherit(BI.Widget, { - props: function () { - return { - baseCls: "bi-list-view", - overscanHeight: 100, - blockSize: 10, - scrollTop: 0, - el: {}, - items: [] - }; - }, - - init: function () { - var self = this; - this.renderedIndex = -1; - this.cache = {}; - }, - - render: function () { - var self = this, o = this.options; - return { - type: "bi.vertical", - items: [BI.extend({ - type: "bi.vertical", - scrolly: false, - ref: function () { - self.container = this; - } - }, o.el)], - element: this - } - }, - - mounted: function () { - var self = this, o = this.options; - this._populate(); - this.element.scroll(function (e) { - o.scrollTop = self.element.scrollTop(); - self._calculateBlocksToRender(); - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._calculateBlocksToRender(); - }); - }, - - _renderMoreIf: function () { - var self = this, o = this.options; - var height = this.element.height(); - var minContentHeight = o.scrollTop + height + o.overscanHeight; - var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, - cnt = this.renderedIndex + 1; - var lastHeight; - var getElementHeight = function () { - return self.container.element.height(); - }; - while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { - var items = o.items.slice(index, index + o.blockSize); - this.container.addItems(items); - var addedHeight = getElementHeight() - lastHeight; - this.cache[cnt] = { - index: index, - scrollTop: lastHeight, - height: addedHeight - }; - this.renderedIndex = cnt; - cnt++; - index += o.blockSize; - } - }, - - _calculateBlocksToRender: function () { - var o = this.options; - this._renderMoreIf(); - }, - - _populate: function (items) { - var o = this.options; - if (items && this.options.items !== items) { - this.options.items = items; - } - this._calculateBlocksToRender(); - this.element.scrollTop(o.scrollTop); - }, - - restore: function () { - this.renderedIndex = -1; - this.container.empty(); - this.cache = {}; - }, - - populate: function (items) { - if (items && this.options.items !== items) { - this.restore(); - } - this._populate(); - }, - - destroyed: function () { - this.restore(); - } -}); -BI.shortcut('bi.list_view', BI.ListView); - -/** - * 表示当前对象 - * - * Created by GUY on 2017/5/22. - * @class BI.VirtualList - * @extends BI.Widget - */ -BI.VirtualList = BI.inherit(BI.Widget, { - props: function () { - return { - baseCls: "bi-virtual-list", - overscanHeight: 100, - blockSize: 10, - scrollTop: 0, - items: [] - }; - }, - - init: function () { - var self = this; - this.renderedIndex = -1; - this.cache = {}; - }, - - render: function () { - var self = this, o = this.options; - return { - type: "bi.vertical", - items: [{ - type: "bi.layout", - ref: function () { - self.topBlank = this; - } - }, { - type: "bi.vertical", - scrolly: false, - ref: function () { - self.container = this; - } - }, { - type: "bi.layout", - ref: function () { - self.bottomBlank = this; - } - }], - element: this - } - }, - - mounted: function () { - var self = this, o = this.options; - this._populate(); - this.element.scroll(function (e) { - o.scrollTop = self.element.scrollTop(); - self._calculateBlocksToRender(); - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._calculateBlocksToRender(); - }); - }, - - _renderMoreIf: function () { - var self = this, o = this.options; - var height = this.element.height(); - var minContentHeight = o.scrollTop + height + o.overscanHeight; - var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, - cnt = this.renderedIndex + 1; - var lastHeight; - var getElementHeight = function () { - return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height(); - }; - while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { - var items = o.items.slice(index, index + o.blockSize); - this.container.addItems(items); - var addedHeight = getElementHeight() - lastHeight; - this.cache[cnt] = { - index: index, - scrollTop: lastHeight, - height: addedHeight - }; - this.tree.set(cnt, addedHeight); - this.renderedIndex = cnt; - cnt++; - index += o.blockSize; - } - }, - - _calculateBlocksToRender: function () { - var o = this.options; - this._renderMoreIf(); - var height = this.element.height(); - var minContentHeightFrom = o.scrollTop - o.overscanHeight; - var minContentHeightTo = o.scrollTop + height + o.overscanHeight; - var start = this.tree.greatestLowerBound(minContentHeightFrom); - var end = this.tree.leastUpperBound(minContentHeightTo); - var needDestroyed = []; - for (var i = 0; i < start; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - needDestroyed.push(this.container._children[j]); - this.container._children[j] = null; - } - this.cache[i].destroyed = true; - } - } - for (var i = end + 1; i <= this.renderedIndex; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - needDestroyed.push(this.container._children[j]); - this.container._children[j] = null; - } - this.cache[i].destroyed = true; - } - } - var firstFragment = document.createDocumentFragment(), lastFragment = document.createDocumentFragment(); - var currentFragment = firstFragment; - for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - currentFragment = lastFragment; - } - if (this.cache[i].destroyed === true) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j]))); - currentFragment.appendChild(w.element[0]); - } - this.cache[i].destroyed = false; - } - } - this.container.element.prepend(firstFragment); - this.container.element.append(lastFragment); - this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop); - var lastCache = this.cache[Math.min(end, this.renderedIndex)]; - this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height); - BI.each(needDestroyed, function (i, child) { - child && child._destroy(); - }); - }, - - _populate: function (items) { - var o = this.options; - if (items && this.options.items !== items) { - this.options.items = items; - } - this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize)); - this._calculateBlocksToRender(); - this.element.scrollTop(o.scrollTop); - }, - - _clearChildren: function () { - BI.each(this.container._children, function (i, cell) { - cell && cell.el._destroy(); - }); - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - this.renderedIndex = -1; - this._clearChildren(); - this.cache = {}; - this.options.scrollTop = 0; - }, - - populate: function (items) { - if (items && this.options.items !== items) { - this.restore(); - } - this._populate(); - }, - - destroyed: function () { - this.restore(); - } -}); -BI.shortcut('bi.virtual_list', BI.VirtualList); - -/** - * 分页控件 - * - * Created by GUY on 2015/8/31. - * @class BI.Pager - * @extends BI.Widget - */ -BI.Pager = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pager", - behaviors: {}, - layouts: [{ - type: "bi.horizontal", - hgap: 10, - vgap: 0 - }], - - dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 - //dynamicShow为false时以下两个有用 - dynamicShowFirstLast: false,//是否动态显示首页、尾页 - dynamicShowPrevNext: false,//是否动态显示上一页、下一页 - pages: false, //总页数 - curr: function () { - return 1; - }, //初始化当前页 - groups: 0, //连续显示分页数 - jump: BI.emptyFn, //分页的回调函数 - - first: false, //是否显示首页 - last: false, //是否显示尾页 - prev: "上一页", - next: "下一页", - - firstPage: 1, - lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 - return 1; - }, - hasPrev: BI.emptyFn, //pages不可用时有效 - hasNext: BI.emptyFn //pages不可用时有效 - }) - }, - _init: function () { - BI.Pager.superclass._init.apply(this, arguments); - var self = this; - this.currPage = BI.result(this.options, "curr"); - //翻页太灵敏 - // this._lock = false; - // this._debouce = BI.debounce(function () { - // self._lock = false; - // }, 300); - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options, view = [], dict = {}; - this.empty(); - var pages = BI.result(o, "pages"); - var curr = BI.result(this, "currPage"); - var groups = BI.result(o, "groups"); - var first = BI.result(o, "first"); - var last = BI.result(o, "last"); - var prev = BI.result(o, "prev"); - var next = BI.result(o, "next"); - - if (pages === false) { - groups = 0; - first = false; - last = false; - } else { - groups > pages && (groups = pages); - } - - //计算当前组 - dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); - - //当前页非首页,则输出上一页 - if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { - if (BI.isKey(prev)) { - view.push({ - text: prev, - value: "prev", - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }) - } else { - view.push(BI.extend({ - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }, prev)); - } - } - - //当前组非首组,则输出首页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { - view.push({ - text: first, - value: "first", - disabled: !(dict.index > 1 && groups !== 0) - }); - if (dict.index > 1 && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - } - - //输出当前页组 - dict.poor = Math.floor((groups - 1) / 2); - dict.start = dict.index > 1 ? curr - dict.poor : 1; - dict.end = dict.index > 1 ? (function () { - var max = curr + (groups - dict.poor - 1); - return max > pages ? pages : max; - }()) : groups; - if (dict.end - dict.start < groups - 1) { //最后一组状态 - dict.start = dict.end - groups + 1; - } - var s = dict.start, e = dict.end; - if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { - s++; - e--; - } - for (; s <= e; s++) { - if (s === curr) { - view.push({ - text: s, - value: s, - selected: true - }) - } else { - view.push({ - text: s, - value: s - }) - } - } - - //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { - if (pages > groups && dict.end < pages && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - view.push({ - text: last, - value: "last", - disabled: !(pages > groups && dict.end < pages && groups !== 0) - }) - } - - //当前页不为尾页时,输出下一页 - dict.flow = !prev && groups === 0; - if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { - view.push((function () { - if (BI.isKey(next)) { - if (pages === false) { - return {text: next, value: "next", disabled: o.hasNext(curr) === false} - } - return (dict.flow && curr === pages) - ? - {text: next, value: "next", disabled: true} - : - {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; - } else { - return BI.extend({ - disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) - }, next); - } - }())); - } - - this.button_group = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(view, { - cls: "bi-list-item-select", - height: 23, - hgap: 10 - }), - behaviors: o.behaviors, - layouts: o.layouts - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - // if (self._lock === true) { - // return; - // } - // self._lock = true; - // self._debouce(); - if (type === BI.Events.CLICK) { - var v = self.button_group.getValue()[0]; - switch (v) { - case "first": - self.currPage = 1; - break; - case "last": - self.currPage = pages; - break; - case "prev": - self.currPage--; - break; - case "next": - self.currPage++; - break; - default: - self.currPage = v; - break; - } - o.jump.apply(self, [{ - pages: pages, - curr: self.currPage - }]); - self._populate(); - self.fireEvent(BI.Pager.EVENT_CHANGE, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE); - }, - - getCurrentPage: function () { - return this.currPage; - }, - - setAllPages: function (pages) { - this.options.pages = pages; - }, - - hasPrev: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasPrev(v) : v > 1; - }, - - hasNext: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasNext(v) : v < pages; - }, - - setValue: function (v) { - var o = this.options; - v = v | 0; - v = v < 1 ? 1 : v; - if (o.pages === false) { - var lastPage = BI.result(o, "lastPage"), firstPage = 1; - this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); - } else { - v = v > o.pages ? o.pages : v; - this.currPage = v; - } - this._populate(); - }, - - getValue: function () { - var val = this.button_group.getValue()[0]; - switch (val) { - case "prev": - return -1; - case "next": - return 1; - case "first": - return BI.MIN; - case "last": - return BI.MAX; - default : - return val; - } - }, - - attr: function (key, value) { - BI.Pager.superclass.attr.apply(this, arguments); - if (key === "curr") { - this.currPage = BI.result(this.options, "curr"); - } - }, - - populate: function () { - this._populate(); - } -}); -BI.Pager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; -BI.shortcut("bi.pager", BI.Pager);/** - * 超链接 - * - * Created by GUY on 2015/9/9. - * @class BI.A - * @extends BI.Text - * @abstract - */ -BI.A = BI.inherit(BI.Text, { - _defaultConfig: function () { - var conf = BI.A.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-a display-block", - href: "", - target: "_blank", - el: null, - element: "" - }) - }, - _init: function () { - var o = this.options; - BI.A.superclass._init.apply(this, arguments); - this.element.attr({href: o.href, target: o.target}); - if (o.el) { - BI.createWidget(o.el, { - element: this - }); - } - } -}); - -BI.shortcut("bi.a", BI.A);/** - * guy - * 加载条 - * @type {*|void|Object} - */ -BI.LoadingBar = BI.inherit(BI.Single, { - consts: { - loadedText: BI.i18nText("BI-Load_More"), - endText: BI.i18nText("BI-No_More_Data") - }, - _defaultConfig: function() { - var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips', - height: 30, - handler: BI.emptyFn - }) - }, - _init : function() { - BI.LoadingBar.superclass._init.apply(this, arguments); - var self = this; - this.loaded = BI.createWidget({ - type: "bi.text_button", - cls: "loading-text bi-list-item-simple", - text: this.consts.loadedText, - width: 120, - handler: this.options.handler - }) - this.loaded.on(BI.Controller.EVENT_CHANGE, function(type){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - - this.loading = BI.createWidget({ - type: "bi.layout", - width: this.options.height, - height:this.options.height, - cls: "loading-background cursor-default" - }) - var loaded = BI.createWidget({ - type: "bi.center_adapt", - items: [this.loaded] - }) - var loading = BI.createWidget({ - type: "bi.center_adapt", - items: [this.loading] - }) - this.cardLayout = BI.createWidget({ - type: "bi.card", - element: this, - items: [{ - el: loaded, - cardName: "loaded" - }, { - el: loading, - cardName: "loading" - }] - }) - this.invisible(); - }, - - _reset: function(){ - this.visible(); - this.loaded.setText(this.consts.loadedText); - this.loaded.enable(); - }, - - setLoaded: function(){ - this._reset(); - this.cardLayout.showCardByName("loaded"); - }, - - setEnd: function(){ - this.setLoaded(); - this.loaded.setText(this.consts.endText); - this.loaded.disable(); - }, - - setLoading: function(){ - this._reset(); - this.cardLayout.showCardByName("loading"); - } -}); - -BI.shortcut("bi.loading_bar", BI.LoadingBar);/** - * @class BI.IconButton - * @extends BI.BasicButton - * 图标的button - */ -BI.IconButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center", - iconWidth: null, - iconHeight: null - }) - }, - - _init: function () { - BI.IconButton.superclass._init.apply(this, arguments); - var o = this.options; - this.element.css({ - textAlign: 'center' - }); - this.icon = BI.createWidget({ - type: 'bi.icon', - width: o.iconWidth, - height: o.iconHeight - }); - if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", o.height + "px"); - BI.createWidget({ - type: "bi.default", - element: this, - items: [this.icon] - }) - } else { - BI.createWidget({ - element: this, - type: 'bi.center_adapt', - items: [this.icon] - }); - } - }, - - doClick: function () { - BI.IconButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconButton.EVENT_CHANGE, this); - } - } -}); -BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE"; -BI.shortcut("bi.icon_button", BI.IconButton);/** - * 图片的button - * - * Created by GUY on 2016/1/27. - * @class BI.ImageButton - * @extends BI.BasicButton - */ -BI.ImageButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-image-button", - src: "", - iconWidth: "100%", - iconHeight: "100%" - }) - }, - - _init: function () { - BI.ImageButton.superclass._init.apply(this, arguments); - var o = this.options; - this.image = BI.createWidget({ - type: "bi.img", - width: o.iconWidth, - height: o.iconHeight, - src: o.src - }); - if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) { - BI.createWidget({ - type: "bi.center_adapt", - element: this, - items: [this.image] - }) - } else { - BI.createWidget({ - type: "bi.adaptive", - element: this, - items: [this.image], - scrollable: false - }) - } - }, - - setWidth: function (w) { - BI.ImageButton.superclass.setWidth.apply(this, arguments); - this.options.width = w; - }, - - setHeight: function (h) { - BI.ImageButton.superclass.setHeight.apply(this, arguments); - this.options.height = h; - }, - - setImageWidth: function (w) { - this.image.setWidth(w); - }, - - setImageHeight: function (h) { - this.image.setHeight(h); - }, - - getImageWidth: function () { - return this.image.element.width(); - }, - - getImageHeight: function () { - return this.image.element.height(); - }, - - setSrc: function (src) { - this.options.src = src; - this.image.setSrc(src); - }, - - getSrc: function () { - return this.image.getSrc(); - }, - - doClick: function () { - BI.ImageButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.ImageButton.EVENT_CHANGE, this); - } - } -}); -BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; -BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { - - /** - * 文字类型的按钮 - * @class BI.Button - * @extends BI.BasicButton - * - * @cfg {JSON} options 配置属性 - * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 - */ - BI.Button = BI.inherit(BI.BasicButton, { - - _defaultConfig: function (props) { - var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + ' bi-button', - minWidth: (props.block === true || props.clear === true) ? 0 : 90, - shadow: props.clear !== true, - isShadowShowingOnSelected: true, - readonly: true, - iconClass: "", - level: 'common', - block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 - clear: false, //是否去掉边框和背景 - textAlign: "center", - whiteSpace: "nowrap", - forceCenter: false, - textWidth: null, - textHeight: null, - hgap: props.clear ? 0 : 10, - vgap: 0, - tgap: 0, - bgap: 0, - lgap: 0, - rgap: 0 - }) - }, - - _init: function () { - BI.Button.superclass._init.apply(this, arguments); - var o = this.options, self = this; - if (BI.isNumber(o.height) && !o.clear && !o.block) { - this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); - } else { - this.element.css({lineHeight: o.height + "px"}); - } - if (BI.isKey(o.iconClass)) { - this.icon = BI.createWidget({ - type: "bi.icon", - width: 18 - }); - this.text = BI.createWidget({ - type: "bi.label", - text: o.text, - value: o.value - }); - BI.createWidget({ - type: "bi.horizontal_auto", - cls: "button-" + o.level + " " + o.iconClass, - element: this, - hgap: o.hgap, - vgap: o.vgap, - tgap: o.tgap, - bgap: o.bgap, - lgap: o.lgap, - rgap: o.rgap, - items: [{ - type: "bi.horizontal", - items: [this.icon, this.text] - }] - }) - } else { - this.text = BI.createWidget({ - type: "bi.label", - cls: "button-" + o.level, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - forceCenter: o.forceCenter, - textWidth: o.textWidth, - textHeight: o.textHeight, - hgap: o.hgap, - vgap: o.vgap, - tgap: o.tgap, - bgap: o.bgap, - lgap: o.lgap, - rgap: o.rgap, - element: this, - text: o.text, - value: o.value - }); - } - if (o.block === true) { - this.element.addClass("block"); - } - if (o.clear === true) { - this.element.addClass("clear"); - } - if (o.minWidth > 0) { - this.element.css({"min-width": o.minWidth + "px"}); - } - }, - - doClick: function () { - BI.Button.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.Button.EVENT_CHANGE, this); - } - }, - - setText: function (text) { - BI.Button.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - setValue: function (text) { - BI.Button.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.text.setValue(text); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - destroy: function () { - BI.Button.superclass.destroy.apply(this, arguments); - } - }); - BI.shortcut('bi.button', BI.Button); - BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; -})(jQuery);/** - * guy - * 可以点击的一行文字 - * @class BI.TextButton - * @extends BI.BasicButton - * 文字button - */ -BI.TextButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-button", - textAlign: "center", - whiteSpace: "nowrap", - forceCenter: false, - textWidth: null, - textHeight: null, - hgap: 0, - lgap: 0, - rgap: 0, - text: "", - py: "" - }) - }, - - _init: function () { - BI.TextButton.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textWidth: o.textWidth, - textHeight: o.textHeight, - forceCenter: o.forceCenter, - width: o.width, - height: o.height, - hgap: o.hgap, - lgap: o.lgap, - rgap: o.rgap, - text: o.text, - value: o.value, - py: o.py - }); - }, - - doClick: function () { - BI.TextButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setText: function (text) { - BI.TextButton.superclass.setText.apply(this, arguments); - text = BI.isArray(text) ? text.join(",") : text; - this.text.setText(text); - }, - - setStyle: function (style) { - this.text.setStyle(style); - }, - - setValue: function (text) { - BI.TextButton.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - text = BI.isArray(text) ? text.join(",") : text; - this.text.setValue(text); - } - } -}); -BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_button", BI.TextButton);/** - * 带有一个占位 - * - * Created by GUY on 2015/9/11. - * @class BI.BlankIconIconTextItem - * @extends BI.BasicButton - */ -BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconIconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - var blank = BI.createWidget({ - type: "bi.layout", - width: o.blankWidth - }) - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon1 = BI.createWidget({ - type: "bi.icon_button", - cls: o.iconCls1, - forceNotSelected: true, - width: c.commonWidth - }); - this.icon2 = BI.createWidget({ - type: "bi.icon_button", - cls: o.iconCls2, - forceNotSelected: true, - width: c.commonWidth - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) - })))); - }, - - doClick: function () { - BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setSelected: function (b) { - BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments); - this.icon1.setSelected(b); - this.icon2.setSelected(b); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/** - * guy - * 一个占位符和两个icon和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/15. - * @class BI.BlankIconTextIconItem - * @extends BI.BasicButton - */ -BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-icon-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconTextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.layout", - width: o.blankWidth - }, icon1, this.text, { - type: "bi.layout", - width: c.commonWidth - }) - })))); - }, - - doClick: function () { - BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/** - * 带有一个占位 - * - * Created by GUY on 2015/9/11. - * @class BI.BlankIconTextItem - * @extends BI.BasicButton - */ -BI.BlankIconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", - logic: { - dynamic: false - }, - cls: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - var blank = BI.createWidget({ - type: "bi.layout", - width: o.blankWidth - }) - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) - })))); - }, - - doClick: function () { - BI.BlankIconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/** - * guy - * 两个icon和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/9. - * @class BI.IconTextIconItem - * @extends BI.BasicButton - */ -BI.IconTextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-icon-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - var blank = BI.createWidget({ - type: "bi.layout", - width: c.commonWidth - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) - })))); - }, - - doClick: function () { - BI.IconTextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/** - * guy - * - * Created by GUY on 2015/9/9. - * @class BI.IconTextItem - * @extends BI.BasicButton - */ -BI.IconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-item", - direction: BI.Direction.Left, - logic: { - dynamic: false - }, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) - })))); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doClick: function () { - BI.IconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_item", BI.IconTextItem);/** - * - * 图标的button - * - * Created by GUY on 2015/9/9. - * @class BI.TextIconItem - * @extends BI.BasicButton - */ -BI.TextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-icon-item", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) - })))); - }, - - doClick: function () { - BI.TextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_icon_item", BI.TextIconItem);/** - * guy - * 一个button和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/9. - * @class BI.TextItem - * @extends BI.BasicButton - */ -BI.TextItem = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-item", - textAlign: "left", - whiteSpace: "nowrap", - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextItem.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, - height: o.height, - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py - }); - }, - - doClick: function () { - BI.TextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_item", BI.TextItem);/** - * guy - * Created by GUY on 2015/9/9. - * @class BI.IconTextIconNode - * @extends BI.NodeButton - */ -BI.IconTextIconNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-icon-node", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextIconNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - var blank = BI.createWidget({ - type: "bi.layout", - width: c.commonWidth - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) - })))); - }, - - doClick: function () { - BI.IconTextIconNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/** - * guy - * Created by GUY on 2015/9/9. - * @class BI.IconTextNode - * @extends BI.NodeButton - */ -BI.IconTextNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-node", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) - })))); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doClick: function () { - BI.IconTextNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - } -}); -BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_node", BI.IconTextNode);/** - * Created by GUY on 2015/9/9. - * @class BI.TextIconNode - * @extends BI.NodeButton - */ -BI.TextIconNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-icon-node", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextIconNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) - })))); - }, - - doClick: function () { - BI.TextIconNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - } -}); -BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_icon_node", BI.TextIconNode);/** - * guy - * - * Created by GUY on 2015/9/9. - * @class BI.TextNode - * @extends BI.NodeButton - */ -BI.TextNode = BI.inherit(BI.NodeButton, { - - _defaultConfig: function () { - var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-node", - textAlign: "left", - whiteSpace: "nowrap", - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextNode.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, - height: o.height, - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py - }); - }, - - doClick: function () { - BI.TextNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_node", BI.TextNode);/** - * - * Created by GUY on 2016/1/15. - * @class BI.CodeEditor - * @extends BI.Single - */ -BI.CodeEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-code-editor bi-card', - value: '', - watermark: "", - lineHeight: 2, - readOnly: false, - //参数显示值构造函数 - paramFormatter: function (v) { - return v; - } - }); - }, - _init: function () { - BI.CodeEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.editor = CodeMirror(this.element[0], { - textWrapping: true, - lineWrapping: true, - lineNumbers: false, - readOnly: o.readOnly - }); - o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); - this.editor.on("change", function (cm, change) { - BI.nextTick(function () { - self.fireEvent(BI.CodeEditor.EVENT_CHANGE) - }); - }); - - this.editor.on("focus", function () { - self.watermark.setVisible(false); - self.fireEvent(BI.CodeEditor.EVENT_FOCUS); - }); - - this.editor.on("blur", function () { - self.watermark.setVisible(BI.isEmptyString(self.getValue())); - self.fireEvent(BI.CodeEditor.EVENT_BLUR); - }); - - // this.editor.on("blur", function () { - // self.editor.execCommand("goLineEnd"); - // }); - - //水印 - this.watermark = BI.createWidget({ - type: "bi.label", - text: o.watermark, - cls: "bi-water-mark", - whiteSpace: "nowrap", - textAlign: "left" - }); - this.watermark.element.bind( - "mousedown", function (e) { - self.insertString(""); - self.editor.focus(); - e.stopEvent(); - } - ); - this.watermark.element.bind("click", function (e) { - self.editor.focus(); - e.stopEvent(); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.watermark, - top: 0, - left: 5 - }] - }); - - if (BI.isKey(o.value)) { - BI.nextTick(function () { - self.setValue(o.value); - }); - } - }, - - _setEnable: function (b) { - BI.CodeEditor.superclass._setEnable.apply(this, arguments); - this.editor.setOption("readOnly", b === true ? false : "nocursor") - }, - - _checkWaterMark: function () { - var o = this.options; - if (BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - insertParam: function (param) { - var value = param; - param = this.options.paramFormatter(param); - var from = this.editor.getCursor(); - this.editor.replaceSelection(param); - var to = this.editor.getCursor(); - var options = {className: 'param', atomic: true}; - if (BI.isNotNull(param.match(/^$/))) { - options.className = 'error-param'; - } - options.value = value; - this.editor.markText(from, to, options); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - insertString: function (str) { - this.editor.replaceSelection(str); - this.editor.focus(); - }, - - getValue: function () { - return this.editor.getValue("\n", function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "param": - case "error-param": - var fieldNameLength = i.to - i.from; - value = value.substr(0, i.from + num) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length); - //加上${}的偏移 - num += 3; - //加上实际值和显示值的长度差的偏移 - num += (i.marker.value.length - fieldNameLength); - break; - } - }); - return value; - }); - }, - - _analyzeContent: function (v) { - var regx = /\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g; - return v.match(regx); - }, - - setValue: function (v) { - var self = this, result; - this.refresh(); - self.editor.setValue(""); - result = this._analyzeContent(v || ""); - BI.each(result, function (i, item) { - var fieldRegx = /\$[\{][^\}]*[\}]/; - var str = item.match(fieldRegx); - if (BI.isNotEmptyArray(str)) { - self.insertParam(str[0].substring(2, item.length - 1)); - } else { - self.insertString(item); - } - }); - this._checkWaterMark(); - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.getInputField().blur(); - }, - - setStyle: function (style) { - this.style = style; - this.element.css(style); - }, - - getStyle: function () { - return this.style; - }, - - refresh: function () { - var self = this; - BI.nextTick(function () { - self.editor.refresh(); - }); - } -}); -BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.code_editor", BI.CodeEditor);/** - * Created by GUY on 2015/4/15. - * @class BI.Editor - * @extends BI.Single - */ -BI.Editor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - //title,warningTitle这两个属性没用 - tipType: "warning", - inputType: "text", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: false, - watermark: "", - errorText: "" - }) - }, - - _init: function () { - BI.Editor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = this.addWidget(BI.createWidget({ - type: "bi.input", - element: "", - root: true, - watermark: o.watermark, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank - })); - this.editor.element.css({ - "width": "100%", - "height": "100%", - "border": "none", - "outline": "none", - "padding": "0", - "margin": "0" - }); - if (BI.isKey(this.options.watermark)) { - this.watermark = BI.createWidget({ - type: "bi.label", - cls: "bi-water-mark", - text: this.options.watermark, - forceCenter: true, - height: o.height - 2 * (o.vgap + o.tgap), - whiteSpace: "nowrap", - textAlign: "left" - }); - this.watermark.element.bind({ - mousedown: function (e) { - if (self.isEnabled()) { - self.editor.isEditing() || self.editor.focus(); - } else { - self.editor.isEditing() && self.editor.blur(); - } - e.stopEvent(); - } - }); - this.watermark.element.bind("click", function (e) { - if (self.isEnabled()) { - self.editor.isEditing() || self.editor.focus(); - } else { - self.editor.isEditing() && self.editor.blur(); - } - e.stopEvent(); - }); - this.watermark.element.css({ - position: "absolute", - left: "3px", - right: "3px", - top: "0px", - bottom: "0px" - }); - } - var items = [{ - el: { - type: "bi.default", - items: this.watermark ? [this.editor, this.watermark] : [this.editor] - }, - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }]; - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: items - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Input.EVENT_FOCUS, function () { - self._checkError(); - self.element.addClass("bi-editor-focus"); - self.fireEvent(BI.Editor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Input.EVENT_BLUR, function () { - self.setErrorVisible(false); - self.element.removeClass("bi-editor-focus"); - self.fireEvent(BI.Editor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Input.EVENT_CLICK, function () { - self.fireEvent(BI.Editor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Input.EVENT_CHANGE, function () { - self.fireEvent(BI.Editor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); - }); - this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) { - self.watermark && self.watermark.invisible(); - }); - - this.editor.on(BI.Input.EVENT_VALID, function () { - self._checkWaterMark(); - self.setErrorVisible(false); - self.fireEvent(BI.Editor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Input.EVENT_ERROR, function () { - self._checkWaterMark(); - self.fireEvent(BI.Editor.EVENT_ERROR, arguments); - self.setErrorVisible(self.isEditing()); - }); - this.editor.on(BI.Input.EVENT_RESTRICT, function () { - self._checkWaterMark(); - var tip = self.setErrorVisible(true); - tip && tip.element.fadeOut(100, function () { - tip.element.fadeIn(100); - }); - self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Input.EVENT_EMPTY, function () { - self._checkWaterMark(); - self.fireEvent(BI.Editor.EVENT_EMPTY, arguments); - }); - this.editor.on(BI.Input.EVENT_ENTER, function () { - self.fireEvent(BI.Editor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Input.EVENT_SPACE, function () { - self.fireEvent(BI.Editor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Input.EVENT_BACKSPACE, function () { - self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments); - }); - this.editor.on(BI.Input.EVENT_REMOVE, function () { - self.fireEvent(BI.Editor.EVENT_REMOVE, arguments); - }); - this.editor.on(BI.Input.EVENT_START, function () { - self.fireEvent(BI.Editor.EVENT_START, arguments); - }); - this.editor.on(BI.Input.EVENT_PAUSE, function () { - self.fireEvent(BI.Editor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Input.EVENT_STOP, function () { - self.fireEvent(BI.Editor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Input.EVENT_CONFIRM, function () { - self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments); - }); - this.element.click(function (e) { - e.stopPropagation(); - return false; - }); - if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) { - this.setValue(this.options.value); - } else { - this._checkWaterMark(); - } - }, - - _checkToolTip: function () { - var o = this.options; - var errorText = o.errorText; - if (BI.isFunction(errorText)) { - errorText = errorText(this.editor.getValue()); - } - if (BI.isKey(errorText)) { - if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) { - this.setTitle(""); - } else { - this.setTitle(errorText); - } - } - }, - - _checkError: function () { - this.setErrorVisible(this.isEnabled() && !this.isValid()); - this._checkToolTip(); - }, - - _checkWaterMark: function () { - var o = this.options; - if (!this.disabledWaterMark && this.editor.getValue() === "" && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - setErrorText: function (text) { - this.options.errorText = text; - }, - - getErrorText: function () { - return this.options.errorText; - }, - - setErrorVisible: function (b) { - var o = this.options; - var errorText = o.errorText; - if (BI.isFunction(errorText)) { - errorText = errorText(this.editor.getValue()); - } - if (!this.disabledError && BI.isKey(errorText)) { - BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this); - this._checkToolTip(); - return BI.Bubbles.get(this.getName()); - } - }, - - disableError: function () { - this.disabledError = true; - this._checkError(); - }, - - enableError: function () { - this.disabledError = false; - this._checkError(); - }, - - disableWaterMark: function () { - this.disabledWaterMark = true; - this._checkWaterMark(); - }, - - enableWaterMark: function () { - this.disabledWaterMark = false; - this._checkWaterMark(); - }, - - focus: function () { - this.element.addClass("text-editor-focus"); - this.editor.focus(); - }, - - blur: function () { - this.element.removeClass("text-editor-focus"); - this.editor.blur(); - }, - - selectAll: function () { - this.editor.selectAll(); - }, - - onKeyDown: function (k) { - this.editor.onKeyDown(k); - }, - - setValue: function (v) { - BI.Editor.superclass.setValue.apply(this, arguments); - this.editor.setValue(v); - this._checkError(); - this._checkWaterMark(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - resetLastValidValue: function () { - this.editor.resetLastValidValue(); - }, - - getValue: function () { - if (!this.isValid()) { - return BI.trim(this.editor.getLastValidValue()); - } - return BI.trim(this.editor.getValue()); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Editor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.Editor.EVENT_BLUR = "EVENT_BLUR"; -BI.Editor.EVENT_CLICK = "EVENT_CLICK"; -BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.Editor.EVENT_SPACE = "EVENT_SPACE"; -BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.Editor.EVENT_START = "EVENT_START"; -BI.Editor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Editor.EVENT_STOP = "EVENT_STOP"; -BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.Editor.EVENT_VALID = "EVENT_VALID"; -BI.Editor.EVENT_ERROR = "EVENT_ERROR"; -BI.Editor.EVENT_ENTER = "EVENT_ENTER"; -BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.Editor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.Editor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.editor", BI.Editor);/** - * 多文件 - * - * Created by GUY on 2016/4/13. - * @class BI.MultifileEditor - * @extends BI.Single - * @abstract - */ -BI.MultifileEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-multifile-editor", - multiple: false, - maxSize: -1,//1024 * 1024 - accept: "", - url: "" - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.MultifileEditor.superclass._init.apply(this, arguments); - this.file = BI.createWidget({ - type: "bi.file", - cls: "multifile-editor", - width: "100%", - height: "100%", - name: o.name, - url: o.url, - multiple: o.multiple, - accept: o.accept, - maxSize: o.maxSize - }); - this.file.on(BI.File.EVENT_CHANGE, function () { - self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments); - }); - this.file.on(BI.File.EVENT_UPLOADSTART, function () { - self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments); - }); - this.file.on(BI.File.EVENT_ERROR, function () { - self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments); - }); - this.file.on(BI.File.EVENT_PROGRESS, function () { - self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments); - }); - this.file.on(BI.File.EVENT_UPLOADED, function () { - self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments); - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.adaptive", - scrollable: false, - items: [this.file] - }, - top: 0, - right: 0, - left: 0, - bottom: 0 - }] - }); - }, - - select: function () { - this.file.select(); - }, - - getValue: function () { - return this.file.getValue(); - }, - - upload: function () { - this.file.upload(); - }, - - reset: function () { - this.file.reset(); - } -}); -BI.MultifileEditor.EVENT_CHANGE = "MultifileEditor.EVENT_CHANGE"; -BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART"; -BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR"; -BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS"; -BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED"; -BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/** - * - * Created by GUY on 2016/1/18. - * @class BI.TextAreaEditor - * @extends BI.Single - */ -BI.TextAreaEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-textarea-editor bi-card', - value: '' - }); - }, - _init: function () { - BI.TextAreaEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.content = BI.createWidget({ - type: "bi.layout", - tagName: "textarea", - width: "100%", - height: "100%", - cls: "bi-textarea textarea-editor-content display-block" - }); - this.content.element.css({"resize": "none"}); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.adaptive", - items: [this.content] - }, - left: 0, - right: 3, - top: 0, - bottom: 5 - }] - }); - - this.content.element.on("input propertychange", function (e) { - self._checkWaterMark(); - self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE); - }); - - this.content.element.focus(function () { - if (self.isValid()) { - self._focus(); - self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); - } - $(document).bind("mousedown." + self.getName(), function (e) { - if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { - $(document).unbind("mousedown." + self.getName()); - self.content.element.blur(); - } - }); - }); - this.content.element.blur(function () { - if (self.isValid()) { - self._blur(); - self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); - } - $(document).unbind("mousedown." + self.getName()); - }); - if (BI.isKey(o.value)) { - self.setValue(o.value); - } - if (BI.isNotNull(o.style)) { - self.setValue(o.style); - } - this._checkWaterMark(); - }, - - _checkWaterMark: function () { - var self = this, o = this.options; - var val = this.getValue(); - if (BI.isNotEmptyString(val)) { - this.watermark && this.watermark.destroy(); - this.watermark = null; - } else { - if (BI.isNotEmptyString(o.watermark)) { - if (!this.watermark) { - this.watermark = BI.createWidget({ - type: "bi.text_button", - cls: "bi-water-mark", - textAlign: "left", - height: 30, - text: o.watermark, - invalid: o.invalid, - disabled: o.disabled - }); - this.watermark.on(BI.TextButton.EVENT_CHANGE, function () { - self.focus(); - }); - BI.createWidget({ - type: 'bi.absolute', - element: this, - items: [{ - el: this.watermark, - left: 0, - top: 0, - right: 0 - }] - }) - } else { - this.watermark.setText(o.watermark); - this.watermark.setValid(!o.invalid); - this.watermark.setEnable(!o.disabled); - } - } - } - }, - - _focus: function () { - this.content.element.addClass("textarea-editor-focus"); - this._checkWaterMark(); - }, - - _blur: function () { - this.content.element.removeClass("textarea-editor-focus"); - this._checkWaterMark(); - }, - - focus: function () { - this._focus(); - this.content.element.focus(); - }, - - blur: function () { - this._blur(); - this.content.element.blur(); - }, - - getValue: function () { - return this.content.element.val(); - }, - - setValue: function (value) { - this.content.element.val(value); - this._checkWaterMark(); - }, - - setStyle: function (style) { - this.style = style; - this.element.css(style); - this.content.element.css(BI.extend({}, style, { - color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor) - })) - }, - - getStyle: function () { - return this.style; - }, - - _setValid: function (b) { - BI.TextAreaEditor.superclass._setValid.apply(this, arguments); - // this.content.setValid(b); - // this.watermark && this.watermark.setValid(b); - } -}); -BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/** - * guy 图标 - * @class BI.Icon - * @extends BI.Single - */ -BI.Icon = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - tagName: "i", - baseCls: (conf.baseCls || "") + " x-icon b-font horizon-center display-block" - }) - }, - _init: function () { - BI.Icon.superclass._init.apply(this, arguments); - if (BI.isIE9Below()) { - this.element.addClass("hack"); - } - } -}); -BI.shortcut("bi.icon", BI.Icon);/** - * @class BI.Iframe - * @extends BI.Single - * @abstract - * Created by GameJian on 2016/3/2. - */ -BI.Iframe = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-iframe", - src: "", - width: "100%", - height: "100%" - }) - }, - - _init: function () { - var o = this.options; - this.options.element = $("')); - } catch (e) { - var form = document.createElement('form'), - iframe = handler.iframe || (handler.iframe = document.createElement("iframe")); - form.setAttribute("enctype", "multipart/form-data"); - iframe.setAttribute("name", iframe.id = target); - iframe.setAttribute("src", url); - } - iframe.style.position = "absolute"; - iframe.style.left = iframe.style.top = "-10000px"; - iframe.onload = onload; - iframe.onerror = function (event) { - if (isFunction(handler.onerror)) { - handler.onerror(rpe, event || window.event); - } - }; - iframe.onreadystatechange = function () { - if (/loaded|complete/i.test(iframe.readyState)) { - onload(); - - //wei : todo,将附件信息放到handler.attach - } - else if (isFunction(handler.onloadprogress)) { - if (rpe.loaded < rpe.total) { - ++rpe.loaded; - } - handler.onloadprogress(rpe, { - readyState: { - loading: 2, - interactive: 3, - loaded: 4, - complete: 4 - }[iframe.readyState] || 1 - }); - } - }; - form.setAttribute("action", handler.url); - form.setAttribute("target", iframe.id); - form.setAttribute("method", "post"); - form.appendChild(handler.file); - form.style.display = "none"; - if (isFunction(handler.onloadstart)) { - handler.onloadstart(rpe, {}); - } - with (document.body || document.documentElement) { - appendChild(iframe); - appendChild(form); - form.submit(); - } - ; - return handler; - }; - } - xhr = null; - return sendFile; - })(Object.prototype.toString); - - var sendFiles = function (handler, maxSize, width, height) { - - var length = handler.files.length, - i = 0, - onload = handler.onload, - onloadstart = handler.onloadstart; - handler.current = 0; - handler.total = 0; - handler.sent = 0; - while (handler.current < length) { - handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size); - handler.current++; - } - handler.current = 0; - if (length && handler.files[0].fileSize !== -1) { - handler.file = handler.files[handler.current]; - - sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { - handler.onloadstart = null; - handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size); - if (++handler.current < length) { - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = arguments.callee; - } else if (onload) { - handler.onloadstart = onloadstart; - handler.onload = onload; - handler.onload(rpe, xhr); - } - }; - } else if (length) { - handler.total = length * 100; - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { - var callee = arguments.callee; - handler.onloadstart = null; - handler.sent += 100; - if (++handler.current < length) { - if (/\b(chrome|safari)\b/i.test(navigator.userAgent)) { - handler.iframe.parentNode.removeChild(handler.iframe); - handler.iframe = null; - } - setTimeout(function () { - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = callee; - }, 15); - } else if (onload) { - setTimeout(function () { - handler.iframe.parentNode.removeChild(handler.iframe); - handler.iframe = null; - handler.onloadstart = onloadstart; - handler.onload = onload; - handler.onload(rpe, xhr); - }, 15); - } - }; - } - return handler; - }; - - BI.File = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.File.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-file display-block", - element: "", - name: "", - url: "", - multiple: true, - accept: "", /**'*.jpg; *.zip'**/ - maxSize: -1 //1024 * 1024 - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.File.superclass._init.apply(this, arguments); - if (o.multiple === true) { - this.element.attr("multiple", "multiple"); - } - this.element.attr("name", o.name || this.getName()); - - BI.nextTick(function () { - // create the noswfupload.wrap Object - // wrap.maxSize 文件大小限制 - // wrap.maxlength 文件个数限制 - var _wrap = self.wrap = self._wrap(self.element[0], o.maxSize); - // fileType could contain whatever text but filter checks *.{extension} - // if present - - // handlers - - _wrap.onloadstart = function (rpe, xhr) { - //BI.Msg.toast("loadstart"); - self.fireEvent(BI.File.EVENT_UPLOADSTART); - }; - - _wrap.onprogress = function (rpe, xhr) { - //BI.Msg.toast("onprogress"); - // percent for each bar - - // fileSize is -1 only if browser does not support file info access - // this if splits recent browsers from others - if (this.file.fileSize !== -1) { - // simulation property indicates when the progress event is fake - if (rpe.simulation) { - - } else { - - } - } else { - // if fileSIze is -1 browser is using an iframe because it does - // not support - // files sent via Ajax (XMLHttpRequest) - // We can still show some information - } - self.fireEvent(BI.File.EVENT_PROGRESS, { - file: this.file, - total: rpe.total, - loaded: rpe.loaded, - simulation: rpe.simulation - }); - }; - - // generated if there is something wrong during upload - _wrap.onerror = function () { - // just inform the user something was wrong - self.fireEvent(BI.File.EVENT_ERROR); - }; - - // generated when every file has been sent (one or more, it does not - // matter) - _wrap.onload = function (rpe, xhr) { - var self_ = this; - // just show everything is fine ... - // ... and after a second reset the component - setTimeout(function () { - self_.clean(); // remove files from list - self_.hide(); // hide progress bars and enable input file - - //BI.Msg.toast("onload"); - self.fireEvent(BI.File.EVENT_UPLOADED); - // enable again the submit button/element - }, 1000); - }; - _wrap.url = o.url ? o.url : BI.servletURL - + '?op=fr_attach&cmd=ah_upload'; - _wrap.fileType = o.accept; //文件类型限制 - _wrap.attach_array = []; - _wrap.attach_names = []; - _wrap.attachNum = 0; - }); - }, - - _events: function (wrap) { - var self = this; - event.add(wrap.dom.input, "change", function () { - event.del(wrap.dom.input, "change", arguments.callee); - for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) { - var item = files.item(i); - var tempFile = item.value || item.name; - var value = item.fileName || (item.fileName = tempFile.split("\\").pop()), - ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown", - size = item.fileSize || item.size; - if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { - //文件类型不支持 - BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); - self.fireEvent(BI.File.EVENT_ERROR, { - errorType: 0, - file: item - }); - } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { - //文件大小不支持 - BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); - self.fireEvent(BI.File.EVENT_ERROR, { - errorType: 1, - file: item - }); - } else { - wrap.files.unshift(item); - //BI.Msg.toast(value); - self.fireEvent(BI.File.EVENT_CHANGE, { - file: item - }); - } - } - input.value = ""; - wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input); - wrap.dom.input = input; - event.add(wrap.dom.input, "change", arguments.callee); - }); - return wrap; - }, - - _wrap: function () { - var self = this, o = this.options; - // be sure input accept multiple files - var input = this.element[0]; - if (o.multiple === true) { - this.element.attr("multiple", "multiple"); - } - input.value = ""; - - // wrap Object - return this._events({ - - // DOM namespace - dom: { - input: input, // input file - disabled: false // internal use, checks input file state - }, - name: input.name, // name to send for each file ($_FILES[{name}] in the server) - // maxSize is the maximum amount of bytes for each file - maxSize: o.maxSize ? o.maxSize >> 0 : -1, - files: [], // file list - - // remove every file from the noswfupload component - clean: function () { - this.files = []; - }, - - // upload one file a time (which make progress possible rather than all files in one shot) - // the handler is an object injected into the wrap one, could be the wrap itself or - // something like {onload:function(){alert("OK")},onerror:function(){alert("Error")}, etc ...} - upload: function (handler) { - if (handler) { - for (var key in handler) { - this[key] = handler[key]; - } - } - sendFiles(this, this.maxSize); - return this; - }, - - // hide progress bar (total + current) and enable files selection - hide: function () { - if (this.dom.disabled) { - this.dom.disabled = false; - this.dom.input.removeAttribute("disabled"); - } - }, - - // show progress bar and disable file selection (used during upload) - // total and current are pixels used to style bars - // totalProp and currentProp are properties to change, "height" by default - show: function (total, current, totalProp, currentProp) { - if (!this.dom.disabled) { - this.dom.disabled = true; - this.dom.input.setAttribute("disabled", "disabled"); - } - } - }); - }, - - select: function () { - $(this.wrap.dom.input).click(); - }, - - upload: function (handler) { - this.wrap.upload(handler); - }, - - getValue: function () { - return this.wrap.attach_array; - }, - - reset: function () { - this.wrap.attach_array = []; - this.wrap.attach_names = []; - this.wrap.attachNum = 0; - }, - - _setEnable: function (enable) { - BI.File.superclass._setEnable.apply(this, arguments); - if (enable === true) { - this.element.attr("disabled", "disabled"); - } else { - this.element.removeAttr("disabled"); - } - } - }); - BI.File.EVENT_CHANGE = "BI.File.EVENT_CHANGE"; - BI.File.EVENT_UPLOADSTART = "EVENT_UPLOADSTART"; - BI.File.EVENT_ERROR = "EVENT_ERROR"; - BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; - BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; - BI.shortcut("bi.file", BI.File); -})();/** - * guy - * @class BI.Input 一个button和一行数 组成的一行listitem - * @extends BI.Single - * @type {*|void|Object} - */ -BI.Input = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Input.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-input display-block", - element: "", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn,//按确定键能否退出编辑 - allowBlank: false - }) - }, - - _init: function () { - BI.Input.superclass._init.apply(this, arguments); - var self = this; - var ctrlKey = false; - var inputEventValid = false; - var _keydown = BI.debounce(function (keyCode) { - self.onKeyDown(keyCode, ctrlKey); - self._keydown_ = false; - }, 300); - var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, true); - this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, true); - this.element - .keydown(function (e) { - inputEventValid = false; - ctrlKey = e.ctrlKey; - self.fireEvent(BI.Input.EVENT_QUICK_DOWN); - }) - .keyup(function (e) { - if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { - self._keydown_ = true; - _keydown(e.keyCode); - } - }) - .on("input propertychange", function (e) { - inputEventValid = true; - self._keydown_ = true; - _keydown(e.keyCode); - }) - .click(function (e) { - e.stopPropagation(); - _clk(); - }) - .mousedown(function (e) { - self.element.val(self.element.val()); - }) - .focusout(function (e) { - self._blurDebounce(); - }); - }, - - _focus: function () { - this.element.addClass("bi-input-focus"); - this._checkValidationOnValueChange(); - this._isEditing = true; - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this.fireEvent(BI.Input.EVENT_FOCUS); - }, - - _blur: function () { - var self = this; - if (self._keydown_ === true) { - BI.delay(blur, 300); - } else { - blur(); - } - function blur() { - if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { - self.element.val(self._lastValidValue ? self._lastValidValue : ""); - self._checkValidationOnValueChange(); - self._defaultState(); - } - self.element.removeClass("bi-input-focus"); - self._isEditing = false; - self._start = false; - if (self.isValid()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self); - self.fireEvent(BI.Input.EVENT_CONFIRM); - } - self.fireEvent(BI.Input.EVENT_BLUR); - } - }, - - _click: function () { - if (this._isEditing !== true) { - this._focus(); - this.selectAll(); - this.fireEvent(BI.Input.EVENT_CLICK); - } - }, - - onClick: function () { - this._click(); - }, - - onKeyDown: function (keyCode, ctrlKey) { - if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { - this._checkValidationOnValueChange(); - } - if (this.isValid() && BI.trim(this.getValue()) !== "") { - if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") - || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { - this._start = true; - this._pause = false; - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_START); - } - } - if (ctrlKey === true && keyCode === 86) {//ctrlKey+V - this._valueChange(); - } else { - if (keyCode == BI.KeyCode.ENTER) { - if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { - this.blur(); - this.fireEvent(BI.Input.EVENT_ENTER); - } else { - this.fireEvent(BI.Input.EVENT_RESTRICT); - } - } - if (keyCode == BI.KeyCode.SPACE) { - this.fireEvent(BI.Input.EVENT_SPACE); - } - if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == "") { - this.fireEvent(BI.Input.EVENT_REMOVE); - } - if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { - this.fireEvent(BI.Input.EVENT_BACKSPACE); - } - } - this.fireEvent(BI.Input.EVENT_KEY_DOWN); - - if (BI.isEndWithBlank(this.getValue())) { - this._pause = true; - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); - this.fireEvent(BI.Input.EVENT_PAUSE); - this._defaultState(); - } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); - } - }, - - //初始状态 - _defaultState: function () { - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this._lastValue = this.getValue(); - this._lastSubmitValue = null; - }, - - _valueChange: function () { - if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_CHANGE); - this._lastSubmitValue = BI.trim(this.getValue()); - } - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this._lastValue = this.getValue(); - }, - - _checkValidationOnValueChange: function () { - var o = this.options; - var v = this.getValue(); - this.setValid( - (o.allowBlank === true && BI.trim(v) == "") || - (BI.isNotEmptyString(BI.trim(v)) - && (v === this._lastValidValue || - o.validationChecker.apply(this, [BI.trim(v)]) !== false)) - ); - }, - - focus: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能focus"); - } - if (!this._isEditing === true) { - this.element.focus(); - this._focus(); - this.selectAll(); - } - }, - - blur: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能blur"); - } - if (this._isEditing === true) { - this.element.blur(); - this._blurDebounce(); - } - }, - - selectAll: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能select"); - } - this.element.select(); - this._isEditing = true; - }, - - setValue: function (textValue) { - this.element.val(textValue); - BI.nextTick(BI.bind(function () { - this._checkValidationOnValueChange(); - this._defaultState(); - if (this.isValid()) { - this._lastSubmitValue = this.getValue(); - } - }, this)); - }, - - getValue: function () { - return this.element.val() || ""; - }, - - isEditing: function () { - return this._isEditing; - }, - - getLastValidValue: function () { - return this._lastValidValue; - }, - - _setValid: function () { - BI.Input.superclass._setValid.apply(this, arguments); - if (this.isValid()) { - this._lastValidValue = this.getValue(); - this.element.removeClass("bi-input-error"); - this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); - } else { - if (this._lastValidValue === this.getValue()) { - this._lastValidValue = null; - } - this.element.addClass("bi-input-error"); - this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); - } - }, - - _setEnable: function (b) { - BI.Input.superclass._setEnable.apply(this, [b]); - this.element[0].disabled = !b; - } -}); -BI.Input.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.Input.EVENT_FOCUS = "EVENT_FOCUS"; -BI.Input.EVENT_CLICK = "EVENT_CLICK"; -BI.Input.EVENT_BLUR = "EVENT_BLUR"; -BI.Input.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.Input.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN"; -BI.Input.EVENT_SPACE = "EVENT_SPACE"; -BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.Input.EVENT_START = "EVENT_START"; -BI.Input.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Input.EVENT_STOP = "EVENT_STOP"; -BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.Input.EVENT_REMOVE = "EVENT_REMOVE"; -BI.Input.EVENT_EMPTY = "EVENT_EMPTY"; -BI.Input.EVENT_VALID = "EVENT_VALID"; -BI.Input.EVENT_ERROR = "EVENT_ERROR"; -BI.Input.EVENT_ENTER = "EVENT_ENTER"; -BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.shortcut("bi.input", BI.Input);/** - * guy - * @extends BI.Single - * @type {*|void|Object} - */ -BI.Radio = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - var conf = BI.Radio.superclass._defaultConfig.apply(this,arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-radio radio-icon", - selected: false, - handler: BI.emptyFn, - width: 16, - height: 16, - iconWidth: 16, - iconHeight: 16 - }) - }, - - _init : function() { - BI.Radio.superclass._init.apply(this, arguments); - }, - - doClick: function(){ - BI.Radio.superclass.doClick.apply(this, arguments); - if(this.isValid()){ - this.fireEvent(BI.Radio.EVENT_CHANGE); - } - } -}); -BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; - -BI.shortcut("bi.radio", BI.Radio);/** - * Created by GUY on 2015/6/26. - */ - -BI.Label = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Label.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-label", - textAlign: "center", - whiteSpace: "nowrap", //normal or nowrap - forceCenter: false, //是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 - textWidth: null, - textHeight: null, - hgap: 0, - vgap: 0, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - text: "", - py: "", - keyword: "" - }) - }, - - _createJson: function () { - var o = this.options; - return { - type: "bi.text", - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - lineHeight: o.textHeight, - text: o.text, - value: o.value, - py: o.py, - keyword: o.keyword - }; - }, - - _init: function () { - BI.Label.superclass._init.apply(this, arguments); - - if (this.options.textAlign === "center") { - this._createCenterEl(); - } else { - this._createNotCenterEl(); - } - }, - - _createCenterEl: function () { - var o = this.options; - var json = this._createJson(); - if (BI.isNumber(o.width) && o.width > 0) { - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - if (BI.isNumber(o.height) && o.height > 0) { - var gap = (o.width - o.textWidth) / 2; - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)), - left: gap + o.hgap + o.lgap, - right: gap + o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - } - ] - }); - this.element.css({"line-height": o.height + "px"}); - return; - } - json.width = o.textWidth; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.absolute", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - json.width = o.width - 2 * o.hgap; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)) - }] - }); - return; - } - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - scrollable: o.whiteSpace === "normal", - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - if (BI.isNumber(o.textHeight) && o.textHeight > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - this.element.css({ - "line-height": o.height + "px" - }); - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - if (o.forceCenter) { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - element: this, - items: [this.text] - }); - return; - } - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }) - }, - - _createNotCenterEl: function () { - var o = this.options; - var json = this._createJson(); - if (BI.isNumber(o.width) && o.width > 0) { - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - if (BI.isNumber(o.height) && o.height > 0) { - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - } - ] - }); - this.element.css({"line-height": o.height + "px"}); - return; - } - json.width = o.textWidth; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.absolute", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [{ - el: (this.text = BI.createWidget(json)) - }] - }); - return; - } - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json) - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - if (BI.isNumber(o.textHeight) && o.textHeight > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - this.element.css({ - "line-height": o.height + "px" - }); - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - if (o.forceCenter) { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.vertical_adapt", - element: this, - items: [this.text] - }); - return; - } - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }) - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setText: function (v) { - this.options.text = v; - this.text.setText(v); - }, - - getText: function () { - return this.options.text; - }, - - setStyle: function (css) { - this.text.setStyle(css) - }, - - setValue: function (v) { - BI.Label.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.text.setValue(v); - } - }, - - populate: function () { - BI.Label.superclass.populate.apply(this, arguments); - } -}); - -BI.shortcut("bi.label", BI.Label);/** - * guy a元素 - * @class BI.Link - * @extends BI.Text - */ -BI.Link = BI.inherit(BI.Label, { - _defaultConfig: function() { - var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-link", - href: "", - target: "_blank" - }) - }, - - _createJson: function(){ - var o = this.options; - return { - type:"bi.a", - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - lineHeight: o.textHeight, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py, - href: o.href, - target: o.target - }; - }, - - _init : function() { - BI.Link.superclass._init.apply(this, arguments); - } -}); - -BI.shortcut("bi.link", BI.Link);/** - * guy - * 气泡提示 - * @class BI.Bubble - * @extends BI.Tip - * @type {*|void|Object} - */ -BI.Bubble = BI.inherit(BI.Tip, { - _defaultConfig: function() { - return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-bubble", - direction: "top", - text: "", - height: 35 - }) - }, - _init : function() { - BI.Bubble.superclass._init.apply(this, arguments); - var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; - }; - this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); - BI.createWidget({ - type: "bi.left", - element: this, - items: [this["_" + this.options.direction]()] - }) - }, - - _createBubbleText: function(){ - return (this.text = BI.createWidget({ - type: "bi.label", - cls: "bubble-text", - text: this.options.text, - hgap: 10, - height: 30 - })); - }, - - _top: function(){ - return BI.createWidget({ - type: "bi.vertical", - items: [{ - el: this._createBubbleText(), - height: 30 - }, { - el: { - type: "bi.layout" - }, - height: 3 - }] - }) - }, - - _bottom: function(){ - return BI.createWidget({ - type: "bi.vertical", - items: [{ - el: { - type: "bi.layout" - }, - height: 3 - }, { - el: this._createBubbleText(), - height: 30 - }] - }) - }, - - _left: function(){ - return BI.createWidget({ - type: "bi.right", - items: [{ - el: { - type: "bi.layout", - width: 3, - height: 30 - } - }, { - el: this._createBubbleText() - }] - }) - }, - - _right: function(){ - return BI.createWidget({ - type: "bi.left", - items: [{ - el: { - type: "bi.layout", - width: 3, - height: 30 - } - }, { - el: this._createBubbleText() - }] - }) - }, - - setText: function(text){ - this.text.setText(text); - } -}); - -BI.shortcut("bi.bubble", BI.Bubble);/** - * toast提示 - * - * Created by GUY on 2015/9/7. - * @class BI.Toast - * @extends BI.Tip - */ -BI.Toast = BI.inherit(BI.Tip, { - _const: { - minWidth: 200, - hgap: 20 - }, - - _defaultConfig: function () { - return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-toast", - text: "", - level: "success",//success或warning - height: 30 - }) - }, - _init: function () { - BI.Toast.superclass._init.apply(this, arguments); - var o = this.options; - this.element.css({ - minWidth: this._const.minWidth + "px" - }) - this.element.addClass("toast-" + o.level); - var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; - }; - this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); - - this.text = BI.createWidget({ - type: "bi.label", - element: this, - text: o.text, - height: 30, - hgap: this._const.hgap - }) - }, - - setWidth: function(width){ - this.element.width(width); - }, - - setText: function (text) { - this.text.setText(text); - } -}); - -BI.shortcut("bi.toast", BI.Toast);/** - * toast提示 - * - * Created by GUY on 2015/9/7. - * @class BI.Tooltip - * @extends BI.Tip - */ -BI.Tooltip = BI.inherit(BI.Tip, { - _const: { - hgap: 10 - }, - - _defaultConfig: function () { - return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-tooltip", - text: "", - level: "success",//success或warning - stopEvent: false, - stopPropagation: false, - height: 20 - }) - }, - _init: function () { - BI.Tooltip.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.element.addClass("tooltip-" + o.level); - var fn = function (e) { - o.stopPropagation && e.stopPropagation(); - o.stopEvent && e.stopEvent(); - }; - this.element.bind({ - "click": fn, - "mousedown": fn, - "mouseup": fn, - "mouseover": fn, - "mouseenter": fn, - "mouseleave": fn, - "mousemove": fn - }); - - var texts = (o.text + "").split("\n"); - if (texts.length > 1) { - BI.createWidget({ - type: "bi.vertical", - element: this, - hgap: this._const.hgap, - items: BI.map(texts, function (i, text) { - return { - type: "bi.label", - textAlign: "left", - whiteSpace: "normal", - text: text, - textHeight: 16 - } - }) - }) - } else { - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - whiteSpace: "normal", - text: o.text, - textHeight: 20, - hgap: this._const.hgap - }); - } - }, - - setWidth: function (width) { - this.element.width(width - 2 * this._const.hgap); - }, - - setText: function (text) { - this.text && this.text.setText(text); - }, - - setLevel: function (level) { - this.element.removeClass("tooltip-success").removeClass("tooltip-warning"); - this.element.addClass("tooltip-" + level); - } -}); - -BI.shortcut("bi.tooltip", BI.Tooltip);/** - * 下拉 - * @class BI.Trigger - * @extends BI.Single - * @abstract - */ -BI.Trigger = BI.inherit(BI.Single, { - _defaultConfig: function() { - var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", - height: 30 - }) - }, - - _init : function() { - BI.Trigger.superclass._init.apply(this, arguments); - }, - - setKey: function(){ - - }, - - getKey: function(){ - - } -});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ┌────────────────────────────────────────────────────────────┐ \\ -// │ Eve 0.4.2 - JavaScript Events Library │ \\ -// ├────────────────────────────────────────────────────────────┤ \\ -// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ -// └────────────────────────────────────────────────────────────┘ \\ -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("eve", function() { - return factory(); - }); - } else if (typeof exports === "object") { - module.exports = factory(); - } else { - glob.eve = factory(); - } -}(this, function(){ - var version = "0.4.2", - has = "hasOwnProperty", - separator = /[\.\/]/, - wildcard = "*", - fun = function () {}, - numsort = function (a, b) { - return a - b; - }, - current_event, - stop, - events = {n: {}}, - /*\ - * eve - [ method ] - - * Fires event with given `name`, given scope and other parameters. - - > Arguments - - - name (string) name of the *event*, dot (`.`) or slash (`/`) separated - - scope (object) context for the event handlers - - varargs (...) the rest of arguments will be sent to event handlers - - = (object) array of returned values from the listeners - \*/ - eve = function (name, scope) { - name = String(name); - var e = events, - oldstop = stop, - args = Array.prototype.slice.call(arguments, 2), - listeners = eve.listeners(name), - z = 0, - f = false, - l, - indexed = [], - queue = {}, - out = [], - ce = current_event, - errors = []; - current_event = name; - stop = 0; - for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { - indexed.push(listeners[i].zIndex); - if (listeners[i].zIndex < 0) { - queue[listeners[i].zIndex] = listeners[i]; - } - } - indexed.sort(numsort); - while (indexed[z] < 0) { - l = queue[indexed[z++]]; - out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - } - for (i = 0; i < ii; i++) { - l = listeners[i]; - if ("zIndex" in l) { - if (l.zIndex == indexed[z]) { - out.push(l.apply(scope, args)); - if (stop) { - break; - } - do { - z++; - l = queue[indexed[z]]; - l && out.push(l.apply(scope, args)); - if (stop) { - break; - } - } while (l) - } else { - queue[l.zIndex] = l; - } - } else { - out.push(l.apply(scope, args)); - if (stop) { - break; - } - } - } - stop = oldstop; - current_event = ce; - return out.length ? out : null; - }; - // Undocumented. Debug only. - eve._events = events; - /*\ - * eve.listeners - [ method ] - - * Internal method which gives you array of all event handlers that will be triggered by the given `name`. - - > Arguments - - - name (string) name of the event, dot (`.`) or slash (`/`) separated - - = (array) array of event handlers - \*/ - eve.listeners = function (name) { - var names = name.split(separator), - e = events, - item, - items, - k, - i, - ii, - j, - jj, - nes, - es = [e], - out = []; - for (i = 0, ii = names.length; i < ii; i++) { - nes = []; - for (j = 0, jj = es.length; j < jj; j++) { - e = es[j].n; - items = [e[names[i]], e[wildcard]]; - k = 2; - while (k--) { - item = items[k]; - if (item) { - nes.push(item); - out = out.concat(item.f || []); - } - } - } - es = nes; - } - return out; - }; - - /*\ - * eve.on - [ method ] - ** - * Binds given event handler with a given name. You can use wildcards “`*`” for the names: - | eve.on("*.under.*", f); - | eve("mouse.under.floor"); // triggers f - * Use @eve to trigger the listener. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - ** - = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment. - > Example: - | eve.on("mouse", eatIt)(2); - | eve.on("mouse", scream); - | eve.on("mouse", catchIt)(1); - * This will ensure that `catchIt()` function will be called before `eatIt()`. - * - * If you want to put your handler before non-indexed handlers, specify a negative value. - * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”. - \*/ - eve.on = function (name, f) { - name = String(name); - if (typeof f != "function") { - return function () {}; - } - var names = name.split(separator), - e = events; - for (var i = 0, ii = names.length; i < ii; i++) { - e = e.n; - e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}}); - } - e.f = e.f || []; - for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { - return fun; - } - e.f.push(f); - return function (zIndex) { - if (+zIndex == +zIndex) { - f.zIndex = +zIndex; - } - }; - }; - /*\ - * eve.f - [ method ] - ** - * Returns function that will fire given event with optional arguments. - * Arguments that will be passed to the result function will be also - * concated to the list of final arguments. - | el.onclick = eve.f("click", 1, 2); - | eve.on("click", function (a, b, c) { - | console.log(a, b, c); // 1, 2, [event object] - | }); - > Arguments - - event (string) event name - - varargs (…) and any other arguments - = (function) possible event handler function - \*/ - eve.f = function (event) { - var attrs = [].slice.call(arguments, 1); - return function () { - eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0))); - }; - }; - /*\ - * eve.stop - [ method ] - ** - * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing. - \*/ - eve.stop = function () { - stop = 1; - }; - /*\ - * eve.nt - [ method ] - ** - * Could be used inside event handler to figure out actual name of the event. - ** - > Arguments - ** - - subname (string) #optional subname of the event - ** - = (string) name of the event, if `subname` is not specified - * or - = (boolean) `true`, if current event’s name contains `subname` - \*/ - eve.nt = function (subname) { - if (subname) { - return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); - } - return current_event; - }; - /*\ - * eve.nts - [ method ] - ** - * Could be used inside event handler to figure out actual name of the event. - ** - ** - = (array) names of the event - \*/ - eve.nts = function () { - return current_event.split(separator); - }; - /*\ - * eve.off - [ method ] - ** - * Removes given function from the list of event listeners assigned to given name. - * If no arguments specified all the events will be cleared. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - \*/ - /*\ - * eve.unbind - [ method ] - ** - * See @eve.off - \*/ - eve.off = eve.unbind = function (name, f) { - if (!name) { - eve._events = events = {n: {}}; - return; - } - var names = name.split(separator), - e, - key, - splice, - i, ii, j, jj, - cur = [events]; - for (i = 0, ii = names.length; i < ii; i++) { - for (j = 0; j < cur.length; j += splice.length - 2) { - splice = [j, 1]; - e = cur[j].n; - if (names[i] != wildcard) { - if (e[names[i]]) { - splice.push(e[names[i]]); - } - } else { - for (key in e) if (e[has](key)) { - splice.push(e[key]); - } - } - cur.splice.apply(cur, splice); - } - } - for (i = 0, ii = cur.length; i < ii; i++) { - e = cur[i]; - while (e.n) { - if (f) { - if (e.f) { - for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { - e.f.splice(j, 1); - break; - } - !e.f.length && delete e.f; - } - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - var funcs = e.n[key].f; - for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { - funcs.splice(j, 1); - break; - } - !funcs.length && delete e.n[key].f; - } - } else { - delete e.f; - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - delete e.n[key].f; - } - } - e = e.n; - } - } - }; - /*\ - * eve.once - [ method ] - ** - * Binds given event handler with a given name to only run once then unbind itself. - | eve.once("login", f); - | eve("login"); // triggers f - | eve("login"); // no listeners - * Use @eve to trigger the listener. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - ** - = (function) same return function as @eve.on - \*/ - eve.once = function (name, f) { - var f2 = function () { - eve.unbind(name, f2); - return f.apply(this, arguments); - }; - return eve.on(name, f2); - }; - /*\ - * eve.version - [ property (string) ] - ** - * Current version of the library. - \*/ - eve.version = version; - eve.toString = function () { - return "You are running Eve " + version; - }; - - return eve; -})); - -// ┌────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Core Module │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ -// └────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.core", ["eve"], function(eve) { - return factory(eve); - }); - } else if (typeof exports === "object") { - module.exports = factory(require("eve")); - } else { - glob.Raphael = factory(glob.eve); - } -}(this, function (eve) { - /*\ - * Raphael - [ method ] - ** - * Creates a canvas object on which to draw. - * You must do this first, as all future calls to drawing methods - * from this instance will be bound to this canvas. - > Parameters - ** - - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface - - width (number) - - height (number) - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - x (number) - - y (number) - - width (number) - - height (number) - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, }). See @Paper.add. - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`. - = (object) @Paper - > Usage - | // Each of the following examples create a canvas - | // that is 320px wide by 200px high. - | // Canvas is created at the viewport’s 10,50 coordinate. - | var paper = Raphael(10, 50, 320, 200); - | // Canvas is created at the top left corner of the #notepad element - | // (or its top right corner in dir="rtl" elements) - | var paper = Raphael(document.getElementById("notepad"), 320, 200); - | // Same as above - | var paper = Raphael("notepad", 320, 200); - | // Image dump - | var set = Raphael(["notepad", 320, 200, { - | type: "rect", - | x: 10, - | y: 10, - | width: 25, - | height: 25, - | stroke: "#f00" - | }, { - | type: "text", - | x: 30, - | y: 40, - | text: "Dump" - | }]); - \*/ - function R(first) { - if (R.is(first, "function")) { - return loaded ? first() : eve.on("raphael.DOMload", first); - } else if (R.is(first, array)) { - return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); - } else { - var args = Array.prototype.slice.call(arguments, 0); - if (R.is(args[args.length - 1], "function")) { - var f = args.pop(); - return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { - f.call(R._engine.create[apply](R, args)); - }); - } else { - return R._engine.create[apply](R, arguments); - } - } - } - R.version = "2.1.4"; - R.eve = eve; - var loaded, - separator = /[, ]+/, - elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, - formatrg = /\{(\d+)\}/g, - proto = "prototype", - has = "hasOwnProperty", - g = { - doc: document, - win: window - }, - oldRaphael = { - was: Object.prototype[has].call(g.win, "Raphael"), - is: g.win.Raphael - }, - Paper = function () { - /*\ - * Paper.ca - [ property (object) ] - ** - * Shortcut for @Paper.customAttributes - \*/ - /*\ - * Paper.customAttributes - [ property (object) ] - ** - * If you have a set of attributes that you would like to represent - * as a function of some number you can do it easily with custom attributes: - > Usage - | paper.customAttributes.hue = function (num) { - | num = num % 1; - | return {fill: "hsb(" + num + ", 0.75, 1)"}; - | }; - | // Custom attribute “hue” will change fill - | // to be given hue with fixed saturation and brightness. - | // Now you can use it like this: - | var c = paper.circle(10, 10, 10).attr({hue: .45}); - | // or even like this: - | c.animate({hue: 1}, 1e3); - | - | // You could also create custom attribute - | // with multiple parameters: - | paper.customAttributes.hsb = function (h, s, b) { - | return {fill: "hsb(" + [h, s, b].join(",") + ")"}; - | }; - | c.attr({hsb: "0.5 .8 1"}); - | c.animate({hsb: [1, 0, 0.5]}, 1e3); - \*/ - this.ca = this.customAttributes = {}; - }, - paperproto, - appendChild = "appendChild", - apply = "apply", - concat = "concat", - supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test - E = "", - S = " ", - Str = String, - split = "split", - events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), - touchMap = { - mousedown: "touchstart", - mousemove: "touchmove", - mouseup: "touchend" - }, - lowerCase = Str.prototype.toLowerCase, - math = Math, - mmax = math.max, - mmin = math.min, - abs = math.abs, - pow = math.pow, - PI = math.PI, - nu = "number", - string = "string", - array = "array", - toString = "toString", - fillString = "fill", - objectToString = Object.prototype.toString, - paper = {}, - push = "push", - ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i, - colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, - isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, - bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, - round = math.round, - setAttribute = "setAttribute", - toFloat = parseFloat, - toInt = parseInt, - upperCase = Str.prototype.toUpperCase, - availableAttrs = R._availableAttrs = { - "arrow-end": "none", - "arrow-start": "none", - blur: 0, - "clip-rect": "0 0 1e9 1e9", - cursor: "default", - cx: 0, - cy: 0, - fill: "#fff", - "fill-opacity": 1, - font: '10px "Arial"', - "font-family": '"Arial"', - "font-size": "10", - "font-style": "normal", - "font-weight": 400, - gradient: 0, - height: 0, - href: "http://raphaeljs.com/", - "letter-spacing": 0, - opacity: 1, - path: "M0,0", - r: 0, - rx: 0, - ry: 0, - src: "", - stroke: "#000", - "stroke-dasharray": "", - "stroke-linecap": "butt", - "stroke-linejoin": "butt", - "stroke-miterlimit": 0, - "stroke-opacity": 1, - "stroke-width": 1, - target: "_blank", - "text-anchor": "middle", - title: "Raphael", - transform: "", - width: 0, - x: 0, - y: 0 - }, - availableAnimAttrs = R._availableAnimAttrs = { - blur: nu, - "clip-rect": "csv", - cx: nu, - cy: nu, - fill: "colour", - "fill-opacity": nu, - "font-size": nu, - height: nu, - opacity: nu, - path: "path", - r: nu, - rx: nu, - ry: nu, - stroke: "colour", - "stroke-opacity": nu, - "stroke-width": nu, - transform: "transform", - width: nu, - x: nu, - y: nu - }, - whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, - commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, - hsrg = {hs: 1, rg: 1}, - p2s = /,?([achlmqrstvxz]),?/gi, - pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, - tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, - pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, - radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, - eldata = {}, - sortByKey = function (a, b) { - return a.key - b.key; - }, - sortByNumber = function (a, b) { - return toFloat(a) - toFloat(b); - }, - fun = function () {}, - pipe = function (x) { - return x; - }, - rectPath = R._rectPath = function (x, y, w, h, r) { - if (r) { - return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; - } - return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; - }, - ellipsePath = function (x, y, rx, ry) { - if (ry == null) { - ry = rx; - } - return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; - }, - getPath = R._getPath = { - path: function (el) { - return el.attr("path"); - }, - circle: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.r); - }, - ellipse: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.rx, a.ry); - }, - rect: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height, a.r); - }, - image: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height); - }, - text: function (el) { - var bbox = el._getBBox(); - return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); - }, - set : function(el) { - var bbox = el._getBBox(); - return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); - } - }, - /*\ - * Raphael.mapPath - [ method ] - ** - * Transform the path string with given matrix. - > Parameters - - path (string) path string - - matrix (object) see @Matrix - = (string) transformed path string - \*/ - mapPath = R.mapPath = function (path, matrix) { - if (!matrix) { - return path; - } - var x, y, i, j, ii, jj, pathi; - path = path2curve(path); - for (i = 0, ii = path.length; i < ii; i++) { - pathi = path[i]; - for (j = 1, jj = pathi.length; j < jj; j += 2) { - x = matrix.x(pathi[j], pathi[j + 1]); - y = matrix.y(pathi[j], pathi[j + 1]); - pathi[j] = x; - pathi[j + 1] = y; - } - } - return path; - }; - - R._g = g; - /*\ - * Raphael.type - [ property (string) ] - ** - * Can be “SVG”, “VML” or empty, depending on browser support. - \*/ - R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); - if (R.type == "VML") { - var d = g.doc.createElement("div"), - b; - d.innerHTML = ''; - b = d.firstChild; - b.style.behavior = "url(#default#VML)"; - if (!(b && typeof b.adj == "object")) { - return (R.type = E); - } - d = null; - } - /*\ - * Raphael.svg - [ property (boolean) ] - ** - * `true` if browser supports SVG. - \*/ - /*\ - * Raphael.vml - [ property (boolean) ] - ** - * `true` if browser supports VML. - \*/ - R.svg = !(R.vml = R.type == "VML"); - R._Paper = Paper; - /*\ - * Raphael.fn - [ property (object) ] - ** - * You can add your own method to the canvas. For example if you want to draw a pie chart, - * you can create your own pie chart function and ship it as a Raphaël plugin. To do this - * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a - * Raphaël instance is created, otherwise it will take no effect. Please note that the - * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to - * ensure any namespacing ensures proper context. - > Usage - | Raphael.fn.arrow = function (x1, y1, x2, y2, size) { - | return this.path( ... ); - | }; - | // or create namespace - | Raphael.fn.mystuff = { - | arrow: function () {…}, - | star: function () {…}, - | // etc… - | }; - | var paper = Raphael(10, 10, 630, 480); - | // then use it - | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"}); - | paper.mystuff.arrow(); - | paper.mystuff.star(); - \*/ - R.fn = paperproto = Paper.prototype = R.prototype; - R._id = 0; - R._oid = 0; - /*\ - * Raphael.is - [ method ] - ** - * Handful of replacements for `typeof` operator. - > Parameters - - o (…) any object or primitive - - type (string) name of the type, i.e. “string”, “function”, “number”, etc. - = (boolean) is given value is of given type - \*/ - R.is = function (o, type) { - type = lowerCase.call(type); - if (type == "finite") { - return !isnan[has](+o); - } - if (type == "array") { - return o instanceof Array; - } - return (type == "null" && o === null) || - (type == typeof o && o !== null) || - (type == "object" && o === Object(o)) || - (type == "array" && Array.isArray && Array.isArray(o)) || - objectToString.call(o).slice(8, -1).toLowerCase() == type; - }; - - function clone(obj) { - if (typeof obj == "function" || Object(obj) !== obj) { - return obj; - } - var res = new obj.constructor; - for (var key in obj) if (obj[has](key)) { - res[key] = clone(obj[key]); - } - return res; - } - - /*\ - * Raphael.angle - [ method ] - ** - * Returns angle between two or three points - > Parameters - - x1 (number) x coord of first point - - y1 (number) y coord of first point - - x2 (number) x coord of second point - - y2 (number) y coord of second point - - x3 (number) #optional x coord of third point - - y3 (number) #optional y coord of third point - = (number) angle in degrees. - \*/ - R.angle = function (x1, y1, x2, y2, x3, y3) { - if (x3 == null) { - var x = x1 - x2, - y = y1 - y2; - if (!x && !y) { - return 0; - } - return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; - } else { - return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); - } - }; - /*\ - * Raphael.rad - [ method ] - ** - * Transform angle to radians - > Parameters - - deg (number) angle in degrees - = (number) angle in radians. - \*/ - R.rad = function (deg) { - return deg % 360 * PI / 180; - }; - /*\ - * Raphael.deg - [ method ] - ** - * Transform angle to degrees - > Parameters - - rad (number) angle in radians - = (number) angle in degrees. - \*/ - R.deg = function (rad) { - return Math.round ((rad * 180 / PI% 360)* 1000) / 1000; - }; - /*\ - * Raphael.snapTo - [ method ] - ** - * Snaps given value to given grid. - > Parameters - - values (array|number) given array of values or step of the grid - - value (number) value to adjust - - tolerance (number) #optional tolerance for snapping. Default is `10`. - = (number) adjusted value. - \*/ - R.snapTo = function (values, value, tolerance) { - tolerance = R.is(tolerance, "finite") ? tolerance : 10; - if (R.is(values, array)) { - var i = values.length; - while (i--) if (abs(values[i] - value) <= tolerance) { - return values[i]; - } - } else { - values = +values; - var rem = value % values; - if (rem < tolerance) { - return value - rem; - } - if (rem > values - tolerance) { - return value - rem + values; - } - } - return value; - }; - - /*\ - * Raphael.createUUID - [ method ] - ** - * Returns RFC4122, version 4 ID - \*/ - var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { - return function () { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); - }; - })(/[xy]/g, function (c) { - var r = math.random() * 16 | 0, - v = c == "x" ? r : (r & 3 | 8); - return v.toString(16); - }); - - /*\ - * Raphael.setWindow - [ method ] - ** - * Used when you need to draw in `<iframe>`. Switched window to the iframe one. - > Parameters - - newwin (window) new window object - \*/ - R.setWindow = function (newwin) { - eve("raphael.setWindow", R, g.win, newwin); - g.win = newwin; - g.doc = g.win.document; - if (R._engine.initWin) { - R._engine.initWin(g.win); - } - }; - var toHex = function (color) { - if (R.vml) { - // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ - var trim = /^\s+|\s+$/g; - var bod; - try { - var docum = new ActiveXObject("htmlfile"); - docum.write(""); - docum.close(); - bod = docum.body; - } catch(e) { - bod = createPopup().document.body; - } - var range = bod.createTextRange(); - toHex = cacher(function (color) { - try { - bod.style.color = Str(color).replace(trim, E); - var value = range.queryCommandValue("ForeColor"); - value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); - return "#" + ("000000" + value.toString(16)).slice(-6); - } catch(e) { - return "none"; - } - }); - } else { - var i = g.doc.createElement("i"); - i.title = "Rapha\xebl Colour Picker"; - i.style.display = "none"; - g.doc.body.appendChild(i); - toHex = cacher(function (color) { - i.style.color = color; - return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); - }); - } - return toHex(color); - }, - hsbtoString = function () { - return "hsb(" + [this.h, this.s, this.b] + ")"; - }, - hsltoString = function () { - return "hsl(" + [this.h, this.s, this.l] + ")"; - }, - rgbtoString = function () { - return this.hex; - }, - prepareRGB = function (r, g, b) { - if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { - b = r.b; - g = r.g; - r = r.r; - } - if (g == null && R.is(r, string)) { - var clr = R.getRGB(r); - r = clr.r; - g = clr.g; - b = clr.b; - } - if (r > 1 || g > 1 || b > 1) { - r /= 255; - g /= 255; - b /= 255; - } - - return [r, g, b]; - }, - packageRGB = function (r, g, b, o) { - r *= 255; - g *= 255; - b *= 255; - var rgb = { - r: r, - g: g, - b: b, - hex: R.rgb(r, g, b), - toString: rgbtoString - }; - R.is(o, "finite") && (rgb.opacity = o); - return rgb; - }; - - /*\ - * Raphael.color - [ method ] - ** - * Parses the color string and returns object with all values for the given color. - > Parameters - - clr (string) color string in one of the supported formats (see @Raphael.getRGB) - = (object) Combined RGB & HSB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #••••••, - o error (boolean) `true` if string can’t be parsed, - o h (number) hue, - o s (number) saturation, - o v (number) value (brightness), - o l (number) lightness - o } - \*/ - R.color = function (clr) { - var rgb; - if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { - rgb = R.hsb2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { - rgb = R.hsl2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else { - if (R.is(clr, "string")) { - clr = R.getRGB(clr); - } - if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { - rgb = R.rgb2hsl(clr); - clr.h = rgb.h; - clr.s = rgb.s; - clr.l = rgb.l; - rgb = R.rgb2hsb(clr); - clr.v = rgb.b; - } else { - clr = {hex: "none"}; - clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; - } - } - clr.toString = rgbtoString; - return clr; - }; - /*\ - * Raphael.hsb2rgb - [ method ] - ** - * Converts HSB values to RGB object. - > Parameters - - h (number) hue - - s (number) saturation - - v (number) value or brightness - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #•••••• - o } - \*/ - R.hsb2rgb = function (h, s, v, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { - v = h.b; - s = h.s; - o = h.o; - h = h.h; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = v * s; - X = C * (1 - abs(h % 2 - 1)); - R = G = B = v - C; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - /*\ - * Raphael.hsl2rgb - [ method ] - ** - * Converts HSL values to RGB object. - > Parameters - - h (number) hue - - s (number) saturation - - l (number) luminosity - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #•••••• - o } - \*/ - R.hsl2rgb = function (h, s, l, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { - l = h.l; - s = h.s; - h = h.h; - } - if (h > 1 || s > 1 || l > 1) { - h /= 360; - s /= 100; - l /= 100; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = 2 * s * (l < .5 ? l : 1 - l); - X = C * (1 - abs(h % 2 - 1)); - R = G = B = l - C / 2; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - /*\ - * Raphael.rgb2hsb - [ method ] - ** - * Converts RGB values to HSB object. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (object) HSB object in format: - o { - o h (number) hue - o s (number) saturation - o b (number) brightness - o } - \*/ - R.rgb2hsb = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, V, C; - V = mmax(r, g, b); - C = V - mmin(r, g, b); - H = (C == 0 ? null : - V == r ? (g - b) / C : - V == g ? (b - r) / C + 2 : - (r - g) / C + 4 - ); - H = ((H + 360) % 6) * 60 / 360; - S = C == 0 ? 0 : C / V; - return {h: H, s: S, b: V, toString: hsbtoString}; - }; - /*\ - * Raphael.rgb2hsl - [ method ] - ** - * Converts RGB values to HSL object. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (object) HSL object in format: - o { - o h (number) hue - o s (number) saturation - o l (number) luminosity - o } - \*/ - R.rgb2hsl = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, L, M, m, C; - M = mmax(r, g, b); - m = mmin(r, g, b); - C = M - m; - H = (C == 0 ? null : - M == r ? (g - b) / C : - M == g ? (b - r) / C + 2 : - (r - g) / C + 4); - H = ((H + 360) % 6) * 60 / 360; - L = (M + m) / 2; - S = (C == 0 ? 0 : - L < .5 ? C / (2 * L) : - C / (2 - 2 * L)); - return {h: H, s: S, l: L, toString: hsltoString}; - }; - R._path2string = function () { - return this.join(",").replace(p2s, "$1"); - }; - function repush(array, item) { - for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { - return array.push(array.splice(i, 1)[0]); - } - } - function cacher(f, scope, postprocessor) { - function newf() { - var arg = Array.prototype.slice.call(arguments, 0), - args = arg.join("\u2400"), - cache = newf.cache = newf.cache || {}, - count = newf.count = newf.count || []; - if (cache[has](args)) { - repush(count, args); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - count.length >= 1e3 && delete cache[count.shift()]; - count.push(args); - cache[args] = f[apply](scope, arg); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - return newf; - } - - var preload = R._preload = function (src, f) { - var img = g.doc.createElement("img"); - img.style.cssText = "position:absolute;left:-9999em;top:-9999em"; - img.onload = function () { - f.call(this); - this.onload = null; - g.doc.body.removeChild(this); - }; - img.onerror = function () { - g.doc.body.removeChild(this); - }; - g.doc.body.appendChild(img); - img.src = src; - }; - - function clrToString() { - return this.hex; - } - - /*\ - * Raphael.getRGB - [ method ] - ** - * Parses colour string as RGB object - > Parameters - - colour (string) colour string in one of formats: - #
      - #
    • Colour name (“red”, “green”, “cornflowerblue”, etc)
    • - #
    • #••• — shortened HTML colour: (“#000”, “#fc0”, etc)
    • - #
    • #•••••• — full length HTML colour: (“#000000”, “#bd2300”)
    • - #
    • rgb(•••, •••, •••) — red, green and blue channels’ values: (“rgb(200, 100, 0)”)
    • - #
    • rgb(•••%, •••%, •••%) — same as above, but in %: (“rgb(100%, 175%, 0%)”)
    • - #
    • hsb(•••, •••, •••) — hue, saturation and brightness values: (“hsb(0.5, 0.25, 1)”)
    • - #
    • hsb(•••%, •••%, •••%) — same as above, but in %
    • - #
    • hsl(•••, •••, •••) — same as hsb
    • - #
    • hsl(•••%, •••%, •••%) — same as hsb
    • - #
    - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue - o hex (string) color in HTML/CSS format: #••••••, - o error (boolean) true if string can’t be parsed - o } - \*/ - R.getRGB = cacher(function (colour) { - if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - } - if (colour == "none") { - return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; - } - !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); - var res, - red, - green, - blue, - opacity, - t, - values, - rgb = colour.match(colourRegExp); - if (rgb) { - if (rgb[2]) { - blue = toInt(rgb[2].substring(5), 16); - green = toInt(rgb[2].substring(3, 5), 16); - red = toInt(rgb[2].substring(1, 3), 16); - } - if (rgb[3]) { - blue = toInt((t = rgb[3].charAt(3)) + t, 16); - green = toInt((t = rgb[3].charAt(2)) + t, 16); - red = toInt((t = rgb[3].charAt(1)) + t, 16); - } - if (rgb[4]) { - values = rgb[4][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - } - if (rgb[5]) { - values = rgb[5][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsb2rgb(red, green, blue, opacity); - } - if (rgb[6]) { - values = rgb[6][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsl2rgb(red, green, blue, opacity); - } - rgb = {r: red, g: green, b: blue, toString: clrToString}; - rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); - R.is(opacity, "finite") && (rgb.opacity = opacity); - return rgb; - } - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - }, R); - /*\ - * Raphael.hsb - [ method ] - ** - * Converts HSB values to hex representation of the colour. - > Parameters - - h (number) hue - - s (number) saturation - - b (number) value or brightness - = (string) hex representation of the colour. - \*/ - R.hsb = cacher(function (h, s, b) { - return R.hsb2rgb(h, s, b).hex; - }); - /*\ - * Raphael.hsl - [ method ] - ** - * Converts HSL values to hex representation of the colour. - > Parameters - - h (number) hue - - s (number) saturation - - l (number) luminosity - = (string) hex representation of the colour. - \*/ - R.hsl = cacher(function (h, s, l) { - return R.hsl2rgb(h, s, l).hex; - }); - /*\ - * Raphael.rgb - [ method ] - ** - * Converts RGB values to hex representation of the colour. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (string) hex representation of the colour. - \*/ - R.rgb = cacher(function (r, g, b) { - function round(x) { return (x + 0.5) | 0; } - return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1); - }); - /*\ - * Raphael.getColor - [ method ] - ** - * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset - > Parameters - - value (number) #optional brightness, default is `0.75` - = (string) hex representation of the colour. - \*/ - R.getColor = function (value) { - var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, - rgb = this.hsb2rgb(start.h, start.s, start.b); - start.h += .075; - if (start.h > 1) { - start.h = 0; - start.s -= .2; - start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); - } - return rgb.hex; - }; - /*\ - * Raphael.getColor.reset - [ method ] - ** - * Resets spectrum position for @Raphael.getColor back to red. - \*/ - R.getColor.reset = function () { - delete this.start; - }; - - // http://schepers.cc/getting-to-the-point - function catmullRom2bezier(crp, z) { - var d = []; - for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { - var p = [ - {x: +crp[i - 2], y: +crp[i - 1]}, - {x: +crp[i], y: +crp[i + 1]}, - {x: +crp[i + 2], y: +crp[i + 3]}, - {x: +crp[i + 4], y: +crp[i + 5]} - ]; - if (z) { - if (!i) { - p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]}; - } else if (iLen - 4 == i) { - p[3] = {x: +crp[0], y: +crp[1]}; - } else if (iLen - 2 == i) { - p[2] = {x: +crp[0], y: +crp[1]}; - p[3] = {x: +crp[2], y: +crp[3]}; - } - } else { - if (iLen - 4 == i) { - p[3] = p[2]; - } else if (!i) { - p[0] = {x: +crp[i], y: +crp[i + 1]}; - } - } - d.push(["C", - (-p[0].x + 6 * p[1].x + p[2].x) / 6, - (-p[0].y + 6 * p[1].y + p[2].y) / 6, - (p[1].x + 6 * p[2].x - p[3].x) / 6, - (p[1].y + 6*p[2].y - p[3].y) / 6, - p[2].x, - p[2].y - ]); - } - - return d; - } - /*\ - * Raphael.parsePathString - [ method ] - ** - * Utility method - ** - * Parses given path string into an array of arrays of path segments. - > Parameters - - pathString (string|array) path string or array of segments (in the last case it will be returned straight away) - = (array) array of segments. - \*/ - R.parsePathString = function (pathString) { - if (!pathString) { - return null; - } - var pth = paths(pathString); - if (pth.arr) { - return pathClone(pth.arr); - } - - var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, - data = []; - if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption - data = pathClone(pathString); - } - if (!data.length) { - Str(pathString).replace(pathCommand, function (a, b, c) { - var params = [], - name = b.toLowerCase(); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - if (name == "m" && params.length > 2) { - data.push([b][concat](params.splice(0, 2))); - name = "l"; - b = b == "m" ? "l" : "L"; - } - if (name == "r") { - data.push([b][concat](params)); - } else while (params.length >= paramCounts[name]) { - data.push([b][concat](params.splice(0, paramCounts[name]))); - if (!paramCounts[name]) { - break; - } - } - }); - } - data.toString = R._path2string; - pth.arr = pathClone(data); - return data; - }; - /*\ - * Raphael.parseTransformString - [ method ] - ** - * Utility method - ** - * Parses given path string into an array of transformations. - > Parameters - - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away) - = (array) array of transformations. - \*/ - R.parseTransformString = cacher(function (TString) { - if (!TString) { - return null; - } - var paramCounts = {r: 3, s: 4, t: 2, m: 6}, - data = []; - if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption - data = pathClone(TString); - } - if (!data.length) { - Str(TString).replace(tCommand, function (a, b, c) { - var params = [], - name = lowerCase.call(b); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - data.push([b][concat](params)); - }); - } - data.toString = R._path2string; - return data; - }); - // PATHS - var paths = function (ps) { - var p = paths.ps = paths.ps || {}; - if (p[ps]) { - p[ps].sleep = 100; - } else { - p[ps] = { - sleep: 100 - }; - } - setTimeout(function () { - for (var key in p) if (p[has](key) && key != ps) { - p[key].sleep--; - !p[key].sleep && delete p[key]; - } - }); - return p[ps]; - }; - /*\ - * Raphael.findDotsAtSegment - [ method ] - ** - * Utility method - ** - * Find dot coordinates on the given cubic bezier curve at the given t. - > Parameters - - p1x (number) x of the first point of the curve - - p1y (number) y of the first point of the curve - - c1x (number) x of the first anchor of the curve - - c1y (number) y of the first anchor of the curve - - c2x (number) x of the second anchor of the curve - - c2y (number) y of the second anchor of the curve - - p2x (number) x of the second point of the curve - - p2y (number) y of the second point of the curve - - t (number) position on the curve (0..1) - = (object) point information in format: - o { - o x: (number) x coordinate of the point - o y: (number) y coordinate of the point - o m: { - o x: (number) x coordinate of the left anchor - o y: (number) y coordinate of the left anchor - o } - o n: { - o x: (number) x coordinate of the right anchor - o y: (number) y coordinate of the right anchor - o } - o start: { - o x: (number) x coordinate of the start of the curve - o y: (number) y coordinate of the start of the curve - o } - o end: { - o x: (number) x coordinate of the end of the curve - o y: (number) y coordinate of the end of the curve - o } - o alpha: (number) angle of the curve derivative at the point - o } - \*/ - R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t, - t13 = pow(t1, 3), - t12 = pow(t1, 2), - t2 = t * t, - t3 = t2 * t, - x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, - y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, - mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), - my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), - nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), - ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), - ax = t1 * p1x + t * c1x, - ay = t1 * p1y + t * c1y, - cx = t1 * c2x + t * p2x, - cy = t1 * c2y + t * p2y, - alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); - (mx > nx || my < ny) && (alpha += 180); - return { - x: x, - y: y, - m: {x: mx, y: my}, - n: {x: nx, y: ny}, - start: {x: ax, y: ay}, - end: {x: cx, y: cy}, - alpha: alpha - }; - }; - /*\ - * Raphael.bezierBBox - [ method ] - ** - * Utility method - ** - * Return bounding box of a given cubic bezier curve - > Parameters - - p1x (number) x of the first point of the curve - - p1y (number) y of the first point of the curve - - c1x (number) x of the first anchor of the curve - - c1y (number) y of the first anchor of the curve - - c2x (number) x of the second anchor of the curve - - c2y (number) y of the second anchor of the curve - - p2x (number) x of the second point of the curve - - p2y (number) y of the second point of the curve - * or - - bez (array) array of six points for bezier curve - = (object) point information in format: - o { - o min: { - o x: (number) x coordinate of the left point - o y: (number) y coordinate of the top point - o } - o max: { - o x: (number) x coordinate of the right point - o y: (number) y coordinate of the bottom point - o } - o } - \*/ - R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - if (!R.is(p1x, "array")) { - p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; - } - var bbox = curveDim.apply(null, p1x); - return { - x: bbox.min.x, - y: bbox.min.y, - x2: bbox.max.x, - y2: bbox.max.y, - width: bbox.max.x - bbox.min.x, - height: bbox.max.y - bbox.min.y - }; - }; - /*\ - * Raphael.isPointInsideBBox - [ method ] - ** - * Utility method - ** - * Returns `true` if given point is inside bounding boxes. - > Parameters - - bbox (string) bounding box - - x (string) x coordinate of the point - - y (string) y coordinate of the point - = (boolean) `true` if point inside - \*/ - R.isPointInsideBBox = function (bbox, x, y) { - return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2; - }; - /*\ - * Raphael.isBBoxIntersect - [ method ] - ** - * Utility method - ** - * Returns `true` if two bounding boxes intersect - > Parameters - - bbox1 (string) first bounding box - - bbox2 (string) second bounding box - = (boolean) `true` if they intersect - \*/ - R.isBBoxIntersect = function (bbox1, bbox2) { - var i = R.isPointInsideBBox; - return i(bbox2, bbox1.x, bbox1.y) - || i(bbox2, bbox1.x2, bbox1.y) - || i(bbox2, bbox1.x, bbox1.y2) - || i(bbox2, bbox1.x2, bbox1.y2) - || i(bbox1, bbox2.x, bbox2.y) - || i(bbox1, bbox2.x2, bbox2.y) - || i(bbox1, bbox2.x, bbox2.y2) - || i(bbox1, bbox2.x2, bbox2.y2) - || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) - && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); - }; - function base3(t, p1, p2, p3, p4) { - var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, - t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; - return t * t2 - 3 * p1 + 3 * p2; - } - function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { - if (z == null) { - z = 1; - } - z = z > 1 ? 1 : z < 0 ? 0 : z; - var z2 = z / 2, - n = 12, - Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816], - Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472], - sum = 0; - for (var i = 0; i < n; i++) { - var ct = z2 * Tvalues[i] + z2, - xbase = base3(ct, x1, x2, x3, x4), - ybase = base3(ct, y1, y2, y3, y4), - comb = xbase * xbase + ybase * ybase; - sum += Cvalues[i] * math.sqrt(comb); - } - return z2 * sum; - } - function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) { - if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) { - return; - } - var t = 1, - step = t / 2, - t2 = t - step, - l, - e = .01; - l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); - while (abs(l - ll) > e) { - step /= 2; - t2 += (l < ll ? 1 : -1) * step; - l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); - } - return t2; - } - function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { - if ( - mmax(x1, x2) < mmin(x3, x4) || - mmin(x1, x2) > mmax(x3, x4) || - mmax(y1, y2) < mmin(y3, y4) || - mmin(y1, y2) > mmax(y3, y4) - ) { - return; - } - var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), - ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), - denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); - - if (!denominator) { - return; - } - var px = nx / denominator, - py = ny / denominator, - px2 = +px.toFixed(2), - py2 = +py.toFixed(2); - if ( - px2 < +mmin(x1, x2).toFixed(2) || - px2 > +mmax(x1, x2).toFixed(2) || - px2 < +mmin(x3, x4).toFixed(2) || - px2 > +mmax(x3, x4).toFixed(2) || - py2 < +mmin(y1, y2).toFixed(2) || - py2 > +mmax(y1, y2).toFixed(2) || - py2 < +mmin(y3, y4).toFixed(2) || - py2 > +mmax(y3, y4).toFixed(2) - ) { - return; - } - return {x: px, y: py}; - } - function inter(bez1, bez2) { - return interHelper(bez1, bez2); - } - function interCount(bez1, bez2) { - return interHelper(bez1, bez2, 1); - } - function interHelper(bez1, bez2, justCount) { - var bbox1 = R.bezierBBox(bez1), - bbox2 = R.bezierBBox(bez2); - if (!R.isBBoxIntersect(bbox1, bbox2)) { - return justCount ? 0 : []; - } - var l1 = bezlen.apply(0, bez1), - l2 = bezlen.apply(0, bez2), - n1 = mmax(~~(l1 / 5), 1), - n2 = mmax(~~(l2 / 5), 1), - dots1 = [], - dots2 = [], - xy = {}, - res = justCount ? 0 : []; - for (var i = 0; i < n1 + 1; i++) { - var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1)); - dots1.push({x: p.x, y: p.y, t: i / n1}); - } - for (i = 0; i < n2 + 1; i++) { - p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2)); - dots2.push({x: p.x, y: p.y, t: i / n2}); - } - for (i = 0; i < n1; i++) { - for (var j = 0; j < n2; j++) { - var di = dots1[i], - di1 = dots1[i + 1], - dj = dots2[j], - dj1 = dots2[j + 1], - ci = abs(di1.x - di.x) < .001 ? "y" : "x", - cj = abs(dj1.x - dj.x) < .001 ? "y" : "x", - is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); - if (is) { - if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) { - continue; - } - xy[is.x.toFixed(4)] = is.y.toFixed(4); - var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), - t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); - if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) { - if (justCount) { - res++; - } else { - res.push({ - x: is.x, - y: is.y, - t1: mmin(t1, 1), - t2: mmin(t2, 1) - }); - } - } - } - } - } - return res; - } - /*\ - * Raphael.pathIntersection - [ method ] - ** - * Utility method - ** - * Finds intersections of two paths - > Parameters - - path1 (string) path string - - path2 (string) path string - = (array) dots of intersection - o [ - o { - o x: (number) x coordinate of the point - o y: (number) y coordinate of the point - o t1: (number) t value for segment of path1 - o t2: (number) t value for segment of path2 - o segment1: (number) order number for segment of path1 - o segment2: (number) order number for segment of path2 - o bez1: (array) eight coordinates representing beziér curve for the segment of path1 - o bez2: (array) eight coordinates representing beziér curve for the segment of path2 - o } - o ] - \*/ - R.pathIntersection = function (path1, path2) { - return interPathHelper(path1, path2); - }; - R.pathIntersectionNumber = function (path1, path2) { - return interPathHelper(path1, path2, 1); - }; - function interPathHelper(path1, path2, justCount) { - path1 = R._path2curve(path1); - path2 = R._path2curve(path2); - var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2, - res = justCount ? 0 : []; - for (var i = 0, ii = path1.length; i < ii; i++) { - var pi = path1[i]; - if (pi[0] == "M") { - x1 = x1m = pi[1]; - y1 = y1m = pi[2]; - } else { - if (pi[0] == "C") { - bez1 = [x1, y1].concat(pi.slice(1)); - x1 = bez1[6]; - y1 = bez1[7]; - } else { - bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; - x1 = x1m; - y1 = y1m; - } - for (var j = 0, jj = path2.length; j < jj; j++) { - var pj = path2[j]; - if (pj[0] == "M") { - x2 = x2m = pj[1]; - y2 = y2m = pj[2]; - } else { - if (pj[0] == "C") { - bez2 = [x2, y2].concat(pj.slice(1)); - x2 = bez2[6]; - y2 = bez2[7]; - } else { - bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; - x2 = x2m; - y2 = y2m; - } - var intr = interHelper(bez1, bez2, justCount); - if (justCount) { - res += intr; - } else { - for (var k = 0, kk = intr.length; k < kk; k++) { - intr[k].segment1 = i; - intr[k].segment2 = j; - intr[k].bez1 = bez1; - intr[k].bez2 = bez2; - } - res = res.concat(intr); - } - } - } - } - } - return res; - } - /*\ - * Raphael.isPointInsidePath - [ method ] - ** - * Utility method - ** - * Returns `true` if given point is inside a given closed path. - > Parameters - - path (string) path string - - x (number) x of the point - - y (number) y of the point - = (boolean) true, if point is inside the path - \*/ - R.isPointInsidePath = function (path, x, y) { - var bbox = R.pathBBox(path); - return R.isPointInsideBBox(bbox, x, y) && - interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1; - }; - R._removedFactory = function (methodname) { - return function () { - eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname); - }; - }; - /*\ - * Raphael.pathBBox - [ method ] - ** - * Utility method - ** - * Return bounding box of a given path - > Parameters - - path (string) path string - = (object) bounding box - o { - o x: (number) x coordinate of the left top point of the box - o y: (number) y coordinate of the left top point of the box - o x2: (number) x coordinate of the right bottom point of the box - o y2: (number) y coordinate of the right bottom point of the box - o width: (number) width of the box - o height: (number) height of the box - o cx: (number) x coordinate of the center of the box - o cy: (number) y coordinate of the center of the box - o } - \*/ - var pathDimensions = R.pathBBox = function (path) { - var pth = paths(path); - if (pth.bbox) { - return clone(pth.bbox); - } - if (!path) { - return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; - } - path = path2curve(path); - var x = 0, - y = 0, - X = [], - Y = [], - p; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = p[1]; - y = p[2]; - X.push(x); - Y.push(y); - } else { - var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - X = X[concat](dim.min.x, dim.max.x); - Y = Y[concat](dim.min.y, dim.max.y); - x = p[5]; - y = p[6]; - } - } - var xmin = mmin[apply](0, X), - ymin = mmin[apply](0, Y), - xmax = mmax[apply](0, X), - ymax = mmax[apply](0, Y), - width = xmax - xmin, - height = ymax - ymin, - bb = { - x: xmin, - y: ymin, - x2: xmax, - y2: ymax, - width: width, - height: height, - cx: xmin + width / 2, - cy: ymin + height / 2 - }; - pth.bbox = clone(bb); - return bb; - }, - pathClone = function (pathArray) { - var res = clone(pathArray); - res.toString = R._path2string; - return res; - }, - pathToRelative = R._pathToRelative = function (pathArray) { - var pth = paths(pathArray); - if (pth.rel) { - return pathClone(pth.rel); - } - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = pathArray[0][1]; - y = pathArray[0][2]; - mx = x; - my = y; - start++; - res.push(["M", x, y]); - } - for (var i = start, ii = pathArray.length; i < ii; i++) { - var r = res[i] = [], - pa = pathArray[i]; - if (pa[0] != lowerCase.call(pa[0])) { - r[0] = lowerCase.call(pa[0]); - switch (r[0]) { - case "a": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] - x).toFixed(3); - r[7] = +(pa[7] - y).toFixed(3); - break; - case "v": - r[1] = +(pa[1] - y).toFixed(3); - break; - case "m": - mx = pa[1]; - my = pa[2]; - default: - for (var j = 1, jj = pa.length; j < jj; j++) { - r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); - } - } - } else { - r = res[i] = []; - if (pa[0] == "m") { - mx = pa[1] + x; - my = pa[2] + y; - } - for (var k = 0, kk = pa.length; k < kk; k++) { - res[i][k] = pa[k]; - } - } - var len = res[i].length; - switch (res[i][0]) { - case "z": - x = mx; - y = my; - break; - case "h": - x += +res[i][len - 1]; - break; - case "v": - y += +res[i][len - 1]; - break; - default: - x += +res[i][len - 2]; - y += +res[i][len - 1]; - } - } - res.toString = R._path2string; - pth.rel = pathClone(res); - return res; - }, - pathToAbsolute = R._pathToAbsolute = function (pathArray) { - var pth = paths(pathArray); - if (pth.abs) { - return pathClone(pth.abs); - } - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - if (!pathArray || !pathArray.length) { - return [["M", 0, 0]]; - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = +pathArray[0][1]; - y = +pathArray[0][2]; - mx = x; - my = y; - start++; - res[0] = ["M", x, y]; - } - var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z"; - for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { - res.push(r = []); - pa = pathArray[i]; - if (pa[0] != upperCase.call(pa[0])) { - r[0] = upperCase.call(pa[0]); - switch (r[0]) { - case "A": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] + x); - r[7] = +(pa[7] + y); - break; - case "V": - r[1] = +pa[1] + y; - break; - case "H": - r[1] = +pa[1] + x; - break; - case "R": - var dots = [x, y][concat](pa.slice(1)); - for (var j = 2, jj = dots.length; j < jj; j++) { - dots[j] = +dots[j] + x; - dots[++j] = +dots[j] + y; - } - res.pop(); - res = res[concat](catmullRom2bezier(dots, crz)); - break; - case "M": - mx = +pa[1] + x; - my = +pa[2] + y; - default: - for (j = 1, jj = pa.length; j < jj; j++) { - r[j] = +pa[j] + ((j % 2) ? x : y); - } - } - } else if (pa[0] == "R") { - dots = [x, y][concat](pa.slice(1)); - res.pop(); - res = res[concat](catmullRom2bezier(dots, crz)); - r = ["R"][concat](pa.slice(-2)); - } else { - for (var k = 0, kk = pa.length; k < kk; k++) { - r[k] = pa[k]; - } - } - switch (r[0]) { - case "Z": - x = mx; - y = my; - break; - case "H": - x = r[1]; - break; - case "V": - y = r[1]; - break; - case "M": - mx = r[r.length - 2]; - my = r[r.length - 1]; - default: - x = r[r.length - 2]; - y = r[r.length - 1]; - } - } - res.toString = R._path2string; - pth.abs = pathClone(res); - return res; - }, - l2c = function (x1, y1, x2, y2) { - return [x1, y1, x2, y2, x2, y2]; - }, - q2c = function (x1, y1, ax, ay, x2, y2) { - var _13 = 1 / 3, - _23 = 2 / 3; - return [ - _13 * x1 + _23 * ax, - _13 * y1 + _23 * ay, - _13 * x2 + _23 * ax, - _13 * y2 + _23 * ay, - x2, - y2 - ]; - }, - a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { - // for more information of where this math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - var _120 = PI * 120 / 180, - rad = PI / 180 * (+angle || 0), - res = [], - xy, - rotate = cacher(function (x, y, rad) { - var X = x * math.cos(rad) - y * math.sin(rad), - Y = x * math.sin(rad) + y * math.cos(rad); - return {x: X, y: Y}; - }); - if (!recursive) { - xy = rotate(x1, y1, -rad); - x1 = xy.x; - y1 = xy.y; - xy = rotate(x2, y2, -rad); - x2 = xy.x; - y2 = xy.y; - var cos = math.cos(PI / 180 * angle), - sin = math.sin(PI / 180 * angle), - x = (x1 - x2) / 2, - y = (y1 - y2) / 2; - var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); - if (h > 1) { - h = math.sqrt(h); - rx = h * rx; - ry = h * ry; - } - var rx2 = rx * rx, - ry2 = ry * ry, - k = (large_arc_flag == sweep_flag ? -1 : 1) * - math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), - cx = k * rx * y / ry + (x1 + x2) / 2, - cy = k * -ry * x / rx + (y1 + y2) / 2, - f1 = math.asin(((y1 - cy) / ry).toFixed(9)), - f2 = math.asin(((y2 - cy) / ry).toFixed(9)); - - f1 = x1 < cx ? PI - f1 : f1; - f2 = x2 < cx ? PI - f2 : f2; - f1 < 0 && (f1 = PI * 2 + f1); - f2 < 0 && (f2 = PI * 2 + f2); - if (sweep_flag && f1 > f2) { - f1 = f1 - PI * 2; - } - if (!sweep_flag && f2 > f1) { - f2 = f2 - PI * 2; - } - } else { - f1 = recursive[0]; - f2 = recursive[1]; - cx = recursive[2]; - cy = recursive[3]; - } - var df = f2 - f1; - if (abs(df) > _120) { - var f2old = f2, - x2old = x2, - y2old = y2; - f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); - x2 = cx + rx * math.cos(f2); - y2 = cy + ry * math.sin(f2); - res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); - } - df = f2 - f1; - var c1 = math.cos(f1), - s1 = math.sin(f1), - c2 = math.cos(f2), - s2 = math.sin(f2), - t = math.tan(df / 4), - hx = 4 / 3 * rx * t, - hy = 4 / 3 * ry * t, - m1 = [x1, y1], - m2 = [x1 + hx * s1, y1 - hy * c1], - m3 = [x2 + hx * s2, y2 - hy * c2], - m4 = [x2, y2]; - m2[0] = 2 * m1[0] - m2[0]; - m2[1] = 2 * m1[1] - m2[1]; - if (recursive) { - return [m2, m3, m4][concat](res); - } else { - res = [m2, m3, m4][concat](res).join()[split](","); - var newres = []; - for (var i = 0, ii = res.length; i < ii; i++) { - newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; - } - return newres; - } - }, - findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t; - return { - x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, - y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y - }; - }, - curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), - b = 2 * (c1x - p1x) - 2 * (c2x - c1x), - c = p1x - c1x, - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, - y = [p1y, p2y], - x = [p1x, p2x], - dot; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); - b = 2 * (c1y - p1y) - 2 * (c2y - c1y); - c = p1y - c1y; - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - return { - min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, - max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} - }; - }), - path2curve = R._path2curve = cacher(function (path, path2) { - var pth = !path2 && paths(path); - if (!path2 && pth.curve) { - return pathClone(pth.curve); - } - var p = pathToAbsolute(path), - p2 = path2 && pathToAbsolute(path2), - attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - processPath = function (path, d, pcom) { - var nx, ny, tq = {T:1, Q:1}; - if (!path) { - return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; - } - !(path[0] in tq) && (d.qx = d.qy = null); - switch (path[0]) { - case "M": - d.X = path[1]; - d.Y = path[2]; - break; - case "A": - path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); - break; - case "S": - if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S. - nx = d.x * 2 - d.bx; // And reflect the previous - ny = d.y * 2 - d.by; // command's control point relative to the current point. - } - else { // or some else or nothing - nx = d.x; - ny = d.y; - } - path = ["C", nx, ny][concat](path.slice(1)); - break; - case "T": - if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T. - d.qx = d.x * 2 - d.qx; // And make a reflection similar - d.qy = d.y * 2 - d.qy; // to case "S". - } - else { // or something else or nothing - d.qx = d.x; - d.qy = d.y; - } - path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); - break; - case "Q": - d.qx = path[1]; - d.qy = path[2]; - path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); - break; - case "L": - path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); - break; - case "H": - path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); - break; - case "V": - path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); - break; - case "Z": - path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); - break; - } - return path; - }, - fixArc = function (pp, i) { - if (pp[i].length > 7) { - pp[i].shift(); - var pi = pp[i]; - while (pi.length) { - pcoms1[i]="A"; // if created multiple C:s, their original seg is saved - p2 && (pcoms2[i]="A"); // the same as above - pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); - } - pp.splice(i, 1); - ii = mmax(p.length, p2 && p2.length || 0); - } - }, - fixM = function (path1, path2, a1, a2, i) { - if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { - path2.splice(i, 0, ["M", a2.x, a2.y]); - a1.bx = 0; - a1.by = 0; - a1.x = path1[i][1]; - a1.y = path1[i][2]; - ii = mmax(p.length, p2 && p2.length || 0); - } - }, - pcoms1 = [], // path commands of original path p - pcoms2 = [], // path commands of original path p2 - pfirst = "", // temporary holder for original path command - pcom = ""; // holder for previous path command of original path - for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { - p[i] && (pfirst = p[i][0]); // save current path command - - if (pfirst != "C") // C is not saved yet, because it may be result of conversion - { - pcoms1[i] = pfirst; // Save current path command - i && ( pcom = pcoms1[i-1]); // Get previous path command pcom - } - p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath - - if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command - // which may produce multiple C:s - // so we have to make sure that C is also C in original path - - fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 - - if (p2) { // the same procedures is done to p2 - p2[i] && (pfirst = p2[i][0]); - if (pfirst != "C") - { - pcoms2[i] = pfirst; - i && (pcom = pcoms2[i-1]); - } - p2[i] = processPath(p2[i], attrs2, pcom); - - if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C"; - - fixArc(p2, i); - } - fixM(p, p2, attrs, attrs2, i); - fixM(p2, p, attrs2, attrs, i); - var seg = p[i], - seg2 = p2 && p2[i], - seglen = seg.length, - seg2len = p2 && seg2.length; - attrs.x = seg[seglen - 2]; - attrs.y = seg[seglen - 1]; - attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; - attrs.by = toFloat(seg[seglen - 3]) || attrs.y; - attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); - attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); - attrs2.x = p2 && seg2[seg2len - 2]; - attrs2.y = p2 && seg2[seg2len - 1]; - } - if (!p2) { - pth.curve = pathClone(p); - } - return p2 ? [p, p2] : p; - }, null, pathClone), - parseDots = R._parseDots = cacher(function (gradient) { - var dots = []; - for (var i = 0, ii = gradient.length; i < ii; i++) { - var dot = {}, - par = gradient[i].match(/^([^:]*):?([\d\.]*)/); - dot.color = R.getRGB(par[1]); - if (dot.color.error) { - return null; - } - dot.opacity = dot.color.opacity; - dot.color = dot.color.hex; - par[2] && (dot.offset = par[2] + "%"); - dots.push(dot); - } - for (i = 1, ii = dots.length - 1; i < ii; i++) { - if (!dots[i].offset) { - var start = toFloat(dots[i - 1].offset || 0), - end = 0; - for (var j = i + 1; j < ii; j++) { - if (dots[j].offset) { - end = dots[j].offset; - break; - } - } - if (!end) { - end = 100; - j = ii; - } - end = toFloat(end); - var d = (end - start) / (j - i + 1); - for (; i < j; i++) { - start += d; - dots[i].offset = start + "%"; - } - } - } - return dots; - }), - tear = R._tear = function (el, paper) { - el == paper.top && (paper.top = el.prev); - el == paper.bottom && (paper.bottom = el.next); - el.next && (el.next.prev = el.prev); - el.prev && (el.prev.next = el.next); - }, - tofront = R._tofront = function (el, paper) { - if (paper.top === el) { - return; - } - tear(el, paper); - el.next = null; - el.prev = paper.top; - paper.top.next = el; - paper.top = el; - }, - toback = R._toback = function (el, paper) { - if (paper.bottom === el) { - return; - } - tear(el, paper); - el.next = paper.bottom; - el.prev = null; - paper.bottom.prev = el; - paper.bottom = el; - }, - insertafter = R._insertafter = function (el, el2, paper) { - tear(el, paper); - el2 == paper.top && (paper.top = el); - el2.next && (el2.next.prev = el); - el.next = el2.next; - el.prev = el2; - el2.next = el; - }, - insertbefore = R._insertbefore = function (el, el2, paper) { - tear(el, paper); - el2 == paper.bottom && (paper.bottom = el); - el2.prev && (el2.prev.next = el); - el.prev = el2.prev; - el2.prev = el; - el.next = el2; - }, - /*\ - * Raphael.toMatrix - [ method ] - ** - * Utility method - ** - * Returns matrix of transformations applied to a given path - > Parameters - - path (string) path string - - transform (string|array) transformation string - = (object) @Matrix - \*/ - toMatrix = R.toMatrix = function (path, transform) { - var bb = pathDimensions(path), - el = { - _: { - transform: E - }, - getBBox: function () { - return bb; - } - }; - extractTransform(el, transform); - return el.matrix; - }, - /*\ - * Raphael.transformPath - [ method ] - ** - * Utility method - ** - * Returns path transformed by a given transformation - > Parameters - - path (string) path string - - transform (string|array) transformation string - = (string) path - \*/ - transformPath = R.transformPath = function (path, transform) { - return mapPath(path, toMatrix(path, transform)); - }, - extractTransform = R._extractTransform = function (el, tstr) { - if (tstr == null) { - return el._.transform; - } - tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); - var tdata = R.parseTransformString(tstr), - deg = 0, - dx = 0, - dy = 0, - sx = 1, - sy = 1, - _ = el._, - m = new Matrix; - _.transform = tdata || []; - if (tdata) { - for (var i = 0, ii = tdata.length; i < ii; i++) { - var t = tdata[i], - tlen = t.length, - command = Str(t[0]).toLowerCase(), - absolute = t[0] != command, - inver = absolute ? m.invert() : 0, - x1, - y1, - x2, - y2, - bb; - if (command == "t" && tlen == 3) { - if (absolute) { - x1 = inver.x(0, 0); - y1 = inver.y(0, 0); - x2 = inver.x(t[1], t[2]); - y2 = inver.y(t[1], t[2]); - m.translate(x2 - x1, y2 - y1); - } else { - m.translate(t[1], t[2]); - } - } else if (command == "r") { - if (tlen == 2) { - bb = bb || el.getBBox(1); - m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); - deg += t[1]; - } else if (tlen == 4) { - if (absolute) { - x2 = inver.x(t[2], t[3]); - y2 = inver.y(t[2], t[3]); - m.rotate(t[1], x2, y2); - } else { - m.rotate(t[1], t[2], t[3]); - } - deg += t[1]; - } - } else if (command == "s") { - if (tlen == 2 || tlen == 3) { - bb = bb || el.getBBox(1); - m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); - sx *= t[1]; - sy *= t[tlen - 1]; - } else if (tlen == 5) { - if (absolute) { - x2 = inver.x(t[3], t[4]); - y2 = inver.y(t[3], t[4]); - m.scale(t[1], t[2], x2, y2); - } else { - m.scale(t[1], t[2], t[3], t[4]); - } - sx *= t[1]; - sy *= t[2]; - } - } else if (command == "m" && tlen == 7) { - m.add(t[1], t[2], t[3], t[4], t[5], t[6]); - } - _.dirtyT = 1; - el.matrix = m; - } - } - - /*\ - * Element.matrix - [ property (object) ] - ** - * Keeps @Matrix object, which represents element transformation - \*/ - el.matrix = m; - - _.sx = sx; - _.sy = sy; - _.deg = deg; - _.dx = dx = m.e; - _.dy = dy = m.f; - - if (sx == 1 && sy == 1 && !deg && _.bbox) { - _.bbox.x += +dx; - _.bbox.y += +dy; - } else { - _.dirtyT = 1; - } - }, - getEmpty = function (item) { - var l = item[0]; - switch (l.toLowerCase()) { - case "t": return [l, 0, 0]; - case "m": return [l, 1, 0, 0, 1, 0, 0]; - case "r": if (item.length == 4) { - return [l, 0, item[2], item[3]]; - } else { - return [l, 0]; - } - case "s": if (item.length == 5) { - return [l, 1, 1, item[3], item[4]]; - } else if (item.length == 3) { - return [l, 1, 1]; - } else { - return [l, 1]; - } - } - }, - equaliseTransform = R._equaliseTransform = function (t1, t2) { - t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); - t1 = R.parseTransformString(t1) || []; - t2 = R.parseTransformString(t2) || []; - var maxlength = mmax(t1.length, t2.length), - from = [], - to = [], - i = 0, j, jj, - tt1, tt2; - for (; i < maxlength; i++) { - tt1 = t1[i] || getEmpty(t2[i]); - tt2 = t2[i] || getEmpty(tt1); - if ((tt1[0] != tt2[0]) || - (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || - (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) - ) { - return; - } - from[i] = []; - to[i] = []; - for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { - j in tt1 && (from[i][j] = tt1[j]); - j in tt2 && (to[i][j] = tt2[j]); - } - } - return { - from: from, - to: to - }; - }; - R._getContainer = function (x, y, w, h) { - var container; - container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; - if (container == null) { - return; - } - if (container.tagName) { - if (y == null) { - return { - container: container, - width: container.style.pixelWidth || container.offsetWidth, - height: container.style.pixelHeight || container.offsetHeight - }; - } else { - return { - container: container, - width: y, - height: w - }; - } - } - return { - container: 1, - x: x, - y: y, - width: w, - height: h - }; - }; - /*\ - * Raphael.pathToRelative - [ method ] - ** - * Utility method - ** - * Converts path to relative form - > Parameters - - pathString (string|array) path string or array of segments - = (array) array of segments. - \*/ - R.pathToRelative = pathToRelative; - R._engine = {}; - /*\ - * Raphael.path2curve - [ method ] - ** - * Utility method - ** - * Converts path to a new path where all segments are cubic bezier curves. - > Parameters - - pathString (string|array) path string or array of segments - = (array) array of segments. - \*/ - R.path2curve = path2curve; - /*\ - * Raphael.matrix - [ method ] - ** - * Utility method - ** - * Returns matrix based on given parameters. - > Parameters - - a (number) - - b (number) - - c (number) - - d (number) - - e (number) - - f (number) - = (object) @Matrix - \*/ - R.matrix = function (a, b, c, d, e, f) { - return new Matrix(a, b, c, d, e, f); - }; - function Matrix(a, b, c, d, e, f) { - if (a != null) { - this.a = +a; - this.b = +b; - this.c = +c; - this.d = +d; - this.e = +e; - this.f = +f; - } else { - this.a = 1; - this.b = 0; - this.c = 0; - this.d = 1; - this.e = 0; - this.f = 0; - } - } - (function (matrixproto) { - /*\ - * Matrix.add - [ method ] - ** - * Adds given matrix to existing one. - > Parameters - - a (number) - - b (number) - - c (number) - - d (number) - - e (number) - - f (number) - or - - matrix (object) @Matrix - \*/ - matrixproto.add = function (a, b, c, d, e, f) { - var out = [[], [], []], - m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], - matrix = [[a, c, e], [b, d, f], [0, 0, 1]], - x, y, z, res; - - if (a && a instanceof Matrix) { - matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; - } - - for (x = 0; x < 3; x++) { - for (y = 0; y < 3; y++) { - res = 0; - for (z = 0; z < 3; z++) { - res += m[x][z] * matrix[z][y]; - } - out[x][y] = res; - } - } - this.a = out[0][0]; - this.b = out[1][0]; - this.c = out[0][1]; - this.d = out[1][1]; - this.e = out[0][2]; - this.f = out[1][2]; - }; - /*\ - * Matrix.invert - [ method ] - ** - * Returns inverted version of the matrix - = (object) @Matrix - \*/ - matrixproto.invert = function () { - var me = this, - x = me.a * me.d - me.b * me.c; - return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); - }; - /*\ - * Matrix.clone - [ method ] - ** - * Returns copy of the matrix - = (object) @Matrix - \*/ - matrixproto.clone = function () { - return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); - }; - /*\ - * Matrix.translate - [ method ] - ** - * Translate the matrix - > Parameters - - x (number) - - y (number) - \*/ - matrixproto.translate = function (x, y) { - this.add(1, 0, 0, 1, x, y); - }; - /*\ - * Matrix.scale - [ method ] - ** - * Scales the matrix - > Parameters - - x (number) - - y (number) #optional - - cx (number) #optional - - cy (number) #optional - \*/ - matrixproto.scale = function (x, y, cx, cy) { - y == null && (y = x); - (cx || cy) && this.add(1, 0, 0, 1, cx, cy); - this.add(x, 0, 0, y, 0, 0); - (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); - }; - /*\ - * Matrix.rotate - [ method ] - ** - * Rotates the matrix - > Parameters - - a (number) - - x (number) - - y (number) - \*/ - matrixproto.rotate = function (a, x, y) { - a = R.rad(a); - x = x || 0; - y = y || 0; - var cos = +math.cos(a).toFixed(9), - sin = +math.sin(a).toFixed(9); - this.add(cos, sin, -sin, cos, x, y); - this.add(1, 0, 0, 1, -x, -y); - }; - /*\ - * Matrix.x - [ method ] - ** - * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y - > Parameters - - x (number) - - y (number) - = (number) x - \*/ - matrixproto.x = function (x, y) { - return x * this.a + y * this.c + this.e; - }; - /*\ - * Matrix.y - [ method ] - ** - * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x - > Parameters - - x (number) - - y (number) - = (number) y - \*/ - matrixproto.y = function (x, y) { - return x * this.b + y * this.d + this.f; - }; - matrixproto.get = function (i) { - return +this[Str.fromCharCode(97 + i)].toFixed(4); - }; - matrixproto.toString = function () { - return R.svg ? - "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : - [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); - }; - matrixproto.toFilter = function () { - return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + - ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + - ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; - }; - matrixproto.offset = function () { - return [this.e.toFixed(4), this.f.toFixed(4)]; - }; - function norm(a) { - return a[0] * a[0] + a[1] * a[1]; - } - function normalize(a) { - var mag = math.sqrt(norm(a)); - a[0] && (a[0] /= mag); - a[1] && (a[1] /= mag); - } - /*\ - * Matrix.split - [ method ] - ** - * Splits matrix into primitive transformations - = (object) in format: - o dx (number) translation by x - o dy (number) translation by y - o scalex (number) scale by x - o scaley (number) scale by y - o shear (number) shear - o rotate (number) rotation in deg - o isSimple (boolean) could it be represented via simple transformations - \*/ - matrixproto.split = function () { - var out = {}; - // translation - out.dx = this.e; - out.dy = this.f; - - // scale and shear - var row = [[this.a, this.c], [this.b, this.d]]; - out.scalex = math.sqrt(norm(row[0])); - normalize(row[0]); - - out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; - row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; - - out.scaley = math.sqrt(norm(row[1])); - normalize(row[1]); - out.shear /= out.scaley; - - // rotation - var sin = -row[0][1], - cos = row[1][1]; - if (cos < 0) { - out.rotate = R.deg(math.acos(cos)); - if (sin < 0) { - out.rotate = 360 - out.rotate; - } - } else { - out.rotate = R.deg(math.asin(sin)); - } - - out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); - out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; - out.noRotation = !+out.shear.toFixed(9) && !out.rotate; - return out; - }; - /*\ - * Matrix.toTransformString - [ method ] - ** - * Return transform string that represents given matrix - = (string) transform string - \*/ - matrixproto.toTransformString = function (shorter) { - var s = shorter || this[split](); - if (s.isSimple) { - s.scalex = +s.scalex.toFixed(4); - s.scaley = +s.scaley.toFixed(4); - s.rotate = +s.rotate.toFixed(4); - return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + - (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + - (s.rotate ? "r" + [s.rotate, 0, 0] : E); - } else { - return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; - } - }; - })(Matrix.prototype); - - var preventDefault = function () { - this.returnValue = false; - }, - preventTouch = function () { - return this.originalEvent.preventDefault(); - }, - stopPropagation = function () { - this.cancelBubble = true; - }, - stopTouch = function () { - return this.originalEvent.stopPropagation(); - }, - getEventPosition = function (e) { - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - - return { - x: e.clientX + scrollX, - y: e.clientY + scrollY - }; - }, - addEvent = (function () { - if (g.doc.addEventListener) { - return function (obj, type, fn, element) { - var f = function (e) { - var pos = getEventPosition(e); - return fn.call(element, e, pos.x, pos.y); - }; - obj.addEventListener(type, f, false); - - if (supportsTouch && touchMap[type]) { - var _f = function (e) { - var pos = getEventPosition(e), - olde = e; - - for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { - if (e.targetTouches[i].target == obj) { - e = e.targetTouches[i]; - e.originalEvent = olde; - e.preventDefault = preventTouch; - e.stopPropagation = stopTouch; - break; - } - } - - return fn.call(element, e, pos.x, pos.y); - }; - obj.addEventListener(touchMap[type], _f, false); - } - - return function () { - obj.removeEventListener(type, f, false); - - if (supportsTouch && touchMap[type]) - obj.removeEventListener(touchMap[type], _f, false); - - return true; - }; - }; - } else if (g.doc.attachEvent) { - return function (obj, type, fn, element) { - var f = function (e) { - e = e || g.win.event; - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - x = e.clientX + scrollX, - y = e.clientY + scrollY; - e.preventDefault = e.preventDefault || preventDefault; - e.stopPropagation = e.stopPropagation || stopPropagation; - return fn.call(element, e, x, y); - }; - obj.attachEvent("on" + type, f); - var detacher = function () { - obj.detachEvent("on" + type, f); - return true; - }; - return detacher; - }; - } - })(), - drag = [], - dragMove = function (e) { - var x = e.clientX, - y = e.clientY, - scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - dragi, - j = drag.length; - while (j--) { - dragi = drag[j]; - if (supportsTouch && e.touches) { - var i = e.touches.length, - touch; - while (i--) { - touch = e.touches[i]; - if (touch.identifier == dragi.el._drag.id) { - x = touch.clientX; - y = touch.clientY; - (e.originalEvent ? e.originalEvent : e).preventDefault(); - break; - } - } - } else { - e.preventDefault(); - } - var node = dragi.el.node, - o, - next = node.nextSibling, - parent = node.parentNode, - display = node.style.display; - g.win.opera && parent.removeChild(node); - node.style.display = "none"; - o = dragi.el.paper.getElementByPoint(x, y); - node.style.display = display; - g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); - o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o); - x += scrollX; - y += scrollY; - eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); - } - }, - dragUp = function (e) { - R.unmousemove(dragMove).unmouseup(dragUp); - var i = drag.length, - dragi; - while (i--) { - dragi = drag[i]; - dragi.el._drag = {}; - eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); - } - drag = []; - }, - /*\ - * Raphael.el - [ property (object) ] - ** - * You can add your own method to elements. This is usefull when you want to hack default functionality or - * want to wrap some common transformation or attributes in one method. In difference to canvas methods, - * you can redefine element method at any time. Expending element methods wouldn’t affect set. - > Usage - | Raphael.el.red = function () { - | this.attr({fill: "#f00"}); - | }; - | // then use it - | paper.circle(100, 100, 20).red(); - \*/ - elproto = R.el = {}; - /*\ - * Element.click - [ method ] - ** - * Adds event handler for click for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unclick - [ method ] - ** - * Removes event handler for click for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.dblclick - [ method ] - ** - * Adds event handler for double click for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.undblclick - [ method ] - ** - * Removes event handler for double click for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mousedown - [ method ] - ** - * Adds event handler for mousedown for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmousedown - [ method ] - ** - * Removes event handler for mousedown for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mousemove - [ method ] - ** - * Adds event handler for mousemove for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmousemove - [ method ] - ** - * Removes event handler for mousemove for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseout - [ method ] - ** - * Adds event handler for mouseout for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseout - [ method ] - ** - * Removes event handler for mouseout for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseover - [ method ] - ** - * Adds event handler for mouseover for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseover - [ method ] - ** - * Removes event handler for mouseover for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseup - [ method ] - ** - * Adds event handler for mouseup for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseup - [ method ] - ** - * Removes event handler for mouseup for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchstart - [ method ] - ** - * Adds event handler for touchstart for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchstart - [ method ] - ** - * Removes event handler for touchstart for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchmove - [ method ] - ** - * Adds event handler for touchmove for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchmove - [ method ] - ** - * Removes event handler for touchmove for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchend - [ method ] - ** - * Adds event handler for touchend for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchend - [ method ] - ** - * Removes event handler for touchend for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchcancel - [ method ] - ** - * Adds event handler for touchcancel for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchcancel - [ method ] - ** - * Removes event handler for touchcancel for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - for (var i = events.length; i--;) { - (function (eventName) { - R[eventName] = elproto[eventName] = function (fn, scope) { - if (R.is(fn, "function")) { - this.events = this.events || []; - this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); - } - return this; - }; - R["un" + eventName] = elproto["un" + eventName] = function (fn) { - var events = this.events || [], - l = events.length; - while (l--){ - if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) { - events[l].unbind(); - events.splice(l, 1); - !events.length && delete this.events; - } - } - return this; - }; - })(events[i]); - } - - /*\ - * Element.data - [ method ] - ** - * Adds or retrieves given value asociated with given key. - ** - * See also @Element.removeData - > Parameters - - key (string) key to store data - - value (any) #optional value to store - = (object) @Element - * or, if value is not specified: - = (any) value - * or, if key and value are not specified: - = (object) Key/value pairs for all the data associated with the element. - > Usage - | for (var i = 0, i < 5, i++) { - | paper.circle(10 + 15 * i, 10, 10) - | .attr({fill: "#000"}) - | .data("i", i) - | .click(function () { - | alert(this.data("i")); - | }); - | } - \*/ - elproto.data = function (key, value) { - var data = eldata[this.id] = eldata[this.id] || {}; - if (arguments.length == 0) { - return data; - } - if (arguments.length == 1) { - if (R.is(key, "object")) { - for (var i in key) if (key[has](i)) { - this.data(i, key[i]); - } - return this; - } - eve("raphael.data.get." + this.id, this, data[key], key); - return data[key]; - } - data[key] = value; - eve("raphael.data.set." + this.id, this, value, key); - return this; - }; - - elproto.datum = function(){ - return arguments.length == 0 ? this._bindData : ((this._bindData = arguments[0]), this); - }; - - /*\ - * Element.removeData - [ method ] - ** - * Removes value associated with an element by given key. - * If key is not provided, removes all the data of the element. - > Parameters - - key (string) #optional key - = (object) @Element - \*/ - elproto.removeData = function (key) { - if (key == null) { - eldata[this.id] = {}; - } else { - eldata[this.id] && delete eldata[this.id][key]; - } - return this; - }; - /*\ - * Element.getData - [ method ] - ** - * Retrieves the element data - = (object) data - \*/ - elproto.getData = function () { - return clone(eldata[this.id] || {}); - }; - /*\ - * Element.hover - [ method ] - ** - * Adds event handlers for hover for the element. - > Parameters - - f_in (function) handler for hover in - - f_out (function) handler for hover out - - icontext (object) #optional context for hover in handler - - ocontext (object) #optional context for hover out handler - = (object) @Element - \*/ - elproto.hover = function (f_in, f_out, scope_in, scope_out) { - return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); - }; - /*\ - * Element.unhover - [ method ] - ** - * Removes event handlers for hover for the element. - > Parameters - - f_in (function) handler for hover in - - f_out (function) handler for hover out - = (object) @Element - \*/ - elproto.unhover = function (f_in, f_out) { - return this.unmouseover(f_in).unmouseout(f_out); - }; - var draggable = []; - /*\ - * Element.drag - [ method ] - ** - * Adds event handlers for drag of the element. - > Parameters - - onmove (function) handler for moving - - onstart (function) handler for drag start - - onend (function) handler for drag end - - mcontext (object) #optional context for moving handler - - scontext (object) #optional context for drag start handler - - econtext (object) #optional context for drag end handler - * Additionaly following `drag` events will be triggered: `drag.start.` on start, - * `drag.end.` on end and `drag.move.` on every move. When element will be dragged over another element - * `drag.over.` will be fired as well. - * - * Start event and start handler will be called in specified context or in context of the element with following parameters: - o x (number) x position of the mouse - o y (number) y position of the mouse - o event (object) DOM event object - * Move event and move handler will be called in specified context or in context of the element with following parameters: - o dx (number) shift by x from the start point - o dy (number) shift by y from the start point - o x (number) x position of the mouse - o y (number) y position of the mouse - o event (object) DOM event object - * End event and end handler will be called in specified context or in context of the element with following parameters: - o event (object) DOM event object - = (object) @Element - \*/ - elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { - function start(e) { - (e.originalEvent || e).preventDefault(); - var x = e.clientX, - y = e.clientY, - scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - this._drag.id = e.identifier; - if (supportsTouch && e.touches) { - var i = e.touches.length, touch; - while (i--) { - touch = e.touches[i]; - this._drag.id = touch.identifier; - if (touch.identifier == this._drag.id) { - x = touch.clientX; - y = touch.clientY; - break; - } - } - } - this._drag.x = x + scrollX; - this._drag.y = y + scrollY; - !drag.length && R.mousemove(dragMove).mouseup(dragUp); - drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); - onstart && eve.on("raphael.drag.start." + this.id, onstart); - onmove && eve.on("raphael.drag.move." + this.id, onmove); - onend && eve.on("raphael.drag.end." + this.id, onend); - eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); - } - this._drag = {}; - draggable.push({el: this, start: start}); - this.mousedown(start); - return this; - }; - /*\ - * Element.onDragOver - [ method ] - ** - * Shortcut for assigning event handler for `drag.over.` event, where id is id of the element (see @Element.id). - > Parameters - - f (function) handler for event, first argument would be the element you are dragging over - \*/ - elproto.onDragOver = function (f) { - f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id); - }; - /*\ - * Element.undrag - [ method ] - ** - * Removes all drag event handlers from given element. - \*/ - elproto.undrag = function () { - var i = draggable.length; - while (i--) if (draggable[i].el == this) { - this.unmousedown(draggable[i].start); - draggable.splice(i, 1); - eve.unbind("raphael.drag.*." + this.id); - } - !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); - drag = []; - }; - /*\ - * Paper.circle - [ method ] - ** - * Draws a circle. - ** - > Parameters - ** - - x (number) x coordinate of the centre - - y (number) y coordinate of the centre - - r (number) radius - = (object) Raphaël element object with type “circle” - ** - > Usage - | var c = paper.circle(50, 50, 40); - \*/ - paperproto.circle = function (x, y, r) { - var out = R._engine.circle(this, x || 0, y || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.rect - [ method ] - * - * Draws a rectangle. - ** - > Parameters - ** - - x (number) x coordinate of the top left corner - - y (number) y coordinate of the top left corner - - width (number) width - - height (number) height - - r (number) #optional radius for rounded corners, default is 0 - = (object) Raphaël element object with type “rect” - ** - > Usage - | // regular rectangle - | var c = paper.rect(10, 10, 50, 50); - | // rectangle with rounded corners - | var c = paper.rect(40, 40, 50, 50, 10); - \*/ - paperproto.rect = function (x, y, w, h, r) { - var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.ellipse - [ method ] - ** - * Draws an ellipse. - ** - > Parameters - ** - - x (number) x coordinate of the centre - - y (number) y coordinate of the centre - - rx (number) horizontal radius - - ry (number) vertical radius - = (object) Raphaël element object with type “ellipse” - ** - > Usage - | var c = paper.ellipse(50, 50, 40, 20); - \*/ - paperproto.ellipse = function (x, y, rx, ry) { - var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.path - [ method ] - ** - * Creates a path element by given path data string. - > Parameters - - pathString (string) #optional path string in SVG format. - * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example: - | "M10,20L30,40" - * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative. - * - #

    Here is short list of commands available, for more details see SVG path string format.

    - #
    - # - # - # - # - # - # - # - # - # - # - #
    CommandNameParameters
    Mmoveto(x y)+
    Zclosepath(none)
    Llineto(x y)+
    Hhorizontal linetox+
    Vvertical linetoy+
    Ccurveto(x1 y1 x2 y2 x y)+
    Ssmooth curveto(x2 y2 x y)+
    Qquadratic Bézier curveto(x1 y1 x y)+
    Tsmooth quadratic Bézier curveto(x y)+
    Aelliptical arc(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
    RCatmull-Rom curveto*x1 y1 (x y)+
    - * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier. - * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning. - > Usage - | var c = paper.path("M10 10L90 90"); - | // draw a diagonal line: - | // move to 10,10, line to 90,90 - * For example of path strings, check out these icons: http://raphaeljs.com/icons/ - \*/ - paperproto.path = function (pathString) { - pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); - var out = R._engine.path(R.format[apply](R, arguments), this); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.image - [ method ] - ** - * Embeds an image into the surface. - ** - > Parameters - ** - - src (string) URI of the source image - - x (number) x coordinate position - - y (number) y coordinate position - - width (number) width of the image - - height (number) height of the image - = (object) Raphaël element object with type “image” - ** - > Usage - | var c = paper.image("apple.png", 10, 10, 80, 80); - \*/ - paperproto.image = function (src, x, y, w, h) { - var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.text - [ method ] - ** - * Draws a text string. If you need line breaks, put “\n” in the string. - ** - > Parameters - ** - - x (number) x coordinate position - - y (number) y coordinate position - - text (string) The text string to draw - = (object) Raphaël element object with type “text” - ** - > Usage - | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); - \*/ - paperproto.text = function (x, y, text) { - var out = R._engine.text(this, x || 0, y || 0, Str(text)); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.set - [ method ] - ** - * Creates array-like object to keep and operate several elements at once. - * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements. - * Sets act as pseudo elements — all methods available to an element can be used on a set. - = (object) array-like object that represents set of elements - ** - > Usage - | var st = paper.set(); - | st.push( - | paper.circle(10, 10, 5), - | paper.circle(30, 10, 5) - | ); - | st.attr({fill: "red"}); // changes the fill of both circles - \*/ - paperproto.set = function (itemsArray) { - !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); - var out = new Set(itemsArray); - this.__set__ && this.__set__.push(out); - out["paper"] = this; - out["type"] = "set"; - return out; - }; - /*\ - * Paper.setStart - [ method ] - ** - * Creates @Paper.set. All elements that will be created after calling this method and before calling - * @Paper.setFinish will be added to the set. - ** - > Usage - | paper.setStart(); - | paper.circle(10, 10, 5), - | paper.circle(30, 10, 5) - | var st = paper.setFinish(); - | st.attr({fill: "red"}); // changes the fill of both circles - \*/ - paperproto.setStart = function (set) { - this.__set__ = set || this.set(); - }; - /*\ - * Paper.setFinish - [ method ] - ** - * See @Paper.setStart. This method finishes catching and returns resulting set. - ** - = (object) set - \*/ - paperproto.setFinish = function (set) { - var out = this.__set__; - delete this.__set__; - return out; - }; - /*\ - * Paper.getSize - [ method ] - ** - * Obtains current paper actual size. - ** - = (object) - \*/ - paperproto.getSize = function () { - var container = this.canvas.parentNode; - return { - width: container.offsetWidth, - height: container.offsetHeight - }; - }; - /*\ - * Paper.setSize - [ method ] - ** - * If you need to change dimensions of the canvas call this method - ** - > Parameters - ** - - width (number) new width of the canvas - - height (number) new height of the canvas - \*/ - paperproto.setSize = function (width, height) { - return R._engine.setSize.call(this, width, height); - }; - /*\ - * Paper.setViewBox - [ method ] - ** - * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by - * specifying new boundaries. - ** - > Parameters - ** - - x (number) new x position, default is `0` - - y (number) new y position, default is `0` - - w (number) new width of the canvas - - h (number) new height of the canvas - - fit (boolean) `true` if you want graphics to fit into new boundary box - \*/ - paperproto.setViewBox = function (x, y, w, h, fit) { - return R._engine.setViewBox.call(this, x, y, w, h, fit); - }; - /*\ - * Paper.top - [ property ] - ** - * Points to the topmost element on the paper - \*/ - /*\ - * Paper.bottom - [ property ] - ** - * Points to the bottom element on the paper - \*/ - paperproto.top = paperproto.bottom = null; - /*\ - * Paper.raphael - [ property ] - ** - * Points to the @Raphael object/function - \*/ - paperproto.raphael = R; - var getOffset = function (elem) { - var box = elem.getBoundingClientRect(), - doc = elem.ownerDocument, - body = doc.body, - docElem = doc.documentElement, - clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, - top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, - left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; - return { - y: top, - x: left - }; - }; - /*\ - * Paper.getElementByPoint - [ method ] - ** - * Returns you topmost element under given point. - ** - = (object) Raphaël element object - > Parameters - ** - - x (number) x coordinate from the top left corner of the window - - y (number) y coordinate from the top left corner of the window - > Usage - | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"}); - \*/ - paperproto.getElementByPoint = function (x, y) { - var paper = this, - svg = paper.canvas, - target = g.doc.elementFromPoint(x, y); - if (g.win.opera && target.tagName == "svg") { - var so = getOffset(svg), - sr = svg.createSVGRect(); - sr.x = x - so.x; - sr.y = y - so.y; - sr.width = sr.height = 1; - var hits = svg.getIntersectionList(sr, null); - if (hits.length) { - target = hits[hits.length - 1]; - } - } - if (!target) { - return null; - } - while (target.parentNode && target != svg.parentNode && !target.raphael) { - target = target.parentNode; - } - target == paper.canvas.parentNode && (target = svg); - target = target && target.raphael ? paper.getById(target.raphaelid) : null; - return target; - }; - - /*\ - * Paper.getElementsByBBox - [ method ] - ** - * Returns set of elements that have an intersecting bounding box - ** - > Parameters - ** - - bbox (object) bbox to check with - = (object) @Set - \*/ - paperproto.getElementsByBBox = function (bbox) { - var set = this.set(); - this.forEach(function (el) { - if (R.isBBoxIntersect(el.getBBox(), bbox)) { - set.push(el); - } - }); - return set; - }; - - /*\ - * Paper.getById - [ method ] - ** - * Returns you element by its internal ID. - ** - > Parameters - ** - - id (number) id - = (object) Raphaël element object - \*/ - paperproto.getById = function (id) { - var bot = this.bottom; - while (bot) { - if (bot.id == id) { - return bot; - } - bot = bot.next; - } - return null; - }; - /*\ - * Paper.forEach - [ method ] - ** - * Executes given function for each element on the paper - * - * If callback function returns `false` it will stop loop running. - ** - > Parameters - ** - - callback (function) function to run - - thisArg (object) context object for the callback - = (object) Paper object - > Usage - | paper.forEach(function (el) { - | el.attr({ stroke: "blue" }); - | }); - \*/ - paperproto.forEach = function (callback, thisArg) { - var bot = this.bottom; - while (bot) { - if (callback.call(thisArg, bot) === false) { - return this; - } - bot = bot.next; - } - return this; - }; - /*\ - * Paper.getElementsByPoint - [ method ] - ** - * Returns set of elements that have common point inside - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (object) @Set - \*/ - paperproto.getElementsByPoint = function (x, y) { - var set = this.set(); - this.forEach(function (el) { - if (el.isPointInside(x, y)) { - set.push(el); - } - }); - return set; - }; - function x_y() { - return this.x + S + this.y; - } - function x_y_w_h() { - return this.x + S + this.y + S + this.width + " \xd7 " + this.height; - } - /*\ - * Element.isPointInside - [ method ] - ** - * Determine if given point is inside this element’s shape - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (boolean) `true` if point inside the shape - \*/ - elproto.isPointInside = function (x, y) { - var rp = this.realPath = getPath[this.type](this); - if (this.attr('transform') && this.attr('transform').length) { - rp = R.transformPath(rp, this.attr('transform')); - } - return R.isPointInsidePath(rp, x, y); - }; - /*\ - * Element.getBBox - [ method ] - ** - * Return bounding box for a given element - ** - > Parameters - ** - - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`. - = (object) Bounding box object: - o { - o x: (number) top left corner x - o y: (number) top left corner y - o x2: (number) bottom right corner x - o y2: (number) bottom right corner y - o width: (number) width - o height: (number) height - o } - \*/ - elproto.getBBox = function (isWithoutTransform) { - if (this.removed) { - return {}; - } - var _ = this._; - if (isWithoutTransform) { - if (_.dirty || !_.bboxwt) { - this.realPath = getPath[this.type](this); - _.bboxwt = pathDimensions(this.realPath); - _.bboxwt.toString = x_y_w_h; - _.dirty = 0; - } - return _.bboxwt; - } - if (_.dirty || _.dirtyT || !_.bbox) { - if (_.dirty || !this.realPath) { - _.bboxwt = 0; - this.realPath = getPath[this.type](this); - } - _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); - _.bbox.toString = x_y_w_h; - _.dirty = _.dirtyT = 0; - } - return _.bbox; - }; - /*\ - * Element.clone - [ method ] - ** - = (object) clone of a given element - ** - \*/ - elproto.clone = function () { - if (this.removed) { - return null; - } - var out = this.paper[this.type]().attr(this.attr()); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Element.glow - [ method ] - ** - * Return set of elements that create glow-like effect around given element. See @Paper.set. - * - * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself. - ** - > Parameters - ** - - glow (object) #optional parameters object with all properties optional: - o { - o width (number) size of the glow, default is `10` - o fill (boolean) will it be filled, default is `false` - o opacity (number) opacity, default is `0.5` - o offsetx (number) horizontal offset, default is `0` - o offsety (number) vertical offset, default is `0` - o color (string) glow colour, default is `black` - o } - = (object) @Paper.set of elements that represents glow - \*/ - elproto.glow = function (glow) { - if (this.type == "text") { - return null; - } - glow = glow || {}; - var s = { - width: (glow.width || 10) + (+this.attr("stroke-width") || 1), - fill: glow.fill || false, - opacity: glow.opacity == null ? .5 : glow.opacity, - offsetx: glow.offsetx || 0, - offsety: glow.offsety || 0, - color: glow.color || "#000" - }, - c = s.width / 2, - r = this.paper, - out = r.set(), - path = this.realPath || getPath[this.type](this); - path = this.matrix ? mapPath(path, this.matrix) : path; - for (var i = 1; i < c + 1; i++) { - out.push(r.path(path).attr({ - stroke: s.color, - fill: s.fill ? s.color : "none", - "stroke-linejoin": "round", - "stroke-linecap": "round", - "stroke-width": +(s.width / c * i).toFixed(3), - opacity: +(s.opacity / c).toFixed(3) - })); - } - return out.insertBefore(this).translate(s.offsetx, s.offsety); - }; - var curveslengths = {}, - getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { - if (length == null) { - return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); - } else { - return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); - } - }, - getLengthFactory = function (istotal, subpath) { - return function (path, length, onlystart) { - path = path2curve(path); - var x, y, p, l, sp = "", subpaths = {}, point, - len = 0; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = +p[1]; - y = +p[2]; - } else { - l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - if (len + l > length) { - if (subpath && !subpaths.start) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; - if (onlystart) {return sp;} - subpaths.start = sp; - sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); - len += l; - x = +p[5]; - y = +p[6]; - continue; - } - if (!istotal && !subpath) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - return {x: point.x, y: point.y, alpha: point.alpha}; - } - } - len += l; - x = +p[5]; - y = +p[6]; - } - sp += p.shift() + p; - } - subpaths.end = sp; - point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); - point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); - return point; - }; - }; - var getTotalLength = getLengthFactory(1), - getPointAtLength = getLengthFactory(), - getSubpathsAtLength = getLengthFactory(0, 1); - /*\ - * Raphael.getTotalLength - [ method ] - ** - * Returns length of the given path in pixels. - ** - > Parameters - ** - - path (string) SVG path string. - ** - = (number) length. - \*/ - R.getTotalLength = getTotalLength; - /*\ - * Raphael.getPointAtLength - [ method ] - ** - * Return coordinates of the point located at the given length on the given path. - ** - > Parameters - ** - - path (string) SVG path string - - length (number) - ** - = (object) representation of the point: - o { - o x: (number) x coordinate - o y: (number) y coordinate - o alpha: (number) angle of derivative - o } - \*/ - R.getPointAtLength = getPointAtLength; - /*\ - * Raphael.getSubpath - [ method ] - ** - * Return subpath of a given path from given length to given length. - ** - > Parameters - ** - - path (string) SVG path string - - from (number) position of the start of the segment - - to (number) position of the end of the segment - ** - = (string) pathstring for the segment - \*/ - R.getSubpath = function (path, from, to) { - if (this.getTotalLength(path) - to < 1e-6) { - return getSubpathsAtLength(path, from).end; - } - var a = getSubpathsAtLength(path, to, 1); - return from ? getSubpathsAtLength(a, from).end : a; - }; - /*\ - * Element.getTotalLength - [ method ] - ** - * Returns length of the path in pixels. Only works for element of “path” type. - = (number) length. - \*/ - elproto.getTotalLength = function () { - var path = this.getPath(); - if (!path) { - return; - } - - if (this.node.getTotalLength) { - return this.node.getTotalLength(); - } - - return getTotalLength(path); - }; - /*\ - * Element.getPointAtLength - [ method ] - ** - * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type. - ** - > Parameters - ** - - length (number) - ** - = (object) representation of the point: - o { - o x: (number) x coordinate - o y: (number) y coordinate - o alpha: (number) angle of derivative - o } - \*/ - elproto.getPointAtLength = function (length) { - var path = this.getPath(); - if (!path) { - return; - } - - return getPointAtLength(path, length); - }; - /*\ - * Element.getPath - [ method ] - ** - * Returns path of the element. Only works for elements of “path” type and simple elements like circle. - = (object) path - ** - \*/ - elproto.getPath = function () { - var path, - getPath = R._getPath[this.type]; - - if (this.type == "text" || this.type == "set") { - return; - } - - if (getPath) { - path = getPath(this); - } - - return path; - }; - /*\ - * Element.getSubpath - [ method ] - ** - * Return subpath of a given element from given length to given length. Only works for element of “path” type. - ** - > Parameters - ** - - from (number) position of the start of the segment - - to (number) position of the end of the segment - ** - = (string) pathstring for the segment - \*/ - elproto.getSubpath = function (from, to) { - var path = this.getPath(); - if (!path) { - return; - } - - return R.getSubpath(path, from, to); - }; - /*\ - * Raphael.easing_formulas - [ property ] - ** - * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing: - #
      - #
    • “linear”
    • - #
    • “<” or “easeIn” or “ease-in”
    • - #
    • “>” or “easeOut” or “ease-out”
    • - #
    • “<>” or “easeInOut” or “ease-in-out”
    • - #
    • “backIn” or “back-in”
    • - #
    • “backOut” or “back-out”
    • - #
    • “elastic”
    • - #
    • “bounce”
    • - #
    - #

    See also Easing demo.

    - \*/ - var ef = R.easing_formulas = { - linear: function (n) { - return n; - }, - "<": function (n) { - return pow(n, 1.7); - }, - ">": function (n) { - return pow(n, .48); - }, - "<>": function (n) { - var q = .48 - n / 1.04, - Q = math.sqrt(.1734 + q * q), - x = Q - q, - X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), - y = -Q - q, - Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), - t = X + Y + .5; - return (1 - t) * 3 * t * t + t * t * t; - }, - backIn: function (n) { - var s = 1.70158; - return n * n * ((s + 1) * n - s); - }, - backOut: function (n) { - n = n - 1; - var s = 1.70158; - return n * n * ((s + 1) * n + s) + 1; - }, - elastic: function (n) { - if (n == !!n) { - return n; - } - return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; - }, - bounce: function (n) { - var s = 7.5625, - p = 2.75, - l; - if (n < (1 / p)) { - l = s * n * n; - } else { - if (n < (2 / p)) { - n -= (1.5 / p); - l = s * n * n + .75; - } else { - if (n < (2.5 / p)) { - n -= (2.25 / p); - l = s * n * n + .9375; - } else { - n -= (2.625 / p); - l = s * n * n + .984375; - } - } - } - return l; - } - }; - ef.easeIn = ef["ease-in"] = ef["<"]; - ef.easeOut = ef["ease-out"] = ef[">"]; - ef.easeInOut = ef["ease-in-out"] = ef["<>"]; - ef["back-in"] = ef.backIn; - ef["back-out"] = ef.backOut; - - var animationElements = [], - requestAnimFrame = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function (callback) { - setTimeout(callback, 16); - }, - animation = function () { - var Now = +new Date, - l = 0; - for (; l < animationElements.length; l++) { - var e = animationElements[l]; - if (e.el.removed || e.paused) { - continue; - } - var time = Now - e.start, - ms = e.ms, - easing = e.easing, - from = e.from, - diff = e.diff, - to = e.to, - t = e.t, - that = e.el, - set = {}, - now, - init = {}, - key; - if (e.initstatus) { - time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; - e.status = e.initstatus; - delete e.initstatus; - e.stop && animationElements.splice(l--, 1); - } else { - e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; - } - if (time < 0) { - continue; - } - if (time < ms) { - var pos = easing(time / ms); - for (var attr in from) if (from[has](attr)) { - switch (availableAnimAttrs[attr]) { - case nu: - now = +from[attr] + pos * ms * diff[attr]; - break; - case "colour": - now = "rgb(" + [ - upto255(round(from[attr].r + pos * ms * diff[attr].r)), - upto255(round(from[attr].g + pos * ms * diff[attr].g)), - upto255(round(from[attr].b + pos * ms * diff[attr].b)) - ].join(",") + ")"; - break; - case "path": - now = []; - for (var i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - now[i] = now[i].join(S); - } - now = now.join(S); - break; - case "transform": - if (diff[attr].real) { - now = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - } - } else { - var get = function (i) { - return +from[attr][i] + pos * ms * diff[attr][i]; - }; - // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; - now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; - } - break; - case "csv": - if (attr == "clip-rect") { - now = []; - i = 4; - while (i--) { - now[i] = +from[attr][i] + pos * ms * diff[attr][i]; - } - } - break; - default: - var from2 = [][concat](from[attr]); - now = []; - i = that.paper.customAttributes[attr].length; - while (i--) { - now[i] = +from2[i] + pos * ms * diff[attr][i]; - } - break; - } - set[attr] = now; - } - that.attr(set); - (function (id, that, anim) { - setTimeout(function () { - eve("raphael.anim.frame." + id, that, anim); - }); - })(that.id, that, e.anim); - } else { - (function(f, el, a) { - setTimeout(function() { - eve("raphael.anim.frame." + el.id, el, a); - eve("raphael.anim.finish." + el.id, el, a); - R.is(f, "function") && f.call(el); - }); - })(e.callback, that, e.anim); - that.attr(to); - animationElements.splice(l--, 1); - if (e.repeat > 1 && !e.next) { - for (key in to) if (to[has](key)) { - init[key] = e.totalOrigin[key]; - } - e.el.attr(init); - runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); - } - if (e.next && !e.stop) { - runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); - } - } - } - animationElements.length && requestAnimFrame(animation); - }, - upto255 = function (color) { - return color > 255 ? 255 : color < 0 ? 0 : color; - }; - /*\ - * Element.animateWith - [ method ] - ** - * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element. - ** - > Parameters - ** - - el (object) element to sync with - - anim (object) animation to sync with - - params (object) #optional final attributes for the element, see also @Element.attr - - ms (number) #optional number of milliseconds for animation to run - - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - * or - - element (object) element to sync with - - anim (object) animation to sync with - - animation (object) #optional animation object, see @Raphael.animation - ** - = (object) original element - \*/ - elproto.animateWith = function (el, anim, params, ms, easing, callback) { - var element = this; - if (element.removed) { - callback && callback.call(element); - return element; - } - var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback), - x, y; - runAnimation(a, element, a.percents[0], null, element.attr()); - for (var i = 0, ii = animationElements.length; i < ii; i++) { - if (animationElements[i].anim == anim && animationElements[i].el == el) { - animationElements[ii - 1].start = animationElements[i].start; - break; - } - } - return element; - // - // - // var a = params ? R.animation(params, ms, easing, callback) : anim, - // status = element.status(anim); - // return this.animate(a).status(a, status * anim.ms / a.ms); - }; - function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { - var cx = 3 * p1x, - bx = 3 * (p2x - p1x) - cx, - ax = 1 - cx - bx, - cy = 3 * p1y, - by = 3 * (p2y - p1y) - cy, - ay = 1 - cy - by; - function sampleCurveX(t) { - return ((ax * t + bx) * t + cx) * t; - } - function solve(x, epsilon) { - var t = solveCurveX(x, epsilon); - return ((ay * t + by) * t + cy) * t; - } - function solveCurveX(x, epsilon) { - var t0, t1, t2, x2, d2, i; - for(t2 = x, i = 0; i < 8; i++) { - x2 = sampleCurveX(t2) - x; - if (abs(x2) < epsilon) { - return t2; - } - d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; - if (abs(d2) < 1e-6) { - break; - } - t2 = t2 - x2 / d2; - } - t0 = 0; - t1 = 1; - t2 = x; - if (t2 < t0) { - return t0; - } - if (t2 > t1) { - return t1; - } - while (t0 < t1) { - x2 = sampleCurveX(t2); - if (abs(x2 - x) < epsilon) { - return t2; - } - if (x > x2) { - t0 = t2; - } else { - t1 = t2; - } - t2 = (t1 - t0) / 2 + t0; - } - return t2; - } - return solve(t, 1 / (200 * duration)); - } - elproto.onAnimation = function (f) { - f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id); - return this; - }; - function Animation(anim, ms) { - var percents = [], - newAnim = {}; - this.ms = ms; - this.times = 1; - if (anim) { - for (var attr in anim) if (anim[has](attr)) { - newAnim[toFloat(attr)] = anim[attr]; - percents.push(toFloat(attr)); - } - percents.sort(sortByNumber); - } - this.anim = newAnim; - this.top = percents[percents.length - 1]; - this.percents = percents; - } - /*\ - * Animation.delay - [ method ] - ** - * Creates a copy of existing animation object with given delay. - ** - > Parameters - ** - - delay (number) number of ms to pass between animation start and actual animation - ** - = (object) new altered Animation object - | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3); - | circle1.animate(anim); // run the given animation immediately - | circle2.animate(anim.delay(500)); // run the given animation after 500 ms - \*/ - Animation.prototype.delay = function (delay) { - var a = new Animation(this.anim, this.ms); - a.times = this.times; - a.del = +delay || 0; - return a; - }; - /*\ - * Animation.repeat - [ method ] - ** - * Creates a copy of existing animation object with given repetition. - ** - > Parameters - ** - - repeat (number) number iterations of animation. For infinite animation pass `Infinity` - ** - = (object) new altered Animation object - \*/ - Animation.prototype.repeat = function (times) { - var a = new Animation(this.anim, this.ms); - a.del = this.del; - a.times = math.floor(mmax(times, 0)) || 1; - return a; - }; - function runAnimation(anim, element, percent, status, totalOrigin, times) { - percent = toFloat(percent); - var params, - isInAnim, - isInAnimSet, - percents = [], - next, - prev, - timestamp, - ms = anim.ms, - from = {}, - to = {}, - diff = {}; - if (status) { - for (i = 0, ii = animationElements.length; i < ii; i++) { - var e = animationElements[i]; - if (e.el.id == element.id && e.anim == anim) { - if (e.percent != percent) { - animationElements.splice(i, 1); - isInAnimSet = 1; - } else { - isInAnim = e; - } - element.attr(e.totalOrigin); - break; - } - } - } else { - status = +to; // NaN - } - for (var i = 0, ii = anim.percents.length; i < ii; i++) { - if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { - percent = anim.percents[i]; - prev = anim.percents[i - 1] || 0; - ms = ms / anim.top * (percent - prev); - next = anim.percents[i + 1]; - params = anim.anim[percent]; - break; - } else if (status) { - element.attr(anim.anim[anim.percents[i]]); - } - } - if (!params) { - return; - } - if (!isInAnim) { - for (var attr in params) if (params[has](attr)) { - if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { - from[attr] = element.attr(attr); - (from[attr] == null) && (from[attr] = availableAttrs[attr]); - to[attr] = params[attr]; - switch (availableAnimAttrs[attr]) { - case nu: - diff[attr] = (to[attr] - from[attr]) / ms; - break; - case "colour": - from[attr] = R.getRGB(from[attr]); - var toColour = R.getRGB(to[attr]); - diff[attr] = { - r: (toColour.r - from[attr].r) / ms, - g: (toColour.g - from[attr].g) / ms, - b: (toColour.b - from[attr].b) / ms - }; - break; - case "path": - var pathes = path2curve(from[attr], to[attr]), - toPath = pathes[1]; - from[attr] = pathes[0]; - diff[attr] = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [0]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; - } - } - break; - case "transform": - var _ = element._, - eq = equaliseTransform(_[attr], to[attr]); - if (eq) { - from[attr] = eq.from; - to[attr] = eq.to; - diff[attr] = []; - diff[attr].real = true; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; - } - } - } else { - var m = (element.matrix || new Matrix), - to2 = { - _: {transform: _.transform}, - getBBox: function () { - return element.getBBox(1); - } - }; - from[attr] = [ - m.a, - m.b, - m.c, - m.d, - m.e, - m.f - ]; - extractTransform(to2, to[attr]); - to[attr] = to2._.transform; - diff[attr] = [ - (to2.matrix.a - m.a) / ms, - (to2.matrix.b - m.b) / ms, - (to2.matrix.c - m.c) / ms, - (to2.matrix.d - m.d) / ms, - (to2.matrix.e - m.e) / ms, - (to2.matrix.f - m.f) / ms - ]; - // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; - // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; - // extractTransform(to2, to[attr]); - // diff[attr] = [ - // (to2._.sx - _.sx) / ms, - // (to2._.sy - _.sy) / ms, - // (to2._.deg - _.deg) / ms, - // (to2._.dx - _.dx) / ms, - // (to2._.dy - _.dy) / ms - // ]; - } - break; - case "csv": - var values = Str(params[attr])[split](separator), - from2 = Str(from[attr])[split](separator); - if (attr == "clip-rect") { - from[attr] = from2; - diff[attr] = []; - i = from2.length; - while (i--) { - diff[attr][i] = (values[i] - from[attr][i]) / ms; - } - } - to[attr] = values; - break; - default: - values = [][concat](params[attr]); - from2 = [][concat](from[attr]); - diff[attr] = []; - i = element.paper.customAttributes[attr].length; - while (i--) { - diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; - } - break; - } - } - } - var easing = params.easing, - easyeasy = R.easing_formulas[easing]; - if (!easyeasy) { - easyeasy = Str(easing).match(bezierrg); - if (easyeasy && easyeasy.length == 5) { - var curve = easyeasy; - easyeasy = function (t) { - return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); - }; - } else { - easyeasy = pipe; - } - } - timestamp = params.start || anim.start || +new Date; - e = { - anim: anim, - percent: percent, - timestamp: timestamp, - start: timestamp + (anim.del || 0), - status: 0, - initstatus: status || 0, - stop: false, - ms: ms, - easing: easyeasy, - from: from, - diff: diff, - to: to, - el: element, - callback: params.callback, - prev: prev, - next: next, - repeat: times || anim.times, - origin: element.attr(), - totalOrigin: totalOrigin - }; - animationElements.push(e); - if (status && !isInAnim && !isInAnimSet) { - e.stop = true; - e.start = new Date - ms * status; - if (animationElements.length == 1) { - return animation(); - } - } - if (isInAnimSet) { - e.start = new Date - e.ms * status; - } - animationElements.length == 1 && requestAnimFrame(animation); - } else { - isInAnim.initstatus = status; - isInAnim.start = new Date - isInAnim.ms * status; - } - eve("raphael.anim.start." + element.id, element, anim); - } - /*\ - * Raphael.animation - [ method ] - ** - * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods. - * See also @Animation.delay and @Animation.repeat methods. - ** - > Parameters - ** - - params (object) final attributes for the element, see also @Element.attr - - ms (number) number of milliseconds for animation to run - - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - ** - = (object) @Animation - \*/ - R.animation = function (params, ms, easing, callback) { - if (params instanceof Animation) { - return params; - } - if (R.is(easing, "function") || !easing) { - callback = callback || easing || null; - easing = null; - } - params = Object(params); - ms = +ms || 0; - var p = {}, - json, - attr; - for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { - json = true; - p[attr] = params[attr]; - } - if (!json) { - // if percent-like syntax is used and end-of-all animation callback used - if(callback){ - // find the last one - var lastKey = 0; - for(var i in params){ - var percent = toInt(i); - if(params[has](i) && percent > lastKey){ - lastKey = percent; - } - } - lastKey += '%'; - // if already defined callback in the last keyframe, skip - !params[lastKey].callback && (params[lastKey].callback = callback); - } - return new Animation(params, ms); - } else { - easing && (p.easing = easing); - callback && (p.callback = callback); - return new Animation({100: p}, ms); - } - }; - /*\ - * Element.animate - [ method ] - ** - * Creates and starts animation for given element. - ** - > Parameters - ** - - params (object) final attributes for the element, see also @Element.attr - - ms (number) number of milliseconds for animation to run - - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - * or - - animation (object) animation object, see @Raphael.animation - ** - = (object) original element - \*/ - elproto.animate = function (params, ms, easing, callback) { - var element = this; - if (element.removed) { - callback && callback.call(element); - return element; - } - var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); - runAnimation(anim, element, anim.percents[0], null, element.attr()); - return element; - }; - /*\ - * Element.setTime - [ method ] - ** - * Sets the status of animation of the element in milliseconds. Similar to @Element.status method. - ** - > Parameters - ** - - anim (object) animation object - - value (number) number of milliseconds from the beginning of the animation - ** - = (object) original element if `value` is specified - * Note, that during animation following events are triggered: - * - * On each animation frame event `anim.frame.`, on start `anim.start.` and on end `anim.finish.`. - \*/ - elproto.setTime = function (anim, value) { - if (anim && value != null) { - this.status(anim, mmin(value, anim.ms) / anim.ms); - } - return this; - }; - /*\ - * Element.status - [ method ] - ** - * Gets or sets the status of animation of the element. - ** - > Parameters - ** - - anim (object) #optional animation object - - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position. - ** - = (number) status - * or - = (array) status if `anim` is not specified. Array of objects in format: - o { - o anim: (object) animation object - o status: (number) status - o } - * or - = (object) original element if `value` is specified - \*/ - elproto.status = function (anim, value) { - var out = [], - i = 0, - len, - e; - if (value != null) { - runAnimation(anim, this, -1, mmin(value, 1)); - return this; - } else { - len = animationElements.length; - for (; i < len; i++) { - e = animationElements[i]; - if (e.el.id == this.id && (!anim || e.anim == anim)) { - if (anim) { - return e.status; - } - out.push({ - anim: e.anim, - status: e.status - }); - } - } - if (anim) { - return 0; - } - return out; - } - }; - /*\ - * Element.pause - [ method ] - ** - * Stops animation of the element with ability to resume it later on. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.pause = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { - animationElements[i].paused = true; - } - } - return this; - }; - /*\ - * Element.resume - [ method ] - ** - * Resumes animation if it was paused with @Element.pause method. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.resume = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - var e = animationElements[i]; - if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { - delete e.paused; - this.status(e.anim, e.status); - } - } - return this; - }; - /*\ - * Element.stop - [ method ] - ** - * Stops animation of the element. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.stop = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { - animationElements.splice(i--, 1); - } - } - return this; - }; - function stopAnimation(paper) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { - animationElements.splice(i--, 1); - } - } - eve.on("raphael.remove", stopAnimation); - eve.on("raphael.clear", stopAnimation); - elproto.toString = function () { - return "Rapha\xebl\u2019s object"; - }; - - // Set - var Set = function (items) { - this.items = []; - this.length = 0; - this.type = "set"; - if (items) { - for (var i = 0, ii = items.length; i < ii; i++) { - if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { - this[this.items.length] = this.items[this.items.length] = items[i]; - this.length++; - } - } - } - }, - setproto = Set.prototype; - /*\ - * Set.push - [ method ] - ** - * Adds each argument to the current set. - = (object) original element - \*/ - setproto.push = function () { - var item, - len; - for (var i = 0, ii = arguments.length; i < ii; i++) { - item = arguments[i]; - if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { - len = this.items.length; - this[len] = this.items[len] = item; - this.length++; - } - } - return this; - }; - /*\ - * Set.pop - [ method ] - ** - * Removes last element and returns it. - = (object) element - \*/ - setproto.pop = function () { - this.length && delete this[this.length--]; - return this.items.pop(); - }; - /*\ - * Set.forEach - [ method ] - ** - * Executes given function for each element in the set. - * - * If function returns `false` it will stop loop running. - ** - > Parameters - ** - - callback (function) function to run - - thisArg (object) context object for the callback - = (object) Set object - \*/ - setproto.forEach = function (callback, thisArg) { - for (var i = 0, ii = this.items.length; i < ii; i++) { - if (callback.call(thisArg, this.items[i], i) === false) { - return this; - } - } - return this; - }; - for (var method in elproto) if (elproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname][apply](el, arg); - }); - }; - })(method); - } - setproto.attr = function (name, value) { - if (name && R.is(name, array) && R.is(name[0], "object")) { - for (var j = 0, jj = name.length; j < jj; j++) { - this.items[j].attr(name[j]); - } - } else { - for (var i = 0, ii = this.items.length; i < ii; i++) { - this.items[i].attr(name, value); - } - } - return this; - }; - /*\ - * Set.clear - [ method ] - ** - * Removes all elements from the set - \*/ - setproto.clear = function () { - while (this.length) { - this.pop(); - } - }; - /*\ - * Set.splice - [ method ] - ** - * Removes given element from the set - ** - > Parameters - ** - - index (number) position of the deletion - - count (number) number of element to remove - - insertion… (object) #optional elements to insert - = (object) set elements that were deleted - \*/ - setproto.splice = function (index, count, insertion) { - index = index < 0 ? mmax(this.length + index, 0) : index; - count = mmax(0, mmin(this.length - index, count)); - var tail = [], - todel = [], - args = [], - i; - for (i = 2; i < arguments.length; i++) { - args.push(arguments[i]); - } - for (i = 0; i < count; i++) { - todel.push(this[index + i]); - } - for (; i < this.length - index; i++) { - tail.push(this[index + i]); - } - var arglen = args.length; - for (i = 0; i < arglen + tail.length; i++) { - this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; - } - i = this.items.length = this.length -= count - arglen; - while (this[i]) { - delete this[i++]; - } - return new Set(todel); - }; - /*\ - * Set.exclude - [ method ] - ** - * Removes given element from the set - ** - > Parameters - ** - - element (object) element to remove - = (boolean) `true` if object was found & removed from the set - \*/ - setproto.exclude = function (el) { - for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { - this.splice(i, 1); - return true; - } - }; - setproto.animate = function (params, ms, easing, callback) { - (R.is(easing, "function") || !easing) && (callback = easing || null); - var len = this.items.length, - i = len, - item, - set = this, - collector; - if (!len) { - return this; - } - callback && (collector = function () { - !--len && callback.call(set); - }); - easing = R.is(easing, string) ? easing : collector; - var anim = R.animation(params, ms, easing, collector); - item = this.items[--i].animate(anim); - while (i--) { - this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim); - (this.items[i] && !this.items[i].removed) || len--; - } - return this; - }; - setproto.insertAfter = function (el) { - var i = this.items.length; - while (i--) { - this.items[i].insertAfter(el); - } - return this; - }; - setproto.getBBox = function () { - var x = [], - y = [], - x2 = [], - y2 = []; - for (var i = this.items.length; i--;) if (!this.items[i].removed) { - var box = this.items[i].getBBox(); - x.push(box.x); - y.push(box.y); - x2.push(box.x + box.width); - y2.push(box.y + box.height); - } - x = mmin[apply](0, x); - y = mmin[apply](0, y); - x2 = mmax[apply](0, x2); - y2 = mmax[apply](0, y2); - return { - x: x, - y: y, - x2: x2, - y2: y2, - width: x2 - x, - height: y2 - y - }; - }; - setproto.clone = function (s) { - s = this.paper.set(); - for (var i = 0, ii = this.items.length; i < ii; i++) { - s.push(this.items[i].clone()); - } - return s; - }; - setproto.toString = function () { - return "Rapha\xebl\u2018s set"; - }; - - setproto.glow = function(glowConfig) { - var ret = this.paper.set(); - this.forEach(function(shape, index){ - var g = shape.glow(glowConfig); - if(g != null){ - g.forEach(function(shape2, index2){ - ret.push(shape2); - }); - } - }); - return ret; - }; - - - /*\ - * Set.isPointInside - [ method ] - ** - * Determine if given point is inside this set’s elements - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (boolean) `true` if point is inside any of the set's elements - \*/ - setproto.isPointInside = function (x, y) { - var isPointInside = false; - this.forEach(function (el) { - if (el.isPointInside(x, y)) { - isPointInside = true; - return false; // stop loop - } - }); - return isPointInside; - }; - - /*\ - * Raphael.registerFont - [ method ] - ** - * Adds given font to the registered set of font for Raphaël. Should be used as an internal call from within Cufón’s font file. - * Returns original parameter, so it could be used with chaining. - # More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file. - ** - > Parameters - ** - - font (object) the font to register - = (object) the font you passed in - > Usage - | Cufon.registerFont(Raphael.registerFont({…})); - \*/ - R.registerFont = function (font) { - if (!font.face) { - return font; - } - this.fonts = this.fonts || {}; - var fontcopy = { - w: font.w, - face: {}, - glyphs: {} - }, - family = font.face["font-family"]; - for (var prop in font.face) if (font.face[has](prop)) { - fontcopy.face[prop] = font.face[prop]; - } - if (this.fonts[family]) { - this.fonts[family].push(fontcopy); - } else { - this.fonts[family] = [fontcopy]; - } - if (!font.svg) { - fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); - for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { - var path = font.glyphs[glyph]; - fontcopy.glyphs[glyph] = { - w: path.w, - k: {}, - d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { - return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; - }) + "z" - }; - if (path.k) { - for (var k in path.k) if (path[has](k)) { - fontcopy.glyphs[glyph].k[k] = path.k[k]; - } - } - } - } - return font; - }; - /*\ - * Paper.getFont - [ method ] - ** - * Finds font object in the registered font by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”. - ** - > Parameters - ** - - family (string) font family name or any word from it - - weight (string) #optional font weight - - style (string) #optional font style - - stretch (string) #optional font stretch - = (object) the font object - > Usage - | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30); - \*/ - paperproto.getFont = function (family, weight, style, stretch) { - stretch = stretch || "normal"; - style = style || "normal"; - weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; - if (!R.fonts) { - return; - } - var font = R.fonts[family]; - if (!font) { - var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); - for (var fontName in R.fonts) if (R.fonts[has](fontName)) { - if (name.test(fontName)) { - font = R.fonts[fontName]; - break; - } - } - } - var thefont; - if (font) { - for (var i = 0, ii = font.length; i < ii; i++) { - thefont = font[i]; - if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { - break; - } - } - } - return thefont; - }; - /*\ - * Paper.print - [ method ] - ** - * Creates path that represent given text written using given font at given position with given size. - * Result of the method is path element that contains whole text as a separate path. - ** - > Parameters - ** - - x (number) x position of the text - - y (number) y position of the text - - string (string) text to print - - font (object) font object, see @Paper.getFont - - size (number) #optional size of the font, default is `16` - - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"` - - letter_spacing (number) #optional number in range `-1..1`, default is `0` - - line_spacing (number) #optional number in range `1..3`, default is `1` - = (object) resulting path element, which consist of all letters - > Usage - | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"}); - \*/ - paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) { - origin = origin || "middle"; // baseline|middle - letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); - line_spacing = mmax(mmin(line_spacing || 1, 3), 1); - var letters = Str(string)[split](E), - shift = 0, - notfirst = 0, - path = E, - scale; - R.is(font, "string") && (font = this.getFont(font)); - if (font) { - scale = (size || 16) / font.face["units-per-em"]; - var bb = font.face.bbox[split](separator), - top = +bb[0], - lineHeight = bb[3] - bb[1], - shifty = 0, - height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2); - for (var i = 0, ii = letters.length; i < ii; i++) { - if (letters[i] == "\n") { - shift = 0; - curr = 0; - notfirst = 0; - shifty += lineHeight * line_spacing; - } else { - var prev = notfirst && font.glyphs[letters[i - 1]] || {}, - curr = font.glyphs[letters[i]]; - shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; - notfirst = 1; - } - if (curr && curr.d) { - path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); - } - } - } - return this.path(path).attr({ - fill: "#000", - stroke: "none" - }); - }; - - /*\ - * Paper.add - [ method ] - ** - * Imports elements in JSON array in format `{type: type, }` - ** - > Parameters - ** - - json (array) - = (object) resulting set of imported elements - > Usage - | paper.add([ - | { - | type: "circle", - | cx: 10, - | cy: 10, - | r: 5 - | }, - | { - | type: "rect", - | x: 10, - | y: 10, - | width: 10, - | height: 10, - | fill: "#fc0" - | } - | ]); - \*/ - paperproto.add = function (json) { - if (R.is(json, "array")) { - var res = this.set(), - i = 0, - ii = json.length, - j; - for (; i < ii; i++) { - j = json[i] || {}; - elements[has](j.type) && res.push(this[j.type]().attr(j)); - } - } - return res; - }; - - /*\ - * Raphael.format - [ method ] - ** - * Simple format function. Replaces construction of type “`{}`” to the corresponding argument. - ** - > Parameters - ** - - token (string) string to format - - … (string) rest of arguments will be treated as parameters for replacement - = (string) formated string - > Usage - | var x = 10, - | y = 20, - | width = 40, - | height = 50; - | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" - | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width)); - \*/ - R.format = function (token, params) { - var args = R.is(params, array) ? [0][concat](params) : arguments; - token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { - return args[++i] == null ? E : args[i]; - })); - return token || E; - }; - /*\ - * Raphael.fullfill - [ method ] - ** - * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{}`” to the corresponding argument. - ** - > Parameters - ** - - token (string) string to format - - json (object) object which properties will be used as a replacement - = (string) formated string - > Usage - | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" - | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", { - | x: 10, - | y: 20, - | dim: { - | width: 40, - | height: 50, - | "negative width": -40 - | } - | })); - \*/ - R.fullfill = (function () { - var tokenRegex = /\{([^\}]+)\}/g, - objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties - replacer = function (all, key, obj) { - var res = obj; - key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { - name = name || quotedName; - if (res) { - if (name in res) { - res = res[name]; - } - typeof res == "function" && isFunc && (res = res()); - } - }); - res = (res == null || res == obj ? all : res) + ""; - return res; - }; - return function (str, obj) { - return String(str).replace(tokenRegex, function (all, key) { - return replacer(all, key, obj); - }); - }; - })(); - /*\ - * Raphael.ninja - [ method ] - ** - * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method. - * Beware, that in this case plugins could stop working, because they are depending on global variable existence. - ** - = (object) Raphael object - > Usage - | (function (local_raphael) { - | var paper = local_raphael(10, 10, 320, 200); - | … - | })(Raphael.ninja()); - \*/ - R.ninja = function () { - oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; - return R; - }; - /*\ - * Raphael.st - [ property (object) ] - ** - * You can add your own method to elements and sets. It is wise to add a set method for each element method - * you added, so you will be able to call the same method on sets too. - ** - * See also @Raphael.el. - > Usage - | Raphael.el.red = function () { - | this.attr({fill: "#f00"}); - | }; - | Raphael.st.red = function () { - | this.forEach(function (el) { - | el.red(); - | }); - | }; - | // then use it - | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red(); - \*/ - R.st = setproto; - - eve.on("raphael.DOMload", function () { - loaded = true; - }); - - // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html - (function (doc, loaded, f) { - if (doc.readyState == null && doc.addEventListener){ - doc.addEventListener(loaded, f = function () { - doc.removeEventListener(loaded, f, false); - doc.readyState = "complete"; - }, false); - doc.readyState = "loading"; - } - function isLoaded() { - (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload"); - } - isLoaded(); - })(document, "DOMContentLoaded"); - - return R; -})); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ SVG Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.svg", ["raphael.core"], function(raphael) { - return factory(raphael); - }); - } else if (typeof exports === "object") { - factory(require("raphael.core")); - } else { - factory(glob.Raphael); - } -}(this, function(R) { - if (R && !R.svg) { - return; - } - - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - toInt = parseInt, - math = Math, - mmax = math.max, - abs = math.abs, - pow = math.pow, - separator = /[, ]+/, - eve = R.eve, - E = "", - S = " "; - var xlink = "http://www.w3.org/1999/xlink", - markers = { - block: "M5,0 0,2.5 5,5z", - classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", - diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", - open: "M6,1 1,3.5 6,6", - oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" - }, - markerCounter = {}; - R.toString = function () { - return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; - }; - var $ = function (el, attr) { - if (attr) { - if (typeof el == "string") { - el = $(el); - } - for (var key in attr) if (attr[has](key)) { - if (key.substring(0, 6) == "xlink:") { - el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); - } else { - el.setAttribute(key, Str(attr[key])); - } - } - } else { - el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); - el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); - } - return el; - }, - addGradientFill = function (element, gradient) { - var type = "linear", - id = element.id + gradient, - fx = .5, fy = .5, - o = element.node, - SVG = element.paper, - s = o.style, - el = R._g.doc.getElementById(id); - if (!el) { - gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { - type = "radial"; - if (_fx && _fy) { - fx = toFloat(_fx); - fy = toFloat(_fy); - var dir = ((fy > .5) * 2 - 1); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && - (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && - fy != .5 && - (fy = fy.toFixed(5) - 1e-5 * dir); - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], - max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); - vector[2] *= max; - vector[3] *= max; - if (vector[2] < 0) { - vector[0] = -vector[2]; - vector[2] = 0; - } - if (vector[3] < 0) { - vector[1] = -vector[3]; - vector[3] = 0; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - id = id.replace(/[\(\)\s,\xb0#]/g, "_"); - - if (element.gradient && id != element.gradient.id) { - SVG.defs.removeChild(element.gradient); - delete element.gradient; - } - - if (!element.gradient) { - el = $(type + "Gradient", {id: id}); - element.gradient = el; - $(el, type == "radial" ? { - fx: fx, - fy: fy - } : { - x1: vector[0], - y1: vector[1], - x2: vector[2], - y2: vector[3], - gradientTransform: element.matrix.invert() - }); - SVG.defs.appendChild(el); - for (var i = 0, ii = dots.length; i < ii; i++) { - el.appendChild($("stop", { - offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", - "stop-color": dots[i].color || "#fff", - "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1 - })); - } - } - } - $(o, { - fill: "url('" + document.location.origin + document.location.pathname + "#" + id + "')", - opacity: 1, - "fill-opacity": 1 - }); - s.fill = E; - s.opacity = 1; - s.fillOpacity = 1; - return 1; - }, - updatePosition = function (o) { - var bbox = o.getBBox(1); - $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); - }, - addArrow = function (o, value, isEnd) { - if (o.type == "path") { - var values = Str(value).toLowerCase().split("-"), - p = o.paper, - se = isEnd ? "end" : "start", - node = o.node, - attrs = o.attrs, - stroke = attrs["stroke-width"], - i = values.length, - type = "classic", - from, - to, - dx, - refX, - attr, - w = 3, - h = 3, - t = 5; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": h = 5; break; - case "narrow": h = 2; break; - case "long": w = 5; break; - case "short": w = 2; break; - } - } - if (type == "open") { - w += 2; - h += 2; - t += 2; - dx = 1; - refX = isEnd ? 4 : 1; - attr = { - fill: "none", - stroke: attrs.stroke - }; - } else { - refX = dx = w / 2; - attr = { - fill: attrs.stroke, - stroke: "none" - }; - } - if (o._.arrows) { - if (isEnd) { - o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; - o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; - } else { - o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; - o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; - } - } else { - o._.arrows = {}; - } - if (type != "none") { - var pathId = "raphael-marker-" + type, - markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id; - if (!R._g.doc.getElementById(pathId)) { - p.defs.appendChild($($("path"), { - "stroke-linecap": "round", - d: markers[type], - id: pathId - })); - markerCounter[pathId] = 1; - } else { - markerCounter[pathId]++; - } - var marker = R._g.doc.getElementById(markerId), - use; - if (!marker) { - marker = $($("marker"), { - id: markerId, - markerHeight: h, - markerWidth: w, - orient: "auto", - refX: refX, - refY: h / 2 - }); - use = $($("use"), { - "xlink:href": "#" + pathId, - transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")", - "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4) - }); - marker.appendChild(use); - p.defs.appendChild(marker); - markerCounter[markerId] = 1; - } else { - markerCounter[markerId]++; - use = marker.getElementsByTagName("use")[0]; - } - $(use, attr); - var delta = dx * (type != "diamond" && type != "oval"); - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - delta * stroke; - } else { - from = delta * stroke; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - attr = {}; - attr["marker-" + se] = "url(#" + markerId + ")"; - if (to || from) { - attr.d = R.getSubpath(attrs.path, from, to); - } - $(node, attr); - o._.arrows[se + "Path"] = pathId; - o._.arrows[se + "Marker"] = markerId; - o._.arrows[se + "dx"] = delta; - o._.arrows[se + "Type"] = type; - o._.arrows[se + "String"] = value; - } else { - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - from; - } else { - from = 0; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)}); - delete o._.arrows[se + "Path"]; - delete o._.arrows[se + "Marker"]; - delete o._.arrows[se + "dx"]; - delete o._.arrows[se + "Type"]; - delete o._.arrows[se + "String"]; - } - for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { - var item = R._g.doc.getElementById(attr); - item && item.parentNode.removeChild(item); - } - } - }, - dasharray = { - "-": [3, 1], - ".": [1, 1], - "-.": [3, 1, 1, 1], - "-..": [3, 1, 1, 1, 1, 1], - ". ": [1, 3], - "- ": [4, 3], - "--": [8, 3], - "- .": [4, 3, 1, 3], - "--.": [8, 3, 1, 3], - "--..": [8, 3, 1, 3, 1, 3] - }, - addDashes = function (o, value, params) { - value = dasharray[Str(value).toLowerCase()]; - if (value) { - var width = o.attrs["stroke-width"] || "1", - butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, - dashes = [], - i = value.length; - while (i--) { - dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; - } - $(o.node, {"stroke-dasharray": dashes.join(",")}); - } - else { - $(o.node, {"stroke-dasharray": "none"}); - } - }, - setFillAndStroke = function (o, params) { - var node = o.node, - attrs = o.attrs, - vis = node.style.visibility; - node.style.visibility = "hidden"; - for (var att in params) { - if (params[has](att)) { - if (!R._availableAttrs[has](att)) { - continue; - } - var value = params[att]; - attrs[att] = value; - switch (att) { - case "blur": - o.blur(value); - break; - case "title": - var title = node.getElementsByTagName("title"); - - // Use the existing . - if (title.length && (title = title[0])) { - title.firstChild.nodeValue = value; - } else { - title = $("title"); - var val = R._g.doc.createTextNode(value); - title.appendChild(val); - node.appendChild(title); - } - break; - case "href": - case "target": - var pn = node.parentNode; - if (pn.tagName.toLowerCase() != "a") { - var hl = $("a"); - pn.insertBefore(hl, node); - hl.appendChild(node); - pn = hl; - } - if (att == "target") { - pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value); - } else { - pn.setAttributeNS(xlink, att, value); - } - break; - case "cursor": - node.style.cursor = value; - break; - case "transform": - o.transform(value); - break; - case "arrow-start": - addArrow(o, value); - break; - case "arrow-end": - addArrow(o, value, 1); - break; - case "clip-rect": - var rect = Str(value).split(separator); - if (rect.length == 4) { - o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); - var el = $("clipPath"), - rc = $("rect"); - el.id = R.createUUID(); - $(rc, { - x: rect[0], - y: rect[1], - width: rect[2], - height: rect[3] - }); - el.appendChild(rc); - o.paper.defs.appendChild(el); - $(node, {"clip-path": "url(#" + el.id + ")"}); - o.clip = rc; - } - if (!value) { - var path = node.getAttribute("clip-path"); - if (path) { - var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E)); - clip && clip.parentNode.removeChild(clip); - $(node, {"clip-path": E}); - delete o.clip; - } - } - break; - case "path": - if (o.type == "path") { - $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); - o._.dirty = 1; - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - } - break; - case "width": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fx) { - att = "x"; - value = attrs.x; - } else { - break; - } - case "x": - if (attrs.fx) { - value = -attrs.x - (attrs.width || 0); - } - case "rx": - if (att == "rx" && o.type == "rect") { - break; - } - case "cx": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "height": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fy) { - att = "y"; - value = attrs.y; - } else { - break; - } - case "y": - if (attrs.fy) { - value = -attrs.y - (attrs.height || 0); - } - case "ry": - if (att == "ry" && o.type == "rect") { - break; - } - case "cy": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "r": - if (o.type == "rect") { - $(node, {rx: value, ry: value}); - } else { - node.setAttribute(att, value); - } - o._.dirty = 1; - break; - case "src": - if (o.type == "image") { - node.setAttributeNS(xlink, "href", value); - } - break; - case "stroke-width": - if (o._.sx != 1 || o._.sy != 1) { - value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; - } - node.setAttribute(att, value); - if (attrs["stroke-dasharray"]) { - addDashes(o, attrs["stroke-dasharray"], params); - } - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "stroke-dasharray": - addDashes(o, value, params); - break; - case "fill": - var isURL = Str(value).match(R._ISURL); - if (isURL) { - el = $("pattern"); - var ig = $("image"); - el.id = R.createUUID(); - $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); - $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); - el.appendChild(ig); - - (function (el) { - R._preload(isURL[1], function () { - var w = this.offsetWidth, - h = this.offsetHeight; - $(el, {width: w, height: h}); - $(ig, {width: w, height: h}); - }); - })(el); - o.paper.defs.appendChild(el); - $(node, {fill: "url(#" + el.id + ")"}); - o.pattern = el; - o.pattern && updatePosition(o); - break; - } - var clr = R.getRGB(value); - if (!clr.error) { - delete params.gradient; - delete attrs.gradient; - !R.is(attrs.opacity, "undefined") && - R.is(params.opacity, "undefined") && - $(node, {opacity: attrs.opacity}); - !R.is(attrs["fill-opacity"], "undefined") && - R.is(params["fill-opacity"], "undefined") && - $(node, {"fill-opacity": attrs["fill-opacity"]}); - } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { - if ("opacity" in attrs || "fill-opacity" in attrs) { - var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - var stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); - } - } - attrs.gradient = value; - attrs.fill = "none"; - break; - } - clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - case "stroke": - clr = R.getRGB(value); - node.setAttribute(att, clr.hex); - att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - if (att == "stroke" && o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "gradient": - (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); - break; - case "opacity": - if (attrs.gradient && !attrs[has]("stroke-opacity")) { - $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); - } - // fall - case "fill-opacity": - if (attrs.gradient) { - gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": value}); - } - break; - } - default: - att == "font-size" && (value = toInt(value, 10) + "px"); - var cssrule = att.replace(/(\-.)/g, function (w) { - return w.substring(1).toUpperCase(); - }); - node.style[cssrule] = value; - o._.dirty = 1; - node.setAttribute(att, value); - break; - } - } - } - - tuneText(o, params); - node.style.visibility = vis; - }, - leading = 1.2, - tuneText = function (el, params) { - if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { - return; - } - var a = el.attrs, - node = el.node, - fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; - - if (params[has]("text")) { - a.text = params.text; - while (node.firstChild) { - node.removeChild(node.firstChild); - } - var texts = Str(params.text).split("\n"), - tspans = [], - tspan; - for (var i = 0, ii = texts.length; i < ii; i++) { - tspan = $("tspan"); - i && $(tspan, {dy: fontSize * leading, x: a.x}); - tspan.appendChild(R._g.doc.createTextNode(texts[i])); - node.appendChild(tspan); - tspans[i] = tspan; - } - } else { - tspans = node.getElementsByTagName("tspan"); - for (i = 0, ii = tspans.length; i < ii; i++) if (i) { - $(tspans[i], {dy: fontSize * leading, x: a.x}); - } else { - $(tspans[0], {dy: 0}); - } - } - $(node, {x: a.x, y: a.y}); - el._.dirty = 1; - var bb = el._getBBox(), - dif = a.y - (bb.y + bb.height / 2); - dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); - }, - getRealNode = function (node) { - if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") { - return node.parentNode; - } else { - return node; - } - }, - Element = function (node, svg) { - var X = 0, - Y = 0; - /*\ - * Element.node - [ property (object) ] - ** - * Gives you a reference to the DOM object, so you can assign event handlers or just mess around. - ** - * Note: Don’t mess with it. - > Usage - | // draw a circle at coordinate 10,10 with radius of 10 - | var c = paper.circle(10, 10, 10); - | c.node.onclick = function () { - | c.attr("fill", "red"); - | }; - \*/ - this[0] = this.node = node; - /*\ - * Element.raphael - [ property (object) ] - ** - * Internal reference to @Raphael object. In case it is not available. - > Usage - | Raphael.el.red = function () { - | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill")); - | hsb.h = 1; - | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex}); - | } - \*/ - node.raphael = true; - /*\ - * Element.id - [ property (number) ] - ** - * Unique id of the element. Especially useful when you want to listen to events of the element, - * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method. - \*/ - this.id = R._oid++; - node.raphaelid = this.id; - this.matrix = R.matrix(); - this.realPath = null; - /*\ - * Element.paper - [ property (object) ] - ** - * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions. - > Usage - | Raphael.el.cross = function () { - | this.attr({fill: "red"}); - | this.paper.path("M10,10L50,50M50,10L10,50") - | .attr({stroke: "red"}); - | } - \*/ - this.paper = svg; - this.attrs = this.attrs || {}; - this._ = { - transform: [], - sx: 1, - sy: 1, - deg: 0, - dx: 0, - dy: 0, - dirty: 1 - }; - !svg.bottom && (svg.bottom = this); - /*\ - * Element.prev - [ property (object) ] - ** - * Reference to the previous element in the hierarchy. - \*/ - this.prev = svg.top; - svg.top && (svg.top.next = this); - svg.top = this; - /*\ - * Element.next - [ property (object) ] - ** - * Reference to the next element in the hierarchy. - \*/ - this.next = null; - }, - elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - - R._engine.path = function (pathString, SVG) { - var el = $("path"); - SVG.canvas && SVG.canvas.appendChild(el); - var p = new Element(el, SVG); - p.type = "path"; - setFillAndStroke(p, { - fill: "none", - stroke: "#000", - path: pathString - }); - return p; - }; - /*\ - * Element.rotate - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds rotation by given angle around given point to the list of - * transformations of the element. - > Parameters - - deg (number) angle in degrees - - cx (number) #optional x coordinate of the centre of rotation - - cy (number) #optional y coordinate of the centre of rotation - * If cx & cy aren’t specified centre of the shape is used as a point of rotation. - = (object) @Element - \*/ - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - /*\ - * Element.scale - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds scale by given amount relative to given point to the list of - * transformations of the element. - > Parameters - - sx (number) horisontal scale amount - - sy (number) vertical scale amount - - cx (number) #optional x coordinate of the centre of scale - - cy (number) #optional y coordinate of the centre of scale - * If cx & cy aren’t specified centre of the shape is used instead. - = (object) @Element - \*/ - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - return this; - }; - /*\ - * Element.translate - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds translation by given amount to the list of transformations of the element. - > Parameters - - dx (number) horisontal shift - - dy (number) vertical shift - = (object) @Element - \*/ - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - /*\ - * Element.transform - [ method ] - ** - * Adds transformation to the element which is separate to other attributes, - * i.e. translation doesn’t change `x` or `y` of the rectange. The format - * of transformation string is similar to the path string syntax: - | "t100,100r30,100,100s2,2,100,100r45s1.5" - * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for - * scale and `m` is for matrix. - * - * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`. - * - * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100; - * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin - * coordinates as optional parameters, the default is the centre point of the element. - * Matrix accepts six parameters. - > Usage - | var el = paper.rect(10, 20, 300, 200); - | // translate 100, 100, rotate 45°, translate -100, 0 - | el.transform("t100,100r45t-100,0"); - | // if you want you can append or prepend transformations - | el.transform("...t50,50"); - | el.transform("s2..."); - | // or even wrap - | el.transform("t50,50...t-50-50"); - | // to reset transformation call method with empty string - | el.transform(""); - | // to get current value call it without parameters - | console.log(el.transform()); - > Parameters - - tstr (string) #optional transformation string - * If tstr isn’t specified - = (string) current transformation string - * else - = (object) @Element - \*/ - elproto.transform = function (tstr) { - var _ = this._; - if (tstr == null) { - return _.transform; - } - R._extractTransform(this, tstr); - - this.clip && $(this.clip, {transform: this.matrix.invert()}); - this.pattern && updatePosition(this); - this.node && $(this.node, {transform: this.matrix}); - - if (_.sx != 1 || _.sy != 1) { - var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; - this.attr({"stroke-width": sw}); - } - - return this; - }; - /*\ - * Element.hide - [ method ] - ** - * Makes element invisible. See @Element.show. - = (object) @Element - \*/ - elproto.hide = function () { - if(!this.removed) this.node.style.display = "none"; - return this; - }; - /*\ - * Element.show - [ method ] - ** - * Makes element visible. See @Element.hide. - = (object) @Element - \*/ - elproto.show = function () { - if(!this.removed) this.node.style.display = ""; - return this; - }; - /*\ - * Element.remove - [ method ] - ** - * Removes element from the paper. - \*/ - elproto.remove = function () { - var node = getRealNode(this.node); - if (this.removed || !node.parentNode) { - return; - } - var paper = this.paper; - paper.__set__ && paper.__set__.exclude(this); - eve.unbind("raphael.*.*." + this.id); - if (this.gradient) { - paper.defs.removeChild(this.gradient); - } - R._tear(this, paper); - - node.parentNode.removeChild(node); - - // Remove custom data for element - this.removeData(); - - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - this.removed = true; - }; - elproto._getBBox = function () { - if (this.node.style.display == "none") { - this.show(); - var hide = true; - } - var canvasHidden = false, - containerStyle; - if (this.paper.canvas.parentElement) { - containerStyle = this.paper.canvas.parentElement.style; - } //IE10+ can't find parentElement - else if (this.paper.canvas.parentNode) { - containerStyle = this.paper.canvas.parentNode.style; - } - - if(containerStyle && containerStyle.display == "none") { - canvasHidden = true; - containerStyle.display = ""; - } - var bbox = {}; - try { - bbox = this.node.getBBox(); - } catch(e) { - // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix - bbox = { - x: this.node.clientLeft, - y: this.node.clientTop, - width: this.node.clientWidth, - height: this.node.clientHeight - } - } finally { - bbox = bbox || {}; - if(canvasHidden){ - containerStyle.display = "none"; - } - } - hide && this.hide(); - return bbox; - }; - /*\ - * Element.attr - [ method ] - ** - * Sets the attributes of the element. - > Parameters - - attrName (string) attribute’s name - - value (string) value - * or - - params (object) object of name/value pairs - * or - - attrName (string) attribute’s name - * or - - attrNames (array) in this case method returns array of current values for given attribute names - = (object) @Element if attrsName & value or params are passed in. - = (...) value of the attribute if only attrsName is passed in. - = (array) array of values of the attribute if attrsNames is passed in. - = (object) object of attributes if nothing is passed in. - > Possible parameters - # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p> - o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`. - o clip-rect (string) comma or space separated values: x, y, width and height - o cursor (string) CSS type of the cursor - o cx (number) the x-axis coordinate of the center of the circle, or ellipse - o cy (number) the y-axis coordinate of the center of the circle, or ellipse - o fill (string) colour, gradient or image - o fill-opacity (number) - o font (string) - o font-family (string) - o font-size (number) font size in pixels - o font-weight (string) - o height (number) - o href (string) URL, if specified element behaves as hyperlink - o opacity (number) - o path (string) SVG path string format - o r (number) radius of the circle, ellipse or rounded corner on the rect - o rx (number) horisontal radius of the ellipse - o ry (number) vertical radius of the ellipse - o src (string) image URL, only works for @Element.image element - o stroke (string) stroke colour - o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”] - o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”] - o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”] - o stroke-miterlimit (number) - o stroke-opacity (number) - o stroke-width (number) stroke width in pixels, default is '1' - o target (string) used with href - o text (string) contents of the text element. Use `\n` for multiline text - o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`” - o title (string) will create tooltip with a given text - o transform (string) see @Element.transform - o width (number) - o x (number) - o y (number) - > Gradients - * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90° - * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black. - * - * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” – - * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point - * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses. - > Path String - # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p> - > Colour Parsing - # <ul> - # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> - # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> - # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> - # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> - # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> - # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li> - # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li> - # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> - # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> - # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li> - # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li> - # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li> - # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li> - # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li> - # </ul> - \*/ - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - if (name == "transform") { - return this._.transform; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - if (value != null) { - var params = {}; - params[name] = value; - } else if (name != null && R.is(name, "object")) { - params = name; - } - for (var key in params) { - eve("raphael.attr." + key + "." + this.id, this, params[key]); - } - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - setFillAndStroke(this, params); - return this; - }; - /*\ - * Element.toFront - [ method ] - ** - * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. - = (object) @Element - \*/ - elproto.toFront = function () { - if (this.removed) { - return this; - } - var node = getRealNode(this.node); - node.parentNode.appendChild(node); - var svg = this.paper; - svg.top != this && R._tofront(this, svg); - return this; - }; - /*\ - * Element.toBack - [ method ] - ** - * Moves the element so it is the furthest from the viewer’s eyes, behind other elements. - = (object) @Element - \*/ - elproto.toBack = function () { - if (this.removed) { - return this; - } - var node = getRealNode(this.node); - var parentNode = node.parentNode; - parentNode.insertBefore(node, parentNode.firstChild); - R._toback(this, this.paper); - var svg = this.paper; - return this; - }; - /*\ - * Element.insertAfter - [ method ] - ** - * Inserts current object after the given one. - = (object) @Element - \*/ - elproto.insertAfter = function (element) { - if (this.removed || !element) { - return this; - } - - var node = getRealNode(this.node); - var afterNode = getRealNode(element.node || element[element.length - 1].node); - if (afterNode.nextSibling) { - afterNode.parentNode.insertBefore(node, afterNode.nextSibling); - } else { - afterNode.parentNode.appendChild(node); - } - R._insertafter(this, element, this.paper); - return this; - }; - /*\ - * Element.insertBefore - [ method ] - ** - * Inserts current object before the given one. - = (object) @Element - \*/ - elproto.insertBefore = function (element) { - if (this.removed || !element) { - return this; - } - - var node = getRealNode(this.node); - var beforeNode = getRealNode(element.node || element[0].node); - beforeNode.parentNode.insertBefore(node, beforeNode); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - // Experimental. No Safari support. Use it on your own risk. - var t = this; - if (+size !== 0) { - var fltr = $("filter"), - blur = $("feGaussianBlur"); - t.attrs.blur = size; - fltr.id = R.createUUID(); - $(blur, {stdDeviation: +size || 1.5}); - fltr.appendChild(blur); - t.paper.defs.appendChild(fltr); - t._blur = fltr; - $(t.node, {filter: "url(#" + fltr.id + ")"}); - } else { - if (t._blur) { - t._blur.parentNode.removeChild(t._blur); - delete t._blur; - delete t.attrs.blur; - } - t.node.removeAttribute("filter"); - } - return t; - }; - R._engine.circle = function (svg, x, y, r) { - var el = $("circle"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; - res.type = "circle"; - $(el, res.attrs); - return res; - }; - R._engine.rect = function (svg, x, y, w, h, r) { - var el = $("rect"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; - res.type = "rect"; - $(el, res.attrs); - return res; - }; - R._engine.ellipse = function (svg, x, y, rx, ry) { - var el = $("ellipse"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; - res.type = "ellipse"; - $(el, res.attrs); - return res; - }; - R._engine.image = function (svg, src, x, y, w, h) { - var el = $("image"); - $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); - el.setAttributeNS(xlink, "href", src); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, src: src}; - res.type = "image"; - return res; - }; - R._engine.text = function (svg, x, y, text) { - var el = $("text"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = { - x: x, - y: y, - "text-anchor": "middle", - text: text, - "font-family": R._availableAttrs["font-family"], - "font-size": R._availableAttrs["font-size"], - stroke: "none", - fill: "#000" - }; - res.type = "text"; - setFillAndStroke(res, res.attrs); - return res; - }; - R._engine.setSize = function (width, height) { - this.width = width || this.width; - this.height = height || this.height; - this.canvas.setAttribute("width", this.width); - this.canvas.setAttribute("height", this.height); - if (this._viewBox) { - this.setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con && con.container, - x = con.x, - y = con.y, - width = con.width, - height = con.height; - if (!container) { - throw new Error("SVG container not found."); - } - var cnvs = $("svg"), - css = "overflow:hidden;", - isFloating; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - $(cnvs, { - height: height, - version: 1.1, - width: width, - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink" - }); - if (container == 1) { - cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; - R._g.doc.body.appendChild(cnvs); - isFloating = 1; - } else { - cnvs.style.cssText = css + "position:relative"; - if (container.firstChild) { - container.insertBefore(cnvs, container.firstChild); - } else { - container.appendChild(cnvs); - } - } - container = new R._Paper; - container.width = width; - container.height = height; - container.canvas = cnvs; - container.clear(); - container._left = container._top = 0; - isFloating && (container.renderfix = function () {}); - container.renderfix(); - return container; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var paperSize = this.getSize(), - size = mmax(w / paperSize.width, h / paperSize.height), - top = this.top, - aspectRatio = fit ? "xMidYMid meet" : "xMinYMin", - vb, - sw; - if (x == null) { - if (this._vbSize) { - size = 1; - } - delete this._vbSize; - vb = "0 0 " + this.width + S + this.height; - } else { - this._vbSize = size; - vb = x + S + y + S + w + S + h; - } - $(this.canvas, { - viewBox: vb, - preserveAspectRatio: aspectRatio - }); - while (size && top) { - sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; - top.attr({"stroke-width": sw}); - top._.dirty = 1; - top._.dirtyT = 1; - top = top.prev; - } - this._viewBox = [x, y, w, h, !!fit]; - return this; - }; - /*\ - * Paper.renderfix - [ method ] - ** - * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant - * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness. - * This method fixes the issue. - ** - Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method. - \*/ - R.prototype.renderfix = function () { - var cnvs = this.canvas, - s = cnvs.style, - pos; - try { - pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(); - } catch (e) { - pos = cnvs.createSVGMatrix(); - } - var left = -pos.e % 1, - top = -pos.f % 1; - if (left || top) { - if (left) { - this._left = (this._left + left) % 1; - s.left = this._left + "px"; - } - if (top) { - this._top = (this._top + top) % 1; - s.top = this._top + "px"; - } - } - }; - /*\ - * Paper.clear - [ method ] - ** - * Clears the paper, i.e. removes all the elements. - \*/ - R.prototype.clear = function () { - R.eve("raphael.clear", this); - var c = this.canvas; - while (c.firstChild) { - c.removeChild(c.firstChild); - } - this.bottom = this.top = null; - (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); - c.appendChild(this.desc); - c.appendChild(this.defs = $("defs")); - }; - /*\ - * Paper.remove - [ method ] - ** - * Removes the paper from the DOM. - \*/ - R.prototype.remove = function () { - eve("raphael.remove", this); - this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - }; - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -})); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ VML Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.vml", ["raphael.core"], function(raphael) { - return factory(raphael); - }); - } else if (typeof exports === "object") { - factory(require("raphael")); - } else { - factory(glob.Raphael); - } -}(this, function(R) { - if (R && !R.vml) { - return; - } - - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - math = Math, - round = math.round, - mmax = math.max, - mmin = math.min, - abs = math.abs, - fillString = "fill", - separator = /[, ]+/, - eve = R.eve, - ms = " progid:DXImageTransform.Microsoft", - S = " ", - E = "", - map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, - bites = /([clmz]),?([^clmz]*)/gi, - blurregexp = / progid:\S+Blur\([^\)]+\)/g, - val = /-?[^,\s-]+/g, - cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)", - zoom = 21600, - pathTypes = {path: 1, rect: 1, image: 1}, - ovalTypes = {circle: 1, ellipse: 1}, - path2vml = function (path) { - var total = /[ahqstv]/ig, - command = R._pathToAbsolute; - Str(path).match(total) && (command = R._path2curve); - total = /[clmz]/g; - if (command == R._pathToAbsolute && !Str(path).match(total)) { - var res = Str(path).replace(bites, function (all, command, args) { - var vals = [], - isMove = command.toLowerCase() == "m", - res = map[command]; - args.replace(val, function (value) { - if (isMove && vals.length == 2) { - res += vals + map[command == "m" ? "l" : "L"]; - vals = []; - } - vals.push(round(value * zoom)); - }); - return res + vals; - }); - return res; - } - var pa = command(path), p, r; - res = []; - for (var i = 0, ii = pa.length; i < ii; i++) { - p = pa[i]; - r = pa[i][0].toLowerCase(); - r == "z" && (r = "x"); - for (var j = 1, jj = p.length; j < jj; j++) { - r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); - } - res.push(r); - } - return res.join(S); - }, - compensation = function (deg, dx, dy) { - var m = R.matrix(); - m.rotate(-deg, .5, .5); - return { - dx: m.x(dx, dy), - dy: m.y(dx, dy) - }; - }, - setCoords = function (p, sx, sy, dx, dy, deg) { - var _ = p._, - m = p.matrix, - fillpos = _.fillpos, - o = p.node, - s = o.style, - y = 1, - flip = "", - dxdy, - kx = zoom / sx, - ky = zoom / sy; - s.visibility = "hidden"; - if (!sx || !sy) { - return; - } - o.coordsize = abs(kx) + S + abs(ky); - s.rotation = deg * (sx * sy < 0 ? -1 : 1); - if (deg) { - var c = compensation(deg, dx, dy); - dx = c.dx; - dy = c.dy; - } - sx < 0 && (flip += "x"); - sy < 0 && (flip += " y") && (y = -1); - s.flip = flip; - o.coordorigin = (dx * -kx) + S + (dy * -ky); - if (fillpos || _.fillsize) { - var fill = o.getElementsByTagName(fillString); - fill = fill && fill[0]; - o.removeChild(fill); - if (fillpos) { - c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); - fill.position = c.dx * y + S + c.dy * y; - } - if (_.fillsize) { - fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); - } - o.appendChild(fill); - } - s.visibility = "visible"; - }; - R.toString = function () { - return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; - }; - var addArrow = function (o, value, isEnd) { - var values = Str(value).toLowerCase().split("-"), - se = isEnd ? "end" : "start", - i = values.length, - type = "classic", - w = "medium", - h = "medium"; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": - case "narrow": h = values[i]; break; - case "long": - case "short": w = values[i]; break; - } - } - var stroke = o.node.getElementsByTagName("stroke")[0]; - stroke[se + "arrow"] = type; - stroke[se + "arrowlength"] = w; - stroke[se + "arrowwidth"] = h; - }, - setFillAndStroke = function (o, params) { - // o.paper.canvas.style.display = "none"; - o.attrs = o.attrs || {}; - var node = o.node, - a = o.attrs, - s = node.style, - xy, - newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), - isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), - res = o; - - - for (var par in params) if (params[has](par)) { - a[par] = params[par]; - } - if (newpath) { - a.path = R._getPath[o.type](o); - o._.dirty = 1; - } - params.href && (node.href = params.href); - params.title && (node.title = params.title); - params.target && (node.target = params.target); - params.cursor && (s.cursor = params.cursor); - "blur" in params && o.blur(params.blur); - if (params.path && o.type == "path" || newpath) { - node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); - o._.dirty = 1; - if (o.type == "image") { - o._.fillpos = [a.x, a.y]; - o._.fillsize = [a.width, a.height]; - setCoords(o, 1, 1, 0, 0, 0); - } - } - "transform" in params && o.transform(params.transform); - if (isOval) { - var cx = +a.cx, - cy = +a.cy, - rx = +a.rx || +a.r || 0, - ry = +a.ry || +a.r || 0; - node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); - o._.dirty = 1; - } - if ("clip-rect" in params) { - var rect = Str(params["clip-rect"]).split(separator); - if (rect.length == 4) { - rect[2] = +rect[2] + (+rect[0]); - rect[3] = +rect[3] + (+rect[1]); - var div = node.clipRect || R._g.doc.createElement("div"), - dstyle = div.style; - dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); - if (!node.clipRect) { - dstyle.position = "absolute"; - dstyle.top = 0; - dstyle.left = 0; - dstyle.width = o.paper.width + "px"; - dstyle.height = o.paper.height + "px"; - node.parentNode.insertBefore(div, node); - div.appendChild(node); - node.clipRect = div; - } - } - if (!params["clip-rect"]) { - node.clipRect && (node.clipRect.style.clip = "auto"); - } - } - if (o.textpath) { - var textpathStyle = o.textpath.style; - params.font && (textpathStyle.font = params.font); - params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); - params["font-size"] && (textpathStyle.fontSize = params["font-size"]); - params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); - params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); - } - if ("arrow-start" in params) { - addArrow(res, params["arrow-start"]); - } - if ("arrow-end" in params) { - addArrow(res, params["arrow-end"], 1); - } - if (params.opacity != null || - params["stroke-width"] != null || - params.fill != null || - params.src != null || - params.stroke != null || - params["stroke-width"] != null || - params["stroke-opacity"] != null || - params["fill-opacity"] != null || - params["stroke-dasharray"] != null || - params["stroke-miterlimit"] != null || - params["stroke-linejoin"] != null || - params["stroke-linecap"] != null) { - var fill = node.getElementsByTagName(fillString), - newfill = false; - fill = fill && fill[0]; - !fill && (newfill = fill = createNode(fillString)); - if (o.type == "image" && params.src) { - fill.src = params.src; - } - params.fill && (fill.on = true); - if (fill.on == null || params.fill == "none" || params.fill === null) { - fill.on = false; - } - if (fill.on && params.fill) { - var isURL = Str(params.fill).match(R._ISURL); - if (isURL) { - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = isURL[1]; - fill.type = "tile"; - var bbox = o.getBBox(1); - fill.position = bbox.x + S + bbox.y; - o._.fillpos = [bbox.x, bbox.y]; - - R._preload(isURL[1], function () { - o._.fillsize = [this.offsetWidth, this.offsetHeight]; - }); - } else { - fill.color = R.getRGB(params.fill).hex; - fill.src = E; - fill.type = "solid"; - if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { - a.fill = "none"; - a.gradient = params.fill; - fill.rotate = false; - } - } - } - if ("fill-opacity" in params || "opacity" in params) { - var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); - opacity = mmin(mmax(opacity, 0), 1); - fill.opacity = opacity; - if (fill.src) { - fill.color = "none"; - } - } - node.appendChild(fill); - var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), - newstroke = false; - !stroke && (newstroke = stroke = createNode("stroke")); - if ((params.stroke && params.stroke != "none") || - params["stroke-width"] || - params["stroke-opacity"] != null || - params["stroke-dasharray"] || - params["stroke-miterlimit"] || - params["stroke-linejoin"] || - params["stroke-linecap"]) { - stroke.on = true; - } - (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); - var strokeColor = R.getRGB(params.stroke); - stroke.on && params.stroke && (stroke.color = strokeColor.hex); - opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); - var width = (toFloat(params["stroke-width"]) || 1) * .75; - opacity = mmin(mmax(opacity, 0), 1); - params["stroke-width"] == null && (width = a["stroke-width"]); - params["stroke-width"] && (stroke.weight = width); - width && width < 1 && (opacity *= width) && (stroke.weight = 1); - stroke.opacity = opacity; - - params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); - stroke.miterlimit = params["stroke-miterlimit"] || 8; - params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); - if ("stroke-dasharray" in params) { - var dasharray = { - "-": "shortdash", - ".": "shortdot", - "-.": "shortdashdot", - "-..": "shortdashdotdot", - ". ": "dot", - "- ": "dash", - "--": "longdash", - "- .": "dashdot", - "--.": "longdashdot", - "--..": "longdashdotdot" - }; - stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; - } - newstroke && node.appendChild(stroke); - } - if (res.type == "text") { - res.paper.canvas.style.display = E; - var span = res.paper.span, - m = 100, - fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); - s = span.style; - a.font && (s.font = a.font); - a["font-family"] && (s.fontFamily = a["font-family"]); - a["font-weight"] && (s.fontWeight = a["font-weight"]); - a["font-style"] && (s.fontStyle = a["font-style"]); - fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10; - s.fontSize = fontSize * m + "px"; - res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); - var brect = span.getBoundingClientRect(); - res.W = a.w = (brect.right - brect.left) / m; - res.H = a.h = (brect.bottom - brect.top) / m; - // res.paper.canvas.style.display = "none"; - res.X = a.x; - res.Y = a.y + res.H / 2; - - ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); - var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; - for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { - res._.dirty = 1; - break; - } - - // text-anchor emulation - switch (a["text-anchor"]) { - case "start": - res.textpath.style["v-text-align"] = "left"; - res.bbx = res.W / 2; - break; - case "end": - res.textpath.style["v-text-align"] = "right"; - res.bbx = -res.W / 2; - break; - default: - res.textpath.style["v-text-align"] = "center"; - res.bbx = 0; - break; - } - res.textpath.style["v-text-kern"] = true; - } - // res.paper.canvas.style.display = E; - }, - addGradientFill = function (o, gradient, fill) { - o.attrs = o.attrs || {}; - var attrs = o.attrs, - pow = Math.pow, - opacity, - oindex, - type = "linear", - fxfy = ".5 .5"; - o.attrs.gradient = gradient; - gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { - type = "radial"; - if (fx && fy) { - fx = toFloat(fx); - fy = toFloat(fy); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); - fxfy = fx + S + fy; - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - o = o.shape || o.node; - if (dots.length) { - o.removeChild(fill); - fill.on = true; - fill.method = "none"; - fill.color = dots[0].color; - fill.color2 = dots[dots.length - 1].color; - var clrs = []; - for (var i = 0, ii = dots.length; i < ii; i++) { - dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); - } - fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; - if (type == "radial") { - fill.type = "gradientTitle"; - fill.focus = "100%"; - fill.focussize = "0 0"; - fill.focusposition = fxfy; - fill.angle = 0; - } else { - // fill.rotate= true; - fill.type = "gradient"; - fill.angle = (270 - angle) % 360; - } - o.appendChild(fill); - } - return 1; - }, - Element = function (node, vml) { - this[0] = this.node = node; - node.raphael = true; - this.id = R._oid++; - node.raphaelid = this.id; - this.X = 0; - this.Y = 0; - this.attrs = {}; - this.paper = vml; - this.matrix = R.matrix(); - this._ = { - transform: [], - sx: 1, - sy: 1, - dx: 0, - dy: 0, - deg: 0, - dirty: 1, - dirtyT: 1 - }; - !vml.bottom && (vml.bottom = this); - this.prev = vml.top; - vml.top && (vml.top.next = this); - vml.top = this; - this.next = null; - }; - var elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - elproto.transform = function (tstr) { - if (tstr == null) { - return this._.transform; - } - var vbs = this.paper._viewBoxShift, - vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, - oldt; - if (vbs) { - oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); - } - R._extractTransform(this, vbt + tstr); - var matrix = this.matrix.clone(), - skew = this.skew, - o = this.node, - split, - isGrad = ~Str(this.attrs.fill).indexOf("-"), - isPatt = !Str(this.attrs.fill).indexOf("url("); - matrix.translate(1, 1); - if (isPatt || isGrad || this.type == "image") { - skew.matrix = "1 0 0 1"; - skew.offset = "0 0"; - split = matrix.split(); - if ((isGrad && split.noRotation) || !split.isSimple) { - o.style.filter = matrix.toFilter(); - var bb = this.getBBox(), - bbt = this.getBBox(1), - dx = bb.x - bbt.x, - dy = bb.y - bbt.y; - o.coordorigin = (dx * -zoom) + S + (dy * -zoom); - setCoords(this, 1, 1, dx, dy, 0); - } else { - o.style.filter = E; - setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); - } - } else { - o.style.filter = E; - skew.matrix = Str(matrix); - skew.offset = matrix.offset(); - } - if (oldt !== null) { // empty string value is true as well - this._.transform = oldt; - R._extractTransform(this, oldt); - } - return this; - }; - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - if (deg == null) { - return; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this._.dirtyT = 1; - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - if (this._.bbox) { - this._.bbox.x += dx; - this._.bbox.y += dy; - } - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - isNaN(cx) && (cx = null); - isNaN(cy) && (cy = null); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - this._.dirtyT = 1; - return this; - }; - elproto.hide = function () { - !this.removed && (this.node.style.display = "none"); - return this; - }; - elproto.show = function () { - !this.removed && (this.node.style.display = E); - return this; - }; - // Needed to fix the vml setViewBox issues - elproto.auxGetBBox = R.el.getBBox; - elproto.getBBox = function(){ - var b = this.auxGetBBox(); - if (this.paper && this.paper._viewBoxShift) - { - var c = {}; - var z = 1/this.paper._viewBoxShift.scale; - c.x = b.x - this.paper._viewBoxShift.dx; - c.x *= z; - c.y = b.y - this.paper._viewBoxShift.dy; - c.y *= z; - c.width = b.width * z; - c.height = b.height * z; - c.x2 = c.x + c.width; - c.y2 = c.y + c.height; - return c; - } - return b; - }; - elproto._getBBox = function () { - if (this.removed) { - return {}; - } - return { - x: this.X + (this.bbx || 0) - this.W / 2, - y: this.Y - this.H, - width: this.W, - height: this.H - }; - }; - elproto.remove = function () { - if (this.removed || !this.node.parentNode) { - return; - } - this.paper.__set__ && this.paper.__set__.exclude(this); - R.eve.unbind("raphael.*.*." + this.id); - R._tear(this, this.paper); - this.node.parentNode.removeChild(this.node); - this.shape && this.shape.parentNode.removeChild(this.shape); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - this.removed = true; - }; - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (this.attrs && value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - var params; - if (value != null) { - params = {}; - params[name] = value; - } - value == null && R.is(name, "object") && (params = name); - for (var key in params) { - eve("raphael.attr." + key + "." + this.id, this, params[key]); - } - if (params) { - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - // this.paper.canvas.style.display = "none"; - if (params.text && this.type == "text") { - this.textpath.string = params.text; - } - setFillAndStroke(this, params); - // this.paper.canvas.style.display = E; - } - return this; - }; - elproto.toFront = function () { - !this.removed && this.node.parentNode.appendChild(this.node); - this.paper && this.paper.top != this && R._tofront(this, this.paper); - return this; - }; - elproto.toBack = function () { - if (this.removed) { - return this; - } - if (this.node.parentNode.firstChild != this.node) { - this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); - R._toback(this, this.paper); - } - return this; - }; - elproto.insertAfter = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[element.length - 1]; - } - if (element.node.nextSibling) { - element.node.parentNode.insertBefore(this.node, element.node.nextSibling); - } else { - element.node.parentNode.appendChild(this.node); - } - R._insertafter(this, element, this.paper); - return this; - }; - elproto.insertBefore = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[0]; - } - element.node.parentNode.insertBefore(this.node, element.node); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - var s = this.node.runtimeStyle, - f = s.filter; - f = f.replace(blurregexp, E); - if (+size !== 0) { - this.attrs.blur = size; - s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; - s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); - } else { - s.filter = f; - s.margin = 0; - delete this.attrs.blur; - } - return this; - }; - - R._engine.path = function (pathString, vml) { - var el = createNode("shape"); - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = vml.coordorigin; - var p = new Element(el, vml), - attr = {fill: "none", stroke: "#000"}; - pathString && (attr.path = pathString); - p.type = "path"; - p.path = []; - p.Path = E; - setFillAndStroke(p, attr); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.rect = function (vml, x, y, w, h, r) { - var path = R._rectPath(x, y, w, h, r), - res = vml.path(path), - a = res.attrs; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.r = r; - a.path = path; - res.type = "rect"; - return res; - }; - R._engine.ellipse = function (vml, x, y, rx, ry) { - var res = vml.path(), - a = res.attrs; - res.X = x - rx; - res.Y = y - ry; - res.W = rx * 2; - res.H = ry * 2; - res.type = "ellipse"; - setFillAndStroke(res, { - cx: x, - cy: y, - rx: rx, - ry: ry - }); - return res; - }; - R._engine.circle = function (vml, x, y, r) { - var res = vml.path(), - a = res.attrs; - res.X = x - r; - res.Y = y - r; - res.W = res.H = r * 2; - res.type = "circle"; - setFillAndStroke(res, { - cx: x, - cy: y, - r: r - }); - return res; - }; - R._engine.image = function (vml, src, x, y, w, h) { - var path = R._rectPath(x, y, w, h), - res = vml.path(path).attr({stroke: "none"}), - a = res.attrs, - node = res.node, - fill = node.getElementsByTagName(fillString)[0]; - a.src = src; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.path = path; - res.type = "image"; - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = src; - fill.type = "tile"; - res._.fillpos = [x, y]; - res._.fillsize = [w, h]; - node.appendChild(fill); - setCoords(res, 1, 1, 0, 0, 0); - return res; - }; - R._engine.text = function (vml, x, y, text) { - var el = createNode("shape"), - path = createNode("path"), - o = createNode("textpath"); - x = x || 0; - y = y || 0; - text = text || ""; - path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); - path.textpathok = true; - o.string = Str(text); - o.on = true; - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = "0 0"; - var p = new Element(el, vml), - attr = { - fill: "#000", - stroke: "none", - font: R._availableAttrs.font, - text: text - }; - p.shape = el; - p.path = path; - p.textpath = o; - p.type = "text"; - p.attrs.text = Str(text); - p.attrs.x = x; - p.attrs.y = y; - p.attrs.w = 1; - p.attrs.h = 1; - setFillAndStroke(p, attr); - el.appendChild(o); - el.appendChild(path); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.setSize = function (width, height) { - var cs = this.canvas.style; - this.width = width; - this.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - cs.width = width; - cs.height = height; - cs.clip = "rect(0 " + width + " " + height + " 0)"; - if (this._viewBox) { - R._engine.setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var paperSize = this.getSize(), - width = paperSize.width, - height = paperSize.height, - H, W; - if (fit) { - H = height / h; - W = width / w; - if (w * H < width) { - x -= (width - w * H) / 2 / H; - } - if (h * W < height) { - y -= (height - h * W) / 2 / W; - } - } - this._viewBox = [x, y, w, h, !!fit]; - this._viewBoxShift = { - dx: -x, - dy: -y, - scale: paperSize - }; - this.forEach(function (el) { - el.transform("..."); - }); - return this; - }; - var createNode; - R._engine.initWin = function (win) { - var doc = win.document; - if (doc.styleSheets.length < 31) { - doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); - } else { - // no more room, add to the existing one - // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx - doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)"); - } - try { - !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); - createNode = function (tagName) { - return doc.createElement('<rvml:' + tagName + ' class="rvml">'); - }; - } catch (e) { - createNode = function (tagName) { - return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); - }; - } - }; - R._engine.initWin(R._g.win); - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con.container, - height = con.height, - s, - width = con.width, - x = con.x, - y = con.y; - if (!container) { - throw new Error("VML container not found."); - } - var res = new R._Paper, - c = res.canvas = R._g.doc.createElement("div"), - cs = c.style; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - res.width = width; - res.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - res.coordsize = zoom * 1e3 + S + zoom * 1e3; - res.coordorigin = "0 0"; - res.span = R._g.doc.createElement("span"); - res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; - c.appendChild(res.span); - cs.cssText = R.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);", width, height); - if (container == 1) { - R._g.doc.body.appendChild(c); - cs.left = x + "px"; - cs.top = y + "px"; - cs.position = "absolute"; - } else { - if (container.firstChild) { - container.insertBefore(c, container.firstChild); - } else { - container.appendChild(c); - } - } - res.renderfix = function () {}; - return res; - }; - R.prototype.clear = function () { - R.eve("raphael.clear", this); - this.canvas.innerHTML = E; - this.span = R._g.doc.createElement("span"); - this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; - this.canvas.appendChild(this.span); - this.bottom = this.top = null; - }; - R.prototype.remove = function () { - R.eve("raphael.remove", this); - this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - return true; - }; - - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -})); - -// ┌────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ -// └────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) { - return factory(Raphael); - }); - } else if (typeof exports === "object") { - var raphael = require("raphael.core"); - - require("raphael.svg"); - require("raphael.vml"); - - module.exports = factory(raphael); - } else { - //glob.Raphael = factory(glob.Raphael); - } -}(this, function (Raphael) { - return Raphael.ninja(); -}));/** - * svg绘图 - * - * Created by GUY on 2015/12/3. - * @class BI.Svg - * @extends BI.Widget - */ -BI.Svg = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Svg.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-svg" - }) - }, - - _init: function () { - BI.Svg.superclass._init.apply(this, arguments); - this.paper = Raphael(this.element[0]); - - this.element.css("overflow", "hidden"); - $(this.paper.canvas).width("100%").height("100%").css({"left": "0", "top": "0"}).appendTo(this.element); - - this.top = this.paper.top; - this.bottom = this.paper.bottom; - this.customAttributes = this.paper.customAttributes; - this.ca = this.paper.ca; - this.raphael = this.paper.raphael; - }, - - add: function () { - return this.paper.add.apply(this.paper, arguments); - }, - - path: function () { - return this.paper.path.apply(this.paper, arguments); - }, - - image: function () { - return this.paper.image.apply(this.paper, arguments); - }, - - rect: function () { - return this.paper.rect.apply(this.paper, arguments); - }, - - circle: function () { - return this.paper.circle.apply(this.paper, arguments); - }, - - ellipse: function () { - return this.paper.ellipse.apply(this.paper, arguments); - }, - - text: function () { - return this.paper.text.apply(this.paper, arguments); - }, - - print: function () { - return this.paper.print.apply(this.paper, arguments); - }, - - - setStart: function () { - return this.paper.setStart.apply(this.paper, arguments); - }, - - setFinish: function () { - return this.paper.setFinish.apply(this.paper, arguments); - }, - - setSize: function () { - return this.paper.setSize.apply(this.paper, arguments); - }, - - setViewBox: function () { - return this.paper.setViewBox.apply(this.paper, arguments); - }, - - - getById: function () { - return this.paper.getById.apply(this.paper, arguments); - }, - - getElementByPoint: function () { - return this.paper.getElementByPoint.apply(this.paper, arguments); - }, - - getElementsByPoint: function () { - return this.paper.getElementsByPoint.apply(this.paper, arguments); - }, - - getFont: function () { - return this.paper.getFont.apply(this.paper, arguments); - }, - - - set: function () { - return this.paper.set.apply(this.paper, arguments); - }, - remove: function () { - return this.paper.remove.apply(this.paper, arguments); - }, - clear: function () { - return this.paper.clear.apply(this.paper, arguments); - } -}); -BI.shortcut("bi.svg", BI.Svg);/** - * - * 原生表格滚动条,为了IE8的兼容 - * - * Created by GUY on 2016/1/12. - * @class BI.NativeTableScrollbar - * @extends BI.Widget - */ -BI.NativeTableScrollbar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - defaultPosition: 0, - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - //把滚动台size改掉 - this.element.width(36); - - var throttle = BI.throttle(function () { - self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollTop()); - }, 150, {leading: false}); - this.element.scroll(function () { - throttle(); - }); - return { - type: "bi.default", - scrolly: true, - items: [{ - type: "bi.layout", - width: 1, - ref: function (_ref) { - self.inner = _ref; - } - }] - } - }, - - mounted: function () { - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - try { - this.element.scrollTop(o.position); - } catch (e) { - - } - this.inner.element.height(o.contentSize); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.setHeight(size); - this.options.size = size; - }, - - populate: function () { - this._populate(); - } -}); -BI.NativeTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.native_table_scrollbar", BI.NativeTableScrollbar); - - -BI.NativeTableHorizontalScrollbar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - //把滚动台size改掉 - this.element.height(36); - - var throttle = BI.throttle(function () { - self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollLeft()); - }, 150, {leading: false}); - this.element.scroll(function () { - throttle(); - }); - return { - type: "bi.default", - scrollx: true, - items: [{ - type: "bi.layout", - height: 1, - ref: function (_ref) { - self.inner = _ref; - } - }] - } - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.setWidth(size); - this.options.size = size; - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - try { - this.element.scrollLeft(o.position); - } catch (e) { - - } - this.inner.element.width(o.contentSize); - }, - - populate: function () { - this._populate(); - } -}); -BI.NativeTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.native_table_horizontal_scrollbar", BI.NativeTableHorizontalScrollbar);/** - * - * 表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableCell - * @extends BI.Single - */ -BI.TableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-cell", - textAlign: "left", - text: "" - }) - }, - - _init: function () { - BI.TableCell.superclass._init.apply(this, arguments); - BI.createWidget({ - type: "bi.label", - element: this, - whiteSpace: "nowrap", - textAlign: this.options.textAlign, - height: this.options.height, - text: this.options.text, - value: this.options.value, - lgap: 5 - }) - } -}); - -BI.shortcut("bi.table_cell", BI.TableCell);/** - * - * 表格单元格 - * - * Created by GUY on 2016/1/12. - * @class BI.CollectionTableCell - * @extends BI.Widget - */ -BI.CollectionTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection-table-cell bi-border-right bi-border-bottom", - width: 0, - height: 0, - _left: 0, - _top: 0, - cell: {} - }) - }, - - _init: function () { - BI.CollectionTableCell.superclass._init.apply(this, arguments); - var o = this.options; - this.cell = BI.createWidget(BI.extend({ - type: "bi.label" - }, o.cell, { - cls: (o.cell.cls || "") + " collection-table-cell-wrapper", - width: o.width - (o._left === 0 ? 1 : 0) - 1, - height: o.height - (o._top === 0 ? 1 : 0) - 1 - })); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.cell, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - }, - - setWidth: function (width) { - BI.CollectionTableCell.superclass.setWidth.apply(this, arguments); - var o = this.options; - this.cell.setWidth(o.width - (o._left === 0 ? 1 : 0) - 1); - }, - - setHeight: function (height) { - BI.CollectionTableCell.superclass.setHeight.apply(this, arguments); - var o = this.options; - this.cell.setHeight(o.height - (o._top === 0 ? 1 : 0) - 1); - } -}); - -BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/** - * CollectionTable - * - * Created by GUY on 2016/1/12. - * @class BI.CollectionTable - * @extends BI.Widget - */ -BI.CollectionTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection-table", - headerRowSize: 25, - rowSize: 25, - columnSize: [], - isNeedFreeze: false, - freezeCols: [], - isNeedMerge: false, - mergeCols: [], - mergeRule: BI.emptyFn, - header: [], - items: [], - regionColumnSize: [] - }); - }, - - render: function () { - var self = this, o = this.options; - this._width = 0; - this._height = 0; - this._scrollBarSize = BI.DOM.getScrollWidth(); - this.topLeftCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.topLeftItems[index]; - } - }); - this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomLeftCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topRightCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.topRightItems[index]; - } - }); - this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomRightCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomLeftCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.bottomLeftItems[index]; - } - }); - this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomRightCollection.setScrollTop(scroll.scrollTop); - self.topLeftCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomRightCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.bottomRightItems[index]; - } - }); - this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomLeftCollection.setScrollTop(scroll.scrollTop); - self.topRightCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topLeftCollection] - }); - this.topRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topRightCollection] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomLeftCollection] - }); - this.bottomRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomRightCollection] - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topLeft, - top: 0, - left: 0 - }, { - el: this.topRight, - top: 0 - }, { - el: this.bottomLeft, - left: 0 - }, { - el: this.bottomRight - }] - }); - - this.topScrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - width: BI.GridTableScrollbar.SIZE - }); - this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { - self.bottomLeftCollection.setScrollTop(scrollTop); - self.bottomRightCollection.setScrollTop(scrollTop); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.leftScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topLeftCollection.setScrollLeft(scrollLeft); - self.bottomLeftCollection.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.rightScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topRightCollection.setScrollLeft(scrollLeft); - self.bottomRightCollection.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.scrollBarLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topScrollbar, - right: 0, - top: 0 - }, { - el: this.leftScrollbar, - left: 0 - }, { - el: this.rightScrollbar, - }] - }); - this._width = o.width - BI.GridTableScrollbar.SIZE; - this._height = o.height - BI.GridTableScrollbar.SIZE; - }, - - mounted: function () { - var o = this.options; - if (o.items.length > 0 || o.header.length > 0) { - this._digest(); - this._populate(); - } - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; - }, - - _getFreezeHeaderHeight: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return 0; - } - return o.header.length * o.headerRowSize; - }, - - _getActualItems: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return o.header.concat(o.items); - } - return o.items; - }, - - _populateScrollbar: function () { - var o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); - this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); - this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()); - this.topScrollbar.populate(); - - this.leftScrollbar.setContentSize(totalLeftColumnSize); - this.leftScrollbar.setSize(regionSize); - this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()); - this.leftScrollbar.populate(); - - this.rightScrollbar.setContentSize(totalRightColumnSize); - this.rightScrollbar.setSize(this._width - regionSize); - this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()); - this.rightScrollbar.populate(); - - var items = this.scrollBarLayout.attr("items"); - items[0].top = this._getFreezeHeaderHeight(); - items[1].top = this._height; - items[2].top = this._height; - items[2].left = regionSize; - this.scrollBarLayout.attr("items", items); - this.scrollBarLayout.resize(); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - var tlw = otlw + this._scrollBarSize; - var tlh = otlh + this._scrollBarSize; - var trw = otrw + this._scrollBarSize; - var trh = otrh + this._scrollBarSize; - var blw = oblw + this._scrollBarSize; - var blh = oblh + this._scrollBarSize; - var brw = obrw + this._scrollBarSize; - var brh = obrh + this._scrollBarSize; - - var digest = function (el) { - el.element.css({ - overflow: "scroll", - overflowX: "scroll", - overflowY: "scroll" - }) - }; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftCollection.setWidth(tlw); - this.topLeftCollection.setHeight(tlh); - this.topRightCollection.setWidth(trw); - this.topRightCollection.setHeight(trh); - this.bottomLeftCollection.setWidth(blw); - this.bottomLeftCollection.setHeight(blh); - this.bottomRightCollection.setWidth(brw); - this.bottomRightCollection.setHeight(brh); - - digest(this.topLeftCollection); - digest(this.topRightCollection); - digest(this.bottomLeftCollection); - digest(this.bottomRightCollection); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - var run = function (positions, items, rendered) { - BI.each(positions, function (i, item) { - var cell = { - type: "bi.collection_table_cell", - cell: items[item.row][item.col] - }; - rendered.push(cell); - }); - }; - run(this.topLeftItems, o.header, leftHeader); - run(this.topRightItems, o.header, rightHeader); - run(this.bottomLeftItems, this._getActualItems(), leftItems); - run(this.bottomRightItems, this._getActualItems(), rightItems); - - this.topLeftCollection._populate(leftHeader); - this.topRightCollection._populate(rightHeader); - this.bottomLeftCollection._populate(leftItems); - this.bottomRightCollection._populate(rightItems); - }, - - _digest: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - //如果表头位置不够,取消表头冻结 - if (this._getFreezeHeaderHeight() <= 0) { - this.topLeftItems = []; - this.topRightItems = []; - this.bottomLeftItems = this._serialize(this._getActualItems(), 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); - this.bottomRightItems = this._serialize(this._getActualItems(), freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); - } else { - this.topLeftItems = this._serialize(o.header, 0, freezeColLength, o.headerRowSize, o.columnSize, o.mergeCols); - this.topRightItems = this._serialize(o.header, freezeColLength, o.columnSize.length, o.headerRowSize, o.columnSize, true); - this.bottomLeftItems = this._serialize(o.items, 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols); - this.bottomRightItems = this._serialize(o.items, freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols); - } - }, - - _serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols, mergeRows) { - mergeCols = mergeCols || []; - mergeRows = mergeRows || []; - var self = this, o = this.options; - var result = [], cache = {}, preCol = {}, preRow = {}, map = {}; - var summaryColumnSize = []; - for (var i = startCol; i < endCol; i++) { - if (i === startCol) { - summaryColumnSize[i] = columnSize[i]; - } else { - summaryColumnSize[i] = summaryColumnSize[i - 1] + columnSize[i]; - } - } - var mergeRow = function (i, j) { - preCol[j]._height += rowHeight; - preCol[j].__mergeRows.push(i); - }; - - var mergeCol = function (i, j) { - preRow[i]._width += columnSize[j]; - preRow[i].__mergeCols.push(j); - }; - - var createOneEl = function (r, c) { - var width = columnSize[c]; - var height = rowHeight; - map[r][c]._row = r; - map[r][c]._col = c; - map[r][c]._width = width; - map[r][c]._height = height; - preCol[c] = map[r][c]; - preCol[c].__mergeRows = [r]; - preRow[r] = map[r][c]; - preRow[r].__mergeCols = [c]; - - result.push({ - x: summaryColumnSize[c] - columnSize[c], - y: +r * rowHeight, - item: map[r][c] - }); - }; - - BI.each(items, function (i, cols) { - for (var j = startCol; j < endCol; j++) { - if (!cache[i]) { - cache[i] = {}; - } - if (!map[i]) { - map[i] = {}; - } - cache[i][j] = cols[j]; - map[i][j] = {}; - if (mergeCols === true || mergeCols.indexOf(j) > -1 || mergeRows === true || mergeRows.indexOf(i) > -1) { - if (i === 0 && j === startCol) { - createOneEl(0, startCol); - } else if (j === startCol && i > 0) { - var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); - if (isNeedMergeRow === true) { - mergeRow(i, j); - preRow[i] = preCol[j]; - } else { - createOneEl(i, j); - } - } else if (i === 0 && j > startCol) { - var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); - if (isNeedMergeCol === true) { - mergeCol(i, j); - preCol[j] = preRow[i]; - } else { - createOneEl(i, j); - } - } else { - var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); - var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); - if (isNeedMergeCol && isNeedMergeRow) { - continue; - //mergeRow(i, j);//优先合并列 - } - if (isNeedMergeCol) { - mergeCol(i, j); - } - if (isNeedMergeRow) { - mergeRow(i, j); - } - if (!isNeedMergeCol && !isNeedMergeRow) { - createOneEl(i, j); - } - } - } else { - createOneEl(i, j); - } - } - }); - return BI.map(result, function (i, item) { - return { - x: item.x, - y: item.y, - row: item.item._row, - col: item.item._col, - width: item.item._width, - height: item.item._height - } - }); - }, - - _populate: function () { - if (this._width <= 0 || this._height <= 0) { - return; - } - if (this._isNeedDigest === true) { - this._digest(); - } - this._isNeedDigest = false; - this._populateTable(); - this._populateScrollbar(); - }, - - getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - setVerticalScroll: function (scrollTop) { - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.topLeftCollection.setScrollLeft(scrollLeft); - this.bottomLeftCollection.setScrollLeft(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.topRightCollection.setScrollLeft(scrollLeft); - this.bottomRightCollection.setScrollLeft(scrollLeft); - }, - - getVerticalScroll: function () { - return this.bottomRightCollection.getScrollTop(); - }, - - getLeftHorizontalScroll: function () { - return this.bottomLeftCollection.getScrollLeft(); - }, - - getRightHorizontalScroll: function () { - return this.bottomRightCollection.getScrollLeft(); - }, - - setWidth: function (width) { - BI.CollectionTable.superclass.setWidth.apply(this, arguments); - this._width = this.options.width - BI.GridTableScrollbar.SIZE; - }, - - setHeight: function (height) { - BI.CollectionTable.superclass.setHeight.apply(this, arguments); - this._height = this.options.height - BI.GridTableScrollbar.SIZE; - }, - - setColumnSize: function (columnSize) { - this._isNeedDigest = true; - this.options.columnSize = columnSize; - }, - - setRegionColumnSize: function (regionColumnSize) { - this._isNeedDigest = true; - this.options.regionColumnSize = regionColumnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - populate: function (items, header) { - if (items && items !== this.options.items) { - this._isNeedDigest = true; - this.options.items = items; - this._restore(); - } - if (header && header !== this.options.header) { - this._isNeedDigest = true; - this.options.header = header; - this._restore(); - } - this._populate(); - }, - - _restore: function () { - this.topLeftCollection.restore(); - this.topRightCollection.restore(); - this.bottomLeftCollection.restore(); - this.bottomRightCollection.restore(); - }, - - restore: function () { - this._restore(); - } -}); -BI.shortcut('bi.collection_table', BI.CollectionTable);/** - * QuickCollectionTable - * - * Created by GUY on 2016/1/12. - * @class BI.QuickCollectionTable - * @extends BI.CollectionTable - */ -BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, { - _defaultConfig: function () { - return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-quick-collection-table" - }); - }, - - render: function () { - BI.QuickCollectionTable.superclass.render.apply(this, arguments); - var self = this, o = this.options; - this.topLeftCollection.setOverflowX(false); - this.topLeftCollection.setOverflowY(false); - this.topRightCollection.setOverflowX(false); - this.topRightCollection.setOverflowY(false); - this.bottomLeftCollection.setOverflowX(false); - this.bottomLeftCollection.setOverflowY(false); - this.bottomRightCollection.setOverflowX(false); - this.bottomRightCollection.setOverflowY(false); - }, - - mounted: function () { - BI.QuickCollectionTable.superclass.mounted.apply(this, arguments); - var self = this; - this._topLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._topRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this.topLeftCollection.element.mousewheel(function (e) { - self._topLeftWheelHandler.onWheel(e.originalEvent); - }); - this.topRightCollection.element.mousewheel(function (e) { - self._topRightWheelHandler.onWheel(e.originalEvent); - }); - this.bottomLeftCollection.element.mousewheel(function (e) { - self._bottomLeftWheelHandler.onWheel(e.originalEvent); - }); - this.bottomRightCollection.element.mousewheel(function (e) { - self._bottomRightWheelHandler.onWheel(e.originalEvent); - }); - }, - - _shouldHandleLeftX: function (delta) { - if (delta > 0) { - return this.bottomLeftCollection.getScrollLeft() < this.bottomLeftCollection.getMaxScrollLeft(); - } else { - return this.bottomLeftCollection.getScrollLeft() > 0; - } - }, - - _shouldHandleRightX: function (delta) { - if (delta > 0) { - return this.bottomRightCollection.getScrollLeft() < this.bottomRightCollection.getMaxScrollLeft(); - } else { - return this.bottomRightCollection.getScrollLeft() > 0; - } - }, - - _shouldHandleY: function (delta) { - if (delta > 0) { - return this.bottomRightCollection.getScrollTop() < this.bottomRightCollection.getMaxScrollTop(); - } else { - return this.bottomRightCollection.getScrollTop() > 0; - } - }, - - _onWheelLeft: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomLeftCollection.getScrollTop(); - var scrollLeft = this.bottomLeftCollection.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - this.topLeftCollection.setScrollLeft(scrollLeft); - this.bottomLeftCollection.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _onWheelRight: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomRightCollection.getScrollTop(); - var scrollLeft = this.bottomRightCollection.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - this.topRightCollection.setScrollLeft(scrollLeft); - this.bottomRightCollection.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = [] - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftCollection.setWidth(otlw); - this.topLeftCollection.setHeight(otlh); - this.topRightCollection.setWidth(otrw); - this.topRightCollection.setHeight(otrh); - this.bottomLeftCollection.setWidth(oblw); - this.bottomLeftCollection.setHeight(oblh); - this.bottomRightCollection.setWidth(obrw); - this.bottomRightCollection.setHeight(obrh); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - var run = function (positions, items, rendered) { - BI.each(positions, function (i, item) { - var cell = { - type: "bi.collection_table_cell", - cell: items[item.row][item.col] - }; - rendered.push(cell); - }); - }; - run(this.topLeftItems, o.header, leftHeader); - run(this.topRightItems, o.header, rightHeader); - run(this.bottomLeftItems, this._getActualItems(), leftItems); - run(this.bottomRightItems, this._getActualItems(), rightItems); - - this.topLeftCollection.populate(leftHeader); - this.topRightCollection.populate(rightHeader); - this.bottomLeftCollection.populate(leftItems); - this.bottomRightCollection.populate(rightItems); - } -}); -BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/** - * - * 表格单元格 - * - * Created by GUY on 2016/1/12. - * @class BI.GridTableCell - * @extends BI.Widget - */ -BI.GridTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-table-cell bi-border-right bi-border-bottom", - width: 0, - height: 0, - _rowIndex: 0, - _columnIndex: 0, - _left: 0, - _top: 0, - cell: {} - }) - }, - - _init: function () { - BI.GridTableCell.superclass._init.apply(this, arguments); - var o = this.options; - this.cell = BI.createWidget(BI.extend({ - type: "bi.label" - }, o.cell, { - cls: (o.cell.cls || "") + "grid-table-cell-wrapper", - width: o.width - (o._columnIndex === 0 ? 1 : 0) - 1, - height: o.height - (o._rowIndex === 0 ? 1 : 0) - 1 - })); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.cell, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - }, - - setWidth: function (width) { - BI.GridTableCell.superclass.setWidth.apply(this, arguments); - var o = this.options; - this.cell.setWidth(o.width - (o._columnIndex === 0 ? 1 : 0) - 1); - }, - - setHeight: function (height) { - BI.GridTableCell.superclass.setHeight.apply(this, arguments); - var o = this.options; - this.cell.setHeight(o.height - (o._rowIndex === 0 ? 1 : 0) - 1); - } -}); - -BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/** - * GridTable - * - * Created by GUY on 2016/1/12. - * @class BI.GridTable - * @extends BI.Widget - */ -BI.GridTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-table", - headerRowSize: 25, - rowSize: 25, - columnSize: [], - isNeedFreeze: false, - freezeCols: [], - header: [], - items: [], - regionColumnSize: [] - }); - }, - - render: function () { - var self = this, o = this.options; - this._width = 0; - this._height = 0; - this._scrollBarSize = BI.DOM.getScrollWidth(); - var rowHeightGetter = function () { - return o.rowSize; - }; - var columnLeftWidthGetter = function (index) { - return o.columnSize[index]; - }; - var columnRightWidthGetter = function (index) { - return o.columnSize[index + self._getFreezeColLength()]; - }; - this.topLeftGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnLeftWidthGetter - }); - this.topLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomLeftGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topRightGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnRightWidthGetter - }); - this.topRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomRightGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomLeftGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnLeftWidthGetter - }); - this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomRightGrid.setScrollTop(scroll.scrollTop); - self.topLeftGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomRightGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnRightWidthGetter - }); - this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomLeftGrid.setScrollTop(scroll.scrollTop); - self.topRightGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topLeftGrid] - }); - this.topRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topRightGrid] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomLeftGrid] - }); - this.bottomRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomRightGrid] - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topLeft, - top: 0, - left: 0 - }, { - el: this.topRight, - top: 0 - }, { - el: this.bottomLeft, - left: 0 - }, { - el: this.bottomRight - }] - }); - - this.topScrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - width: BI.GridTableScrollbar.SIZE - }); - this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { - self.bottomLeftGrid.setScrollTop(scrollTop); - self.bottomRightGrid.setScrollTop(scrollTop); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.leftScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topLeftGrid.setScrollLeft(scrollLeft); - self.bottomLeftGrid.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.rightScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topRightGrid.setScrollLeft(scrollLeft); - self.bottomRightGrid.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.scrollBarLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topScrollbar, - right: 0, - top: 0 - }, { - el: this.leftScrollbar, - left: 0 - }, { - el: this.rightScrollbar - }] - }); - this._width = o.width - BI.GridTableScrollbar.SIZE; - this._height = o.height - BI.GridTableScrollbar.SIZE; - this.header = this._getHeader(); - this.items = this._getItems(); - }, - - mounted: function () { - var o = this.options; - if (o.items.length > 0 || o.header.length > 0) { - this._populate(); - } - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; - }, - - _getFreezeHeaderHeight: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return 0; - } - return o.header.length * o.headerRowSize; - }, - - _getActualItems: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return o.header.concat(o.items); - } - return o.items; - }, - - _populateScrollbar: function () { - var o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); - this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); - this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(), this.bottomRightGrid.getScrollTop())); - this.topScrollbar.populate(); - - this.leftScrollbar.setContentSize(totalLeftColumnSize); - this.leftScrollbar.setSize(regionSize); - this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()); - this.leftScrollbar.populate(); - - this.rightScrollbar.setContentSize(totalRightColumnSize); - this.rightScrollbar.setSize(this._width - regionSize); - this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()); - this.rightScrollbar.populate(); - - var items = this.scrollBarLayout.attr("items"); - items[0].top = this._getFreezeHeaderHeight(); - items[1].top = this._height; - items[2].top = this._height; - items[2].left = regionSize; - this.scrollBarLayout.attr("items", items); - this.scrollBarLayout.resize(); - }, - - _getHeader: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - var leftHeader = [], rightHeader = []; - BI.each(o.header, function (i, cols) { - leftHeader[i] = []; - rightHeader[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftHeader[i].push(cell); - } else { - rightHeader[i].push(cell); - } - }); - }); - return [leftHeader, rightHeader]; - }, - - _getItems: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - var leftItems = [], rightItems = []; - BI.each(this._getActualItems(), function (i, cols) { - leftItems[i] = []; - rightItems[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftItems[i].push(cell); - } else { - rightItems[i].push(cell); - } - }); - }); - return [leftItems, rightItems]; - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - var freezeColLength = this._getFreezeColLength(); - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - var tlw = otlw + this._scrollBarSize; - var tlh = otlh + this._scrollBarSize; - var trw = otrw + this._scrollBarSize; - var trh = otrh + this._scrollBarSize; - var blw = oblw + this._scrollBarSize; - var blh = oblh + this._scrollBarSize; - var brw = obrw + this._scrollBarSize; - var brh = obrh + this._scrollBarSize; - - var digest = function (el) { - el.element.css({ - overflow: "scroll", - overflowX: "scroll", - overflowY: "scroll" - }) - }; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftGrid.setWidth(tlw); - this.topLeftGrid.setHeight(tlh); - this.topRightGrid.setWidth(trw); - this.topRightGrid.setHeight(trh); - this.bottomLeftGrid.setWidth(blw); - this.bottomLeftGrid.setHeight(blh); - this.bottomRightGrid.setWidth(brw); - this.bottomRightGrid.setHeight(brh); - - digest(this.topLeftGrid); - digest(this.topRightGrid); - digest(this.bottomLeftGrid); - digest(this.bottomRightGrid); - - this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); - this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.topRightGrid.setEstimatedRowSize(o.headerRowSize); - this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); - this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.bottomRightGrid.setEstimatedRowSize(o.rowSize); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - this.topLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.topRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - - function overscan(grid, w, h, rSize, cSize) { - var rCount = h / rSize; - var cCount = w / cSize; - if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { - grid.attr("overscanRowCount", 100); - grid.attr("overscanColumnCount", 100); - } - } - - if (freezeColLength > 0) { - overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); - overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength); - } - if (o.columnSize.length - freezeColLength > 0) { - overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - } - - this.topLeftGrid._populate(this.header[0]); - this.topRightGrid._populate(this.header[1]); - this.bottomLeftGrid._populate(this.items[0]); - this.bottomRightGrid._populate(this.items[1]); - }, - - _populate: function () { - if (this._width <= 0 || this._height <= 0) { - return; - } - this._populateTable(); - this._populateScrollbar(); - }, - - getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - setVerticalScroll: function (scrollTop) { - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.topLeftGrid.setScrollLeft(scrollLeft); - this.bottomLeftGrid.setScrollLeft(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.topRightGrid.setScrollLeft(scrollLeft); - this.bottomRightGrid.setScrollLeft(scrollLeft); - }, - - getVerticalScroll: function () { - return this.bottomRightGrid.getScrollTop(); - }, - - getLeftHorizontalScroll: function () { - return this.bottomLeftGrid.getScrollLeft(); - }, - - getRightHorizontalScroll: function () { - return this.bottomRightGrid.getScrollLeft(); - }, - - setWidth: function (width) { - BI.GridTable.superclass.setWidth.apply(this, arguments); - this._width = this.options.width - BI.GridTableScrollbar.SIZE; - }, - - setHeight: function (height) { - BI.GridTable.superclass.setHeight.apply(this, arguments); - this._height = this.options.height - BI.GridTableScrollbar.SIZE; - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this._isNeedDigest = true; - }, - - setRegionColumnSize: function (regionColumnSize) { - this.options.regionColumnSize = regionColumnSize; - this._isNeedDigest = true; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - populate: function (items, header) { - if (items && this.options.items !== items) { - this.options.items = items; - this.items = this._getItems(); - this._restore(); - } - if (header && this.options.header !== header) { - this.options.header = header; - this.header = this._getHeader(); - this._restore(); - } - this._populate(); - }, - - _restore: function () { - this.topLeftGrid.restore(); - this.topRightGrid.restore(); - this.bottomLeftGrid.restore(); - this.bottomRightGrid.restore(); - }, - - restore: function () { - this._restore(); - } -}); -BI.shortcut('bi.grid_table', BI.GridTable);/** - * QuickGridTable - * - * Created by GUY on 2016/1/12. - * @class BI.QuickGridTable - * @extends BI.GridTable - */ -BI.QuickGridTable = BI.inherit(BI.GridTable, { - _defaultConfig: function () { - return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-quick-grid-table" - }); - }, - - render: function () { - BI.QuickGridTable.superclass.render.apply(this, arguments); - var self = this, o = this.options; - this.topLeftGrid.setOverflowX(false); - this.topLeftGrid.setOverflowY(false); - this.topRightGrid.setOverflowX(false); - this.topRightGrid.setOverflowY(false); - this.bottomLeftGrid.setOverflowX(false); - this.bottomLeftGrid.setOverflowY(false); - this.bottomRightGrid.setOverflowX(false); - this.bottomRightGrid.setOverflowY(false); - }, - - mounted: function () { - BI.QuickGridTable.superclass.mounted.apply(this, arguments); - var self = this; - this._topLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._topRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this.topLeftGrid.element.mousewheel(function (e) { - self._topLeftWheelHandler.onWheel(e.originalEvent); - }); - this.topRightGrid.element.mousewheel(function (e) { - self._topRightWheelHandler.onWheel(e.originalEvent); - }); - this.bottomLeftGrid.element.mousewheel(function (e) { - self._bottomLeftWheelHandler.onWheel(e.originalEvent); - }); - this.bottomRightGrid.element.mousewheel(function (e) { - self._bottomRightWheelHandler.onWheel(e.originalEvent); - }); - }, - - _shouldHandleLeftX: function (delta) { - if (delta > 0) { - return this.bottomLeftGrid.getScrollLeft() < this.bottomLeftGrid.getMaxScrollLeft(); - } else { - return this.bottomLeftGrid.getScrollLeft() > 0; - } - }, - - _shouldHandleRightX: function (delta) { - if (delta > 0) { - return this.bottomRightGrid.getScrollLeft() < this.bottomRightGrid.getMaxScrollLeft(); - } else { - return this.bottomRightGrid.getScrollLeft() > 0; - } - }, - - _shouldHandleY: function (delta) { - if (delta > 0) { - return this.bottomRightGrid.getScrollTop() < this.bottomRightGrid.getMaxScrollTop(); - } else { - return this.bottomRightGrid.getScrollTop() > 0; - } - }, - - _onWheelLeft: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomLeftGrid.getScrollTop(); - var scrollLeft = this.bottomLeftGrid.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - this.topLeftGrid.setScrollLeft(scrollLeft); - this.bottomLeftGrid.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _onWheelRight: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomRightGrid.getScrollTop(); - var scrollLeft = this.bottomRightGrid.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - this.topRightGrid.setScrollLeft(scrollLeft); - this.bottomRightGrid.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - var freezeColLength = this._getFreezeColLength(); - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftGrid.setWidth(otlw); - this.topLeftGrid.setHeight(otlh); - this.topRightGrid.setWidth(otrw); - this.topRightGrid.setHeight(otrh); - this.bottomLeftGrid.setWidth(oblw); - this.bottomLeftGrid.setHeight(oblh); - this.bottomRightGrid.setWidth(obrw); - this.bottomRightGrid.setHeight(obrh); - - this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); - this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.topRightGrid.setEstimatedRowSize(o.headerRowSize); - this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); - this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.bottomRightGrid.setEstimatedRowSize(o.rowSize); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - BI.each(o.header, function (i, cols) { - leftHeader[i] = []; - rightHeader[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftHeader[i].push(cell); - } else { - rightHeader[i].push(cell); - } - }); - }); - BI.each(this._getActualItems(), function (i, cols) { - leftItems[i] = []; - rightItems[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftItems[i].push(cell); - } else { - rightItems[i].push(cell); - } - }); - }); - - this.topLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.topRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - - function overscan(grid, w, h, rSize, cSize) { - var rCount = h / rSize; - var cCount = w / cSize; - if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { - grid.attr("overscanRowCount", 100); - grid.attr("overscanColumnCount", 100); - } - } - - if (freezeColLength > 0) { - overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); - overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength); - } - if (o.columnSize.length - freezeColLength > 0) { - overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - } - - this.topLeftGrid.populate(leftHeader); - this.topRightGrid.populate(rightHeader); - this.bottomLeftGrid.populate(leftItems); - this.bottomRightGrid.populate(rightItems); - } -}); -BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/** - * - * 表格滚动条 - * - * Created by GUY on 2016/1/12. - * @class BI.GridTableScrollbar - * @extends BI.Widget - */ -BI.GridTableScrollbar = BI.inherit(BI.Widget, { - _const: { - FACE_MARGIN: 4, - FACE_MARGIN_2: 4 * 2, - FACE_SIZE_MIN: 30, - KEYBOARD_SCROLL_AMOUNT: 40 - }, - _defaultConfig: function () { - return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this, arguments), { - baseCls: "scrollbar-layout-main public-scrollbar-main", - attributes: { - tabIndex: 0 - }, - contentSize: 0, - defaultPosition: 0, - isOpaque: false, - orientation: "vertical", - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - this.focused = false; - this.isDragging = false; - this.face = BI.createWidget({ - type: "bi.layout", - cls: "scrollbar-layout-face public-scrollbar-face " - + (this._isHorizontal() ? "scrollbar-layout-face-horizontal" : "scrollbar-layout-face-vertical") - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.face, - left: 0, - top: 0 - }] - }); - }, - - mounted: function () { - var self = this, o = this.options; - var onWheel = o.orientation === 'horizontal' ? this._onWheelX : this._onWheelY; - this._wheelHandler = new BI.WheelHandler( - BI.bind(onWheel, this), - BI.bind(this._shouldHandleX, this), - BI.bind(this._shouldHandleY, this) - ); - this._mouseMoveTracker = new BI.MouseMoveTracker( - BI.bind(this._onMouseMove, this), - BI.bind(this._onMouseMoveEnd, this), - document - ); - this.element.on("mousedown", BI.bind(this._onMouseDown, this)); - this.element.on("mousewheel", function (e) { - self._wheelHandler.onWheel(e.originalEvent); - }); - this.element.on("keydown", BI.bind(this._onKeyDown, this)); - this.element.on("focus", function () { - self.focused = true; - self._populate(); - }); - this.element.on("blur", function () { - self.focused = false; - self._populate(); - }); - if (this._isHorizontal()) { - this.element.addClass("scrollbar-layout-main-horizontal"); - } else { - this.element.addClass("scrollbar-layout-main-vertical"); - } - this._populate(); - }, - - _isHorizontal: function () { - return this.options.orientation === 'horizontal' - }, - - _getScale: function () { - var o = this.options; - var scale = o.size / o.contentSize; - var faceSize = o.size * scale; - - if (faceSize < this._const.FACE_SIZE_MIN) { - scale = (o.size - this._const.FACE_SIZE_MIN) / (o.contentSize - o.size); - } - return scale; - }, - - _getFaceSize: function () { - var o = this.options; - var scale = o.size / o.contentSize; - var faceSize = o.size * scale; - - if (faceSize < this._const.FACE_SIZE_MIN) { - faceSize = this._const.FACE_SIZE_MIN; - } - return faceSize; - }, - - _shouldHandleX: function (delta) { - return this.options.orientation === 'horizontal' ? - this._shouldHandleChange(delta) : - false; - }, - - _shouldHandleY: function (delta) { - return this.options.orientation !== 'horizontal' ? - this._shouldHandleChange(delta) : - false; - }, - - _shouldHandleChange: function (delta) { - return this.options.position + delta !== this.options.position; - }, - - _onWheelY: function (deltaX, deltaY) { - this._onWheel(deltaY); - }, - - _onWheelX: function (deltaX, deltaY) { - this._onWheel(deltaX); - }, - - _onWheel: function (delta) { - var maxPosition = this.options.contentSize - this.options.size; - this.options.position += delta; - if (this.options.position < 0) { - this.options.position = 0; - } else if (this.options.position > maxPosition) { - this.options.position = maxPosition; - } - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _onMouseDown: function (e) { - if (e.target !== this.face.element[0]) { - var position = this._isHorizontal() ? e.offsetX : e.offsetY; - position /= this._getScale(); - this.options.position = BI.clamp(position - (this._getFaceSize() * 0.5 / this._getScale()), 0, this.options.contentSize - this.options.size); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - } else { - this._mouseMoveTracker.captureMouseMoves(e); - } - try { - this.element[0].focus(); - } catch (e) { - - } - }, - - _onMouseMove: function (deltaX, deltaY) { - var delta = this._isHorizontal() ? deltaX : deltaY; - delta /= this._getScale(); - this.options.position = BI.clamp(this.options.position + delta, 0, this.options.contentSize - this.options.size); - this.isDragging = this._mouseMoveTracker.isDragging(); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _onMouseMoveEnd: function (event) { - this._mouseMoveTracker.releaseMouseMoves(); - if (this.isDragging === true) { - this.isDragging = false; - this._populate(); - } - }, - - _onKeyDown: function (event) { - var Keys = { - BACKSPACE: 8, - TAB: 9, - RETURN: 13, - ALT: 18, - ESC: 27, - SPACE: 32, - PAGE_UP: 33, - PAGE_DOWN: 34, - END: 35, - HOME: 36, - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - DELETE: 46, - COMMA: 188, - PERIOD: 190, - A: 65, - Z: 90, - ZERO: 48, - NUMPAD_0: 96, - NUMPAD_9: 105 - }; - var keyCode = event.keyCode; - - if (keyCode === Keys.TAB) { - return; - } - - var distance = 40; - var direction = 0; - - if (this._isHorizontal()) { - switch (keyCode) { - case Keys.HOME: - direction = -1; - distance = this.options.contentSize; - break; - - case Keys.LEFT: - direction = -1; - break; - - case Keys.RIGHT: - direction = 1; - break; - - default: - return; - } - } - - if (!this._isHorizontal()) { - switch (keyCode) { - case Keys.SPACE: - if (event.shiftKey) { - direction = -1; - } else { - direction = 1; - } - break; - - case Keys.HOME: - direction = -1; - distance = this.options.contentSize; - break; - - case Keys.UP: - direction = -1; - break; - - case Keys.DOWN: - direction = 1; - break; - - case Keys.PAGE_UP: - direction = -1; - distance = this.options.size; - break; - - case Keys.PAGE_DOWN: - direction = 1; - distance = this.options.size; - break; - - default: - return; - } - } - - this.options.position = BI.clamp(this.options.position + (distance * direction), 0, this.options.contentSize - this.options.size); - event.preventDefault(); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - - var size = o.size; - var isHorizontal = this._isHorizontal(); - var isActive = this.focused || this.isDragging; - - var faceSize = this._getFaceSize(); - var isOpaque = o.isOpaque; - this.element[isOpaque === true ? "addClass" : "removeClass"]("public-scrollbar-main-opaque"); - this.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-main-active"); - - this.face.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-face-active"); - - var position = o.position * this._getScale() + this._const.FACE_MARGIN; - - var items = this.contextLayout.attr("items"); - if (isHorizontal) { - this.setWidth(size); - this.face.setWidth(faceSize - this._const.FACE_MARGIN_2); - items[0].left = position; - items[0].top = 0; - } else { - this.setHeight(size); - this.face.setHeight(faceSize - this._const.FACE_MARGIN_2); - items[0].left = 0; - items[0].top = position; - } - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.options.size = size; - }, - - populate: function () { - this._populate(); - } -}); -BI.GridTableScrollbar.SIZE = 10; -BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar); - - -BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, { - _const: { - FACE_MARGIN: 4, - FACE_MARGIN_2: 4 * 2, - FACE_SIZE_MIN: 30, - KEYBOARD_SCROLL_AMOUNT: 40 - }, - _defaultConfig: function () { - return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - position: 0, - size: 0 - }) - }, - - _init: function () { - BI.GridTableHorizontalScrollbar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.scrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - orientation: "horizontal", - isOpaque: true, - position: o.position, - contentSize: o.contentSize, - size: o.size - }); - this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function () { - self.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, arguments); - }); - BI.createWidget({ - type: "bi.absolute", - cls: "horizontal-scrollbar", - element: this, - width: o.size, - height: BI.GridTableScrollbar.SIZE, - items: [{ - el: { - type: "bi.absolute", - scrollable: false, - height: BI.GridTableScrollbar.SIZE, - items: [{ - el: this.scrollbar, - left: 0, - top: 0 - }] - }, - top: 0, - left: 0, - right: 0 - }] - }); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - this.scrollbar.setContentSize(contentSize); - }, - - setPosition: function (position) { - this.options.position = position; - this.scrollbar.setPosition(position); - }, - - setSize: function (size) { - this.setWidth(size); - this.options.size = size; - this.scrollbar.setSize(size); - }, - - populate: function () { - this.scrollbar.populate(); - var o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - } -}); -BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/** - * - * 表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableHeaderCell - * @extends BI.Single - */ -BI.TableHeaderCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-header-cell", - text: "" - }) - }, - - _init: function () { - BI.TableHeaderCell.superclass._init.apply(this, arguments); - BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "center", - height: this.options.height, - text: this.options.text, - value: this.options.value - }) - } -}); - -BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/** - * - * 表格 - * - * 能处理静态宽度以及动态宽度的表, 百分比宽度的表请使用PreviewTable - * - * Created by GUY on 2015/9/22. - * @class BI.Table - * @extends BI.Widget - */ -BI.Table = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Table.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table", - logic: { //冻结的页面布局逻辑 - dynamic: false - }, - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 - - isNeedMerge: false,//是否需要合并单元格 - mergeCols: [], //合并的单元格列号 - mergeRule: function (row1, row2) { //合并规则, 默认相等时合并 - return BI.isEqual(row1, row2); - }, - - columnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: false, - - header: [], - footer: false, - items: [] //二维数组 - }) - }, - - _calculateWidth: function (width) { - if (!width || width === "0") { - return ""; - } - width = BI.parseFloat(width); - if (width < 0) { - width = 0; - } - return width > 1.01 ? width : (width * 100 + "%"); - }, - - _calculateHeight: function (height) { - return height ? height : ""; - }, - - _isRightFreeze: function () { - return BI.isNotEmptyArray(this.options.freezeCols) && BI.first(this.options.freezeCols) !== 0; - }, - - _createTopLeft: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.topLeftColGroupTds = {}; - this.topLeftBodyTds = {}; - this.topLeftBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnLeft, this.topLeftColGroupTds); - var body = this.topLeftBody = this._body(); - body.element.append(this._createHeaderCells(this.topLeftItems, this.columnLeft, this.mergeLeft, this.topLeftBodyTds, this.topLeftBodyItems)); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.topLeftContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createTopRight: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.topRightColGroupTds = {}; - this.topRightBodyTds = {}; - this.topRightBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnRight, this.topRightColGroupTds); - var body = this.topRightBody = this._body(); - body.element.append(this._createHeaderCells(this.topRightItems, this.columnRight, this.mergeRight, this.topRightBodyTds, this.topRightBodyItems, this.columnLeft.length)); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (!isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w)) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.topRightContainer = BI.createWidget({ - type: "bi.adaptive", - width: w || undefined, - items: [table] - })); - }, - - _createBottomLeft: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.bottomLeftColGroupTds = {}; - this.bottomLeftBodyTds = {}; - this.bottomLeftBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnLeft, this.bottomLeftColGroupTds); - var body = this._createBottomLeftBody(); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.bottomLeftContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createBottomLeftBody: function () { - var body = this.bottomLeftBody = this._body(); - body.element.append(this._createCells(this.bottomLeftItems, this.columnLeft, this.mergeLeft, this.bottomLeftBodyTds, this.bottomLeftBodyItems)); - return body; - }, - - _createBottomRight: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.bottomRightColGroupTds = {}; - this.bottomRightBodyTds = {}; - this.bottomRightBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnRight, this.bottomRightColGroupTds); - var body = this._createBottomRightBody(); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (!isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.bottomRightContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createBottomRightBody: function () { - var body = this.bottomRightBody = this._body(); - body.element.append(this._createCells(this.bottomRightItems, this.columnRight, this.mergeRight, this.bottomRightBodyTds, this.bottomRightBodyItems, this.columnLeft.length)); - return body; - }, - - _createFreezeTable: function () { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - var split = this._split(o.header); - this.topLeftItems = split.left; - this.topRightItems = split.right; - split = this._split(o.items); - this.bottomLeftItems = split.left; - this.bottomRightItems = split.right; - - this.columnLeft = []; - this.columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - self[isRight ? "columnRight" : "columnLeft"].push(size); - } else { - self[isRight ? "columnLeft" : "columnRight"].push(size); - } - }); - this.mergeLeft = []; - this.mergeRight = []; - BI.each(o.mergeCols, function (i, col) { - if (o.freezeCols.contains(col)) { - self[isRight ? "mergeRight" : "mergeLeft"].push(col); - } else { - self[isRight ? "mergeLeft" : "mergeRight"].push(col); - } - }); - - var topLeft = this._createTopLeft(); - var topRight = this._createTopRight(); - var bottomLeft = this._createBottomLeft(); - var bottomRight = this._createBottomRight(); - - this.scrollTopLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-top-left", - width: "100%", - height: "100%", - scrollable: false, - items: [topLeft] - }); - this.scrollTopRight = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-top-right", - width: "100%", - height: "100%", - scrollable: false, - items: [topRight] - }); - this.scrollBottomLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-bottom-left", - width: "100%", - height: "100%", - scrollable: isRight || null, - scrollx: !isRight, - items: [bottomLeft] - }); - this.scrollBottomRight = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-bottom-right", - width: "100%", - height: "100%", - scrollable: !isRight || null, - scrollx: isRight, - items: [bottomRight] - }); - this.topLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "top-left", - scrollable: false, - items: [this.scrollTopLeft] - }); - this.topRight = BI.createWidget({ - type: "bi.adaptive", - cls: "top-right", - scrollable: false, - items: [this.scrollTopRight] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-left", - // scrollable: false, - items: [this.scrollBottomLeft] - }); - this.bottomRight = BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-right", - scrollable: false, - items: [this.scrollBottomRight] - }); - - var headerHeight = o.header.length * ((o.headerRowSize || o.rowSize) + 1) + 1; - var leftWidth = BI.sum(o.freezeCols, function (i, col) { - return o.columnSize[col] > 1 ? o.columnSize[col] + 1 : o.columnSize[col]; - }); - - this._resize = function () { - if (self.scrollBottomLeft.element.is(":visible")) { - self.scrollBottomLeft.element.css({"overflow-x": "auto"}); - self.scrollBottomRight.element.css({"overflow-x": "auto"}); - self.setColumnSize(o.columnSize); - if (isRight) { - self.scrollBottomLeft.element.css({"overflow-y": "auto"}); - } else { - self.scrollBottomRight.element.css({"overflow-y": "auto"}); - } - if (self.scrollBottomLeft.element.hasHorizonScroll() || self.scrollBottomRight.element.hasHorizonScroll()) { - self.scrollBottomLeft.element.css("overflow-x", "scroll"); - self.scrollBottomRight.element.css("overflow-x", "scroll"); - } - if (self.scrollBottomRight.element.hasVerticalScroll()) { - self.scrollTopRight.element.css("overflow-y", "scroll"); - } else { - self.scrollTopRight.element.css("overflow-y", "hidden"); - } - if (self.scrollBottomLeft.element.hasVerticalScroll()) { - self.scrollTopLeft.element.css("overflow-y", "scroll"); - } else { - self.scrollTopLeft.element.css("overflow-y", "hidden"); - } - self.scrollTopLeft.element[0].scrollLeft = self.scrollBottomLeft.element[0].scrollLeft; - self.scrollTopRight.element[0].scrollLeft = self.scrollBottomRight.element[0].scrollLeft; - self.scrollBottomLeft.element[0].scrollTop = self.scrollBottomRight.element[0].scrollTop; - } - }; - - var regionColumnSize = o.regionColumnSize; - if (o.freezeCols.length === 0) { - regionColumnSize = isRight ? ['fill', 0] : [0, 'fill']; - } else if (o.freezeCols.length >= o.columnSize.length) { - regionColumnSize = isRight ? [0, 'fill'] : ['fill', 0]; - } - this.partitions = BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - rows: 2, - columns: 2, - columnSize: regionColumnSize || (isRight ? ['fill', leftWidth] : [leftWidth, 'fill']), - rowSize: [headerHeight, 'fill'], - items: [[{ - el: this.topLeft - }, { - el: this.topRight - }], [{ - el: this.bottomLeft - }, { - el: this.bottomRight - }]] - })))); - - this._initFreezeScroll(); - BI.nextTick(function () { - if (self.element.is(":visible")) { - self._resize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); - } - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._resize(); - self.fireEvent(BI.Table.EVENT_TABLE_RESIZE); - }); - }, - - _initFreezeScroll: function () { - var self = this, o = this.options; - scroll(this.scrollBottomRight.element, this.scrollTopRight.element, this.scrollBottomLeft.element); - // scroll(this.scrollBottomLeft.element, this.scrollTopLeft.element, this.scrollBottomRight.element); - - function scroll(scrollElement, scrollTopElement, otherElement) { - scrollElement.scroll(function (e) { - otherElement.scrollTop(scrollElement.scrollTop()); - scrollTopElement.scrollLeft(scrollElement.scrollLeft()); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); - }); - } - }, - - resize: function () { - this._resize && this._resize(); - }, - - _createCells: function (items, columnSize, mergeCols, TDs, Ws, start, rowSize) { - var self = this, o = this.options, preCol = {}, preRow = {}, preRW = {}, preCW = {}, map = {}; - columnSize = columnSize || o.columnSize; - mergeCols = mergeCols || o.mergeCols; - TDs = TDs || {}; - Ws = Ws || {}; - start = start || 0; - rowSize || (rowSize = o.rowSize); - var frag = document.createDocumentFragment(); - BI.each(items, function (i, rows) { - var tr = $("<tr>").addClass((i & 1) === 0 ? "odd" : "even"); - BI.each(rows, function (j, row) { - if (!map[i]) { - map[i] = {}; - } - if (!TDs[i]) { - TDs[i] = {}; - } - if (!Ws[i]) { - Ws[i] = {}; - } - map[i][j] = row; - - if (o.isNeedMerge && mergeCols.contains(j)) { - if (i === 0 && j === 0) { - createOneEl(0, 0); - } else if (j === 0 && i > 0) { - var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); - if (isNeedMergeRow === true) { - mergeRow(i, j); - preRow[i] = preCol[j]; - preRW[i] = preCW[j]; - } else { - createOneEl(i, j); - } - } else if (i === 0 && j > 0) { - var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); - if (isNeedMergeCol === true) { - mergeCol(i, j); - preCol[j] = preRow[i]; - preCW[j] = preRW[i]; - } else { - createOneEl(i, j); - } - } else { - var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); - var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); - if (isNeedMergeCol && isNeedMergeRow) { - return; - } - if (isNeedMergeCol) { - mergeCol(i, j); - } - if (isNeedMergeRow) { - mergeRow(i, j); - } - if (!isNeedMergeCol && !isNeedMergeRow) { - createOneEl(i, j); - } - } - } else { - createOneEl(i, j); - } - }); - function mergeRow(i, j) { - var height = (preCol[j].attr("height") | 0) + rowSize + 1; - preCol[j].attr("height", height).css("height", height); - //preCW[j].element.css("height", height); - var rowspan = ((preCol[j].attr("rowspan") || 1) | 0) + 1; - preCol[j].attr("rowspan", rowspan); - preCol[j].__mergeRows.pushDistinct(i); - TDs[i][j] = preCol[j]; - Ws[i][j] = preCW[j]; - } - - function mergeCol(i, j) { - if (columnSize[j]) { - var width = preRow[i].attr("width") | 0; - if (width > 1.05 && columnSize[j]) { - width = width + columnSize[j] + 1; - if (j === columnSize.length - 1) { - width--; - } - } else { - width = width + columnSize[j] - } - width = self._calculateWidth(width); - preRow[i].attr("width", width).css("width", width); - preRW[i].element.width(width); - } - var colspan = ((preRow[i].attr("colspan") || 1) | 0) + 1; - preRow[i].attr("colspan", colspan); - preRow[i].__mergeCols.pushDistinct(j); - TDs[i][j] = preRow[i]; - Ws[i][j] = preRW[i]; - } - - function createOneEl(r, c) { - var width = self._calculateWidth(columnSize[c]); - if (width > 1.05 && c === columnSize.length - 1) { - width--; - } - var height = self._calculateHeight(rowSize); - var td = $("<td>").attr("height", height) - .attr("width", width).css({"width": width, "height": height, "position": "relative"}) - .addClass((c & 1) === 0 ? "odd-col" : "even-col") - .addClass(r === 0 ? "first-row" : "") - .addClass(c === 0 ? "first-col" : "") - .addClass(c === rows.length - 1 ? "last-col" : ""); - var w = BI.createWidget(map[r][c], { - type: "bi.table_cell", - textAlign: "left", - width: BI.isNumeric(width) ? width : "", - height: BI.isNumeric(height) ? height : "", - _row: r, - _col: c + start - }); - self.addWidget(w.getName(), w); - w._mount(); - w.element.css("position", "relative"); - td.append(w.element); - tr.append(td); - preCol[c] = td; - preCol[c].__mergeRows = [r]; - preCW[c] = w; - preRow[r] = td; - preRow[r].__mergeCols = [c]; - preRW[r] = w; - TDs[r][c] = td; - Ws[r][c] = w; - } - - frag.appendChild(tr[0]); - }); - return frag; - }, - - _createColGroupCells: function (columnSize, store) { - var self = this, o = this.options; - columnSize = columnSize || o.columnSize; - store = store || {}; - var frag = document.createDocumentFragment(); - BI.each(columnSize, function (i, size) { - var width = self._calculateWidth(size); - var col = $("<col>").attr("width", width).css("width", width); - store[i] = col; - frag.appendChild(col[0]); - }); - return frag; - }, - - _createHeaderCells: function (items, columnSize, mergeCols, TDs, Ws, start) { - var self = this, o = this.options; - start || (start = 0); - var frag = this._createCells(items, columnSize, BI.range(o.columnSize.length), TDs, Ws, start, o.headerRowSize || o.rowSize); - - return frag; - }, - - _createFooterCells: function (items, columnSize, TDs, Ws) { - var o = this.options; - var frag = this._createCells(items, columnSize, [], TDs, Ws, 0); - return frag; - }, - - _createColGroup: function (columnSize, store, widgets) { - var self = this, o = this.options; - this.colgroup = this._colgroup(); - this.colgroup.element.append(this._createColGroupCells(columnSize, store, widgets)); - return this.colgroup; - }, - - _createHeader: function () { - var self = this, o = this.options; - if (o.header === false) { - return; - } - this.header = this._header(); - this.header.element.append(this._createHeaderCells(o.header, null, null, this.headerTds, this.headerItems)); - return this.header; - }, - - _createFooter: function (columnSize, store, widgets) { - var self = this, o = this.options; - if (o.footer === false) { - return; - } - this.footer = this._footer(); - this.footer.element.append(this._createFooterCells(o.footer, null, this.footerTds, this.footerItems)); - return this.footer; - }, - - - _createBody: function () { - var self = this, o = this.options; - this.body = this._body(); - this.body.element.append(this._createCells(o.items, null, null, this.bodyTds, this.bodyItems)); - return this.body; - }, - - _createNormalTable: function () { - var self = this, o = this.options, table = this._table(); - this.colgroupTds = {}; - this.headerTds = {}; - this.footerTds = {}; - this.bodyTds = {}; - - this.headerItems = {}; - this.footerItems = {}; - this.bodyItems = {}; - var colgroup = this._createColGroup(null, this.colgroupTds); - var header = this._createHeader(); - var footer = this._createFooter(); - var body = this._createBody(); - - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, header, footer, body] - }); - - var w = BI.sum(this.options.columnSize) || undefined; - w = this._calculateWidth(w); - if (BI.isNumeric(w) && w > 1) { - w += o.columnSize.length; - } - this.tableContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - }); - - this.scrollBottomRight = BI.createWidget({ - type: "bi.adaptive", - width: "100%", - height: "100%", - cls: "scroll-bottom-right", - scrollable: true, - items: [this.tableContainer] - }); - - BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-right", - element: this, - scrollable: false, - items: [this.scrollBottomRight] - }); - - this._initNormalScroll(); - BI.nextTick(function () { - if (self.element.is(":visible")) { - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); - } - }); - }, - - _initNormalScroll: function () { - var self = this; - this.scrollBottomRight.element.scroll(function (e) { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); - }); - }, - - _split: function (items) { - var o = this.options, left = [], right = [], isRight = this._isRightFreeze(); - BI.each(items, function (i, rows) { - left.push([]); - right.push([]); - BI.each(rows, function (j, cell) { - if (o.freezeCols.contains(j)) { - (isRight ? right : left)[i].push(cell); - } else { - (isRight ? left : right)[i].push(cell); - } - }) - }); - return { - left: left, - right: right - } - }, - - _table: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "table", - cls: "table", - attribute: {"cellspacing": 0, "cellpadding": 0} - }); - }, - - _header: function () { - return BI.createWidget({ - type: "bi.layout", - cls: "header", - tagName: "thead" - }); - }, - - _footer: function () { - return BI.createWidget({ - type: "bi.layout", - cls: "footer", - tagName: "tfoot" - }); - }, - - _body: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "tbody", - cls: "body" - }); - }, - - _colgroup: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "colgroup" - }); - }, - - _init: function () { - BI.Table.superclass._init.apply(this, arguments); - - this.populate(this.options.items); - }, - - setColumnSize: function (columnSize) { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - o.columnSize = columnSize || []; - if (o.isNeedFreeze) { - var columnLeft = []; - var columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - isRight ? columnRight.push(size) : columnLeft.push(size); - } else { - isRight ? columnLeft.push(size) : columnRight.push(size); - } - }); - var topleft = 0, topright = 1, bottomleft = 2, bottomright = 3; - var run = function (direction) { - var colgroupTds, bodyTds, bodyItems, sizes; - switch (direction) { - case topleft: - colgroupTds = self.topLeftColGroupTds; - bodyTds = self.topLeftBodyTds; - bodyItems = self.topLeftBodyItems; - sizes = columnLeft; - break; - case topright: - colgroupTds = self.topRightColGroupTds; - bodyTds = self.topRightBodyTds; - bodyItems = self.topRightBodyItems; - sizes = columnRight; - break; - case bottomleft: - colgroupTds = self.bottomLeftColGroupTds; - bodyTds = self.bottomLeftBodyTds; - bodyItems = self.bottomLeftBodyItems; - sizes = columnLeft; - break; - case bottomright: - colgroupTds = self.bottomRightColGroupTds; - bodyTds = self.bottomRightBodyTds; - bodyItems = self.bottomRightBodyItems; - sizes = columnRight; - break; - } - BI.each(colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (sizes[i] !== "" && width !== sizes[i]) { - var w = self._calculateWidth(sizes[i]); - colgroup.attr("width", w).css("width", w); - BI.each(bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(bodyItems, function (j, items) { - if (items[i]) { - if (bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }) - }; - run(topleft); - run(topright); - run(bottomleft); - run(bottomright); - - var lw = 0, rw = 0; - this.columnLeft = []; - this.columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - lw += size; - self[isRight ? "columnRight" : "columnLeft"].push(size); - } else { - rw += size; - self[isRight ? "columnLeft" : "columnRight"].push(size); - } - }); - lw = this._calculateWidth(lw); - rw = this._calculateWidth(rw); - - if (BI.isNumeric(lw)) { - lw = BI.parseFloat(lw) + o.freezeCols.length; - } - if (BI.isNumeric(rw)) { - rw = BI.parseFloat(rw) + o.columnSize.length - o.freezeCols.length; - } - this.topLeftContainer.element.width(isRight ? rw : lw); - this.bottomLeftContainer.element.width(isRight ? rw : lw); - this.topRightContainer.element.width(isRight ? lw : rw); - this.bottomRightContainer.element.width(isRight ? lw : rw); - this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; - this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; - } else { - BI.each(this.colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (o.columnSize[i] !== "" && width !== o.columnSize[i]) { - var w = self._calculateWidth(o.columnSize[i]); - colgroup.attr("width", w).css("width", w); - BI.each(self.bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.headerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.footerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.bodyItems, function (j, items) { - if (items[i]) { - if (self.bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - BI.each(self.headerItems, function (j, items) { - if (items[i]) { - if (self.headerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.headerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.headerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - BI.each(self.footerItems, function (j, items) { - if (items[i]) { - if (self.footerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.footerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.footerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }); - var w = this._calculateWidth(BI.sum(o.columnSize)); - if (w > 1.05) { - w += o.columnSize.length; - } - if (w > 1.05) { - this.tableContainer.element.width(w); - } - } - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getCalculateColumnSize: function () { - var self = this, o = this.options; - var columnSize = []; - if (o.isNeedFreeze === true) { - if (BI.size(this.bottomLeftBodyTds) > 0 || BI.size(this.bottomRightBodyTds) > 0) { - if (!BI.any(this.bottomLeftBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.bottomLeftBodyTds[0], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.bottomLeftBodyTds[0]) - 1) { - width++; - } - columnSize.push(width); - }); - } - if (!BI.any(this.bottomRightBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.bottomRightBodyTds[0], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.bottomRightBodyTds[0]) - 1) { - width++; - } - columnSize.push(width); - }); - } - return columnSize; - } - if (!BI.any(this.topLeftBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.topLeftBodyTds[BI.size(self.topLeftBodyTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - if (!BI.any(this.topRightBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.topRightBodyTds[BI.size(self.topRightBodyTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - } else { - BI.each(this.headerTds[BI.size(this.headerTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.headerTds[BI.size(self.headerTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - return columnSize; - }, - - setHeaderColumnSize: function (columnSize) { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - if (o.isNeedFreeze) { - var columnLeft = []; - var columnRight = []; - BI.each(columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - isRight ? columnRight.push(size) : columnLeft.push(size); - } else { - isRight ? columnLeft.push(size) : columnRight.push(size); - } - }); - var topleft = 0, topright = 1; - var run = function (direction) { - var colgroupTds, bodyTds, bodyItems, sizes; - switch (direction) { - case topleft: - colgroupTds = self.topLeftColGroupTds; - bodyTds = self.topLeftBodyTds; - bodyItems = self.topLeftBodyItems; - sizes = columnLeft; - break; - case topright: - colgroupTds = self.topRightColGroupTds; - bodyTds = self.topRightBodyTds; - bodyItems = self.topRightBodyItems; - sizes = columnRight; - break; - } - BI.each(colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (width !== sizes[i]) { - var w = self._calculateWidth(sizes[i]); - colgroup.attr("width", w).css("width", w); - BI.each(bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(bodyItems, function (j, items) { - if (items[i]) { - if (bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }) - }; - run(topleft); - run(topright); - - var lw = 0, rw = 0; - BI.each(columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - lw += size; - } else { - rw += size; - } - }); - lw = this._calculateWidth(lw); - rw = this._calculateWidth(rw); - - if (BI.isNumeric(lw)) { - lw = BI.parseFloat(lw) + o.freezeCols.length; - } - if (BI.isNumeric(rw)) { - rw = BI.parseFloat(rw) + columnSize.length - o.freezeCols.length; - } - this.topLeftContainer.element.width(isRight ? rw : lw); - this.topRightContainer.element.width(isRight ? lw : rw); - this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; - this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; - } else { - BI.each(this.colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (width !== columnSize[i]) { - var w = self._calculateWidth(columnSize[i]); - colgroup.attr("width", w).css("width", w); - BI.each(self.headerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.headerItems, function (j, items) { - if (items[i]) { - if (self.headerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(columnSize, function (t, s) { - if (self.headerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.headerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }); - var cW = this._calculateWidth(BI.sum(columnSize)); - if (cW > 1.05) { - cW = cW + columnSize.length; - } - this.tableContainer.element.width(cW); - } - }, - - setRegionColumnSize: function (columnSize) { - var self = this, o = this.options; - o.regionColumnSize = columnSize; - if (o.freezeCols.length === 0) { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", this._isRightFreeze() ? ['fill', 0] : [0, 'fill']); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } else if (o.freezeCols.length > 0 && o.freezeCols.length < o.columnSize.length) { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", columnSize); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } else { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", this._isRightFreeze() ? [0, 'fill'] : ['fill', 0]); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - getCalculateRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element.width(), this.scrollBottomRight.element.width()]; - } - return [this.scrollBottomRight.element.width()]; - }, - - getCalculateRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollTopRight.element.height(), this.scrollBottomRight.element.height()]; - } - return [this.scrollBottomRight.element.height()]; - }, - - getClientRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].clientWidth, this.scrollBottomRight.element[0].clientWidth]; - } - return [this.scrollBottomRight.element[0].clientWidth]; - }, - - getClientRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].clientHeight, this.scrollBottomRight.element[0].clientHeight]; - } - return [this.scrollBottomRight.element[0].clientHeight]; - }, - - getScrollRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].scrollWidth, this.scrollBottomRight.element[0].scrollWidth]; - } - return [this.scrollBottomRight.element[0].scrollWidth]; - }, - - getScrollRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - if (o.freezeCols.length < o.columnSize.length) { - return [this.scrollTopRight.element[0].scrollHeight, this.scrollBottomRight.element[0].scrollHeight]; - } else { - return [this.scrollTopLeft.element[0].scrollHeight, this.scrollBottomLeft.element[0].scrollHeight]; - } - } - return [this.scrollBottomRight.element[0].scrollHeight]; - }, - - hasVerticalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element.hasVerticalScroll() || this.scrollBottomLeft.element.hasVerticalScroll(); - } - return this.scrollBottomRight.element.hasVerticalScroll(); - }, - - setVerticalScroll: function (scrollTop) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { - this.scrollBottomRight.element[0].scrollTop = scrollTop; - } - if (this.scrollBottomLeft.element[0].scrollTop !== scrollTop) { - this.scrollBottomLeft.element[0].scrollTop = scrollTop; - } - } else { - if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { - this.scrollBottomRight.element[0].scrollTop = scrollTop; - } - } - }, - - setLeftHorizontalScroll: function (scrollLeft) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomLeft.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomLeft.element[0].scrollLeft = scrollLeft; - } - if (this.scrollTopLeft.element[0].scrollLeft !== scrollLeft) { - this.scrollTopLeft.element[0].scrollLeft = scrollLeft; - } - } else { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - } - }, - - setRightHorizontalScroll: function (scrollLeft) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - if (this.scrollTopRight.element[0].scrollLeft !== scrollLeft) { - this.scrollTopRight.element[0].scrollLeft = scrollLeft; - } - } else { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - } - }, - - getVerticalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element[0].scrollTop || this.scrollBottomLeft.element[0].scrollTop; - } - return this.scrollBottomRight.element[0].scrollTop; - }, - - getLeftHorizontalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomLeft.element[0].scrollLeft; - } - return this.scrollBottomRight.element[0].scrollLeft; - }, - - getRightHorizontalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element[0].scrollLeft; - } - return this.scrollBottomRight.element[0].scrollLeft; - }, - - getColumns: function () { - var o = this.options; - if (o.isNeedFreeze) { - return { - topLeft: this.topLeftBodyItems, - topRight: this.topRightBodyItems, - bottomLeft: this.bottomLeftBodyItems, - bottomRight: this.bottomRightBodyItems - } - } else { - return { - header: this.headerItems, - body: this.bodyItems, - footer: this.footerItems - } - } - }, - - populate: function (items, header) { - this.options.items = items || []; - if (header) { - this.options.header = header; - } - this.empty(); - if (this.options.isNeedFreeze) { - this._createFreezeTable(); - } else { - this._createNormalTable(); - } - } -}) -; -BI.Table.EVENT_TABLE_AFTER_INIT = "EVENT_TABLE_AFTER_INIT"; -BI.Table.EVENT_TABLE_RESIZE = "EVENT_TABLE_RESIZE"; -BI.Table.EVENT_TABLE_SCROLL = "EVENT_TABLE_SCROLL"; -BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE = "EVENT_TABLE_BEFORE_COLUMN_RESIZE"; -BI.Table.EVENT_TABLE_COLUMN_RESIZE = "EVENT_TABLE_COLUMN_RESIZE"; -BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE"; - -BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE"; -BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE"; -BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE"; -BI.shortcut("bi.table_view", BI.Table); +/*! + * jQuery Mousewheel 3.1.13 + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + */ + +(function (factory) { + if ( typeof define === 'function' && define.amd ) { + // AMD. Register as an anonymous module. + define(['../core/jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS style for Browserify + module.exports = factory; + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + + var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], + toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? + ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], + slice = Array.prototype.slice, + nullLowestDeltaTimeout, lowestDelta; + + if ( $.event.fixHooks ) { + for ( var i = toFix.length; i; ) { + $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; + } + } + + var special = $.event.special.mousewheel = { + version: '3.1.12', + + setup: function() { + if ( this.addEventListener ) { + for ( var i = toBind.length; i; ) { + this.addEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i = toBind.length; i; ) { + this.removeEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + }, + + settings: { + adjustOldDeltas: true, // see shouldAdjustOldDeltas() below + normalizeOffset: true // calls getBoundingClientRect for each event + } + }; + + $.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); + }, + + unmousewheel: function(fn) { + return this.unbind('mousewheel', fn); + } + }); + + + function handler(event) { + var orgEvent = event || window.event, + args = slice.call(arguments, 1), + delta = 0, + deltaX = 0, + deltaY = 0, + absDelta = 0, + offsetX = 0, + offsetY = 0; + event = $.event.fix(orgEvent); + event.type = 'mousewheel'; + + // Old school scrollwheel delta + if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } + if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } + if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } + if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } + + // Firefox < 17 horizontal scrolling related to DOMMouseScroll event + if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaX = deltaY * -1; + deltaY = 0; + } + + // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy + delta = deltaY === 0 ? deltaX : deltaY; + + // New school wheel delta (wheel event) + if ( 'deltaY' in orgEvent ) { + deltaY = orgEvent.deltaY * -1; + delta = deltaY; + } + if ( 'deltaX' in orgEvent ) { + deltaX = orgEvent.deltaX; + if ( deltaY === 0 ) { delta = deltaX * -1; } + } + + // No change actually happened, no reason to go any further + if ( deltaY === 0 && deltaX === 0 ) { return; } + + // Need to convert lines and pages to pixels if we aren't already in pixels + // There are three delta modes: + // * deltaMode 0 is by pixels, nothing to do + // * deltaMode 1 is by lines + // * deltaMode 2 is by pages + if ( orgEvent.deltaMode === 1 ) { + var lineHeight = 40; + delta *= lineHeight; + deltaY *= lineHeight; + deltaX *= lineHeight; + } else if ( orgEvent.deltaMode === 2 ) { + var pageHeight = 800; + delta *= pageHeight; + deltaY *= pageHeight; + deltaX *= pageHeight; + } + + // Store lowest absolute delta to normalize the delta values + absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); + + if ( !lowestDelta || absDelta < lowestDelta ) { + lowestDelta = absDelta; + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + lowestDelta /= 40; + } + } + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + // Divide all the things by 40! + delta /= 40; + deltaX /= 40; + deltaY /= 40; + } + + // Get a whole, normalized value for the deltas + delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); + deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); + deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); + + // Normalise offsetX and offsetY properties + if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { + var boundingRect = this.getBoundingClientRect(); + offsetX = event.clientX - boundingRect.left; + offsetY = event.clientY - boundingRect.top; + } + + // Add information to the event object + event.deltaX = deltaX; + event.deltaY = deltaY; + event.deltaFactor = lowestDelta; + event.offsetX = offsetX; + event.offsetY = offsetY; + // Go ahead and set deltaMode to 0 since we converted to pixels + // Although this is a little odd since we overwrite the deltaX/Y + // properties with normalized deltas. + event.deltaMode = 0; + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + // Clearout lowestDelta after sometime to better + // handle multiple device types that give different + // a different lowestDelta + // Ex: trackpad = 3 and mouse wheel = 120 + if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } + nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); + + return ($.event.dispatch || $.event.handle).apply(this, args); + } + + function nullLowestDelta() { + lowestDelta = null; + } + + function shouldAdjustOldDeltas(orgEvent, absDelta) { + // If this is an older event and the delta is divisable by 120, + // then we are assuming that the browser is treating this as an + // older mouse wheel event and that we should divide the deltas + // by 40 to try and get a more usable deltaFactor. + // Side note, this actually impacts the reported scroll distance + // in older browsers and can cause scrolling to be slower than native. + // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. + return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; + } + +}));/** + * 当没有元素时有提示信息的view + * + * Created by GUY on 2015/9/8. + * @class BI.Pane + * @extends BI.Widget + * @abstract + */ +BI.Pane = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-pane", + tipText: BI.i18nText("BI-No_Selected_Item"), + overlap: true, + onLoaded: BI.emptyFn + }) + }, + + _init: function () { + BI.Pane.superclass._init.apply(this, arguments); + }, + + _assertTip: function () { + var o = this.options; + if (!this._tipText) { + this._tipText = BI.createWidget({ + type: "bi.label", + cls: "bi-tips", + text: o.tipText, + height: 25 + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this._tipText], + bgap: 25 + }); + } + }, + + loading: function () { + var self = this, o = this.options; + if (o.overlap === true) { + if (!BI.Layers.has(this.getName())) { + BI.createWidget({ + type: 'bi.vtape', + items: [{ + el: { + type: "bi.layout", + cls: "loading-background" + }, + height: 30 + }], + element: BI.Layers.make(this.getName(), this) + }); + } + BI.Layers.show(self.getName()); + } else if (BI.isNull(this._loading)) { + this._loading = BI.createWidget({ + type: "bi.layout", + cls: "loading-background", + height: 30 + }); + this._loading.element.css("zIndex", 1); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this._loading, + left: 0, + right: 0, + top: 0 + }] + }) + } + }, + + loaded: function () { + var self = this, o = this.options; + BI.Layers.remove(self.getName()); + this._loading && this._loading.destroy(); + this._loading && (this._loading = null); + o.onLoaded(); + self.fireEvent(BI.Pane.EVENT_LOADED); + }, + + check: function () { + this.setTipVisible(BI.isEmpty(this.options.items)); + }, + + setTipVisible: function (b) { + if (b === true) { + this._assertTip(); + this._tipText.setVisible(true); + } else { + this._tipText && this._tipText.setVisible(false); + } + }, + + populate: function (items) { + this.options.items = items || []; + this.check(); + }, + + empty: function () { + + } +}); +BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** + * guy + * 这仅仅只是一个超类, 所有简单控件的基类 + * 1、类的控制, + * 2、title的控制 + * 3、文字超过边界显示3个点 + * 4、cursor默认pointor + * @class BI.Single + * @extends BI.Widget + * @abstract + */ +BI.Single = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-single", + readonly: false, + title: null, + warningTitle: null, + tipType: null, // success或warning + value: null + }) + }, + + _showToolTip: function (e, opt) { + opt || (opt = {}); + var self = this; + var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); + var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); + if (BI.isKey(title)) { + BI.Tooltips.show(e, this.getName(), title, type, this, opt); + } + }, + + _hideTooltip: function () { + var self = this; + var tooltip = BI.Tooltips.get(this.getName()); + if (BI.isNotNull(tooltip)) { + tooltip.element.fadeOut(200, function () { + BI.Tooltips.remove(self.getName()); + }); + } + }, + + _init: function () { + BI.Single.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isKey(o.title) || BI.isKey(o.warningTitle) + || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { + this.enableHover(); + } + }, + + enableHover: function (opt) { + opt || (opt = {}); + var self = this; + if (!this._hoverBinded) { + this.element.on("mouseenter.title" + this.getName(), function (e) { + self._e = e; + if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { + self.timeout = BI.delay(function () { + self._showToolTip(self._e || e, opt); + }, 200); + } else if (self.getTipType() === "success" || self.isEnabled()) { + self.timeout = BI.delay(function () { + self._showToolTip(self._e || e, opt); + }, 500); + } + }); + this.element.on("mousemove.title" + this.getName(), function (e) { + self._e = e; + if (!self.element.__isMouseInBounds__(e)) { + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + } + }); + this.element.on("mouseleave.title" + this.getName(), function () { + self._e = null; + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + }); + this._hoverBinded = true; + } + }, + + disabledHover: function () { + //取消hover事件 + if (BI.isNotNull(this.timeout)) { + clearTimeout(this.timeout); + } + this._hideTooltip(); + $(this.element).unbind("mouseenter.title" + this.getName()) + .unbind("mousemove.title" + this.getName()) + .unbind("mouseleave.title" + this.getName()); + this._hoverBinded = false; + }, + + populate: function (items) { + this.items = items || []; + }, + + //opt: {container: '', belowMouse: false} + setTitle: function (title, opt) { + this.options.title = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + setWarningTitle: function (title, opt) { + this.options.warningTitle = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + getTipType: function () { + return this.options.tipType; + }, + + isReadOnly: function () { + return !!this.options.readonly; + }, + + getTitle: function () { + var title = this.options.title; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + getWarningTitle: function () { + var title = this.options.warningTitle; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + setValue: function (val) { + if (!this.options.readonly) { + this.options.value = val; + } + }, + + getValue: function () { + return this.options.value; + } +});/** + * guy 表示一行数据,通过position来定位位置的数据 + * @class BI.Text + * @extends BI.Single + */ +BI.Text = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Text.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text", + textAlign: "left", + whiteSpace: "normal", + lineHeight: null, + handler: null,//如果传入handler,表示处理文字的点击事件,不是区域的 + hgap: 0, + vgap: 0, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + text: "", + py: "" + }) + }, + + _init: function () { + BI.Text.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.hgap + o.lgap > 0) { + this.element.css({ + "padding-left": o.hgap + o.lgap + "px" + }) + } + if (o.hgap + o.rgap > 0) { + this.element.css({ + "padding-right": o.hgap + o.rgap + "px" + }) + } + if (o.vgap + o.tgap > 0) { + this.element.css({ + "padding-top": o.vgap + o.tgap + "px" + }) + } + if (o.vgap + o.bgap > 0) { + this.element.css({ + "padding-bottom": o.vgap + o.bgap + "px" + }) + } + if (BI.isNumber(o.height)) { + this.element.css({"lineHeight": o.height + "px"}); + } + if (BI.isNumber(o.lineHeight)) { + this.element.css({"lineHeight": o.lineHeight + "px"}); + } + this.element.css({ + "textAlign": o.textAlign, + "whiteSpace": o.whiteSpace + }); + if (o.handler) { + this.text = BI.createWidget({ + type: "bi.layout", + tagName: 'span' + }); + this.text.element.click(function () { + o.handler(self.getValue()); + }); + BI.createWidget({ + type: "bi.default", + element: this, + items: [this.text] + }); + } else { + this.text = this; + } + if (BI.isKey(o.text)) { + this.setText(o.text); + } else if (BI.isKey(o.value)) { + this.setText(o.value); + } + if (BI.isKey(o.keyword)) { + this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); + } + }, + + doRedMark: function (keyword) { + var o = this.options; + this.text.element.__textKeywordMarked__(o.text || o.value, keyword, o.py); + }, + + unRedMark: function () { + var o = this.options; + this.text.element.__textKeywordMarked__(o.text || o.value, "", o.py); + }, + + doHighLight: function () { + this.text.element.addClass("bi-high-light"); + }, + + unHighLight: function () { + this.text.element.removeClass("bi-high-light"); + }, + + setValue: function (text) { + BI.Text.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.setText(text); + } + }, + + setStyle: function (css) { + this.text.element.css(css) + }, + + setText: function (text) { + BI.Text.superclass.setText.apply(this, arguments); + this.options.text = text; + this.text.element.text((text + "").replaceAll(" ", " ")); + } +}); + +BI.shortcut("bi.text", BI.Text);/** + * guy + * @class BI.BasicButton + * @extends BI.Single + * + * 一般的button父级 + */ +BI.BasicButton = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), + value: "", + text: "", + stopEvent: false, + stopPropagation: false, + selected: false, + once: false, //点击一次选中有效,再点无效 + forceSelected: false, //点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发 + forceNotSelected: false, //无论怎么点击都不会被选中 + disableSelected: false, //使能选中 + + shadow: false, + isShadowShowingOnSelected: false, //选中状态下是否显示阴影 + trigger: null, + handler: BI.emptyFn + }) + }, + _init: function () { + BI.BasicButton.superclass._init.apply(this, arguments); + var opts = this.options; + if (opts.selected === true) { + BI.nextTick(BI.bind(function () { + this.setSelected(opts.selected); + }, this)); + } + BI.nextTick(BI.bind(this.bindEvent, this)); + + if (opts.shadow) { + this._createShadow(); + } + }, + + _createShadow: function () { + var self = this, o = this.options; + + var assertMask = function () { + if (!self.$mask) { + self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, { + type: "bi.layout", + cls: "bi-button-mask" + }); + self.$mask.invisible(); + BI.createWidget({ + type: "bi.absolute", + element: self, + items: [{ + el: self.$mask, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + } + }; + + this.element.mouseup(function () { + if (!self._hover && !o.isShadowShowingOnSelected) { + assertMask(); + self.$mask.invisible(); + } + }); + this.element.on("mouseenter." + this.getName(), function (e) { + if (self.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) { + assertMask(); + self.$mask.visible(); + } + } + }); + this.element.on("mousemove." + this.getName(), function (e) { + if (!self.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && !self._hover) { + assertMask(); + self.$mask.invisible(); + } + } + }); + this.element.on("mouseleave." + this.getName(), function () { + if (self.isEnabled() && !self._hover) { + assertMask(); + self.$mask.invisible(); + } + }); + }, + + bindEvent: function () { + var self = this; + var o = this.options, hand = this.handle(); + if (!hand) { + return; + } + hand = hand.element; + var triggerArr = (o.trigger || "").split(","); + BI.each(triggerArr, function (idx, trigger) { + switch (trigger) { + case "mouseup": + var mouseDown = false; + hand.mousedown(function () { + mouseDown = true; + ev(e); + }); + hand.mouseup(function (e) { + if (mouseDown === true) { + clk(e); + } + mouseDown = false; + ev(e); + }); + break; + case "mousedown": + var mouseDown = false; + var selected = false; + hand.mousedown(function (e) { + // if (e.button === 0) { + $(document).bind("mouseup." + self.getName(), function (e) { + // if (e.button === 0) { + if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { + // self.setSelected(!self.isSelected()); + self._trigger(); + } + mouseDown = false; + $(document).unbind("mouseup." + self.getName()); + // } + }); + if (mouseDown === true) { + return; + } + if (self.isSelected()) { + selected = true; + } else { + clk(e); + } + mouseDown = true; + ev(e); + // } + }); + hand.mouseup(function (e) { + // if (e.button === 0) { + if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { + clk(e); + } + mouseDown = false; + selected = false; + $(document).unbind("mouseup." + self.getName()); + // } + }); + break; + case "dblclick": + hand.dblclick(clk); + break; + case "lclick": + var mouseDown = false; + var interval; + hand.mousedown(function (e) { + $(document).bind("mouseup." + self.getName(), function (e) { + interval && clearInterval(interval); + interval = null; + mouseDown = false; + $(document).unbind("mouseup." + self.getName()); + }); + if (mouseDown === true) { + return; + } + if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + return; + } + interval = setInterval(function () { + self.doClick(); + }, 100); + mouseDown = true; + ev(e); + }); + break; + default: + if (o.stopEvent || o.stopPropagation) { + hand.mousedown(function (e) { + ev(e); + }); + hand.mouseup(function (e) { + ev(e); + }); + } + hand.click(clk); + break; + } + }); + + //之后的300ms点击无效 + var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true); + + function ev(e) { + if (o.stopEvent) { + e.stopEvent(); + } + if (o.stopPropagation) { + e.stopPropagation(); + } + } + + function clk(e) { + ev(e); + if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + return; + } + onClick.apply(self, arguments); + } + }, + + _trigger: function () { + var o = this.options; + if(!this.isEnabled()){ + return; + } + if (!this.isDisableSelected()) { + this.isForceSelected() ? this.setSelected(true) : + (this.isForceNotSelected() ? this.setSelected(false) : + this.setSelected(!this.isSelected())); + } + if (this.isValid()) { + o.handler.call(this, this.getValue(), this); + var v = this.getValue(); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this); + this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this); + } + }, + + _doClick: function (e) { + if (this.isValid()) { + this.beforeClick(e); + } + this._trigger(); + if (this.isValid()) { + this.doClick(e); + } + }, + + beforeClick: function () { + + }, + + doClick: function () { + + }, + + handle: function () { + return this; + }, + + hover: function () { + this._hover = true; + this.handle().element.addClass("hover"); + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(true); + } + }, + + dishover: function () { + this._hover = false; + this.handle().element.removeClass("hover"); + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(false); + } + }, + + setSelected: function (b) { + var o = this.options; + o.selected = b; + if (b) { + this.handle().element.addClass("active"); + } else { + this.handle().element.removeClass("active"); + } + if (o.shadow && !o.isShadowShowingOnSelected) { + this.$mask && this.$mask.setVisible(false); + } + }, + + isSelected: function () { + return this.options.selected; + }, + + isOnce: function () { + return this.options.once; + }, + + isForceSelected: function () { + return this.options.forceSelected; + }, + + isForceNotSelected: function () { + return this.options.forceNotSelected; + }, + + isDisableSelected: function () { + return this.options.disableSelected; + }, + + setText: function (text) { + this.options.text = text; + }, + + getText: function () { + return this.options.text; + }, + + _setEnable: function (enable) { + BI.BasicButton.superclass._setEnable.apply(this, arguments); + if (enable === true) { + this.element.removeClass("base-disabled disabled"); + } else if (enable === false) { + this.element.addClass("base-disabled disabled"); + } + if (!enable) { + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(false); + } + } + }, + + empty: function () { + $(document).unbind("mouseup." + this.getName()); + BI.BasicButton.superclass.empty.apply(this, arguments); + }, + + destroy: function () { + BI.BasicButton.superclass.destroy.apply(this, arguments); + } +}); +BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** + * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 + * + * Created by GUY on 2015/9/9. + * @class BI.NodeButton + * @extends BI.BasicButton + * @abstract + */ +BI.NodeButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function() { + var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend( conf, { + baseCls: (conf.baseCls || "") + " bi-node", + open: false + }) + }, + + _init:function() { + BI.NodeButton.superclass._init.apply(this, arguments); + var self = this; + BI.nextTick(function(){ + self.setOpened(self.isOpened()); + }) + }, + + doClick: function(){ + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.setOpened(!this.isOpened()); + }, + + isOnce: function(){ + return false; + }, + + isOpened: function(){ + return !!this.options.open; + }, + + setOpened: function(b){ + this.options.open = !!b; + }, + + triggerCollapse: function(){ + if(this.isOpened()) { + this.setOpened(false); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); + } + }, + + triggerExpand: function(){ + if(!this.isOpened()) { + this.setOpened(true); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); + } + } +});/** + * guy + * tip提示 + * zIndex在10亿级别 + * @class BI.Tip + * @extends BI.Single + * @abstract + */ +BI.Tip = BI.inherit(BI.Single, { + _defaultConfig: function() { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-tip", + zIndex: BI.zIndex_tip + }) + }, + + _init : function() { + BI.Tip.superclass._init.apply(this, arguments); + this.element.css({"zIndex": this.options.zIndex}); + } +});/** + * Created by GUY on 2015/6/26. + * @class BI.ButtonGroup + * @extends BI.Widget + */ + +BI.ButtonGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-button-group", + behaviors: {}, + items: [], + chooseType: BI.Selection.Single, + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }) + }, + + _init: function () { + BI.ButtonGroup.superclass._init.apply(this, arguments); + var behaviors = {}; + BI.each(this.options.behaviors, function (key, rule) { + behaviors[key] = BI.BehaviorFactory.createBehavior(key, { + rule: rule + }) + }); + this.behaviors = behaviors; + this.populate(this.options.items); + }, + + _createBtns: function (items) { + var o = this.options; + return BI.createWidgets(BI.createItems(items, { + type: "bi.text_button" + })); + }, + + _btnsCreator: function (items) { + var self = this, args = Array.prototype.slice.call(arguments), o = this.options; + var buttons = this._createBtns(items); + args[0] = buttons; + + BI.each(this.behaviors, function (i, behavior) { + behavior.doBehavior.apply(behavior, args); + }); + BI.each(buttons, function (i, btn) { + btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + switch (o.chooseType) { + case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: + self.setValue(btn.getValue()); + break; + case BI.ButtonGroup.CHOOSE_TYPE_NONE: + self.setValue([]); + break; + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }); + btn.on(BI.Events.DESTROY, function () { + BI.remove(self.buttons, btn); + }) + }); + + return buttons; + }, + + _packageBtns: function (btns) { + var o = this.options; + for (var i = o.layouts.length - 1; i > 0; i--) { + btns = BI.map(btns, function (k, it) { + return BI.extend({}, o.layouts[i], { + items: [ + BI.extend({}, o.layouts[i].el, { + el: it + }) + ] + }) + }) + } + return btns; + }, + + _packageSimpleItems: function (btns) { + var o = this.options; + return BI.map(o.items, function (i, item) { + if (BI.stripEL(item) === item) { + return btns[i]; + } + return BI.extend({}, item, { + el: btns[i] + }) + }) + }, + + _packageItems: function (items, packBtns) { + return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); + }, + + _packageLayout: function (items) { + var o = this.options, layout = BI.deepClone(o.layouts[0]); + + var lay = BI.formatEL(layout).el; + while (lay && lay.items && !BI.isEmpty(lay.items)) { + lay = BI.formatEL(lay.items[0]).el; + } + lay.items = items; + return layout; + }, + + //如果是一个简单的layout + _isSimpleLayout: function () { + var o = this.options; + return o.layouts.length === 1 && !BI.isArray(o.items[0]) + }, + + doBehavior: function () { + var args = Array.prototype.slice.call(arguments); + args.unshift(this.buttons); + BI.each(this.behaviors, function (i, behavior) { + behavior.doBehavior.apply(behavior, args); + }) + }, + + prependItems: function (items) { + var o = this.options; + var btns = this._btnsCreator.apply(this, arguments); + this.buttons = BI.concat(btns, this.buttons); + + if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) { + this.layouts.prependItems(btns); + return; + } + + items = this._packageItems(items, this._packageBtns(btns)); + this.layouts.prependItems(this._packageLayout(items).items); + }, + + addItems: function (items) { + var o = this.options; + var btns = this._btnsCreator.apply(this, arguments); + this.buttons = BI.concat(this.buttons, btns); + + //如果是一个简单的layout + if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) { + this.layouts.addItems(btns); + return; + } + + items = this._packageItems(items, this._packageBtns(btns)); + this.layouts.addItems(this._packageLayout(items).items); + }, + + removeItemAt: function (indexes) { + BI.removeAt(this.buttons, indexes); + this.layouts.removeItemAt(indexes); + }, + + removeItems: function (values) { + values = BI.isArray(values) ? values : [values]; + var deleted = []; + BI.each(this.buttons, function (i, button) { + if (BI.deepContains(values, button.getValue())) { + deleted.push(i); + } + }); + BI.removeAt(this.buttons, deleted); + this.layouts.removeItemAt(deleted); + }, + + populate: function (items) { + items = items || []; + this.empty(); + this.options.items = items; + + this.buttons = this._btnsCreator.apply(this, arguments); + if (this._isSimpleLayout()) { + items = this._packageSimpleItems(this.buttons); + } else { + items = this._packageItems(items, this._packageBtns(this.buttons)); + } + + this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setSelected && item.setSelected(false); + } else { + item.setSelected && item.setSelected(true); + } + }); + }, + + setEnabledValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setEnable(true); + } else { + item.setEnable(false); + } + }); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setSelected && item.setSelected(true); + } else { + item.setSelected && item.setSelected(false); + } + }); + }, + + getNotSelectedValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !(item.isSelected && item.isSelected())) { + v.push(item.getValue()); + } + }); + return v; + }, + + getValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && item.isSelected && item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getAllButtons: function () { + return this.buttons; + }, + + getAllLeaves: function () { + return this.buttons; + }, + + getSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isSelected && item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getNotSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isSelected && !item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getIndexByValue: function (value) { + var index = -1; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.getValue() === value) { + index = i; + return true; + } + }); + return index; + }, + + getNodeById: function (id) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.options.id === id) { + node = item; + return true; + } + }); + return node; + }, + + getNodeByValue: function (value) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.getValue() === value) { + node = item; + return true; + } + }); + return node; + }, + + empty: function () { + BI.ButtonGroup.superclass.empty.apply(this, arguments); + this.options.items = []; + }, + + destroy: function () { + BI.ButtonGroup.superclass.destroy.apply(this, arguments); + this.options.items = []; + } +}); +BI.extend(BI.ButtonGroup, { + CHOOSE_TYPE_SINGLE: BI.Selection.Single, + CHOOSE_TYPE_MULTI: BI.Selection.Multi, + CHOOSE_TYPE_ALL: BI.Selection.All, + CHOOSE_TYPE_NONE: BI.Selection.None, + CHOOSE_TYPE_DEFAULT: BI.Selection.Default +}); +BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.button_group", BI.ButtonGroup);/** + * Created by GUY on 2015/8/10. + * @class BI.ButtonTree + * @extends BI.ButtonGroup + */ + +BI.ButtonTree = BI.inherit(BI.ButtonGroup, { + _defaultConfig: function () { + return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-button-tree" + }) + }, + + _init: function () { + BI.ButtonTree.superclass._init.apply(this, arguments); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (!BI.isFunction(item.setSelected)) { + item.setNotSelectedValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setSelected(false); + } else { + item.setSelected(true); + } + }); + }, + + setEnabledValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.isFunction(item.setEnabledValue)) { + item.setEnabledValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setEnable(true); + } else { + item.setEnable(false); + } + }); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (!BI.isFunction(item.setSelected)) { + item.setValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setSelected(true); + } else { + item.setSelected(false); + } + }); + }, + + getNotSelectedValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + v = BI.concat(v, item.getNotSelectedValue()); + return; + } + if (item.isEnabled() && item.isSelected && !item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + v = BI.concat(v, item.getValue()); + return; + } + if (item.isEnabled() && item.isSelected && item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + btns = btns.concat(item.getSelectedButtons()); + return; + } + if (item.isSelected && item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getNotSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + btns = btns.concat(item.getNotSelectedButtons()); + return; + } + if (item.isSelected && !item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + //获取所有的叶子节点 + getAllLeaves: function () { + var leaves = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + leaves = leaves.concat(item.getAllLeaves()); + return; + } + if (item.isEnabled()) { + leaves.push(item); + } + }); + return leaves; + }, + + getIndexByValue: function (value) { + var index = -1; + BI.any(this.buttons, function (i, item) { + var vs = item.getValue(); + if (item.isEnabled() && (vs === value || BI.contains(vs, value))) { + index = i; + return true; + } + }); + return index; + }, + + getNodeById: function (id) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled()) { + if (item.attr("id") === id) { + node = item; + return true; + } else if (BI.isFunction(item.getNodeById)) { + if (node = item.getNodeById(id)) { + return true; + } + } + } + }); + return node; + }, + + getNodeByValue: function (value) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled()) { + if (BI.isFunction(item.getNodeByValue)) { + if (node = item.getNodeByValue(value)) { + return true; + } + } else if (item.attr("value") === value) { + node = item; + return true; + } + } + }); + return node; + } +}); +BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.button_tree", BI.ButtonTree);/** + * guy + * 异步树 + * @class BI.TreeView + * @extends BI.Pane + */ +BI.TreeView = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tree", + paras: {}, + itemsCreator: BI.emptyFn + }) + }, + _init: function () { + BI.TreeView.superclass._init.apply(this, arguments); + this._stop = false; + + this._createTree(); + this.tip = BI.createWidget({ + type: "bi.loading_bar", + invisible: true, + handler: BI.bind(this._loadMore, this) + }); + BI.createWidget({ + type: "bi.vertical", + scrollable: true, + scrolly: false, + element: this, + items: [this.tip] + }); + + }, + + _createTree: function () { + this.id = "bi-tree" + BI.UUID(); + if (this.nodes) { + this.nodes.destroy(); + } + if (this.tree) { + this.tree.destroy(); + } + this.tree = BI.createWidget({ + type: "bi.layout", + element: "<ul id='" + this.id + "' class='ztree'></ul>" + }); + BI.createWidget({ + type: "bi.default", + element: this.element, + items: [this.tree] + }); + }, + + //选择节点触发方法 + _selectTreeNode: function (treeId, treeNode) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this); + this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this); + }, + + //配置属性 + _configSetting: function () { + var paras = this.options.paras; + var self = this; + var setting = { + async: { + enable: true, + url: getUrl, + autoParam: ["id", "name"], + otherParam: BI.cjkEncodeDO(paras) + }, + check: { + enable: true + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true, + dblClickExpand: false + }, + callback: { + beforeExpand: beforeExpand, + onAsyncSuccess: onAsyncSuccess, + onAsyncError: onAsyncError, + beforeCheck: beforeCheck, + onCheck: onCheck, + onExpand: onExpand, + onCollapse: onCollapse, + onClick: onClick + } + }; + var className = "dark", perTime = 100; + + function onClick(event, treeId, treeNode) { + self.nodes.checkNode(treeNode, !treeNode.checked, true, true); + } + + function getUrl(treeId, treeNode) { + var parentNode = self._getParentValues(treeNode); + treeNode.times = treeNode.times || 1; + var param = "id=" + treeNode.id + + "×=" + (treeNode.times++) + + "&parentValues= " + window.encodeURIComponent(BI.jsonEncode(parentNode)) + + "&checkState=" + window.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); + + return BI.servletURL + '?op=' + self.options.op + '&cmd=' + self.options.cmd + "&" + param; + } + + function beforeExpand(treeId, treeNode) { + if (!treeNode.isAjaxing) { + if (!treeNode.children) { + treeNode.times = 1; + ajaxGetNodes(treeNode, "refresh"); + } + return true; + } else { + BI.Msg.toast("Please Wait。", "warning"); + return false; + } + } + + function onAsyncSuccess(event, treeId, treeNode, msg) { + treeNode.halfCheck = false; + if (!msg || msg.length === 0 || /^<html>[\s,\S]*<\/html>$/gi.test(msg) || self._stop) { + return; + } + var zTree = self.nodes; + var totalCount = treeNode.count || 0; + + //尝试去获取下一组节点,若获取值为空数组,表示获取完成 + // TODO by GUY + if (treeNode.children.length > totalCount) { + treeNode.count = treeNode.children.length; + BI.delay(function () { + ajaxGetNodes(treeNode); + }, perTime); + } else { + //treeNode.icon = ""; + zTree.updateNode(treeNode); + zTree.selectNode(treeNode.children[0]); + //className = (className === "dark" ? "":"dark"); + } + } + + function onAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) { + var zTree = self.nodes; + BI.Msg.toast("Error!", "warning"); + //treeNode.icon = ""; + //zTree.updateNode(treeNode); + } + + function ajaxGetNodes(treeNode, reloadType) { + var zTree = self.nodes; + if (reloadType == "refresh") { + //treeNode.icon = BI.servletURL +"?op=resource&resource=/com/fr/bi/web/css/base/third/ztree/img/loading.gif"; + zTree.updateNode(treeNode); + } + zTree.reAsyncChildNodes(treeNode, reloadType, true); + } + + function beforeCheck(treeId, treeNode) { + treeNode.halfCheck = false; + if (treeNode.checked === true) { + //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy + //所有的半选状态都需要取消halfCheck=true的情况 + function track(children) { + BI.each(children, function (i, ch) { + if (ch.halfCheck === true) { + ch.halfCheck = false; + track(ch.children); + } + }) + } + + track(treeNode.children); + var treeObj = self.nodes; + var nodes = treeObj.getSelectedNodes(); + $.each(nodes, function (index, node) { + node.halfCheck = false; + }) + } + } + + function onCheck(event, treeId, treeNode) { + self._selectTreeNode(treeId, treeNode); + } + + function onExpand(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + function onCollapse(event, treeId, treeNode) { + } + + return setting; + }, + + _getParentValues: function (treeNode) { + if (!treeNode.getParentNode()) { + return []; + } + var parentNode = treeNode.getParentNode(); + var result = this._getParentValues(parentNode); + result = result.concat([this._getNodeValue(parentNode)]); + return result; + }, + + _getNodeValue: function (node) { + //去除标红 + return node.value == null ? node.text.replace(/<[^>]+>/g, "").replaceAll(" ", " ") : node.value; + }, + + //获取半选框值 + _getHalfSelectedValues: function (map, node) { + var self = this; + var checkState = node.getCheckStatus(); + //将未选的去掉 + if (checkState.checked === false && checkState.half === false) { + return; + } + //如果节点已展开,并且是半选 + if (BI.isNotEmptyArray(node.children) && checkState.half === true) { + var children = node.children; + BI.each(children, function (i, ch) { + self._getHalfSelectedValues(map, ch); + }); + return; + } + var parent = node.parentValues || self._getParentValues(node); + var path = parent.concat(this._getNodeValue(node)); + if (BI.isNotEmptyArray(node.children) || checkState.half === false) { + this._buildTree(map, path); + return; + } + var storeValues = BI.deepClone(this.options.paras.selectedValues); + var treeNode = this._getTree(storeValues, path); + this._addTreeNode(map, parent, this._getNodeValue(node), treeNode); + }, + + _getTree: function (map, values) { + var cur = map; + BI.any(values, function (i, value) { + if (cur[value] == null) { + return true; + } + cur = cur[value]; + }); + return cur; + }, + + _addTreeNode: function (map, values, key, value) { + var cur = map; + BI.each(values, function (i, value) { + if (cur[value] == null) { + cur[value] = {}; + } + cur = cur[value]; + }); + cur[key] = value; + }, + + //构造树节点 + _buildTree: function (map, values) { + var cur = map; + BI.each(values, function (i, value) { + if (cur[value] == null) { + cur[value] = {}; + } + cur = cur[value]; + }) + }, + + //获取选中的值 + _getSelectedValues: function () { + var self = this; + var hashMap = {}; + var rootNoots = this.nodes.getNodes(); + track(rootNoots); + function track(nodes) { + BI.each(nodes, function (i, node) { + var checkState = node.getCheckStatus(); + if (checkState.checked === true || checkState.half === true) { + if (checkState.half === true) { + self._getHalfSelectedValues(hashMap, node); + } else { + var parentValues = node.parentValues || self._getParentValues(node); + var values = parentValues.concat([self._getNodeValue(node)]); + self._buildTree(hashMap, values); + } + } + }) + } + + return hashMap; + }, + + //处理节点 + _dealWidthNodes: function (nodes) { + var self = this, o = this.options; + var ns = BI.Tree.arrayFormat(nodes); + BI.each(ns, function (i, n) { + n.title = n.title || n.text || n.value; + //处理标红 + if (BI.isKey(o.paras.keyword)) { + n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html(); + } else { + n.text = (n.text + "").replaceAll(" ", " "); + } + }); + return nodes; + }, + + _loadMore: function () { + var self = this, o = this.options; + this.tip.setLoading(); + var op = BI.extend({}, o.paras, { + times: ++this.times + }); + o.itemsCreator(op, function (res) { + if (self._stop === true) { + return; + } + var hasNext = !!res.hasNext, nodes = res.items || []; + + if (!hasNext) { + self.tip.setEnd(); + } else { + self.tip.setLoaded(); + } + if (nodes.length > 0) { + self.nodes.addNodes(null, self._dealWidthNodes(nodes)); + } + }); + }, + + //生成树内部方法 + _initTree: function (setting) { + var self = this, o = this.options; + self.fireEvent(BI.Events.INIT); + this.times = 1; + var tree = this.tree; + tree.empty(); + this.loading(); + this.tip.setVisible(false); + var callback = function (nodes) { + if (self._stop === true) { + return; + } + self.nodes = $.fn.zTree.init(tree.element, setting, nodes); + }; + var op = BI.extend({}, o.paras, { + times: 1 + }); + + o.itemsCreator(op, function (res) { + if (self._stop === true) { + return; + } + var hasNext = !!res.hasNext, nodes = res.items || []; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes)); + } + self.setTipVisible(nodes.length <= 0); + self.loaded(); + if (!hasNext) { + self.tip.invisible(); + } else { + self.tip.setLoaded(); + } + op.times === 1 && self.fireEvent(BI.Events.AFTERINIT); + }); + }, + + //构造树结构, + initTree: function (nodes, setting) { + var setting = setting || { + async: { + enable: false + }, + check: { + enable: false + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true + }, + callback: {} + }; + this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); + }, + + start: function () { + this._stop = false; + }, + + stop: function () { + this._stop = true; + }, + + //生成树方法 + stroke: function (config) { + delete this.options.keyword; + BI.extend(this.options.paras, config); + var setting = this._configSetting(); + this._createTree(); + this.start(); + this._initTree(setting); + }, + + populate: function () { + this.stroke.apply(this, arguments); + }, + + hasChecked: function () { + var treeObj = this.nodes; + return treeObj.getCheckedNodes(true).length > 0; + }, + + checkAll: function (checked) { + function setNode(children) { + BI.each(children, function (i, child) { + child.halfCheck = false; + setNode(child.children); + }); + } + + BI.each(this.nodes.getNodes(), function (i, node) { + node.halfCheck = false; + setNode(node.children); + }); + this.nodes && this.nodes.checkAllNodes(checked); + }, + + expandAll: function (flag) { + this.nodes && this.nodes.expandAll(flag); + }, + + //设置树节点的状态 + setValue: function (value, param) { + this.checkAll(false); + this.updateValue(value, param); + this.refresh(); + }, + + setSelectedValue: function (value) { + this.options.paras.selectedValues = BI.deepClone(value || {}); + }, + + updateValue: function (values, param) { + if (!this.nodes) { + return; + } + param || (param = "value"); + var treeObj = this.nodes; + BI.each(values, function (v, op) { + var nodes = treeObj.getNodesByParam(param, v, null); + BI.each(nodes, function (j, node) { + BI.extend(node, {checked: true}, op); + treeObj.updateNode(node); + }) + }); + }, + + refresh: function () { + this.nodes && this.nodes.refresh(); + }, + + getValue: function () { + if (!this.nodes) { + return null; + } + return this._getSelectedValues(); + }, + + destroyed: function () { + this.stop(); + this.nodes && this.nodes.destroy(); + } +}); +BI.extend(BI.TreeView, { + REQ_TYPE_INIT_DATA: 1, + REQ_TYPE_ADJUST_DATA: 2, + REQ_TYPE_SELECT_DATA: 3, + REQ_TYPE_GET_SELECTED_DATA: 4 +}); + +BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TreeView.EVENT_INIT = BI.Events.INIT; +BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT; + +BI.shortcut("bi.tree_view", BI.TreeView);/** + * guy + * 同步树 + * @class BI.AsyncTree + * @extends BI.TreeView + */ +BI.AsyncTree = BI.inherit(BI.TreeView, { + _defaultConfig: function () { + return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {}) + }, + _init: function () { + BI.AsyncTree.superclass._init.apply(this, arguments); + }, + + //配置属性 + _configSetting: function () { + var paras = this.options.paras; + var self = this; + var setting = { + async: { + enable: false, + otherParam: BI.cjkEncodeDO(paras) + }, + check: { + enable: true + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true, + dblClickExpand: false + }, + callback: { + beforeCheck: beforeCheck, + onCheck: onCheck, + beforeExpand: beforeExpand, + onExpand: onExpand, + onCollapse: onCollapse, + onClick: onClick + } + }; + + function onClick(event, treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj(treeId); + zTree.checkNode(treeNode, !treeNode.checked, true, true); + } + + function beforeCheck(treeId, treeNode) { + treeNode.halfCheck = false; + if (treeNode.checked === true) { + //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy + //所有的半选状态都需要取消halfCheck=true的情况 + function track(children) { + BI.each(children, function (i, ch) { + if (ch.halfCheck === true) { + ch.halfCheck = false; + track(ch.children); + } + }) + } + + track(treeNode.children); + + var treeObj = $.fn.zTree.getZTreeObj(treeId); + var nodes = treeObj.getSelectedNodes(); + BI.each(nodes, function (index, node) { + node.halfCheck = false; + }) + } + } + + function beforeExpand(treeId, treeNode) { + self._beforeExpandNode(treeId, treeNode); + } + + function onCheck(event, treeId, treeNode) { + self._selectTreeNode(treeId, treeNode); + } + + function onExpand(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + function onCollapse(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + return setting; + }, + + _selectTreeNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); + var name = this._getNodeValue(treeNode); +// var values = parentValues.concat([name]); + if (treeNode.checked === true) { + } else { + var tNode = treeNode; + var pNode = this._getTree(this.options.paras.selectedValues, parentValues); + if (BI.isNotNull(pNode[name])) { + delete pNode[name]; + } + while (tNode != null && BI.isEmpty(pNode)) { + parentValues = parentValues.slice(0, parentValues.length - 1); + tNode = tNode.getParentNode(); + if (tNode != null) { + pNode = this._getTree(this.options.paras.selectedValues, parentValues); + name = this._getNodeValue(tNode); + delete pNode[name]; + } + } + } + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + }, + + //展开节点 + _beforeExpandNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = treeNode.parentValues || self._getParentValues(treeNode); + var op = BI.extend({}, o.paras, { + id: treeNode.id, + times: 1, + parentValues: parentValues.concat(this._getNodeValue(treeNode)), + checkState: treeNode.getCheckStatus() + }); + var complete = function (d) { + var nodes = d.items || []; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes), !!d.hasNext); + } + }; + var times = 1; + + function callback(nodes, hasNext) { + self.nodes.addNodes(treeNode, nodes); + + if (hasNext === true) { + BI.delay(function () { + times++; + op.times = times; + o.itemsCreator(op, complete); + }, 100); + } + } + + if (!treeNode.children) { + o.itemsCreator(op, complete) + } + }, + + _join: function (valueA, valueB) { + var self = this; + var map = {}; + track([], valueA, valueB); + track([], valueB, valueA); + function track(parent, node, compare) { + BI.each(node, function (n, item) { + if (BI.isNull(compare[n])) { + self._addTreeNode(map, parent, n, item); + } else if (BI.isEmpty(compare[n])) { + self._addTreeNode(map, parent, n, {}); + } else { + track(parent.concat([n]), node[n], compare[n]); + } + }) + } + + return map; + }, + + hasChecked: function () { + return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments); + }, + + getValue: function () { + if (!this.nodes) { + return {}; + } + var checkedValues = this._getSelectedValues(); + if (BI.isEmpty(checkedValues)) { + return BI.deepClone(this.options.paras.selectedValues); + } + if (BI.isEmpty(this.options.paras.selectedValues)) { + return checkedValues; + } + return this._join(checkedValues, this.options.paras.selectedValues); + }, + + //生成树方法 + stroke: function (config) { + delete this.options.keyword; + BI.extend(this.options.paras, config); + var setting = this._configSetting(); + this._initTree(setting); + } +}); + +BI.shortcut("bi.async_tree", BI.AsyncTree);/** + * guy + * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点 + * @class BI.PartTree + * @extends BI.AsyncTree + */ +BI.PartTree = BI.inherit(BI.AsyncTree, { + _defaultConfig: function () { + return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {}) + }, + + _init: function () { + BI.PartTree.superclass._init.apply(this, arguments); + }, + + _loadMore: function () { + var self = this, o = this.options; + var op = BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_INIT_DATA, + times: ++this.times + }); + this.tip.setLoading(); + o.itemsCreator(op, function (d) { + var hasNext = !!d.hasNext, nodes = d.items || []; + o.paras.lastSearchValue = d.lastSearchValue; + if (self._stop === true) { + return; + } + if (!hasNext) { + self.tip.setEnd(); + } else { + self.tip.setLoaded(); + } + if (nodes.length > 0) { + self.nodes.addNodes(null, self._dealWidthNodes(nodes)); + } + }); + }, + + _selectTreeNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); + var name = this._getNodeValue(treeNode); + if (treeNode.checked === true) { + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + } else { + //如果选中的值中不存在该值不处理 + var t = this.options.paras.selectedValues; + var p = parentValues.concat(name); + for (var i = 0, len = p.length; i < len; i++) { + t = t[p[i]]; + if (t == null) { + return; + } + if (BI.isEmpty(t)) { + break; + } + } + o.itemsCreator(BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_SELECT_DATA, + notSelectedValue: name, + parentValues: parentValues + }), function (new_values) { + self.options.paras.selectedValues = new_values; + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + }); + } + }, + + _getSelectedValues: function () { + var self = this; + var hashMap = {}; + var rootNoots = this.nodes.getNodes(); + track(rootNoots); + function track(nodes) { + BI.each(nodes, function (i, node) { + var checkState = node.getCheckStatus(); + if (checkState.checked === false) { + return true; + } + var parentValues = node.parentValues || self._getParentValues(node); + //把文字中的html去掉,其实就是把文字颜色去掉 + var values = parentValues.concat([self._getNodeValue(node)]); + self._buildTree(hashMap, values); +// if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){ +// continue; +// } + if (BI.isNotEmptyArray(node.children)) { + track(node.children); + return true; + } + if (checkState.half === true) { + self._getHalfSelectedValues(hashMap, node); + } + }) + } + + return hashMap; + }, + + _initTree: function (setting, keyword) { + var self = this, o = this.options; + this.times = 1; + var tree = this.tree; + tree.empty(); + self.tip.setVisible(false); + this.loading(); + var op = BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_INIT_DATA, + times: this.times + }); + var complete = function (d) { + if (self._stop === true || keyword != o.paras.keyword) { + return; + } + var hasNext = !!d.hasNext, nodes = d.items || []; + o.paras.lastSearchValue = d.lastSearchValue; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes)); + } + self.setTipVisible(nodes.length <= 0); + self.loaded(); + if (!hasNext) { + self.tip.invisible(); + } else { + self.tip.setLoaded(); + } + self.fireEvent(BI.Events.AFTERINIT); + }; + + function callback(nodes) { + if (self._stop === true) { + return; + } + self.nodes = $.fn.zTree.init(tree.element, setting, nodes); + } + + BI.delay(function () { + o.itemsCreator(op, complete); + }, 100); + }, + + getValue: function () { + var o = this.options; + var result = BI.PartTree.superclass.getValue.apply(this, arguments); + o.itemsCreator({ + type: BI.TreeView.REQ_TYPE_ADJUST_DATA, + selectedValues: result + }, function (res) { + result = res; + }); + return result; + }, + + //生成树方法 + stroke: function (config) { + var o = this.options; + delete o.paras.keyword; + BI.extend(o.paras, config); + delete o.paras.lastSearchValue; + var setting = this._configSetting(); + this._initTree(setting, o.paras.keyword); + } +}); + +BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController(); +BI.Layers = new BI.LayerController(); +BI.Maskers = new BI.MaskersController(); +BI.Bubbles = new BI.BubblesController(); +BI.Tooltips = new BI.TooltipsController(); +BI.Popovers = new BI.FloatBoxController(); +BI.Broadcasts = new BI.BroadcastController(); +BI.StyleLoaders = new BI.StyleLoaderManager();/** + * canvas绘图 + * + * Created by GUY on 2015/11/18. + * @class BI.Canvas + * @extends BI.Widget + */ +BI.Canvas = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-canvas" + }) + }, + + _init: function () { + BI.Canvas.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var canvas = document.createElement("canvas"); + if (!document.createElement('canvas').getContext) { + canvas = window.G_vmlCanvasManager.initElement(canvas); + } + this.element.append(canvas); + canvas.width = o.width; + canvas.height = o.height; + $(canvas).width("100%"); + $(canvas).height("100%"); + this.canvas = canvas; + this._queue = []; + }, + + _getContext: function () { + if (!this.ctx) { + this.ctx = this.canvas.getContext('2d'); + } + return this.ctx; + }, + + _attr: function (key, value) { + var self = this; + if (BI.isNull(key)) { + return; + } + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self._queue.push({k: k, v: v}); + }); + return; + } + this._queue.push({k: key, v: value}); + }, + + _line: function (x0, y0) { + var self = this; + var args = [].slice.call(arguments, 2); + if (BI.isOdd(args.length)) { + this._attr(BI.last(args)); + args = BI.initial(args); + } + this._attr("moveTo", [x0, y0]); + var odd = BI.filter(args, function (i) { + return i % 2 === 0; + }); + var even = BI.filter(args, function (i) { + return i % 2 !== 0; + }); + args = BI.zip(odd, even); + BI.each(args, function (i, point) { + self._attr("lineTo", point); + }); + }, + + line: function (x0, y0, x1, y1) { + this._line.apply(this, arguments); + this._attr("stroke", []); + }, + + rect: function (x, y, w, h, color) { + this._attr("fillStyle", color); + this._attr("fillRect", [x, y, w, h]); + }, + + circle: function (x, y, radius, color) { + this._attr({ + fillStyle: color, + beginPath: [], + arc: [x, y, radius, 0, Math.PI * 2, true], + closePath: [], + fill: [] + }); + }, + + hollow: function () { + this._attr("beginPath", []); + this._line.apply(this, arguments); + this._attr("closePath", []); + this._attr("stroke", []); + }, + + solid: function () { + this.hollow.apply(this, arguments); + this._attr("fill", []); + }, + + gradient: function (x0, y0, x1, y1, start, end) { + var grd = this._getContext().createLinearGradient(x0, y0, x1, y1); + grd.addColorStop(0, start); + grd.addColorStop(1, end); + return grd; + }, + + reset: function () { + this._getContext().clearRect(0, 0, this.canvas.width, this.canvas.height); + }, + + stroke: function (callback) { + var self = this; + BI.nextTick(function () { + var ctx = self._getContext(); + BI.each(self._queue, function (i, q) { + if (BI.isFunction(ctx[q.k])) { + ctx[q.k].apply(ctx, q.v); + } else { + ctx[q.k] = q.v; + } + }); + self._queue = []; + callback && callback(); + }); + } +}); +BI.shortcut("bi.canvas", BI.Canvas);/** + * CollectionView + * + * Created by GUY on 2016/1/15. + * @class BI.CollectionView + * @extends BI.Widget + */ +BI.CollectionView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection", + // width: 400, //必设 + // height: 300, //必设 + overflowX: true, + overflowY: true, + cellSizeAndPositionGetter: BI.emptyFn, + horizontalOverscanSize: 0, + verticalOverscanSize: 0, + scrollLeft: 0, + scrollTop: 0, + items: [] + }); + }, + + _init: function () { + BI.CollectionView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + this._debounceRelease = BI.debounce(function () { + self._scrollLock = false; + }, 1000 / 60); + this.container = BI.createWidget({ + type: "bi.absolute" + }); + this.element.scroll(function () { + if (self._scrollLock === true) { + return; + } + o.scrollLeft = self.element.scrollLeft(); + o.scrollTop = self.element.scrollTop(); + self._calculateChildrenToRender(); + self.fireEvent(BI.CollectionView.EVENT_SCROLL, { + scrollLeft: o.scrollLeft, + scrollTop: o.scrollTop + }); + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + scrollable: o.overflowX === true && o.overflowY === true, + scrolly: o.overflowX === false && o.overflowY === true, + scrollx: o.overflowX === true && o.overflowY === false, + items: [this.container] + }); + if (o.items.length > 0) { + this._calculateSizeAndPositionData(); + this._populate(); + } + if (o.scrollLeft !== 0 || o.scrollTop !== 0) { + BI.nextTick(function () { + self.element.scrollTop(o.scrollTop); + self.element.scrollLeft(o.scrollLeft); + }); + } + }, + + _calculateSizeAndPositionData: function () { + var o = this.options; + var cellMetadata = []; + var sectionManager = new BI.SectionManager(); + var height = 0; + var width = 0; + + for (var index = 0, len = o.items.length; index < len; index++) { + var cellMetadatum = o.cellSizeAndPositionGetter(index); + + if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || + cellMetadatum.width == null || isNaN(cellMetadatum.width) || + cellMetadatum.x == null || isNaN(cellMetadatum.x) || + cellMetadatum.y == null || isNaN(cellMetadatum.y)) { + throw Error(); + } + + height = Math.max(height, cellMetadatum.y + cellMetadatum.height); + width = Math.max(width, cellMetadatum.x + cellMetadatum.width); + + cellMetadatum.index = index; + cellMetadata[index] = cellMetadatum; + sectionManager.registerCell(cellMetadatum, index); + } + + this._cellMetadata = cellMetadata; + this._sectionManager = sectionManager; + this._height = height; + this._width = width; + }, + + _cellRenderers: function (height, width, x, y) { + this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y); + return this._cellGroupRenderer() + }, + + _cellGroupRenderer: function () { + var self = this, o = this.options; + var rendered = []; + BI.each(this._lastRenderedCellIndices, function (i, index) { + var cellMetadata = self._sectionManager.getCellMetadata(index); + rendered.push(cellMetadata); + }); + return rendered; + }, + + _calculateChildrenToRender: function () { + var self = this, o = this.options; + var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()); + var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()); + var left = Math.max(0, scrollLeft - o.horizontalOverscanSize); + var top = Math.max(0, scrollTop - o.verticalOverscanSize); + var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize); + var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize); + if (right > 0 && bottom > 0) { + //如果滚动的区间并没有超出渲染的范围 + if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { + return; + } + var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top); + var renderedCells = [], renderedKeys = [], renderedWidgets = {}; + //存储所有的left和top + var lefts = {}, tops = {}; + for (var i = 0, len = childrenToDisplay.length; i < len; i++) { + var datum = childrenToDisplay[i]; + lefts[datum.x] = datum.x; + lefts[datum.x + datum.width] = datum.x + datum.width; + tops[datum.y] = datum.y; + tops[datum.y + datum.height] = datum.y + datum.height; + } + lefts = BI.toArray(lefts); + tops = BI.toArray(tops); + var leftMap = BI.invert(lefts); + var topMap = BI.invert(tops); + //存储上下左右四个边界 + var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {}; + var assertMinBorder = function (border, offset) { + if (border[offset] == null) { + border[offset] = Number.MAX_VALUE; + } + }; + var assertMaxBorder = function (border, offset) { + if (border[offset] == null) { + border[offset] = 0; + } + }; + for (var i = 0, len = childrenToDisplay.length; i < len; i++) { + var datum = childrenToDisplay[i]; + var index = BI.deepIndexOf(this.renderedKeys, datum.index); + var child; + if (index > -1) { + if (datum.width !== this.renderedCells[index]._width) { + this.renderedCells[index]._width = datum.width; + this.renderedCells[index].el.setWidth(datum.width); + } + if (datum.height !== this.renderedCells[index]._height) { + this.renderedCells[index]._height = datum.height; + this.renderedCells[index].el.setHeight(datum.height); + } + if (this.renderedCells[index]._left !== datum.x) { + this.renderedCells[index].el.element.css("left", datum.x + "px"); + } + if (this.renderedCells[index]._top !== datum.y) { + this.renderedCells[index].el.element.css("top", datum.y + "px"); + } + renderedCells.push(child = this.renderedCells[index]); + } else { + child = BI.createWidget(BI.extend({ + type: "bi.label", + width: datum.width, + height: datum.height + }, o.items[datum.index], { + cls: (o.items[datum.index].cls || "") + " container-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), + _left: datum.x, + _top: datum.y + })); + renderedCells.push({ + el: child, + left: datum.x, + top: datum.y, + _left: datum.x, + _top: datum.y, + _width: datum.width, + _height: datum.height + }); + } + var startTopIndex = topMap[datum.y] | 0; + var endTopIndex = topMap[datum.y + datum.height] | 0; + for (var k = startTopIndex; k <= endTopIndex; k++) { + var t = tops[k]; + assertMinBorder(leftBorder, t); + assertMaxBorder(rightBorder, t); + leftBorder[t] = Math.min(leftBorder[t], datum.x); + rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width); + } + var startLeftIndex = leftMap[datum.x] | 0; + var endLeftIndex = leftMap[datum.x + datum.width] | 0; + for (var k = startLeftIndex; k <= endLeftIndex; k++) { + var l = lefts[k]; + assertMinBorder(topBorder, l); + assertMaxBorder(bottomBorder, l); + topBorder[l] = Math.min(topBorder[l], datum.y); + bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height); + } + + renderedKeys.push(datum.index); + renderedWidgets[i] = child; + } + //已存在的, 需要添加的和需要删除的 + var existSet = {}, addSet = {}, deleteArray = []; + BI.each(renderedKeys, function (i, key) { + if (BI.deepContains(self.renderedKeys, key)) { + existSet[i] = key; + } else { + addSet[i] = key; + } + }); + BI.each(this.renderedKeys, function (i, key) { + if (BI.deepContains(existSet, key)) { + return; + } + if (BI.deepContains(addSet, key)) { + return; + } + deleteArray.push(i); + }); + BI.each(deleteArray, function (i, index) { + //性能优化,不调用destroy方法防止触发destroy事件 + self.renderedCells[index].el._destroy(); + }); + var addedItems = []; + BI.each(addSet, function (index) { + addedItems.push(renderedCells[index]) + }); + this.container.addItems(addedItems); + //拦截父子级关系 + this.container._children = renderedWidgets; + this.container.attr("items", renderedCells); + this.renderedCells = renderedCells; + this.renderedKeys = renderedKeys; + + //Todo 左右比较特殊 + var minX = BI.min(leftBorder); + var maxX = BI.max(rightBorder); + + var minY = BI.max(topBorder); + var maxY = BI.min(bottomBorder); + + this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; + } + }, + + _getMaxScrollLeft: function () { + return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + }, + + _getMaxScrollTop: function () { + return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + }, + + _populate: function (items) { + var o = this.options; + this._reRange(); + if (items && items !== this.options.items) { + this.options.items = items; + this._calculateSizeAndPositionData(); + } + if (o.items.length > 0) { + this.container.setWidth(this._width); + this.container.setHeight(this._height); + + this._calculateChildrenToRender(); + this.element.scrollTop(o.scrollTop); + this.element.scrollLeft(o.scrollLeft); + } + }, + + setScrollLeft: function (scrollLeft) { + if (this.options.scrollLeft === scrollLeft) { + return; + } + this._scrollLock = true; + this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollLeft(this.options.scrollLeft); + }, + + setScrollTop: function (scrollTop) { + if (this.options.scrollTop === scrollTop) { + return; + } + this._scrollLock = true; + this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollTop(this.options.scrollTop); + }, + + setOverflowX: function (b) { + var self = this; + if (this.options.overflowX !== !!b) { + this.options.overflowX = !!b; + BI.nextTick(function () { + self.element.css({overflowX: !!b ? "auto" : "hidden"}); + }); + } + }, + + setOverflowY: function (b) { + var self = this; + if (this.options.overflowY !== !!b) { + this.options.overflowY = !!b; + BI.nextTick(function () { + self.element.css({overflowY: !!b ? "auto" : "hidden"}); + }); + } + }, + + getScrollLeft: function () { + return this.options.scrollLeft; + }, + + getScrollTop: function () { + return this.options.scrollTop; + }, + + getMaxScrollLeft: function () { + return this._getMaxScrollLeft(); + }, + + getMaxScrollTop: function () { + return this._getMaxScrollTop(); + }, + + //重新计算children + _reRange: function () { + this.renderRange = {}; + }, + + _clearChildren: function () { + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + BI.each(this.renderedCells, function (i, cell) { + cell.el._destroy(); + }); + this._clearChildren(); + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + }, + + populate: function (items) { + if (items && items !== this.options.items) { + this.restore(); + } + this._populate(items); + } +}); +BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut('bi.collection_view', BI.CollectionView);/** + * @class BI.Combo + * @extends BI.Widget + */ +BI.Combo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-combo", + trigger: "click", + toggle: true, + direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right + isDefaultInit: false, + destroyWhenHide: false, + isNeedAdjustHeight: true,//是否需要高度调整 + isNeedAdjustWidth: true, + stopEvent: false, + stopPropagation: false, + adjustLength: 0,//调整的距离 + adjustXOffset: 0, + adjustYOffset: 0, + hideChecker: BI.emptyFn, + offsetStyle: "left", //left,right,center + el: {}, + popup: {}, + comboClass: "bi-combo-popup", + hoverClass: "bi-combo-hover" + }) + }, + + _init: function () { + BI.Combo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._initCombo(); + this._initPullDownAction(); + this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); + } + } + }); + + self.element.on("mouseenter." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self.element.addClass(o.hoverClass); + } + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self.element.removeClass(o.hoverClass); + } + }); + + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.combo} + ] + }); + o.isDefaultInit && (this._assertPopupView()); + BI.Resizers.add(this.getName(), BI.bind(function () { + if (this.isViewVisible()) { + this._hideView(); + } + }, this)); + }, + + _toggle: function () { + this._assertPopupViewRender(); + if (this.popupView.isVisible()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + var st = function (e) { + if (o.stopEvent) { + e.stopEvent(); + } + if (o.stopPropagation) { + e.stopPropagation(); + } + }; + BI.each(evs, function (i, ev) { + switch (ev) { + case "hover": + self.element.on("mouseenter." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; + case "click": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + break; + } + }); + }, + + _initCombo: function () { + this.combo = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this; + if (this.popupView == null) { + this.popupView = BI.createWidget(this.options.popup, { + type: "bi.popup_view" + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + self.combo.setValue(self.getValue()); + self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.popupView.setVisible(false); + BI.nextTick(function () { + self.fireEvent(BI.Combo.EVENT_AFTER_INIT); + }); + } + }, + + _assertPopupViewRender: function () { + this._assertPopupView(); + if (!this._rendered) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + this._rendered = true; + } + }, + + _hideIf: function (e) { + // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) { + // return; + // } + if (this.element.find(e.target).length > 0) { + return; + } + var isHide = this.options.hideChecker.apply(this, [e]); + if (isHide === false) { + return; + } + this._hideView(); + }, + + _hideView: function () { + this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); + if (this.options.destroyWhenHide === true) { + this.popupView && this.popupView.destroy(); + this.popupView = null; + this._rendered = false; + } else { + this.popupView && this.popupView.invisible(); + } + this.element.removeClass(this.options.comboClass); + + $(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); + this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); + }, + + _popupView: function () { + this._assertPopupViewRender(); + this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); + + this.popupView.visible(); + this.adjustWidth(); + this.adjustHeight(); + + this.element.addClass(this.options.comboClass); + $(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); + this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); + }, + + adjustWidth: function () { + var o = this.options; + if (!this.popupView) { + return; + } + if (o.isNeedAdjustWidth === true) { + this.resetListWidth(""); + var width = this.popupView.element.outerWidth(); + var maxW = this.element.outerWidth() || o.width; + if (width > maxW + 80) { + maxW = maxW + 80; + } else if (width > maxW) { + maxW = width; + } + this.resetListWidth(maxW < 100 ? 100 : maxW); + } + }, + + adjustHeight: function () { + var o = this.options, p = {}; + if (!this.popupView) { + return; + } + var isVisible = this.popupView.isVisible(); + this.popupView.visible(); + switch (o.direction) { + case "bottom": + case "bottom,right": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle); + break; + case "top": + case "top,right": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); + break; + case "left": + case "left,bottom": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle); + break; + case "right": + case "right,bottom": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle); + break; + case "top,left": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle); + break; + case "bottom,left": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle); + break; + case "left,top": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle); + break; + case "right,top": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle); + break; + case "top,custom": + case "custom,top": + p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); + break; + case "custom,bottom": + case "bottom,custom": + p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); + break; + case "left,custom": + case "custom,left": + p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); + delete p.top; + delete p.adaptHeight; + break; + case "custom,right": + case "right,custom": + p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); + delete p.top; + delete p.adaptHeight; + break; + } + + if ("adaptHeight" in p) { + this.resetListHeight(p['adaptHeight']); + } + if ("left" in p) { + this.popupView.element.css({ + left: p.left + }); + } + if ("top" in p) { + this.popupView.element.css({ + top: p.top + }); + } + this.position = p; + this.popupView.setVisible(isVisible); + }, + + resetListHeight: function (h) { + this._assertPopupView(); + this.popupView.resetHeight && this.popupView.resetHeight(h); + }, + + resetListWidth: function (w) { + this._assertPopupView(); + this.popupView.resetWidth && this.popupView.resetWidth(w); + }, + + populate: function (items) { + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + this.combo.populate.apply(this.combo, arguments); + }, + + _setEnable: function (arg) { + BI.Combo.superclass._setEnable.apply(this, arguments); + !arg && this.element.removeClass(this.options.hoverClass); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + this._assertPopupView(); + this.combo.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + this._assertPopupView(); + return this.popupView && this.popupView.getValue(); + }, + + isViewVisible: function () { + return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible(); + }, + + showView: function () { + if (this.isEnabled() && this.combo.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + getPopupPosition: function () { + return this.position; + }, + + toggle: function () { + this._toggle(); + }, + + destroy: function () { + $(document).unbind("mousedown." + this.getName()) + .unbind("mousewheel." + this.getName()) + .unbind("mouseenter." + this.getName()) + .unbind("mousemove." + this.getName()) + .unbind("mouseleave." + this.getName()); + BI.Resizers.remove(this.getName()); + BI.Combo.superclass.destroy.apply(this, arguments); + } +}); +BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Combo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Combo.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Combo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Combo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Combo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.combo", BI.Combo);/** + * + * 某个可以展开的节点 + * + * Created by GUY on 2015/9/10. + * @class BI.Expander + * @extends BI.Widget + */ +BI.Expander = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-expander", + trigger: "click", + toggle: true, + //direction: "bottom", //top,bottom四个方向 + isDefaultInit: false, //是否默认初始化子节点 + el: {}, + popup: {}, + expanderClass: "bi-expander-popup", + hoverClass: "bi-expander-hover" + }) + }, + + _init: function () { + BI.Expander.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._expanded = !!o.el.open; + this._initExpander(); + this._initPullDownAction(); + this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); + } + } + }); + + this.element.hover(function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self.element.addClass(o.hoverClass); + } + }, function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self.element.removeClass(o.hoverClass); + } + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.expander} + ] + }); + o.isDefaultInit && this._assertPopupView(); + if (this.expander.isOpened() === true) { + this._popupView(); + } + }, + + _toggle: function () { + this._assertPopupViewRender(); + if (this.popupView.isVisible()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + BI.each(evs, function (i, e) { + switch (e) { + case "hover": + self.element[e](function (e) { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } + }, function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); + self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + }); + break; + default : + if (e) { + self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { + if (self.expander.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isExpanded()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); + self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true)); + } + break; + } + }) + }, + + _initExpander: function () { + this.expander = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this; + if (this.popupView == null) { + this.popupView = BI.createWidget(this.options.popup, { + type: "bi.button_group", + cls: "expander-popup", + layouts: [{ + type: "bi.vertical", + hgap: 0, + vgap: 0 + }] + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + //self.setValue(self.getValue()); + self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj); + } + }); + this.popupView.setVisible(this.isExpanded()); + BI.nextTick(function () { + self.fireEvent(BI.Expander.EVENT_AFTER_INIT); + }); + } + }, + + _assertPopupViewRender: function () { + this._assertPopupView(); + if (!this._rendered) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + this._rendered = true; + } + }, + + _hideView: function () { + this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW); + this._expanded = false; + this.expander.setOpened(false); + this.popupView && this.popupView.invisible(); + this.element.removeClass(this.options.expanderClass); + + this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW); + }, + + _popupView: function () { + this._assertPopupViewRender(); + this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW); + this._expanded = true; + this.expander.setOpened(true); + this.popupView.visible(); + this.element.addClass(this.options.expanderClass); + this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW); + }, + + populate: function (items) { + //this._assertPopupView(); + this.popupView && this.popupView.populate.apply(this.popupView, arguments); + this.expander.populate.apply(this.expander, arguments); + }, + + _setEnable: function (arg) { + BI.Expander.superclass._setEnable.apply(this, arguments); + !arg && this.element.removeClass(this.options.hoverClass); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + //this._assertPopupView(); + this.expander.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + //this._assertPopupView(); + return this.popupView ? this.popupView.getValue() : []; + }, + + isViewVisible: function () { + return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible(); + }, + + isExpanded: function () { + return this._expanded; + }, + + showView: function () { + if (this.isEnabled() && this.expander.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + getAllLeaves: function () { + return this.popupView && this.popupView.getAllLeaves(); + }, + + getNodeById: function (id) { + if (this.expander.options.id === id) { + return this.expander; + } + return this.popupView && this.popupView.getNodeById(id); + }, + + getNodeByValue: function (value) { + if (this.expander.getValue() === value) { + return this.expander; + } + return this.popupView && this.popupView.getNodeByValue(value); + }, + + destroy: function () { + BI.Expander.superclass.destroy.apply(this, arguments); + } +}); +BI.Expander.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Expander.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Expander.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Expander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Expander.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Expander.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.expander", BI.Expander);/** + * Created by GUY on 2015/8/10. + */ + +BI.ComboGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-combo-group bi-list-item", + + //以下这些属性对每一个combo都是公用的 + trigger: "click,hover", + direction: "right", + adjustLength: 0, + isDefaultInit: false, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + + el: {type: "bi.text_button", text: "", value: ""}, + children: [], + + popup: { + el: { + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + } + } + }) + }, + + _init: function () { + BI.ComboGroup.superclass._init.apply(this, arguments); + this.populate(this.options.el); + }, + + populate: function (item) { + var self = this, o = this.options; + var children = o.children; + if (BI.isEmpty(children)) { + throw new Error("ComboGroup构造错误"); + } + BI.each(children, function (i, ch) { + var son = BI.formatEL(ch).el.children; + ch = BI.formatEL(ch).el; + if (!BI.isEmpty(son)) { + ch.el = BI.clone(ch); + ch.children = son; + ch.type = "bi.combo_group"; + ch.action = o.action; + ch.height = o.height; + ch.direction = o.direction; + ch.isDefaultInit = o.isDefaultInit; + ch.isNeedAdjustHeight = o.isNeedAdjustHeight; + ch.isNeedAdjustWidth = o.isNeedAdjustWidth; + ch.adjustLength = o.adjustLength; + ch.popup = o.popup; + } + }) + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + height: o.height, + trigger: o.trigger, + direction: o.direction, + isDefaultInit: o.isDefaultInit, + isNeedAdjustWidth: o.isNeedAdjustWidth, + isNeedAdjustHeight: o.isNeedAdjustHeight, + adjustLength: o.adjustLength, + el: item, + popup: BI.extend({}, o.popup, { + el: BI.extend({ + items: children + }, o.popup.el) + }) + }) + this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj); + } + }) + }, + + getValue: function () { + return this.combo.getValue(); + }, + + setValue: function (v) { + this.combo.setValue(v); + } +}); +BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-virtual-group", + items: [], + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }) + }, + + render: function () { + this.populate(this.options.items); + }, + + _packageBtns: function (items) { + var o = this.options; + + for (var i = o.layouts.length - 1; i > 0; i--) { + items = BI.map(items, function (k, it) { + return BI.extend({}, o.layouts[i], { + items: [ + BI.extend({}, o.layouts[i].el, { + el: BI.stripEL(it) + }) + ] + }) + }) + } + return items; + }, + + _packageItems: function (items, packBtns) { + return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); + }, + + _packageLayout: function (items) { + var o = this.options, layout = BI.deepClone(o.layouts[0]); + + var lay = BI.formatEL(layout).el; + while (lay && lay.items && !BI.isEmpty(lay.items)) { + lay = BI.formatEL(lay.items[0]).el; + } + lay.items = items; + return layout; + }, + + addItems: function (items) { + this.layouts.addItems(items); + }, + + prependItems: function (items) { + this.layouts.prependItems(items); + }, + + setValue: function (v) { + this.layouts.setValue(v); + }, + + getValue: function () { + return this.layouts.getValue(); + }, + + empty: function () { + this.layouts.empty(); + }, + + populate: function (items) { + var self = this; + items = items || []; + this.options.items = items; + items = this._packageBtns(items); + if (!this.layouts) { + this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); + } else { + this.layouts.populate(items); + } + } +}); +BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.virtual_group", BI.VirtualGroup);/** + * 加载控件 + * + * Created by GUY on 2015/8/31. + * @class BI.Loader + * @extends BI.Widget + */ +BI.Loader = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-loader", + + direction: "top", + isDefaultInit: true,//是否默认初始化数据 + logic: { + dynamic: true, + scrolly: true + }, + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + prev: false, + next: {}, + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn + }) + }, + + _prevLoad: function () { + var self = this, o = this.options; + this.prev.setLoading(); + o.itemsCreator.apply(this, [{times: --this.times}, function () { + self.prev.setLoaded(); + self.prependItems.apply(self, arguments); + }]); + }, + + _nextLoad: function () { + var self = this, o = this.options; + this.next.setLoading(); + o.itemsCreator.apply(this, [{times: ++this.times}, function () { + self.next.setLoaded(); + self.addItems.apply(self, arguments); + }]); + }, + + _init: function () { + BI.Loader.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.itemsCreator === false) { + o.prev = false; + o.next = false; + } + if (o.prev !== false) { + this.prev = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.prev)); + this.prev.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._prevLoad(); + } + }); + } + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + chooseType: 0, + items: o.items, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Loader.EVENT_CHANGE, obj); + } + }); + + if (o.next !== false) { + this.next = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.next)); + this.next.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._nextLoad(); + } + }) + } + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ + scrolly: true + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next) + })))); + + o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { + o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); + }, this)); + if (BI.isNotEmptyArray(o.items)) { + this.populate(o.items); + } + }, + + hasPrev: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasPrev.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + hasNext: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasNext.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + prependItems: function (items) { + this.count += items.length; + if (this.next !== false) { + if (this.hasPrev()) { + this.options.items = this.options.items.concat(items); + this.prev.setLoaded(); + } else { + this.prev.setEnd(); + } + } + this.button_group.prependItems.apply(this.button_group, arguments); + }, + + addItems: function (items) { + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.options.items = this.options.items.concat(items); + this.next.setLoaded(); + } else { + this.next.setEnd(); + } + } + this.button_group.addItems.apply(this.button_group, arguments); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { + o.itemsCreator.apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("arguments can not be null!!!"); + } + self.populate.apply(self, arguments); + o.onLoaded(); + }]); + return; + } + this.options.items = items; + this.times = 1; + this.count = 0; + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.next.setLoaded(); + } else { + this.next.invisible(); + } + } + if (BI.isObject(this.prev)) { + if (this.hasPrev()) { + this.prev.setLoaded(); + } else { + this.prev.invisible(); + } + } + this.button_group.populate.apply(this.button_group, arguments); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + }, + + empty: function () { + this.button_group.empty(); + BI.each([this.prev, this.next], function (i, ob) { + ob && ob.setVisible(false); + }); + }, + + destroy: function () { + BI.Loader.superclass.destroy.apply(this, arguments); + } +}); +BI.Loader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.loader", BI.Loader);/** + * Created by GUY on 2015/6/26. + */ + +BI.Navigation = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), { + direction: "bottom",//top, bottom, left, right, custom + logic: { + dynamic: false + }, + single: false, + defaultShowIndex: false, + tab: false, + cardCreator: function (v) { + return BI.createWidget(); + }, + + afterCardCreated: BI.emptyFn, + afterCardShow: BI.emptyFn + }) + }, + + render: function () { + var self = this, o = this.options; + this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); + this.cardMap = {}; + this.showIndex = 0; + this.layout = BI.createWidget({ + type: "bi.card" + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) + })))); + + + new BI.ShowListener({ + eventObj: this.tab, + cardLayout: this.layout, + cardNameCreator: function (v) { + return self.showIndex + v; + }, + cardCreator: function (v) { + var card = o.cardCreator(v); + self.cardMap[v] = card; + return card; + }, + afterCardCreated: BI.bind(this.afterCardCreated, this), + afterCardShow: BI.bind(this.afterCardShow, this) + }); + }, + + mounted: function () { + var o = this.options; + if (o.defaultShowIndex !== false) { + this.setSelect(o.defaultShowIndex); + } + }, + + _deleteOtherCards: function (currCardName) { + var self = this, o = this.options; + if (o.single === true) { + BI.each(this.cardMap, function (name, card) { + if (name !== (currCardName + "")) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + } + }); + } + }, + + afterCardCreated: function (v) { + var self = this; + this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Navigation.EVENT_CHANGE, obj); + } + }); + this.options.afterCardCreated.apply(this, arguments); + }, + + afterCardShow: function (v) { + this.showIndex = v; + this._deleteOtherCards(v); + this.options.afterCardShow.apply(this, arguments); + }, + + populate: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.populate.apply(card, arguments); + } + }, + + _assertCard: function (v) { + if (!this.layout.isCardExisted(v)) { + var card = this.options.cardCreator(v); + this.cardMap[v] = card; + this.layout.addCardByName(v, card); + this.afterCardCreated(v); + } + }, + + setSelect: function (v) { + this._assertCard(v); + this.layout.showCardByName(v); + this._deleteOtherCards(v); + if (this.showIndex !== v) { + this.showIndex = v; + BI.nextTick(BI.bind(this.afterCardShow, this, v)); + } + }, + + getSelect: function () { + return this.showIndex; + }, + + getSelectedCard: function () { + if (BI.isKey(this.showIndex)) { + return this.cardMap[this.showIndex]; + } + }, + + /** + * @override + */ + setValue: function (v) { + var card = this.layout.getShowingCard(); + if (card) { + card.setValue(v); + } + }, + + /** + * @override + */ + getValue: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.getValue(); + } + }, + + empty: function () { + this.layout.deleteAllCard(); + this.cardMap = {}; + }, + + destroy: function () { + BI.Navigation.superclass.destroy.apply(this, arguments); + } +}); +BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.navigation", BI.Navigation);/** + * 搜索逻辑控件 + * + * Created by GUY on 2015/9/28. + * @class BI.Searcher + * @extends BI.Widget + */ + +BI.Searcher = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-searcher", + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + + isDefaultInit: false, + isAutoSearch: true, //是否自动搜索 + isAutoSync: true, //是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一 + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + + //isAutoSearch为false时启用 + onSearch: function (op, callback) { + callback([]) + }, + + el: { + type: "bi.search_editor" + }, + + popup: { + type: "bi.searcher_view" + }, + + adapter: null, + masker: { //masker层 + offset: {} + } + }) + }, + + _init: function () { + BI.Searcher.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.editor = BI.createWidget(o.el, { + type: "bi.search_editor" + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap, + items: [this.editor] + }); + o.isDefaultInit && (this._assertPopupView()); + + var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, true); + this.editor.on(BI.Controller.EVENT_CHANGE, function (type) { + switch (type) { + case BI.Events.STARTEDIT: + self._startSearch(); + break; + case BI.Events.EMPTY: + self._stopSearch(); + break; + case BI.Events.CHANGE: + search(); + break; + case BI.Events.PAUSE: + self._pauseSearch(); + break; + } + }) + }, + + _assertPopupView: function () { + var self = this, o = this.options; + if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) { + this.popupView = BI.createWidget(o.popup, { + type: "bi.searcher_view", + chooseType: o.chooseType + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + if (o.isAutoSync) { + var values = o.adapter && o.adapter.getValue(); + if (!obj.isSelected()) { + o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); + } else { + switch (o.chooseType) { + case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: + o.adapter && o.adapter.setValue([obj.getValue()]); + break; + case BI.ButtonGroup.CHOOSE_TYPE_MULTI: + values.push(obj.getValue()); + o.adapter && o.adapter.setValue(values); + break; + } + } + } + self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); + } + }); + BI.nextTick(function () { + self.fireEvent(BI.Searcher.EVENT_AFTER_INIT); + }); + } + if (o.masker && !BI.Maskers.has(this.getName())) { + BI.Maskers.create(this.getName(), o.adapter, BI.extend({ + container: this, + render: this.popupView + }, o.masker)); + } + }, + + _startSearch: function () { + this._assertPopupView(); + this._stop = false; + this._isSearching = true; + this.fireEvent(BI.Searcher.EVENT_START); + this.popupView.startSearch && this.popupView.startSearch(); + //搜索前先清空dom + // BI.Maskers.get(this.getName()).empty(); + BI.nextTick(function (name) { + BI.Maskers.show(name); + }, this.getName()); + }, + + _pauseSearch: function () { + var o = this.options, name = this.getName(); + this._stop = true; + BI.nextTick(function (name) { + BI.Maskers.hide(name); + }, this.getName()); + if (this._isSearching === true) { + this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch(); + this.fireEvent(BI.Searcher.EVENT_PAUSE); + } + this._isSearching = false; + }, + + _stopSearch: function () { + var o = this.options, name = this.getName(); + this._stop = true; + BI.Maskers.hide(name); + if (this._isSearching === true) { + this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); + this.fireEvent(BI.Searcher.EVENT_STOP); + } + this._isSearching = false; + }, + + _search: function () { + var self = this, o = this.options, keyword = this.editor.getValue(); + if (keyword === "" || this._stop) { + return; + } + if (o.isAutoSearch) { + var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || []; + var finding = BI.Func.getSearchResult(items, keyword); + var matched = finding.matched, finded = finding.finded; + this.popupView.populate(finded, matched, keyword); + o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue()); + self.fireEvent(BI.Searcher.EVENT_SEARCHING); + return; + } + this.popupView.loading && this.popupView.loading(); + o.onSearch({ + times: 1, + keyword: keyword, + selectedValues: o.adapter && o.adapter.getValue() + }, function (searchResult, matchResult) { + if (!self._stop) { + var args = [].slice.call(arguments); + if (args.length > 0) { + args.push(keyword); + } + BI.Maskers.show(self.getName()); + self.popupView.populate.apply(self.popupView, args); + o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue()); + self.popupView.loaded && self.popupView.loaded(); + self.fireEvent(BI.Searcher.EVENT_SEARCHING); + } + }); + }, + + setAdapter: function (adapter) { + this.options.adapter = adapter; + BI.Maskers.remove(this.getName()); + }, + + doSearch: function () { + if (this.isSearching()) { + this._search(); + } + }, + + stopSearch: function () { + this._stopSearch();//先停止搜索,然后再去设置editor为空 + //important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常) + try { + this.editor.blur(); + } catch (e) { + if (!this.editor.blur) { + throw new Error("editor没有实现blur方法"); + } + } finally { + this.editor.setValue(""); + } + }, + + isSearching: function () { + return this._isSearching; + }, + + isViewVisible: function () { + return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName()); + }, + + getView: function () { + return this.popupView; + }, + + hasMatched: function () { + this._assertPopupView(); + return this.popupView.hasMatched(); + }, + + adjustHeight: function () { + if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) { + BI.Maskers.show(this.getName()); + } + }, + + adjustView: function () { + this.isViewVisible() && BI.Maskers.show(this.getName()); + }, + + setValue: function (v) { + this._assertPopupView(); + this.popupView && this.popupView.setValue(v); + }, + + getKeyword: function () { + return this.editor.getValue(); + }, + + getKeywords: function () { + return this.editor.getKeywords(); + }, + + getValue: function () { + var o = this.options; + if (o.isAutoSync && o.adapter && o.adapter.getValue) { + return o.adapter.getValue(); + } + if (this.isSearching()) { + return this.popupView.getValue(); + } else if (o.adapter && o.adapter.getValue) { + return o.adapter.getValue(); + } else { + return this.popupView.getValue(); + } + }, + + populate: function (result, searchResult, keyword) { + var o = this.options; + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + if (o.isAutoSync && o.adapter && o.adapter.getValue) { + this.popupView.setValue(o.adapter.getValue()); + } + }, + + empty: function () { + this.popupView && this.popupView.empty(); + }, + + destroy: function () { + BI.Maskers.remove(this.getName()); + BI.Searcher.superclass.destroy.apply(this, arguments); + } +}); +BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Searcher.EVENT_START = "EVENT_START"; +BI.Searcher.EVENT_STOP = "EVENT_STOP"; +BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + +BI.shortcut("bi.searcher", BI.Searcher);/** + * + * 切换显示或隐藏面板 + * + * Created by GUY on 2015/11/2. + * @class BI.Switcher + * @extends BI.Widget + */ +BI.Switcher = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-switcher", + direction: BI.Direction.Top, + trigger: "click", + toggle: true, + el: {}, + popup: {}, + adapter: null, + masker: {}, + switcherClass: "bi-switcher-popup", + hoverClass: "bi-switcher-hover" + }) + }, + + _init: function () { + BI.Switcher.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._initSwitcher(); + this._initPullDownAction(); + this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); + } + } + }); + + this.element.hover(function () { + if (self.isEnabled() && self.switcher.isEnabled()) { + self.element.addClass(o.hoverClass); + } + }, function () { + if (self.isEnabled() && self.switcher.isEnabled()) { + self.element.removeClass(o.hoverClass); + } + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.switcher} + ] + }); + o.isDefaultInit && (this._assertPopupView()); + }, + + _toggle: function () { + this._assertPopupView(); + if (this.isExpanded()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + BI.each(evs, function (i, e) { + switch (e) { + case "hover": + self.element[e](function (e) { + if (self.isEnabled() && self.switcher.isEnabled()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + }, function () { + if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + }); + break; + default : + if (e) { + self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { + if (self.switcher.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.switcher.isEnabled()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isExpanded()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true)); + } + break; + } + }) + }, + + _initSwitcher: function () { + this.switcher = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this, o = this.options; + if (!this._created) { + this.popupView = BI.createWidget(o.popup, { + type: "bi.button_group", + element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)), + cls: "switcher-popup", + layouts: [{ + type: "bi.vertical", + hgap: 0, + vgap: 0 + }] + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj); + } + }); + if (o.direction !== BI.Direction.Custom && !o.adapter) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + } + this._created = true; + BI.nextTick(function () { + self.fireEvent(BI.Switcher.EVENT_AFTER_INIT); + }); + } + }, + + _hideView: function () { + this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW); + var self = this, o = this.options; + o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); + BI.nextTick(function () { + o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); + self.element.removeClass(o.switcherClass); + self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW); + }); + }, + + _popupView: function () { + var self = this, o = this.options; + this._assertPopupView(); + this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW); + o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true); + BI.nextTick(function (name) { + o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true); + self.element.addClass(o.switcherClass); + self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW); + }, this.getName()); + }, + + populate: function (items) { + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + this.switcher.populate.apply(this.switcher, arguments); + }, + + _setEnable: function (arg) { + BI.Switcher.superclass._setEnable.apply(this, arguments); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + this._assertPopupView(); + this.switcher.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + this._assertPopupView(); + return this.popupView ? this.popupView.getValue() : []; + }, + + setAdapter: function (adapter) { + this.options.adapter = adapter; + BI.Maskers.remove(this.getName()); + }, + + isViewVisible: function () { + return this.isEnabled() && this.switcher.isEnabled() && + (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible())); + }, + + isExpanded: function () { + return this.isViewVisible(); + }, + + showView: function () { + if (this.isEnabled() && this.switcher.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + adjustView: function () { + this.isViewVisible() && BI.Maskers.show(this.getName()); + }, + + getAllLeaves: function () { + return this.popupView && this.popupView.getAllLeaves(); + }, + + getNodeById: function (id) { + if (this.switcher.attr("id") === id) { + return this.switcher; + } + return this.popupView && this.popupView.getNodeById(id); + }, + + getNodeByValue: function (value) { + if (this.switcher.getValue() === value) { + return this.switcher; + } + return this.popupView && this.popupView.getNodeByValue(value); + }, + + empty: function () { + this.popupView && this.popupView.empty(); + }, + + destroy: function () { + BI.Switcher.superclass.destroy.apply(this, arguments); + } +}); +BI.Switcher.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Switcher.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Switcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Switcher.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Switcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Switcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.switcher", BI.Switcher);/** + * Created by GUY on 2015/6/26. + */ + +BI.Tab = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tab", + direction: "top",//top, bottom, left, right, custom + single: false, //是不是单页面 + logic: { + dynamic: false + }, + defaultShowIndex: false, + tab: false, + cardCreator: function (v) { + return BI.createWidget(); + } + }) + }, + + render: function () { + var self = this, o = this.options; + if (BI.isObject(o.tab)) { + this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); + this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + } + this.cardMap = {}; + this.layout = BI.createWidget({ + type: "bi.card" + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) + })))); + + var listener = new BI.ShowListener({ + eventObj: this.tab, + cardLayout: this.layout, + cardCreator: function (v) { + var card = o.cardCreator.apply(self, arguments); + self.cardMap[v] = card; + return card; + }, + afterCardShow: function (v) { + self._deleteOtherCards(v); + self.curr = v; + } + }); + listener.on(BI.ShowListener.EVENT_CHANGE, function (value) { + self.fireEvent(BI.Tab.EVENT_CHANGE, value, self); + }); + }, + + _deleteOtherCards: function (currCardName) { + var self = this, o = this.options; + if (o.single === true) { + BI.each(this.cardMap, function (name, card) { + if (name !== (currCardName + "")) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + } + }); + } + }, + + _assertCard: function (v) { + if (!this.layout.isCardExisted(v)) { + var card = this.options.cardCreator(v); + this.cardMap[v] = card; + this.layout.addCardByName(v, card); + } + }, + + mounted: function () { + var o = this.options; + if (o.defaultShowIndex !== false) { + this.setSelect(o.defaultShowIndex); + } + }, + + setSelect: function (v) { + this.tab && this.tab.setValue(v); + this._assertCard(v); + this.layout.showCardByName(v); + this._deleteOtherCards(v); + if (this.curr !== v) { + this.curr = v; + } + }, + + removeTab: function (cardname) { + var self = this, o = this.options; + BI.any(this.cardMap, function (name, card) { + if (BI.isEqual(name, (cardname + ""))) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + return true; + } + }); + }, + + getSelect: function () { + return this.curr; + }, + + getSelectedTab: function () { + return this.layout.getShowingCard(); + }, + + getTab: function (v) { + this._assertCard(v); + return this.layout.getCardByName(v); + }, + + setValue: function (v) { + var card = this.layout.getShowingCard(); + if (card) { + card.setValue(v); + } + }, + + getValue: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.getValue(); + } + }, + + populate: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.populate && card.populate.apply(card, arguments); + } + }, + + empty: function () { + this.layout.deleteAllCard(); + this.cardMap = {}; + }, + + destroy: function () { + this.cardMap = {}; + BI.Tab.superclass.destroy.apply(this, arguments); + } +}); +BI.Tab.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.tab", BI.Tab);/** + * 表示当前对象 + * + * Created by GUY on 2015/9/7. + * @class BI.EL + * @extends BI.Widget + */ +BI.EL = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-el", + el: {}, + layout: {} + }); + }, + _init: function () { + BI.EL.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.ele = BI.createWidget(o.el); + BI.createWidget(o.layout, { + type: "bi.adaptive", + element: this, + items: [this.ele] + }); + this.ele.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + }, + + setValue: function (v) { + this.ele.setValue(v); + }, + + getValue: function () { + return this.ele.getValue(); + }, + + populate: function () { + this.ele.populate.apply(this, arguments); + } +}); +BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// This is CodeMirror (http://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function(mod) { + this.CodeMirror = mod(); +})(function() { + "use strict"; + + // BROWSER SNIFFING + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + + var gecko = /gecko\/\d/i.test(navigator.userAgent); + var ie_upto10 = /MSIE \d/.test(navigator.userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); + var ie = ie_upto10 || ie_11up; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]); + var webkit = /WebKit\//.test(navigator.userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); + var chrome = /Chrome\//.test(navigator.userAgent); + var presto = /Opera\//.test(navigator.userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); + var phantom = /PhantomJS/.test(navigator.userAgent); + + var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); + var mac = ios || /Mac/.test(navigator.platform); + var windows = /win/i.test(navigator.platform); + + var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) presto_version = Number(presto_version[1]); + if (presto_version && presto_version >= 15) { presto = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || (ie && ie_version >= 9); + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + // EDITOR CONSTRUCTOR + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); + + this.options = options = options ? copyObj(options) : {}; + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false); + setGuttersForLineNumbers(options); + + var doc = options.value; + if (typeof doc == "string") doc = new Doc(doc, options.mode); + this.doc = doc; + + var input = new CodeMirror.inputStyles[options.inputStyle](this); + var display = this.display = new Display(place, doc, input); + display.wrapper.CodeMirror = this; + updateGutters(this); + themeChanged(this); + if (options.lineWrapping) + this.display.wrapper.className += " CodeMirror-wrap"; + if (options.autofocus && !mobile) display.input.focus(); + initScrollbars(this); + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + }; + + var cm = this; + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20); + + registerEventHandlers(this); + ensureGlobalHandlers(); + + startOperation(this); + this.curOp.forceUpdate = true; + attachDoc(this, doc); + + if ((options.autofocus && !mobile) || cm.hasFocus()) + setTimeout(bind(onFocus, this), 20); + else + onBlur(this); + + for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) + optionHandlers[opt](this, options[opt], Init); + maybeUpdateLineNumberWidth(this); + if (options.finishInit) options.finishInit(this); + for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); + endOperation(this); + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + display.lineDiv.style.textRendering = "auto"; + } + + // DISPLAY CONSTRUCTOR + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input) { + var d = this; + this.input = input; + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.scrollbarFiller.setAttribute("cm-not-content", "true"); + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + d.gutterFiller.setAttribute("cm-not-content", "true"); + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = elt("div", null, "CodeMirror-code"); + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + d.cursorDiv = elt("div", null, "CodeMirror-cursors"); + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure"); + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none"); + // Moved around its parent to cover visible view. + d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + d.sizerWidth = null; + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (!webkit && !(gecko && mobile)) d.scroller.draggable = true; + + if (place) { + if (place.appendChild) place.appendChild(d.wrapper); + else place(d.wrapper); + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first; + d.reportedViewFrom = d.reportedViewTo = doc.first; + // Information about the rendered lines. + d.view = []; + d.renderedView = null; + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null; + // Empty space (in pixels) above the view + d.viewOffset = 0; + d.lastWrapHeight = d.lastWrapWidth = 0; + d.updateLineNumbers = null; + + d.nativeBarWidth = d.barHeight = d.barWidth = 0; + d.scrollbarsClipped = false; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false; + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + // True when shift is held down. + d.shift = false; + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null; + + d.activeTouch = null; + + input.init(d); + } + + // STATE UPDATES + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); + resetModeState(cm); + } + + function resetModeState(cm) { + cm.doc.iter(function(line) { + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + }); + cm.doc.frontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) regChange(cm); + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap"); + cm.display.sizer.style.minWidth = ""; + cm.display.sizerWidth = null; + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap"); + findMaxLine(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function(){updateScrollbars(cm);}, 100); + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function(line) { + if (lineIsHidden(cm.doc, line)) return 0; + + var widgetsHeight = 0; + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) widgetsHeight += line.widgets[i].height; + } + + if (wrapping) + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; + else + return widgetsHeight + th; + }; + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function(line) { + var estHeight = est(line); + if (estHeight != line.height) updateLineHeight(line, estHeight); + }); + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + function guttersChanged(cm) { + updateGutters(cm); + regChange(cm); + setTimeout(function(){alignHorizontally(cm);}, 20); + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function updateGutters(cm) { + var gutters = cm.display.gutters, specs = cm.options.gutters; + removeChildren(gutters); + for (var i = 0; i < specs.length; ++i) { + var gutterClass = specs[i]; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); + if (gutterClass == "CodeMirror-linenumbers") { + cm.display.lineGutter = gElt; + gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = i ? "" : "none"; + updateGutterSpace(cm); + } + + function updateGutterSpace(cm) { + var width = cm.display.gutters.offsetWidth; + cm.display.sizer.style.marginLeft = width + "px"; + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) return 0; + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found = merged.find(0, true); + len -= cur.text.length - found.from.ch; + cur = found.to.line; + len += cur.text.length - found.to.ch; + } + return len; + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function(line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // Make sure the gutters options contains the element + // "CodeMirror-linenumbers" when the lineNumbers option is true. + function setGuttersForLineNumbers(options) { + var found = indexOf(options.gutters, "CodeMirror-linenumbers"); + if (found == -1 && options.lineNumbers) { + options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); + } else if (found > -1 && !options.lineNumbers) { + options.gutters = options.gutters.slice(0); + options.gutters.splice(found, 1); + } + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + }; + } + + function NativeScrollbars(place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + place(vert); place(horiz); + + on(vert, "scroll", function() { + if (vert.clientHeight) scroll(vert.scrollTop, "vertical"); + }); + on(horiz, "scroll", function() { + if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal"); + }); + + this.checkedOverlay = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; + } + + NativeScrollbars.prototype = copyObj({ + update: function(measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = + (measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; + } + + if (!this.checkedOverlay && measure.clientHeight > 0) { + if (sWidth == 0) this.overlayHack(); + this.checkedOverlay = true; + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}; + }, + setScrollLeft: function(pos) { + if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos; + }, + setScrollTop: function(pos) { + if (this.vert.scrollTop != pos) this.vert.scrollTop = pos; + }, + overlayHack: function() { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.minHeight = this.vert.style.minWidth = w; + var self = this; + var barMouseDown = function(e) { + if (e_target(e) != self.vert && e_target(e) != self.horiz) + operation(self.cm, onMouseDown)(e); + }; + on(this.vert, "mousedown", barMouseDown); + on(this.horiz, "mousedown", barMouseDown); + }, + clear: function() { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + } + }, NativeScrollbars.prototype); + + function NullScrollbars() {} + + NullScrollbars.prototype = copyObj({ + update: function() { return {bottom: 0, right: 0}; }, + setScrollLeft: function() {}, + setScrollTop: function() {}, + clear: function() {} + }, NullScrollbars.prototype); + + CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function() { + if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0); + }); + node.setAttribute("cm-not-content", "true"); + }, function(pos, axis) { + if (axis == "horizontal") setScrollLeft(cm, pos); + else setScrollTop(cm, pos); + }, cm); + if (cm.display.scrollbars.addClass) + addClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + function updateScrollbars(cm, measure) { + if (!measure) measure = measureForScrollbars(cm); + var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + updateHeightsInViewport(cm); + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else d.scrollbarFiller.style.display = ""; + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else d.gutterFiller.style.display = ""; + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + + var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; + } + } + return {from: from, to: Math.max(to, from + 1)}; + } + + // LINE NUMBERS + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) if (!view[i].hidden) { + if (cm.options.fixedGutter && view[i].gutter) + view[i].gutter.style.left = left; + var align = view[i].alignable; + if (align) for (var j = 0; j < align.length; j++) + align[j].style.left = left; + } + if (cm.options.fixedGutter) + display.gutters.style.left = (comp + gutterW) + "px"; + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false; + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm); + return true; + } + return false; + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; + } + + // DISPLAY DRAWING + + function DisplayUpdate(cm, viewport, force) { + var display = cm.display; + + this.viewport = viewport; + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport); + this.editorIsHidden = !display.wrapper.offsetWidth; + this.wrapperHeight = display.wrapper.clientHeight; + this.wrapperWidth = display.wrapper.clientWidth; + this.oldDisplayWidth = displayWidth(cm); + this.force = force; + this.dims = getDimensions(cm); + this.events = []; + } + + DisplayUpdate.prototype.signal = function(emitter, type) { + if (hasHandler(emitter, type)) + this.events.push(arguments); + }; + DisplayUpdate.prototype.finish = function() { + for (var i = 0; i < this.events.length; i++) + signal.apply(null, this.events[i]); + }; + + function maybeClipScrollbars(cm) { + var display = cm.display; + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; + display.heightForcer.style.height = scrollGap(cm) + "px"; + display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; + display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; + display.scrollbarsClipped = true; + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, doc = cm.doc; + + if (update.editorIsHidden) { + resetView(cm); + return false; + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + return false; + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm); + update.dims = getDimensions(cm); + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size; + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, update.visible.to + cm.options.viewportMargin); + if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom); + if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo); + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from); + to = visualLineEndNo(cm.doc, to); + } + + var different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; + adjustView(cm, from, to); + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px"; + + var toUpdate = countDirtyView(cm); + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + return false; + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var focused = activeElt(); + if (toUpdate > 4) display.lineDiv.style.display = "none"; + patchDisplay(cm, display.updateLineNumbers, update.dims); + if (toUpdate > 4) display.lineDiv.style.display = ""; + display.renderedView = display.view; + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + if (focused && activeElt() != focused && focused.offsetHeight) focused.focus(); + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv); + removeChildren(display.selectionDiv); + display.gutters.style.height = 0; + + if (different) { + display.lastWrapHeight = update.wrapperHeight; + display.lastWrapWidth = update.wrapperWidth; + startWorker(cm, 400); + } + + display.updateLineNumbers = null; + + return true; + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport; + for (var first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport); + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + break; + } + if (!updateDisplayIfNeeded(cm, update)) break; + updateHeightsInViewport(cm); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + setDocumentHeight(cm, barMeasure); + updateScrollbars(cm, barMeasure); + } + + update.signal(cm, "update", cm); + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport); + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm); + postUpdateDisplay(cm, update); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + setDocumentHeight(cm, barMeasure); + updateScrollbars(cm, barMeasure); + update.finish(); + } + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px"; + var total = measure.docHeight + cm.display.barHeight; + cm.display.heightForcer.style.top = total + "px"; + cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + "px"; + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], height; + if (cur.hidden) continue; + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + } + var diff = cur.line.height - height; + if (height < 2) height = textHeight(display); + if (diff > .001 || diff < -.001) { + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) for (var j = 0; j < cur.rest.length; j++) + updateWidgetHeight(cur.rest[j]); + } + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; ++i) + line.widgets[i].height = line.widgets[i].node.offsetHeight; + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; + width[cm.options.gutters[i]] = n.clientWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth}; + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, lineNumbers = cm.options.lineNumbers; + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + node.style.display = "none"; + else + node.parentNode.removeChild(node); + return next; + } + + var view = display.view, lineN = display.viewFrom; + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (lineView.hidden) { + } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims); + container.insertBefore(node, cur); + } else { // Already drawn + while (cur != lineView.node) cur = rm(cur); + var updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber; + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false; + updateLineForChanges(cm, lineView, lineN, dims); + } + if (updateNumber) { + removeChildren(lineView.lineNumber); + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); + } + cur = lineView.node.nextSibling; + } + lineN += lineView.size; + } + while (cur) cur = rm(cur); + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") updateLineText(cm, lineView); + else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims); + else if (type == "class") updateLineClasses(lineView); + else if (type == "widget") updateLineWidgets(cm, lineView, dims); + } + lineView.changes = null; + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) + lineView.text.parentNode.replaceChild(lineView.node, lineView.text); + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) lineView.node.style.zIndex = 2; + } + return lineView.node; + } + + function updateLineBackground(lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) cls += " CodeMirror-linebackground"; + if (lineView.background) { + if (cls) lineView.background.className = cls; + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built; + } + return buildLineContent(cm, lineView); + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) lineView.node = built.pre; + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + + function updateLineClasses(lineView) { + updateLineBackground(lineView); + if (lineView.line.wrapClass) + ensureLineWrapped(lineView).className = lineView.line.wrapClass; + else if (lineView.node != lineView.text) + lineView.node.className = ""; + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + + "px; width: " + dims.gutterTotalWidth + "px"); + cm.display.input.setUneditable(gutterWrap); + wrap.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) + gutterWrap.className += " " + lineView.line.gutterClass; + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + + cm.display.lineNumInnerWidth + "px")); + if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { + var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; + if (found) + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); + } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) lineView.alignable = null; + for (var node = lineView.node.firstChild, next; node; node = next) { + var next = node.nextSibling; + if (node.className == "CodeMirror-linewidget") + lineView.node.removeChild(node); + } + insertLineWidgets(cm, lineView, dims); + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) lineView.bgClass = built.bgClass; + if (built.textClass) lineView.textClass = built.textClass; + + updateLineClasses(lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node; + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) return; + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); + if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true"); + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) + wrap.insertBefore(node, lineView.gutter || lineView.text); + else + wrap.appendChild(node); + signalLater(widget, "redraw"); + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; + } + } + + // POSITION OBJECT + + // A Pos instance represents a position within the text. + var Pos = CodeMirror.Pos = function(line, ch) { + if (!(this instanceof Pos)) return new Pos(line, ch); + this.line = line; this.ch = ch; + }; + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; }; + + function copyPos(x) {return Pos(x.line, x.ch);} + function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; } + function minPos(a, b) { return cmp(a, b) < 0 ? a : b; } + + // INPUT HANDLING + + function ensureFocus(cm) { + if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } + } + + function isReadOnly(cm) { + return cm.options.readOnly || cm.doc.cantEdit; + } + + // This will be set to an array of strings when copying, so that, + // when pasting, we know what kind of selections the copied text + // was made out of. + var lastCopied = null; + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc; + cm.display.shift = false; + if (!sel) sel = doc.sel; + + var paste = cm.state.pasteIncoming || origin == "paste"; + var textLines = splitLines(inserted), multiPaste = null; + // When pasing N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.join("\n") == inserted) + multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines); + else if (textLines.length == sel.ranges.length) + multiPaste = map(textLines, function(l) { return [l]; }); + } + + // Normal behavior is to insert the new text into every selection + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + var from = range.from(), to = range.to(); + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + from = Pos(from.line, from.ch - deleted); + else if (cm.state.overwrite && !paste) // Handle overwrite + to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); + } + var updateInput = cm.curOp.updateInput; + var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}; + makeChange(cm.doc, changeEvent); + signalLater(cm, "inputRead", cm, changeEvent); + } + if (inserted && !paste) + triggerElectric(cm, inserted); + + ensureCursorVisible(cm); + cm.curOp.updateInput = updateInput; + cm.curOp.typing = true; + cm.state.pasteIncoming = cm.state.cutIncoming = false; + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("text/plain"); + if (pasted) { + e.preventDefault(); + runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, "paste"); }); + return true; + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) return; + var sel = cm.doc.sel; + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue; + var mode = cm.getModeAt(range.head); + var indented = false; + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) + if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart"); + break; + } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + indented = indentLine(cm, range.head.line, "smart"); + } + if (indented) signalLater(cm, "electricInput", cm, range.head.line); + } + } + + function copyableRanges(cm) { + var text = [], ranges = []; + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line; + var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; + ranges.push(lineRange); + text.push(cm.getRange(lineRange.anchor, lineRange.head)); + } + return {text: text, ranges: ranges}; + } + + function disableBrowserMagic(field) { + field.setAttribute("autocorrect", "off"); + field.setAttribute("autocapitalize", "off"); + field.setAttribute("spellcheck", "false"); + } + + // TEXTAREA INPUT STYLE + + function TextareaInput(cm) { + this.cm = cm; + // See input.poll and input.reset + this.prevInput = ""; + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false; + // Self-resetting timeout for the poller + this.polling = new Delayed(); + // Tracks when input.reset has punted to just putting a short + // string into the textarea instead of the full selection. + this.inaccurateSelection = false; + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false; + this.composing = null; + }; + + function hiddenTextarea() { + var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none"); + var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) te.style.width = "1000px"; + else te.setAttribute("wrap", "off"); + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) te.style.border = "1px solid black"; + disableBrowserMagic(te); + return div; + } + + TextareaInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = this.cm; + + // Wraps and hides input textarea + var div = this.wrapper = hiddenTextarea(); + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + var te = this.textarea = div.firstChild; + display.wrapper.insertBefore(div, display.wrapper.firstChild); + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) te.style.width = "0px"; + + on(te, "input", function() { + if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null; + input.poll(); + }); + + on(te, "paste", function(e) { + if (handlePaste(e, cm)) return true; + + cm.state.pasteIncoming = true; + input.fastPoll(); + }); + + function prepareCopyCut(e) { + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (input.inaccurateSelection) { + input.prevInput = ""; + input.inaccurateSelection = false; + te.value = lastCopied.join("\n"); + selectInput(te); + } + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll); + } else { + input.prevInput = ""; + te.value = ranges.text.join("\n"); + selectInput(te); + } + } + if (e.type == "cut") cm.state.cutIncoming = true; + } + on(te, "cut", prepareCopyCut); + on(te, "copy", prepareCopyCut); + + on(display.scroller, "paste", function(e) { + if (eventInWidget(display, e)) return; + cm.state.pasteIncoming = true; + input.focus(); + }); + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function(e) { + if (!eventInWidget(display, e)) e_preventDefault(e); + }); + + on(te, "compositionstart", function() { + var start = cm.getCursor("from"); + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + }; + }); + on(te, "compositionend", function() { + if (input.composing) { + input.poll(); + input.composing.range.clear(); + input.composing = null; + } + }); + }, + + prepareSelection: function() { + // Redraw the selection and/or cursor + var cm = this.cm, display = cm.display, doc = cm.doc; + var result = prepareSelection(cm); + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); + var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)); + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)); + } + + return result; + }, + + showSelection: function(drawn) { + var cm = this.cm, display = cm.display; + removeChildrenAndAdd(display.cursorDiv, drawn.cursors); + removeChildrenAndAdd(display.selectionDiv, drawn.selection); + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px"; + this.wrapper.style.left = drawn.teLeft + "px"; + } + }, + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + reset: function(typing) { + if (this.contextMenuPending) return; + var minimal, selected, cm = this.cm, doc = cm.doc; + if (cm.somethingSelected()) { + this.prevInput = ""; + var range = doc.sel.primary(); + minimal = hasCopyEvent && + (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); + var content = minimal ? "-" : selected || cm.getSelection(); + this.textarea.value = content; + if (cm.state.focused) selectInput(this.textarea); + if (ie && ie_version >= 9) this.hasSelection = content; + } else if (!typing) { + this.prevInput = this.textarea.value = ""; + if (ie && ie_version >= 9) this.hasSelection = null; + } + this.inaccurateSelection = minimal; + }, + + getField: function() { return this.textarea; }, + + supportsTouch: function() { return false; }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { + try { this.textarea.focus(); } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + }, + + blur: function() { this.textarea.blur(); }, + + resetPosition: function() { + this.wrapper.style.top = this.wrapper.style.left = 0; + }, + + receivedFocus: function() { this.slowPoll(); }, + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + slowPoll: function() { + var input = this; + if (input.pollingFast) return; + input.polling.set(this.cm.options.pollInterval, function() { + input.poll(); + if (input.cm.state.focused) input.slowPoll(); + }); + }, + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + fastPoll: function() { + var missed = false, input = this; + input.pollingFast = true; + function p() { + var changed = input.poll(); + if (!changed && !missed) {missed = true; input.polling.set(60, p);} + else {input.pollingFast = false; input.slowPoll();} + } + input.polling.set(20, p); + }, + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + poll: function() { + var cm = this.cm, input = this.textarea, prevInput = this.prevInput; + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || !cm.state.focused || + (hasSelection(input) && !prevInput) || + isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq) + return false; + + var text = input.value; + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) return false; + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset(); + return false; + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0); + if (first == 0x200b && !prevInput) prevInput = "\u200b"; + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); } + } + // Find the part of the input that is actually new + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; + + var self = this; + runInOp(cm, function() { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, self.composing ? "*compose" : null); + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = ""; + else self.prevInput = text; + + if (self.composing) { + self.composing.range.clear(); + self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}); + } + }); + return true; + }, + + ensurePolled: function() { + if (this.pollingFast && this.poll()) this.pollingFast = false; + }, + + onKeyPress: function() { + if (ie && ie_version >= 9) this.hasSelection = null; + this.fastPoll(); + }, + + onContextMenu: function(e) { + var input = this, cm = input.cm, display = cm.display, te = input.textarea; + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || presto) return; // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && cm.doc.sel.contains(pos) == -1) + operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); + + var oldCSS = te.style.cssText; + input.wrapper.style.position = "absolute"; + te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + + "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " + + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + + "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712) + display.input.focus(); + if (webkit) window.scrollTo(null, oldScrollY); + display.input.reset(); + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) te.value = input.prevInput = " "; + input.contextMenuPending = true; + display.selForContextMenu = cm.doc.sel; + clearTimeout(display.detectingSelectAll); + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected(); + var extval = "\u200b" + (selected ? te.value : ""); + te.value = "\u21da"; // Used to catch context-menu undo + te.value = extval; + input.prevInput = selected ? "" : "\u200b"; + te.selectionStart = 1; te.selectionEnd = extval.length; + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel; + } + } + function rehide() { + input.contextMenuPending = false; + input.wrapper.style.position = "relative"; + te.style.cssText = oldCSS; + if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); + var i = 0, poll = function() { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") + operation(cm, commands.selectAll)(cm); + else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); + else display.input.reset(); + }; + display.detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && ie_version >= 9) prepareSelectAllHack(); + if (captureRightClick) { + e_stop(e); + var mouseup = function() { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + }, + + setUneditable: nothing, + + needsContentAttribute: false + }, TextareaInput.prototype); + + // CONTENTEDITABLE INPUT STYLE + + function ContentEditableInput(cm) { + this.cm = cm; + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; + this.polling = new Delayed(); + this.gracePeriod = false; + } + + ContentEditableInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = input.cm; + var div = input.div = display.lineDiv; + div.contentEditable = "true"; + disableBrowserMagic(div); + + on(div, "paste", function(e) { handlePaste(e, cm); }) + + on(div, "compositionstart", function(e) { + var data = e.data; + input.composing = {sel: cm.doc.sel, data: data, startData: data}; + if (!data) return; + var prim = cm.doc.sel.primary(); + var line = cm.getLine(prim.head.line); + var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length)); + if (found > -1 && found <= prim.head.ch) + input.composing.sel = simpleSelection(Pos(prim.head.line, found), + Pos(prim.head.line, found + data.length)); + }); + on(div, "compositionupdate", function(e) { + input.composing.data = e.data; + }); + on(div, "compositionend", function(e) { + var ours = input.composing; + if (!ours) return; + if (e.data != ours.startData && !/\u200b/.test(e.data)) + ours.data = e.data; + // Need a small delay to prevent other code (input event, + // selection polling) from doing damage when fired right after + // compositionend. + setTimeout(function() { + if (!ours.handled) + input.applyComposition(ours); + if (input.composing == ours) + input.composing = null; + }, 50); + }); + + on(div, "touchstart", function() { + input.forceCompositionEnd(); + }); + + on(div, "input", function() { + if (input.composing) return; + if (!input.pollContent()) + runInOp(input.cm, function() {regChange(cm);}); + }); + + function onCopyCut(e) { + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (e.type == "cut") cm.replaceSelection("", null, "cut"); + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.operation(function() { + cm.setSelections(ranges.ranges, 0, sel_dontScroll); + cm.replaceSelection("", null, "cut"); + }); + } + } + // iOS exposes the clipboard API, but seems to discard content inserted into it + if (e.clipboardData && !ios) { + e.preventDefault(); + e.clipboardData.clearData(); + e.clipboardData.setData("text/plain", lastCopied.join("\n")); + } else { + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), te = kludge.firstChild; + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); + te.value = lastCopied.join("\n"); + var hadFocus = document.activeElement; + selectInput(te); + setTimeout(function() { + cm.display.lineSpace.removeChild(kludge); + hadFocus.focus(); + }, 50); + } + } + on(div, "copy", onCopyCut); + on(div, "cut", onCopyCut); + }, + + prepareSelection: function() { + var result = prepareSelection(this.cm, false); + result.focus = this.cm.state.focused; + return result; + }, + + showSelection: function(info) { + if (!info || !this.cm.display.view.length) return; + if (info.focus) this.showPrimarySelection(); + this.showMultipleSelections(info); + }, + + showPrimarySelection: function() { + var sel = window.getSelection(), prim = this.cm.doc.sel.primary(); + var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset); + var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset); + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), prim.from()) == 0 && + cmp(maxPos(curAnchor, curFocus), prim.to()) == 0) + return; + + var start = posToDOM(this.cm, prim.from()); + var end = posToDOM(this.cm, prim.to()); + if (!start && !end) return; + + var view = this.cm.display.view; + var old = sel.rangeCount && sel.getRangeAt(0); + if (!start) { + start = {node: view[0].measure.map[2], offset: 0}; + } else if (!end) { // FIXME dangerously hacky + var measure = view[view.length - 1].measure; + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; + } + + try { var rng = range(start.node, start.offset, end.offset, end.node); } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + sel.removeAllRanges(); + sel.addRange(rng); + if (old && sel.anchorNode == null) sel.addRange(old); + else if (gecko) this.startGracePeriod(); + } + this.rememberSelection(); + }, + + startGracePeriod: function() { + var input = this; + clearTimeout(this.gracePeriod); + this.gracePeriod = setTimeout(function() { + input.gracePeriod = false; + if (input.selectionChanged()) + input.cm.operation(function() { input.cm.curOp.selectionChanged = true; }); + }, 20); + }, + + showMultipleSelections: function(info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); + }, + + rememberSelection: function() { + var sel = window.getSelection(); + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; + }, + + selectionInEditor: function() { + var sel = window.getSelection(); + if (!sel.rangeCount) return false; + var node = sel.getRangeAt(0).commonAncestorContainer; + return contains(this.div, node); + }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor") this.div.focus(); + }, + blur: function() { this.div.blur(); }, + getField: function() { return this.div; }, + + supportsTouch: function() { return true; }, + + receivedFocus: function() { + var input = this; + if (this.selectionInEditor()) + this.pollSelection(); + else + runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; }); + + function poll() { + if (input.cm.state.focused) { + input.pollSelection(); + input.polling.set(input.cm.options.pollInterval, poll); + } + } + this.polling.set(this.cm.options.pollInterval, poll); + }, + + selectionChanged: function() { + var sel = window.getSelection(); + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset; + }, + + pollSelection: function() { + if (!this.composing && !this.gracePeriod && this.selectionChanged()) { + var sel = window.getSelection(), cm = this.cm; + this.rememberSelection(); + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var head = domToPos(cm, sel.focusNode, sel.focusOffset); + if (anchor && head) runInOp(cm, function() { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); + if (anchor.bad || head.bad) cm.curOp.selectionChanged = true; + }); + } + }, + + pollContent: function() { + var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); + var from = sel.from(), to = sel.to(); + if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false; + + var fromIndex; + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + var fromLine = lineNo(display.view[0].line); + var fromNode = display.view[0].node; + } else { + var fromLine = lineNo(display.view[fromIndex].line); + var fromNode = display.view[fromIndex - 1].node.nextSibling; + } + var toIndex = findViewIndex(cm, to.line); + if (toIndex == display.view.length - 1) { + var toLine = display.viewTo - 1; + var toNode = display.lineDiv.lastChild; + } else { + var toLine = lineNo(display.view[toIndex + 1].line) - 1; + var toNode = display.view[toIndex + 1].node.previousSibling; + } + + var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); + var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } + else break; + } + + var cutFront = 0, cutEnd = 0; + var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + ++cutFront; + var newBot = lst(newText), oldBot = lst(oldText); + var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)); + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + ++cutEnd; + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd); + newText[0] = newText[0].slice(cutFront); + + var chFrom = Pos(fromLine, cutFront); + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input"); + return true; + } + }, + + ensurePolled: function() { + this.forceCompositionEnd(); + }, + reset: function() { + this.forceCompositionEnd(); + }, + forceCompositionEnd: function() { + if (!this.composing || this.composing.handled) return; + this.applyComposition(this.composing); + this.composing.handled = true; + this.div.blur(); + this.div.focus(); + }, + applyComposition: function(composing) { + if (composing.data && composing.data != composing.startData) + operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel); + }, + + setUneditable: function(node) { + node.setAttribute("contenteditable", "false"); + }, + + onKeyPress: function(e) { + e.preventDefault(); + operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); + }, + + onContextMenu: nothing, + resetPosition: nothing, + + needsContentAttribute: true + }, ContentEditableInput.prototype); + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line); + if (!view || view.hidden) return null; + var line = getLine(cm.doc, pos.line); + var info = mapFromLineView(view, line, pos.line); + + var order = getOrder(line), side = "left"; + if (order) { + var partPos = getBidiPartAt(order, pos.ch); + side = partPos % 2 ? "right" : "left"; + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); + result.offset = result.collapse == "right" ? result.end : result.start; + return result; + } + + function badPos(pos, bad) { if (bad) pos.bad = true; return pos; } + + function domToPos(cm, node, offset) { + var lineNode; + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset]; + if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true); + node = null; offset = 0; + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) return null; + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break; + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i]; + if (lineView.node == lineNode) + return locateNodeInLineView(lineView, node, offset); + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, bad = false; + if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true); + if (node == wrapper) { + bad = true; + node = wrapper.childNodes[offset]; + offset = 0; + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line; + return badPos(Pos(lineNo(line), line.text.length), bad); + } + } + + var textNode = node.nodeType == 3 ? node : null, topNode = node; + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild; + if (offset) offset = textNode.nodeValue.length; + } + while (topNode.parentNode != wrapper) topNode = topNode.parentNode; + var measure = lineView.measure, maps = measure.maps; + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i]; + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2]; + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); + var ch = map[j] + offset; + if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)]; + return Pos(line, ch); + } + } + } + } + var found = find(textNode, topNode, offset); + if (found) return badPos(found, bad); + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0); + if (found) + return badPos(Pos(found.line, found.ch - dist), bad); + else + dist += after.textContent.length; + } + for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1); + if (found) + return badPos(Pos(found.line, found.ch + dist), bad); + else + dist += after.textContent.length; + } + } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", closing = false; + function recognizeMarker(id) { return function(marker) { return marker.id == id; }; } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text"); + if (cmText != null) { + if (cmText == "") cmText = node.textContent.replace(/\u200b/g, ""); + text += cmText; + return; + } + var markerID = node.getAttribute("cm-marker"), range; + if (markerID) { + var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); + if (found.length && (range = found[0].find())) + text += getBetween(cm.doc, range.from, range.to).join("\n"); + return; + } + if (node.getAttribute("contenteditable") == "false") return; + for (var i = 0; i < node.childNodes.length; i++) + walk(node.childNodes[i]); + if (/^(pre|div|p)$/i.test(node.nodeName)) + closing = true; + } else if (node.nodeType == 3) { + var val = node.nodeValue; + if (!val) return; + if (closing) { + text += "\n"; + closing = false; + } + text += val; + } + } + for (;;) { + walk(from); + if (from == to) break; + from = from.nextSibling; + } + return text; + } + + CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; + + // SELECTION / CURSOR + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + function Selection(ranges, primIndex) { + this.ranges = ranges; + this.primIndex = primIndex; + } + + Selection.prototype = { + primary: function() { return this.ranges[this.primIndex]; }, + equals: function(other) { + if (other == this) return true; + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false; + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], there = other.ranges[i]; + if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false; + } + return true; + }, + deepCopy: function() { + for (var out = [], i = 0; i < this.ranges.length; i++) + out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); + return new Selection(out, this.primIndex); + }, + somethingSelected: function() { + for (var i = 0; i < this.ranges.length; i++) + if (!this.ranges[i].empty()) return true; + return false; + }, + contains: function(pos, end) { + if (!end) end = pos; + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i]; + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + return i; + } + return -1; + } + }; + + function Range(anchor, head) { + this.anchor = anchor; this.head = head; + } + + Range.prototype = { + from: function() { return minPos(this.anchor, this.head); }, + to: function() { return maxPos(this.anchor, this.head); }, + empty: function() { + return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; + } + }; + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(ranges, primIndex) { + var prim = ranges[primIndex]; + ranges.sort(function(a, b) { return cmp(a.from(), b.from()); }); + primIndex = indexOf(ranges, prim); + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], prev = ranges[i - 1]; + if (cmp(prev.to(), cur.from()) >= 0) { + var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; + if (i <= primIndex) --primIndex; + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); + } + } + return new Selection(ranges, primIndex); + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0); + } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} + function clipPos(doc, pos) { + if (pos.line < doc.first) return Pos(doc.first, 0); + var last = doc.first + doc.size - 1; + if (pos.line > last) return Pos(last, getLine(doc, last).text.length); + return clipToLen(pos, getLine(doc, pos.line).text.length); + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) return Pos(pos.line, linelen); + else if (ch < 0) return Pos(pos.line, 0); + else return pos; + } + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} + function clipPosArray(doc, array) { + for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]); + return out; + } + + // SELECTION UPDATES + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(doc, range, head, other) { + if (doc.cm && doc.cm.display.shift || doc.extend) { + var anchor = range.anchor; + if (other) { + var posBefore = cmp(head, anchor) < 0; + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head; + head = other; + } else if (posBefore != (cmp(head, other) < 0)) { + head = other; + } + } + return new Range(anchor, head); + } else { + return new Range(other || head, head); + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options) { + setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options); + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + for (var out = [], i = 0; i < doc.sel.ranges.length; i++) + out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); + var newSel = normalizeSelection(out, doc.sel.primIndex); + setSelection(doc, newSel, options); + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0); + ranges[i] = range; + setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options); + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options); + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = []; + for (var i = 0; i < ranges.length; i++) + this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)); + } + }; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); + if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1); + else return sel; + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, last = lst(done); + if (last && last.ranges) { + done[done.length - 1] = sel; + setSelectionNoUndo(doc, sel, options); + } else { + setSelection(doc, sel, options); + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options); + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); + } + + function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + sel = filterSelectionChange(doc, sel); + + var bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); + + if (!(options && options.scroll === false) && doc.cm) + ensureCursorVisible(doc.cm); + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) return; + + doc.sel = sel; + + if (doc.cm) { + doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true; + signalCursorActivity(doc.cm); + } + signalLater(doc, "cursorActivity", doc); + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear); + var newHead = skipAtomic(doc, range.head, bias, mayClear); + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) out = sel.ranges.slice(0, i); + out[i] = new Range(newAnchor, newHead); + } + } + return out ? normalizeSelection(out, sel.primIndex) : sel; + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, bias, mayClear) { + var flipped = false, curPos = pos; + var dir = bias || 1; + doc.cantEdit = false; + search: for (;;) { + var line = getLine(doc, curPos.line); + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && + (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) break; + else {--i; continue;} + } + } + if (!m.atomic) continue; + var newPos = m.find(dir < 0 ? -1 : 1); + if (cmp(newPos, curPos) == 0) { + newPos.ch += dir; + if (newPos.ch < 0) { + if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); + else newPos = null; + } else if (newPos.ch > line.text.length) { + if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); + else newPos = null; + } + if (!newPos) { + if (flipped) { + // Driven in a corner -- no valid cursor position found at all + // -- try again *with* clearing, if we didn't already + if (!mayClear) return skipAtomic(doc, pos, bias, true); + // Otherwise, turn off editing until further notice, and return the start of the doc + doc.cantEdit = true; + return Pos(doc.first, 0); + } + flipped = true; newPos = pos; dir = -dir; + } + } + curPos = newPos; + continue search; + } + } + } + return curPos; + } + } + + // SELECTION DRAWING + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); + } + + function prepareSelection(cm, primary) { + var doc = cm.doc, result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (primary === false && i == doc.sel.primIndex) continue; + var range = doc.sel.ranges[i]; + var collapsed = range.empty(); + if (collapsed || cm.options.showCursorWhenSelecting) + drawSelectionCursor(cm, range, curFragment); + if (!collapsed) + drawSelectionRange(cm, range, selFragment); + } + return result; + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, range, output) { + var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine); + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + + function add(left, top, width, bottom) { + if (top < 0) top = 0; + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + + "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + + "px; height: " + (bottom - top) + "px")); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias); + } + + iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { + var leftPos = coords(from, "left"), rightPos, left, right; + if (from == to) { + rightPos = leftPos; + left = right = leftPos.left; + } else { + rightPos = coords(to - 1, "right"); + if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } + left = leftPos.left; + right = rightPos.right; + } + if (fromArg == null && from == 0) left = leftSide; + if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part + add(left, leftPos.top, null, leftPos.bottom); + left = leftSide; + if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); + } + if (toArg == null && to == lineLen) right = rightSide; + if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) + start = leftPos; + if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) + end = rightPos; + if (left < leftSide + 1) left = leftSide; + add(left, rightPos.top, right - left, rightPos.bottom); + }); + return {start: start, end: end}; + } + + var sFrom = range.from(), sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + add(leftSide, leftEnd.bottom, null, rightStart.top); + } + + output.appendChild(fragment); + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) return; + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + display.blinker = setInterval(function() { + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); + else if (cm.options.cursorBlinkRate < 0) + display.cursorDiv.style.visibility = "hidden"; + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo) + cm.state.highlight.set(time, bind(highlightWorker, cm)); + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.frontier < doc.first) doc.frontier = doc.first; + if (doc.frontier >= cm.display.viewTo) return; + var end = +new Date + cm.options.workTime; + var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); + var changedLines = []; + + doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) { + if (doc.frontier >= cm.display.viewFrom) { // Visible + var oldStyles = line.styles; + var highlighted = highlightLine(cm, line, state, true); + line.styles = highlighted.styles; + var oldCls = line.styleClasses, newCls = highlighted.classes; + if (newCls) line.styleClasses = newCls; + else if (oldCls) line.styleClasses = null; + var ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); + for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; + if (ischange) changedLines.push(doc.frontier); + line.stateAfter = copyState(doc.mode, state); + } else { + processLine(cm, line.text, state); + line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; + } + ++doc.frontier; + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true; + } + }); + if (changedLines.length) runInOp(cm, function() { + for (var i = 0; i < changedLines.length; i++) + regLineChange(cm, changedLines[i], "text"); + }); + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) return doc.first; + var line = getLine(doc, search - 1); + if (line.stateAfter && (!precise || search <= doc.frontier)) return search; + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + + function getStateBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) return true; + var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; + if (!state) state = startState(doc.mode); + else state = copyState(doc.mode, state); + doc.iter(pos, n, function(line) { + processLine(cm, line.text, state); + var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo; + line.stateAfter = save ? copyState(doc.mode, state) : null; + ++pos; + }); + if (precise) doc.frontier = pos; + return state; + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop;} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} + function paddingH(display) { + if (display.cachedPaddingH) return display.cachedPaddingH; + var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; + if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data; + return data; + } + + function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) + heights.push((cur.bottom + next.top) / 2 - rect.top); + } + } + heights.push(rect.bottom - rect.top); + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + return {map: lineView.measure.map, cache: lineView.measure.cache}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineView.rest[i] == line) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineNo(lineView.rest[i]) > lineN) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true}; + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view; + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + return cm.display.view[findViewIndex(cm, lineN)]; + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + return ext; + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) + view = null; + else if (view && view.changes) + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + if (!view) + view = updateExternalMeasurement(cm, line); + + var info = mapFromLineView(view, line, lineN); + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + }; + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) ch = -1; + var key = ch + (bias || ""), found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; + } else { + if (!prepared.rect) + prepared.rect = prepared.view.text.getBoundingClientRect(); + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) prepared.cache[key] = found; + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom}; + } + + var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + var mStart = map[i], mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) collapse = "right"; + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + collapse = bias; + if (bias == "left" && start == 0) + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } + if (bias == "right" && start == mEnd - mStart) + while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } + break; + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}; + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, start = place.start, end = place.end, collapse = place.collapse; + + var rect; + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start; + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end; + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { + rect = node.parentNode.getBoundingClientRect(); + } else if (ie && cm.options.lineWrapping) { + var rects = range(node, start, end).getClientRects(); + if (rects.length) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = nullRect; + } else { + rect = range(node, start, end).getBoundingClientRect() || nullRect; + } + if (rect.left || rect.right || start == 0) break; + end = start; + start = start - 1; + collapse = "right"; + } + if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect); + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) collapse = bias = "right"; + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = node.getBoundingClientRect(); + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) + rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; + else + rect = nullRect; + } + + var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + for (var i = 0; i < heights.length - 1; i++) + if (mid < heights[i]) break; + var top = i ? heights[i - 1] : 0, bot = heights[i]; + var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot}; + if (!rect.left && !rect.right) result.bogus = true; + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } + + return result; + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + return rect; + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY}; + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + lineView.measure.caches[i] = {}; + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) + clearLineMeasurementCacheFor(cm.display.view[i]); + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; + cm.display.lineNumChars = null; + } + + function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } + function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"/null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context) { + if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { + var size = widgetHeight(lineObj.widgets[i]); + rect.top += size; rect.bottom += size; + } + if (context == "line") return rect; + if (!context) context = "local"; + var yOff = heightAtLine(lineObj); + if (context == "local") yOff += paddingTop(cm.display); + else yOff -= cm.display.viewOffset; + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect; + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"/null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") return coords; + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) lineObj = getLine(cm.doc, pos.line); + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj); + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) m.left = m.right; else m.right = m.left; + return intoCoordSystem(cm, lineObj, m, context); + } + function getBidi(ch, partPos) { + var part = order[partPos], right = part.level % 2; + if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { + part = order[--partPos]; + ch = bidiRight(part) - (part.level % 2 ? 0 : 1); + right = true; + } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { + part = order[++partPos]; + ch = bidiLeft(part) - part.level % 2; + right = false; + } + if (right && ch == part.to && ch > part.from) return get(ch - 1); + return get(ch, right); + } + var order = getOrder(lineObj), ch = pos.ch; + if (!order) return get(ch); + var partPos = getBidiPartAt(order, ch); + var val = getBidi(ch, partPos); + if (bidiOther != null) val.other = getBidi(ch, bidiOther); + return val; + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0, pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch; + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return {left: left, right: left, top: top, bottom: top + lineObj.height}; + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, outside, xRel) { + var pos = Pos(line, ch); + pos.xRel = xRel; + if (outside) pos.outside = true; + return pos; + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) return PosWithInfo(doc.first, 0, true, -1); + var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineN > last) + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); + if (x < 0) x = 0; + + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var merged = collapsedSpanAtEnd(lineObj); + var mergedPos = merged && merged.find(0, true); + if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) + lineN = lineNo(lineObj = mergedPos.to.line); + else + return found; + } + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + var innerOff = y - heightAtLine(lineObj); + var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + + function getX(ch) { + var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure); + wrongLine = true; + if (innerOff > sp.bottom) return sp.left - adjust; + else if (innerOff < sp.top) return sp.left + adjust; + else wrongLine = false; + return sp.left; + } + + var bidi = getOrder(lineObj), dist = lineObj.text.length; + var from = lineLeft(lineObj), to = lineRight(lineObj); + var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; + + if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); + // Do a binary search between these bounds. + for (;;) { + if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { + var ch = x < fromX || x - fromX <= toX - x ? from : to; + var xDiff = x - (ch == from ? fromX : toX); + while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; + var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, + xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); + return pos; + } + var step = Math.ceil(dist / 2), middle = from + step; + if (bidi) { + middle = from; + for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); + } + var middleX = getX(middle); + if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} + else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} + } + } + + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight; + if (measureText == null) { + measureText = elt("pre"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) display.cachedTextHeight = height; + removeChildren(display.measure); + return height || 1; + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth; + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor]); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; + if (width > 2) display.cachedCharWidth = width; + return width || 10; + } + + // OPERATIONS + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var operationGroup = null; + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: null, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId // Unique ID + }; + if (operationGroup) { + operationGroup.ops.push(cm.curOp); + } else { + cm.curOp.ownsGroup = operationGroup = { + ops: [cm.curOp], + delayedCallbacks: [] + }; + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, i = 0; + do { + for (; i < callbacks.length; i++) + callbacks[i](); + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm); + } + } while (i < callbacks.length); + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp, group = op.ownsGroup; + if (!group) return; + + try { fireCallbacksForOps(group); } + finally { + operationGroup = null; + for (var i = 0; i < group.ops.length; i++) + group.ops[i].cm.curOp = null; + endOperations(group); + } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R1(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W1(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R2(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W2(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_finish(ops[i]); + } + + function endOperation_R1(op) { + var cm = op.cm, display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) findMaxLine(cm); + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + + function endOperation_R2(op) { + var cm = op.cm, display = cm.display; + if (op.updatedDisplay) updateHeightsInViewport(cm); + + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + + if (op.updatedDisplay || op.selectionChanged) + op.preparedSelection = display.input.prepareSelection(); + } + + function endOperation_W2(op) { + var cm = op.cm; + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); + cm.display.maxLineChanged = false; + } + + if (op.preparedSelection) + cm.display.input.showSelection(op.preparedSelection); + if (op.updatedDisplay) + setDocumentHeight(cm, op.barMeasure); + if (op.updatedDisplay || op.startHeight != cm.doc.height) + updateScrollbars(cm, op.barMeasure); + + if (op.selectionChanged) restartBlink(cm); + + if (cm.state.focused && op.updateInput) + cm.display.input.reset(op.typing); + if (op.focus && op.focus == activeElt()) ensureFocus(op.cm); + } + + function endOperation_finish(op) { + var cm = op.cm, display = cm.display, doc = cm.doc; + + if (op.updatedDisplay) postUpdateDisplay(cm, op.update); + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + display.wheelStartX = display.wheelStartY = null; + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { + doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); + display.scrollbars.setScrollTop(doc.scrollTop); + display.scroller.scrollTop = doc.scrollTop; + } + if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { + doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft)); + display.scrollbars.setScrollLeft(doc.scrollLeft); + display.scroller.scrollLeft = doc.scrollLeft; + alignHorizontally(cm); + } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) for (var i = 0; i < hidden.length; ++i) + if (!hidden[i].lines.length) signal(hidden[i], "hide"); + if (unhidden) for (var i = 0; i < unhidden.length; ++i) + if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); + + if (display.wrapper.offsetHeight) + doc.scrollTop = cm.display.scroller.scrollTop; + + // Fire change events, and delayed event handlers + if (op.changeObjs) + signal(cm, "changes", cm, op.changeObjs); + if (op.update) + op.update.finish(); + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) return f(); + startOperation(cm); + try { return f(); } + finally { endOperation(cm); } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) return f.apply(cm, arguments); + startOperation(cm); + try { return f.apply(cm, arguments); } + finally { endOperation(cm); } + }; + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) return f.apply(this, arguments); + startOperation(this); + try { return f.apply(this, arguments); } + finally { endOperation(this); } + }; + } + function docMethodOp(f) { + return function() { + var cm = this.cm; + if (!cm || cm.curOp) return f.apply(this, arguments); + startOperation(cm); + try { return f.apply(this, arguments); } + finally { endOperation(cm); } + }; + } + + // VIEW TRACKING + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array; + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) from = cm.doc.first; + if (to == null) to = cm.doc.first + cm.doc.size; + if (!lendiff) lendiff = 0; + + var display = cm.display; + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + display.updateLineNumbers = from; + + cm.curOp.viewChanged = true; + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + resetView(cm); + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { // Bottom overlap + var cut = viewCuttingPoint(cm, from, from, -1); + if (cut) { + display.view = display.view.slice(0, cut.index); + display.viewTo = cut.lineN; + } else { + resetView(cm); + } + } else { // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) + ext.lineN += lendiff; + else if (from < ext.lineN + ext.size) + display.externalMeasured = null; + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + display.externalMeasured = null; + + if (line < display.viewFrom || line >= display.viewTo) return; + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) return; + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) arr.push(type); + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) return null; + n -= cm.display.viewFrom; + if (n < 0) return null; + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) return i; + } + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), diff, view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + return {index: index, lineN: newN}; + for (var i = 0, n = cm.display.viewFrom; i < index; i++) + n += view[i].size; + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) return null; + diff = (n + view[index].size) - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; newN += diff; + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) return null; + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return {index: index, lineN: newN}; + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); + else if (display.viewFrom < from) + display.view = display.view.slice(findViewIndex(cm, from)); + display.viewFrom = from; + if (display.viewTo < to) + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); + else if (display.viewTo > to) + display.view = display.view.slice(0, findViewIndex(cm, to)); + } + display.viewTo = to; + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty; + } + return dirty; + } + + // EVENT HANDLERS + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + on(d.scroller, "dblclick", operation(cm, function(e) { + if (signalDOMEvent(cm, e)) return; + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; + e_preventDefault(e); + var word = cm.findWordAt(pos); + extendSelection(cm.doc, word.anchor, word.head); + })); + else + on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); + + // Used to suppress mouse event handling when a touch happens + var touchFinished, prevTouch = {end: 0}; + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000); + prevTouch = d.activeTouch; + prevTouch.end = +new Date; + } + }; + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) return false; + var touch = e.touches[0]; + return touch.radiusX <= 1 && touch.radiusY <= 1; + } + function farAway(touch, other) { + if (other.left == null) return true; + var dx = other.left - touch.left, dy = other.top - touch.top; + return dx * dx + dy * dy > 20 * 20; + } + on(d.scroller, "touchstart", function(e) { + if (!isMouseLikeTouchEvent(e)) { + clearTimeout(touchFinished); + var now = +new Date; + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null}; + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX; + d.activeTouch.top = e.touches[0].pageY; + } + } + }); + on(d.scroller, "touchmove", function() { + if (d.activeTouch) d.activeTouch.moved = true; + }); + on(d.scroller, "touchend", function(e) { + var touch = d.activeTouch; + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + var pos = cm.coordsChar(d.activeTouch, "page"), range; + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + range = new Range(pos, pos); + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + range = cm.findWordAt(pos); + else // Triple tap + range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); + cm.setSelection(range.anchor, range.head); + cm.focus(); + e_preventDefault(e); + } + finishTouch(); + }); + on(d.scroller, "touchcancel", finishTouch); + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function() { + if (d.scroller.clientHeight) { + setScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); + on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + d.dragFunctions = { + simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);}, + start: function(e){onDragStart(cm, e);}, + drop: operation(cm, onDrop) + }; + + var inp = d.input.getField(); + on(inp, "keyup", function(e) { onKeyUp.call(cm, e); }); + on(inp, "keydown", operation(cm, onKeyDown)); + on(inp, "keypress", operation(cm, onKeyPress)); + on(inp, "focus", bind(onFocus, cm)); + on(inp, "blur", bind(onBlur, cm)); + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != CodeMirror.Init; + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions; + var toggle = value ? on : off; + toggle(cm.display.scroller, "dragstart", funcs.start); + toggle(cm.display.scroller, "dragenter", funcs.simple); + toggle(cm.display.scroller, "dragover", funcs.simple); + toggle(cm.display.scroller, "drop", funcs.drop); + } + } + + // Called when the window resizes + function onResize(cm) { + var d = cm.display; + if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth) + return; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + d.scrollbarsClipped = false; + cm.setSize(); + } + + // MOUSE EVENTS + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + return true; + } + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null; + + var x, y, space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top; } + catch (e) { return null; } + var coords = coordsChar(cm, x, y), line; + if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords; + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, display = cm.display; + if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return; + display.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false; + setTimeout(function(){display.scroller.draggable = true;}, 100); + } + return; + } + if (clickInGutter(cm, e)) return; + var start = posFromMouse(cm, e); + window.focus(); + + switch (e_button(e)) { + case 1: + if (start) + leftButtonDown(cm, e, start); + else if (e_target(e) == display.scroller) + e_preventDefault(e); + break; + case 2: + if (webkit) cm.state.lastMiddleDown = +new Date; + if (start) extendSelection(cm.doc, start); + setTimeout(function() {display.input.focus();}, 20); + e_preventDefault(e); + break; + case 3: + if (captureRightClick) onContextMenu(cm, e); + else delayBlurEvent(cm); + break; + } + } + + var lastClick, lastDoubleClick; + function leftButtonDown(cm, e, start) { + if (ie) setTimeout(bind(ensureFocus, cm), 0); + else cm.curOp.focus = activeElt(); + + var now = +new Date, type; + if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) { + type = "triple"; + } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) { + type = "double"; + lastDoubleClick = {time: now, pos: start}; + } else { + type = "single"; + lastClick = {time: now, pos: start}; + } + + var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; + if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && + type == "single" && (contained = sel.contains(start)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) && + (cmp(contained.to(), start) > 0 || start.xRel < 0)) + leftButtonStartDrag(cm, e, start, modifier); + else + leftButtonSelect(cm, e, start, type, modifier); + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, e, start, modifier) { + var display = cm.display, startTime = +new Date; + var dragEnd = operation(cm, function(e2) { + if (webkit) display.scroller.draggable = false; + cm.state.draggingText = false; + off(document, "mouseup", dragEnd); + off(display.scroller, "drop", dragEnd); + if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { + e_preventDefault(e2); + if (!modifier && +new Date - 200 < startTime) + extendSelection(cm.doc, start); + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if (webkit || ie && ie_version == 9) + setTimeout(function() {document.body.focus(); display.input.focus();}, 20); + else + display.input.focus(); + } + }); + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true; + cm.state.draggingText = dragEnd; + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop(); + on(document, "mouseup", dragEnd); + on(display.scroller, "drop", dragEnd); + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, e, start, type, addNew) { + var display = cm.display, doc = cm.doc; + e_preventDefault(e); + + var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; + if (addNew && !e.shiftKey) { + ourIndex = doc.sel.contains(start); + if (ourIndex > -1) + ourRange = ranges[ourIndex]; + else + ourRange = new Range(start, start); + } else { + ourRange = doc.sel.primary(); + ourIndex = doc.sel.primIndex; + } + + if (e.altKey) { + type = "rect"; + if (!addNew) ourRange = new Range(start, start); + start = posFromMouse(cm, e, true, true); + ourIndex = -1; + } else if (type == "double") { + var word = cm.findWordAt(start); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, word.anchor, word.head); + else + ourRange = word; + } else if (type == "triple") { + var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0))); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, line.anchor, line.head); + else + ourRange = line; + } else { + ourRange = extendRange(doc, ourRange, start); + } + + if (!addNew) { + ourIndex = 0; + setSelection(doc, new Selection([ourRange], 0), sel_mouse); + startSel = doc.sel; + } else if (ourIndex == -1) { + ourIndex = ranges.length; + setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}); + } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) { + setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0)); + startSel = doc.sel; + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); + } + + var lastPos = start; + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) return; + lastPos = pos; + + if (type == "rect") { + var ranges = [], tabSize = cm.options.tabSize; + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); + var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); + for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); + if (left == right) + ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); + else if (text.length > leftPos) + ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); + } + if (!ranges.length) ranges.push(new Range(start, start)); + setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}); + cm.scrollIntoView(pos); + } else { + var oldRange = ourRange; + var anchor = oldRange.anchor, head = pos; + if (type != "single") { + if (type == "double") + var range = cm.findWordAt(pos); + else + var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); + if (cmp(range.anchor, anchor) > 0) { + head = range.head; + anchor = minPos(oldRange.from(), range.anchor); + } else { + head = range.anchor; + anchor = maxPos(oldRange.to(), range.head); + } + } + var ranges = startSel.ranges.slice(0); + ranges[ourIndex] = new Range(clipPos(doc, anchor), head); + setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse); + } + } + + var editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true, type == "rect"); + if (!cur) return; + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(); + extendTo(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) setTimeout(operation(cm, function() { + if (counter != curCount) return; + display.scroller.scrollTop += outside; + extend(e); + }), 50); + } + } + + function done(e) { + counter = Infinity; + e_preventDefault(e); + display.input.focus(); + off(document, "mousemove", move); + off(document, "mouseup", up); + doc.history.lastSelOrigin = null; + } + + var move = operation(cm, function(e) { + if (!e_button(e)) done(e); + else extend(e); + }); + var up = operation(cm, done); + on(document, "mousemove", move); + on(document, "mouseup", up); + } + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent, signalfn) { + try { var mX = e.clientX, mY = e.clientY; } + catch(e) { return false; } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false; + if (prevent) e_preventDefault(e); + + var display = cm.display; + var lineBox = display.lineDiv.getBoundingClientRect(); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.options.gutters.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.options.gutters[i]; + signalfn(cm, type, cm, line, gutter, e); + return e_defaultPrevented(e); + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true, signalLater); + } + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + return; + e_preventDefault(e); + if (ie) lastDrop = +new Date; + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || isReadOnly(cm)) return; + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var loadFile = function(file, i) { + var reader = new FileReader; + reader.onload = operation(cm, function() { + text[i] = reader.result; + if (++read == n) { + pos = clipPos(cm.doc, pos); + var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}; + makeChange(cm.doc, change); + setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); + } + }); + reader.readAsText(file); + }; + for (var i = 0; i < n; ++i) loadFile(files[i], i); + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(function() {cm.display.input.focus();}, 20); + return; + } + try { + var text = e.dataTransfer.getData("Text"); + if (text) { + if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) + var selected = cm.listSelections(); + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); + if (selected) for (var i = 0; i < selected.length; ++i) + replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); + cm.replaceSelection(text, "around", "paste"); + cm.display.input.focus(); + } + } + catch(e){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; + + e.dataTransfer.setData("Text", cm.getSelection()); + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (presto) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (presto) img.parentNode.removeChild(img); + } + } + + // SCROLL EVENTS + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function setScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) return; + cm.doc.scrollTop = val; + if (!gecko) updateDisplaySimple(cm, {top: val}); + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (gecko) updateDisplaySimple(cm); + startWorker(cm, 100); + } + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller) { + if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; + val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; + cm.display.scrollbars.setScrollLeft(val); + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) wheelPixelsPerUnit = -.53; + else if (gecko) wheelPixelsPerUnit = 15; + else if (chrome) wheelPixelsPerUnit = -.7; + else if (safari) wheelPixelsPerUnit = -1/3; + + var wheelEventDelta = function(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; + else if (dy == null) dy = e.wheelDelta; + return {x: dx, y: dy}; + }; + CodeMirror.wheelEventPixels = function(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta; + }; + + function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + if (!(dx && scroll.scrollWidth > scroll.clientWidth || + dy && scroll.scrollHeight > scroll.clientHeight)) return; + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer; + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy) + setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); + setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); + e_preventDefault(e); + display.wheelStartX = null; // Abort measurement, if in progress + return; + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) top = Math.max(0, top + pixels - 50); + else bot = Math.min(cm.doc.height, bot + pixels + 50); + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function() { + if (display.wheelStartX == null) return; + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) return; + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + // KEY EVENTS + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) return false; + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled(); + var prevShift = cm.display.shift, done = false; + try { + if (isReadOnly(cm)) cm.state.suppressEdits = true; + if (dropShift) cm.display.shift = false; + done = bound(cm) != Pass; + } finally { + cm.display.shift = prevShift; + cm.state.suppressEdits = false; + } + return done; + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); + if (result) return result; + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm); + } + + var stopSeq = new Delayed; + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq; + if (seq) { + if (isModifierKey(name)) return "handled"; + stopSeq.set(50, function() { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null; + cm.display.input.reset(); + } + }); + name = seq + " " + name; + } + var result = lookupKeyForEditor(cm, name, handle); + + if (result == "multi") + cm.state.keySeq = name; + if (result == "handled") + signalLater(cm, "keyHandled", cm, name, e); + + if (result == "handled" || result == "multi") { + e_preventDefault(e); + restartBlink(cm); + } + + if (seq && !result && /\'$/.test(name)) { + e_preventDefault(e); + return true; + } + return !!result; + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true); + if (!name) return false; + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);}) + || dispatchKey(cm, name, e, function(b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + return doHandleBinding(cm, b); + }); + } else { + return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); }); + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, + function(b) { return doHandleBinding(cm, b, true); }); + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + cm.curOp.focus = activeElt(); + if (signalDOMEvent(cm, e)) return; + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; + var code = e.keyCode; + cm.display.shift = code == 16 || e.shiftKey; + var handled = handleKeyBinding(cm, e); + if (presto) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + cm.replaceSelection("", null, "cut"); + } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + showCrossHair(cm); + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv; + addClass(lineDiv, "CodeMirror-crosshair"); + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair"); + off(document, "keyup", up); + off(document, "mouseover", up); + } + } + on(document, "keyup", up); + on(document, "mouseover", up); + } + + function onKeyUp(e) { + if (e.keyCode == 16) this.doc.sel.shift = false; + signalDOMEvent(this, e); + } + + function onKeyPress(e) { + var cm = this; + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return; + var keyCode = e.keyCode, charCode = e.charCode; + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return; + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + if (handleCharBinding(cm, e, ch)) return; + cm.display.input.onKeyPress(e); + } + + // FOCUS/BLUR EVENTS + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function() { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + onBlur(cm); + } + }, 100); + } + + function onFocus(cm) { + if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false; + + if (cm.options.readOnly == "nocursor") return; + if (!cm.state.focused) { + signal(cm, "focus", cm); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm) { + if (cm.state.delayingBlurEvent) return; + + if (cm.state.focused) { + signal(cm, "blur", cm); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150); + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return; + cm.display.input.onContextMenu(e); + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) return false; + return gutterEvent(cm, e, "gutterContextMenu", false, signal); + } + + // UPDATING + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + var changeEnd = CodeMirror.changeEnd = function(change) { + if (!change.text) return change.to; + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); + }; + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) return pos; + if (cmp(pos, change.to) <= 0) return changeEnd(change); + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; + return Pos(line, ch); + } + + function computeSelAfterChange(doc, change) { + var out = []; + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))); + } + return normalizeSelection(out, doc.sel.primIndex); + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) + return Pos(nw.line, pos.ch - old.ch + nw.ch); + else + return Pos(nw.line + (pos.line - old.line), pos.ch); + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = []; + var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + var from = offsetPos(change.from, oldPrev, newPrev); + var to = offsetPos(changeEnd(change), oldPrev, newPrev); + oldPrev = change.to; + newPrev = to; + if (hint == "around") { + var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; + out[i] = new Range(inv ? to : from, inv ? from : to); + } else { + out[i] = new Range(from, from); + } + } + return new Selection(out, doc.sel.primIndex); + } + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function() { this.canceled = true; } + }; + if (update) obj.update = function(from, to, text, origin) { + if (from) this.from = clipPos(doc, from); + if (to) this.to = clipPos(doc, to); + if (text) this.text = text; + if (origin !== undefined) this.origin = origin; + }; + signal(doc, "beforeChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); + + if (obj.canceled) return null; + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly); + if (doc.cm.state.suppressEdits) return; + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) return; + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 0; --i) + makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); + } else { + makeChangeInner(doc, change); + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return; + var selAfter = computeSelAfterChange(doc, change); + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + if (doc.cm && doc.cm.state.suppressEdits) return; + + var hist = doc.history, event, selAfter = doc.sel; + var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + for (var i = 0; i < source.length; i++) { + event = source[i]; + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + break; + } + if (i == source.length) return; + hist.lastOrigin = hist.lastSelOrigin = null; + + for (;;) { + event = source.pop(); + if (event.ranges) { + pushSelectionToHistory(event, dest); + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}); + return; + } + selAfter = event; + } + else break; + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = []; + pushSelectionToHistory(selAfter, dest); + dest.push({changes: antiChanges, generation: hist.generation}); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + for (var i = event.changes.length - 1; i >= 0; --i) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + source.length = 0; + return; + } + + antiChanges.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change) : lst(source); + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); + var rebased = []; + + // Propagate to the linked documents + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) return; + doc.first += distance; + doc.sel = new Selection(map(doc.sel.ranges, function(range) { + return new Range(Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch)); + }), doc.sel.primIndex); + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance); + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + regLineChange(doc.cm, l, "gutter"); + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return; + } + if (change.from.line > doc.lastLine()) return; + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) selAfter = computeSelAfterChange(doc, change); + if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans); + else updateDoc(doc, change, spans); + setSelectionNoUndo(doc, selAfter, sel_dontScroll); + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function(line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true; + } + }); + } + + if (doc.sel.contains(change.from, change.to) > -1) + signalCursorActivity(cm); + + updateDoc(doc, change, spans, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function(line) { + var len = lineLength(line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) cm.curOp.updateMaxLine = true; + } + + // Adjust frontier, schedule worker + doc.frontier = Math.min(doc.frontier, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + if (change.full) + regChange(cm); + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + regLineChange(cm, from.line, "text"); + else + regChange(cm, from.line, to.line + 1, lendiff); + + var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); + if (changeHandler || changesHandler) { + var obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + }; + if (changeHandler) signalLater(cm, "change", cm, obj); + if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); + } + cm.display.selForContextMenu = null; + } + + function replaceRange(doc, code, from, to, origin) { + if (!to) to = from; + if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; } + if (typeof code == "string") code = splitLines(code); + makeChange(doc, {from: from, to: to, text: code, origin: origin}); + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, coords) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) return; + + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + if (coords.top + box.top < 0) doScroll = true; + else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " + + (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " + + (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " + + coords.left + "px; width: 2px;"); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) margin = 0; + for (var limit = 0; limit < 5; limit++) { + var changed = false, coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), + Math.min(coords.top, endCoords.top) - margin, + Math.max(coords.left, endCoords.left), + Math.max(coords.bottom, endCoords.bottom) + margin); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + setScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; + } + if (!changed) break; + } + return coords; + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, x1, y1, x2, y2) { + var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); + if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, x1, y1, x2, y2) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (y1 < 0) y1 = 0; + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (y2 - y1 > screen) y2 = y1 + screen; + var docBottom = cm.doc.height + paddingVert(display); + var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; + if (y1 < screentop) { + result.scrollTop = atTop ? 0 : y1; + } else if (y2 > screentop + screen) { + var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); + if (newTop != screentop) result.scrollTop = newTop; + } + + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); + var tooWide = x2 - x1 > screenw; + if (tooWide) x2 = x1 + screenw; + if (x1 < 10) + result.scrollLeft = 0; + else if (x1 < screenleft) + result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)); + else if (x2 > screenw + screenleft - 3) + result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw; + return result; + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollPos(cm, left, top) { + if (left != null || top != null) resolveScrollToPos(cm); + if (left != null) + cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; + if (top != null) + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(), from = cur, to = cur; + if (!cm.options.lineWrapping) { + from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; + to = Pos(cur.line, cur.ch + 1); + } + cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); + var sPos = calculateScrollPos(cm, Math.min(from.left, to.left), + Math.min(from.top, to.top) - range.margin, + Math.max(from.right, to.right), + Math.max(from.bottom, to.bottom) + range.margin); + cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + } + + // API UTILITIES + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, state; + if (how == null) how = "add"; + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) how = "prev"; + else state = getStateBefore(cm, n); + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + if (line.stateAfter) line.stateAfter = null; + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0; + how = "not"; + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass || indentation > 150) { + if (!aggressive) return; + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); + else indentation = 0; + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} + if (pos < indentation) indentString += spaceStr(indentation - pos); + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + line.stateAfter = null; + return true; + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos = Pos(n, curSpaceString.length); + replaceOneSelection(doc, i, new Range(pos, pos)); + break; + } + } + } + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, line = handle; + if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); + else no = lineNo(handle); + if (no == null) return null; + if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); + return line; + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, kill = []; + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]); + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop(); + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from; + break; + } + } + kill.push(toKill); + } + // Next, remove those actual ranges. + runInOp(cm, function() { + for (var i = kill.length - 1; i >= 0; i--) + replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); + ensureCursorVisible(cm); + }); + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "char", "column" (like char, but doesn't + // cross line boundaries), "word" (across next word), or "group" (to + // the start of next group of word or non-word-non-whitespace + // chars). The visually param controls whether, in right-to-left + // text, direction 1 means to move towards the next index in the + // string, or towards the character to the right of the current + // position. The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var line = pos.line, ch = pos.ch, origDir = dir; + var lineObj = getLine(doc, line); + var possible = true; + function findNextLine() { + var l = line + dir; + if (l < doc.first || l >= doc.first + doc.size) return (possible = false); + line = l; + return lineObj = getLine(doc, l); + } + function moveOnce(boundToLine) { + var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); + if (next == null) { + if (!boundToLine && findNextLine()) { + if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); + else ch = dir < 0 ? lineObj.text.length : 0; + } else return (possible = false); + } else ch = next; + return true; + } + + if (unit == "char") moveOnce(); + else if (unit == "column") moveOnce(true); + else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) break; + var cur = lineObj.text.charAt(ch) || "\n"; + var type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p"; + if (group && !first && !type) type = "s"; + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce();} + break; + } + + if (type) sawType = type; + if (dir > 0 && !moveOnce(!first)) break; + } + } + var result = skipAtomic(doc, Pos(line, ch), origDir, true); + if (!possible) result.hitSide = true; + return result; + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + for (;;) { + var target = coordsChar(cm, x, y); + if (!target.outside) break; + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } + y += dir * 5; + } + return target; + } + + // EDITOR METHODS + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){window.focus(); this.display.input.focus();}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") return; + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + operation(this, optionHandlers[option])(this, value, old); + }, + + getOption: function(option) {return this.options[option];}, + getDoc: function() {return this.doc;}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1); + return true; + } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) throw new Error("Overlays may not be stateful."); + this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return; + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; + else dir = dir ? "add" : "subtract"; + } + if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, end = -1; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (!range.empty()) { + var from = range.from(), to = range.to(); + var start = Math.max(end, from.line); + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; + for (var j = start; j < end; ++j) + indentLine(this, j, how); + var newRanges = this.doc.sel.ranges; + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true); + end = range.head.line; + if (i == this.doc.sel.primIndex) ensureCursorVisible(this); + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise); + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true); + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + var type; + if (ch == 0) type = styles[2]; + else for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; + else if (styles[mid * 2 + 1] < ch) before = mid + 1; + else { type = styles[mid * 2 + 2]; break; } + } + var cut = type ? type.indexOf("cm-overlay ") : -1; + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1); + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) return mode; + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0]; + }, + + getHelpers: function(pos, type) { + var found = []; + if (!helpers.hasOwnProperty(type)) return found; + var help = helpers[type], mode = this.getModeAt(pos); + if (typeof mode[type] == "string") { + if (help[mode[type]]) found.push(help[mode[type]]); + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]]; + if (val) found.push(val); + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]); + } else if (help[mode.name]) { + found.push(help[mode.name]); + } + for (var i = 0; i < help._global.length; i++) { + var cur = help._global[i]; + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + found.push(cur.val); + } + return found; + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getStateBefore(this, line + 1, precise); + }, + + cursorCoords: function(start, mode) { + var pos, range = this.doc.sel.primary(); + if (start == null) pos = range.head; + else if (typeof start == "object") pos = clipPos(this.doc, start); + else pos = start ? range.from() : range.to(); + return cursorCoords(this, pos, mode || "page"); + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page"); + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top); + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset); + }, + heightAtLine: function(line, mode) { + var end = false, lineObj; + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) line = this.doc.first; + else if (line > last) { line = last; end = true; } + lineObj = getLine(this.doc, line); + } else { + lineObj = line; + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top + + (end ? this.doc.height - heightAtLine(lineObj) : 0); + }, + + defaultTextHeight: function() { return textHeight(this.display); }, + defaultCharWidth: function() { return charWidth(this.display); }, + + setGutterMarker: methodOp(function(line, gutterID, value) { + return changeLine(this.doc, line, "gutter", function(line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) line.gutterMarkers = null; + return true; + }); + }), + + clearGutter: methodOp(function(gutterID) { + var cm = this, doc = cm.doc, i = doc.first; + doc.iter(function(line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + line.gutterMarkers[gutterID] = null; + regLineChange(cm, i, "gutter"); + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; + } + ++i; + }); + }), + + lineInfo: function(line) { + if (typeof line == "number") { + if (!isLine(this.doc, line)) return null; + var n = line; + line = getLine(this.doc, line); + if (!line) return null; + } else { + var n = lineNo(line); + if (n == null) return null; + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets}; + }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + node.setAttribute("cm-ignore-events", "true"); + this.display.input.setUneditable(node); + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + top = pos.top - node.offsetHeight; + else if (pos.bottom + node.offsetHeight <= vspace) + top = pos.bottom; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") left = 0; + else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; + node.style.left = left + "px"; + } + if (scroll) + scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + return commands[cmd](this); + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) break; + } + return cur; + }, + + moveH: methodOp(function(dir, unit) { + var cm = this; + cm.extendSelectionsBy(function(range) { + if (cm.display.shift || cm.doc.extend || range.empty()) + return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually); + else + return dir < 0 ? range.from() : range.to(); + }, sel_move); + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, doc = this.doc; + if (sel.somethingSelected()) + doc.replaceSelection("", null, "+delete"); + else + deleteNearSelection(this, function(range) { + var other = findPosH(doc, range.head, dir, unit, false); + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}; + }); + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) x = coords.left; + else coords.left = x; + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) break; + } + return cur; + }, + + moveV: methodOp(function(dir, unit) { + var cm = this, doc = this.doc, goals = []; + var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected(); + doc.extendSelectionsBy(function(range) { + if (collapse) + return dir < 0 ? range.from() : range.to(); + var headPos = cursorCoords(cm, range.head, "div"); + if (range.goalColumn != null) headPos.left = range.goalColumn; + goals.push(headPos.left); + var pos = findPosV(cm, headPos, dir, unit); + if (unit == "page" && range == doc.sel.primary()) + addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top); + return pos; + }, sel_move); + if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++) + doc.sel.ranges[i].goalColumn = goals[i]; + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, line = getLine(doc, pos.line).text; + var start = pos.ch, end = pos.ch; + if (line) { + var helper = this.getHelper(pos, "wordChars"); + if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; + var startChar = line.charAt(start); + var check = isWordChar(startChar, helper) + ? function(ch) { return isWordChar(ch, helper); } + : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} + : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; + while (start > 0 && check(line.charAt(start - 1))) --start; + while (end < line.length && check(line.charAt(end))) ++end; + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)); + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) return; + if (this.state.overwrite = !this.state.overwrite) + addClass(this.display.cursorDiv, "CodeMirror-overwrite"); + else + rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); + + signal(this, "overwriteToggle", this, this.state.overwrite); + }, + hasFocus: function() { return this.display.input.getField() == activeElt(); }, + + scrollTo: methodOp(function(x, y) { + if (x != null || y != null) resolveScrollToPos(this); + if (x != null) this.curOp.scrollLeft = x; + if (y != null) this.curOp.scrollTop = y; + }), + getScrollInfo: function() { + var scroller = this.display.scroller; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)}; + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null}; + if (margin == null) margin = this.options.cursorScrollMargin; + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null}; + } else if (range.from == null) { + range = {from: range, to: null}; + } + if (!range.to) range.to = range.from; + range.margin = margin || 0; + + if (range.from.line != null) { + resolveScrollToPos(this); + this.curOp.scrollToPos = range; + } else { + var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left), + Math.min(range.from.top, range.to.top) - range.margin, + Math.max(range.from.right, range.to.right), + Math.max(range.from.bottom, range.to.bottom) + range.margin); + this.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + }), + + setSize: methodOp(function(width, height) { + var cm = this; + function interpret(val) { + return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; + } + if (width != null) cm.display.wrapper.style.width = interpret(width); + if (height != null) cm.display.wrapper.style.height = interpret(height); + if (cm.options.lineWrapping) clearLineMeasurementCache(this); + var lineNo = cm.display.viewFrom; + cm.doc.iter(lineNo, cm.display.viewTo, function(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) + if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; } + ++lineNo; + }); + cm.curOp.forceUpdate = true; + signal(cm, "refresh", this); + }), + + operation: function(f){return runInOp(this, f);}, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight; + regChange(this); + this.curOp.forceUpdate = true; + clearCaches(this); + this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); + updateGutterSpace(this); + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) + estimateLineHeights(this); + signal(this, "refresh", this); + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc; + old.cm = null; + attachDoc(this, doc); + clearCaches(this); + this.display.input.reset(); + this.scrollTo(doc.scrollLeft, doc.scrollTop); + this.curOp.forceScroll = true; + signalLater(this, "swapDoc", this, old); + return old; + }), + + getInputField: function(){return this.display.input.getField();}, + getWrapperElement: function(){return this.display.wrapper;}, + getScrollerElement: function(){return this.display.scroller;}, + getGutterElement: function(){return this.display.gutters;} + }; + eventMixin(CodeMirror); + + // OPTION DEFAULTS + + // The default configuration options. + var defaults = CodeMirror.defaults = {}; + // Functions to run when options are changed. + var optionHandlers = CodeMirror.optionHandlers = {}; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) optionHandlers[name] = + notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; + } + + // Passed to option handlers when there is no old value. + var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function(cm, val) { + cm.setValue(val); + }, true); + option("mode", null, function(cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function(cm) { + resetModeState(cm); + clearCaches(cm); + regChange(cm); + }, true); + option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + if (old != CodeMirror.Init) cm.refresh(); + }); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); + option("electricChars", true); + option("inputStyle", mobile ? "contenteditable" : "textarea", function() { + throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME + }, true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function(cm) { + themeChanged(cm); + guttersChanged(cm); + }, true); + option("keyMap", "default", function(cm, val, old) { + var next = getKeyMap(val); + var prev = old != CodeMirror.Init && getKeyMap(old); + if (prev && prev.detach) prev.detach(cm, next); + if (next.attach) next.attach(cm, prev || null); + }); + option("extraKeys", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("fixedGutter", true, function(cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true); + option("scrollbarStyle", "native", function(cm) { + initScrollbars(cm); + updateScrollbars(cm); + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); + }, true); + option("lineNumbers", false, function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("firstLineNumber", 1, guttersChanged, true); + option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + option("lineWiseCopyCut", true); + + option("readOnly", false, function(cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + cm.display.disabled = true; + } else { + cm.display.disabled = false; + if (!val) cm.display.input.reset(); + } + }); + option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true); + option("dragDrop", true, dragDropChanged); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1, updateSelection, true); + option("singleCursorHeightPerLine", true, updateSelection, true); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true, resetModeState, true); + option("addModeClass", false, resetModeState, true); + option("pollInterval", 100); + option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;}); + option("historyEventDelay", 1250); + option("viewportMargin", 10, function(cm){cm.refresh();}, true); + option("maxHighlightLength", 10000, resetModeState, true); + option("moveInputWithCursor", true, function(cm, val) { + if (!val) cm.display.input.resetPosition(); + }); + + option("tabindex", null, function(cm, val) { + cm.display.input.getField().tabIndex = val || ""; + }); + option("autofocus", null); + + // MODE DEFINITION AND QUERYING + + // Known modes, by name and by MIME + var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name, mode) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; + if (arguments.length > 2) + mode.dependencies = Array.prototype.slice.call(arguments, 2); + modes[name] = mode; + }; + + CodeMirror.defineMIME = function(mime, spec) { + mimeModes[mime] = spec; + }; + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + CodeMirror.resolveMode = function(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") found = {name: found}; + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return CodeMirror.resolveMode("application/xml"); + } + if (typeof spec == "string") return {name: spec}; + else return spec || {name: "null"}; + }; + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + CodeMirror.getMode = function(options, spec) { + var spec = CodeMirror.resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) return CodeMirror.getMode(options, "text/plain"); + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) continue; + if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) modeObj.helperType = spec.helperType; + if (spec.modeProps) for (var prop in spec.modeProps) + modeObj[prop] = spec.modeProps[prop]; + + return modeObj; + }; + + // Minimal default mode. + CodeMirror.defineMode("null", function() { + return {token: function(stream) {stream.skipToEnd();}}; + }); + CodeMirror.defineMIME("text/plain", "null"); + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = CodeMirror.modeExtensions = {}; + CodeMirror.extendMode = function(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + }; + + // EXTENSIONS + + CodeMirror.defineExtension = function(name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function(name, func) { + Doc.prototype[name] = func; + }; + CodeMirror.defineOption = option; + + var initHooks = []; + CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; + + var helpers = CodeMirror.helpers = {}; + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []}; + helpers[type][name] = value; + }; + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value); + helpers[type]._global.push({pred: predicate, val: value}); + }; + + // MODE STATE HANDLING + + // Utility functions for working with state. Exported because nested + // modes need to do this for their inner modes. + + var copyState = CodeMirror.copyState = function(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + }; + + var startState = CodeMirror.startState = function(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + }; + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + CodeMirror.innerMode = function(mode, state) { + while (mode.innerMode) { + var info = mode.innerMode(state); + if (!info || info.mode == mode) break; + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state}; + }; + + // STANDARD COMMANDS + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = CodeMirror.commands = { + selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);}, + singleSelection: function(cm) { + cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); + }, + killLine: function(cm) { + deleteNearSelection(cm, function(range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length; + if (range.head.ch == len && range.head.line < cm.lastLine()) + return {from: range.head, to: Pos(range.head.line + 1, 0)}; + else + return {from: range.head, to: Pos(range.head.line, len)}; + } else { + return {from: range.from(), to: range.to()}; + } + }); + }, + deleteLine: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0))}; + }); + }, + delLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), to: range.from()}; + }); + }, + delWrappedLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var leftPos = cm.coordsChar({left: 0, top: top}, "div"); + return {from: leftPos, to: range.from()}; + }); + }, + delWrappedLineRight: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + return {from: range.from(), to: rightPos }; + }); + }, + undo: function(cm) {cm.undo();}, + redo: function(cm) {cm.redo();}, + undoSelection: function(cm) {cm.undoSelection();}, + redoSelection: function(cm) {cm.redoSelection();}, + goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, + goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, + goLineStart: function(cm) { + cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); }, + {origin: "+move", bias: 1}); + }, + goLineStartSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + return lineStartSmart(cm, range.head); + }, {origin: "+move", bias: 1}); + }, + goLineEnd: function(cm) { + cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); }, + {origin: "+move", bias: -1}); + }, + goLineRight: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + }, sel_move); + }, + goLineLeft: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: 0, top: top}, "div"); + }, sel_move); + }, + goLineLeftSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var pos = cm.coordsChar({left: 0, top: top}, "div"); + if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head); + return pos; + }, sel_move); + }, + goLineUp: function(cm) {cm.moveV(-1, "line");}, + goLineDown: function(cm) {cm.moveV(1, "line");}, + goPageUp: function(cm) {cm.moveV(-1, "page");}, + goPageDown: function(cm) {cm.moveV(1, "page");}, + goCharLeft: function(cm) {cm.moveH(-1, "char");}, + goCharRight: function(cm) {cm.moveH(1, "char");}, + goColumnLeft: function(cm) {cm.moveH(-1, "column");}, + goColumnRight: function(cm) {cm.moveH(1, "column");}, + goWordLeft: function(cm) {cm.moveH(-1, "word");}, + goGroupRight: function(cm) {cm.moveH(1, "group");}, + goGroupLeft: function(cm) {cm.moveH(-1, "group");}, + goWordRight: function(cm) {cm.moveH(1, "word");}, + delCharBefore: function(cm) {cm.deleteH(-1, "char");}, + delCharAfter: function(cm) {cm.deleteH(1, "char");}, + delWordBefore: function(cm) {cm.deleteH(-1, "word");}, + delWordAfter: function(cm) {cm.deleteH(1, "word");}, + delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, + delGroupAfter: function(cm) {cm.deleteH(1, "group");}, + indentAuto: function(cm) {cm.indentSelection("smart");}, + indentMore: function(cm) {cm.indentSelection("add");}, + indentLess: function(cm) {cm.indentSelection("subtract");}, + insertTab: function(cm) {cm.replaceSelection("\t");}, + insertSoftTab: function(cm) { + var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from(); + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); + spaces.push(new Array(tabSize - col % tabSize + 1).join(" ")); + } + cm.replaceSelections(spaces); + }, + defaultTab: function(cm) { + if (cm.somethingSelected()) cm.indentSelection("add"); + else cm.execCommand("insertTab"); + }, + transposeChars: function(cm) { + runInOp(cm, function() { + var ranges = cm.listSelections(), newSel = []; + for (var i = 0; i < ranges.length; i++) { + var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; + if (line) { + if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1); + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1); + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose"); + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text; + if (prev) + cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose"); + } + } + newSel.push(new Range(cur, cur)); + } + cm.setSelections(newSel); + }); + }, + newlineAndIndent: function(cm) { + runInOp(cm, function() { + var len = cm.listSelections().length; + for (var i = 0; i < len; i++) { + var range = cm.listSelections()[i]; + cm.replaceRange("\n", range.anchor, range.head, "+input"); + cm.indentLine(range.from().line + 1, null, true); + ensureCursorVisible(cm); + } + }); + }, + toggleOverwrite: function(cm) {cm.toggleOverwrite();} + }; + + + // STANDARD KEYMAPS + + var keyMap = CodeMirror.keyMap = {}; + + keyMap.basic = { + "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", + "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", + "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", + "Tab": "defaultTab", "Shift-Tab": "indentAuto", + "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", + "Esc": "singleSelection" + }; + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", + "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", + fallthrough: "basic" + }; + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" + }; + keyMap.macDefault = { + "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", + "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", + fallthrough: ["basic", "emacsy"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/), name = parts[parts.length - 1]; + var alt, ctrl, shift, cmd; + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i]; + if (/^(cmd|meta|m)$/i.test(mod)) cmd = true; + else if (/^a(lt)?$/i.test(mod)) alt = true; + else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true; + else if (/^s(hift)$/i.test(mod)) shift = true; + else throw new Error("Unrecognized modifier name: " + mod); + } + if (alt) name = "Alt-" + name; + if (ctrl) name = "Ctrl-" + name; + if (cmd) name = "Cmd-" + name; + if (shift) name = "Shift-" + name; + return name; + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + CodeMirror.normalizeKeyMap = function(keymap) { + var copy = {}; + for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname]; + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue; + if (value == "...") { delete keymap[keyname]; continue; } + + var keys = map(keyname.split(" "), normalizeKeyName); + for (var i = 0; i < keys.length; i++) { + var val, name; + if (i == keys.length - 1) { + name = keys.join(" "); + val = value; + } else { + name = keys.slice(0, i + 1).join(" "); + val = "..."; + } + var prev = copy[name]; + if (!prev) copy[name] = val; + else if (prev != val) throw new Error("Inconsistent bindings for " + name); + } + delete keymap[keyname]; + } + for (var prop in copy) keymap[prop] = copy[prop]; + return keymap; + }; + + var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) { + map = getKeyMap(map); + var found = map.call ? map.call(key, context) : map[key]; + if (found === false) return "nothing"; + if (found === "...") return "multi"; + if (found != null && handle(found)) return "handled"; + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + return lookupKey(key, map.fallthrough, handle, context); + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context); + if (result) return result; + } + } + }; + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + var isModifierKey = CodeMirror.isModifierKey = function(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; + }; + + // Look up the name of a key as indicated by an event object. + var keyName = CodeMirror.keyName = function(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) return false; + var base = keyNames[event.keyCode], name = base; + if (name == null || event.altGraphKey) return false; + if (event.altKey && base != "Alt") name = "Alt-" + name; + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name; + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name; + if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name; + return name; + }; + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val; + } + + // FROMTEXTAREA + + CodeMirror.fromTextArea = function(textarea, options) { + options = options ? copyObj(options) : {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabIndex) + options.tabindex = textarea.tabIndex; + if (!options.placeholder && textarea.placeholder) + options.placeholder = textarea.placeholder; + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt(); + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form, realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function() { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + options.finishInit = function(cm) { + cm.save = save; + cm.getTextArea = function() { return textarea; }; + cm.toTextArea = function() { + cm.toTextArea = isNaN; // Prevent this from being ran twice + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit; + } + }; + }; + + textarea.style.display = "none"; + var cm = CodeMirror(function(node) { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + return cm; + }; + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = CodeMirror.StringStream = function(string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + }; + + StringStream.prototype = { + eol: function() {return this.pos >= this.string.length;}, + sol: function() {return this.pos == this.lineStart;}, + peek: function() {return this.string.charAt(this.pos) || undefined;}, + next: function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function(match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) {++this.pos; return ch;} + }, + eatWhile: function(match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start; + }, + eatSpace: function() { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function() {this.pos = this.string.length;}, + skipTo: function(ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true;} + }, + backUp: function(n) {this.pos -= n;}, + column: function() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + indentation: function() { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + match: function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) return null; + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function(){return this.string.slice(this.start, this.pos);}, + hideFirstChars: function(n, inner) { + this.lineStart += n; + try { return inner(); } + finally { this.lineStart -= n; } + } + }; + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + var nextMarkerId = 0; + + var TextMarker = CodeMirror.TextMarker = function(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + this.id = ++nextMarkerId; + }; + eventMixin(TextMarker); + + // Clear the marker. + TextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) startOperation(cm); + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) signalLater(this, "clear", found.from, found.to); + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text"); + else if (cm) { + if (span.to != null) max = lineNo(line); + if (span.from != null) min = lineNo(line); + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + updateLineHeight(line, textHeight(cm.display)); + } + if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { + var visual = visualLine(this.lines[i]), len = lineLength(visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } + + if (min != null && cm && this.collapsed) regChange(cm, min, max + 1); + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) reCheckSelection(cm.doc); + } + if (cm) signalLater(cm, "markerCleared", cm, this); + if (withOp) endOperation(cm); + if (this.parent) this.parent.clear(); + }; + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function(side, lineObj) { + if (side == null && this.type == "bookmark") side = 1; + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from); + if (side == -1) return from; + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to); + if (side == 1) return to; + } + } + return from && {from: from, to: to}; + }; + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function() { + var pos = this.find(-1, true), widget = this, cm = this.doc.cm; + if (!pos || !cm) return; + runInOp(cm, function() { + var line = pos.line, lineN = lineNo(pos.line); + var view = findViewForLine(cm, lineN); + if (view) { + clearLineMeasurementCacheFor(view); + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; + } + cm.curOp.updateMaxLine = true; + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height; + widget.height = null; + var dHeight = widgetHeight(widget) - oldHeight; + if (dHeight) + updateLineHeight(line, line.height + dHeight); + } + }); + }; + + TextMarker.prototype.attachLine = function(line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); + } + this.lines.push(line); + }; + TextMarker.prototype.detachLine = function(line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0; + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) return markTextShared(doc, from, to, options, type); + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); + + var marker = new TextMarker(doc, type), diff = cmp(from, to); + if (options) copyObj(options, marker, false); + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + return marker; + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true; + marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true"); + if (options.insertLeft) marker.widgetNode.insertLeft = true; + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + throw new Error("Inserting collapsed marker partially overlapping an existing one"); + sawCollapsedSpans = true; + } + + if (marker.addToHistory) + addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); + + var curLine = from.line, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function(line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + updateMaxLine = true; + if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null)); + ++curLine; + }); + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { + if (lineIsHidden(doc, line)) updateLineHeight(line, 0); + }); + + if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); + + if (marker.readOnly) { + sawReadOnlySpans = true; + if (doc.history.done.length || doc.history.undone.length) + doc.clearHistory(); + } + if (marker.collapsed) { + marker.id = ++nextMarkerId; + marker.atomic = true; + } + if (cm) { + // Sync editor state + if (updateMaxLine) cm.curOp.updateMaxLine = true; + if (marker.collapsed) + regChange(cm, from.line, to.line + 1); + else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css) + for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text"); + if (marker.atomic) reCheckSelection(cm.doc); + signalLater(cm, "markerAdded", cm, marker); + } + return marker; + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0; i < markers.length; ++i) + markers[i].parent = this; + }; + eventMixin(SharedTextMarker); + + SharedTextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + this.markers[i].clear(); + signalLater(this, "clear"); + }; + SharedTextMarker.prototype.find = function(side, lineObj) { + return this.primary.find(side, lineObj); + }; + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.widgetNode; + linkedDocs(doc, function(doc) { + if (widget) options.widgetNode = widget.cloneNode(true); + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + if (doc.linked[i].isParent) return; + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary); + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), + function(m) { return m.parent; }); + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], pos = marker.find(); + var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); + marker.markers.push(subMark); + subMark.parent = marker; + } + } + } + + function detachSharedMarkers(markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], linked = [marker.primary.doc];; + linkedDocs(marker.primary.doc, function(d) { linked.push(d); }); + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j]; + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null; + marker.markers.splice(j--, 1); + } + } + } + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; this.to = to; + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) return span; + } + } + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + for (var r, i = 0; i < spans.length; ++i) + if (spans[i] != span) (r || (r = [])).push(spans[i]); + return r; + } + // Add a span to a line. + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.attachLine(line); + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } + return nw; + } + function markedSpansAfter(old, endCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)); + } + } + return nw; + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) return null; + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) return null; + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) span.to = startCh; + else if (sameLine) span.to = found.to == null ? null : found.to + offset; + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i = 0; i < last.length; ++i) { + var span = last[i]; + if (span.to != null) span.to += offset; + if (span.from == null) { + var found = getMarkedSpanFor(first, span.marker); + if (!found) { + span.from = offset; + if (sameLine) (first || (first = [])).push(span); + } + } else { + span.from += offset; + if (sameLine) (first || (first = [])).push(span); + } + } + } + // Make sure we didn't create any zero-length spans + if (first) first = clearEmptySpans(first); + if (last && last != first) last = clearEmptySpans(last); + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + for (var i = 0; i < first.length; ++i) + if (first[i].to == null) + (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)); + for (var i = 0; i < gap; ++i) + newMarkers.push(gapMarkers); + newMarkers.push(last); + } + return newMarkers; + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + spans.splice(i--, 1); + } + if (!spans.length) return null; + return spans; + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) return stretched; + if (!stretched) return old; + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + if (oldCur[k].marker == span.marker) continue spans; + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old; + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function(line) { + if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + (markers || (markers = [])).push(mark); + } + }); + if (!markers) return null; + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue; + var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + newParts.push({from: p.from, to: m.from}); + if (dto > 0 || !mk.inclusiveRight && !dto) + newParts.push({from: m.to, to: p.to}); + parts.splice.apply(parts, newParts); + j += newParts.length - 1; + } + } + return parts; + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.detachLine(line); + line.markedSpans = null; + } + function attachMarkedSpans(line, spans) { + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.attachLine(line); + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; } + function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) return lenDiff; + var aPos = a.find(), bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) return -fromCmp; + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) return toCmp; + return b.id - a.id; + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + found = sp.marker; + } + return found; + } + function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); } + function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) continue; + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; + if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) || + fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight))) + return true; + } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + line = merged.find(-1, true).line; + return line; + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + (lines || (lines = [])).push(line); + } + return lines; + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), vis = visualLine(line); + if (line == vis) return lineN; + return lineNo(vis); + } + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) return lineN; + var line = getLine(doc, lineN), merged; + if (!lineIsHidden(doc, line)) return lineN; + while (merged = collapsedSpanAtEnd(line)) + line = merged.find(1, true).line; + return lineNo(line) + 1; + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if (sp.from == null) return true; + if (sp.marker.widgetNode) continue; + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + return true; + } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); + } + if (span.marker.inclusiveRight && span.to == line.text.length) + return true; + for (var sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) return true; + } + } + + // LINE WIDGETS + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = CodeMirror.LineWidget = function(doc, node, options) { + if (options) for (var opt in options) if (options.hasOwnProperty(opt)) + this[opt] = options[opt]; + this.doc = doc; + this.node = node; + }; + eventMixin(LineWidget); + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + addToScrollPos(cm, null, diff); + } + + LineWidget.prototype.clear = function() { + var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); + if (no == null || !ws) return; + for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); + if (!ws.length) line.widgets = null; + var height = widgetHeight(this); + updateLineHeight(line, Math.max(0, line.height - height)); + if (cm) runInOp(cm, function() { + adjustScrollWhenAboveVisible(cm, line, -height); + regLineChange(cm, no, "widget"); + }); + }; + LineWidget.prototype.changed = function() { + var oldH = this.height, cm = this.doc.cm, line = this.line; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) return; + updateLineHeight(line, line.height + diff); + if (cm) runInOp(cm, function() { + cm.curOp.forceUpdate = true; + adjustScrollWhenAboveVisible(cm, line, diff); + }); + }; + + function widgetHeight(widget) { + if (widget.height != null) return widget.height; + var cm = widget.doc.cm; + if (!cm) return 0; + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; + if (widget.noHScroll) + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.offsetHeight; + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options); + var cm = doc.cm; + if (cm && widget.noHScroll) cm.display.alignWidgets = true; + changeLine(doc, handle, "widget", function(line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) widgets.push(widget); + else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); + widget.line = line; + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) addToScrollPos(cm, null, widget.height); + cm.curOp.forceUpdate = true; + } + return true; + }); + return widget; + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + eventMixin(Line); + Line.prototype.lineNo = function() { return lineNo(this); }; + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + if (line.order != null) line.order = null; + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) updateLineHeight(line, estHeight); + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + function extractLineClasses(type, output) { + if (type) for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) break; + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) + output[prop] = lineClass[2]; + else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) + output[prop] += " " + lineClass[2]; + } + return type; + } + + function callBlankLine(mode, state) { + if (mode.blankLine) return mode.blankLine(state); + if (!mode.innerMode) return; + var inner = CodeMirror.innerMode(mode, state); + if (inner.mode.blankLine) return inner.mode.blankLine(inner.state); + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode; + var style = mode.token(stream, state); + if (stream.pos > stream.start) return style; + } + throw new Error("Mode " + mode.name + " failed to advance stream."); + } + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + function getObj(copy) { + return {start: stream.start, end: stream.pos, + string: stream.current(), + type: style || null, + state: copy ? copyState(doc.mode, state) : state}; + } + + var doc = cm.doc, mode = doc.mode, style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize), tokens; + if (asArray) tokens = []; + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, state); + if (asArray) tokens.push(getObj(true)); + } + return asArray ? tokens : getObj(); + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize), style; + var inner = cm.options.addModeClass && [null]; + if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses); + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) processLine(cm, text, state, stream.pos); + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) style = "m-" + (style ? mName + " " + style : mName); + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 50000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 characters + var pos = Math.min(stream.pos, curStart + 50000); + f(pos, curStyle); + curStart = pos; + } + } + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, state, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, state, function(end, style) { + st.push(end, style); + }, lineClasses, forceToEnd); + + // Run overlays, adjust style array. + for (var o = 0; o < cm.state.overlays.length; ++o) { + var overlay = cm.state.overlays[o], i = 1, at = 0; + runMode(cm, line.text, overlay.mode, true, function(end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + st.splice(i, 1, end, st[i+1], i_end); + i += 2; + at = Math.min(end, i_end); + } + if (!style) return; + if (overlay.opaque) { + st.splice(start, i - start, end, "cm-overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style; + } + } + }, lineClasses); + } + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}; + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); + line.styles = result.styles; + if (result.classes) line.styleClasses = result.classes; + else if (line.styleClasses) line.styleClasses = null; + if (updateFrontier === cm.doc.frontier) cm.doc.frontier++; + } + return line.styles; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, state, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize); + stream.start = stream.pos = startAt || 0; + if (text == "") callBlankLine(mode, state); + while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { + readToken(mode, stream, state); + stream.start = stream.pos; + } + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) return null; + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")); + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = elt("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}; + lineView.measure = {}; + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, order; + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) + builder.addToken = buildTokenBadBidi(builder.addToken, order); + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); + if (line.styleClasses.textClass) + builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); + (lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) + builder.content.className = "cm-tab-wrap-hack"; + + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) + builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); + + return builder; + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token; + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, title, css) { + if (!text) return; + var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text; + var special = builder.cm.state.specialChars, mustWrap = false; + if (!special.test(text)) { + builder.col += text.length; + var content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) mustWrap = true; + builder.pos += text.length; + } else { + var content = document.createDocumentFragment(), pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) break; + pos += skipped + 1; + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt.setAttribute("role", "presentation"); + txt.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else { + var txt = builder.cm.options.specialCharPlaceholder(m[0]); + txt.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt); + builder.pos++; + } + } + if (style || startStyle || endStyle || mustWrap || css) { + var fullStyle = style || ""; + if (startStyle) fullStyle += startStyle; + if (endStyle) fullStyle += endStyle; + var token = elt("span", [content], fullStyle, css); + if (title) token.title = title; + return builder.content.appendChild(token); + } + builder.content.appendChild(content); + } + + function splitSpaces(old) { + var out = " "; + for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; + out += " "; + return out; + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function(builder, text, style, startStyle, endStyle, title, css) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + for (var i = 0; i < order.length; i++) { + var part = order[i]; + if (part.to > start && part.from <= start) break; + } + if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css); + inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + }; + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) builder.map.push(builder.pos, builder.pos + size, widget); + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + widget = builder.content.appendChild(document.createElement("span")); + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i = 1; i < styles.length; i+=2) + builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)); + return; + } + + var len = allText.length, pos = 0, i = 1, text = "", style, css; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = title = css = ""; + collapsed = null; nextChange = Infinity; + var foundBookmarks = []; + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) spanStyle += " " + m.className; + if (m.css) css = m.css; + if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; + if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; + if (m.title && !title) title = m.title; + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + collapsed = sp; + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) return; + if (collapsed.to == pos) collapsed = false; + } + if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) + buildCollapsedSpan(builder, 0, foundBookmarks[j]); + } + if (pos >= len) break; + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore); + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null;} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + function linesFor(start, end) { + for (var i = start, result = []; i < end; ++i) + result.push(new Line(text[i], spansFor(i), estimateHeight)); + return result; + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)); + doc.remove(text.length, doc.size - text.length); + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1); + update(lastLine, lastLine.text, lastSpans); + if (nlines) doc.remove(from.line, nlines); + if (added.length) doc.insert(from.line, added); + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + var added = linesFor(1, text.length - 1); + added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + var added = linesFor(1, text.length - 1); + if (nlines > 1) doc.remove(from.line + 1, nlines - 1); + doc.insert(from.line + 1, added); + } + + signalLater(doc, "change", doc, change); + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + for (var i = 0, height = 0; i < lines.length; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length; }, + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines); + }, + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0; i < lines.length; ++i) lines[i].parent = this; + }, + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + if (op(this.lines[at])) return true; + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0; i < children.length; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size; }, + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) break; + at = 0; + } else at -= sz; + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines); + }, + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + while (child.lines.length > 50) { + var spilled = child.lines.splice(child.lines.length - 25, 25); + var newleaf = new LeafChunk(spilled); + child.height -= newleaf.height; + this.children.splice(i + 1, 0, newleaf); + newleaf.parent = this; + } + this.maybeSpill(); + } + break; + } + at -= sz; + } + }, + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) return; + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10); + me.parent.maybeSpill(); + }, + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) return true; + if ((n -= used) == 0) break; + at = 0; + } else at -= sz; + } + } + }; + + var nextDocId = 0; + var Doc = CodeMirror.Doc = function(text, mode, firstLine) { + if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); + if (firstLine == null) firstLine = 0; + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.cleanGeneration = 1; + this.frontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = simpleSelection(start); + this.history = new History(null); + this.id = ++nextDocId; + this.modeOption = mode; + + if (typeof text == "string") text = splitLines(text); + updateDoc(this, {from: start, to: start, text: text}); + setSelection(this, simpleSelection(start), sel_dontScroll); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) this.iterN(from - this.first, to - from, op); + else this.iterN(this.first, this.first + this.size, from); + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0; + for (var i = 0; i < lines.length; ++i) height += lines[i].height; + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep, lineFilter) { + var lines = getLines(this, this.first, this.first + this.size, lineFilter); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: splitLines(code), origin: "setValue", full: true}, true); + setSelection(this, simpleSelection(top)); + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, + + getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, + getLineNumber: function(line) {return lineNo(line);}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") line = getLine(this, line); + return visualLine(line); + }, + + lineCount: function() {return this.size;}, + firstLine: function() {return this.first;}, + lastLine: function() {return this.first + this.size - 1;}, + + clipPos: function(pos) {return clipPos(this, pos);}, + + getCursor: function(start) { + var range = this.sel.primary(), pos; + if (start == null || start == "head") pos = range.head; + else if (start == "anchor") pos = range.anchor; + else if (start == "end" || start == "to" || start === false) pos = range.to(); + else pos = range.from(); + return pos; + }, + listSelections: function() { return this.sel.ranges; }, + somethingSelected: function() {return this.sel.somethingSelected();}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads, options)); + }), + extendSelectionsBy: docMethodOp(function(f, options) { + extendSelections(this, map(this.sel.ranges, f), options); + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) return; + for (var i = 0, out = []; i < ranges.length; i++) + out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head)); + if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex); + setSelection(this, normalizeSelection(out, primary), options); + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0); + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); + setSelection(this, normalizeSelection(ranges, ranges.length - 1), options); + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, lines; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + lines = lines ? lines.concat(sel) : sel; + } + if (lineSep === false) return lines; + else return lines.join(lineSep || "\n"); + }, + getSelections: function(lineSep) { + var parts = [], ranges = this.sel.ranges; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + if (lineSep !== false) sel = sel.join(lineSep || "\n"); + parts[i] = sel; + } + return parts; + }, + replaceSelection: function(code, collapse, origin) { + var dup = []; + for (var i = 0; i < this.sel.ranges.length; i++) + dup[i] = code; + this.replaceSelections(dup, collapse, origin || "+input"); + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], sel = this.sel; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin}; + } + var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); + for (var i = changes.length - 1; i >= 0; i--) + makeChange(this, changes[i]); + if (newSel) setSelectionReplaceHistory(this, newSel); + else if (this.cm) ensureCursorVisible(this.cm); + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), + + setExtending: function(val) {this.extend = val;}, + getExtending: function() {return this.extend;}, + + historySize: function() { + var hist = this.history, done = 0, undone = 0; + for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done; + for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone; + return {undo: done, redo: undone}; + }, + clearHistory: function() {this.history = new History(this.history.maxGeneration);}, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true); + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; + return this.history.generation; + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration); + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)}; + }, + setHistory: function(histData) { + var hist = this.history = new History(this.history.maxGeneration); + hist.done = copyHistoryArray(histData.done.slice(0), null, true); + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + if (!line[prop]) line[prop] = cls; + else if (classTest(cls).test(line[prop])) return false; + else line[prop] += " " + cls; + return true; + }); + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) return false; + else if (cls == null) line[prop] = null; + else { + var found = cur.match(classTest(cls)); + if (!found) return false; + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true; + }); + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options); + }), + removeLineWidget: function(widget) { widget.clear(); }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark"); + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + markers.push(span.marker.parent || span.marker); + } + return markers; + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to); + var found = [], lineNo = from.line; + this.iter(from.line, to.line + 1, function(line) { + var spans = line.markedSpans; + if (spans) for (var i = 0; i < spans.length; i++) { + var span = spans[i]; + if (!(lineNo == from.line && from.ch > span.to || + span.from == null && lineNo != from.line|| + lineNo == to.line && span.from > to.ch) && + (!filter || filter(span.marker))) + found.push(span.marker.parent || span.marker); + } + ++lineNo; + }); + return found; + }, + getAllMarks: function() { + var markers = []; + this.iter(function(line) { + var sps = line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) + if (sps[i].from != null) markers.push(sps[i].marker); + }); + return markers; + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first; + this.iter(function(line) { + var sz = line.text.length + 1; + if (sz > off) { ch = off; return true; } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)); + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) return 0; + this.iter(this.first, coords.line, function (line) { + index += line.text.length + 1; + }); + return index; + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = this.sel; + doc.extend = false; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc; + }, + + linkedDoc: function(options) { + if (!options) options = {}; + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) from = options.from; + if (options.to != null && options.to < to) to = options.to; + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); + if (options.sharedHist) copy.history = this.history; + (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + copySharedMarkers(copy, findSharedMarkers(this)); + return copy; + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) other = other.doc; + if (this.linked) for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) continue; + this.linked.splice(i, 1); + other.unlinkDoc(this); + detachSharedMarkers(findSharedMarkers(this)); + break; + } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); + other.history = new History(null); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode;}, + getEditor: function() {return this.cm;} + }); + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter; + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); + for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments);}; + })(Doc.prototype[prop]); + + eventMixin(Doc); + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) continue; + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) continue; + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } + } + propagate(doc, null, true); + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) throw new Error("This document is already in use."); + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + if (!cm.options.lineWrapping) findMaxLine(cm); + cm.options.mode = doc.modeOption; + regChange(cm); + } + + // LINE UTILITIES + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document."); + for (var chunk = doc; !chunk.lines;) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break; } + n -= sz; + } + } + return chunk.lines[n]; + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function(line) { + var text = line.text; + if (n == end.line) text = text.slice(0, end.ch); + if (n == start.line) text = text.slice(start.ch); + out.push(text); + ++n; + }); + return out; + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to, lineFilter) { + var out = []; + doc.iter(from, to, function(line) { + var text = line.text; + if(lineFilter){ + text = lineFilter(line); + } + out.push(text); + }); + return out; + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) for (var n = line; n; n = n.parent) n.height += diff; + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) return null; + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) break; + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first; + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i = 0; i < chunk.children.length; ++i) { + var child = chunk.children[i], ch = child.height; + if (h < ch) { chunk = child; continue outer; } + h -= ch; + n += child.chunkSize(); + } + return n; + } while (!chunk.lines); + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) break; + h -= lh; + } + return n + i; + } + + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) break; + else h += line.height; + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i = 0; i < p.children.length; ++i) { + var cur = p.children[i]; + if (cur == chunk) break; + else h += cur.height; + } + } + return h; + } + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line) { + var order = line.order; + if (order == null) order = line.order = bidiOrdering(line.text); + return order; + } + + // HISTORY + + function History(startGen) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = []; + this.undoDepth = Infinity; + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0; + this.lastOp = this.lastSelOp = null; + this.lastOrigin = this.lastSelOrigin = null; + // Used by the isClean() method + this.generation = this.maxGeneration = startGen || 1; + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); + return histChange; + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array); + if (last.ranges) array.pop(); + else break; + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done); + return lst(hist.done); + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done); + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop(); + return lst(hist.done); + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, ore are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur; + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + var last = lst(cur.changes); + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done); + if (!before || !before.ranges) + pushSelectionToHistory(doc.sel, hist.done); + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation}; + hist.done.push(cur); + while (hist.done.length > hist.undoDepth) { + hist.done.shift(); + if (!hist.done[0].ranges) hist.done.shift(); + } + } + hist.done.push(selAfter); + hist.generation = ++hist.maxGeneration; + hist.lastModTime = hist.lastSelTime = time; + hist.lastOp = hist.lastSelOp = opId; + hist.lastOrigin = hist.lastSelOrigin = change.origin; + + if (!last) signal(doc, "historyAdded"); + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0); + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, origin = options && options.origin; + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + hist.done[hist.done.length - 1] = sel; + else + pushSelectionToHistory(sel, hist.done); + + hist.lastSelTime = +new Date; + hist.lastSelOrigin = origin; + hist.lastSelOp = opId; + if (options && options.clearRedo !== false) + clearSelectionEvents(hist.undone); + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest); + if (!(top && top.ranges && top.equals(sel))) + dest.push(sel); + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { + if (line.markedSpans) + (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; + ++n; + }); + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) return null; + for (var i = 0, out; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } + else if (out) out.push(spans[i]); + } + return !out ? spans : out.length ? out : null; + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) return null; + for (var i = 0, nw = []; i < change.text.length; ++i) + nw.push(removeClearedSpans(found[i])); + return nw; + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + for (var i = 0, copy = []; i < events.length; ++i) { + var event = events[i]; + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); + continue; + } + var changes = event.changes, newChanges = []; + copy.push({changes: newChanges}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m; + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } + } + } + return copy; + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); + } + continue; + } + for (var j = 0; j < sub.changes.length; ++j) { + var cur = sub.changes[j]; + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch); + cur.to = Pos(cur.to.line + diff, cur.to.ch); + } else if (from <= cur.to.line) { + ok = false; + break; + } + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // EVENT UTILITIES + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + var e_preventDefault = CodeMirror.e_preventDefault = function(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + }; + var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + }; + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; + } + var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);}; + + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) b = 1; + else if (e.button & 2) b = 3; + else if (e.button & 4) b = 2; + } + if (mac && e.ctrlKey && b == 1) b = 3; + return b; + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var on = CodeMirror.on = function(emitter, type, f) { + if (emitter.addEventListener) + emitter.addEventListener(type, f, false); + else if (emitter.attachEvent) + emitter.attachEvent("on" + type, f); + else { + var map = emitter._handlers || (emitter._handlers = {}); + var arr = map[type] || (map[type] = []); + arr.push(f); + } + }; + + var off = CodeMirror.off = function(emitter, type, f) { + if (emitter.removeEventListener) + emitter.removeEventListener(type, f, false); + else if (emitter.detachEvent) + emitter.detachEvent("on" + type, f); + else { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + for (var i = 0; i < arr.length; ++i) + if (arr[i] == f) { arr.splice(i, 1); break; } + } + }; + + var signal = CodeMirror.signal = function(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); + }; + + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2), list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + function bnd(f) {return function(){f.apply(null, args);};}; + for (var i = 0; i < arr.length; ++i) + list.push(bnd(arr[i])); + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) delayed[i](); + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore; + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) return; + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) + set.push(arr[i]); + } + + function hasHandler(emitter, type) { + var arr = emitter._handlers && emitter._handlers[type]; + return arr && arr.length > 0; + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // MISC UTILITIES + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; + + // Reused option objects for setSelection & friends + var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; + + function Delayed() {this.id = null;} + Delayed.prototype.set = function(ms, f) { + clearTimeout(this.id); + this.id = setTimeout(f, ms); + }; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) + return n + (end - i); + n += nextTab - i; + n += tabSize - (n % tabSize); + i = nextTab + 1; + } + }; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) nextTab = string.length; + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) + return pos + Math.min(skipped, goal - col); + col += nextTab - pos; + col += tabSize - (col % tabSize); + pos = nextTab + 1; + if (col >= goal) return pos; + } + } + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + spaceStrs.push(lst(spaceStrs) + " "); + return spaceStrs[n]; + } + + function lst(arr) { return arr[arr.length-1]; } + + var selectInput = function(node) { node.select(); }; + if (ios) // Mobile Safari apparently has a bug where select() is broken. + selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; + else if (ie) // Suppress mysterious IE10 errors + selectInput = function(node) { try { node.select(); } catch(_e) {} }; + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) + if (array[i] == elt) return i; + return -1; + } + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); + return out; + } + + function nothing() {} + + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) copyObj(props, inst); + return inst; + }; + + function copyObj(obj, target, overwrite) { + if (!target) target = {}; + for (var prop in obj) + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + target[prop] = obj[prop]; + return target; + } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args);}; + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + var isWordCharBasic = CodeMirror.isWordChar = function(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); + }; + function isWordChar(ch, helper) { + if (!helper) return isWordCharBasic(ch); + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; + return helper.test(ch); + } + + function isEmpty(obj) { + for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; + return true; + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/font/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } + + // DOM UTILITIES + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) e.className = className; + if (style) e.style.cssText = style; + if (typeof content == "string") e.appendChild(document.createTextNode(content)); + else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); + return e; + } + + var range; + if (document.createRange) range = function(node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r; + }; + else range = function(node, start, end) { + var r = document.body.createTextRange(); + try { r.moveToElementText(node.parentNode); } + catch(e) { return r; } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r; + }; + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + e.removeChild(e.firstChild); + return e; + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); + } + + var contains = CodeMirror.contains = function(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + child = child.parentNode; + if (parent.contains) + return parent.contains(child); + do { + if (child.nodeType == 11) child = child.host; + if (child == parent) return true; + } while (child = child.parentNode); + }; + + function activeElt() { return document.activeElement; } + // Older versions of IE throws unspecified error when touching + // document.activeElement in some cases (during loading, in iframe) + if (ie && ie_version < 11) activeElt = function() { + try { return document.activeElement; } + catch(e) { return document.body; } + }; + + function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } + var rmClass = CodeMirror.rmClass = function(node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + var addClass = CodeMirror.addClass = function(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls; + }; + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) + if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; + return b; + } + + // WINDOW-WIDE EVENTS + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.body.getElementsByClassName) return; + var byClass = document.body.getElementsByClassName("CodeMirror"); + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror; + if (cm) f(cm); + } + } + + var globalsRegistered = false; + function ensureGlobalHandlers() { + if (globalsRegistered) return; + registerGlobalHandlers(); + globalsRegistered = true; + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer; + on(window, "resize", function() { + if (resizeTimer == null) resizeTimer = setTimeout(function() { + resizeTimer = null; + forEachCodeMirror(onResize); + }, 100); + }); + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function() { + forEachCodeMirror(onBlur); + }); + } + + // FEATURE DETECTION + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) return false; + var div = elt('div'); + return "draggable" in div || "dragDrop" in div; + }(); + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); + } + var node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node; + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) return badBidiRects; + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) + var r1 = range(txt, 1, 2).getBoundingClientRect(); + return badBidiRects = (r1.right - r0.right < 3); + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) nl = string.length; + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function(string){return string.split(/\r\n?|\n/);}; + + var hasSelection = window.getSelection ? function(te) { + try { return te.selectionStart != te.selectionEnd; } + catch(e) { return false; } + } : function(te) { + try {var range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) return false; + return range.compareEndPoints("StartToEnd", range) != 0; + }; + + var hasCopyEvent = (function() { + var e = elt("div"); + if ("oncopy" in e) return true; + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function"; + })(); + + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) return badZoomedRects; + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; + } + + // KEY NAMES + + var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 107: "=", 109: "-", 127: "Delete", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"}; + CodeMirror.keyNames = keyNames; + (function() { + // Number keys + for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i); + // Alphabetic keys + for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); + // Function keys + for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; + })(); + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, "ltr"); + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); + found = true; + } + } + if (!found) f(from, to, "ltr"); + } + + function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } + function bidiRight(part) { return part.level % 2 ? part.from : part.to; } + + function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } + function lineRight(line) { + var order = getOrder(line); + if (!order) return line.text.length; + return bidiRight(lst(order)); + } + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(line); + if (visual != line) lineN = lineNo(visual); + var order = getOrder(visual); + var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); + return Pos(lineN, ch); + } + function lineEnd(cm, lineN) { + var merged, line = getLine(cm.doc, lineN); + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + lineN = null; + } + var order = getOrder(line); + var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); + return Pos(lineN == null ? lineNo(line) : lineN, ch); + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line); + var line = getLine(cm.doc, start.line); + var order = getOrder(line); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(0, line.text.search(/\S/)); + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; + return Pos(start.line, inWS ? 0 : firstNonWS); + } + return start; + } + + function compareBidiLevel(order, a, b) { + var linedir = order[0].level; + if (a == linedir) return true; + if (b == linedir) return false; + return a < b; + } + var bidiOther; + function getBidiPartAt(order, pos) { + bidiOther = null; + for (var i = 0, found; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < pos && cur.to > pos) return i; + if ((cur.from == pos || cur.to == pos)) { + if (found == null) { + found = i; + } else if (compareBidiLevel(order, cur.level, order[found].level)) { + if (cur.from != cur.to) bidiOther = found; + return i; + } else { + if (cur.from != cur.to) bidiOther = i; + return found; + } + } + } + return found; + } + + function moveInLine(line, pos, dir, byUnit) { + if (!byUnit) return pos + dir; + do pos += dir; + while (pos > 0 && isExtendingChar(line.text.charAt(pos))); + return pos; + } + + // This is needed in order to move 'visually' through bi-directional + // text -- i.e., pressing left should make the cursor go left, even + // when in RTL text. The tricky part is the 'jumps', where RTL and + // LTR text touch each other. This often requires the cursor offset + // to move more than one unit, in order to visually move one unit. + function moveVisually(line, start, dir, byUnit) { + var bidi = getOrder(line); + if (!bidi) return moveLogically(line, start, dir, byUnit); + var pos = getBidiPartAt(bidi, start), part = bidi[pos]; + var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); + + for (;;) { + if (target > part.from && target < part.to) return target; + if (target == part.from || target == part.to) { + if (getBidiPartAt(bidi, target) == pos) return target; + part = bidi[pos += dir]; + return (dir > 0) == part.level % 2 ? part.to : part.from; + } else { + part = bidi[pos += dir]; + if (!part) return null; + if ((dir > 0) == part.level % 2) + target = moveInLine(line, part.to, -1, byUnit); + else + target = moveInLine(line, part.from, 1, byUnit); + } + } + } + + function moveLogically(line, start, dir, byUnit) { + var target = start + dir; + if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; + return target < 0 || target > line.text.length ? null : target; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6ff + var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm"; + function charType(code) { + if (code <= 0xf7) return lowTypes.charAt(code); + else if (0x590 <= code && code <= 0x5f4) return "R"; + else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); + else if (0x6ee <= code && code <= 0x8ac) return "r"; + else if (0x2000 <= code && code <= 0x200b) return "w"; + else if (code == 0x200c) return "b"; + else return "L"; + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + // Browsers seem to always treat the boundaries of block elements as being L. + var outerType = "L"; + + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; this.to = to; + } + + return function(str) { + if (!bidiRE.test(str)) return false; + var len = str.length, types = []; + for (var i = 0, type; i < len; ++i) + types.push(type = charType(str.charCodeAt(i))); + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i = 0, prev = outerType; i < len; ++i) { + var type = types[i]; + if (type == "m") types[i] = prev; + else prev = type; + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (type == "1" && cur == "r") types[i] = "n"; + else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i = 1, prev = types[0]; i < len - 1; ++i) { + var type = types[i]; + if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; + else if (type == "," && prev == types[i+1] && + (prev == "1" || prev == "n")) types[i] = prev; + prev = type; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i = 0; i < len; ++i) { + var type = types[i]; + if (type == ",") types[i] = "N"; + else if (type == "%") { + for (var end = i + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (cur == "L" && type == "1") types[i] = "L"; + else if (isStrong.test(type)) cur = type; + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + var before = (i ? types[i-1] : outerType) == "L"; + var after = (end < len ? types[end] : outerType) == "L"; + var replace = before || after ? "L" : "R"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + var start = i; + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push(new BidiSpan(0, start, i)); + } else { + var pos = i, at = order.length; + for (++i; i < len && types[i] != "L"; ++i) {} + for (var j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j)); + var nstart = j; + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, new BidiSpan(2, nstart, j)); + pos = j; + } else ++j; + } + if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)); + } + } + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + if (order[0].level == 2) + order.unshift(new BidiSpan(1, order[0].to, order[0].to)); + if (order[0].level != lst(order).level) + order.push(new BidiSpan(order[0].level, len, len)); + + return order; + }; + })(); + + // THE END + + CodeMirror.version = "5.4.1"; + + return CodeMirror; +});(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + var Pos = CodeMirror.Pos; + + function forEach(arr, f) { + for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); + } + + function arrayContains(arr, item) { + if (!Array.prototype.indexOf) { + var i = arr.length; + while (i--) { + if (arr[i] === item) { + return true; + } + } + return false; + } + return arr.indexOf(item) != -1; + } + + function scriptHint(editor, keywords, getToken, options) { + // Find the token at the cursor + var cur = editor.getCursor(), token = getToken(editor, cur); + if (/\b(?:string)\b/.test(token.type)) { + return; + } + token.state = CodeMirror.innerMode(editor.getMode(), token.state).state; + + if (!/^[\w$_]*$/.test(token.string)) { + token = { + start: cur.ch, end: cur.ch, string: "", state: token.state, + type: token.string == "." ? "property" : null + }; + } else if (token.end > cur.ch) { + token.end = cur.ch; + token.string = token.string.slice(0, cur.ch - token.start); + } + + var tprop = token; + // If it is a property, find out what it is a property of. + while (tprop.type == "property") { + tprop = getToken(editor, Pos(cur.line, tprop.start)); + if (tprop.string != ".") return; + tprop = getToken(editor, Pos(cur.line, tprop.start)); + if (!context) var context = []; + context.push(tprop); + } + return { + list: getCompletions(token, context, keywords, options), + from: Pos(cur.line, token.start), + to: Pos(cur.line, token.end) + }; + } + + function getFormulaKeywords() { + return BI.FormulaCollections; + } + + function formulaHint(editor, options) { + return scriptHint(editor, getFormulaKeywords(), + function (e, cur) { + return e.getTokenAt(cur); + }, + options); + }; + CodeMirror.registerHelper("hint", "formula", formulaHint); + + function getCompletions(token, context, keywords, options) { + var found = [], start = token.string; + if (!start) { + return found; + } + function maybeAdd(str) { + if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) { + found.push(str); + } + } + + if (context && context.length) { + context.pop(); + } else { + forEach(keywords, maybeAdd); + } + return found; + } +});(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + "use strict"; + + CodeMirror.defineMode('formula', function () { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + + var atoms = wordObj(['false', 'true']); + var keywords = wordObj(BI.FormulaCollections); + + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + var ch = stream.next(); + + if (ch === '"' || ch === '\'') { + nextUntilUnescaped(stream, ch); + return "string"; + } + if (/[\[\],\(\)]/.test(ch)) { + return 'bracket'; + } + + // richie:暂时不需要解析操作符号 + //if (/[+\-*\/=<>!&|]/.test(ch)) { + // return 'operator'; + //} + //if (/\d|\d./.test(ch)) { + // stream.eatWhile(/\d|\./); + // if (stream.eol() || !/\w/.test(stream.peek())) { + // return 'number'; + // } + //} + + + + stream.eatWhile(/[\w-]/); + var word = stream.current(); + if (atoms.hasOwnProperty(word)) { + return "atom"; + } + if (keywords.hasOwnProperty(word)) { + return "keyword"; + } + return null; + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next === end && !escaped) { + return false; + } + escaped = !escaped && next === "\\"; + } + return escaped; + } + + function tokenize(stream, state) { + return (state.tokens[0] || tokenBase)(stream, state); + } + + return { + startState: function () { + return {tokens: []}; + }, + token: function (stream, state) { + return tokenize(stream, state); + }, + fold: "brace" + }; + }); + CodeMirror.defineMIME("text/fx-formula", "formula"); +});// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + "use strict"; + + var HINT_ELEMENT_CLASS = "CodeMirror-hint"; + var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; + + // This is the old interface, kept around for now to stay + // backwards-compatible. + CodeMirror.showHint = function (cm, getHints, options) { + if (!getHints) return cm.showHint(options); + if (options && options.async) getHints.async = true; + var newOpts = {hint: getHints}; + if (options) for (var prop in options) newOpts[prop] = options[prop]; + return cm.showHint(newOpts); + }; + + CodeMirror.defineExtension("showHint", function (options) { + // We want a single cursor position. + if (this.listSelections().length > 1 || this.somethingSelected()) return; + + if (this.state.completionActive) this.state.completionActive.close(); + var completion = this.state.completionActive = new Completion(this, options); + if (!completion.options.hint) return; + + CodeMirror.signal(this, "startCompletion", this); + completion.update(true); + }); + + function Completion(cm, options) { + this.cm = cm; + this.options = this.buildOptions(options); + this.widget = null; + this.debounce = 0; + this.tick = 0; + this.startPos = this.cm.getCursor(); + this.startLen = this.cm.getLine(this.startPos.line).length; + + var self = this; + cm.on("cursorActivity", this.activityFunc = function () { + self.cursorActivity(); + }); + } + + var requestAnimationFrame = window.requestAnimationFrame || function (fn) { + return setTimeout(fn, 1000 / 60); + }; + var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; + + Completion.prototype = { + close: function () { + if (!this.active()) return; + this.cm.state.completionActive = null; + this.tick = null; + this.cm.off("cursorActivity", this.activityFunc); + + if (this.widget && this.data) CodeMirror.signal(this.data, "close"); + if (this.widget) this.widget.close(); + CodeMirror.signal(this.cm, "endCompletion", this.cm); + }, + + active: function () { + return this.cm.state.completionActive == this; + }, + + pick: function (data, i) { + var completion = data.list[i]; + if (completion.hint) completion.hint(this.cm, data, completion); + else { + this.cm.replaceRange(getText(completion), completion.from || data.from, + completion.to || data.to, "complete"); + var to = this.cm.getCursor(); + this.cm.markText(completion.from || data.from, to, {className: "#function", atomic: true}); + this.cm.replaceSelection("() "); + to = this.cm.getCursor(); + to.ch = to.ch - 2; + this.cm.setCursor(to); + this.cm.focus(); + } + CodeMirror.signal(data, "pick", completion); + this.close(); + }, + + cursorActivity: function () { + if (this.debounce) { + cancelAnimationFrame(this.debounce); + this.debounce = 0; + } + + var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line); + if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || + pos.ch < this.startPos.ch || this.cm.somethingSelected() || + (pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) { + this.close(); + } else { + var self = this; + this.debounce = requestAnimationFrame(function () { + self.update(); + }); + if (this.widget) this.widget.disable(); + } + }, + + update: function (first) { + if (this.tick == null) return; + if (this.data) CodeMirror.signal(this.data, "update"); + if (!this.options.hint.async) { + this.finishUpdate(this.options.hint(this.cm, this.options), first); + } else { + var myTick = ++this.tick, self = this; + this.options.hint(this.cm, function (data) { + if (self.tick == myTick) self.finishUpdate(data, first); + }, this.options); + } + }, + + finishUpdate: function (data, first) { + this.data = data; + + var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle); + if (this.widget) this.widget.close(); + if (data && data.list.length) { + if (picked && data.list.length == 1) { + this.pick(data, 0); + } else { + this.widget = new Widget(this, data); + CodeMirror.signal(data, "shown"); + } + } + }, + + buildOptions: function (options) { + var editor = this.cm.options.hintOptions; + var out = {}; + for (var prop in defaultOptions) out[prop] = defaultOptions[prop]; + if (editor) for (var prop in editor) + if (editor[prop] !== undefined) out[prop] = editor[prop]; + if (options) for (var prop in options) + if (options[prop] !== undefined) out[prop] = options[prop]; + return out; + } + }; + + function getText(completion) { + if (typeof completion == "string") return completion; + else return completion.text; + } + + function buildKeyMap(completion, handle) { + var baseMap = { + Up: function () { + handle.moveFocus(-1); + }, + Down: function () { + handle.moveFocus(1); + }, + PageUp: function () { + handle.moveFocus(-handle.menuSize() + 1, true); + }, + PageDown: function () { + handle.moveFocus(handle.menuSize() - 1, true); + }, + Home: function () { + handle.setFocus(0); + }, + End: function () { + handle.setFocus(handle.length - 1); + }, + Enter: handle.pick, + Tab: handle.pick, + Esc: handle.close + }; + var custom = completion.options.customKeys; + var ourMap = custom ? {} : baseMap; + + function addBinding(key, val) { + var bound; + if (typeof val != "string") + bound = function (cm) { + return val(cm, handle); + }; + // This mechanism is deprecated + else if (baseMap.hasOwnProperty(val)) + bound = baseMap[val]; + else + bound = val; + ourMap[key] = bound; + } + + if (custom) + for (var key in custom) if (custom.hasOwnProperty(key)) + addBinding(key, custom[key]); + var extra = completion.options.extraKeys; + if (extra) + for (var key in extra) if (extra.hasOwnProperty(key)) + addBinding(key, extra[key]); + return ourMap; + } + + function getHintElement(hintsElement, el) { + while (el && el != hintsElement) { + if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el; + el = el.parentNode; + } + } + + function Widget(completion, data) { + this.completion = completion; + this.data = data; + this.picked = false; + var widget = this, cm = completion.cm; + + var hints = this.hints = document.createElement("ul"); + hints.className = "CodeMirror-hints"; + this.selectedHint = data.selectedHint || 0; + + var completions = data.list; + for (var i = 0; i < completions.length; ++i) { + var elt = hints.appendChild(document.createElement("li")), cur = completions[i]; + var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); + if (cur.className != null) className = cur.className + " " + className; + elt.className = className; + if (cur.render) cur.render(elt, data, cur); + else elt.appendChild(document.createTextNode(cur.displayText || getText(cur))); + elt.hintId = i; + } + + var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null); + var left = pos.left, top = pos.bottom, below = true; + hints.style.left = left + "px"; + hints.style.top = top + "px"; + // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. + var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); + var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); + (completion.options.container || document.body).appendChild(hints); + var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; + if (overlapY > 0) { + var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); + if (curTop - height > 0) { // Fits above cursor + hints.style.top = (top = pos.top - height) + "px"; + below = false; + } else if (height > winH) { + hints.style.height = (winH - 5) + "px"; + hints.style.top = (top = pos.bottom - box.top) + "px"; + var cursor = cm.getCursor(); + if (data.from.ch != cursor.ch) { + pos = cm.cursorCoords(cursor); + hints.style.left = (left = pos.left) + "px"; + box = hints.getBoundingClientRect(); + } + } + } + var overlapX = box.right - winW; + if (overlapX > 0) { + if (box.right - box.left > winW) { + hints.style.width = (winW - 5) + "px"; + overlapX -= (box.right - box.left) - winW; + } + hints.style.left = (left = pos.left - overlapX) + "px"; + } + + cm.addKeyMap(this.keyMap = buildKeyMap(completion, { + moveFocus: function (n, avoidWrap) { + widget.changeActive(widget.selectedHint + n, avoidWrap); + }, + setFocus: function (n) { + widget.changeActive(n); + }, + menuSize: function () { + return widget.screenAmount(); + }, + length: completions.length, + close: function () { + completion.close(); + }, + pick: function () { + widget.pick(); + }, + data: data + })); + + if (completion.options.closeOnUnfocus) { + var closingOnBlur; + cm.on("blur", this.onBlur = function () { + closingOnBlur = setTimeout(function () { + completion.close(); + }, 100); + }); + cm.on("focus", this.onFocus = function () { + clearTimeout(closingOnBlur); + }); + } + + var startScroll = cm.getScrollInfo(); + cm.on("scroll", this.onScroll = function () { + var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect(); + var newTop = top + startScroll.top - curScroll.top; + var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop); + if (!below) point += hints.offsetHeight; + if (point <= editor.top || point >= editor.bottom) return completion.close(); + hints.style.top = newTop + "px"; + hints.style.left = (left + startScroll.left - curScroll.left) + "px"; + }); + + CodeMirror.on(hints, "dblclick", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + widget.pick(); + } + }); + + CodeMirror.on(hints, "click", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + if (completion.options.completeOnSingleClick) widget.pick(); + } + }); + + CodeMirror.on(hints, "mousedown", function () { + setTimeout(function () { + cm.focus(); + }, 20); + }); + + CodeMirror.signal(data, "select", completions[0], hints.firstChild); + return true; + } + + Widget.prototype = { + close: function () { + if (this.completion.widget != this) return; + this.completion.widget = null; + this.hints.parentNode.removeChild(this.hints); + this.completion.cm.removeKeyMap(this.keyMap); + + var cm = this.completion.cm; + if (this.completion.options.closeOnUnfocus) { + cm.off("blur", this.onBlur); + cm.off("focus", this.onFocus); + } + cm.off("scroll", this.onScroll); + }, + + disable: function () { + this.completion.cm.removeKeyMap(this.keyMap); + var widget = this; + this.keyMap = { + Enter: function () { + widget.picked = true; + } + }; + this.completion.cm.addKeyMap(this.keyMap); + }, + + pick: function () { + this.completion.pick(this.data, this.selectedHint); + }, + + changeActive: function (i, avoidWrap) { + if (i >= this.data.list.length) + i = avoidWrap ? this.data.list.length - 1 : 0; + else if (i < 0) + i = avoidWrap ? 0 : this.data.list.length - 1; + if (this.selectedHint == i) return; + var node = this.hints.childNodes[this.selectedHint]; + node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); + node = this.hints.childNodes[this.selectedHint = i]; + node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; + if (node.offsetTop < this.hints.scrollTop) + this.hints.scrollTop = node.offsetTop - 3; + else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) + this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; + CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); + }, + + screenAmount: function () { + return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; + } + }; + + CodeMirror.registerHelper("hint", "auto", function (cm, options) { + var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; + if (helpers.length) { + for (var i = 0; i < helpers.length; i++) { + var cur = helpers[i](cm, options); + if (cur && cur.list.length) return cur; + } + } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { + if (words) return CodeMirror.hint.fromList(cm, {words: words}); + } else if (CodeMirror.hint.anyword) { + return CodeMirror.hint.anyword(cm, options); + } + }); + + CodeMirror.registerHelper("hint", "fromList", function (cm, options) { + var cur = cm.getCursor(), token = cm.getTokenAt(cur); + var found = []; + for (var i = 0; i < options.words.length; i++) { + var word = options.words[i]; + if (word.slice(0, token.string.length) == token.string) + found.push(word); + } + + if (found.length) return { + list: found, + from: CodeMirror.Pos(cur.line, token.start), + to: CodeMirror.Pos(cur.line, token.end) + }; + }); + + CodeMirror.commands.autocomplete = CodeMirror.showHint; + + var defaultOptions = { + hint: CodeMirror.hint.auto, + completeSingle: true, + alignWithWord: true, + closeCharacters: /[\s()\[\]{};:>,]/, + closeOnUnfocus: true, + completeOnSingleClick: true, + container: null, + customKeys: null, + extraKeys: null + }; + + CodeMirror.defineOption("hintOptions", null); +});/** + * Created by User on 2017/3/21. + */ +BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"]; +/** + * 公式编辑控件 + * @class BI.FormulaEditor + * @extends BI.Widget + */ +BI.FormulaEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-formula-editor bi-card', + watermark: '', + value: '', + fieldTextValueMap: {}, + showHint: true, + lineHeight: 2 + }); + }, + _init: function () { + BI.FormulaEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.editor = CodeMirror(this.element[0], { + textWrapping: true, + lineWrapping: true, + lineNumbers: false, + mode: 'formula' + }); + o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); + this.editor.on("change", function (cm, change) { + self._checkWaterMark(); + if (o.showHint) { + CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false}); + } + BI.nextTick(function () { + self.fireEvent(BI.FormulaEditor.EVENT_CHANGE) + }); + }); + + this.editor.on("focus", function () { + self._checkWaterMark(); + self.fireEvent(BI.FormulaEditor.EVENT_FOCUS); + }); + + this.editor.on("blur", function () { + self.fireEvent(BI.FormulaEditor.EVENT_BLUR); + }); + + + if (BI.isKey(o.value)) { + self.setValue(o.value); + } + + if (BI.isKey(this.options.watermark)) { + var self = this; + this.watermark = BI.createWidget({ + type: "bi.label", + cls: "bi-water-mark", + text: this.options.watermark, + whiteSpace: "nowrap", + textAlign: "left" + }); + BI.createWidget({ + type: "bi.absolute", + element: self, + items: [{ + el: self.watermark, + left: 0, + top: 0 + }] + }); + + this.watermark.element.bind( + "mousedown", function (e) { + self.insertString(""); + self.editor.focus(); + e.stopEvent(); + } + ); + this.watermark.element.bind("click", function (e) { + self.editor.focus(); + e.stopEvent(); + }); + this.watermark.element.css({ + position: "absolute", + left: 3, + right: 3, + top: 6, + bottom: 0 + }); + } + }, + + _checkWaterMark: function () { + var o = this.options; + if (!this.disabledWaterMark && BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + disableWaterMark: function () { + this.disabledWaterMark = true; + this._checkWaterMark(); + }, + + focus: function () { + this.editor.focus(); + }, + + /** + * 添加字段 + * @param field + */ + insertField: function (field) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(field); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"}); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + insertFunction: function (fn) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(fn); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "#function", atomic: true}); + this.editor.replaceSelection("() "); + to = this.editor.getCursor(); + to.ch = to.ch - 2; + this.editor.setCursor(to); + this.editor.focus(); + }, + insertOperator: function (op) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(op); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "%operator", atomic: true}); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + setFunction: function (v) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(v); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "#function", atomic: true}); + }, + + insertString: function (str) { + this.editor.replaceSelection(str); + this.editor.focus(); + }, + + getFormulaString: function () { + return this.editor.getValue(); + }, + + getUsedFields: function () { + var fieldMap = this.options.fieldTextValueMap; + var fields = []; + this.editor.getValue(true, function (line) { + var value = line.text; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "fieldName": + var dId = fieldMap[value.substr(i.from, i.to - i.from)]; + if (!fields.contains(dId)) { + fields.push(dId); + } + + } + }); + }); + return fields; + }, + + getCheckString: function () { + return this.editor.getValue(true, function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + + switch (i.marker.className) { + case "fieldName": + var fieldNameLength = i.to - i.from; + value = value.substr(0, i.from + num) + "$a" + value.substr(i.to + num, value.length); + num = num + 2 - fieldNameLength; + break; + } + + }); + return value; + }); + }, + + getValue: function () { + var fieldMap = this.options.fieldTextValueMap; + return this.editor.getValue("\n", function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "fieldName": + var fieldNameLength = i.to - i.from; + var fieldId = fieldMap[value.substr(i.from + num, fieldNameLength)]; + value = value.substr(0, i.from + num) + "$\{" + fieldMap[value.substr(i.from + num, fieldNameLength)] + "\}" + value.substr(i.to + num, value.length); + num += fieldId.length - fieldNameLength + 3; + break; + } + }); + return value; + }); + }, + + setValue: function (value) { + this.editor.setValue(value); + }, + + setFieldTextValueMap: function (fieldTextValueMap) { + this.options.fieldTextValueMap = fieldTextValueMap; + }, + + refresh: function () { + var self = this; + BI.nextTick(function () { + self.editor.refresh(); + }); + } + +}); +BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.formula_editor", BI.FormulaEditor); +/** + * z-index在1亿层级 + * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现) + * @class BI.Msg + */ +$.extend(BI, { + Msg: function () { + + var messageShow, $mask, $pop; + + return { + alert: function (title, message, callback) { + this._show(false, title, message, callback); + }, + confirm: function (title, message, callback) { + this._show(true, title, message, callback); + }, + prompt: function (title, message, value, callback, min_width) { + // BI.Msg.prompt(title, message, value, callback, min_width); + }, + toast: function (message, level, context) { + context = context || $("body"); + var toast = BI.createWidget({ + type: "bi.toast", + level: level, + text: message + }); + BI.createWidget({ + type: "bi.absolute", + element: context, + items: [{ + el: toast, + left: "50%", + top: 0 + }] + }); + if (toast.element.outerWidth() > context.outerWidth()) { + toast.setWidth(context.width()); + } + toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); + toast.invisible(); + toast.element.slideDown(500, function () { + BI.delay(function () { + toast.element.slideUp(500, function () { + toast.destroy(); + }) + }, 5000) + }) + }, + _show: function (hasCancel, title, message, callback) { + $mask = $('<div class="bi-z-index-mask">').css({ + position: 'absolute', + 'zIndex': BI.zIndex_tip - 2, + top: 0, + left: 0, + right: 0, + bottom: 0, + opacity: 0.5 + }).appendTo('body'); + $pop = $('<div class="bi-message-depend">').css({ + position: 'absolute', + 'zIndex': BI.zIndex_tip - 1, + top: 0, + left: 0, + right: 0, + bottom: 0 + }).appendTo('body'); + var close = function () { + messageShow.destroy(); + $mask.remove(); + }; + var controlItems = []; + if (hasCancel === true) { + controlItems.push({ + el: { + type: 'bi.button', + text: BI.i18nText("BI-Basic_Cancel"), + height: 30, + level: 'ignore', + handler: function () { + close(); + if (BI.isFunction(callback)) { + callback.apply(null, [false]); + } + } + } + }); + } + controlItems.push({ + el: { + type: 'bi.button', + text: BI.i18nText("BI-Basic_OK"), + height: 30, + handler: function () { + close(); + if (BI.isFunction(callback)) { + callback.apply(null, [true]); + } + } + } + }); + var conf = { + element: $pop, + type: 'bi.center_adapt', + items: [ + { + type: 'bi.border', + cls: 'bi-message-content bi-card', + items: { + 'north': { + el: { + type: 'bi.border', + cls: 'bi-message-title bi-background', + items: { + center: { + el: { + type: 'bi.label', + text: title || BI.i18nText("BI-Basic_Prompt"), + textAlign: 'left', + hgap: 20, + height: 50 + } + }, + east: { + el: { + type: 'bi.icon_button', + cls: 'bi-message-close close-font', +// height: 50, + handler: function () { + close(); + } + }, + width: 60 + } + } + }, + height: 50 + }, + 'center': { + el: { + type: "bi.text", + cls: "bi-message-text", + tgap: 60, + hgap: 20, + lineHeight: 30, + whiteSpace: "normal", + text: message + } + }, + 'south': { + el: { + type: "bi.absolute", + items: [{ + el: { + type: 'bi.right_vertical_adapt', + hgap: 5, + items: controlItems + }, + top: 0, + left: 20, + right: 20, + bottom: 0 + }] + + }, + height: 60 + } + }, + width: 400, + height: 300 + } + ] + }; + + messageShow = BI.createWidget(conf); + } + }; + }() +});/** + * GridView + * + * Created by GUY on 2016/1/11. + * @class BI.GridView + * @extends BI.Widget + */ +BI.GridView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-view", + // width: 400, //必设 + // height: 300, //必设 + overflowX: true, + overflowY: true, + overscanColumnCount: 0, + overscanRowCount: 0, + rowHeightGetter: BI.emptyFn, //number类型或function类型 + columnWidthGetter: BI.emptyFn, //number类型或function类型 + // estimatedColumnSize: 100, //columnWidthGetter为function时必设 + // estimatedRowSize: 30, //rowHeightGetter为function时必设 + scrollLeft: 0, + scrollTop: 0, + items: [] + }); + }, + + _init: function () { + BI.GridView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + this._debounceRelease = BI.debounce(function () { + self._scrollLock = false; + }, 1000 / 60); + this.container = BI.createWidget({ + type: "bi.absolute" + }); + this.element.scroll(function () { + if (self._scrollLock === true) { + return; + } + o.scrollLeft = self.element.scrollLeft(); + o.scrollTop = self.element.scrollTop(); + self._calculateChildrenToRender(); + self.fireEvent(BI.GridView.EVENT_SCROLL, { + scrollLeft: o.scrollLeft, + scrollTop: o.scrollTop + }); + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + scrollable: o.overflowX === true && o.overflowY === true, + scrolly: o.overflowX === false && o.overflowY === true, + scrollx: o.overflowX === true && o.overflowY === false, + items: [this.container] + }); + if (o.items.length > 0) { + this._populate(); + } + if (o.scrollLeft !== 0 || o.scrollTop !== 0) { + BI.nextTick(function () { + self.element.scrollTop(o.scrollTop); + self.element.scrollLeft(o.scrollLeft); + }); + } + }, + + _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) { + return { + overscanStartIndex: Math.max(0, startIndex - overscanCellsCount), + overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount) + } + }, + + _calculateChildrenToRender: function () { + var self = this, o = this.options; + + var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()), + scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()), + overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount; + + if (height > 0 && width > 0) { + var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft); + var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop); + + if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) { + return; + } + var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft); + var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop); + + this._renderedColumnStartIndex = visibleColumnIndices.start; + this._renderedColumnStopIndex = visibleColumnIndices.stop; + this._renderedRowStartIndex = visibleRowIndices.start; + this._renderedRowStopIndex = visibleRowIndices.stop; + + var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex) + + var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex); + + var columnStartIndex = overscanColumnIndices.overscanStartIndex; + var columnStopIndex = overscanColumnIndices.overscanStopIndex; + var rowStartIndex = overscanRowIndices.overscanStartIndex; + var rowStopIndex = overscanRowIndices.overscanStopIndex; + + //算区间size + var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex); + var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex); + var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex); + var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex); + var top = minRowDatum.offset + verticalOffsetAdjustment; + var left = minColumnDatum.offset + horizontalOffsetAdjustment; + var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size; + var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size; + //如果滚动的区间并没有超出渲染的范围 + if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { + return; + } + + var renderedCells = [], renderedKeys = [], renderedWidgets = {}; + var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0; + var count = 0; + for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { + var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); + + for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { + var key = [rowIndex, columnIndex]; + var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); + + var index = BI.deepIndexOf(this.renderedKeys, key); + var child; + if (index > -1) { + if (columnDatum.size !== this.renderedCells[index]._width) { + this.renderedCells[index]._width = columnDatum.size; + this.renderedCells[index].el.setWidth(columnDatum.size); + } + if (rowDatum.size !== this.renderedCells[index]._height) { + this.renderedCells[index]._height = rowDatum.size; + this.renderedCells[index].el.setHeight(rowDatum.size); + } + if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) { + this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) + "px"); + } + if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) { + this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) + "px"); + } + renderedCells.push(child = this.renderedCells[index]); + } else { + child = BI.createWidget(BI.extend({ + type: "bi.label", + width: columnDatum.size, + height: rowDatum.size + }, o.items[rowIndex][columnIndex], { + cls: (o.items[rowIndex][columnIndex].cls || "") + " grid-cell" + (rowIndex === 0 ? " first-row" : "") + (columnIndex === 0 ? " first-col" : ""), + _rowIndex: rowIndex, + _columnIndex: columnIndex, + _left: columnDatum.offset + horizontalOffsetAdjustment, + _top: rowDatum.offset + verticalOffsetAdjustment + })); + renderedCells.push({ + el: child, + left: columnDatum.offset + horizontalOffsetAdjustment, + top: rowDatum.offset + verticalOffsetAdjustment, + _left: columnDatum.offset + horizontalOffsetAdjustment, + _top: rowDatum.offset + verticalOffsetAdjustment, + _width: columnDatum.size, + _height: rowDatum.size + }); + } + minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment); + maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size); + minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment); + maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size); + renderedKeys.push(key); + renderedWidgets[count++] = child; + } + } + //已存在的, 需要添加的和需要删除的 + var existSet = {}, addSet = {}, deleteArray = []; + BI.each(renderedKeys, function (i, key) { + if (BI.deepContains(self.renderedKeys, key)) { + existSet[i] = key; + } else { + addSet[i] = key; + } + }); + BI.each(this.renderedKeys, function (i, key) { + if (BI.deepContains(existSet, key)) { + return; + } + if (BI.deepContains(addSet, key)) { + return; + } + deleteArray.push(i); + }); + BI.each(deleteArray, function (i, index) { + //性能优化,不调用destroy方法防止触发destroy事件 + self.renderedCells[index].el._destroy(); + }); + var addedItems = []; + BI.each(addSet, function (index) { + addedItems.push(renderedCells[index]) + }); + this.container.addItems(addedItems); + //拦截父子级关系 + this.container._children = renderedWidgets; + this.container.attr("items", renderedCells); + this.renderedCells = renderedCells; + this.renderedKeys = renderedKeys; + this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; + } + }, + + _getMaxScrollLeft: function () { + return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + }, + + _getMaxScrollTop: function () { + return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + }, + + _populate: function (items) { + var self = this, o = this.options; + this._reRange(); + if (items && items !== this.options.items) { + this.options.items = items; + } + if (o.items.length > 0) { + this.columnCount = o.items[0].length; + this.rowCount = o.items.length; + } else { + this.rowCount = 0; + this.columnCount = 0; + } + this.container.setWidth(this.columnCount * o.estimatedColumnSize); + this.container.setHeight(this.rowCount * o.estimatedRowSize); + + this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize); + this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize); + + this._calculateChildrenToRender(); + this.element.scrollTop(o.scrollTop); + this.element.scrollLeft(o.scrollLeft); + }, + + setScrollLeft: function (scrollLeft) { + if (this.options.scrollLeft === scrollLeft) { + return; + } + this._scrollLock = true; + this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollLeft(this.options.scrollLeft); + }, + + setScrollTop: function (scrollTop) { + if (this.options.scrollTop === scrollTop) { + return; + } + this._scrollLock = true; + this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollTop(this.options.scrollTop); + }, + + setOverflowX: function (b) { + var self = this; + if (this.options.overflowX !== !!b) { + this.options.overflowX = !!b; + BI.nextTick(function () { + self.element.css({overflowX: !!b ? "auto" : "hidden"}); + }); + } + }, + + setOverflowY: function (b) { + var self = this; + if (this.options.overflowY !== !!b) { + this.options.overflowY = !!b; + BI.nextTick(function () { + self.element.css({overflowY: !!b ? "auto" : "hidden"}); + }); + } + }, + + getScrollLeft: function () { + return this.options.scrollLeft; + }, + + getScrollTop: function () { + return this.options.scrollTop; + }, + + getMaxScrollLeft: function () { + return this._getMaxScrollLeft(); + }, + + getMaxScrollTop: function () { + return this._getMaxScrollTop(); + }, + + setEstimatedColumnSize: function (width) { + this.options.estimatedColumnSize = width; + }, + + setEstimatedRowSize: function (height) { + this.options.estimatedRowSize = height; + }, + + //重新计算children + _reRange: function () { + this.renderRange = {}; + }, + + _clearChildren: function () { + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + BI.each(this.renderedCells, function (i, cell) { + cell.el._destroy(); + }); + this._clearChildren(); + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + }, + + populate: function (items) { + if (items && items !== this.options.items) { + this.restore(); + } + this._populate(items); + } +}); +BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut('bi.grid_view', BI.GridView);/** + * floatBox弹出层, + * @class BI.FloatBox + * @extends BI.Widget + */ +BI.FloatBox = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-float-box bi-card", + width: 600, + height: 500 + }) + }, + _init: function () { + BI.FloatBox.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.showAction = new BI.ShowAction({ + tar: this + }); + this._center = BI.createWidget(); + this._north = BI.createWidget(); + this.element.draggable && this.element.draggable({ + handle: ".bi-message-title", + drag: function (e, ui) { + var W = $("body").width(), H = $("body").height(); + if (ui.position.left + o.width > W) { + ui.position.left = W - o.width; + } + if (ui.position.top + o.height > H) { + ui.position.top = H - o.height; + } + if (ui.position.left < 0) { + ui.position.left = 0; + } + if (ui.position.top < 0) { + ui.position.top = 0; + } + } + }); + this._south = BI.createWidget(); + BI.createWidget({ + type: 'bi.border', + element: this, + items: { + 'north': { + el: { + type: 'bi.border', + cls: 'bi-message-title bi-background', + items: { + center: { + el: { + type: "bi.absolute", + items: [{ + el: this._north, + left: 10, + top: 0, + right: 0, + bottom: 0 + }] + } + }, + east: { + el: { + type: 'bi.icon_button', + cls: 'bi-message-close close-font', + height: 50, + handler: function () { + self.currentSectionProvider.close(); + } + }, + width: 60 + } + } + }, + height: 50 + }, + 'center': { + el: { + type: "bi.absolute", + items: [{ + el: this._center, + left: 10, + top: 10, + right: 10, + bottom: 10 + }] + } + }, + 'south': { + el: { + type: "bi.absolute", + items: [{ + el: this._south, + left: 10, + top: 0, + right: 10, + bottom: 0 + }] + }, + height: 60 + } + } + }) + }, + + populate: function (sectionProvider) { + var self = this; + if (this.currentSectionProvider && this.currentSectionProvider !== sectionProvider) { + this.currentSectionProvider.destroy(); + } + this.currentSectionProvider = sectionProvider; + sectionProvider.rebuildNorth(this._north); + sectionProvider.rebuildCenter(this._center); + sectionProvider.rebuildSouth(this._south); + sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () { + self.close(); + }) + }, + + show: function () { + this.showAction.actionPerformed(); + }, + + hide: function () { + this.showAction.actionBack(); + }, + + open: function () { + this.show(); + this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN); + }, + + close: function () { + this.hide(); + this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED); + }, + + setZindex: function (zindex) { + this.element.css({"z-index": zindex}); + }, + + destroyed: function () { + this.currentSectionProvider && this.currentSectionProvider.destroy(); + } +}); + +BI.shortcut("bi.float_box", BI.FloatBox); + +BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED"; +BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED"; +/** + * 下拉框弹出层, zIndex在1000w + * @class BI.PopupView + * @extends BI.Widget + */ +BI.PopupView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-popup-view", + maxWidth: 'auto', + minWidth: 100, + //maxHeight: 200, + minHeight: 25, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + direction: BI.Direction.Top, //工具栏的方向 + stopEvent: false,//是否停止mousedown、mouseup事件 + stopPropagation: false, //是否停止mousedown、mouseup向上冒泡 + logic: { + dynamic: true + }, + + tool: false, //自定义工具栏 + tabs: [], //导航栏 + buttons: [], //toolbar栏 + + el: { + type: "bi.button_group", + items: [], + chooseType: 0, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.PopupView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var fn = function (e) { + e.stopPropagation(); + }, stop = function (e) { + e.stopEvent(); + return false; + }; + this.element.css({ + "z-index": BI.zIndex_popup, + "min-width": o.minWidth + "px", + "max-width": o.maxWidth + "px" + }).bind({"click": fn}); + + this.element.bind("mousewheel", fn); + + o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn}); + o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop}); + this.tool = this._createTool(); + this.tab = this._createTab(); + this.view = this._createView(); + this.toolbar = this._createToolBar(); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.PopupView.EVENT_CHANGE); + } + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + scrolly: false, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap, + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, + BI.extend({ + cls: "list-view-outer bi-card bi-border" + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar) + }))) + ) + })))); + }, + + _createView: function () { + var o = this.options; + this.button_group = BI.createWidget(o.el, {type: "bi.button_group"}); + this.button_group.element.css({"min-height": o.minHeight + "px"}); + return this.button_group; + }, + + _createTool: function () { + var o = this.options; + if (false === o.tool) { + return; + } + return BI.createWidget(o.tool) + }, + + _createTab: function () { + var o = this.options; + if (o.tabs.length === 0) { + return; + } + return BI.createWidget({ + type: "bi.center", + cls: "list-view-tab", + height: 25, + items: o.tabs + }) + }, + + _createToolBar: function () { + var o = this.options; + if (o.buttons.length === 0) { + return; + } + + return BI.createWidget({ + type: "bi.center", + cls: "list-view-toolbar bi-high-light bi-border-top", + height: 30, + items: BI.createItems(o.buttons, { + once: false, + shadow: true, + isShadowShowingOnSelected: true + }) + }) + }, + + getView: function () { + return this.button_group; + }, + + populate: function (items) { + this.button_group.populate.apply(this.button_group, arguments); + }, + + resetWidth: function (w) { + this.options.width = w; + this.element.width(w); + }, + + resetHeight: function (h) { + var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 30) : 0, + tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0, + toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0); + this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) : + this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"}) + }, + + setValue: function (selectedValues) { + this.tab && this.tab.setValue(selectedValues); + this.button_group.setValue(selectedValues); + }, + + getValue: function () { + return this.button_group.getValue(); + } +}); +BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.popup_view", BI.PopupView);/** + * 搜索面板 + * + * Created by GUY on 2015/9/28. + * @class BI.SearcherView + * @extends BI.Pane + */ + +BI.SearcherView = BI.inherit(BI.Pane, { + _defaultConfig: function () { + var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-searcher-view bi-card", + tipText: BI.i18nText("BI-No_Select"), + chooseType: BI.Selection.Single, + + matcher: {//完全匹配的构造器 + type: "bi.button_group", + behaviors: { + redmark: function () { + return true; + } + }, + items: [], + layouts: [{ + type: "bi.vertical" + }] + }, + searcher: { + type: "bi.button_group", + behaviors: { + redmark: function () { + return true; + } + }, + items: [], + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.SearcherView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.matcher = BI.createWidget(o.matcher, { + type: "bi.button_group", + chooseType: o.chooseType, + behaviors: { + redmark: function () { + return true; + } + }, + layouts: [{ + type: "bi.vertical" + }] + }); + this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); + } + }); + this.spliter = BI.createWidget({ + type: "bi.vertical", + height: 1, + hgap: 10, + items: [{ + type: "bi.layout", + height: 1, + cls: "searcher-view-spliter bi-background" + }] + }); + this.searcher = BI.createWidget(o.searcher, { + type: "bi.button_group", + chooseType: o.chooseType, + behaviors: { + redmark: function () { + return true; + } + }, + layouts: [{ + type: "bi.vertical" + }] + }); + this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.matcher, this.spliter, this.searcher] + }); + }, + + startSearch: function () { + + }, + + stopSearch: function () { + + }, + + setValue: function (v) { + this.matcher.setValue(v); + this.searcher.setValue(v); + }, + + getValue: function () { + return this.matcher.getValue().concat(this.searcher.getValue()); + }, + + populate: function (searchResult, matchResult, keyword) { + searchResult || (searchResult = []); + matchResult || (matchResult = []); + this.setTipVisible(searchResult.length + matchResult.length === 0); + this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult)); + this.matcher.populate(matchResult, keyword); + this.searcher.populate(searchResult, keyword); + }, + + empty: function () { + this.searcher.empty(); + this.matcher.empty(); + }, + + hasMatched: function () { + return this.matcher.getAllButtons().length > 0; + } +}); +BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.searcher_view", BI.SearcherView);/** + * 表示当前对象 + * + * Created by GUY on 2017/5/23. + * @class BI.ListView + * @extends BI.Widget + */ +BI.ListView = BI.inherit(BI.Widget, { + props: function () { + return { + baseCls: "bi-list-view", + overscanHeight: 100, + blockSize: 10, + scrollTop: 0, + el: {}, + items: [] + }; + }, + + init: function () { + var self = this; + this.renderedIndex = -1; + this.cache = {}; + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.vertical", + items: [BI.extend({ + type: "bi.vertical", + scrolly: false, + ref: function () { + self.container = this; + } + }, o.el)], + element: this + } + }, + + mounted: function () { + var self = this, o = this.options; + this._populate(); + this.element.scroll(function (e) { + o.scrollTop = self.element.scrollTop(); + self._calculateBlocksToRender(); + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._calculateBlocksToRender(); + }); + }, + + _renderMoreIf: function () { + var self = this, o = this.options; + var height = this.element.height(); + var minContentHeight = o.scrollTop + height + o.overscanHeight; + var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, + cnt = this.renderedIndex + 1; + var lastHeight; + var getElementHeight = function () { + return self.container.element.height(); + }; + while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { + var items = o.items.slice(index, index + o.blockSize); + this.container.addItems(items); + var addedHeight = getElementHeight() - lastHeight; + this.cache[cnt] = { + index: index, + scrollTop: lastHeight, + height: addedHeight + }; + this.renderedIndex = cnt; + cnt++; + index += o.blockSize; + } + }, + + _calculateBlocksToRender: function () { + var o = this.options; + this._renderMoreIf(); + }, + + _populate: function (items) { + var o = this.options; + if (items && this.options.items !== items) { + this.options.items = items; + } + this._calculateBlocksToRender(); + this.element.scrollTop(o.scrollTop); + }, + + restore: function () { + this.renderedIndex = -1; + this.container.empty(); + this.cache = {}; + }, + + populate: function (items) { + if (items && this.options.items !== items) { + this.restore(); + } + this._populate(); + }, + + destroyed: function () { + this.restore(); + } +}); +BI.shortcut('bi.list_view', BI.ListView); + +/** + * 表示当前对象 + * + * Created by GUY on 2017/5/22. + * @class BI.VirtualList + * @extends BI.Widget + */ +BI.VirtualList = BI.inherit(BI.Widget, { + props: function () { + return { + baseCls: "bi-virtual-list", + overscanHeight: 100, + blockSize: 10, + scrollTop: 0, + items: [] + }; + }, + + init: function () { + var self = this; + this.renderedIndex = -1; + this.cache = {}; + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.vertical", + items: [{ + type: "bi.layout", + ref: function () { + self.topBlank = this; + } + }, { + type: "bi.vertical", + scrolly: false, + ref: function () { + self.container = this; + } + }, { + type: "bi.layout", + ref: function () { + self.bottomBlank = this; + } + }], + element: this + } + }, + + mounted: function () { + var self = this, o = this.options; + this._populate(); + this.element.scroll(function (e) { + o.scrollTop = self.element.scrollTop(); + self._calculateBlocksToRender(); + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._calculateBlocksToRender(); + }); + }, + + _renderMoreIf: function () { + var self = this, o = this.options; + var height = this.element.height(); + var minContentHeight = o.scrollTop + height + o.overscanHeight; + var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, + cnt = this.renderedIndex + 1; + var lastHeight; + var getElementHeight = function () { + return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height(); + }; + while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { + var items = o.items.slice(index, index + o.blockSize); + this.container.addItems(items); + var addedHeight = getElementHeight() - lastHeight; + this.cache[cnt] = { + index: index, + scrollTop: lastHeight, + height: addedHeight + }; + this.tree.set(cnt, addedHeight); + this.renderedIndex = cnt; + cnt++; + index += o.blockSize; + } + }, + + _calculateBlocksToRender: function () { + var o = this.options; + this._renderMoreIf(); + var height = this.element.height(); + var minContentHeightFrom = o.scrollTop - o.overscanHeight; + var minContentHeightTo = o.scrollTop + height + o.overscanHeight; + var start = this.tree.greatestLowerBound(minContentHeightFrom); + var end = this.tree.leastUpperBound(minContentHeightTo); + var needDestroyed = []; + for (var i = 0; i < start; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + needDestroyed.push(this.container._children[j]); + this.container._children[j] = null; + } + this.cache[i].destroyed = true; + } + } + for (var i = end + 1; i <= this.renderedIndex; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + needDestroyed.push(this.container._children[j]); + this.container._children[j] = null; + } + this.cache[i].destroyed = true; + } + } + var firstFragment = document.createDocumentFragment(), lastFragment = document.createDocumentFragment(); + var currentFragment = firstFragment; + for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + currentFragment = lastFragment; + } + if (this.cache[i].destroyed === true) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j]))); + currentFragment.appendChild(w.element[0]); + } + this.cache[i].destroyed = false; + } + } + this.container.element.prepend(firstFragment); + this.container.element.append(lastFragment); + this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop); + var lastCache = this.cache[Math.min(end, this.renderedIndex)]; + this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height); + BI.each(needDestroyed, function (i, child) { + child && child._destroy(); + }); + }, + + _populate: function (items) { + var o = this.options; + if (items && this.options.items !== items) { + this.options.items = items; + } + this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize)); + this._calculateBlocksToRender(); + this.element.scrollTop(o.scrollTop); + }, + + _clearChildren: function () { + BI.each(this.container._children, function (i, cell) { + cell && cell.el._destroy(); + }); + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + this.renderedIndex = -1; + this._clearChildren(); + this.cache = {}; + this.options.scrollTop = 0; + }, + + populate: function (items) { + if (items && this.options.items !== items) { + this.restore(); + } + this._populate(); + }, + + destroyed: function () { + this.restore(); + } +}); +BI.shortcut('bi.virtual_list', BI.VirtualList); + +/** + * 分页控件 + * + * Created by GUY on 2015/8/31. + * @class BI.Pager + * @extends BI.Widget + */ +BI.Pager = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-pager", + behaviors: {}, + layouts: [{ + type: "bi.horizontal", + hgap: 10, + vgap: 0 + }], + + dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 + //dynamicShow为false时以下两个有用 + dynamicShowFirstLast: false,//是否动态显示首页、尾页 + dynamicShowPrevNext: false,//是否动态显示上一页、下一页 + pages: false, //总页数 + curr: function () { + return 1; + }, //初始化当前页 + groups: 0, //连续显示分页数 + jump: BI.emptyFn, //分页的回调函数 + + first: false, //是否显示首页 + last: false, //是否显示尾页 + prev: "上一页", + next: "下一页", + + firstPage: 1, + lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 + return 1; + }, + hasPrev: BI.emptyFn, //pages不可用时有效 + hasNext: BI.emptyFn //pages不可用时有效 + }) + }, + _init: function () { + BI.Pager.superclass._init.apply(this, arguments); + var self = this; + this.currPage = BI.result(this.options, "curr"); + //翻页太灵敏 + // this._lock = false; + // this._debouce = BI.debounce(function () { + // self._lock = false; + // }, 300); + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options, view = [], dict = {}; + this.empty(); + var pages = BI.result(o, "pages"); + var curr = BI.result(this, "currPage"); + var groups = BI.result(o, "groups"); + var first = BI.result(o, "first"); + var last = BI.result(o, "last"); + var prev = BI.result(o, "prev"); + var next = BI.result(o, "next"); + + if (pages === false) { + groups = 0; + first = false; + last = false; + } else { + groups > pages && (groups = pages); + } + + //计算当前组 + dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); + + //当前页非首页,则输出上一页 + if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { + if (BI.isKey(prev)) { + view.push({ + text: prev, + value: "prev", + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }) + } else { + view.push(BI.extend({ + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }, prev)); + } + } + + //当前组非首组,则输出首页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { + view.push({ + text: first, + value: "first", + disabled: !(dict.index > 1 && groups !== 0) + }); + if (dict.index > 1 && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + } + + //输出当前页组 + dict.poor = Math.floor((groups - 1) / 2); + dict.start = dict.index > 1 ? curr - dict.poor : 1; + dict.end = dict.index > 1 ? (function () { + var max = curr + (groups - dict.poor - 1); + return max > pages ? pages : max; + }()) : groups; + if (dict.end - dict.start < groups - 1) { //最后一组状态 + dict.start = dict.end - groups + 1; + } + var s = dict.start, e = dict.end; + if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { + s++; + e--; + } + for (; s <= e; s++) { + if (s === curr) { + view.push({ + text: s, + value: s, + selected: true + }) + } else { + view.push({ + text: s, + value: s + }) + } + } + + //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { + if (pages > groups && dict.end < pages && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + view.push({ + text: last, + value: "last", + disabled: !(pages > groups && dict.end < pages && groups !== 0) + }) + } + + //当前页不为尾页时,输出下一页 + dict.flow = !prev && groups === 0; + if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { + view.push((function () { + if (BI.isKey(next)) { + if (pages === false) { + return {text: next, value: "next", disabled: o.hasNext(curr) === false} + } + return (dict.flow && curr === pages) + ? + {text: next, value: "next", disabled: true} + : + {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; + } else { + return BI.extend({ + disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) + }, next); + } + }())); + } + + this.button_group = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(view, { + cls: "bi-list-item-select", + height: 23, + hgap: 10 + }), + behaviors: o.behaviors, + layouts: o.layouts + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + // if (self._lock === true) { + // return; + // } + // self._lock = true; + // self._debouce(); + if (type === BI.Events.CLICK) { + var v = self.button_group.getValue()[0]; + switch (v) { + case "first": + self.currPage = 1; + break; + case "last": + self.currPage = pages; + break; + case "prev": + self.currPage--; + break; + case "next": + self.currPage++; + break; + default: + self.currPage = v; + break; + } + o.jump.apply(self, [{ + pages: pages, + curr: self.currPage + }]); + self._populate(); + self.fireEvent(BI.Pager.EVENT_CHANGE, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE); + }, + + getCurrentPage: function () { + return this.currPage; + }, + + setAllPages: function (pages) { + this.options.pages = pages; + }, + + hasPrev: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasPrev(v) : v > 1; + }, + + hasNext: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasNext(v) : v < pages; + }, + + setValue: function (v) { + var o = this.options; + v = v | 0; + v = v < 1 ? 1 : v; + if (o.pages === false) { + var lastPage = BI.result(o, "lastPage"), firstPage = 1; + this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); + } else { + v = v > o.pages ? o.pages : v; + this.currPage = v; + } + this._populate(); + }, + + getValue: function () { + var val = this.button_group.getValue()[0]; + switch (val) { + case "prev": + return -1; + case "next": + return 1; + case "first": + return BI.MIN; + case "last": + return BI.MAX; + default : + return val; + } + }, + + attr: function (key, value) { + BI.Pager.superclass.attr.apply(this, arguments); + if (key === "curr") { + this.currPage = BI.result(this.options, "curr"); + } + }, + + populate: function () { + this._populate(); + } +}); +BI.Pager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; +BI.shortcut("bi.pager", BI.Pager);/** + * 超链接 + * + * Created by GUY on 2015/9/9. + * @class BI.A + * @extends BI.Text + * @abstract + */ +BI.A = BI.inherit(BI.Text, { + _defaultConfig: function () { + var conf = BI.A.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-a display-block", + href: "", + target: "_blank", + el: null, + element: "<a/>" + }) + }, + _init: function () { + var o = this.options; + BI.A.superclass._init.apply(this, arguments); + this.element.attr({href: o.href, target: o.target}); + if (o.el) { + BI.createWidget(o.el, { + element: this + }); + } + } +}); + +BI.shortcut("bi.a", BI.A);/** + * guy + * 加载条 + * @type {*|void|Object} + */ +BI.LoadingBar = BI.inherit(BI.Single, { + consts: { + loadedText: BI.i18nText("BI-Load_More"), + endText: BI.i18nText("BI-No_More_Data") + }, + _defaultConfig: function() { + var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments); + return BI.extend( conf, { + baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips', + height: 30, + handler: BI.emptyFn + }) + }, + _init : function() { + BI.LoadingBar.superclass._init.apply(this, arguments); + var self = this; + this.loaded = BI.createWidget({ + type: "bi.text_button", + cls: "loading-text bi-list-item-simple", + text: this.consts.loadedText, + width: 120, + handler: this.options.handler + }) + this.loaded.on(BI.Controller.EVENT_CHANGE, function(type){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + + this.loading = BI.createWidget({ + type: "bi.layout", + width: this.options.height, + height:this.options.height, + cls: "loading-background cursor-default" + }) + var loaded = BI.createWidget({ + type: "bi.center_adapt", + items: [this.loaded] + }) + var loading = BI.createWidget({ + type: "bi.center_adapt", + items: [this.loading] + }) + this.cardLayout = BI.createWidget({ + type: "bi.card", + element: this, + items: [{ + el: loaded, + cardName: "loaded" + }, { + el: loading, + cardName: "loading" + }] + }) + this.invisible(); + }, + + _reset: function(){ + this.visible(); + this.loaded.setText(this.consts.loadedText); + this.loaded.enable(); + }, + + setLoaded: function(){ + this._reset(); + this.cardLayout.showCardByName("loaded"); + }, + + setEnd: function(){ + this.setLoaded(); + this.loaded.setText(this.consts.endText); + this.loaded.disable(); + }, + + setLoading: function(){ + this._reset(); + this.cardLayout.showCardByName("loading"); + } +}); + +BI.shortcut("bi.loading_bar", BI.LoadingBar);/** + * @class BI.IconButton + * @extends BI.BasicButton + * 图标的button + */ +BI.IconButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center", + iconWidth: null, + iconHeight: null + }) + }, + + _init: function () { + BI.IconButton.superclass._init.apply(this, arguments); + var o = this.options; + this.element.css({ + textAlign: 'center' + }); + this.icon = BI.createWidget({ + type: 'bi.icon', + width: o.iconWidth, + height: o.iconHeight + }); + if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { + this.element.css("lineHeight", o.height + "px"); + BI.createWidget({ + type: "bi.default", + element: this, + items: [this.icon] + }) + } else { + BI.createWidget({ + element: this, + type: 'bi.center_adapt', + items: [this.icon] + }); + } + }, + + doClick: function () { + BI.IconButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconButton.EVENT_CHANGE, this); + } + } +}); +BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE"; +BI.shortcut("bi.icon_button", BI.IconButton);/** + * 图片的button + * + * Created by GUY on 2016/1/27. + * @class BI.ImageButton + * @extends BI.BasicButton + */ +BI.ImageButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-image-button", + src: "", + iconWidth: "100%", + iconHeight: "100%" + }) + }, + + _init: function () { + BI.ImageButton.superclass._init.apply(this, arguments); + var o = this.options; + this.image = BI.createWidget({ + type: "bi.img", + width: o.iconWidth, + height: o.iconHeight, + src: o.src + }); + if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) { + BI.createWidget({ + type: "bi.center_adapt", + element: this, + items: [this.image] + }) + } else { + BI.createWidget({ + type: "bi.adaptive", + element: this, + items: [this.image], + scrollable: false + }) + } + }, + + setWidth: function (w) { + BI.ImageButton.superclass.setWidth.apply(this, arguments); + this.options.width = w; + }, + + setHeight: function (h) { + BI.ImageButton.superclass.setHeight.apply(this, arguments); + this.options.height = h; + }, + + setImageWidth: function (w) { + this.image.setWidth(w); + }, + + setImageHeight: function (h) { + this.image.setHeight(h); + }, + + getImageWidth: function () { + return this.image.element.width(); + }, + + getImageHeight: function () { + return this.image.element.height(); + }, + + setSrc: function (src) { + this.options.src = src; + this.image.setSrc(src); + }, + + getSrc: function () { + return this.image.getSrc(); + }, + + doClick: function () { + BI.ImageButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.ImageButton.EVENT_CHANGE, this); + } + } +}); +BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; +BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { + + /** + * 文字类型的按钮 + * @class BI.Button + * @extends BI.BasicButton + * + * @cfg {JSON} options 配置属性 + * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 + */ + BI.Button = BI.inherit(BI.BasicButton, { + + _defaultConfig: function (props) { + var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + ' bi-button', + minWidth: (props.block === true || props.clear === true) ? 0 : 90, + shadow: props.clear !== true, + isShadowShowingOnSelected: true, + readonly: true, + iconClass: "", + level: 'common', + block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 + clear: false, //是否去掉边框和背景 + textAlign: "center", + whiteSpace: "nowrap", + forceCenter: false, + textWidth: null, + textHeight: null, + hgap: props.clear ? 0 : 10, + vgap: 0, + tgap: 0, + bgap: 0, + lgap: 0, + rgap: 0 + }) + }, + + _init: function () { + BI.Button.superclass._init.apply(this, arguments); + var o = this.options, self = this; + if (BI.isNumber(o.height) && !o.clear && !o.block) { + this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); + } else { + this.element.css({lineHeight: o.height + "px"}); + } + if (BI.isKey(o.iconClass)) { + this.icon = BI.createWidget({ + type: "bi.icon", + width: 18 + }); + this.text = BI.createWidget({ + type: "bi.label", + text: o.text, + value: o.value + }); + BI.createWidget({ + type: "bi.horizontal_auto", + cls: "button-" + o.level + " " + o.iconClass, + element: this, + hgap: o.hgap, + vgap: o.vgap, + tgap: o.tgap, + bgap: o.bgap, + lgap: o.lgap, + rgap: o.rgap, + items: [{ + type: "bi.horizontal", + items: [this.icon, this.text] + }] + }) + } else { + this.text = BI.createWidget({ + type: "bi.label", + cls: "button-" + o.level, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + forceCenter: o.forceCenter, + textWidth: o.textWidth, + textHeight: o.textHeight, + hgap: o.hgap, + vgap: o.vgap, + tgap: o.tgap, + bgap: o.bgap, + lgap: o.lgap, + rgap: o.rgap, + element: this, + text: o.text, + value: o.value + }); + } + if (o.block === true) { + this.element.addClass("block"); + } + if (o.clear === true) { + this.element.addClass("clear"); + } + if (o.minWidth > 0) { + this.element.css({"min-width": o.minWidth + "px"}); + } + }, + + doClick: function () { + BI.Button.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.Button.EVENT_CHANGE, this); + } + }, + + setText: function (text) { + BI.Button.superclass.setText.apply(this, arguments); + this.text.setText(text); + }, + + setValue: function (text) { + BI.Button.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.text.setValue(text); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + destroy: function () { + BI.Button.superclass.destroy.apply(this, arguments); + } + }); + BI.shortcut('bi.button', BI.Button); + BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; +})(jQuery);/** + * guy + * 可以点击的一行文字 + * @class BI.TextButton + * @extends BI.BasicButton + * 文字button + */ +BI.TextButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-button", + textAlign: "center", + whiteSpace: "nowrap", + forceCenter: false, + textWidth: null, + textHeight: null, + hgap: 0, + lgap: 0, + rgap: 0, + text: "", + py: "" + }) + }, + + _init: function () { + BI.TextButton.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textWidth: o.textWidth, + textHeight: o.textHeight, + forceCenter: o.forceCenter, + width: o.width, + height: o.height, + hgap: o.hgap, + lgap: o.lgap, + rgap: o.rgap, + text: o.text, + value: o.value, + py: o.py + }); + }, + + doClick: function () { + BI.TextButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (text) { + BI.TextButton.superclass.setText.apply(this, arguments); + text = BI.isArray(text) ? text.join(",") : text; + this.text.setText(text); + }, + + setStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (text) { + BI.TextButton.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + text = BI.isArray(text) ? text.join(",") : text; + this.text.setValue(text); + } + } +}); +BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_button", BI.TextButton);/** + * 带有一个占位 + * + * Created by GUY on 2015/9/11. + * @class BI.BlankIconIconTextItem + * @extends BI.BasicButton + */ +BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconIconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + var blank = BI.createWidget({ + type: "bi.layout", + width: o.blankWidth + }) + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon1 = BI.createWidget({ + type: "bi.icon_button", + cls: o.iconCls1, + forceNotSelected: true, + width: c.commonWidth + }); + this.icon2 = BI.createWidget({ + type: "bi.icon_button", + cls: o.iconCls2, + forceNotSelected: true, + width: c.commonWidth + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) + })))); + }, + + doClick: function () { + BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setSelected: function (b) { + BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments); + this.icon1.setSelected(b); + this.icon2.setSelected(b); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/** + * guy + * 一个占位符和两个icon和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/15. + * @class BI.BlankIconTextIconItem + * @extends BI.BasicButton + */ +BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-icon-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconTextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.layout", + width: o.blankWidth + }, icon1, this.text, { + type: "bi.layout", + width: c.commonWidth + }) + })))); + }, + + doClick: function () { + BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/** + * 带有一个占位 + * + * Created by GUY on 2015/9/11. + * @class BI.BlankIconTextItem + * @extends BI.BasicButton + */ +BI.BlankIconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", + logic: { + dynamic: false + }, + cls: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + var blank = BI.createWidget({ + type: "bi.layout", + width: o.blankWidth + }) + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) + })))); + }, + + doClick: function () { + BI.BlankIconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/** + * guy + * 两个icon和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/9. + * @class BI.IconTextIconItem + * @extends BI.BasicButton + */ +BI.IconTextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-icon-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + var blank = BI.createWidget({ + type: "bi.layout", + width: c.commonWidth + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) + })))); + }, + + doClick: function () { + BI.IconTextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/** + * guy + * + * Created by GUY on 2015/9/9. + * @class BI.IconTextItem + * @extends BI.BasicButton + */ +BI.IconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-item", + direction: BI.Direction.Left, + logic: { + dynamic: false + }, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) + })))); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doClick: function () { + BI.IconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_item", BI.IconTextItem);/** + * + * 图标的button + * + * Created by GUY on 2015/9/9. + * @class BI.TextIconItem + * @extends BI.BasicButton + */ +BI.TextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-icon-item", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) + })))); + }, + + doClick: function () { + BI.TextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_icon_item", BI.TextIconItem);/** + * guy + * 一个button和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/9. + * @class BI.TextItem + * @extends BI.BasicButton + */ +BI.TextItem = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-item", + textAlign: "left", + whiteSpace: "nowrap", + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextItem.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, + height: o.height, + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + py: o.py + }); + }, + + doClick: function () { + BI.TextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_item", BI.TextItem);/** + * guy + * Created by GUY on 2015/9/9. + * @class BI.IconTextIconNode + * @extends BI.NodeButton + */ +BI.IconTextIconNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-icon-node", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextIconNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + var blank = BI.createWidget({ + type: "bi.layout", + width: c.commonWidth + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) + })))); + }, + + doClick: function () { + BI.IconTextIconNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/** + * guy + * Created by GUY on 2015/9/9. + * @class BI.IconTextNode + * @extends BI.NodeButton + */ +BI.IconTextNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-node", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) + })))); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doClick: function () { + BI.IconTextNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + } +}); +BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_node", BI.IconTextNode);/** + * Created by GUY on 2015/9/9. + * @class BI.TextIconNode + * @extends BI.NodeButton + */ +BI.TextIconNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-icon-node", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextIconNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) + })))); + }, + + doClick: function () { + BI.TextIconNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + } +}); +BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_icon_node", BI.TextIconNode);/** + * guy + * + * Created by GUY on 2015/9/9. + * @class BI.TextNode + * @extends BI.NodeButton + */ +BI.TextNode = BI.inherit(BI.NodeButton, { + + _defaultConfig: function () { + var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-node", + textAlign: "left", + whiteSpace: "nowrap", + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextNode.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, + height: o.height, + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + py: o.py + }); + }, + + doClick: function () { + BI.TextNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_node", BI.TextNode);/** + * + * Created by GUY on 2016/1/15. + * @class BI.CodeEditor + * @extends BI.Single + */ +BI.CodeEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-code-editor bi-card', + value: '', + watermark: "", + lineHeight: 2, + readOnly: false, + //参数显示值构造函数 + paramFormatter: function (v) { + return v; + } + }); + }, + _init: function () { + BI.CodeEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.editor = CodeMirror(this.element[0], { + textWrapping: true, + lineWrapping: true, + lineNumbers: false, + readOnly: o.readOnly + }); + o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); + this.editor.on("change", function (cm, change) { + BI.nextTick(function () { + self.fireEvent(BI.CodeEditor.EVENT_CHANGE) + }); + }); + + this.editor.on("focus", function () { + self.watermark.setVisible(false); + self.fireEvent(BI.CodeEditor.EVENT_FOCUS); + }); + + this.editor.on("blur", function () { + self.watermark.setVisible(BI.isEmptyString(self.getValue())); + self.fireEvent(BI.CodeEditor.EVENT_BLUR); + }); + + // this.editor.on("blur", function () { + // self.editor.execCommand("goLineEnd"); + // }); + + //水印 + this.watermark = BI.createWidget({ + type: "bi.label", + text: o.watermark, + cls: "bi-water-mark", + whiteSpace: "nowrap", + textAlign: "left" + }); + this.watermark.element.bind( + "mousedown", function (e) { + self.insertString(""); + self.editor.focus(); + e.stopEvent(); + } + ); + this.watermark.element.bind("click", function (e) { + self.editor.focus(); + e.stopEvent(); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.watermark, + top: 0, + left: 5 + }] + }); + + if (BI.isKey(o.value)) { + BI.nextTick(function () { + self.setValue(o.value); + }); + } + }, + + _setEnable: function (b) { + BI.CodeEditor.superclass._setEnable.apply(this, arguments); + this.editor.setOption("readOnly", b === true ? false : "nocursor") + }, + + _checkWaterMark: function () { + var o = this.options; + if (BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + insertParam: function (param) { + var value = param; + param = this.options.paramFormatter(param); + var from = this.editor.getCursor(); + this.editor.replaceSelection(param); + var to = this.editor.getCursor(); + var options = {className: 'param', atomic: true}; + if (BI.isNotNull(param.match(/^<!.*!>$/))) { + options.className = 'error-param'; + } + options.value = value; + this.editor.markText(from, to, options); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + insertString: function (str) { + this.editor.replaceSelection(str); + this.editor.focus(); + }, + + getValue: function () { + return this.editor.getValue("\n", function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "param": + case "error-param": + var fieldNameLength = i.to - i.from; + value = value.substr(0, i.from + num) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length); + //加上${}的偏移 + num += 3; + //加上实际值和显示值的长度差的偏移 + num += (i.marker.value.length - fieldNameLength); + break; + } + }); + return value; + }); + }, + + _analyzeContent: function (v) { + var regx = /\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g; + return v.match(regx); + }, + + setValue: function (v) { + var self = this, result; + this.refresh(); + self.editor.setValue(""); + result = this._analyzeContent(v || ""); + BI.each(result, function (i, item) { + var fieldRegx = /\$[\{][^\}]*[\}]/; + var str = item.match(fieldRegx); + if (BI.isNotEmptyArray(str)) { + self.insertParam(str[0].substring(2, item.length - 1)); + } else { + self.insertString(item); + } + }); + this._checkWaterMark(); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.getInputField().blur(); + }, + + setStyle: function (style) { + this.style = style; + this.element.css(style); + }, + + getStyle: function () { + return this.style; + }, + + refresh: function () { + var self = this; + BI.nextTick(function () { + self.editor.refresh(); + }); + } +}); +BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.code_editor", BI.CodeEditor);/** + * Created by GUY on 2015/4/15. + * @class BI.Editor + * @extends BI.Single + */ +BI.Editor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + //title,warningTitle这两个属性没用 + tipType: "warning", + inputType: "text", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: false, + watermark: "", + errorText: "" + }) + }, + + _init: function () { + BI.Editor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = this.addWidget(BI.createWidget({ + type: "bi.input", + element: "<input type='" + o.inputType + "'/>", + root: true, + watermark: o.watermark, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank + })); + this.editor.element.css({ + "width": "100%", + "height": "100%", + "border": "none", + "outline": "none", + "padding": "0", + "margin": "0" + }); + if (BI.isKey(this.options.watermark)) { + this.watermark = BI.createWidget({ + type: "bi.label", + cls: "bi-water-mark", + text: this.options.watermark, + forceCenter: true, + height: o.height - 2 * (o.vgap + o.tgap), + whiteSpace: "nowrap", + textAlign: "left" + }); + this.watermark.element.bind({ + mousedown: function (e) { + if (self.isEnabled()) { + self.editor.isEditing() || self.editor.focus(); + } else { + self.editor.isEditing() && self.editor.blur(); + } + e.stopEvent(); + } + }); + this.watermark.element.bind("click", function (e) { + if (self.isEnabled()) { + self.editor.isEditing() || self.editor.focus(); + } else { + self.editor.isEditing() && self.editor.blur(); + } + e.stopEvent(); + }); + this.watermark.element.css({ + position: "absolute", + left: "3px", + right: "3px", + top: "0px", + bottom: "0px" + }); + } + var items = [{ + el: { + type: "bi.default", + items: this.watermark ? [this.editor, this.watermark] : [this.editor] + }, + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }]; + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: items + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Input.EVENT_FOCUS, function () { + self._checkError(); + self.element.addClass("bi-editor-focus"); + self.fireEvent(BI.Editor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Input.EVENT_BLUR, function () { + self.setErrorVisible(false); + self.element.removeClass("bi-editor-focus"); + self.fireEvent(BI.Editor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Input.EVENT_CLICK, function () { + self.fireEvent(BI.Editor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Input.EVENT_CHANGE, function () { + self.fireEvent(BI.Editor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); + }); + this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) { + self.watermark && self.watermark.invisible(); + }); + + this.editor.on(BI.Input.EVENT_VALID, function () { + self._checkWaterMark(); + self.setErrorVisible(false); + self.fireEvent(BI.Editor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Input.EVENT_ERROR, function () { + self._checkWaterMark(); + self.fireEvent(BI.Editor.EVENT_ERROR, arguments); + self.setErrorVisible(self.isEditing()); + }); + this.editor.on(BI.Input.EVENT_RESTRICT, function () { + self._checkWaterMark(); + var tip = self.setErrorVisible(true); + tip && tip.element.fadeOut(100, function () { + tip.element.fadeIn(100); + }); + self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Input.EVENT_EMPTY, function () { + self._checkWaterMark(); + self.fireEvent(BI.Editor.EVENT_EMPTY, arguments); + }); + this.editor.on(BI.Input.EVENT_ENTER, function () { + self.fireEvent(BI.Editor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Input.EVENT_SPACE, function () { + self.fireEvent(BI.Editor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Input.EVENT_BACKSPACE, function () { + self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments); + }); + this.editor.on(BI.Input.EVENT_REMOVE, function () { + self.fireEvent(BI.Editor.EVENT_REMOVE, arguments); + }); + this.editor.on(BI.Input.EVENT_START, function () { + self.fireEvent(BI.Editor.EVENT_START, arguments); + }); + this.editor.on(BI.Input.EVENT_PAUSE, function () { + self.fireEvent(BI.Editor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Input.EVENT_STOP, function () { + self.fireEvent(BI.Editor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Input.EVENT_CONFIRM, function () { + self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments); + }); + this.element.click(function (e) { + e.stopPropagation(); + return false; + }); + if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) { + this.setValue(this.options.value); + } else { + this._checkWaterMark(); + } + }, + + _checkToolTip: function () { + var o = this.options; + var errorText = o.errorText; + if (BI.isFunction(errorText)) { + errorText = errorText(this.editor.getValue()); + } + if (BI.isKey(errorText)) { + if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) { + this.setTitle(""); + } else { + this.setTitle(errorText); + } + } + }, + + _checkError: function () { + this.setErrorVisible(this.isEnabled() && !this.isValid()); + this._checkToolTip(); + }, + + _checkWaterMark: function () { + var o = this.options; + if (!this.disabledWaterMark && this.editor.getValue() === "" && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + setErrorText: function (text) { + this.options.errorText = text; + }, + + getErrorText: function () { + return this.options.errorText; + }, + + setErrorVisible: function (b) { + var o = this.options; + var errorText = o.errorText; + if (BI.isFunction(errorText)) { + errorText = errorText(this.editor.getValue()); + } + if (!this.disabledError && BI.isKey(errorText)) { + BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this); + this._checkToolTip(); + return BI.Bubbles.get(this.getName()); + } + }, + + disableError: function () { + this.disabledError = true; + this._checkError(); + }, + + enableError: function () { + this.disabledError = false; + this._checkError(); + }, + + disableWaterMark: function () { + this.disabledWaterMark = true; + this._checkWaterMark(); + }, + + enableWaterMark: function () { + this.disabledWaterMark = false; + this._checkWaterMark(); + }, + + focus: function () { + this.element.addClass("text-editor-focus"); + this.editor.focus(); + }, + + blur: function () { + this.element.removeClass("text-editor-focus"); + this.editor.blur(); + }, + + selectAll: function () { + this.editor.selectAll(); + }, + + onKeyDown: function (k) { + this.editor.onKeyDown(k); + }, + + setValue: function (v) { + BI.Editor.superclass.setValue.apply(this, arguments); + this.editor.setValue(v); + this._checkError(); + this._checkWaterMark(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + resetLastValidValue: function () { + this.editor.resetLastValidValue(); + }, + + getValue: function () { + if (!this.isValid()) { + return BI.trim(this.editor.getLastValidValue()); + } + return BI.trim(this.editor.getValue()); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Editor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.Editor.EVENT_BLUR = "EVENT_BLUR"; +BI.Editor.EVENT_CLICK = "EVENT_CLICK"; +BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.Editor.EVENT_SPACE = "EVENT_SPACE"; +BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.Editor.EVENT_START = "EVENT_START"; +BI.Editor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Editor.EVENT_STOP = "EVENT_STOP"; +BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.Editor.EVENT_VALID = "EVENT_VALID"; +BI.Editor.EVENT_ERROR = "EVENT_ERROR"; +BI.Editor.EVENT_ENTER = "EVENT_ENTER"; +BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.Editor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.Editor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.editor", BI.Editor);/** + * 多文件 + * + * Created by GUY on 2016/4/13. + * @class BI.MultifileEditor + * @extends BI.Single + * @abstract + */ +BI.MultifileEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-multifile-editor", + multiple: false, + maxSize: -1,//1024 * 1024 + accept: "", + url: "" + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.MultifileEditor.superclass._init.apply(this, arguments); + this.file = BI.createWidget({ + type: "bi.file", + cls: "multifile-editor", + width: "100%", + height: "100%", + name: o.name, + url: o.url, + multiple: o.multiple, + accept: o.accept, + maxSize: o.maxSize + }); + this.file.on(BI.File.EVENT_CHANGE, function () { + self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments); + }); + this.file.on(BI.File.EVENT_UPLOADSTART, function () { + self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments); + }); + this.file.on(BI.File.EVENT_ERROR, function () { + self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments); + }); + this.file.on(BI.File.EVENT_PROGRESS, function () { + self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments); + }); + this.file.on(BI.File.EVENT_UPLOADED, function () { + self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments); + }); + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.adaptive", + scrollable: false, + items: [this.file] + }, + top: 0, + right: 0, + left: 0, + bottom: 0 + }] + }); + }, + + select: function () { + this.file.select(); + }, + + getValue: function () { + return this.file.getValue(); + }, + + upload: function () { + this.file.upload(); + }, + + reset: function () { + this.file.reset(); + } +}); +BI.MultifileEditor.EVENT_CHANGE = "MultifileEditor.EVENT_CHANGE"; +BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART"; +BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR"; +BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS"; +BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED"; +BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/** + * + * Created by GUY on 2016/1/18. + * @class BI.TextAreaEditor + * @extends BI.Single + */ +BI.TextAreaEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-textarea-editor bi-card', + value: '' + }); + }, + _init: function () { + BI.TextAreaEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.content = BI.createWidget({ + type: "bi.layout", + tagName: "textarea", + width: "100%", + height: "100%", + cls: "bi-textarea textarea-editor-content display-block" + }); + this.content.element.css({"resize": "none"}); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.adaptive", + items: [this.content] + }, + left: 0, + right: 3, + top: 0, + bottom: 5 + }] + }); + + this.content.element.on("input propertychange", function (e) { + self._checkWaterMark(); + self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE); + }); + + this.content.element.focus(function () { + if (self.isValid()) { + self._focus(); + self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); + } + $(document).bind("mousedown." + self.getName(), function (e) { + if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { + $(document).unbind("mousedown." + self.getName()); + self.content.element.blur(); + } + }); + }); + this.content.element.blur(function () { + if (self.isValid()) { + self._blur(); + self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); + } + $(document).unbind("mousedown." + self.getName()); + }); + if (BI.isKey(o.value)) { + self.setValue(o.value); + } + if (BI.isNotNull(o.style)) { + self.setValue(o.style); + } + this._checkWaterMark(); + }, + + _checkWaterMark: function () { + var self = this, o = this.options; + var val = this.getValue(); + if (BI.isNotEmptyString(val)) { + this.watermark && this.watermark.destroy(); + this.watermark = null; + } else { + if (BI.isNotEmptyString(o.watermark)) { + if (!this.watermark) { + this.watermark = BI.createWidget({ + type: "bi.text_button", + cls: "bi-water-mark", + textAlign: "left", + height: 30, + text: o.watermark, + invalid: o.invalid, + disabled: o.disabled + }); + this.watermark.on(BI.TextButton.EVENT_CHANGE, function () { + self.focus(); + }); + BI.createWidget({ + type: 'bi.absolute', + element: this, + items: [{ + el: this.watermark, + left: 0, + top: 0, + right: 0 + }] + }) + } else { + this.watermark.setText(o.watermark); + this.watermark.setValid(!o.invalid); + this.watermark.setEnable(!o.disabled); + } + } + } + }, + + _focus: function () { + this.content.element.addClass("textarea-editor-focus"); + this._checkWaterMark(); + }, + + _blur: function () { + this.content.element.removeClass("textarea-editor-focus"); + this._checkWaterMark(); + }, + + focus: function () { + this._focus(); + this.content.element.focus(); + }, + + blur: function () { + this._blur(); + this.content.element.blur(); + }, + + getValue: function () { + return this.content.element.val(); + }, + + setValue: function (value) { + this.content.element.val(value); + this._checkWaterMark(); + }, + + setStyle: function (style) { + this.style = style; + this.element.css(style); + this.content.element.css(BI.extend({}, style, { + color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor) + })) + }, + + getStyle: function () { + return this.style; + }, + + _setValid: function (b) { + BI.TextAreaEditor.superclass._setValid.apply(this, arguments); + // this.content.setValid(b); + // this.watermark && this.watermark.setValid(b); + } +}); +BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/** + * guy 图标 + * @class BI.Icon + * @extends BI.Single + */ +BI.Icon = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + tagName: "i", + baseCls: (conf.baseCls || "") + " x-icon b-font horizon-center display-block" + }) + }, + _init: function () { + BI.Icon.superclass._init.apply(this, arguments); + if (BI.isIE9Below()) { + this.element.addClass("hack"); + } + } +}); +BI.shortcut("bi.icon", BI.Icon);/** + * @class BI.Iframe + * @extends BI.Single + * @abstract + * Created by GameJian on 2016/3/2. + */ +BI.Iframe = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-iframe", + src: "", + width: "100%", + height: "100%" + }) + }, + + _init: function () { + var o = this.options; + this.options.element = $("<iframe frameborder='0' src='" + o.src + "'>"); + BI.Iframe.superclass._init.apply(this, arguments); + }, + + setSrc: function (src) { + this.options.src = src; + this.element.attr("src", src); + }, + + getSrc: function () { + return this.options.src; + }, + + setName: function (name) { + this.options.name = name; + this.element.attr("name", name); + }, + + getName: function () { + return this.options.name; + }, + + getWidth: function () { + return this.options.width + }, + + getHeight: function () { + return this.options.height + } +}); + +BI.shortcut("bi.iframe", BI.Iframe);/** + * ͼƬ + * + * Created by GUY on 2016/1/26. + * @class BI.Img + * @extends BI.Single + * @abstract + */ +BI.Img = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Img.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-img display-block", + src: "", + width: "100%", + height: "100%" + }) + }, + + _init: function () { + var o = this.options; + this.options.element = $("<img src='" + o.src + "'>"); + BI.Img.superclass._init.apply(this, arguments); + }, + + setSrc: function (src) { + this.options.src = src; + this.element.attr("src", src); + }, + + getSrc: function () { + return this.options.src; + } +}); + +BI.shortcut("bi.img", BI.Img); +/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Checkbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.Checkbox.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-checkbox check-box-icon", + selected: false, + handler: BI.emptyFn, + width: 16, + height: 16, + iconWidth: 16, + iconHeight: 16 + }) + }, + + _init : function() { + BI.Checkbox.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.Checkbox.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.Checkbox.EVENT_CHANGE); + } + } +}); +BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE"; + +BI.shortcut("bi.checkbox", BI.Checkbox);/** + * 文件 + * + * Created by GUY on 2016/1/27. + * @class BI.File + * @extends BI.Single + * @abstract + */ +(function () { + + /** + * @description normalize input.files. create if not present, add item method if not present + * @param Object generated wrap object + * @return Object the wrap object itself + */ + var F = (function (item) { + return function (input) { + var files = input.files || [input]; + if (!files.item) { + files.item = item; + } + return files; + }; + })(function (i) { + return this[i]; + }); + + var event = { + + /** + * @description add an event via addEventListener or attachEvent + * @param DOMElement the element to add event + * @param String event name without "on" (e.g. "mouseover") + * @param Function the callback to associate as event + * @return Object noswfupload.event + */ + add: document.addEventListener ? + function (node, name, callback) { + node.addEventListener(name, callback, false); + return this; + } : + function (node, name, callback) { + node.attachEvent("on" + name, callback); + return this; + }, + + /** + * @description remove an event via removeEventListener or detachEvent + * @param DOMElement the element to remove event + * @param String event name without "on" (e.g. "mouseover") + * @param Function the callback associated as event + * @return Object noswfupload.event + */ + del: document.removeEventListener ? + function (node, name, callback) { + node.removeEventListener(name, callback, false); + return this; + } : + function (node, name, callback) { + node.detachEvent("on" + name, callback); + return this; + }, + + /** + * @description to block event propagation and prevent event default + * @param void generated event or undefined + * @return Boolean false + */ + stop: function (e) { + if (!e) { + if (self.event) { + event.returnValue = !(event.cancelBubble = true); + } + } else { + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; + e.preventDefault ? e.preventDefault() : e.returnValue = false; + } + ; + return false; + } + }; + + var sendFile = (function (toString) { + var multipart = function (boundary, name, file) { + return "--".concat( + boundary, CRLF, + 'Content-Disposition: form-data; name="', name, '"; filename="', BI.cjkEncode(file.fileName), '"', CRLF, + "Content-Type: application/octet-stream", CRLF, + CRLF, + file.getAsBinary(), CRLF, + "--", boundary, "--", CRLF + ); + }, + isFunction = function (Function) { + return toString.call(Function) === "[object Function]"; + }, + split = "onabort.onerror.onloadstart.onprogress".split("."), + length = split.length, + CRLF = "\r\n", + xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), + sendFile; + + // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work) + if (xhr.upload || xhr.sendAsBinary) { + sendFile = function (handler, maxSize, width, height) { + if (-1 < maxSize && maxSize < handler.file.fileSize) { + if (isFunction(handler.onerror)) { + handler.onerror(); + } + return; + } + for (var + xhr = new XMLHttpRequest, + upload = xhr.upload || { + addEventListener: function (event, callback) { + this["on" + event] = callback + } + }, + i = 0; + i < length; + i++ + ) { + upload.addEventListener( + split[i].substring(2), + (function (event) { + return function (rpe) { + if (isFunction(handler[event])) { + handler[event](rpe, xhr); + } + }; + })(split[i]), + false + ); + } + upload.addEventListener( + "load", + function (rpe) { + if (handler.onreadystatechange === false) { + if (isFunction(handler.onload)) { + handler.onload(rpe, xhr); + } + } else { + setTimeout(function () { + if (xhr.readyState === 4) { + if (isFunction(handler.onload)) { + handler.onload(rpe, xhr); + } + } else { + setTimeout(arguments.callee, 15); + } + }, 15); + } + }, + false + ); + xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true); + if (!xhr.upload) { + var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true}; + rpe.interval = setInterval(function () { + rpe.loaded += 1024 / 4; + if (rpe.total <= rpe.loaded) { + rpe.loaded = rpe.total; + } + upload.onprogress(rpe); + }, 100); + xhr.onabort = function () { + upload.onabort({}); + }; + xhr.onerror = function () { + upload.onerror({}); + }; + xhr.onreadystatechange = function () { + switch (xhr.readyState) { + case 2: + case 3: + if (rpe.total <= rpe.loaded) + rpe.loaded = rpe.total; + upload.onprogress(rpe); + break; + case 4: + clearInterval(rpe.interval); + rpe.interval = 0; + rpe.loaded = rpe.total; + upload.onprogress(rpe); + if (199 < xhr.status && xhr.status < 400) { + upload["onload"]({}); + var attachO = BI.jsonDecode(xhr.responseText); + attachO.filename = handler.file.fileName; + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + handler.attach_array.push(attachO); + } else { + upload["onerror"]({}); + } + break; + } + }; + upload.onloadstart(rpe); + } else { + xhr.onreadystatechange = function () { + switch (xhr.readyState) { + case 4: + var attachO = BI.jsonDecode(xhr.responseText); + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + attachO.filename = handler.file.fileName; + if (handler.maxlength == 1) { + handler.attach_array[0] = attachO; + // handler.attach_array.push(attachO); + } else { + handler.attach_array.push(attachO); + } + break; + } + } + } + var boundary = "AjaxUploadBoundary" + (new Date).getTime(); + xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary); + if (handler.file.getAsBinary) { + xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file)); + } else { + xhr.setRequestHeader("Content-Type", "multipart/form-data"); +// xhr.setRequestHeader("X-Name", handler.name); +// xhr.setRequestHeader("X-File-Name", handler.file.fileName); + var form = new FormData(); + form.append("FileData", handler.file); + xhr.send(form); + } + return handler; + }; + } + // Internet Explorer, Opera, others + else { + sendFile = function (handler, maxSize, width, height) { + var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), + rpe = { + loaded: 1, total: 100, simulation: true, interval: setInterval(function () { + if (rpe.loaded < rpe.total) + ++rpe.loaded; + if (isFunction(handler.onprogress)) + handler.onprogress(rpe, {}); + }, 100) + }, + onload = function () { + iframe.onreadystatechange = iframe.onload = iframe.onerror = null; + form.parentNode.removeChild(form); + form = null; + clearInterval(rpe.interval); + //rpe.loaded = rpe.total; + try { + var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML; + var attachO = BI.jsonDecode(responseText); + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + + //attachO.fileSize = responseText.length; + attachO.filename = BI.cjkDecode(handler.file.fileName); + if (handler.maxlength == 1) { + handler.attach_array[0] = attachO; + } else { + handler.attach_array.push(attachO); + } + } catch (e) { + if (isFunction(handler.onerror)) + handler.onerror(rpe, event || window.event); + } + if (isFunction(handler.onload)) + handler.onload(rpe, {responseText: responseText}); + }, + target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); + try { // IE < 8 does not accept enctype attribute ... + var form = document.createElement('<form enctype="multipart/form-data"></form>'), + iframe = handler.iframe || (handler.iframe = document.createElement('<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>')); + } catch (e) { + var form = document.createElement('form'), + iframe = handler.iframe || (handler.iframe = document.createElement("iframe")); + form.setAttribute("enctype", "multipart/form-data"); + iframe.setAttribute("name", iframe.id = target); + iframe.setAttribute("src", url); + } + iframe.style.position = "absolute"; + iframe.style.left = iframe.style.top = "-10000px"; + iframe.onload = onload; + iframe.onerror = function (event) { + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || window.event); + } + }; + iframe.onreadystatechange = function () { + if (/loaded|complete/i.test(iframe.readyState)) { + onload(); + + //wei : todo,将附件信息放到handler.attach + } + else if (isFunction(handler.onloadprogress)) { + if (rpe.loaded < rpe.total) { + ++rpe.loaded; + } + handler.onloadprogress(rpe, { + readyState: { + loading: 2, + interactive: 3, + loaded: 4, + complete: 4 + }[iframe.readyState] || 1 + }); + } + }; + form.setAttribute("action", handler.url); + form.setAttribute("target", iframe.id); + form.setAttribute("method", "post"); + form.appendChild(handler.file); + form.style.display = "none"; + if (isFunction(handler.onloadstart)) { + handler.onloadstart(rpe, {}); + } + with (document.body || document.documentElement) { + appendChild(iframe); + appendChild(form); + form.submit(); + } + ; + return handler; + }; + } + xhr = null; + return sendFile; + })(Object.prototype.toString); + + var sendFiles = function (handler, maxSize, width, height) { + + var length = handler.files.length, + i = 0, + onload = handler.onload, + onloadstart = handler.onloadstart; + handler.current = 0; + handler.total = 0; + handler.sent = 0; + while (handler.current < length) { + handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size); + handler.current++; + } + handler.current = 0; + if (length && handler.files[0].fileSize !== -1) { + handler.file = handler.files[handler.current]; + + sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { + handler.onloadstart = null; + handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size); + if (++handler.current < length) { + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = arguments.callee; + } else if (onload) { + handler.onloadstart = onloadstart; + handler.onload = onload; + handler.onload(rpe, xhr); + } + }; + } else if (length) { + handler.total = length * 100; + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { + var callee = arguments.callee; + handler.onloadstart = null; + handler.sent += 100; + if (++handler.current < length) { + if (/\b(chrome|safari)\b/i.test(navigator.userAgent)) { + handler.iframe.parentNode.removeChild(handler.iframe); + handler.iframe = null; + } + setTimeout(function () { + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = callee; + }, 15); + } else if (onload) { + setTimeout(function () { + handler.iframe.parentNode.removeChild(handler.iframe); + handler.iframe = null; + handler.onloadstart = onloadstart; + handler.onload = onload; + handler.onload(rpe, xhr); + }, 15); + } + }; + } + return handler; + }; + + BI.File = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.File.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-file display-block", + element: "<input type='file'>", + name: "", + url: "", + multiple: true, + accept: "", /**'*.jpg; *.zip'**/ + maxSize: -1 //1024 * 1024 + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.File.superclass._init.apply(this, arguments); + if (o.multiple === true) { + this.element.attr("multiple", "multiple"); + } + this.element.attr("name", o.name || this.getName()); + + BI.nextTick(function () { + // create the noswfupload.wrap Object + // wrap.maxSize 文件大小限制 + // wrap.maxlength 文件个数限制 + var _wrap = self.wrap = self._wrap(self.element[0], o.maxSize); + // fileType could contain whatever text but filter checks *.{extension} + // if present + + // handlers + + _wrap.onloadstart = function (rpe, xhr) { + //BI.Msg.toast("loadstart"); + self.fireEvent(BI.File.EVENT_UPLOADSTART); + }; + + _wrap.onprogress = function (rpe, xhr) { + //BI.Msg.toast("onprogress"); + // percent for each bar + + // fileSize is -1 only if browser does not support file info access + // this if splits recent browsers from others + if (this.file.fileSize !== -1) { + // simulation property indicates when the progress event is fake + if (rpe.simulation) { + + } else { + + } + } else { + // if fileSIze is -1 browser is using an iframe because it does + // not support + // files sent via Ajax (XMLHttpRequest) + // We can still show some information + } + self.fireEvent(BI.File.EVENT_PROGRESS, { + file: this.file, + total: rpe.total, + loaded: rpe.loaded, + simulation: rpe.simulation + }); + }; + + // generated if there is something wrong during upload + _wrap.onerror = function () { + // just inform the user something was wrong + self.fireEvent(BI.File.EVENT_ERROR); + }; + + // generated when every file has been sent (one or more, it does not + // matter) + _wrap.onload = function (rpe, xhr) { + var self_ = this; + // just show everything is fine ... + // ... and after a second reset the component + setTimeout(function () { + self_.clean(); // remove files from list + self_.hide(); // hide progress bars and enable input file + + //BI.Msg.toast("onload"); + self.fireEvent(BI.File.EVENT_UPLOADED); + // enable again the submit button/element + }, 1000); + }; + _wrap.url = o.url ? o.url : BI.servletURL + + '?op=fr_attach&cmd=ah_upload'; + _wrap.fileType = o.accept; //文件类型限制 + _wrap.attach_array = []; + _wrap.attach_names = []; + _wrap.attachNum = 0; + }); + }, + + _events: function (wrap) { + var self = this; + event.add(wrap.dom.input, "change", function () { + event.del(wrap.dom.input, "change", arguments.callee); + for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) { + var item = files.item(i); + var tempFile = item.value || item.name; + var value = item.fileName || (item.fileName = tempFile.split("\\").pop()), + ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown", + size = item.fileSize || item.size; + if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { + //文件类型不支持 + BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); + self.fireEvent(BI.File.EVENT_ERROR, { + errorType: 0, + file: item + }); + } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { + //文件大小不支持 + BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); + self.fireEvent(BI.File.EVENT_ERROR, { + errorType: 1, + file: item + }); + } else { + wrap.files.unshift(item); + //BI.Msg.toast(value); + self.fireEvent(BI.File.EVENT_CHANGE, { + file: item + }); + } + } + input.value = ""; + wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input); + wrap.dom.input = input; + event.add(wrap.dom.input, "change", arguments.callee); + }); + return wrap; + }, + + _wrap: function () { + var self = this, o = this.options; + // be sure input accept multiple files + var input = this.element[0]; + if (o.multiple === true) { + this.element.attr("multiple", "multiple"); + } + input.value = ""; + + // wrap Object + return this._events({ + + // DOM namespace + dom: { + input: input, // input file + disabled: false // internal use, checks input file state + }, + name: input.name, // name to send for each file ($_FILES[{name}] in the server) + // maxSize is the maximum amount of bytes for each file + maxSize: o.maxSize ? o.maxSize >> 0 : -1, + files: [], // file list + + // remove every file from the noswfupload component + clean: function () { + this.files = []; + }, + + // upload one file a time (which make progress possible rather than all files in one shot) + // the handler is an object injected into the wrap one, could be the wrap itself or + // something like {onload:function(){alert("OK")},onerror:function(){alert("Error")}, etc ...} + upload: function (handler) { + if (handler) { + for (var key in handler) { + this[key] = handler[key]; + } + } + sendFiles(this, this.maxSize); + return this; + }, + + // hide progress bar (total + current) and enable files selection + hide: function () { + if (this.dom.disabled) { + this.dom.disabled = false; + this.dom.input.removeAttribute("disabled"); + } + }, + + // show progress bar and disable file selection (used during upload) + // total and current are pixels used to style bars + // totalProp and currentProp are properties to change, "height" by default + show: function (total, current, totalProp, currentProp) { + if (!this.dom.disabled) { + this.dom.disabled = true; + this.dom.input.setAttribute("disabled", "disabled"); + } + } + }); + }, + + select: function () { + $(this.wrap.dom.input).click(); + }, + + upload: function (handler) { + this.wrap.upload(handler); + }, + + getValue: function () { + return this.wrap.attach_array; + }, + + reset: function () { + this.wrap.attach_array = []; + this.wrap.attach_names = []; + this.wrap.attachNum = 0; + }, + + _setEnable: function (enable) { + BI.File.superclass._setEnable.apply(this, arguments); + if (enable === true) { + this.element.attr("disabled", "disabled"); + } else { + this.element.removeAttr("disabled"); + } + } + }); + BI.File.EVENT_CHANGE = "BI.File.EVENT_CHANGE"; + BI.File.EVENT_UPLOADSTART = "EVENT_UPLOADSTART"; + BI.File.EVENT_ERROR = "EVENT_ERROR"; + BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; + BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; + BI.shortcut("bi.file", BI.File); +})();/** + * guy + * @class BI.Input 一个button和一行数 组成的一行listitem + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Input = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Input.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-input display-block", + element: "<input/>", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn,//按确定键能否退出编辑 + allowBlank: false + }) + }, + + _init: function () { + BI.Input.superclass._init.apply(this, arguments); + var self = this; + var ctrlKey = false; + var inputEventValid = false; + var _keydown = BI.debounce(function (keyCode) { + self.onKeyDown(keyCode, ctrlKey); + self._keydown_ = false; + }, 300); + var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, true); + this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, true); + this.element + .keydown(function (e) { + inputEventValid = false; + ctrlKey = e.ctrlKey; + self.fireEvent(BI.Input.EVENT_QUICK_DOWN); + }) + .keyup(function (e) { + if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { + self._keydown_ = true; + _keydown(e.keyCode); + } + }) + .on("input propertychange", function (e) { + inputEventValid = true; + self._keydown_ = true; + _keydown(e.keyCode); + }) + .click(function (e) { + e.stopPropagation(); + _clk(); + }) + .mousedown(function (e) { + self.element.val(self.element.val()); + }) + .focusout(function (e) { + self._blurDebounce(); + }); + }, + + _focus: function () { + this.element.addClass("bi-input-focus"); + this._checkValidationOnValueChange(); + this._isEditing = true; + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this.fireEvent(BI.Input.EVENT_FOCUS); + }, + + _blur: function () { + var self = this; + if (self._keydown_ === true) { + BI.delay(blur, 300); + } else { + blur(); + } + function blur() { + if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { + self.element.val(self._lastValidValue ? self._lastValidValue : ""); + self._checkValidationOnValueChange(); + self._defaultState(); + } + self.element.removeClass("bi-input-focus"); + self._isEditing = false; + self._start = false; + if (self.isValid()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self); + self.fireEvent(BI.Input.EVENT_CONFIRM); + } + self.fireEvent(BI.Input.EVENT_BLUR); + } + }, + + _click: function () { + if (this._isEditing !== true) { + this._focus(); + this.selectAll(); + this.fireEvent(BI.Input.EVENT_CLICK); + } + }, + + onClick: function () { + this._click(); + }, + + onKeyDown: function (keyCode, ctrlKey) { + if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { + this._checkValidationOnValueChange(); + } + if (this.isValid() && BI.trim(this.getValue()) !== "") { + if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") + || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { + this._start = true; + this._pause = false; + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_START); + } + } + if (ctrlKey === true && keyCode === 86) {//ctrlKey+V + this._valueChange(); + } else { + if (keyCode == BI.KeyCode.ENTER) { + if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { + this.blur(); + this.fireEvent(BI.Input.EVENT_ENTER); + } else { + this.fireEvent(BI.Input.EVENT_RESTRICT); + } + } + if (keyCode == BI.KeyCode.SPACE) { + this.fireEvent(BI.Input.EVENT_SPACE); + } + if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == "") { + this.fireEvent(BI.Input.EVENT_REMOVE); + } + if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { + this.fireEvent(BI.Input.EVENT_BACKSPACE); + } + } + this.fireEvent(BI.Input.EVENT_KEY_DOWN); + + if (BI.isEndWithBlank(this.getValue())) { + this._pause = true; + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); + this.fireEvent(BI.Input.EVENT_PAUSE); + this._defaultState(); + } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && + BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_STOP); + this._valueChange(); + } else { + this._valueChange(); + } + }, + + //初始状态 + _defaultState: function () { + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this._lastValue = this.getValue(); + this._lastSubmitValue = null; + }, + + _valueChange: function () { + if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_CHANGE); + this._lastSubmitValue = BI.trim(this.getValue()); + } + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this._lastValue = this.getValue(); + }, + + _checkValidationOnValueChange: function () { + var o = this.options; + var v = this.getValue(); + this.setValid( + (o.allowBlank === true && BI.trim(v) == "") || + (BI.isNotEmptyString(BI.trim(v)) + && (v === this._lastValidValue || + o.validationChecker.apply(this, [BI.trim(v)]) !== false)) + ); + }, + + focus: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能focus"); + } + if (!this._isEditing === true) { + this.element.focus(); + this._focus(); + this.selectAll(); + } + }, + + blur: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能blur"); + } + if (this._isEditing === true) { + this.element.blur(); + this._blurDebounce(); + } + }, + + selectAll: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能select"); + } + this.element.select(); + this._isEditing = true; + }, + + setValue: function (textValue) { + this.element.val(textValue); + BI.nextTick(BI.bind(function () { + this._checkValidationOnValueChange(); + this._defaultState(); + if (this.isValid()) { + this._lastSubmitValue = this.getValue(); + } + }, this)); + }, + + getValue: function () { + return this.element.val() || ""; + }, + + isEditing: function () { + return this._isEditing; + }, + + getLastValidValue: function () { + return this._lastValidValue; + }, + + _setValid: function () { + BI.Input.superclass._setValid.apply(this, arguments); + if (this.isValid()) { + this._lastValidValue = this.getValue(); + this.element.removeClass("bi-input-error"); + this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); + } else { + if (this._lastValidValue === this.getValue()) { + this._lastValidValue = null; + } + this.element.addClass("bi-input-error"); + this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); + } + }, + + _setEnable: function (b) { + BI.Input.superclass._setEnable.apply(this, [b]); + this.element[0].disabled = !b; + } +}); +BI.Input.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.Input.EVENT_FOCUS = "EVENT_FOCUS"; +BI.Input.EVENT_CLICK = "EVENT_CLICK"; +BI.Input.EVENT_BLUR = "EVENT_BLUR"; +BI.Input.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.Input.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN"; +BI.Input.EVENT_SPACE = "EVENT_SPACE"; +BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.Input.EVENT_START = "EVENT_START"; +BI.Input.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Input.EVENT_STOP = "EVENT_STOP"; +BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.Input.EVENT_REMOVE = "EVENT_REMOVE"; +BI.Input.EVENT_EMPTY = "EVENT_EMPTY"; +BI.Input.EVENT_VALID = "EVENT_VALID"; +BI.Input.EVENT_ERROR = "EVENT_ERROR"; +BI.Input.EVENT_ENTER = "EVENT_ENTER"; +BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.shortcut("bi.input", BI.Input);/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Radio = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.Radio.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-radio radio-icon", + selected: false, + handler: BI.emptyFn, + width: 16, + height: 16, + iconWidth: 16, + iconHeight: 16 + }) + }, + + _init : function() { + BI.Radio.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.Radio.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.Radio.EVENT_CHANGE); + } + } +}); +BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; + +BI.shortcut("bi.radio", BI.Radio);/** + * Created by GUY on 2015/6/26. + */ + +BI.Label = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Label.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-label", + textAlign: "center", + whiteSpace: "nowrap", //normal or nowrap + forceCenter: false, //是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 + textWidth: null, + textHeight: null, + hgap: 0, + vgap: 0, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + text: "", + py: "", + keyword: "" + }) + }, + + _createJson: function () { + var o = this.options; + return { + type: "bi.text", + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + lineHeight: o.textHeight, + text: o.text, + value: o.value, + py: o.py, + keyword: o.keyword + }; + }, + + _init: function () { + BI.Label.superclass._init.apply(this, arguments); + + if (this.options.textAlign === "center") { + this._createCenterEl(); + } else { + this._createNotCenterEl(); + } + }, + + _createCenterEl: function () { + var o = this.options; + var json = this._createJson(); + if (BI.isNumber(o.width) && o.width > 0) { + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + if (BI.isNumber(o.height) && o.height > 0) { + var gap = (o.width - o.textWidth) / 2; + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)), + left: gap + o.hgap + o.lgap, + right: gap + o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + } + ] + }); + this.element.css({"line-height": o.height + "px"}); + return; + } + json.width = o.textWidth; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.absolute", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + json.width = o.width - 2 * o.hgap; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)) + }] + }); + return; + } + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + json.width = o.textWidth; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + scrollable: o.whiteSpace === "normal", + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + if (BI.isNumber(o.textHeight) && o.textHeight > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + this.element.css({ + "line-height": o.height + "px" + }); + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + if (o.forceCenter) { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + element: this, + items: [this.text] + }); + return; + } + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }) + }, + + _createNotCenterEl: function () { + var o = this.options; + var json = this._createJson(); + if (BI.isNumber(o.width) && o.width > 0) { + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + if (BI.isNumber(o.height) && o.height > 0) { + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + } + ] + }); + this.element.css({"line-height": o.height + "px"}); + return; + } + json.width = o.textWidth; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.absolute", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [{ + el: (this.text = BI.createWidget(json)) + }] + }); + return; + } + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + json.width = o.textWidth; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json) + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + if (BI.isNumber(o.textHeight) && o.textHeight > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + this.element.css({ + "line-height": o.height + "px" + }); + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + if (o.forceCenter) { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.vertical_adapt", + element: this, + items: [this.text] + }); + return; + } + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }) + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (v) { + this.options.text = v; + this.text.setText(v); + }, + + getText: function () { + return this.options.text; + }, + + setStyle: function (css) { + this.text.setStyle(css) + }, + + setValue: function (v) { + BI.Label.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.text.setValue(v); + } + }, + + populate: function () { + BI.Label.superclass.populate.apply(this, arguments); + } +}); + +BI.shortcut("bi.label", BI.Label);/** + * guy a元素 + * @class BI.Link + * @extends BI.Text + */ +BI.Link = BI.inherit(BI.Label, { + _defaultConfig: function() { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-link", + href: "", + target: "_blank" + }) + }, + + _createJson: function(){ + var o = this.options; + return { + type:"bi.a", + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + lineHeight: o.textHeight, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py, + href: o.href, + target: o.target + }; + }, + + _init : function() { + BI.Link.superclass._init.apply(this, arguments); + } +}); + +BI.shortcut("bi.link", BI.Link);/** + * guy + * 气泡提示 + * @class BI.Bubble + * @extends BI.Tip + * @type {*|void|Object} + */ +BI.Bubble = BI.inherit(BI.Tip, { + _defaultConfig: function() { + return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-bubble", + direction: "top", + text: "", + height: 35 + }) + }, + _init : function() { + BI.Bubble.superclass._init.apply(this, arguments); + var fn = function (e) { + e.stopPropagation(); + e.stopEvent(); + return false; + }; + this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); + BI.createWidget({ + type: "bi.left", + element: this, + items: [this["_" + this.options.direction]()] + }) + }, + + _createBubbleText: function(){ + return (this.text = BI.createWidget({ + type: "bi.label", + cls: "bubble-text", + text: this.options.text, + hgap: 10, + height: 30 + })); + }, + + _top: function(){ + return BI.createWidget({ + type: "bi.vertical", + items: [{ + el: this._createBubbleText(), + height: 30 + }, { + el: { + type: "bi.layout" + }, + height: 3 + }] + }) + }, + + _bottom: function(){ + return BI.createWidget({ + type: "bi.vertical", + items: [{ + el: { + type: "bi.layout" + }, + height: 3 + }, { + el: this._createBubbleText(), + height: 30 + }] + }) + }, + + _left: function(){ + return BI.createWidget({ + type: "bi.right", + items: [{ + el: { + type: "bi.layout", + width: 3, + height: 30 + } + }, { + el: this._createBubbleText() + }] + }) + }, + + _right: function(){ + return BI.createWidget({ + type: "bi.left", + items: [{ + el: { + type: "bi.layout", + width: 3, + height: 30 + } + }, { + el: this._createBubbleText() + }] + }) + }, + + setText: function(text){ + this.text.setText(text); + } +}); + +BI.shortcut("bi.bubble", BI.Bubble);/** + * toast提示 + * + * Created by GUY on 2015/9/7. + * @class BI.Toast + * @extends BI.Tip + */ +BI.Toast = BI.inherit(BI.Tip, { + _const: { + minWidth: 200, + hgap: 20 + }, + + _defaultConfig: function () { + return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-toast", + text: "", + level: "success",//success或warning + height: 30 + }) + }, + _init: function () { + BI.Toast.superclass._init.apply(this, arguments); + var o = this.options; + this.element.css({ + minWidth: this._const.minWidth + "px" + }) + this.element.addClass("toast-" + o.level); + var fn = function (e) { + e.stopPropagation(); + e.stopEvent(); + return false; + }; + this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); + + this.text = BI.createWidget({ + type: "bi.label", + element: this, + text: o.text, + height: 30, + hgap: this._const.hgap + }) + }, + + setWidth: function(width){ + this.element.width(width); + }, + + setText: function (text) { + this.text.setText(text); + } +}); + +BI.shortcut("bi.toast", BI.Toast);/** + * toast提示 + * + * Created by GUY on 2015/9/7. + * @class BI.Tooltip + * @extends BI.Tip + */ +BI.Tooltip = BI.inherit(BI.Tip, { + _const: { + hgap: 10 + }, + + _defaultConfig: function () { + return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-tooltip", + text: "", + level: "success",//success或warning + stopEvent: false, + stopPropagation: false, + height: 20 + }) + }, + _init: function () { + BI.Tooltip.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.element.addClass("tooltip-" + o.level); + var fn = function (e) { + o.stopPropagation && e.stopPropagation(); + o.stopEvent && e.stopEvent(); + }; + this.element.bind({ + "click": fn, + "mousedown": fn, + "mouseup": fn, + "mouseover": fn, + "mouseenter": fn, + "mouseleave": fn, + "mousemove": fn + }); + + var texts = (o.text + "").split("\n"); + if (texts.length > 1) { + BI.createWidget({ + type: "bi.vertical", + element: this, + hgap: this._const.hgap, + items: BI.map(texts, function (i, text) { + return { + type: "bi.label", + textAlign: "left", + whiteSpace: "normal", + text: text, + textHeight: 16 + } + }) + }) + } else { + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + whiteSpace: "normal", + text: o.text, + textHeight: 20, + hgap: this._const.hgap + }); + } + }, + + setWidth: function (width) { + this.element.width(width - 2 * this._const.hgap); + }, + + setText: function (text) { + this.text && this.text.setText(text); + }, + + setLevel: function (level) { + this.element.removeClass("tooltip-success").removeClass("tooltip-warning"); + this.element.addClass("tooltip-" + level); + } +}); + +BI.shortcut("bi.tooltip", BI.Tooltip);/** + * 下拉 + * @class BI.Trigger + * @extends BI.Single + * @abstract + */ +BI.Trigger = BI.inherit(BI.Single, { + _defaultConfig: function() { + var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", + height: 30 + }) + }, + + _init : function() { + BI.Trigger.superclass._init.apply(this, arguments); + }, + + setKey: function(){ + + }, + + getKey: function(){ + + } +});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ┌────────────────────────────────────────────────────────────┐ \\ +// │ Eve 0.4.2 - JavaScript Events Library │ \\ +// ├────────────────────────────────────────────────────────────┤ \\ +// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ +// └────────────────────────────────────────────────────────────┘ \\ +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("eve", function() { + return factory(); + }); + } else if (typeof exports === "object") { + module.exports = factory(); + } else { + glob.eve = factory(); + } +}(this, function(){ + var version = "0.4.2", + has = "hasOwnProperty", + separator = /[\.\/]/, + wildcard = "*", + fun = function () {}, + numsort = function (a, b) { + return a - b; + }, + current_event, + stop, + events = {n: {}}, + /*\ + * eve + [ method ] + + * Fires event with given `name`, given scope and other parameters. + + > Arguments + + - name (string) name of the *event*, dot (`.`) or slash (`/`) separated + - scope (object) context for the event handlers + - varargs (...) the rest of arguments will be sent to event handlers + + = (object) array of returned values from the listeners + \*/ + eve = function (name, scope) { + name = String(name); + var e = events, + oldstop = stop, + args = Array.prototype.slice.call(arguments, 2), + listeners = eve.listeners(name), + z = 0, + f = false, + l, + indexed = [], + queue = {}, + out = [], + ce = current_event, + errors = []; + current_event = name; + stop = 0; + for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { + indexed.push(listeners[i].zIndex); + if (listeners[i].zIndex < 0) { + queue[listeners[i].zIndex] = listeners[i]; + } + } + indexed.sort(numsort); + while (indexed[z] < 0) { + l = queue[indexed[z++]]; + out.push(l.apply(scope, args)); + if (stop) { + stop = oldstop; + return out; + } + } + for (i = 0; i < ii; i++) { + l = listeners[i]; + if ("zIndex" in l) { + if (l.zIndex == indexed[z]) { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + do { + z++; + l = queue[indexed[z]]; + l && out.push(l.apply(scope, args)); + if (stop) { + break; + } + } while (l) + } else { + queue[l.zIndex] = l; + } + } else { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + } + } + stop = oldstop; + current_event = ce; + return out.length ? out : null; + }; + // Undocumented. Debug only. + eve._events = events; + /*\ + * eve.listeners + [ method ] + + * Internal method which gives you array of all event handlers that will be triggered by the given `name`. + + > Arguments + + - name (string) name of the event, dot (`.`) or slash (`/`) separated + + = (array) array of event handlers + \*/ + eve.listeners = function (name) { + var names = name.split(separator), + e = events, + item, + items, + k, + i, + ii, + j, + jj, + nes, + es = [e], + out = []; + for (i = 0, ii = names.length; i < ii; i++) { + nes = []; + for (j = 0, jj = es.length; j < jj; j++) { + e = es[j].n; + items = [e[names[i]], e[wildcard]]; + k = 2; + while (k--) { + item = items[k]; + if (item) { + nes.push(item); + out = out.concat(item.f || []); + } + } + } + es = nes; + } + return out; + }; + + /*\ + * eve.on + [ method ] + ** + * Binds given event handler with a given name. You can use wildcards “`*`” for the names: + | eve.on("*.under.*", f); + | eve("mouse.under.floor"); // triggers f + * Use @eve to trigger the listener. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + ** + = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment. + > Example: + | eve.on("mouse", eatIt)(2); + | eve.on("mouse", scream); + | eve.on("mouse", catchIt)(1); + * This will ensure that `catchIt()` function will be called before `eatIt()`. + * + * If you want to put your handler before non-indexed handlers, specify a negative value. + * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”. + \*/ + eve.on = function (name, f) { + name = String(name); + if (typeof f != "function") { + return function () {}; + } + var names = name.split(separator), + e = events; + for (var i = 0, ii = names.length; i < ii; i++) { + e = e.n; + e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}}); + } + e.f = e.f || []; + for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { + return fun; + } + e.f.push(f); + return function (zIndex) { + if (+zIndex == +zIndex) { + f.zIndex = +zIndex; + } + }; + }; + /*\ + * eve.f + [ method ] + ** + * Returns function that will fire given event with optional arguments. + * Arguments that will be passed to the result function will be also + * concated to the list of final arguments. + | el.onclick = eve.f("click", 1, 2); + | eve.on("click", function (a, b, c) { + | console.log(a, b, c); // 1, 2, [event object] + | }); + > Arguments + - event (string) event name + - varargs (…) and any other arguments + = (function) possible event handler function + \*/ + eve.f = function (event) { + var attrs = [].slice.call(arguments, 1); + return function () { + eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0))); + }; + }; + /*\ + * eve.stop + [ method ] + ** + * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing. + \*/ + eve.stop = function () { + stop = 1; + }; + /*\ + * eve.nt + [ method ] + ** + * Could be used inside event handler to figure out actual name of the event. + ** + > Arguments + ** + - subname (string) #optional subname of the event + ** + = (string) name of the event, if `subname` is not specified + * or + = (boolean) `true`, if current event’s name contains `subname` + \*/ + eve.nt = function (subname) { + if (subname) { + return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); + } + return current_event; + }; + /*\ + * eve.nts + [ method ] + ** + * Could be used inside event handler to figure out actual name of the event. + ** + ** + = (array) names of the event + \*/ + eve.nts = function () { + return current_event.split(separator); + }; + /*\ + * eve.off + [ method ] + ** + * Removes given function from the list of event listeners assigned to given name. + * If no arguments specified all the events will be cleared. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + \*/ + /*\ + * eve.unbind + [ method ] + ** + * See @eve.off + \*/ + eve.off = eve.unbind = function (name, f) { + if (!name) { + eve._events = events = {n: {}}; + return; + } + var names = name.split(separator), + e, + key, + splice, + i, ii, j, jj, + cur = [events]; + for (i = 0, ii = names.length; i < ii; i++) { + for (j = 0; j < cur.length; j += splice.length - 2) { + splice = [j, 1]; + e = cur[j].n; + if (names[i] != wildcard) { + if (e[names[i]]) { + splice.push(e[names[i]]); + } + } else { + for (key in e) if (e[has](key)) { + splice.push(e[key]); + } + } + cur.splice.apply(cur, splice); + } + } + for (i = 0, ii = cur.length; i < ii; i++) { + e = cur[i]; + while (e.n) { + if (f) { + if (e.f) { + for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { + e.f.splice(j, 1); + break; + } + !e.f.length && delete e.f; + } + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + var funcs = e.n[key].f; + for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { + funcs.splice(j, 1); + break; + } + !funcs.length && delete e.n[key].f; + } + } else { + delete e.f; + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + delete e.n[key].f; + } + } + e = e.n; + } + } + }; + /*\ + * eve.once + [ method ] + ** + * Binds given event handler with a given name to only run once then unbind itself. + | eve.once("login", f); + | eve("login"); // triggers f + | eve("login"); // no listeners + * Use @eve to trigger the listener. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + ** + = (function) same return function as @eve.on + \*/ + eve.once = function (name, f) { + var f2 = function () { + eve.unbind(name, f2); + return f.apply(this, arguments); + }; + return eve.on(name, f2); + }; + /*\ + * eve.version + [ property (string) ] + ** + * Current version of the library. + \*/ + eve.version = version; + eve.toString = function () { + return "You are running Eve " + version; + }; + + return eve; +})); + +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Core Module │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.core", ["eve"], function(eve) { + return factory(eve); + }); + } else if (typeof exports === "object") { + module.exports = factory(require("eve")); + } else { + glob.Raphael = factory(glob.eve); + } +}(this, function (eve) { + /*\ + * Raphael + [ method ] + ** + * Creates a canvas object on which to draw. + * You must do this first, as all future calls to drawing methods + * from this instance will be bound to this canvas. + > Parameters + ** + - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface + - width (number) + - height (number) + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - x (number) + - y (number) + - width (number) + - height (number) + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add. + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`. + = (object) @Paper + > Usage + | // Each of the following examples create a canvas + | // that is 320px wide by 200px high. + | // Canvas is created at the viewport’s 10,50 coordinate. + | var paper = Raphael(10, 50, 320, 200); + | // Canvas is created at the top left corner of the #notepad element + | // (or its top right corner in dir="rtl" elements) + | var paper = Raphael(document.getElementById("notepad"), 320, 200); + | // Same as above + | var paper = Raphael("notepad", 320, 200); + | // Image dump + | var set = Raphael(["notepad", 320, 200, { + | type: "rect", + | x: 10, + | y: 10, + | width: 25, + | height: 25, + | stroke: "#f00" + | }, { + | type: "text", + | x: 30, + | y: 40, + | text: "Dump" + | }]); + \*/ + function R(first) { + if (R.is(first, "function")) { + return loaded ? first() : eve.on("raphael.DOMload", first); + } else if (R.is(first, array)) { + return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); + } else { + var args = Array.prototype.slice.call(arguments, 0); + if (R.is(args[args.length - 1], "function")) { + var f = args.pop(); + return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { + f.call(R._engine.create[apply](R, args)); + }); + } else { + return R._engine.create[apply](R, arguments); + } + } + } + R.version = "2.1.4"; + R.eve = eve; + var loaded, + separator = /[, ]+/, + elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, + formatrg = /\{(\d+)\}/g, + proto = "prototype", + has = "hasOwnProperty", + g = { + doc: document, + win: window + }, + oldRaphael = { + was: Object.prototype[has].call(g.win, "Raphael"), + is: g.win.Raphael + }, + Paper = function () { + /*\ + * Paper.ca + [ property (object) ] + ** + * Shortcut for @Paper.customAttributes + \*/ + /*\ + * Paper.customAttributes + [ property (object) ] + ** + * If you have a set of attributes that you would like to represent + * as a function of some number you can do it easily with custom attributes: + > Usage + | paper.customAttributes.hue = function (num) { + | num = num % 1; + | return {fill: "hsb(" + num + ", 0.75, 1)"}; + | }; + | // Custom attribute “hue” will change fill + | // to be given hue with fixed saturation and brightness. + | // Now you can use it like this: + | var c = paper.circle(10, 10, 10).attr({hue: .45}); + | // or even like this: + | c.animate({hue: 1}, 1e3); + | + | // You could also create custom attribute + | // with multiple parameters: + | paper.customAttributes.hsb = function (h, s, b) { + | return {fill: "hsb(" + [h, s, b].join(",") + ")"}; + | }; + | c.attr({hsb: "0.5 .8 1"}); + | c.animate({hsb: [1, 0, 0.5]}, 1e3); + \*/ + this.ca = this.customAttributes = {}; + }, + paperproto, + appendChild = "appendChild", + apply = "apply", + concat = "concat", + supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test + E = "", + S = " ", + Str = String, + split = "split", + events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), + touchMap = { + mousedown: "touchstart", + mousemove: "touchmove", + mouseup: "touchend" + }, + lowerCase = Str.prototype.toLowerCase, + math = Math, + mmax = math.max, + mmin = math.min, + abs = math.abs, + pow = math.pow, + PI = math.PI, + nu = "number", + string = "string", + array = "array", + toString = "toString", + fillString = "fill", + objectToString = Object.prototype.toString, + paper = {}, + push = "push", + ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i, + colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, + isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, + bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, + round = math.round, + setAttribute = "setAttribute", + toFloat = parseFloat, + toInt = parseInt, + upperCase = Str.prototype.toUpperCase, + availableAttrs = R._availableAttrs = { + "arrow-end": "none", + "arrow-start": "none", + blur: 0, + "clip-rect": "0 0 1e9 1e9", + cursor: "default", + cx: 0, + cy: 0, + fill: "#fff", + "fill-opacity": 1, + font: '10px "Arial"', + "font-family": '"Arial"', + "font-size": "10", + "font-style": "normal", + "font-weight": 400, + gradient: 0, + height: 0, + href: "http://raphaeljs.com/", + "letter-spacing": 0, + opacity: 1, + path: "M0,0", + r: 0, + rx: 0, + ry: 0, + src: "", + stroke: "#000", + "stroke-dasharray": "", + "stroke-linecap": "butt", + "stroke-linejoin": "butt", + "stroke-miterlimit": 0, + "stroke-opacity": 1, + "stroke-width": 1, + target: "_blank", + "text-anchor": "middle", + title: "Raphael", + transform: "", + width: 0, + x: 0, + y: 0 + }, + availableAnimAttrs = R._availableAnimAttrs = { + blur: nu, + "clip-rect": "csv", + cx: nu, + cy: nu, + fill: "colour", + "fill-opacity": nu, + "font-size": nu, + height: nu, + opacity: nu, + path: "path", + r: nu, + rx: nu, + ry: nu, + stroke: "colour", + "stroke-opacity": nu, + "stroke-width": nu, + transform: "transform", + width: nu, + x: nu, + y: nu + }, + whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, + commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, + hsrg = {hs: 1, rg: 1}, + p2s = /,?([achlmqrstvxz]),?/gi, + pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, + radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, + eldata = {}, + sortByKey = function (a, b) { + return a.key - b.key; + }, + sortByNumber = function (a, b) { + return toFloat(a) - toFloat(b); + }, + fun = function () {}, + pipe = function (x) { + return x; + }, + rectPath = R._rectPath = function (x, y, w, h, r) { + if (r) { + return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; + } + return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; + }, + ellipsePath = function (x, y, rx, ry) { + if (ry == null) { + ry = rx; + } + return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; + }, + getPath = R._getPath = { + path: function (el) { + return el.attr("path"); + }, + circle: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.r); + }, + ellipse: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.rx, a.ry); + }, + rect: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height, a.r); + }, + image: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height); + }, + text: function (el) { + var bbox = el._getBBox(); + return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); + }, + set : function(el) { + var bbox = el._getBBox(); + return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); + } + }, + /*\ + * Raphael.mapPath + [ method ] + ** + * Transform the path string with given matrix. + > Parameters + - path (string) path string + - matrix (object) see @Matrix + = (string) transformed path string + \*/ + mapPath = R.mapPath = function (path, matrix) { + if (!matrix) { + return path; + } + var x, y, i, j, ii, jj, pathi; + path = path2curve(path); + for (i = 0, ii = path.length; i < ii; i++) { + pathi = path[i]; + for (j = 1, jj = pathi.length; j < jj; j += 2) { + x = matrix.x(pathi[j], pathi[j + 1]); + y = matrix.y(pathi[j], pathi[j + 1]); + pathi[j] = x; + pathi[j + 1] = y; + } + } + return path; + }; + + R._g = g; + /*\ + * Raphael.type + [ property (string) ] + ** + * Can be “SVG”, “VML” or empty, depending on browser support. + \*/ + R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); + if (R.type == "VML") { + var d = g.doc.createElement("div"), + b; + d.innerHTML = '<v:shape adj="1"/>'; + b = d.firstChild; + b.style.behavior = "url(#default#VML)"; + if (!(b && typeof b.adj == "object")) { + return (R.type = E); + } + d = null; + } + /*\ + * Raphael.svg + [ property (boolean) ] + ** + * `true` if browser supports SVG. + \*/ + /*\ + * Raphael.vml + [ property (boolean) ] + ** + * `true` if browser supports VML. + \*/ + R.svg = !(R.vml = R.type == "VML"); + R._Paper = Paper; + /*\ + * Raphael.fn + [ property (object) ] + ** + * You can add your own method to the canvas. For example if you want to draw a pie chart, + * you can create your own pie chart function and ship it as a Raphaël plugin. To do this + * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a + * Raphaël instance is created, otherwise it will take no effect. Please note that the + * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to + * ensure any namespacing ensures proper context. + > Usage + | Raphael.fn.arrow = function (x1, y1, x2, y2, size) { + | return this.path( ... ); + | }; + | // or create namespace + | Raphael.fn.mystuff = { + | arrow: function () {…}, + | star: function () {…}, + | // etc… + | }; + | var paper = Raphael(10, 10, 630, 480); + | // then use it + | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"}); + | paper.mystuff.arrow(); + | paper.mystuff.star(); + \*/ + R.fn = paperproto = Paper.prototype = R.prototype; + R._id = 0; + R._oid = 0; + /*\ + * Raphael.is + [ method ] + ** + * Handful of replacements for `typeof` operator. + > Parameters + - o (…) any object or primitive + - type (string) name of the type, i.e. “string”, “function”, “number”, etc. + = (boolean) is given value is of given type + \*/ + R.is = function (o, type) { + type = lowerCase.call(type); + if (type == "finite") { + return !isnan[has](+o); + } + if (type == "array") { + return o instanceof Array; + } + return (type == "null" && o === null) || + (type == typeof o && o !== null) || + (type == "object" && o === Object(o)) || + (type == "array" && Array.isArray && Array.isArray(o)) || + objectToString.call(o).slice(8, -1).toLowerCase() == type; + }; + + function clone(obj) { + if (typeof obj == "function" || Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) if (obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + } + + /*\ + * Raphael.angle + [ method ] + ** + * Returns angle between two or three points + > Parameters + - x1 (number) x coord of first point + - y1 (number) y coord of first point + - x2 (number) x coord of second point + - y2 (number) y coord of second point + - x3 (number) #optional x coord of third point + - y3 (number) #optional y coord of third point + = (number) angle in degrees. + \*/ + R.angle = function (x1, y1, x2, y2, x3, y3) { + if (x3 == null) { + var x = x1 - x2, + y = y1 - y2; + if (!x && !y) { + return 0; + } + return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; + } else { + return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); + } + }; + /*\ + * Raphael.rad + [ method ] + ** + * Transform angle to radians + > Parameters + - deg (number) angle in degrees + = (number) angle in radians. + \*/ + R.rad = function (deg) { + return deg % 360 * PI / 180; + }; + /*\ + * Raphael.deg + [ method ] + ** + * Transform angle to degrees + > Parameters + - rad (number) angle in radians + = (number) angle in degrees. + \*/ + R.deg = function (rad) { + return Math.round ((rad * 180 / PI% 360)* 1000) / 1000; + }; + /*\ + * Raphael.snapTo + [ method ] + ** + * Snaps given value to given grid. + > Parameters + - values (array|number) given array of values or step of the grid + - value (number) value to adjust + - tolerance (number) #optional tolerance for snapping. Default is `10`. + = (number) adjusted value. + \*/ + R.snapTo = function (values, value, tolerance) { + tolerance = R.is(tolerance, "finite") ? tolerance : 10; + if (R.is(values, array)) { + var i = values.length; + while (i--) if (abs(values[i] - value) <= tolerance) { + return values[i]; + } + } else { + values = +values; + var rem = value % values; + if (rem < tolerance) { + return value - rem; + } + if (rem > values - tolerance) { + return value - rem + values; + } + } + return value; + }; + + /*\ + * Raphael.createUUID + [ method ] + ** + * Returns RFC4122, version 4 ID + \*/ + var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { + return function () { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); + }; + })(/[xy]/g, function (c) { + var r = math.random() * 16 | 0, + v = c == "x" ? r : (r & 3 | 8); + return v.toString(16); + }); + + /*\ + * Raphael.setWindow + [ method ] + ** + * Used when you need to draw in `<iframe>`. Switched window to the iframe one. + > Parameters + - newwin (window) new window object + \*/ + R.setWindow = function (newwin) { + eve("raphael.setWindow", R, g.win, newwin); + g.win = newwin; + g.doc = g.win.document; + if (R._engine.initWin) { + R._engine.initWin(g.win); + } + }; + var toHex = function (color) { + if (R.vml) { + // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ + var trim = /^\s+|\s+$/g; + var bod; + try { + var docum = new ActiveXObject("htmlfile"); + docum.write("<body>"); + docum.close(); + bod = docum.body; + } catch(e) { + bod = createPopup().document.body; + } + var range = bod.createTextRange(); + toHex = cacher(function (color) { + try { + bod.style.color = Str(color).replace(trim, E); + var value = range.queryCommandValue("ForeColor"); + value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); + return "#" + ("000000" + value.toString(16)).slice(-6); + } catch(e) { + return "none"; + } + }); + } else { + var i = g.doc.createElement("i"); + i.title = "Rapha\xebl Colour Picker"; + i.style.display = "none"; + g.doc.body.appendChild(i); + toHex = cacher(function (color) { + i.style.color = color; + return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); + }); + } + return toHex(color); + }, + hsbtoString = function () { + return "hsb(" + [this.h, this.s, this.b] + ")"; + }, + hsltoString = function () { + return "hsl(" + [this.h, this.s, this.l] + ")"; + }, + rgbtoString = function () { + return this.hex; + }, + prepareRGB = function (r, g, b) { + if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { + b = r.b; + g = r.g; + r = r.r; + } + if (g == null && R.is(r, string)) { + var clr = R.getRGB(r); + r = clr.r; + g = clr.g; + b = clr.b; + } + if (r > 1 || g > 1 || b > 1) { + r /= 255; + g /= 255; + b /= 255; + } + + return [r, g, b]; + }, + packageRGB = function (r, g, b, o) { + r *= 255; + g *= 255; + b *= 255; + var rgb = { + r: r, + g: g, + b: b, + hex: R.rgb(r, g, b), + toString: rgbtoString + }; + R.is(o, "finite") && (rgb.opacity = o); + return rgb; + }; + + /*\ + * Raphael.color + [ method ] + ** + * Parses the color string and returns object with all values for the given color. + > Parameters + - clr (string) color string in one of the supported formats (see @Raphael.getRGB) + = (object) Combined RGB & HSB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #••••••, + o error (boolean) `true` if string can’t be parsed, + o h (number) hue, + o s (number) saturation, + o v (number) value (brightness), + o l (number) lightness + o } + \*/ + R.color = function (clr) { + var rgb; + if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { + rgb = R.hsb2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { + rgb = R.hsl2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else { + if (R.is(clr, "string")) { + clr = R.getRGB(clr); + } + if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { + rgb = R.rgb2hsl(clr); + clr.h = rgb.h; + clr.s = rgb.s; + clr.l = rgb.l; + rgb = R.rgb2hsb(clr); + clr.v = rgb.b; + } else { + clr = {hex: "none"}; + clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; + } + } + clr.toString = rgbtoString; + return clr; + }; + /*\ + * Raphael.hsb2rgb + [ method ] + ** + * Converts HSB values to RGB object. + > Parameters + - h (number) hue + - s (number) saturation + - v (number) value or brightness + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #•••••• + o } + \*/ + R.hsb2rgb = function (h, s, v, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { + v = h.b; + s = h.s; + o = h.o; + h = h.h; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = v * s; + X = C * (1 - abs(h % 2 - 1)); + R = G = B = v - C; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + /*\ + * Raphael.hsl2rgb + [ method ] + ** + * Converts HSL values to RGB object. + > Parameters + - h (number) hue + - s (number) saturation + - l (number) luminosity + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #•••••• + o } + \*/ + R.hsl2rgb = function (h, s, l, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { + l = h.l; + s = h.s; + h = h.h; + } + if (h > 1 || s > 1 || l > 1) { + h /= 360; + s /= 100; + l /= 100; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = 2 * s * (l < .5 ? l : 1 - l); + X = C * (1 - abs(h % 2 - 1)); + R = G = B = l - C / 2; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + /*\ + * Raphael.rgb2hsb + [ method ] + ** + * Converts RGB values to HSB object. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (object) HSB object in format: + o { + o h (number) hue + o s (number) saturation + o b (number) brightness + o } + \*/ + R.rgb2hsb = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, V, C; + V = mmax(r, g, b); + C = V - mmin(r, g, b); + H = (C == 0 ? null : + V == r ? (g - b) / C : + V == g ? (b - r) / C + 2 : + (r - g) / C + 4 + ); + H = ((H + 360) % 6) * 60 / 360; + S = C == 0 ? 0 : C / V; + return {h: H, s: S, b: V, toString: hsbtoString}; + }; + /*\ + * Raphael.rgb2hsl + [ method ] + ** + * Converts RGB values to HSL object. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (object) HSL object in format: + o { + o h (number) hue + o s (number) saturation + o l (number) luminosity + o } + \*/ + R.rgb2hsl = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, L, M, m, C; + M = mmax(r, g, b); + m = mmin(r, g, b); + C = M - m; + H = (C == 0 ? null : + M == r ? (g - b) / C : + M == g ? (b - r) / C + 2 : + (r - g) / C + 4); + H = ((H + 360) % 6) * 60 / 360; + L = (M + m) / 2; + S = (C == 0 ? 0 : + L < .5 ? C / (2 * L) : + C / (2 - 2 * L)); + return {h: H, s: S, l: L, toString: hsltoString}; + }; + R._path2string = function () { + return this.join(",").replace(p2s, "$1"); + }; + function repush(array, item) { + for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { + return array.push(array.splice(i, 1)[0]); + } + } + function cacher(f, scope, postprocessor) { + function newf() { + var arg = Array.prototype.slice.call(arguments, 0), + args = arg.join("\u2400"), + cache = newf.cache = newf.cache || {}, + count = newf.count = newf.count || []; + if (cache[has](args)) { + repush(count, args); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + count.length >= 1e3 && delete cache[count.shift()]; + count.push(args); + cache[args] = f[apply](scope, arg); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + return newf; + } + + var preload = R._preload = function (src, f) { + var img = g.doc.createElement("img"); + img.style.cssText = "position:absolute;left:-9999em;top:-9999em"; + img.onload = function () { + f.call(this); + this.onload = null; + g.doc.body.removeChild(this); + }; + img.onerror = function () { + g.doc.body.removeChild(this); + }; + g.doc.body.appendChild(img); + img.src = src; + }; + + function clrToString() { + return this.hex; + } + + /*\ + * Raphael.getRGB + [ method ] + ** + * Parses colour string as RGB object + > Parameters + - colour (string) colour string in one of formats: + # <ul> + # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> + # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> + # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> + # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> + # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> + # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> + # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsl(•••, •••, •••) — same as hsb</li> + # <li>hsl(•••%, •••%, •••%) — same as hsb</li> + # </ul> + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue + o hex (string) color in HTML/CSS format: #••••••, + o error (boolean) true if string can’t be parsed + o } + \*/ + R.getRGB = cacher(function (colour) { + if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + } + if (colour == "none") { + return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; + } + !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); + var res, + red, + green, + blue, + opacity, + t, + values, + rgb = colour.match(colourRegExp); + if (rgb) { + if (rgb[2]) { + blue = toInt(rgb[2].substring(5), 16); + green = toInt(rgb[2].substring(3, 5), 16); + red = toInt(rgb[2].substring(1, 3), 16); + } + if (rgb[3]) { + blue = toInt((t = rgb[3].charAt(3)) + t, 16); + green = toInt((t = rgb[3].charAt(2)) + t, 16); + red = toInt((t = rgb[3].charAt(1)) + t, 16); + } + if (rgb[4]) { + values = rgb[4][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + } + if (rgb[5]) { + values = rgb[5][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsb2rgb(red, green, blue, opacity); + } + if (rgb[6]) { + values = rgb[6][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsl2rgb(red, green, blue, opacity); + } + rgb = {r: red, g: green, b: blue, toString: clrToString}; + rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); + R.is(opacity, "finite") && (rgb.opacity = opacity); + return rgb; + } + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + }, R); + /*\ + * Raphael.hsb + [ method ] + ** + * Converts HSB values to hex representation of the colour. + > Parameters + - h (number) hue + - s (number) saturation + - b (number) value or brightness + = (string) hex representation of the colour. + \*/ + R.hsb = cacher(function (h, s, b) { + return R.hsb2rgb(h, s, b).hex; + }); + /*\ + * Raphael.hsl + [ method ] + ** + * Converts HSL values to hex representation of the colour. + > Parameters + - h (number) hue + - s (number) saturation + - l (number) luminosity + = (string) hex representation of the colour. + \*/ + R.hsl = cacher(function (h, s, l) { + return R.hsl2rgb(h, s, l).hex; + }); + /*\ + * Raphael.rgb + [ method ] + ** + * Converts RGB values to hex representation of the colour. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (string) hex representation of the colour. + \*/ + R.rgb = cacher(function (r, g, b) { + function round(x) { return (x + 0.5) | 0; } + return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1); + }); + /*\ + * Raphael.getColor + [ method ] + ** + * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset + > Parameters + - value (number) #optional brightness, default is `0.75` + = (string) hex representation of the colour. + \*/ + R.getColor = function (value) { + var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, + rgb = this.hsb2rgb(start.h, start.s, start.b); + start.h += .075; + if (start.h > 1) { + start.h = 0; + start.s -= .2; + start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); + } + return rgb.hex; + }; + /*\ + * Raphael.getColor.reset + [ method ] + ** + * Resets spectrum position for @Raphael.getColor back to red. + \*/ + R.getColor.reset = function () { + delete this.start; + }; + + // http://schepers.cc/getting-to-the-point + function catmullRom2bezier(crp, z) { + var d = []; + for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { + var p = [ + {x: +crp[i - 2], y: +crp[i - 1]}, + {x: +crp[i], y: +crp[i + 1]}, + {x: +crp[i + 2], y: +crp[i + 3]}, + {x: +crp[i + 4], y: +crp[i + 5]} + ]; + if (z) { + if (!i) { + p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]}; + } else if (iLen - 4 == i) { + p[3] = {x: +crp[0], y: +crp[1]}; + } else if (iLen - 2 == i) { + p[2] = {x: +crp[0], y: +crp[1]}; + p[3] = {x: +crp[2], y: +crp[3]}; + } + } else { + if (iLen - 4 == i) { + p[3] = p[2]; + } else if (!i) { + p[0] = {x: +crp[i], y: +crp[i + 1]}; + } + } + d.push(["C", + (-p[0].x + 6 * p[1].x + p[2].x) / 6, + (-p[0].y + 6 * p[1].y + p[2].y) / 6, + (p[1].x + 6 * p[2].x - p[3].x) / 6, + (p[1].y + 6*p[2].y - p[3].y) / 6, + p[2].x, + p[2].y + ]); + } + + return d; + } + /*\ + * Raphael.parsePathString + [ method ] + ** + * Utility method + ** + * Parses given path string into an array of arrays of path segments. + > Parameters + - pathString (string|array) path string or array of segments (in the last case it will be returned straight away) + = (array) array of segments. + \*/ + R.parsePathString = function (pathString) { + if (!pathString) { + return null; + } + var pth = paths(pathString); + if (pth.arr) { + return pathClone(pth.arr); + } + + var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, + data = []; + if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption + data = pathClone(pathString); + } + if (!data.length) { + Str(pathString).replace(pathCommand, function (a, b, c) { + var params = [], + name = b.toLowerCase(); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + if (name == "m" && params.length > 2) { + data.push([b][concat](params.splice(0, 2))); + name = "l"; + b = b == "m" ? "l" : "L"; + } + if (name == "r") { + data.push([b][concat](params)); + } else while (params.length >= paramCounts[name]) { + data.push([b][concat](params.splice(0, paramCounts[name]))); + if (!paramCounts[name]) { + break; + } + } + }); + } + data.toString = R._path2string; + pth.arr = pathClone(data); + return data; + }; + /*\ + * Raphael.parseTransformString + [ method ] + ** + * Utility method + ** + * Parses given path string into an array of transformations. + > Parameters + - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away) + = (array) array of transformations. + \*/ + R.parseTransformString = cacher(function (TString) { + if (!TString) { + return null; + } + var paramCounts = {r: 3, s: 4, t: 2, m: 6}, + data = []; + if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption + data = pathClone(TString); + } + if (!data.length) { + Str(TString).replace(tCommand, function (a, b, c) { + var params = [], + name = lowerCase.call(b); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + data.push([b][concat](params)); + }); + } + data.toString = R._path2string; + return data; + }); + // PATHS + var paths = function (ps) { + var p = paths.ps = paths.ps || {}; + if (p[ps]) { + p[ps].sleep = 100; + } else { + p[ps] = { + sleep: 100 + }; + } + setTimeout(function () { + for (var key in p) if (p[has](key) && key != ps) { + p[key].sleep--; + !p[key].sleep && delete p[key]; + } + }); + return p[ps]; + }; + /*\ + * Raphael.findDotsAtSegment + [ method ] + ** + * Utility method + ** + * Find dot coordinates on the given cubic bezier curve at the given t. + > Parameters + - p1x (number) x of the first point of the curve + - p1y (number) y of the first point of the curve + - c1x (number) x of the first anchor of the curve + - c1y (number) y of the first anchor of the curve + - c2x (number) x of the second anchor of the curve + - c2y (number) y of the second anchor of the curve + - p2x (number) x of the second point of the curve + - p2y (number) y of the second point of the curve + - t (number) position on the curve (0..1) + = (object) point information in format: + o { + o x: (number) x coordinate of the point + o y: (number) y coordinate of the point + o m: { + o x: (number) x coordinate of the left anchor + o y: (number) y coordinate of the left anchor + o } + o n: { + o x: (number) x coordinate of the right anchor + o y: (number) y coordinate of the right anchor + o } + o start: { + o x: (number) x coordinate of the start of the curve + o y: (number) y coordinate of the start of the curve + o } + o end: { + o x: (number) x coordinate of the end of the curve + o y: (number) y coordinate of the end of the curve + o } + o alpha: (number) angle of the curve derivative at the point + o } + \*/ + R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t, + t13 = pow(t1, 3), + t12 = pow(t1, 2), + t2 = t * t, + t3 = t2 * t, + x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, + y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, + mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), + my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), + nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), + ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), + ax = t1 * p1x + t * c1x, + ay = t1 * p1y + t * c1y, + cx = t1 * c2x + t * p2x, + cy = t1 * c2y + t * p2y, + alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); + (mx > nx || my < ny) && (alpha += 180); + return { + x: x, + y: y, + m: {x: mx, y: my}, + n: {x: nx, y: ny}, + start: {x: ax, y: ay}, + end: {x: cx, y: cy}, + alpha: alpha + }; + }; + /*\ + * Raphael.bezierBBox + [ method ] + ** + * Utility method + ** + * Return bounding box of a given cubic bezier curve + > Parameters + - p1x (number) x of the first point of the curve + - p1y (number) y of the first point of the curve + - c1x (number) x of the first anchor of the curve + - c1y (number) y of the first anchor of the curve + - c2x (number) x of the second anchor of the curve + - c2y (number) y of the second anchor of the curve + - p2x (number) x of the second point of the curve + - p2y (number) y of the second point of the curve + * or + - bez (array) array of six points for bezier curve + = (object) point information in format: + o { + o min: { + o x: (number) x coordinate of the left point + o y: (number) y coordinate of the top point + o } + o max: { + o x: (number) x coordinate of the right point + o y: (number) y coordinate of the bottom point + o } + o } + \*/ + R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + if (!R.is(p1x, "array")) { + p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; + } + var bbox = curveDim.apply(null, p1x); + return { + x: bbox.min.x, + y: bbox.min.y, + x2: bbox.max.x, + y2: bbox.max.y, + width: bbox.max.x - bbox.min.x, + height: bbox.max.y - bbox.min.y + }; + }; + /*\ + * Raphael.isPointInsideBBox + [ method ] + ** + * Utility method + ** + * Returns `true` if given point is inside bounding boxes. + > Parameters + - bbox (string) bounding box + - x (string) x coordinate of the point + - y (string) y coordinate of the point + = (boolean) `true` if point inside + \*/ + R.isPointInsideBBox = function (bbox, x, y) { + return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2; + }; + /*\ + * Raphael.isBBoxIntersect + [ method ] + ** + * Utility method + ** + * Returns `true` if two bounding boxes intersect + > Parameters + - bbox1 (string) first bounding box + - bbox2 (string) second bounding box + = (boolean) `true` if they intersect + \*/ + R.isBBoxIntersect = function (bbox1, bbox2) { + var i = R.isPointInsideBBox; + return i(bbox2, bbox1.x, bbox1.y) + || i(bbox2, bbox1.x2, bbox1.y) + || i(bbox2, bbox1.x, bbox1.y2) + || i(bbox2, bbox1.x2, bbox1.y2) + || i(bbox1, bbox2.x, bbox2.y) + || i(bbox1, bbox2.x2, bbox2.y) + || i(bbox1, bbox2.x, bbox2.y2) + || i(bbox1, bbox2.x2, bbox2.y2) + || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) + && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); + }; + function base3(t, p1, p2, p3, p4) { + var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, + t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; + return t * t2 - 3 * p1 + 3 * p2; + } + function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { + if (z == null) { + z = 1; + } + z = z > 1 ? 1 : z < 0 ? 0 : z; + var z2 = z / 2, + n = 12, + Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816], + Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472], + sum = 0; + for (var i = 0; i < n; i++) { + var ct = z2 * Tvalues[i] + z2, + xbase = base3(ct, x1, x2, x3, x4), + ybase = base3(ct, y1, y2, y3, y4), + comb = xbase * xbase + ybase * ybase; + sum += Cvalues[i] * math.sqrt(comb); + } + return z2 * sum; + } + function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) { + if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) { + return; + } + var t = 1, + step = t / 2, + t2 = t - step, + l, + e = .01; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + while (abs(l - ll) > e) { + step /= 2; + t2 += (l < ll ? 1 : -1) * step; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + } + return t2; + } + function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { + if ( + mmax(x1, x2) < mmin(x3, x4) || + mmin(x1, x2) > mmax(x3, x4) || + mmax(y1, y2) < mmin(y3, y4) || + mmin(y1, y2) > mmax(y3, y4) + ) { + return; + } + var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), + ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), + denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + + if (!denominator) { + return; + } + var px = nx / denominator, + py = ny / denominator, + px2 = +px.toFixed(2), + py2 = +py.toFixed(2); + if ( + px2 < +mmin(x1, x2).toFixed(2) || + px2 > +mmax(x1, x2).toFixed(2) || + px2 < +mmin(x3, x4).toFixed(2) || + px2 > +mmax(x3, x4).toFixed(2) || + py2 < +mmin(y1, y2).toFixed(2) || + py2 > +mmax(y1, y2).toFixed(2) || + py2 < +mmin(y3, y4).toFixed(2) || + py2 > +mmax(y3, y4).toFixed(2) + ) { + return; + } + return {x: px, y: py}; + } + function inter(bez1, bez2) { + return interHelper(bez1, bez2); + } + function interCount(bez1, bez2) { + return interHelper(bez1, bez2, 1); + } + function interHelper(bez1, bez2, justCount) { + var bbox1 = R.bezierBBox(bez1), + bbox2 = R.bezierBBox(bez2); + if (!R.isBBoxIntersect(bbox1, bbox2)) { + return justCount ? 0 : []; + } + var l1 = bezlen.apply(0, bez1), + l2 = bezlen.apply(0, bez2), + n1 = mmax(~~(l1 / 5), 1), + n2 = mmax(~~(l2 / 5), 1), + dots1 = [], + dots2 = [], + xy = {}, + res = justCount ? 0 : []; + for (var i = 0; i < n1 + 1; i++) { + var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1)); + dots1.push({x: p.x, y: p.y, t: i / n1}); + } + for (i = 0; i < n2 + 1; i++) { + p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2)); + dots2.push({x: p.x, y: p.y, t: i / n2}); + } + for (i = 0; i < n1; i++) { + for (var j = 0; j < n2; j++) { + var di = dots1[i], + di1 = dots1[i + 1], + dj = dots2[j], + dj1 = dots2[j + 1], + ci = abs(di1.x - di.x) < .001 ? "y" : "x", + cj = abs(dj1.x - dj.x) < .001 ? "y" : "x", + is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); + if (is) { + if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) { + continue; + } + xy[is.x.toFixed(4)] = is.y.toFixed(4); + var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), + t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); + if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) { + if (justCount) { + res++; + } else { + res.push({ + x: is.x, + y: is.y, + t1: mmin(t1, 1), + t2: mmin(t2, 1) + }); + } + } + } + } + } + return res; + } + /*\ + * Raphael.pathIntersection + [ method ] + ** + * Utility method + ** + * Finds intersections of two paths + > Parameters + - path1 (string) path string + - path2 (string) path string + = (array) dots of intersection + o [ + o { + o x: (number) x coordinate of the point + o y: (number) y coordinate of the point + o t1: (number) t value for segment of path1 + o t2: (number) t value for segment of path2 + o segment1: (number) order number for segment of path1 + o segment2: (number) order number for segment of path2 + o bez1: (array) eight coordinates representing beziér curve for the segment of path1 + o bez2: (array) eight coordinates representing beziér curve for the segment of path2 + o } + o ] + \*/ + R.pathIntersection = function (path1, path2) { + return interPathHelper(path1, path2); + }; + R.pathIntersectionNumber = function (path1, path2) { + return interPathHelper(path1, path2, 1); + }; + function interPathHelper(path1, path2, justCount) { + path1 = R._path2curve(path1); + path2 = R._path2curve(path2); + var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2, + res = justCount ? 0 : []; + for (var i = 0, ii = path1.length; i < ii; i++) { + var pi = path1[i]; + if (pi[0] == "M") { + x1 = x1m = pi[1]; + y1 = y1m = pi[2]; + } else { + if (pi[0] == "C") { + bez1 = [x1, y1].concat(pi.slice(1)); + x1 = bez1[6]; + y1 = bez1[7]; + } else { + bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; + x1 = x1m; + y1 = y1m; + } + for (var j = 0, jj = path2.length; j < jj; j++) { + var pj = path2[j]; + if (pj[0] == "M") { + x2 = x2m = pj[1]; + y2 = y2m = pj[2]; + } else { + if (pj[0] == "C") { + bez2 = [x2, y2].concat(pj.slice(1)); + x2 = bez2[6]; + y2 = bez2[7]; + } else { + bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; + x2 = x2m; + y2 = y2m; + } + var intr = interHelper(bez1, bez2, justCount); + if (justCount) { + res += intr; + } else { + for (var k = 0, kk = intr.length; k < kk; k++) { + intr[k].segment1 = i; + intr[k].segment2 = j; + intr[k].bez1 = bez1; + intr[k].bez2 = bez2; + } + res = res.concat(intr); + } + } + } + } + } + return res; + } + /*\ + * Raphael.isPointInsidePath + [ method ] + ** + * Utility method + ** + * Returns `true` if given point is inside a given closed path. + > Parameters + - path (string) path string + - x (number) x of the point + - y (number) y of the point + = (boolean) true, if point is inside the path + \*/ + R.isPointInsidePath = function (path, x, y) { + var bbox = R.pathBBox(path); + return R.isPointInsideBBox(bbox, x, y) && + interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1; + }; + R._removedFactory = function (methodname) { + return function () { + eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname); + }; + }; + /*\ + * Raphael.pathBBox + [ method ] + ** + * Utility method + ** + * Return bounding box of a given path + > Parameters + - path (string) path string + = (object) bounding box + o { + o x: (number) x coordinate of the left top point of the box + o y: (number) y coordinate of the left top point of the box + o x2: (number) x coordinate of the right bottom point of the box + o y2: (number) y coordinate of the right bottom point of the box + o width: (number) width of the box + o height: (number) height of the box + o cx: (number) x coordinate of the center of the box + o cy: (number) y coordinate of the center of the box + o } + \*/ + var pathDimensions = R.pathBBox = function (path) { + var pth = paths(path); + if (pth.bbox) { + return clone(pth.bbox); + } + if (!path) { + return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; + } + path = path2curve(path); + var x = 0, + y = 0, + X = [], + Y = [], + p; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = p[1]; + y = p[2]; + X.push(x); + Y.push(y); + } else { + var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + X = X[concat](dim.min.x, dim.max.x); + Y = Y[concat](dim.min.y, dim.max.y); + x = p[5]; + y = p[6]; + } + } + var xmin = mmin[apply](0, X), + ymin = mmin[apply](0, Y), + xmax = mmax[apply](0, X), + ymax = mmax[apply](0, Y), + width = xmax - xmin, + height = ymax - ymin, + bb = { + x: xmin, + y: ymin, + x2: xmax, + y2: ymax, + width: width, + height: height, + cx: xmin + width / 2, + cy: ymin + height / 2 + }; + pth.bbox = clone(bb); + return bb; + }, + pathClone = function (pathArray) { + var res = clone(pathArray); + res.toString = R._path2string; + return res; + }, + pathToRelative = R._pathToRelative = function (pathArray) { + var pth = paths(pathArray); + if (pth.rel) { + return pathClone(pth.rel); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = pathArray[0][1]; + y = pathArray[0][2]; + mx = x; + my = y; + start++; + res.push(["M", x, y]); + } + for (var i = start, ii = pathArray.length; i < ii; i++) { + var r = res[i] = [], + pa = pathArray[i]; + if (pa[0] != lowerCase.call(pa[0])) { + r[0] = lowerCase.call(pa[0]); + switch (r[0]) { + case "a": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] - x).toFixed(3); + r[7] = +(pa[7] - y).toFixed(3); + break; + case "v": + r[1] = +(pa[1] - y).toFixed(3); + break; + case "m": + mx = pa[1]; + my = pa[2]; + default: + for (var j = 1, jj = pa.length; j < jj; j++) { + r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); + } + } + } else { + r = res[i] = []; + if (pa[0] == "m") { + mx = pa[1] + x; + my = pa[2] + y; + } + for (var k = 0, kk = pa.length; k < kk; k++) { + res[i][k] = pa[k]; + } + } + var len = res[i].length; + switch (res[i][0]) { + case "z": + x = mx; + y = my; + break; + case "h": + x += +res[i][len - 1]; + break; + case "v": + y += +res[i][len - 1]; + break; + default: + x += +res[i][len - 2]; + y += +res[i][len - 1]; + } + } + res.toString = R._path2string; + pth.rel = pathClone(res); + return res; + }, + pathToAbsolute = R._pathToAbsolute = function (pathArray) { + var pth = paths(pathArray); + if (pth.abs) { + return pathClone(pth.abs); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + if (!pathArray || !pathArray.length) { + return [["M", 0, 0]]; + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = +pathArray[0][1]; + y = +pathArray[0][2]; + mx = x; + my = y; + start++; + res[0] = ["M", x, y]; + } + var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z"; + for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { + res.push(r = []); + pa = pathArray[i]; + if (pa[0] != upperCase.call(pa[0])) { + r[0] = upperCase.call(pa[0]); + switch (r[0]) { + case "A": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] + x); + r[7] = +(pa[7] + y); + break; + case "V": + r[1] = +pa[1] + y; + break; + case "H": + r[1] = +pa[1] + x; + break; + case "R": + var dots = [x, y][concat](pa.slice(1)); + for (var j = 2, jj = dots.length; j < jj; j++) { + dots[j] = +dots[j] + x; + dots[++j] = +dots[j] + y; + } + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + break; + case "M": + mx = +pa[1] + x; + my = +pa[2] + y; + default: + for (j = 1, jj = pa.length; j < jj; j++) { + r[j] = +pa[j] + ((j % 2) ? x : y); + } + } + } else if (pa[0] == "R") { + dots = [x, y][concat](pa.slice(1)); + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + r = ["R"][concat](pa.slice(-2)); + } else { + for (var k = 0, kk = pa.length; k < kk; k++) { + r[k] = pa[k]; + } + } + switch (r[0]) { + case "Z": + x = mx; + y = my; + break; + case "H": + x = r[1]; + break; + case "V": + y = r[1]; + break; + case "M": + mx = r[r.length - 2]; + my = r[r.length - 1]; + default: + x = r[r.length - 2]; + y = r[r.length - 1]; + } + } + res.toString = R._path2string; + pth.abs = pathClone(res); + return res; + }, + l2c = function (x1, y1, x2, y2) { + return [x1, y1, x2, y2, x2, y2]; + }, + q2c = function (x1, y1, ax, ay, x2, y2) { + var _13 = 1 / 3, + _23 = 2 / 3; + return [ + _13 * x1 + _23 * ax, + _13 * y1 + _23 * ay, + _13 * x2 + _23 * ax, + _13 * y2 + _23 * ay, + x2, + y2 + ]; + }, + a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { + // for more information of where this math came from visit: + // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + var _120 = PI * 120 / 180, + rad = PI / 180 * (+angle || 0), + res = [], + xy, + rotate = cacher(function (x, y, rad) { + var X = x * math.cos(rad) - y * math.sin(rad), + Y = x * math.sin(rad) + y * math.cos(rad); + return {x: X, y: Y}; + }); + if (!recursive) { + xy = rotate(x1, y1, -rad); + x1 = xy.x; + y1 = xy.y; + xy = rotate(x2, y2, -rad); + x2 = xy.x; + y2 = xy.y; + var cos = math.cos(PI / 180 * angle), + sin = math.sin(PI / 180 * angle), + x = (x1 - x2) / 2, + y = (y1 - y2) / 2; + var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); + if (h > 1) { + h = math.sqrt(h); + rx = h * rx; + ry = h * ry; + } + var rx2 = rx * rx, + ry2 = ry * ry, + k = (large_arc_flag == sweep_flag ? -1 : 1) * + math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), + cx = k * rx * y / ry + (x1 + x2) / 2, + cy = k * -ry * x / rx + (y1 + y2) / 2, + f1 = math.asin(((y1 - cy) / ry).toFixed(9)), + f2 = math.asin(((y2 - cy) / ry).toFixed(9)); + + f1 = x1 < cx ? PI - f1 : f1; + f2 = x2 < cx ? PI - f2 : f2; + f1 < 0 && (f1 = PI * 2 + f1); + f2 < 0 && (f2 = PI * 2 + f2); + if (sweep_flag && f1 > f2) { + f1 = f1 - PI * 2; + } + if (!sweep_flag && f2 > f1) { + f2 = f2 - PI * 2; + } + } else { + f1 = recursive[0]; + f2 = recursive[1]; + cx = recursive[2]; + cy = recursive[3]; + } + var df = f2 - f1; + if (abs(df) > _120) { + var f2old = f2, + x2old = x2, + y2old = y2; + f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); + x2 = cx + rx * math.cos(f2); + y2 = cy + ry * math.sin(f2); + res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); + } + df = f2 - f1; + var c1 = math.cos(f1), + s1 = math.sin(f1), + c2 = math.cos(f2), + s2 = math.sin(f2), + t = math.tan(df / 4), + hx = 4 / 3 * rx * t, + hy = 4 / 3 * ry * t, + m1 = [x1, y1], + m2 = [x1 + hx * s1, y1 - hy * c1], + m3 = [x2 + hx * s2, y2 - hy * c2], + m4 = [x2, y2]; + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + if (recursive) { + return [m2, m3, m4][concat](res); + } else { + res = [m2, m3, m4][concat](res).join()[split](","); + var newres = []; + for (var i = 0, ii = res.length; i < ii; i++) { + newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; + } + return newres; + } + }, + findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t; + return { + x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, + y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y + }; + }, + curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), + b = 2 * (c1x - p1x) - 2 * (c2x - c1x), + c = p1x - c1x, + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, + y = [p1y, p2y], + x = [p1x, p2x], + dot; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); + b = 2 * (c1y - p1y) - 2 * (c2y - c1y); + c = p1y - c1y; + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + return { + min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, + max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} + }; + }), + path2curve = R._path2curve = cacher(function (path, path2) { + var pth = !path2 && paths(path); + if (!path2 && pth.curve) { + return pathClone(pth.curve); + } + var p = pathToAbsolute(path), + p2 = path2 && pathToAbsolute(path2), + attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + processPath = function (path, d, pcom) { + var nx, ny, tq = {T:1, Q:1}; + if (!path) { + return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; + } + !(path[0] in tq) && (d.qx = d.qy = null); + switch (path[0]) { + case "M": + d.X = path[1]; + d.Y = path[2]; + break; + case "A": + path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); + break; + case "S": + if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S. + nx = d.x * 2 - d.bx; // And reflect the previous + ny = d.y * 2 - d.by; // command's control point relative to the current point. + } + else { // or some else or nothing + nx = d.x; + ny = d.y; + } + path = ["C", nx, ny][concat](path.slice(1)); + break; + case "T": + if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T. + d.qx = d.x * 2 - d.qx; // And make a reflection similar + d.qy = d.y * 2 - d.qy; // to case "S". + } + else { // or something else or nothing + d.qx = d.x; + d.qy = d.y; + } + path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); + break; + case "Q": + d.qx = path[1]; + d.qy = path[2]; + path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); + break; + case "L": + path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); + break; + case "H": + path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); + break; + case "V": + path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); + break; + case "Z": + path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); + break; + } + return path; + }, + fixArc = function (pp, i) { + if (pp[i].length > 7) { + pp[i].shift(); + var pi = pp[i]; + while (pi.length) { + pcoms1[i]="A"; // if created multiple C:s, their original seg is saved + p2 && (pcoms2[i]="A"); // the same as above + pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); + } + pp.splice(i, 1); + ii = mmax(p.length, p2 && p2.length || 0); + } + }, + fixM = function (path1, path2, a1, a2, i) { + if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { + path2.splice(i, 0, ["M", a2.x, a2.y]); + a1.bx = 0; + a1.by = 0; + a1.x = path1[i][1]; + a1.y = path1[i][2]; + ii = mmax(p.length, p2 && p2.length || 0); + } + }, + pcoms1 = [], // path commands of original path p + pcoms2 = [], // path commands of original path p2 + pfirst = "", // temporary holder for original path command + pcom = ""; // holder for previous path command of original path + for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { + p[i] && (pfirst = p[i][0]); // save current path command + + if (pfirst != "C") // C is not saved yet, because it may be result of conversion + { + pcoms1[i] = pfirst; // Save current path command + i && ( pcom = pcoms1[i-1]); // Get previous path command pcom + } + p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath + + if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command + // which may produce multiple C:s + // so we have to make sure that C is also C in original path + + fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 + + if (p2) { // the same procedures is done to p2 + p2[i] && (pfirst = p2[i][0]); + if (pfirst != "C") + { + pcoms2[i] = pfirst; + i && (pcom = pcoms2[i-1]); + } + p2[i] = processPath(p2[i], attrs2, pcom); + + if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C"; + + fixArc(p2, i); + } + fixM(p, p2, attrs, attrs2, i); + fixM(p2, p, attrs2, attrs, i); + var seg = p[i], + seg2 = p2 && p2[i], + seglen = seg.length, + seg2len = p2 && seg2.length; + attrs.x = seg[seglen - 2]; + attrs.y = seg[seglen - 1]; + attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; + attrs.by = toFloat(seg[seglen - 3]) || attrs.y; + attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); + attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); + attrs2.x = p2 && seg2[seg2len - 2]; + attrs2.y = p2 && seg2[seg2len - 1]; + } + if (!p2) { + pth.curve = pathClone(p); + } + return p2 ? [p, p2] : p; + }, null, pathClone), + parseDots = R._parseDots = cacher(function (gradient) { + var dots = []; + for (var i = 0, ii = gradient.length; i < ii; i++) { + var dot = {}, + par = gradient[i].match(/^([^:]*):?([\d\.]*)/); + dot.color = R.getRGB(par[1]); + if (dot.color.error) { + return null; + } + dot.opacity = dot.color.opacity; + dot.color = dot.color.hex; + par[2] && (dot.offset = par[2] + "%"); + dots.push(dot); + } + for (i = 1, ii = dots.length - 1; i < ii; i++) { + if (!dots[i].offset) { + var start = toFloat(dots[i - 1].offset || 0), + end = 0; + for (var j = i + 1; j < ii; j++) { + if (dots[j].offset) { + end = dots[j].offset; + break; + } + } + if (!end) { + end = 100; + j = ii; + } + end = toFloat(end); + var d = (end - start) / (j - i + 1); + for (; i < j; i++) { + start += d; + dots[i].offset = start + "%"; + } + } + } + return dots; + }), + tear = R._tear = function (el, paper) { + el == paper.top && (paper.top = el.prev); + el == paper.bottom && (paper.bottom = el.next); + el.next && (el.next.prev = el.prev); + el.prev && (el.prev.next = el.next); + }, + tofront = R._tofront = function (el, paper) { + if (paper.top === el) { + return; + } + tear(el, paper); + el.next = null; + el.prev = paper.top; + paper.top.next = el; + paper.top = el; + }, + toback = R._toback = function (el, paper) { + if (paper.bottom === el) { + return; + } + tear(el, paper); + el.next = paper.bottom; + el.prev = null; + paper.bottom.prev = el; + paper.bottom = el; + }, + insertafter = R._insertafter = function (el, el2, paper) { + tear(el, paper); + el2 == paper.top && (paper.top = el); + el2.next && (el2.next.prev = el); + el.next = el2.next; + el.prev = el2; + el2.next = el; + }, + insertbefore = R._insertbefore = function (el, el2, paper) { + tear(el, paper); + el2 == paper.bottom && (paper.bottom = el); + el2.prev && (el2.prev.next = el); + el.prev = el2.prev; + el2.prev = el; + el.next = el2; + }, + /*\ + * Raphael.toMatrix + [ method ] + ** + * Utility method + ** + * Returns matrix of transformations applied to a given path + > Parameters + - path (string) path string + - transform (string|array) transformation string + = (object) @Matrix + \*/ + toMatrix = R.toMatrix = function (path, transform) { + var bb = pathDimensions(path), + el = { + _: { + transform: E + }, + getBBox: function () { + return bb; + } + }; + extractTransform(el, transform); + return el.matrix; + }, + /*\ + * Raphael.transformPath + [ method ] + ** + * Utility method + ** + * Returns path transformed by a given transformation + > Parameters + - path (string) path string + - transform (string|array) transformation string + = (string) path + \*/ + transformPath = R.transformPath = function (path, transform) { + return mapPath(path, toMatrix(path, transform)); + }, + extractTransform = R._extractTransform = function (el, tstr) { + if (tstr == null) { + return el._.transform; + } + tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); + var tdata = R.parseTransformString(tstr), + deg = 0, + dx = 0, + dy = 0, + sx = 1, + sy = 1, + _ = el._, + m = new Matrix; + _.transform = tdata || []; + if (tdata) { + for (var i = 0, ii = tdata.length; i < ii; i++) { + var t = tdata[i], + tlen = t.length, + command = Str(t[0]).toLowerCase(), + absolute = t[0] != command, + inver = absolute ? m.invert() : 0, + x1, + y1, + x2, + y2, + bb; + if (command == "t" && tlen == 3) { + if (absolute) { + x1 = inver.x(0, 0); + y1 = inver.y(0, 0); + x2 = inver.x(t[1], t[2]); + y2 = inver.y(t[1], t[2]); + m.translate(x2 - x1, y2 - y1); + } else { + m.translate(t[1], t[2]); + } + } else if (command == "r") { + if (tlen == 2) { + bb = bb || el.getBBox(1); + m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); + deg += t[1]; + } else if (tlen == 4) { + if (absolute) { + x2 = inver.x(t[2], t[3]); + y2 = inver.y(t[2], t[3]); + m.rotate(t[1], x2, y2); + } else { + m.rotate(t[1], t[2], t[3]); + } + deg += t[1]; + } + } else if (command == "s") { + if (tlen == 2 || tlen == 3) { + bb = bb || el.getBBox(1); + m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); + sx *= t[1]; + sy *= t[tlen - 1]; + } else if (tlen == 5) { + if (absolute) { + x2 = inver.x(t[3], t[4]); + y2 = inver.y(t[3], t[4]); + m.scale(t[1], t[2], x2, y2); + } else { + m.scale(t[1], t[2], t[3], t[4]); + } + sx *= t[1]; + sy *= t[2]; + } + } else if (command == "m" && tlen == 7) { + m.add(t[1], t[2], t[3], t[4], t[5], t[6]); + } + _.dirtyT = 1; + el.matrix = m; + } + } + + /*\ + * Element.matrix + [ property (object) ] + ** + * Keeps @Matrix object, which represents element transformation + \*/ + el.matrix = m; + + _.sx = sx; + _.sy = sy; + _.deg = deg; + _.dx = dx = m.e; + _.dy = dy = m.f; + + if (sx == 1 && sy == 1 && !deg && _.bbox) { + _.bbox.x += +dx; + _.bbox.y += +dy; + } else { + _.dirtyT = 1; + } + }, + getEmpty = function (item) { + var l = item[0]; + switch (l.toLowerCase()) { + case "t": return [l, 0, 0]; + case "m": return [l, 1, 0, 0, 1, 0, 0]; + case "r": if (item.length == 4) { + return [l, 0, item[2], item[3]]; + } else { + return [l, 0]; + } + case "s": if (item.length == 5) { + return [l, 1, 1, item[3], item[4]]; + } else if (item.length == 3) { + return [l, 1, 1]; + } else { + return [l, 1]; + } + } + }, + equaliseTransform = R._equaliseTransform = function (t1, t2) { + t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); + t1 = R.parseTransformString(t1) || []; + t2 = R.parseTransformString(t2) || []; + var maxlength = mmax(t1.length, t2.length), + from = [], + to = [], + i = 0, j, jj, + tt1, tt2; + for (; i < maxlength; i++) { + tt1 = t1[i] || getEmpty(t2[i]); + tt2 = t2[i] || getEmpty(tt1); + if ((tt1[0] != tt2[0]) || + (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || + (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) + ) { + return; + } + from[i] = []; + to[i] = []; + for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { + j in tt1 && (from[i][j] = tt1[j]); + j in tt2 && (to[i][j] = tt2[j]); + } + } + return { + from: from, + to: to + }; + }; + R._getContainer = function (x, y, w, h) { + var container; + container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; + if (container == null) { + return; + } + if (container.tagName) { + if (y == null) { + return { + container: container, + width: container.style.pixelWidth || container.offsetWidth, + height: container.style.pixelHeight || container.offsetHeight + }; + } else { + return { + container: container, + width: y, + height: w + }; + } + } + return { + container: 1, + x: x, + y: y, + width: w, + height: h + }; + }; + /*\ + * Raphael.pathToRelative + [ method ] + ** + * Utility method + ** + * Converts path to relative form + > Parameters + - pathString (string|array) path string or array of segments + = (array) array of segments. + \*/ + R.pathToRelative = pathToRelative; + R._engine = {}; + /*\ + * Raphael.path2curve + [ method ] + ** + * Utility method + ** + * Converts path to a new path where all segments are cubic bezier curves. + > Parameters + - pathString (string|array) path string or array of segments + = (array) array of segments. + \*/ + R.path2curve = path2curve; + /*\ + * Raphael.matrix + [ method ] + ** + * Utility method + ** + * Returns matrix based on given parameters. + > Parameters + - a (number) + - b (number) + - c (number) + - d (number) + - e (number) + - f (number) + = (object) @Matrix + \*/ + R.matrix = function (a, b, c, d, e, f) { + return new Matrix(a, b, c, d, e, f); + }; + function Matrix(a, b, c, d, e, f) { + if (a != null) { + this.a = +a; + this.b = +b; + this.c = +c; + this.d = +d; + this.e = +e; + this.f = +f; + } else { + this.a = 1; + this.b = 0; + this.c = 0; + this.d = 1; + this.e = 0; + this.f = 0; + } + } + (function (matrixproto) { + /*\ + * Matrix.add + [ method ] + ** + * Adds given matrix to existing one. + > Parameters + - a (number) + - b (number) + - c (number) + - d (number) + - e (number) + - f (number) + or + - matrix (object) @Matrix + \*/ + matrixproto.add = function (a, b, c, d, e, f) { + var out = [[], [], []], + m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], + matrix = [[a, c, e], [b, d, f], [0, 0, 1]], + x, y, z, res; + + if (a && a instanceof Matrix) { + matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; + } + + for (x = 0; x < 3; x++) { + for (y = 0; y < 3; y++) { + res = 0; + for (z = 0; z < 3; z++) { + res += m[x][z] * matrix[z][y]; + } + out[x][y] = res; + } + } + this.a = out[0][0]; + this.b = out[1][0]; + this.c = out[0][1]; + this.d = out[1][1]; + this.e = out[0][2]; + this.f = out[1][2]; + }; + /*\ + * Matrix.invert + [ method ] + ** + * Returns inverted version of the matrix + = (object) @Matrix + \*/ + matrixproto.invert = function () { + var me = this, + x = me.a * me.d - me.b * me.c; + return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); + }; + /*\ + * Matrix.clone + [ method ] + ** + * Returns copy of the matrix + = (object) @Matrix + \*/ + matrixproto.clone = function () { + return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); + }; + /*\ + * Matrix.translate + [ method ] + ** + * Translate the matrix + > Parameters + - x (number) + - y (number) + \*/ + matrixproto.translate = function (x, y) { + this.add(1, 0, 0, 1, x, y); + }; + /*\ + * Matrix.scale + [ method ] + ** + * Scales the matrix + > Parameters + - x (number) + - y (number) #optional + - cx (number) #optional + - cy (number) #optional + \*/ + matrixproto.scale = function (x, y, cx, cy) { + y == null && (y = x); + (cx || cy) && this.add(1, 0, 0, 1, cx, cy); + this.add(x, 0, 0, y, 0, 0); + (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); + }; + /*\ + * Matrix.rotate + [ method ] + ** + * Rotates the matrix + > Parameters + - a (number) + - x (number) + - y (number) + \*/ + matrixproto.rotate = function (a, x, y) { + a = R.rad(a); + x = x || 0; + y = y || 0; + var cos = +math.cos(a).toFixed(9), + sin = +math.sin(a).toFixed(9); + this.add(cos, sin, -sin, cos, x, y); + this.add(1, 0, 0, 1, -x, -y); + }; + /*\ + * Matrix.x + [ method ] + ** + * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y + > Parameters + - x (number) + - y (number) + = (number) x + \*/ + matrixproto.x = function (x, y) { + return x * this.a + y * this.c + this.e; + }; + /*\ + * Matrix.y + [ method ] + ** + * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x + > Parameters + - x (number) + - y (number) + = (number) y + \*/ + matrixproto.y = function (x, y) { + return x * this.b + y * this.d + this.f; + }; + matrixproto.get = function (i) { + return +this[Str.fromCharCode(97 + i)].toFixed(4); + }; + matrixproto.toString = function () { + return R.svg ? + "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : + [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); + }; + matrixproto.toFilter = function () { + return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; + }; + matrixproto.offset = function () { + return [this.e.toFixed(4), this.f.toFixed(4)]; + }; + function norm(a) { + return a[0] * a[0] + a[1] * a[1]; + } + function normalize(a) { + var mag = math.sqrt(norm(a)); + a[0] && (a[0] /= mag); + a[1] && (a[1] /= mag); + } + /*\ + * Matrix.split + [ method ] + ** + * Splits matrix into primitive transformations + = (object) in format: + o dx (number) translation by x + o dy (number) translation by y + o scalex (number) scale by x + o scaley (number) scale by y + o shear (number) shear + o rotate (number) rotation in deg + o isSimple (boolean) could it be represented via simple transformations + \*/ + matrixproto.split = function () { + var out = {}; + // translation + out.dx = this.e; + out.dy = this.f; + + // scale and shear + var row = [[this.a, this.c], [this.b, this.d]]; + out.scalex = math.sqrt(norm(row[0])); + normalize(row[0]); + + out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; + row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; + + out.scaley = math.sqrt(norm(row[1])); + normalize(row[1]); + out.shear /= out.scaley; + + // rotation + var sin = -row[0][1], + cos = row[1][1]; + if (cos < 0) { + out.rotate = R.deg(math.acos(cos)); + if (sin < 0) { + out.rotate = 360 - out.rotate; + } + } else { + out.rotate = R.deg(math.asin(sin)); + } + + out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); + out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; + out.noRotation = !+out.shear.toFixed(9) && !out.rotate; + return out; + }; + /*\ + * Matrix.toTransformString + [ method ] + ** + * Return transform string that represents given matrix + = (string) transform string + \*/ + matrixproto.toTransformString = function (shorter) { + var s = shorter || this[split](); + if (s.isSimple) { + s.scalex = +s.scalex.toFixed(4); + s.scaley = +s.scaley.toFixed(4); + s.rotate = +s.rotate.toFixed(4); + return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + + (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + + (s.rotate ? "r" + [s.rotate, 0, 0] : E); + } else { + return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; + } + }; + })(Matrix.prototype); + + var preventDefault = function () { + this.returnValue = false; + }, + preventTouch = function () { + return this.originalEvent.preventDefault(); + }, + stopPropagation = function () { + this.cancelBubble = true; + }, + stopTouch = function () { + return this.originalEvent.stopPropagation(); + }, + getEventPosition = function (e) { + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; + + return { + x: e.clientX + scrollX, + y: e.clientY + scrollY + }; + }, + addEvent = (function () { + if (g.doc.addEventListener) { + return function (obj, type, fn, element) { + var f = function (e) { + var pos = getEventPosition(e); + return fn.call(element, e, pos.x, pos.y); + }; + obj.addEventListener(type, f, false); + + if (supportsTouch && touchMap[type]) { + var _f = function (e) { + var pos = getEventPosition(e), + olde = e; + + for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { + if (e.targetTouches[i].target == obj) { + e = e.targetTouches[i]; + e.originalEvent = olde; + e.preventDefault = preventTouch; + e.stopPropagation = stopTouch; + break; + } + } + + return fn.call(element, e, pos.x, pos.y); + }; + obj.addEventListener(touchMap[type], _f, false); + } + + return function () { + obj.removeEventListener(type, f, false); + + if (supportsTouch && touchMap[type]) + obj.removeEventListener(touchMap[type], _f, false); + + return true; + }; + }; + } else if (g.doc.attachEvent) { + return function (obj, type, fn, element) { + var f = function (e) { + e = e || g.win.event; + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + x = e.clientX + scrollX, + y = e.clientY + scrollY; + e.preventDefault = e.preventDefault || preventDefault; + e.stopPropagation = e.stopPropagation || stopPropagation; + return fn.call(element, e, x, y); + }; + obj.attachEvent("on" + type, f); + var detacher = function () { + obj.detachEvent("on" + type, f); + return true; + }; + return detacher; + }; + } + })(), + drag = [], + dragMove = function (e) { + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + dragi, + j = drag.length; + while (j--) { + dragi = drag[j]; + if (supportsTouch && e.touches) { + var i = e.touches.length, + touch; + while (i--) { + touch = e.touches[i]; + if (touch.identifier == dragi.el._drag.id) { + x = touch.clientX; + y = touch.clientY; + (e.originalEvent ? e.originalEvent : e).preventDefault(); + break; + } + } + } else { + e.preventDefault(); + } + var node = dragi.el.node, + o, + next = node.nextSibling, + parent = node.parentNode, + display = node.style.display; + g.win.opera && parent.removeChild(node); + node.style.display = "none"; + o = dragi.el.paper.getElementByPoint(x, y); + node.style.display = display; + g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); + o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o); + x += scrollX; + y += scrollY; + eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); + } + }, + dragUp = function (e) { + R.unmousemove(dragMove).unmouseup(dragUp); + var i = drag.length, + dragi; + while (i--) { + dragi = drag[i]; + dragi.el._drag = {}; + eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); + } + drag = []; + }, + /*\ + * Raphael.el + [ property (object) ] + ** + * You can add your own method to elements. This is usefull when you want to hack default functionality or + * want to wrap some common transformation or attributes in one method. In difference to canvas methods, + * you can redefine element method at any time. Expending element methods wouldn’t affect set. + > Usage + | Raphael.el.red = function () { + | this.attr({fill: "#f00"}); + | }; + | // then use it + | paper.circle(100, 100, 20).red(); + \*/ + elproto = R.el = {}; + /*\ + * Element.click + [ method ] + ** + * Adds event handler for click for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unclick + [ method ] + ** + * Removes event handler for click for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.dblclick + [ method ] + ** + * Adds event handler for double click for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.undblclick + [ method ] + ** + * Removes event handler for double click for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mousedown + [ method ] + ** + * Adds event handler for mousedown for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmousedown + [ method ] + ** + * Removes event handler for mousedown for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mousemove + [ method ] + ** + * Adds event handler for mousemove for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmousemove + [ method ] + ** + * Removes event handler for mousemove for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseout + [ method ] + ** + * Adds event handler for mouseout for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseout + [ method ] + ** + * Removes event handler for mouseout for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseover + [ method ] + ** + * Adds event handler for mouseover for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseover + [ method ] + ** + * Removes event handler for mouseover for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseup + [ method ] + ** + * Adds event handler for mouseup for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseup + [ method ] + ** + * Removes event handler for mouseup for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchstart + [ method ] + ** + * Adds event handler for touchstart for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchstart + [ method ] + ** + * Removes event handler for touchstart for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchmove + [ method ] + ** + * Adds event handler for touchmove for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchmove + [ method ] + ** + * Removes event handler for touchmove for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchend + [ method ] + ** + * Adds event handler for touchend for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchend + [ method ] + ** + * Removes event handler for touchend for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchcancel + [ method ] + ** + * Adds event handler for touchcancel for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchcancel + [ method ] + ** + * Removes event handler for touchcancel for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + for (var i = events.length; i--;) { + (function (eventName) { + R[eventName] = elproto[eventName] = function (fn, scope) { + if (R.is(fn, "function")) { + this.events = this.events || []; + this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); + } + return this; + }; + R["un" + eventName] = elproto["un" + eventName] = function (fn) { + var events = this.events || [], + l = events.length; + while (l--){ + if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) { + events[l].unbind(); + events.splice(l, 1); + !events.length && delete this.events; + } + } + return this; + }; + })(events[i]); + } + + /*\ + * Element.data + [ method ] + ** + * Adds or retrieves given value asociated with given key. + ** + * See also @Element.removeData + > Parameters + - key (string) key to store data + - value (any) #optional value to store + = (object) @Element + * or, if value is not specified: + = (any) value + * or, if key and value are not specified: + = (object) Key/value pairs for all the data associated with the element. + > Usage + | for (var i = 0, i < 5, i++) { + | paper.circle(10 + 15 * i, 10, 10) + | .attr({fill: "#000"}) + | .data("i", i) + | .click(function () { + | alert(this.data("i")); + | }); + | } + \*/ + elproto.data = function (key, value) { + var data = eldata[this.id] = eldata[this.id] || {}; + if (arguments.length == 0) { + return data; + } + if (arguments.length == 1) { + if (R.is(key, "object")) { + for (var i in key) if (key[has](i)) { + this.data(i, key[i]); + } + return this; + } + eve("raphael.data.get." + this.id, this, data[key], key); + return data[key]; + } + data[key] = value; + eve("raphael.data.set." + this.id, this, value, key); + return this; + }; + + elproto.datum = function(){ + return arguments.length == 0 ? this._bindData : ((this._bindData = arguments[0]), this); + }; + + /*\ + * Element.removeData + [ method ] + ** + * Removes value associated with an element by given key. + * If key is not provided, removes all the data of the element. + > Parameters + - key (string) #optional key + = (object) @Element + \*/ + elproto.removeData = function (key) { + if (key == null) { + eldata[this.id] = {}; + } else { + eldata[this.id] && delete eldata[this.id][key]; + } + return this; + }; + /*\ + * Element.getData + [ method ] + ** + * Retrieves the element data + = (object) data + \*/ + elproto.getData = function () { + return clone(eldata[this.id] || {}); + }; + /*\ + * Element.hover + [ method ] + ** + * Adds event handlers for hover for the element. + > Parameters + - f_in (function) handler for hover in + - f_out (function) handler for hover out + - icontext (object) #optional context for hover in handler + - ocontext (object) #optional context for hover out handler + = (object) @Element + \*/ + elproto.hover = function (f_in, f_out, scope_in, scope_out) { + return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); + }; + /*\ + * Element.unhover + [ method ] + ** + * Removes event handlers for hover for the element. + > Parameters + - f_in (function) handler for hover in + - f_out (function) handler for hover out + = (object) @Element + \*/ + elproto.unhover = function (f_in, f_out) { + return this.unmouseover(f_in).unmouseout(f_out); + }; + var draggable = []; + /*\ + * Element.drag + [ method ] + ** + * Adds event handlers for drag of the element. + > Parameters + - onmove (function) handler for moving + - onstart (function) handler for drag start + - onend (function) handler for drag end + - mcontext (object) #optional context for moving handler + - scontext (object) #optional context for drag start handler + - econtext (object) #optional context for drag end handler + * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start, + * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element + * `drag.over.<id>` will be fired as well. + * + * Start event and start handler will be called in specified context or in context of the element with following parameters: + o x (number) x position of the mouse + o y (number) y position of the mouse + o event (object) DOM event object + * Move event and move handler will be called in specified context or in context of the element with following parameters: + o dx (number) shift by x from the start point + o dy (number) shift by y from the start point + o x (number) x position of the mouse + o y (number) y position of the mouse + o event (object) DOM event object + * End event and end handler will be called in specified context or in context of the element with following parameters: + o event (object) DOM event object + = (object) @Element + \*/ + elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { + function start(e) { + (e.originalEvent || e).preventDefault(); + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; + this._drag.id = e.identifier; + if (supportsTouch && e.touches) { + var i = e.touches.length, touch; + while (i--) { + touch = e.touches[i]; + this._drag.id = touch.identifier; + if (touch.identifier == this._drag.id) { + x = touch.clientX; + y = touch.clientY; + break; + } + } + } + this._drag.x = x + scrollX; + this._drag.y = y + scrollY; + !drag.length && R.mousemove(dragMove).mouseup(dragUp); + drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); + onstart && eve.on("raphael.drag.start." + this.id, onstart); + onmove && eve.on("raphael.drag.move." + this.id, onmove); + onend && eve.on("raphael.drag.end." + this.id, onend); + eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); + } + this._drag = {}; + draggable.push({el: this, start: start}); + this.mousedown(start); + return this; + }; + /*\ + * Element.onDragOver + [ method ] + ** + * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id). + > Parameters + - f (function) handler for event, first argument would be the element you are dragging over + \*/ + elproto.onDragOver = function (f) { + f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id); + }; + /*\ + * Element.undrag + [ method ] + ** + * Removes all drag event handlers from given element. + \*/ + elproto.undrag = function () { + var i = draggable.length; + while (i--) if (draggable[i].el == this) { + this.unmousedown(draggable[i].start); + draggable.splice(i, 1); + eve.unbind("raphael.drag.*." + this.id); + } + !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); + drag = []; + }; + /*\ + * Paper.circle + [ method ] + ** + * Draws a circle. + ** + > Parameters + ** + - x (number) x coordinate of the centre + - y (number) y coordinate of the centre + - r (number) radius + = (object) Raphaël element object with type “circle” + ** + > Usage + | var c = paper.circle(50, 50, 40); + \*/ + paperproto.circle = function (x, y, r) { + var out = R._engine.circle(this, x || 0, y || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.rect + [ method ] + * + * Draws a rectangle. + ** + > Parameters + ** + - x (number) x coordinate of the top left corner + - y (number) y coordinate of the top left corner + - width (number) width + - height (number) height + - r (number) #optional radius for rounded corners, default is 0 + = (object) Raphaël element object with type “rect” + ** + > Usage + | // regular rectangle + | var c = paper.rect(10, 10, 50, 50); + | // rectangle with rounded corners + | var c = paper.rect(40, 40, 50, 50, 10); + \*/ + paperproto.rect = function (x, y, w, h, r) { + var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.ellipse + [ method ] + ** + * Draws an ellipse. + ** + > Parameters + ** + - x (number) x coordinate of the centre + - y (number) y coordinate of the centre + - rx (number) horizontal radius + - ry (number) vertical radius + = (object) Raphaël element object with type “ellipse” + ** + > Usage + | var c = paper.ellipse(50, 50, 40, 20); + \*/ + paperproto.ellipse = function (x, y, rx, ry) { + var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.path + [ method ] + ** + * Creates a path element by given path data string. + > Parameters + - pathString (string) #optional path string in SVG format. + * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example: + | "M10,20L30,40" + * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative. + * + # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p> + # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody> + # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr> + # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr> + # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr> + # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr> + # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr> + # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr> + # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr> + # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr> + # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr> + # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr> + # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table> + * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier. + * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning. + > Usage + | var c = paper.path("M10 10L90 90"); + | // draw a diagonal line: + | // move to 10,10, line to 90,90 + * For example of path strings, check out these icons: http://raphaeljs.com/icons/ + \*/ + paperproto.path = function (pathString) { + pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); + var out = R._engine.path(R.format[apply](R, arguments), this); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.image + [ method ] + ** + * Embeds an image into the surface. + ** + > Parameters + ** + - src (string) URI of the source image + - x (number) x coordinate position + - y (number) y coordinate position + - width (number) width of the image + - height (number) height of the image + = (object) Raphaël element object with type “image” + ** + > Usage + | var c = paper.image("apple.png", 10, 10, 80, 80); + \*/ + paperproto.image = function (src, x, y, w, h) { + var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.text + [ method ] + ** + * Draws a text string. If you need line breaks, put “\n” in the string. + ** + > Parameters + ** + - x (number) x coordinate position + - y (number) y coordinate position + - text (string) The text string to draw + = (object) Raphaël element object with type “text” + ** + > Usage + | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); + \*/ + paperproto.text = function (x, y, text) { + var out = R._engine.text(this, x || 0, y || 0, Str(text)); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.set + [ method ] + ** + * Creates array-like object to keep and operate several elements at once. + * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements. + * Sets act as pseudo elements — all methods available to an element can be used on a set. + = (object) array-like object that represents set of elements + ** + > Usage + | var st = paper.set(); + | st.push( + | paper.circle(10, 10, 5), + | paper.circle(30, 10, 5) + | ); + | st.attr({fill: "red"}); // changes the fill of both circles + \*/ + paperproto.set = function (itemsArray) { + !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); + var out = new Set(itemsArray); + this.__set__ && this.__set__.push(out); + out["paper"] = this; + out["type"] = "set"; + return out; + }; + /*\ + * Paper.setStart + [ method ] + ** + * Creates @Paper.set. All elements that will be created after calling this method and before calling + * @Paper.setFinish will be added to the set. + ** + > Usage + | paper.setStart(); + | paper.circle(10, 10, 5), + | paper.circle(30, 10, 5) + | var st = paper.setFinish(); + | st.attr({fill: "red"}); // changes the fill of both circles + \*/ + paperproto.setStart = function (set) { + this.__set__ = set || this.set(); + }; + /*\ + * Paper.setFinish + [ method ] + ** + * See @Paper.setStart. This method finishes catching and returns resulting set. + ** + = (object) set + \*/ + paperproto.setFinish = function (set) { + var out = this.__set__; + delete this.__set__; + return out; + }; + /*\ + * Paper.getSize + [ method ] + ** + * Obtains current paper actual size. + ** + = (object) + \*/ + paperproto.getSize = function () { + var container = this.canvas.parentNode; + return { + width: container.offsetWidth, + height: container.offsetHeight + }; + }; + /*\ + * Paper.setSize + [ method ] + ** + * If you need to change dimensions of the canvas call this method + ** + > Parameters + ** + - width (number) new width of the canvas + - height (number) new height of the canvas + \*/ + paperproto.setSize = function (width, height) { + return R._engine.setSize.call(this, width, height); + }; + /*\ + * Paper.setViewBox + [ method ] + ** + * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by + * specifying new boundaries. + ** + > Parameters + ** + - x (number) new x position, default is `0` + - y (number) new y position, default is `0` + - w (number) new width of the canvas + - h (number) new height of the canvas + - fit (boolean) `true` if you want graphics to fit into new boundary box + \*/ + paperproto.setViewBox = function (x, y, w, h, fit) { + return R._engine.setViewBox.call(this, x, y, w, h, fit); + }; + /*\ + * Paper.top + [ property ] + ** + * Points to the topmost element on the paper + \*/ + /*\ + * Paper.bottom + [ property ] + ** + * Points to the bottom element on the paper + \*/ + paperproto.top = paperproto.bottom = null; + /*\ + * Paper.raphael + [ property ] + ** + * Points to the @Raphael object/function + \*/ + paperproto.raphael = R; + var getOffset = function (elem) { + var box = elem.getBoundingClientRect(), + doc = elem.ownerDocument, + body = doc.body, + docElem = doc.documentElement, + clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, + top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, + left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; + return { + y: top, + x: left + }; + }; + /*\ + * Paper.getElementByPoint + [ method ] + ** + * Returns you topmost element under given point. + ** + = (object) Raphaël element object + > Parameters + ** + - x (number) x coordinate from the top left corner of the window + - y (number) y coordinate from the top left corner of the window + > Usage + | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"}); + \*/ + paperproto.getElementByPoint = function (x, y) { + var paper = this, + svg = paper.canvas, + target = g.doc.elementFromPoint(x, y); + if (g.win.opera && target.tagName == "svg") { + var so = getOffset(svg), + sr = svg.createSVGRect(); + sr.x = x - so.x; + sr.y = y - so.y; + sr.width = sr.height = 1; + var hits = svg.getIntersectionList(sr, null); + if (hits.length) { + target = hits[hits.length - 1]; + } + } + if (!target) { + return null; + } + while (target.parentNode && target != svg.parentNode && !target.raphael) { + target = target.parentNode; + } + target == paper.canvas.parentNode && (target = svg); + target = target && target.raphael ? paper.getById(target.raphaelid) : null; + return target; + }; + + /*\ + * Paper.getElementsByBBox + [ method ] + ** + * Returns set of elements that have an intersecting bounding box + ** + > Parameters + ** + - bbox (object) bbox to check with + = (object) @Set + \*/ + paperproto.getElementsByBBox = function (bbox) { + var set = this.set(); + this.forEach(function (el) { + if (R.isBBoxIntersect(el.getBBox(), bbox)) { + set.push(el); + } + }); + return set; + }; + + /*\ + * Paper.getById + [ method ] + ** + * Returns you element by its internal ID. + ** + > Parameters + ** + - id (number) id + = (object) Raphaël element object + \*/ + paperproto.getById = function (id) { + var bot = this.bottom; + while (bot) { + if (bot.id == id) { + return bot; + } + bot = bot.next; + } + return null; + }; + /*\ + * Paper.forEach + [ method ] + ** + * Executes given function for each element on the paper + * + * If callback function returns `false` it will stop loop running. + ** + > Parameters + ** + - callback (function) function to run + - thisArg (object) context object for the callback + = (object) Paper object + > Usage + | paper.forEach(function (el) { + | el.attr({ stroke: "blue" }); + | }); + \*/ + paperproto.forEach = function (callback, thisArg) { + var bot = this.bottom; + while (bot) { + if (callback.call(thisArg, bot) === false) { + return this; + } + bot = bot.next; + } + return this; + }; + /*\ + * Paper.getElementsByPoint + [ method ] + ** + * Returns set of elements that have common point inside + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (object) @Set + \*/ + paperproto.getElementsByPoint = function (x, y) { + var set = this.set(); + this.forEach(function (el) { + if (el.isPointInside(x, y)) { + set.push(el); + } + }); + return set; + }; + function x_y() { + return this.x + S + this.y; + } + function x_y_w_h() { + return this.x + S + this.y + S + this.width + " \xd7 " + this.height; + } + /*\ + * Element.isPointInside + [ method ] + ** + * Determine if given point is inside this element’s shape + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (boolean) `true` if point inside the shape + \*/ + elproto.isPointInside = function (x, y) { + var rp = this.realPath = getPath[this.type](this); + if (this.attr('transform') && this.attr('transform').length) { + rp = R.transformPath(rp, this.attr('transform')); + } + return R.isPointInsidePath(rp, x, y); + }; + /*\ + * Element.getBBox + [ method ] + ** + * Return bounding box for a given element + ** + > Parameters + ** + - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`. + = (object) Bounding box object: + o { + o x: (number) top left corner x + o y: (number) top left corner y + o x2: (number) bottom right corner x + o y2: (number) bottom right corner y + o width: (number) width + o height: (number) height + o } + \*/ + elproto.getBBox = function (isWithoutTransform) { + if (this.removed) { + return {}; + } + var _ = this._; + if (isWithoutTransform) { + if (_.dirty || !_.bboxwt) { + this.realPath = getPath[this.type](this); + _.bboxwt = pathDimensions(this.realPath); + _.bboxwt.toString = x_y_w_h; + _.dirty = 0; + } + return _.bboxwt; + } + if (_.dirty || _.dirtyT || !_.bbox) { + if (_.dirty || !this.realPath) { + _.bboxwt = 0; + this.realPath = getPath[this.type](this); + } + _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); + _.bbox.toString = x_y_w_h; + _.dirty = _.dirtyT = 0; + } + return _.bbox; + }; + /*\ + * Element.clone + [ method ] + ** + = (object) clone of a given element + ** + \*/ + elproto.clone = function () { + if (this.removed) { + return null; + } + var out = this.paper[this.type]().attr(this.attr()); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Element.glow + [ method ] + ** + * Return set of elements that create glow-like effect around given element. See @Paper.set. + * + * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself. + ** + > Parameters + ** + - glow (object) #optional parameters object with all properties optional: + o { + o width (number) size of the glow, default is `10` + o fill (boolean) will it be filled, default is `false` + o opacity (number) opacity, default is `0.5` + o offsetx (number) horizontal offset, default is `0` + o offsety (number) vertical offset, default is `0` + o color (string) glow colour, default is `black` + o } + = (object) @Paper.set of elements that represents glow + \*/ + elproto.glow = function (glow) { + if (this.type == "text") { + return null; + } + glow = glow || {}; + var s = { + width: (glow.width || 10) + (+this.attr("stroke-width") || 1), + fill: glow.fill || false, + opacity: glow.opacity == null ? .5 : glow.opacity, + offsetx: glow.offsetx || 0, + offsety: glow.offsety || 0, + color: glow.color || "#000" + }, + c = s.width / 2, + r = this.paper, + out = r.set(), + path = this.realPath || getPath[this.type](this); + path = this.matrix ? mapPath(path, this.matrix) : path; + for (var i = 1; i < c + 1; i++) { + out.push(r.path(path).attr({ + stroke: s.color, + fill: s.fill ? s.color : "none", + "stroke-linejoin": "round", + "stroke-linecap": "round", + "stroke-width": +(s.width / c * i).toFixed(3), + opacity: +(s.opacity / c).toFixed(3) + })); + } + return out.insertBefore(this).translate(s.offsetx, s.offsety); + }; + var curveslengths = {}, + getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { + if (length == null) { + return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); + } else { + return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); + } + }, + getLengthFactory = function (istotal, subpath) { + return function (path, length, onlystart) { + path = path2curve(path); + var x, y, p, l, sp = "", subpaths = {}, point, + len = 0; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = +p[1]; + y = +p[2]; + } else { + l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + if (len + l > length) { + if (subpath && !subpaths.start) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; + if (onlystart) {return sp;} + subpaths.start = sp; + sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); + len += l; + x = +p[5]; + y = +p[6]; + continue; + } + if (!istotal && !subpath) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + return {x: point.x, y: point.y, alpha: point.alpha}; + } + } + len += l; + x = +p[5]; + y = +p[6]; + } + sp += p.shift() + p; + } + subpaths.end = sp; + point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); + point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); + return point; + }; + }; + var getTotalLength = getLengthFactory(1), + getPointAtLength = getLengthFactory(), + getSubpathsAtLength = getLengthFactory(0, 1); + /*\ + * Raphael.getTotalLength + [ method ] + ** + * Returns length of the given path in pixels. + ** + > Parameters + ** + - path (string) SVG path string. + ** + = (number) length. + \*/ + R.getTotalLength = getTotalLength; + /*\ + * Raphael.getPointAtLength + [ method ] + ** + * Return coordinates of the point located at the given length on the given path. + ** + > Parameters + ** + - path (string) SVG path string + - length (number) + ** + = (object) representation of the point: + o { + o x: (number) x coordinate + o y: (number) y coordinate + o alpha: (number) angle of derivative + o } + \*/ + R.getPointAtLength = getPointAtLength; + /*\ + * Raphael.getSubpath + [ method ] + ** + * Return subpath of a given path from given length to given length. + ** + > Parameters + ** + - path (string) SVG path string + - from (number) position of the start of the segment + - to (number) position of the end of the segment + ** + = (string) pathstring for the segment + \*/ + R.getSubpath = function (path, from, to) { + if (this.getTotalLength(path) - to < 1e-6) { + return getSubpathsAtLength(path, from).end; + } + var a = getSubpathsAtLength(path, to, 1); + return from ? getSubpathsAtLength(a, from).end : a; + }; + /*\ + * Element.getTotalLength + [ method ] + ** + * Returns length of the path in pixels. Only works for element of “path” type. + = (number) length. + \*/ + elproto.getTotalLength = function () { + var path = this.getPath(); + if (!path) { + return; + } + + if (this.node.getTotalLength) { + return this.node.getTotalLength(); + } + + return getTotalLength(path); + }; + /*\ + * Element.getPointAtLength + [ method ] + ** + * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type. + ** + > Parameters + ** + - length (number) + ** + = (object) representation of the point: + o { + o x: (number) x coordinate + o y: (number) y coordinate + o alpha: (number) angle of derivative + o } + \*/ + elproto.getPointAtLength = function (length) { + var path = this.getPath(); + if (!path) { + return; + } + + return getPointAtLength(path, length); + }; + /*\ + * Element.getPath + [ method ] + ** + * Returns path of the element. Only works for elements of “path” type and simple elements like circle. + = (object) path + ** + \*/ + elproto.getPath = function () { + var path, + getPath = R._getPath[this.type]; + + if (this.type == "text" || this.type == "set") { + return; + } + + if (getPath) { + path = getPath(this); + } + + return path; + }; + /*\ + * Element.getSubpath + [ method ] + ** + * Return subpath of a given element from given length to given length. Only works for element of “path” type. + ** + > Parameters + ** + - from (number) position of the start of the segment + - to (number) position of the end of the segment + ** + = (string) pathstring for the segment + \*/ + elproto.getSubpath = function (from, to) { + var path = this.getPath(); + if (!path) { + return; + } + + return R.getSubpath(path, from, to); + }; + /*\ + * Raphael.easing_formulas + [ property ] + ** + * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing: + # <ul> + # <li>“linear”</li> + # <li>“<” or “easeIn” or “ease-in”</li> + # <li>“>” or “easeOut” or “ease-out”</li> + # <li>“<>” or “easeInOut” or “ease-in-out”</li> + # <li>“backIn” or “back-in”</li> + # <li>“backOut” or “back-out”</li> + # <li>“elastic”</li> + # <li>“bounce”</li> + # </ul> + # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p> + \*/ + var ef = R.easing_formulas = { + linear: function (n) { + return n; + }, + "<": function (n) { + return pow(n, 1.7); + }, + ">": function (n) { + return pow(n, .48); + }, + "<>": function (n) { + var q = .48 - n / 1.04, + Q = math.sqrt(.1734 + q * q), + x = Q - q, + X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), + y = -Q - q, + Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), + t = X + Y + .5; + return (1 - t) * 3 * t * t + t * t * t; + }, + backIn: function (n) { + var s = 1.70158; + return n * n * ((s + 1) * n - s); + }, + backOut: function (n) { + n = n - 1; + var s = 1.70158; + return n * n * ((s + 1) * n + s) + 1; + }, + elastic: function (n) { + if (n == !!n) { + return n; + } + return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; + }, + bounce: function (n) { + var s = 7.5625, + p = 2.75, + l; + if (n < (1 / p)) { + l = s * n * n; + } else { + if (n < (2 / p)) { + n -= (1.5 / p); + l = s * n * n + .75; + } else { + if (n < (2.5 / p)) { + n -= (2.25 / p); + l = s * n * n + .9375; + } else { + n -= (2.625 / p); + l = s * n * n + .984375; + } + } + } + return l; + } + }; + ef.easeIn = ef["ease-in"] = ef["<"]; + ef.easeOut = ef["ease-out"] = ef[">"]; + ef.easeInOut = ef["ease-in-out"] = ef["<>"]; + ef["back-in"] = ef.backIn; + ef["back-out"] = ef.backOut; + + var animationElements = [], + requestAnimFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + setTimeout(callback, 16); + }, + animation = function () { + var Now = +new Date, + l = 0; + for (; l < animationElements.length; l++) { + var e = animationElements[l]; + if (e.el.removed || e.paused) { + continue; + } + var time = Now - e.start, + ms = e.ms, + easing = e.easing, + from = e.from, + diff = e.diff, + to = e.to, + t = e.t, + that = e.el, + set = {}, + now, + init = {}, + key; + if (e.initstatus) { + time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; + e.status = e.initstatus; + delete e.initstatus; + e.stop && animationElements.splice(l--, 1); + } else { + e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; + } + if (time < 0) { + continue; + } + if (time < ms) { + var pos = easing(time / ms); + for (var attr in from) if (from[has](attr)) { + switch (availableAnimAttrs[attr]) { + case nu: + now = +from[attr] + pos * ms * diff[attr]; + break; + case "colour": + now = "rgb(" + [ + upto255(round(from[attr].r + pos * ms * diff[attr].r)), + upto255(round(from[attr].g + pos * ms * diff[attr].g)), + upto255(round(from[attr].b + pos * ms * diff[attr].b)) + ].join(",") + ")"; + break; + case "path": + now = []; + for (var i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + now[i] = now[i].join(S); + } + now = now.join(S); + break; + case "transform": + if (diff[attr].real) { + now = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + } + } else { + var get = function (i) { + return +from[attr][i] + pos * ms * diff[attr][i]; + }; + // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; + now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; + } + break; + case "csv": + if (attr == "clip-rect") { + now = []; + i = 4; + while (i--) { + now[i] = +from[attr][i] + pos * ms * diff[attr][i]; + } + } + break; + default: + var from2 = [][concat](from[attr]); + now = []; + i = that.paper.customAttributes[attr].length; + while (i--) { + now[i] = +from2[i] + pos * ms * diff[attr][i]; + } + break; + } + set[attr] = now; + } + that.attr(set); + (function (id, that, anim) { + setTimeout(function () { + eve("raphael.anim.frame." + id, that, anim); + }); + })(that.id, that, e.anim); + } else { + (function(f, el, a) { + setTimeout(function() { + eve("raphael.anim.frame." + el.id, el, a); + eve("raphael.anim.finish." + el.id, el, a); + R.is(f, "function") && f.call(el); + }); + })(e.callback, that, e.anim); + that.attr(to); + animationElements.splice(l--, 1); + if (e.repeat > 1 && !e.next) { + for (key in to) if (to[has](key)) { + init[key] = e.totalOrigin[key]; + } + e.el.attr(init); + runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); + } + if (e.next && !e.stop) { + runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); + } + } + } + animationElements.length && requestAnimFrame(animation); + }, + upto255 = function (color) { + return color > 255 ? 255 : color < 0 ? 0 : color; + }; + /*\ + * Element.animateWith + [ method ] + ** + * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element. + ** + > Parameters + ** + - el (object) element to sync with + - anim (object) animation to sync with + - params (object) #optional final attributes for the element, see also @Element.attr + - ms (number) #optional number of milliseconds for animation to run + - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + * or + - element (object) element to sync with + - anim (object) animation to sync with + - animation (object) #optional animation object, see @Raphael.animation + ** + = (object) original element + \*/ + elproto.animateWith = function (el, anim, params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback), + x, y; + runAnimation(a, element, a.percents[0], null, element.attr()); + for (var i = 0, ii = animationElements.length; i < ii; i++) { + if (animationElements[i].anim == anim && animationElements[i].el == el) { + animationElements[ii - 1].start = animationElements[i].start; + break; + } + } + return element; + // + // + // var a = params ? R.animation(params, ms, easing, callback) : anim, + // status = element.status(anim); + // return this.animate(a).status(a, status * anim.ms / a.ms); + }; + function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { + var cx = 3 * p1x, + bx = 3 * (p2x - p1x) - cx, + ax = 1 - cx - bx, + cy = 3 * p1y, + by = 3 * (p2y - p1y) - cy, + ay = 1 - cy - by; + function sampleCurveX(t) { + return ((ax * t + bx) * t + cx) * t; + } + function solve(x, epsilon) { + var t = solveCurveX(x, epsilon); + return ((ay * t + by) * t + cy) * t; + } + function solveCurveX(x, epsilon) { + var t0, t1, t2, x2, d2, i; + for(t2 = x, i = 0; i < 8; i++) { + x2 = sampleCurveX(t2) - x; + if (abs(x2) < epsilon) { + return t2; + } + d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; + if (abs(d2) < 1e-6) { + break; + } + t2 = t2 - x2 / d2; + } + t0 = 0; + t1 = 1; + t2 = x; + if (t2 < t0) { + return t0; + } + if (t2 > t1) { + return t1; + } + while (t0 < t1) { + x2 = sampleCurveX(t2); + if (abs(x2 - x) < epsilon) { + return t2; + } + if (x > x2) { + t0 = t2; + } else { + t1 = t2; + } + t2 = (t1 - t0) / 2 + t0; + } + return t2; + } + return solve(t, 1 / (200 * duration)); + } + elproto.onAnimation = function (f) { + f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id); + return this; + }; + function Animation(anim, ms) { + var percents = [], + newAnim = {}; + this.ms = ms; + this.times = 1; + if (anim) { + for (var attr in anim) if (anim[has](attr)) { + newAnim[toFloat(attr)] = anim[attr]; + percents.push(toFloat(attr)); + } + percents.sort(sortByNumber); + } + this.anim = newAnim; + this.top = percents[percents.length - 1]; + this.percents = percents; + } + /*\ + * Animation.delay + [ method ] + ** + * Creates a copy of existing animation object with given delay. + ** + > Parameters + ** + - delay (number) number of ms to pass between animation start and actual animation + ** + = (object) new altered Animation object + | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3); + | circle1.animate(anim); // run the given animation immediately + | circle2.animate(anim.delay(500)); // run the given animation after 500 ms + \*/ + Animation.prototype.delay = function (delay) { + var a = new Animation(this.anim, this.ms); + a.times = this.times; + a.del = +delay || 0; + return a; + }; + /*\ + * Animation.repeat + [ method ] + ** + * Creates a copy of existing animation object with given repetition. + ** + > Parameters + ** + - repeat (number) number iterations of animation. For infinite animation pass `Infinity` + ** + = (object) new altered Animation object + \*/ + Animation.prototype.repeat = function (times) { + var a = new Animation(this.anim, this.ms); + a.del = this.del; + a.times = math.floor(mmax(times, 0)) || 1; + return a; + }; + function runAnimation(anim, element, percent, status, totalOrigin, times) { + percent = toFloat(percent); + var params, + isInAnim, + isInAnimSet, + percents = [], + next, + prev, + timestamp, + ms = anim.ms, + from = {}, + to = {}, + diff = {}; + if (status) { + for (i = 0, ii = animationElements.length; i < ii; i++) { + var e = animationElements[i]; + if (e.el.id == element.id && e.anim == anim) { + if (e.percent != percent) { + animationElements.splice(i, 1); + isInAnimSet = 1; + } else { + isInAnim = e; + } + element.attr(e.totalOrigin); + break; + } + } + } else { + status = +to; // NaN + } + for (var i = 0, ii = anim.percents.length; i < ii; i++) { + if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { + percent = anim.percents[i]; + prev = anim.percents[i - 1] || 0; + ms = ms / anim.top * (percent - prev); + next = anim.percents[i + 1]; + params = anim.anim[percent]; + break; + } else if (status) { + element.attr(anim.anim[anim.percents[i]]); + } + } + if (!params) { + return; + } + if (!isInAnim) { + for (var attr in params) if (params[has](attr)) { + if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { + from[attr] = element.attr(attr); + (from[attr] == null) && (from[attr] = availableAttrs[attr]); + to[attr] = params[attr]; + switch (availableAnimAttrs[attr]) { + case nu: + diff[attr] = (to[attr] - from[attr]) / ms; + break; + case "colour": + from[attr] = R.getRGB(from[attr]); + var toColour = R.getRGB(to[attr]); + diff[attr] = { + r: (toColour.r - from[attr].r) / ms, + g: (toColour.g - from[attr].g) / ms, + b: (toColour.b - from[attr].b) / ms + }; + break; + case "path": + var pathes = path2curve(from[attr], to[attr]), + toPath = pathes[1]; + from[attr] = pathes[0]; + diff[attr] = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [0]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; + } + } + break; + case "transform": + var _ = element._, + eq = equaliseTransform(_[attr], to[attr]); + if (eq) { + from[attr] = eq.from; + to[attr] = eq.to; + diff[attr] = []; + diff[attr].real = true; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; + } + } + } else { + var m = (element.matrix || new Matrix), + to2 = { + _: {transform: _.transform}, + getBBox: function () { + return element.getBBox(1); + } + }; + from[attr] = [ + m.a, + m.b, + m.c, + m.d, + m.e, + m.f + ]; + extractTransform(to2, to[attr]); + to[attr] = to2._.transform; + diff[attr] = [ + (to2.matrix.a - m.a) / ms, + (to2.matrix.b - m.b) / ms, + (to2.matrix.c - m.c) / ms, + (to2.matrix.d - m.d) / ms, + (to2.matrix.e - m.e) / ms, + (to2.matrix.f - m.f) / ms + ]; + // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; + // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; + // extractTransform(to2, to[attr]); + // diff[attr] = [ + // (to2._.sx - _.sx) / ms, + // (to2._.sy - _.sy) / ms, + // (to2._.deg - _.deg) / ms, + // (to2._.dx - _.dx) / ms, + // (to2._.dy - _.dy) / ms + // ]; + } + break; + case "csv": + var values = Str(params[attr])[split](separator), + from2 = Str(from[attr])[split](separator); + if (attr == "clip-rect") { + from[attr] = from2; + diff[attr] = []; + i = from2.length; + while (i--) { + diff[attr][i] = (values[i] - from[attr][i]) / ms; + } + } + to[attr] = values; + break; + default: + values = [][concat](params[attr]); + from2 = [][concat](from[attr]); + diff[attr] = []; + i = element.paper.customAttributes[attr].length; + while (i--) { + diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; + } + break; + } + } + } + var easing = params.easing, + easyeasy = R.easing_formulas[easing]; + if (!easyeasy) { + easyeasy = Str(easing).match(bezierrg); + if (easyeasy && easyeasy.length == 5) { + var curve = easyeasy; + easyeasy = function (t) { + return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); + }; + } else { + easyeasy = pipe; + } + } + timestamp = params.start || anim.start || +new Date; + e = { + anim: anim, + percent: percent, + timestamp: timestamp, + start: timestamp + (anim.del || 0), + status: 0, + initstatus: status || 0, + stop: false, + ms: ms, + easing: easyeasy, + from: from, + diff: diff, + to: to, + el: element, + callback: params.callback, + prev: prev, + next: next, + repeat: times || anim.times, + origin: element.attr(), + totalOrigin: totalOrigin + }; + animationElements.push(e); + if (status && !isInAnim && !isInAnimSet) { + e.stop = true; + e.start = new Date - ms * status; + if (animationElements.length == 1) { + return animation(); + } + } + if (isInAnimSet) { + e.start = new Date - e.ms * status; + } + animationElements.length == 1 && requestAnimFrame(animation); + } else { + isInAnim.initstatus = status; + isInAnim.start = new Date - isInAnim.ms * status; + } + eve("raphael.anim.start." + element.id, element, anim); + } + /*\ + * Raphael.animation + [ method ] + ** + * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods. + * See also @Animation.delay and @Animation.repeat methods. + ** + > Parameters + ** + - params (object) final attributes for the element, see also @Element.attr + - ms (number) number of milliseconds for animation to run + - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + ** + = (object) @Animation + \*/ + R.animation = function (params, ms, easing, callback) { + if (params instanceof Animation) { + return params; + } + if (R.is(easing, "function") || !easing) { + callback = callback || easing || null; + easing = null; + } + params = Object(params); + ms = +ms || 0; + var p = {}, + json, + attr; + for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { + json = true; + p[attr] = params[attr]; + } + if (!json) { + // if percent-like syntax is used and end-of-all animation callback used + if(callback){ + // find the last one + var lastKey = 0; + for(var i in params){ + var percent = toInt(i); + if(params[has](i) && percent > lastKey){ + lastKey = percent; + } + } + lastKey += '%'; + // if already defined callback in the last keyframe, skip + !params[lastKey].callback && (params[lastKey].callback = callback); + } + return new Animation(params, ms); + } else { + easing && (p.easing = easing); + callback && (p.callback = callback); + return new Animation({100: p}, ms); + } + }; + /*\ + * Element.animate + [ method ] + ** + * Creates and starts animation for given element. + ** + > Parameters + ** + - params (object) final attributes for the element, see also @Element.attr + - ms (number) number of milliseconds for animation to run + - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + * or + - animation (object) animation object, see @Raphael.animation + ** + = (object) original element + \*/ + elproto.animate = function (params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); + runAnimation(anim, element, anim.percents[0], null, element.attr()); + return element; + }; + /*\ + * Element.setTime + [ method ] + ** + * Sets the status of animation of the element in milliseconds. Similar to @Element.status method. + ** + > Parameters + ** + - anim (object) animation object + - value (number) number of milliseconds from the beginning of the animation + ** + = (object) original element if `value` is specified + * Note, that during animation following events are triggered: + * + * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`. + \*/ + elproto.setTime = function (anim, value) { + if (anim && value != null) { + this.status(anim, mmin(value, anim.ms) / anim.ms); + } + return this; + }; + /*\ + * Element.status + [ method ] + ** + * Gets or sets the status of animation of the element. + ** + > Parameters + ** + - anim (object) #optional animation object + - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position. + ** + = (number) status + * or + = (array) status if `anim` is not specified. Array of objects in format: + o { + o anim: (object) animation object + o status: (number) status + o } + * or + = (object) original element if `value` is specified + \*/ + elproto.status = function (anim, value) { + var out = [], + i = 0, + len, + e; + if (value != null) { + runAnimation(anim, this, -1, mmin(value, 1)); + return this; + } else { + len = animationElements.length; + for (; i < len; i++) { + e = animationElements[i]; + if (e.el.id == this.id && (!anim || e.anim == anim)) { + if (anim) { + return e.status; + } + out.push({ + anim: e.anim, + status: e.status + }); + } + } + if (anim) { + return 0; + } + return out; + } + }; + /*\ + * Element.pause + [ method ] + ** + * Stops animation of the element with ability to resume it later on. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.pause = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { + animationElements[i].paused = true; + } + } + return this; + }; + /*\ + * Element.resume + [ method ] + ** + * Resumes animation if it was paused with @Element.pause method. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.resume = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + var e = animationElements[i]; + if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { + delete e.paused; + this.status(e.anim, e.status); + } + } + return this; + }; + /*\ + * Element.stop + [ method ] + ** + * Stops animation of the element. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.stop = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { + animationElements.splice(i--, 1); + } + } + return this; + }; + function stopAnimation(paper) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { + animationElements.splice(i--, 1); + } + } + eve.on("raphael.remove", stopAnimation); + eve.on("raphael.clear", stopAnimation); + elproto.toString = function () { + return "Rapha\xebl\u2019s object"; + }; + + // Set + var Set = function (items) { + this.items = []; + this.length = 0; + this.type = "set"; + if (items) { + for (var i = 0, ii = items.length; i < ii; i++) { + if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { + this[this.items.length] = this.items[this.items.length] = items[i]; + this.length++; + } + } + } + }, + setproto = Set.prototype; + /*\ + * Set.push + [ method ] + ** + * Adds each argument to the current set. + = (object) original element + \*/ + setproto.push = function () { + var item, + len; + for (var i = 0, ii = arguments.length; i < ii; i++) { + item = arguments[i]; + if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { + len = this.items.length; + this[len] = this.items[len] = item; + this.length++; + } + } + return this; + }; + /*\ + * Set.pop + [ method ] + ** + * Removes last element and returns it. + = (object) element + \*/ + setproto.pop = function () { + this.length && delete this[this.length--]; + return this.items.pop(); + }; + /*\ + * Set.forEach + [ method ] + ** + * Executes given function for each element in the set. + * + * If function returns `false` it will stop loop running. + ** + > Parameters + ** + - callback (function) function to run + - thisArg (object) context object for the callback + = (object) Set object + \*/ + setproto.forEach = function (callback, thisArg) { + for (var i = 0, ii = this.items.length; i < ii; i++) { + if (callback.call(thisArg, this.items[i], i) === false) { + return this; + } + } + return this; + }; + for (var method in elproto) if (elproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname][apply](el, arg); + }); + }; + })(method); + } + setproto.attr = function (name, value) { + if (name && R.is(name, array) && R.is(name[0], "object")) { + for (var j = 0, jj = name.length; j < jj; j++) { + this.items[j].attr(name[j]); + } + } else { + for (var i = 0, ii = this.items.length; i < ii; i++) { + this.items[i].attr(name, value); + } + } + return this; + }; + /*\ + * Set.clear + [ method ] + ** + * Removes all elements from the set + \*/ + setproto.clear = function () { + while (this.length) { + this.pop(); + } + }; + /*\ + * Set.splice + [ method ] + ** + * Removes given element from the set + ** + > Parameters + ** + - index (number) position of the deletion + - count (number) number of element to remove + - insertion… (object) #optional elements to insert + = (object) set elements that were deleted + \*/ + setproto.splice = function (index, count, insertion) { + index = index < 0 ? mmax(this.length + index, 0) : index; + count = mmax(0, mmin(this.length - index, count)); + var tail = [], + todel = [], + args = [], + i; + for (i = 2; i < arguments.length; i++) { + args.push(arguments[i]); + } + for (i = 0; i < count; i++) { + todel.push(this[index + i]); + } + for (; i < this.length - index; i++) { + tail.push(this[index + i]); + } + var arglen = args.length; + for (i = 0; i < arglen + tail.length; i++) { + this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; + } + i = this.items.length = this.length -= count - arglen; + while (this[i]) { + delete this[i++]; + } + return new Set(todel); + }; + /*\ + * Set.exclude + [ method ] + ** + * Removes given element from the set + ** + > Parameters + ** + - element (object) element to remove + = (boolean) `true` if object was found & removed from the set + \*/ + setproto.exclude = function (el) { + for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { + this.splice(i, 1); + return true; + } + }; + setproto.animate = function (params, ms, easing, callback) { + (R.is(easing, "function") || !easing) && (callback = easing || null); + var len = this.items.length, + i = len, + item, + set = this, + collector; + if (!len) { + return this; + } + callback && (collector = function () { + !--len && callback.call(set); + }); + easing = R.is(easing, string) ? easing : collector; + var anim = R.animation(params, ms, easing, collector); + item = this.items[--i].animate(anim); + while (i--) { + this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim); + (this.items[i] && !this.items[i].removed) || len--; + } + return this; + }; + setproto.insertAfter = function (el) { + var i = this.items.length; + while (i--) { + this.items[i].insertAfter(el); + } + return this; + }; + setproto.getBBox = function () { + var x = [], + y = [], + x2 = [], + y2 = []; + for (var i = this.items.length; i--;) if (!this.items[i].removed) { + var box = this.items[i].getBBox(); + x.push(box.x); + y.push(box.y); + x2.push(box.x + box.width); + y2.push(box.y + box.height); + } + x = mmin[apply](0, x); + y = mmin[apply](0, y); + x2 = mmax[apply](0, x2); + y2 = mmax[apply](0, y2); + return { + x: x, + y: y, + x2: x2, + y2: y2, + width: x2 - x, + height: y2 - y + }; + }; + setproto.clone = function (s) { + s = this.paper.set(); + for (var i = 0, ii = this.items.length; i < ii; i++) { + s.push(this.items[i].clone()); + } + return s; + }; + setproto.toString = function () { + return "Rapha\xebl\u2018s set"; + }; + + setproto.glow = function(glowConfig) { + var ret = this.paper.set(); + this.forEach(function(shape, index){ + var g = shape.glow(glowConfig); + if(g != null){ + g.forEach(function(shape2, index2){ + ret.push(shape2); + }); + } + }); + return ret; + }; + + + /*\ + * Set.isPointInside + [ method ] + ** + * Determine if given point is inside this set’s elements + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (boolean) `true` if point is inside any of the set's elements + \*/ + setproto.isPointInside = function (x, y) { + var isPointInside = false; + this.forEach(function (el) { + if (el.isPointInside(x, y)) { + isPointInside = true; + return false; // stop loop + } + }); + return isPointInside; + }; + + /*\ + * Raphael.registerFont + [ method ] + ** + * Adds given font to the registered set of font for Raphaël. Should be used as an internal call from within Cufón’s font file. + * Returns original parameter, so it could be used with chaining. + # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a> + ** + > Parameters + ** + - font (object) the font to register + = (object) the font you passed in + > Usage + | Cufon.registerFont(Raphael.registerFont({…})); + \*/ + R.registerFont = function (font) { + if (!font.face) { + return font; + } + this.fonts = this.fonts || {}; + var fontcopy = { + w: font.w, + face: {}, + glyphs: {} + }, + family = font.face["font-family"]; + for (var prop in font.face) if (font.face[has](prop)) { + fontcopy.face[prop] = font.face[prop]; + } + if (this.fonts[family]) { + this.fonts[family].push(fontcopy); + } else { + this.fonts[family] = [fontcopy]; + } + if (!font.svg) { + fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); + for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { + var path = font.glyphs[glyph]; + fontcopy.glyphs[glyph] = { + w: path.w, + k: {}, + d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { + return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; + }) + "z" + }; + if (path.k) { + for (var k in path.k) if (path[has](k)) { + fontcopy.glyphs[glyph].k[k] = path.k[k]; + } + } + } + } + return font; + }; + /*\ + * Paper.getFont + [ method ] + ** + * Finds font object in the registered font by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”. + ** + > Parameters + ** + - family (string) font family name or any word from it + - weight (string) #optional font weight + - style (string) #optional font style + - stretch (string) #optional font stretch + = (object) the font object + > Usage + | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30); + \*/ + paperproto.getFont = function (family, weight, style, stretch) { + stretch = stretch || "normal"; + style = style || "normal"; + weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; + if (!R.fonts) { + return; + } + var font = R.fonts[family]; + if (!font) { + var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); + for (var fontName in R.fonts) if (R.fonts[has](fontName)) { + if (name.test(fontName)) { + font = R.fonts[fontName]; + break; + } + } + } + var thefont; + if (font) { + for (var i = 0, ii = font.length; i < ii; i++) { + thefont = font[i]; + if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { + break; + } + } + } + return thefont; + }; + /*\ + * Paper.print + [ method ] + ** + * Creates path that represent given text written using given font at given position with given size. + * Result of the method is path element that contains whole text as a separate path. + ** + > Parameters + ** + - x (number) x position of the text + - y (number) y position of the text + - string (string) text to print + - font (object) font object, see @Paper.getFont + - size (number) #optional size of the font, default is `16` + - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"` + - letter_spacing (number) #optional number in range `-1..1`, default is `0` + - line_spacing (number) #optional number in range `1..3`, default is `1` + = (object) resulting path element, which consist of all letters + > Usage + | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"}); + \*/ + paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) { + origin = origin || "middle"; // baseline|middle + letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); + line_spacing = mmax(mmin(line_spacing || 1, 3), 1); + var letters = Str(string)[split](E), + shift = 0, + notfirst = 0, + path = E, + scale; + R.is(font, "string") && (font = this.getFont(font)); + if (font) { + scale = (size || 16) / font.face["units-per-em"]; + var bb = font.face.bbox[split](separator), + top = +bb[0], + lineHeight = bb[3] - bb[1], + shifty = 0, + height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2); + for (var i = 0, ii = letters.length; i < ii; i++) { + if (letters[i] == "\n") { + shift = 0; + curr = 0; + notfirst = 0; + shifty += lineHeight * line_spacing; + } else { + var prev = notfirst && font.glyphs[letters[i - 1]] || {}, + curr = font.glyphs[letters[i]]; + shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; + notfirst = 1; + } + if (curr && curr.d) { + path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); + } + } + } + return this.path(path).attr({ + fill: "#000", + stroke: "none" + }); + }; + + /*\ + * Paper.add + [ method ] + ** + * Imports elements in JSON array in format `{type: type, <attributes>}` + ** + > Parameters + ** + - json (array) + = (object) resulting set of imported elements + > Usage + | paper.add([ + | { + | type: "circle", + | cx: 10, + | cy: 10, + | r: 5 + | }, + | { + | type: "rect", + | x: 10, + | y: 10, + | width: 10, + | height: 10, + | fill: "#fc0" + | } + | ]); + \*/ + paperproto.add = function (json) { + if (R.is(json, "array")) { + var res = this.set(), + i = 0, + ii = json.length, + j; + for (; i < ii; i++) { + j = json[i] || {}; + elements[has](j.type) && res.push(this[j.type]().attr(j)); + } + } + return res; + }; + + /*\ + * Raphael.format + [ method ] + ** + * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument. + ** + > Parameters + ** + - token (string) string to format + - … (string) rest of arguments will be treated as parameters for replacement + = (string) formated string + > Usage + | var x = 10, + | y = 20, + | width = 40, + | height = 50; + | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" + | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width)); + \*/ + R.format = function (token, params) { + var args = R.is(params, array) ? [0][concat](params) : arguments; + token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { + return args[++i] == null ? E : args[i]; + })); + return token || E; + }; + /*\ + * Raphael.fullfill + [ method ] + ** + * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument. + ** + > Parameters + ** + - token (string) string to format + - json (object) object which properties will be used as a replacement + = (string) formated string + > Usage + | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" + | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", { + | x: 10, + | y: 20, + | dim: { + | width: 40, + | height: 50, + | "negative width": -40 + | } + | })); + \*/ + R.fullfill = (function () { + var tokenRegex = /\{([^\}]+)\}/g, + objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties + replacer = function (all, key, obj) { + var res = obj; + key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { + name = name || quotedName; + if (res) { + if (name in res) { + res = res[name]; + } + typeof res == "function" && isFunc && (res = res()); + } + }); + res = (res == null || res == obj ? all : res) + ""; + return res; + }; + return function (str, obj) { + return String(str).replace(tokenRegex, function (all, key) { + return replacer(all, key, obj); + }); + }; + })(); + /*\ + * Raphael.ninja + [ method ] + ** + * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method. + * Beware, that in this case plugins could stop working, because they are depending on global variable existence. + ** + = (object) Raphael object + > Usage + | (function (local_raphael) { + | var paper = local_raphael(10, 10, 320, 200); + | … + | })(Raphael.ninja()); + \*/ + R.ninja = function () { + oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; + return R; + }; + /*\ + * Raphael.st + [ property (object) ] + ** + * You can add your own method to elements and sets. It is wise to add a set method for each element method + * you added, so you will be able to call the same method on sets too. + ** + * See also @Raphael.el. + > Usage + | Raphael.el.red = function () { + | this.attr({fill: "#f00"}); + | }; + | Raphael.st.red = function () { + | this.forEach(function (el) { + | el.red(); + | }); + | }; + | // then use it + | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red(); + \*/ + R.st = setproto; + + eve.on("raphael.DOMload", function () { + loaded = true; + }); + + // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html + (function (doc, loaded, f) { + if (doc.readyState == null && doc.addEventListener){ + doc.addEventListener(loaded, f = function () { + doc.removeEventListener(loaded, f, false); + doc.readyState = "complete"; + }, false); + doc.readyState = "loading"; + } + function isLoaded() { + (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload"); + } + isLoaded(); + })(document, "DOMContentLoaded"); + + return R; +})); + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ SVG Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.svg", ["raphael.core"], function(raphael) { + return factory(raphael); + }); + } else if (typeof exports === "object") { + factory(require("raphael.core")); + } else { + factory(glob.Raphael); + } +}(this, function(R) { + if (R && !R.svg) { + return; + } + + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + toInt = parseInt, + math = Math, + mmax = math.max, + abs = math.abs, + pow = math.pow, + separator = /[, ]+/, + eve = R.eve, + E = "", + S = " "; + var xlink = "http://www.w3.org/1999/xlink", + markers = { + block: "M5,0 0,2.5 5,5z", + classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", + diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", + open: "M6,1 1,3.5 6,6", + oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" + }, + markerCounter = {}; + R.toString = function () { + return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; + }; + var $ = function (el, attr) { + if (attr) { + if (typeof el == "string") { + el = $(el); + } + for (var key in attr) if (attr[has](key)) { + if (key.substring(0, 6) == "xlink:") { + el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); + } else { + el.setAttribute(key, Str(attr[key])); + } + } + } else { + el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); + el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); + } + return el; + }, + addGradientFill = function (element, gradient) { + var type = "linear", + id = element.id + gradient, + fx = .5, fy = .5, + o = element.node, + SVG = element.paper, + s = o.style, + el = R._g.doc.getElementById(id); + if (!el) { + gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { + type = "radial"; + if (_fx && _fy) { + fx = toFloat(_fx); + fy = toFloat(_fy); + var dir = ((fy > .5) * 2 - 1); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && + (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && + fy != .5 && + (fy = fy.toFixed(5) - 1e-5 * dir); + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], + max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); + vector[2] *= max; + vector[3] *= max; + if (vector[2] < 0) { + vector[0] = -vector[2]; + vector[2] = 0; + } + if (vector[3] < 0) { + vector[1] = -vector[3]; + vector[3] = 0; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + id = id.replace(/[\(\)\s,\xb0#]/g, "_"); + + if (element.gradient && id != element.gradient.id) { + SVG.defs.removeChild(element.gradient); + delete element.gradient; + } + + if (!element.gradient) { + el = $(type + "Gradient", {id: id}); + element.gradient = el; + $(el, type == "radial" ? { + fx: fx, + fy: fy + } : { + x1: vector[0], + y1: vector[1], + x2: vector[2], + y2: vector[3], + gradientTransform: element.matrix.invert() + }); + SVG.defs.appendChild(el); + for (var i = 0, ii = dots.length; i < ii; i++) { + el.appendChild($("stop", { + offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", + "stop-color": dots[i].color || "#fff", + "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1 + })); + } + } + } + $(o, { + fill: "url('" + document.location.origin + document.location.pathname + "#" + id + "')", + opacity: 1, + "fill-opacity": 1 + }); + s.fill = E; + s.opacity = 1; + s.fillOpacity = 1; + return 1; + }, + updatePosition = function (o) { + var bbox = o.getBBox(1); + $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); + }, + addArrow = function (o, value, isEnd) { + if (o.type == "path") { + var values = Str(value).toLowerCase().split("-"), + p = o.paper, + se = isEnd ? "end" : "start", + node = o.node, + attrs = o.attrs, + stroke = attrs["stroke-width"], + i = values.length, + type = "classic", + from, + to, + dx, + refX, + attr, + w = 3, + h = 3, + t = 5; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": h = 5; break; + case "narrow": h = 2; break; + case "long": w = 5; break; + case "short": w = 2; break; + } + } + if (type == "open") { + w += 2; + h += 2; + t += 2; + dx = 1; + refX = isEnd ? 4 : 1; + attr = { + fill: "none", + stroke: attrs.stroke + }; + } else { + refX = dx = w / 2; + attr = { + fill: attrs.stroke, + stroke: "none" + }; + } + if (o._.arrows) { + if (isEnd) { + o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; + o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; + } else { + o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; + o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; + } + } else { + o._.arrows = {}; + } + if (type != "none") { + var pathId = "raphael-marker-" + type, + markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id; + if (!R._g.doc.getElementById(pathId)) { + p.defs.appendChild($($("path"), { + "stroke-linecap": "round", + d: markers[type], + id: pathId + })); + markerCounter[pathId] = 1; + } else { + markerCounter[pathId]++; + } + var marker = R._g.doc.getElementById(markerId), + use; + if (!marker) { + marker = $($("marker"), { + id: markerId, + markerHeight: h, + markerWidth: w, + orient: "auto", + refX: refX, + refY: h / 2 + }); + use = $($("use"), { + "xlink:href": "#" + pathId, + transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")", + "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4) + }); + marker.appendChild(use); + p.defs.appendChild(marker); + markerCounter[markerId] = 1; + } else { + markerCounter[markerId]++; + use = marker.getElementsByTagName("use")[0]; + } + $(use, attr); + var delta = dx * (type != "diamond" && type != "oval"); + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - delta * stroke; + } else { + from = delta * stroke; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + attr = {}; + attr["marker-" + se] = "url(#" + markerId + ")"; + if (to || from) { + attr.d = R.getSubpath(attrs.path, from, to); + } + $(node, attr); + o._.arrows[se + "Path"] = pathId; + o._.arrows[se + "Marker"] = markerId; + o._.arrows[se + "dx"] = delta; + o._.arrows[se + "Type"] = type; + o._.arrows[se + "String"] = value; + } else { + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - from; + } else { + from = 0; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)}); + delete o._.arrows[se + "Path"]; + delete o._.arrows[se + "Marker"]; + delete o._.arrows[se + "dx"]; + delete o._.arrows[se + "Type"]; + delete o._.arrows[se + "String"]; + } + for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { + var item = R._g.doc.getElementById(attr); + item && item.parentNode.removeChild(item); + } + } + }, + dasharray = { + "-": [3, 1], + ".": [1, 1], + "-.": [3, 1, 1, 1], + "-..": [3, 1, 1, 1, 1, 1], + ". ": [1, 3], + "- ": [4, 3], + "--": [8, 3], + "- .": [4, 3, 1, 3], + "--.": [8, 3, 1, 3], + "--..": [8, 3, 1, 3, 1, 3] + }, + addDashes = function (o, value, params) { + value = dasharray[Str(value).toLowerCase()]; + if (value) { + var width = o.attrs["stroke-width"] || "1", + butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, + dashes = [], + i = value.length; + while (i--) { + dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; + } + $(o.node, {"stroke-dasharray": dashes.join(",")}); + } + else { + $(o.node, {"stroke-dasharray": "none"}); + } + }, + setFillAndStroke = function (o, params) { + var node = o.node, + attrs = o.attrs, + vis = node.style.visibility; + node.style.visibility = "hidden"; + for (var att in params) { + if (params[has](att)) { + if (!R._availableAttrs[has](att)) { + continue; + } + var value = params[att]; + attrs[att] = value; + switch (att) { + case "blur": + o.blur(value); + break; + case "title": + var title = node.getElementsByTagName("title"); + + // Use the existing <title>. + if (title.length && (title = title[0])) { + title.firstChild.nodeValue = value; + } else { + title = $("title"); + var val = R._g.doc.createTextNode(value); + title.appendChild(val); + node.appendChild(title); + } + break; + case "href": + case "target": + var pn = node.parentNode; + if (pn.tagName.toLowerCase() != "a") { + var hl = $("a"); + pn.insertBefore(hl, node); + hl.appendChild(node); + pn = hl; + } + if (att == "target") { + pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value); + } else { + pn.setAttributeNS(xlink, att, value); + } + break; + case "cursor": + node.style.cursor = value; + break; + case "transform": + o.transform(value); + break; + case "arrow-start": + addArrow(o, value); + break; + case "arrow-end": + addArrow(o, value, 1); + break; + case "clip-rect": + var rect = Str(value).split(separator); + if (rect.length == 4) { + o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); + var el = $("clipPath"), + rc = $("rect"); + el.id = R.createUUID(); + $(rc, { + x: rect[0], + y: rect[1], + width: rect[2], + height: rect[3] + }); + el.appendChild(rc); + o.paper.defs.appendChild(el); + $(node, {"clip-path": "url(#" + el.id + ")"}); + o.clip = rc; + } + if (!value) { + var path = node.getAttribute("clip-path"); + if (path) { + var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E)); + clip && clip.parentNode.removeChild(clip); + $(node, {"clip-path": E}); + delete o.clip; + } + } + break; + case "path": + if (o.type == "path") { + $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); + o._.dirty = 1; + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + } + break; + case "width": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fx) { + att = "x"; + value = attrs.x; + } else { + break; + } + case "x": + if (attrs.fx) { + value = -attrs.x - (attrs.width || 0); + } + case "rx": + if (att == "rx" && o.type == "rect") { + break; + } + case "cx": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "height": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fy) { + att = "y"; + value = attrs.y; + } else { + break; + } + case "y": + if (attrs.fy) { + value = -attrs.y - (attrs.height || 0); + } + case "ry": + if (att == "ry" && o.type == "rect") { + break; + } + case "cy": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "r": + if (o.type == "rect") { + $(node, {rx: value, ry: value}); + } else { + node.setAttribute(att, value); + } + o._.dirty = 1; + break; + case "src": + if (o.type == "image") { + node.setAttributeNS(xlink, "href", value); + } + break; + case "stroke-width": + if (o._.sx != 1 || o._.sy != 1) { + value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; + } + node.setAttribute(att, value); + if (attrs["stroke-dasharray"]) { + addDashes(o, attrs["stroke-dasharray"], params); + } + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "stroke-dasharray": + addDashes(o, value, params); + break; + case "fill": + var isURL = Str(value).match(R._ISURL); + if (isURL) { + el = $("pattern"); + var ig = $("image"); + el.id = R.createUUID(); + $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); + $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); + el.appendChild(ig); + + (function (el) { + R._preload(isURL[1], function () { + var w = this.offsetWidth, + h = this.offsetHeight; + $(el, {width: w, height: h}); + $(ig, {width: w, height: h}); + }); + })(el); + o.paper.defs.appendChild(el); + $(node, {fill: "url(#" + el.id + ")"}); + o.pattern = el; + o.pattern && updatePosition(o); + break; + } + var clr = R.getRGB(value); + if (!clr.error) { + delete params.gradient; + delete attrs.gradient; + !R.is(attrs.opacity, "undefined") && + R.is(params.opacity, "undefined") && + $(node, {opacity: attrs.opacity}); + !R.is(attrs["fill-opacity"], "undefined") && + R.is(params["fill-opacity"], "undefined") && + $(node, {"fill-opacity": attrs["fill-opacity"]}); + } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { + if ("opacity" in attrs || "fill-opacity" in attrs) { + var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + var stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); + } + } + attrs.gradient = value; + attrs.fill = "none"; + break; + } + clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + case "stroke": + clr = R.getRGB(value); + node.setAttribute(att, clr.hex); + att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + if (att == "stroke" && o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "gradient": + (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); + break; + case "opacity": + if (attrs.gradient && !attrs[has]("stroke-opacity")) { + $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); + } + // fall + case "fill-opacity": + if (attrs.gradient) { + gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": value}); + } + break; + } + default: + att == "font-size" && (value = toInt(value, 10) + "px"); + var cssrule = att.replace(/(\-.)/g, function (w) { + return w.substring(1).toUpperCase(); + }); + node.style[cssrule] = value; + o._.dirty = 1; + node.setAttribute(att, value); + break; + } + } + } + + tuneText(o, params); + node.style.visibility = vis; + }, + leading = 1.2, + tuneText = function (el, params) { + if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { + return; + } + var a = el.attrs, + node = el.node, + fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; + + if (params[has]("text")) { + a.text = params.text; + while (node.firstChild) { + node.removeChild(node.firstChild); + } + var texts = Str(params.text).split("\n"), + tspans = [], + tspan; + for (var i = 0, ii = texts.length; i < ii; i++) { + tspan = $("tspan"); + i && $(tspan, {dy: fontSize * leading, x: a.x}); + tspan.appendChild(R._g.doc.createTextNode(texts[i])); + node.appendChild(tspan); + tspans[i] = tspan; + } + } else { + tspans = node.getElementsByTagName("tspan"); + for (i = 0, ii = tspans.length; i < ii; i++) if (i) { + $(tspans[i], {dy: fontSize * leading, x: a.x}); + } else { + $(tspans[0], {dy: 0}); + } + } + $(node, {x: a.x, y: a.y}); + el._.dirty = 1; + var bb = el._getBBox(), + dif = a.y - (bb.y + bb.height / 2); + dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); + }, + getRealNode = function (node) { + if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") { + return node.parentNode; + } else { + return node; + } + }, + Element = function (node, svg) { + var X = 0, + Y = 0; + /*\ + * Element.node + [ property (object) ] + ** + * Gives you a reference to the DOM object, so you can assign event handlers or just mess around. + ** + * Note: Don’t mess with it. + > Usage + | // draw a circle at coordinate 10,10 with radius of 10 + | var c = paper.circle(10, 10, 10); + | c.node.onclick = function () { + | c.attr("fill", "red"); + | }; + \*/ + this[0] = this.node = node; + /*\ + * Element.raphael + [ property (object) ] + ** + * Internal reference to @Raphael object. In case it is not available. + > Usage + | Raphael.el.red = function () { + | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill")); + | hsb.h = 1; + | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex}); + | } + \*/ + node.raphael = true; + /*\ + * Element.id + [ property (number) ] + ** + * Unique id of the element. Especially useful when you want to listen to events of the element, + * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method. + \*/ + this.id = R._oid++; + node.raphaelid = this.id; + this.matrix = R.matrix(); + this.realPath = null; + /*\ + * Element.paper + [ property (object) ] + ** + * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions. + > Usage + | Raphael.el.cross = function () { + | this.attr({fill: "red"}); + | this.paper.path("M10,10L50,50M50,10L10,50") + | .attr({stroke: "red"}); + | } + \*/ + this.paper = svg; + this.attrs = this.attrs || {}; + this._ = { + transform: [], + sx: 1, + sy: 1, + deg: 0, + dx: 0, + dy: 0, + dirty: 1 + }; + !svg.bottom && (svg.bottom = this); + /*\ + * Element.prev + [ property (object) ] + ** + * Reference to the previous element in the hierarchy. + \*/ + this.prev = svg.top; + svg.top && (svg.top.next = this); + svg.top = this; + /*\ + * Element.next + [ property (object) ] + ** + * Reference to the next element in the hierarchy. + \*/ + this.next = null; + }, + elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + + R._engine.path = function (pathString, SVG) { + var el = $("path"); + SVG.canvas && SVG.canvas.appendChild(el); + var p = new Element(el, SVG); + p.type = "path"; + setFillAndStroke(p, { + fill: "none", + stroke: "#000", + path: pathString + }); + return p; + }; + /*\ + * Element.rotate + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds rotation by given angle around given point to the list of + * transformations of the element. + > Parameters + - deg (number) angle in degrees + - cx (number) #optional x coordinate of the centre of rotation + - cy (number) #optional y coordinate of the centre of rotation + * If cx & cy aren’t specified centre of the shape is used as a point of rotation. + = (object) @Element + \*/ + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + /*\ + * Element.scale + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds scale by given amount relative to given point to the list of + * transformations of the element. + > Parameters + - sx (number) horisontal scale amount + - sy (number) vertical scale amount + - cx (number) #optional x coordinate of the centre of scale + - cy (number) #optional y coordinate of the centre of scale + * If cx & cy aren’t specified centre of the shape is used instead. + = (object) @Element + \*/ + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + return this; + }; + /*\ + * Element.translate + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds translation by given amount to the list of transformations of the element. + > Parameters + - dx (number) horisontal shift + - dy (number) vertical shift + = (object) @Element + \*/ + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + /*\ + * Element.transform + [ method ] + ** + * Adds transformation to the element which is separate to other attributes, + * i.e. translation doesn’t change `x` or `y` of the rectange. The format + * of transformation string is similar to the path string syntax: + | "t100,100r30,100,100s2,2,100,100r45s1.5" + * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for + * scale and `m` is for matrix. + * + * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`. + * + * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100; + * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin + * coordinates as optional parameters, the default is the centre point of the element. + * Matrix accepts six parameters. + > Usage + | var el = paper.rect(10, 20, 300, 200); + | // translate 100, 100, rotate 45°, translate -100, 0 + | el.transform("t100,100r45t-100,0"); + | // if you want you can append or prepend transformations + | el.transform("...t50,50"); + | el.transform("s2..."); + | // or even wrap + | el.transform("t50,50...t-50-50"); + | // to reset transformation call method with empty string + | el.transform(""); + | // to get current value call it without parameters + | console.log(el.transform()); + > Parameters + - tstr (string) #optional transformation string + * If tstr isn’t specified + = (string) current transformation string + * else + = (object) @Element + \*/ + elproto.transform = function (tstr) { + var _ = this._; + if (tstr == null) { + return _.transform; + } + R._extractTransform(this, tstr); + + this.clip && $(this.clip, {transform: this.matrix.invert()}); + this.pattern && updatePosition(this); + this.node && $(this.node, {transform: this.matrix}); + + if (_.sx != 1 || _.sy != 1) { + var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; + this.attr({"stroke-width": sw}); + } + + return this; + }; + /*\ + * Element.hide + [ method ] + ** + * Makes element invisible. See @Element.show. + = (object) @Element + \*/ + elproto.hide = function () { + if(!this.removed) this.node.style.display = "none"; + return this; + }; + /*\ + * Element.show + [ method ] + ** + * Makes element visible. See @Element.hide. + = (object) @Element + \*/ + elproto.show = function () { + if(!this.removed) this.node.style.display = ""; + return this; + }; + /*\ + * Element.remove + [ method ] + ** + * Removes element from the paper. + \*/ + elproto.remove = function () { + var node = getRealNode(this.node); + if (this.removed || !node.parentNode) { + return; + } + var paper = this.paper; + paper.__set__ && paper.__set__.exclude(this); + eve.unbind("raphael.*.*." + this.id); + if (this.gradient) { + paper.defs.removeChild(this.gradient); + } + R._tear(this, paper); + + node.parentNode.removeChild(node); + + // Remove custom data for element + this.removeData(); + + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto._getBBox = function () { + if (this.node.style.display == "none") { + this.show(); + var hide = true; + } + var canvasHidden = false, + containerStyle; + if (this.paper.canvas.parentElement) { + containerStyle = this.paper.canvas.parentElement.style; + } //IE10+ can't find parentElement + else if (this.paper.canvas.parentNode) { + containerStyle = this.paper.canvas.parentNode.style; + } + + if(containerStyle && containerStyle.display == "none") { + canvasHidden = true; + containerStyle.display = ""; + } + var bbox = {}; + try { + bbox = this.node.getBBox(); + } catch(e) { + // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix + bbox = { + x: this.node.clientLeft, + y: this.node.clientTop, + width: this.node.clientWidth, + height: this.node.clientHeight + } + } finally { + bbox = bbox || {}; + if(canvasHidden){ + containerStyle.display = "none"; + } + } + hide && this.hide(); + return bbox; + }; + /*\ + * Element.attr + [ method ] + ** + * Sets the attributes of the element. + > Parameters + - attrName (string) attribute’s name + - value (string) value + * or + - params (object) object of name/value pairs + * or + - attrName (string) attribute’s name + * or + - attrNames (array) in this case method returns array of current values for given attribute names + = (object) @Element if attrsName & value or params are passed in. + = (...) value of the attribute if only attrsName is passed in. + = (array) array of values of the attribute if attrsNames is passed in. + = (object) object of attributes if nothing is passed in. + > Possible parameters + # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p> + o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`. + o clip-rect (string) comma or space separated values: x, y, width and height + o cursor (string) CSS type of the cursor + o cx (number) the x-axis coordinate of the center of the circle, or ellipse + o cy (number) the y-axis coordinate of the center of the circle, or ellipse + o fill (string) colour, gradient or image + o fill-opacity (number) + o font (string) + o font-family (string) + o font-size (number) font size in pixels + o font-weight (string) + o height (number) + o href (string) URL, if specified element behaves as hyperlink + o opacity (number) + o path (string) SVG path string format + o r (number) radius of the circle, ellipse or rounded corner on the rect + o rx (number) horisontal radius of the ellipse + o ry (number) vertical radius of the ellipse + o src (string) image URL, only works for @Element.image element + o stroke (string) stroke colour + o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”] + o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”] + o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”] + o stroke-miterlimit (number) + o stroke-opacity (number) + o stroke-width (number) stroke width in pixels, default is '1' + o target (string) used with href + o text (string) contents of the text element. Use `\n` for multiline text + o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`” + o title (string) will create tooltip with a given text + o transform (string) see @Element.transform + o width (number) + o x (number) + o y (number) + > Gradients + * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90° + * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black. + * + * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” – + * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point + * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses. + > Path String + # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p> + > Colour Parsing + # <ul> + # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> + # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> + # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> + # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> + # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> + # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li> + # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li> + # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> + # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li> + # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li> + # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li> + # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li> + # </ul> + \*/ + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + if (name == "transform") { + return this._.transform; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + if (value != null) { + var params = {}; + params[name] = value; + } else if (name != null && R.is(name, "object")) { + params = name; + } + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + setFillAndStroke(this, params); + return this; + }; + /*\ + * Element.toFront + [ method ] + ** + * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. + = (object) @Element + \*/ + elproto.toFront = function () { + if (this.removed) { + return this; + } + var node = getRealNode(this.node); + node.parentNode.appendChild(node); + var svg = this.paper; + svg.top != this && R._tofront(this, svg); + return this; + }; + /*\ + * Element.toBack + [ method ] + ** + * Moves the element so it is the furthest from the viewer’s eyes, behind other elements. + = (object) @Element + \*/ + elproto.toBack = function () { + if (this.removed) { + return this; + } + var node = getRealNode(this.node); + var parentNode = node.parentNode; + parentNode.insertBefore(node, parentNode.firstChild); + R._toback(this, this.paper); + var svg = this.paper; + return this; + }; + /*\ + * Element.insertAfter + [ method ] + ** + * Inserts current object after the given one. + = (object) @Element + \*/ + elproto.insertAfter = function (element) { + if (this.removed || !element) { + return this; + } + + var node = getRealNode(this.node); + var afterNode = getRealNode(element.node || element[element.length - 1].node); + if (afterNode.nextSibling) { + afterNode.parentNode.insertBefore(node, afterNode.nextSibling); + } else { + afterNode.parentNode.appendChild(node); + } + R._insertafter(this, element, this.paper); + return this; + }; + /*\ + * Element.insertBefore + [ method ] + ** + * Inserts current object before the given one. + = (object) @Element + \*/ + elproto.insertBefore = function (element) { + if (this.removed || !element) { + return this; + } + + var node = getRealNode(this.node); + var beforeNode = getRealNode(element.node || element[0].node); + beforeNode.parentNode.insertBefore(node, beforeNode); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + // Experimental. No Safari support. Use it on your own risk. + var t = this; + if (+size !== 0) { + var fltr = $("filter"), + blur = $("feGaussianBlur"); + t.attrs.blur = size; + fltr.id = R.createUUID(); + $(blur, {stdDeviation: +size || 1.5}); + fltr.appendChild(blur); + t.paper.defs.appendChild(fltr); + t._blur = fltr; + $(t.node, {filter: "url(#" + fltr.id + ")"}); + } else { + if (t._blur) { + t._blur.parentNode.removeChild(t._blur); + delete t._blur; + delete t.attrs.blur; + } + t.node.removeAttribute("filter"); + } + return t; + }; + R._engine.circle = function (svg, x, y, r) { + var el = $("circle"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; + res.type = "circle"; + $(el, res.attrs); + return res; + }; + R._engine.rect = function (svg, x, y, w, h, r) { + var el = $("rect"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; + res.type = "rect"; + $(el, res.attrs); + return res; + }; + R._engine.ellipse = function (svg, x, y, rx, ry) { + var el = $("ellipse"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; + res.type = "ellipse"; + $(el, res.attrs); + return res; + }; + R._engine.image = function (svg, src, x, y, w, h) { + var el = $("image"); + $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); + el.setAttributeNS(xlink, "href", src); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, src: src}; + res.type = "image"; + return res; + }; + R._engine.text = function (svg, x, y, text) { + var el = $("text"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = { + x: x, + y: y, + "text-anchor": "middle", + text: text, + "font-family": R._availableAttrs["font-family"], + "font-size": R._availableAttrs["font-size"], + stroke: "none", + fill: "#000" + }; + res.type = "text"; + setFillAndStroke(res, res.attrs); + return res; + }; + R._engine.setSize = function (width, height) { + this.width = width || this.width; + this.height = height || this.height; + this.canvas.setAttribute("width", this.width); + this.canvas.setAttribute("height", this.height); + if (this._viewBox) { + this.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con && con.container, + x = con.x, + y = con.y, + width = con.width, + height = con.height; + if (!container) { + throw new Error("SVG container not found."); + } + var cnvs = $("svg"), + css = "overflow:hidden;", + isFloating; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + $(cnvs, { + height: height, + version: 1.1, + width: width, + xmlns: "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" + }); + if (container == 1) { + cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; + R._g.doc.body.appendChild(cnvs); + isFloating = 1; + } else { + cnvs.style.cssText = css + "position:relative"; + if (container.firstChild) { + container.insertBefore(cnvs, container.firstChild); + } else { + container.appendChild(cnvs); + } + } + container = new R._Paper; + container.width = width; + container.height = height; + container.canvas = cnvs; + container.clear(); + container._left = container._top = 0; + isFloating && (container.renderfix = function () {}); + container.renderfix(); + return container; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var paperSize = this.getSize(), + size = mmax(w / paperSize.width, h / paperSize.height), + top = this.top, + aspectRatio = fit ? "xMidYMid meet" : "xMinYMin", + vb, + sw; + if (x == null) { + if (this._vbSize) { + size = 1; + } + delete this._vbSize; + vb = "0 0 " + this.width + S + this.height; + } else { + this._vbSize = size; + vb = x + S + y + S + w + S + h; + } + $(this.canvas, { + viewBox: vb, + preserveAspectRatio: aspectRatio + }); + while (size && top) { + sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; + top.attr({"stroke-width": sw}); + top._.dirty = 1; + top._.dirtyT = 1; + top = top.prev; + } + this._viewBox = [x, y, w, h, !!fit]; + return this; + }; + /*\ + * Paper.renderfix + [ method ] + ** + * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant + * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness. + * This method fixes the issue. + ** + Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method. + \*/ + R.prototype.renderfix = function () { + var cnvs = this.canvas, + s = cnvs.style, + pos; + try { + pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(); + } catch (e) { + pos = cnvs.createSVGMatrix(); + } + var left = -pos.e % 1, + top = -pos.f % 1; + if (left || top) { + if (left) { + this._left = (this._left + left) % 1; + s.left = this._left + "px"; + } + if (top) { + this._top = (this._top + top) % 1; + s.top = this._top + "px"; + } + } + }; + /*\ + * Paper.clear + [ method ] + ** + * Clears the paper, i.e. removes all the elements. + \*/ + R.prototype.clear = function () { + R.eve("raphael.clear", this); + var c = this.canvas; + while (c.firstChild) { + c.removeChild(c.firstChild); + } + this.bottom = this.top = null; + (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); + c.appendChild(this.desc); + c.appendChild(this.defs = $("defs")); + }; + /*\ + * Paper.remove + [ method ] + ** + * Removes the paper from the DOM. + \*/ + R.prototype.remove = function () { + eve("raphael.remove", this); + this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + }; + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +})); + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ VML Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.vml", ["raphael.core"], function(raphael) { + return factory(raphael); + }); + } else if (typeof exports === "object") { + factory(require("raphael")); + } else { + factory(glob.Raphael); + } +}(this, function(R) { + if (R && !R.vml) { + return; + } + + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + math = Math, + round = math.round, + mmax = math.max, + mmin = math.min, + abs = math.abs, + fillString = "fill", + separator = /[, ]+/, + eve = R.eve, + ms = " progid:DXImageTransform.Microsoft", + S = " ", + E = "", + map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, + bites = /([clmz]),?([^clmz]*)/gi, + blurregexp = / progid:\S+Blur\([^\)]+\)/g, + val = /-?[^,\s-]+/g, + cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)", + zoom = 21600, + pathTypes = {path: 1, rect: 1, image: 1}, + ovalTypes = {circle: 1, ellipse: 1}, + path2vml = function (path) { + var total = /[ahqstv]/ig, + command = R._pathToAbsolute; + Str(path).match(total) && (command = R._path2curve); + total = /[clmz]/g; + if (command == R._pathToAbsolute && !Str(path).match(total)) { + var res = Str(path).replace(bites, function (all, command, args) { + var vals = [], + isMove = command.toLowerCase() == "m", + res = map[command]; + args.replace(val, function (value) { + if (isMove && vals.length == 2) { + res += vals + map[command == "m" ? "l" : "L"]; + vals = []; + } + vals.push(round(value * zoom)); + }); + return res + vals; + }); + return res; + } + var pa = command(path), p, r; + res = []; + for (var i = 0, ii = pa.length; i < ii; i++) { + p = pa[i]; + r = pa[i][0].toLowerCase(); + r == "z" && (r = "x"); + for (var j = 1, jj = p.length; j < jj; j++) { + r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); + } + res.push(r); + } + return res.join(S); + }, + compensation = function (deg, dx, dy) { + var m = R.matrix(); + m.rotate(-deg, .5, .5); + return { + dx: m.x(dx, dy), + dy: m.y(dx, dy) + }; + }, + setCoords = function (p, sx, sy, dx, dy, deg) { + var _ = p._, + m = p.matrix, + fillpos = _.fillpos, + o = p.node, + s = o.style, + y = 1, + flip = "", + dxdy, + kx = zoom / sx, + ky = zoom / sy; + s.visibility = "hidden"; + if (!sx || !sy) { + return; + } + o.coordsize = abs(kx) + S + abs(ky); + s.rotation = deg * (sx * sy < 0 ? -1 : 1); + if (deg) { + var c = compensation(deg, dx, dy); + dx = c.dx; + dy = c.dy; + } + sx < 0 && (flip += "x"); + sy < 0 && (flip += " y") && (y = -1); + s.flip = flip; + o.coordorigin = (dx * -kx) + S + (dy * -ky); + if (fillpos || _.fillsize) { + var fill = o.getElementsByTagName(fillString); + fill = fill && fill[0]; + o.removeChild(fill); + if (fillpos) { + c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); + fill.position = c.dx * y + S + c.dy * y; + } + if (_.fillsize) { + fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); + } + o.appendChild(fill); + } + s.visibility = "visible"; + }; + R.toString = function () { + return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; + }; + var addArrow = function (o, value, isEnd) { + var values = Str(value).toLowerCase().split("-"), + se = isEnd ? "end" : "start", + i = values.length, + type = "classic", + w = "medium", + h = "medium"; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": + case "narrow": h = values[i]; break; + case "long": + case "short": w = values[i]; break; + } + } + var stroke = o.node.getElementsByTagName("stroke")[0]; + stroke[se + "arrow"] = type; + stroke[se + "arrowlength"] = w; + stroke[se + "arrowwidth"] = h; + }, + setFillAndStroke = function (o, params) { + // o.paper.canvas.style.display = "none"; + o.attrs = o.attrs || {}; + var node = o.node, + a = o.attrs, + s = node.style, + xy, + newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), + isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), + res = o; + + + for (var par in params) if (params[has](par)) { + a[par] = params[par]; + } + if (newpath) { + a.path = R._getPath[o.type](o); + o._.dirty = 1; + } + params.href && (node.href = params.href); + params.title && (node.title = params.title); + params.target && (node.target = params.target); + params.cursor && (s.cursor = params.cursor); + "blur" in params && o.blur(params.blur); + if (params.path && o.type == "path" || newpath) { + node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); + o._.dirty = 1; + if (o.type == "image") { + o._.fillpos = [a.x, a.y]; + o._.fillsize = [a.width, a.height]; + setCoords(o, 1, 1, 0, 0, 0); + } + } + "transform" in params && o.transform(params.transform); + if (isOval) { + var cx = +a.cx, + cy = +a.cy, + rx = +a.rx || +a.r || 0, + ry = +a.ry || +a.r || 0; + node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); + o._.dirty = 1; + } + if ("clip-rect" in params) { + var rect = Str(params["clip-rect"]).split(separator); + if (rect.length == 4) { + rect[2] = +rect[2] + (+rect[0]); + rect[3] = +rect[3] + (+rect[1]); + var div = node.clipRect || R._g.doc.createElement("div"), + dstyle = div.style; + dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); + if (!node.clipRect) { + dstyle.position = "absolute"; + dstyle.top = 0; + dstyle.left = 0; + dstyle.width = o.paper.width + "px"; + dstyle.height = o.paper.height + "px"; + node.parentNode.insertBefore(div, node); + div.appendChild(node); + node.clipRect = div; + } + } + if (!params["clip-rect"]) { + node.clipRect && (node.clipRect.style.clip = "auto"); + } + } + if (o.textpath) { + var textpathStyle = o.textpath.style; + params.font && (textpathStyle.font = params.font); + params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); + params["font-size"] && (textpathStyle.fontSize = params["font-size"]); + params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); + params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); + } + if ("arrow-start" in params) { + addArrow(res, params["arrow-start"]); + } + if ("arrow-end" in params) { + addArrow(res, params["arrow-end"], 1); + } + if (params.opacity != null || + params["stroke-width"] != null || + params.fill != null || + params.src != null || + params.stroke != null || + params["stroke-width"] != null || + params["stroke-opacity"] != null || + params["fill-opacity"] != null || + params["stroke-dasharray"] != null || + params["stroke-miterlimit"] != null || + params["stroke-linejoin"] != null || + params["stroke-linecap"] != null) { + var fill = node.getElementsByTagName(fillString), + newfill = false; + fill = fill && fill[0]; + !fill && (newfill = fill = createNode(fillString)); + if (o.type == "image" && params.src) { + fill.src = params.src; + } + params.fill && (fill.on = true); + if (fill.on == null || params.fill == "none" || params.fill === null) { + fill.on = false; + } + if (fill.on && params.fill) { + var isURL = Str(params.fill).match(R._ISURL); + if (isURL) { + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = isURL[1]; + fill.type = "tile"; + var bbox = o.getBBox(1); + fill.position = bbox.x + S + bbox.y; + o._.fillpos = [bbox.x, bbox.y]; + + R._preload(isURL[1], function () { + o._.fillsize = [this.offsetWidth, this.offsetHeight]; + }); + } else { + fill.color = R.getRGB(params.fill).hex; + fill.src = E; + fill.type = "solid"; + if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { + a.fill = "none"; + a.gradient = params.fill; + fill.rotate = false; + } + } + } + if ("fill-opacity" in params || "opacity" in params) { + var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); + opacity = mmin(mmax(opacity, 0), 1); + fill.opacity = opacity; + if (fill.src) { + fill.color = "none"; + } + } + node.appendChild(fill); + var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), + newstroke = false; + !stroke && (newstroke = stroke = createNode("stroke")); + if ((params.stroke && params.stroke != "none") || + params["stroke-width"] || + params["stroke-opacity"] != null || + params["stroke-dasharray"] || + params["stroke-miterlimit"] || + params["stroke-linejoin"] || + params["stroke-linecap"]) { + stroke.on = true; + } + (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); + var strokeColor = R.getRGB(params.stroke); + stroke.on && params.stroke && (stroke.color = strokeColor.hex); + opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); + var width = (toFloat(params["stroke-width"]) || 1) * .75; + opacity = mmin(mmax(opacity, 0), 1); + params["stroke-width"] == null && (width = a["stroke-width"]); + params["stroke-width"] && (stroke.weight = width); + width && width < 1 && (opacity *= width) && (stroke.weight = 1); + stroke.opacity = opacity; + + params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); + stroke.miterlimit = params["stroke-miterlimit"] || 8; + params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); + if ("stroke-dasharray" in params) { + var dasharray = { + "-": "shortdash", + ".": "shortdot", + "-.": "shortdashdot", + "-..": "shortdashdotdot", + ". ": "dot", + "- ": "dash", + "--": "longdash", + "- .": "dashdot", + "--.": "longdashdot", + "--..": "longdashdotdot" + }; + stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; + } + newstroke && node.appendChild(stroke); + } + if (res.type == "text") { + res.paper.canvas.style.display = E; + var span = res.paper.span, + m = 100, + fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); + s = span.style; + a.font && (s.font = a.font); + a["font-family"] && (s.fontFamily = a["font-family"]); + a["font-weight"] && (s.fontWeight = a["font-weight"]); + a["font-style"] && (s.fontStyle = a["font-style"]); + fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10; + s.fontSize = fontSize * m + "px"; + res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); + var brect = span.getBoundingClientRect(); + res.W = a.w = (brect.right - brect.left) / m; + res.H = a.h = (brect.bottom - brect.top) / m; + // res.paper.canvas.style.display = "none"; + res.X = a.x; + res.Y = a.y + res.H / 2; + + ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); + var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; + for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { + res._.dirty = 1; + break; + } + + // text-anchor emulation + switch (a["text-anchor"]) { + case "start": + res.textpath.style["v-text-align"] = "left"; + res.bbx = res.W / 2; + break; + case "end": + res.textpath.style["v-text-align"] = "right"; + res.bbx = -res.W / 2; + break; + default: + res.textpath.style["v-text-align"] = "center"; + res.bbx = 0; + break; + } + res.textpath.style["v-text-kern"] = true; + } + // res.paper.canvas.style.display = E; + }, + addGradientFill = function (o, gradient, fill) { + o.attrs = o.attrs || {}; + var attrs = o.attrs, + pow = Math.pow, + opacity, + oindex, + type = "linear", + fxfy = ".5 .5"; + o.attrs.gradient = gradient; + gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { + type = "radial"; + if (fx && fy) { + fx = toFloat(fx); + fy = toFloat(fy); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); + fxfy = fx + S + fy; + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + o = o.shape || o.node; + if (dots.length) { + o.removeChild(fill); + fill.on = true; + fill.method = "none"; + fill.color = dots[0].color; + fill.color2 = dots[dots.length - 1].color; + var clrs = []; + for (var i = 0, ii = dots.length; i < ii; i++) { + dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); + } + fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; + if (type == "radial") { + fill.type = "gradientTitle"; + fill.focus = "100%"; + fill.focussize = "0 0"; + fill.focusposition = fxfy; + fill.angle = 0; + } else { + // fill.rotate= true; + fill.type = "gradient"; + fill.angle = (270 - angle) % 360; + } + o.appendChild(fill); + } + return 1; + }, + Element = function (node, vml) { + this[0] = this.node = node; + node.raphael = true; + this.id = R._oid++; + node.raphaelid = this.id; + this.X = 0; + this.Y = 0; + this.attrs = {}; + this.paper = vml; + this.matrix = R.matrix(); + this._ = { + transform: [], + sx: 1, + sy: 1, + dx: 0, + dy: 0, + deg: 0, + dirty: 1, + dirtyT: 1 + }; + !vml.bottom && (vml.bottom = this); + this.prev = vml.top; + vml.top && (vml.top.next = this); + vml.top = this; + this.next = null; + }; + var elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + elproto.transform = function (tstr) { + if (tstr == null) { + return this._.transform; + } + var vbs = this.paper._viewBoxShift, + vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, + oldt; + if (vbs) { + oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); + } + R._extractTransform(this, vbt + tstr); + var matrix = this.matrix.clone(), + skew = this.skew, + o = this.node, + split, + isGrad = ~Str(this.attrs.fill).indexOf("-"), + isPatt = !Str(this.attrs.fill).indexOf("url("); + matrix.translate(1, 1); + if (isPatt || isGrad || this.type == "image") { + skew.matrix = "1 0 0 1"; + skew.offset = "0 0"; + split = matrix.split(); + if ((isGrad && split.noRotation) || !split.isSimple) { + o.style.filter = matrix.toFilter(); + var bb = this.getBBox(), + bbt = this.getBBox(1), + dx = bb.x - bbt.x, + dy = bb.y - bbt.y; + o.coordorigin = (dx * -zoom) + S + (dy * -zoom); + setCoords(this, 1, 1, dx, dy, 0); + } else { + o.style.filter = E; + setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); + } + } else { + o.style.filter = E; + skew.matrix = Str(matrix); + skew.offset = matrix.offset(); + } + if (oldt !== null) { // empty string value is true as well + this._.transform = oldt; + R._extractTransform(this, oldt); + } + return this; + }; + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + if (deg == null) { + return; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this._.dirtyT = 1; + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + if (this._.bbox) { + this._.bbox.x += dx; + this._.bbox.y += dy; + } + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + isNaN(cx) && (cx = null); + isNaN(cy) && (cy = null); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + this._.dirtyT = 1; + return this; + }; + elproto.hide = function () { + !this.removed && (this.node.style.display = "none"); + return this; + }; + elproto.show = function () { + !this.removed && (this.node.style.display = E); + return this; + }; + // Needed to fix the vml setViewBox issues + elproto.auxGetBBox = R.el.getBBox; + elproto.getBBox = function(){ + var b = this.auxGetBBox(); + if (this.paper && this.paper._viewBoxShift) + { + var c = {}; + var z = 1/this.paper._viewBoxShift.scale; + c.x = b.x - this.paper._viewBoxShift.dx; + c.x *= z; + c.y = b.y - this.paper._viewBoxShift.dy; + c.y *= z; + c.width = b.width * z; + c.height = b.height * z; + c.x2 = c.x + c.width; + c.y2 = c.y + c.height; + return c; + } + return b; + }; + elproto._getBBox = function () { + if (this.removed) { + return {}; + } + return { + x: this.X + (this.bbx || 0) - this.W / 2, + y: this.Y - this.H, + width: this.W, + height: this.H + }; + }; + elproto.remove = function () { + if (this.removed || !this.node.parentNode) { + return; + } + this.paper.__set__ && this.paper.__set__.exclude(this); + R.eve.unbind("raphael.*.*." + this.id); + R._tear(this, this.paper); + this.node.parentNode.removeChild(this.node); + this.shape && this.shape.parentNode.removeChild(this.shape); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (this.attrs && value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + var params; + if (value != null) { + params = {}; + params[name] = value; + } + value == null && R.is(name, "object") && (params = name); + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + if (params) { + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + // this.paper.canvas.style.display = "none"; + if (params.text && this.type == "text") { + this.textpath.string = params.text; + } + setFillAndStroke(this, params); + // this.paper.canvas.style.display = E; + } + return this; + }; + elproto.toFront = function () { + !this.removed && this.node.parentNode.appendChild(this.node); + this.paper && this.paper.top != this && R._tofront(this, this.paper); + return this; + }; + elproto.toBack = function () { + if (this.removed) { + return this; + } + if (this.node.parentNode.firstChild != this.node) { + this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); + R._toback(this, this.paper); + } + return this; + }; + elproto.insertAfter = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[element.length - 1]; + } + if (element.node.nextSibling) { + element.node.parentNode.insertBefore(this.node, element.node.nextSibling); + } else { + element.node.parentNode.appendChild(this.node); + } + R._insertafter(this, element, this.paper); + return this; + }; + elproto.insertBefore = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[0]; + } + element.node.parentNode.insertBefore(this.node, element.node); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + var s = this.node.runtimeStyle, + f = s.filter; + f = f.replace(blurregexp, E); + if (+size !== 0) { + this.attrs.blur = size; + s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; + s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); + } else { + s.filter = f; + s.margin = 0; + delete this.attrs.blur; + } + return this; + }; + + R._engine.path = function (pathString, vml) { + var el = createNode("shape"); + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = vml.coordorigin; + var p = new Element(el, vml), + attr = {fill: "none", stroke: "#000"}; + pathString && (attr.path = pathString); + p.type = "path"; + p.path = []; + p.Path = E; + setFillAndStroke(p, attr); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.rect = function (vml, x, y, w, h, r) { + var path = R._rectPath(x, y, w, h, r), + res = vml.path(path), + a = res.attrs; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.r = r; + a.path = path; + res.type = "rect"; + return res; + }; + R._engine.ellipse = function (vml, x, y, rx, ry) { + var res = vml.path(), + a = res.attrs; + res.X = x - rx; + res.Y = y - ry; + res.W = rx * 2; + res.H = ry * 2; + res.type = "ellipse"; + setFillAndStroke(res, { + cx: x, + cy: y, + rx: rx, + ry: ry + }); + return res; + }; + R._engine.circle = function (vml, x, y, r) { + var res = vml.path(), + a = res.attrs; + res.X = x - r; + res.Y = y - r; + res.W = res.H = r * 2; + res.type = "circle"; + setFillAndStroke(res, { + cx: x, + cy: y, + r: r + }); + return res; + }; + R._engine.image = function (vml, src, x, y, w, h) { + var path = R._rectPath(x, y, w, h), + res = vml.path(path).attr({stroke: "none"}), + a = res.attrs, + node = res.node, + fill = node.getElementsByTagName(fillString)[0]; + a.src = src; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.path = path; + res.type = "image"; + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = src; + fill.type = "tile"; + res._.fillpos = [x, y]; + res._.fillsize = [w, h]; + node.appendChild(fill); + setCoords(res, 1, 1, 0, 0, 0); + return res; + }; + R._engine.text = function (vml, x, y, text) { + var el = createNode("shape"), + path = createNode("path"), + o = createNode("textpath"); + x = x || 0; + y = y || 0; + text = text || ""; + path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); + path.textpathok = true; + o.string = Str(text); + o.on = true; + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = "0 0"; + var p = new Element(el, vml), + attr = { + fill: "#000", + stroke: "none", + font: R._availableAttrs.font, + text: text + }; + p.shape = el; + p.path = path; + p.textpath = o; + p.type = "text"; + p.attrs.text = Str(text); + p.attrs.x = x; + p.attrs.y = y; + p.attrs.w = 1; + p.attrs.h = 1; + setFillAndStroke(p, attr); + el.appendChild(o); + el.appendChild(path); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.setSize = function (width, height) { + var cs = this.canvas.style; + this.width = width; + this.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + cs.width = width; + cs.height = height; + cs.clip = "rect(0 " + width + " " + height + " 0)"; + if (this._viewBox) { + R._engine.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var paperSize = this.getSize(), + width = paperSize.width, + height = paperSize.height, + H, W; + if (fit) { + H = height / h; + W = width / w; + if (w * H < width) { + x -= (width - w * H) / 2 / H; + } + if (h * W < height) { + y -= (height - h * W) / 2 / W; + } + } + this._viewBox = [x, y, w, h, !!fit]; + this._viewBoxShift = { + dx: -x, + dy: -y, + scale: paperSize + }; + this.forEach(function (el) { + el.transform("..."); + }); + return this; + }; + var createNode; + R._engine.initWin = function (win) { + var doc = win.document; + if (doc.styleSheets.length < 31) { + doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); + } else { + // no more room, add to the existing one + // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx + doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)"); + } + try { + !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); + createNode = function (tagName) { + return doc.createElement('<rvml:' + tagName + ' class="rvml">'); + }; + } catch (e) { + createNode = function (tagName) { + return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); + }; + } + }; + R._engine.initWin(R._g.win); + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con.container, + height = con.height, + s, + width = con.width, + x = con.x, + y = con.y; + if (!container) { + throw new Error("VML container not found."); + } + var res = new R._Paper, + c = res.canvas = R._g.doc.createElement("div"), + cs = c.style; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + res.width = width; + res.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + res.coordsize = zoom * 1e3 + S + zoom * 1e3; + res.coordorigin = "0 0"; + res.span = R._g.doc.createElement("span"); + res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; + c.appendChild(res.span); + cs.cssText = R.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);", width, height); + if (container == 1) { + R._g.doc.body.appendChild(c); + cs.left = x + "px"; + cs.top = y + "px"; + cs.position = "absolute"; + } else { + if (container.firstChild) { + container.insertBefore(c, container.firstChild); + } else { + container.appendChild(c); + } + } + res.renderfix = function () {}; + return res; + }; + R.prototype.clear = function () { + R.eve("raphael.clear", this); + this.canvas.innerHTML = E; + this.span = R._g.doc.createElement("span"); + this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; + this.canvas.appendChild(this.span); + this.bottom = this.top = null; + }; + R.prototype.remove = function () { + R.eve("raphael.remove", this); + this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + return true; + }; + + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +})); + +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) { + return factory(Raphael); + }); + } else if (typeof exports === "object") { + var raphael = require("raphael.core"); + + require("raphael.svg"); + require("raphael.vml"); + + module.exports = factory(raphael); + } else { + //glob.Raphael = factory(glob.Raphael); + } +}(this, function (Raphael) { + return Raphael.ninja(); +}));/** + * svg绘图 + * + * Created by GUY on 2015/12/3. + * @class BI.Svg + * @extends BI.Widget + */ +BI.Svg = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Svg.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-svg" + }) + }, + + _init: function () { + BI.Svg.superclass._init.apply(this, arguments); + this.paper = Raphael(this.element[0]); + + this.element.css("overflow", "hidden"); + $(this.paper.canvas).width("100%").height("100%").css({"left": "0", "top": "0"}).appendTo(this.element); + + this.top = this.paper.top; + this.bottom = this.paper.bottom; + this.customAttributes = this.paper.customAttributes; + this.ca = this.paper.ca; + this.raphael = this.paper.raphael; + }, + + add: function () { + return this.paper.add.apply(this.paper, arguments); + }, + + path: function () { + return this.paper.path.apply(this.paper, arguments); + }, + + image: function () { + return this.paper.image.apply(this.paper, arguments); + }, + + rect: function () { + return this.paper.rect.apply(this.paper, arguments); + }, + + circle: function () { + return this.paper.circle.apply(this.paper, arguments); + }, + + ellipse: function () { + return this.paper.ellipse.apply(this.paper, arguments); + }, + + text: function () { + return this.paper.text.apply(this.paper, arguments); + }, + + print: function () { + return this.paper.print.apply(this.paper, arguments); + }, + + + setStart: function () { + return this.paper.setStart.apply(this.paper, arguments); + }, + + setFinish: function () { + return this.paper.setFinish.apply(this.paper, arguments); + }, + + setSize: function () { + return this.paper.setSize.apply(this.paper, arguments); + }, + + setViewBox: function () { + return this.paper.setViewBox.apply(this.paper, arguments); + }, + + + getById: function () { + return this.paper.getById.apply(this.paper, arguments); + }, + + getElementByPoint: function () { + return this.paper.getElementByPoint.apply(this.paper, arguments); + }, + + getElementsByPoint: function () { + return this.paper.getElementsByPoint.apply(this.paper, arguments); + }, + + getFont: function () { + return this.paper.getFont.apply(this.paper, arguments); + }, + + + set: function () { + return this.paper.set.apply(this.paper, arguments); + }, + remove: function () { + return this.paper.remove.apply(this.paper, arguments); + }, + clear: function () { + return this.paper.clear.apply(this.paper, arguments); + } +}); +BI.shortcut("bi.svg", BI.Svg);/** + * + * 原生表格滚动条,为了IE8的兼容 + * + * Created by GUY on 2016/1/12. + * @class BI.NativeTableScrollbar + * @extends BI.Widget + */ +BI.NativeTableScrollbar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + defaultPosition: 0, + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + //把滚动台size改掉 + this.element.width(36); + + var throttle = BI.throttle(function () { + self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollTop()); + }, 150, {leading: false}); + this.element.scroll(function () { + throttle(); + }); + return { + type: "bi.default", + scrolly: true, + items: [{ + type: "bi.layout", + width: 1, + ref: function (_ref) { + self.inner = _ref; + } + }] + } + }, + + mounted: function () { + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + try { + this.element.scrollTop(o.position); + } catch (e) { + + } + this.inner.element.height(o.contentSize); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.setHeight(size); + this.options.size = size; + }, + + populate: function () { + this._populate(); + } +}); +BI.NativeTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.native_table_scrollbar", BI.NativeTableScrollbar); + + +BI.NativeTableHorizontalScrollbar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + //把滚动台size改掉 + this.element.height(36); + + var throttle = BI.throttle(function () { + self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollLeft()); + }, 150, {leading: false}); + this.element.scroll(function () { + throttle(); + }); + return { + type: "bi.default", + scrollx: true, + items: [{ + type: "bi.layout", + height: 1, + ref: function (_ref) { + self.inner = _ref; + } + }] + } + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.setWidth(size); + this.options.size = size; + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + try { + this.element.scrollLeft(o.position); + } catch (e) { + + } + this.inner.element.width(o.contentSize); + }, + + populate: function () { + this._populate(); + } +}); +BI.NativeTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.native_table_horizontal_scrollbar", BI.NativeTableHorizontalScrollbar);/** + * + * 表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableCell + * @extends BI.Single + */ +BI.TableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-cell", + textAlign: "left", + text: "" + }) + }, + + _init: function () { + BI.TableCell.superclass._init.apply(this, arguments); + BI.createWidget({ + type: "bi.label", + element: this, + whiteSpace: "nowrap", + textAlign: this.options.textAlign, + height: this.options.height, + text: this.options.text, + value: this.options.value, + lgap: 5 + }) + } +}); + +BI.shortcut("bi.table_cell", BI.TableCell);/** + * + * 表格单元格 + * + * Created by GUY on 2016/1/12. + * @class BI.CollectionTableCell + * @extends BI.Widget + */ +BI.CollectionTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection-table-cell bi-border-right bi-border-bottom", + width: 0, + height: 0, + _left: 0, + _top: 0, + cell: {} + }) + }, + + _init: function () { + BI.CollectionTableCell.superclass._init.apply(this, arguments); + var o = this.options; + this.cell = BI.createWidget(BI.extend({ + type: "bi.label" + }, o.cell, { + cls: (o.cell.cls || "") + " collection-table-cell-wrapper", + width: o.width - (o._left === 0 ? 1 : 0) - 1, + height: o.height - (o._top === 0 ? 1 : 0) - 1 + })); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.cell, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + }, + + setWidth: function (width) { + BI.CollectionTableCell.superclass.setWidth.apply(this, arguments); + var o = this.options; + this.cell.setWidth(o.width - (o._left === 0 ? 1 : 0) - 1); + }, + + setHeight: function (height) { + BI.CollectionTableCell.superclass.setHeight.apply(this, arguments); + var o = this.options; + this.cell.setHeight(o.height - (o._top === 0 ? 1 : 0) - 1); + } +}); + +BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/** + * CollectionTable + * + * Created by GUY on 2016/1/12. + * @class BI.CollectionTable + * @extends BI.Widget + */ +BI.CollectionTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection-table", + headerRowSize: 25, + rowSize: 25, + columnSize: [], + isNeedFreeze: false, + freezeCols: [], + isNeedMerge: false, + mergeCols: [], + mergeRule: BI.emptyFn, + header: [], + items: [], + regionColumnSize: [] + }); + }, + + render: function () { + var self = this, o = this.options; + this._width = 0; + this._height = 0; + this._scrollBarSize = BI.DOM.getScrollWidth(); + this.topLeftCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.topLeftItems[index]; + } + }); + this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomLeftCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topRightCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.topRightItems[index]; + } + }); + this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomRightCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomLeftCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.bottomLeftItems[index]; + } + }); + this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomRightCollection.setScrollTop(scroll.scrollTop); + self.topLeftCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomRightCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.bottomRightItems[index]; + } + }); + this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomLeftCollection.setScrollTop(scroll.scrollTop); + self.topRightCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topLeftCollection] + }); + this.topRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topRightCollection] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomLeftCollection] + }); + this.bottomRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomRightCollection] + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topLeft, + top: 0, + left: 0 + }, { + el: this.topRight, + top: 0 + }, { + el: this.bottomLeft, + left: 0 + }, { + el: this.bottomRight + }] + }); + + this.topScrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + width: BI.GridTableScrollbar.SIZE + }); + this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { + self.bottomLeftCollection.setScrollTop(scrollTop); + self.bottomRightCollection.setScrollTop(scrollTop); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.leftScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topLeftCollection.setScrollLeft(scrollLeft); + self.bottomLeftCollection.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.rightScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topRightCollection.setScrollLeft(scrollLeft); + self.bottomRightCollection.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.scrollBarLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topScrollbar, + right: 0, + top: 0 + }, { + el: this.leftScrollbar, + left: 0 + }, { + el: this.rightScrollbar, + }] + }); + this._width = o.width - BI.GridTableScrollbar.SIZE; + this._height = o.height - BI.GridTableScrollbar.SIZE; + }, + + mounted: function () { + var o = this.options; + if (o.items.length > 0 || o.header.length > 0) { + this._digest(); + this._populate(); + } + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; + }, + + _getFreezeHeaderHeight: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return 0; + } + return o.header.length * o.headerRowSize; + }, + + _getActualItems: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return o.header.concat(o.items); + } + return o.items; + }, + + _populateScrollbar: function () { + var o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); + this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); + this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()); + this.topScrollbar.populate(); + + this.leftScrollbar.setContentSize(totalLeftColumnSize); + this.leftScrollbar.setSize(regionSize); + this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()); + this.leftScrollbar.populate(); + + this.rightScrollbar.setContentSize(totalRightColumnSize); + this.rightScrollbar.setSize(this._width - regionSize); + this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()); + this.rightScrollbar.populate(); + + var items = this.scrollBarLayout.attr("items"); + items[0].top = this._getFreezeHeaderHeight(); + items[1].top = this._height; + items[2].top = this._height; + items[2].left = regionSize; + this.scrollBarLayout.attr("items", items); + this.scrollBarLayout.resize(); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + var tlw = otlw + this._scrollBarSize; + var tlh = otlh + this._scrollBarSize; + var trw = otrw + this._scrollBarSize; + var trh = otrh + this._scrollBarSize; + var blw = oblw + this._scrollBarSize; + var blh = oblh + this._scrollBarSize; + var brw = obrw + this._scrollBarSize; + var brh = obrh + this._scrollBarSize; + + var digest = function (el) { + el.element.css({ + overflow: "scroll", + overflowX: "scroll", + overflowY: "scroll" + }) + }; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftCollection.setWidth(tlw); + this.topLeftCollection.setHeight(tlh); + this.topRightCollection.setWidth(trw); + this.topRightCollection.setHeight(trh); + this.bottomLeftCollection.setWidth(blw); + this.bottomLeftCollection.setHeight(blh); + this.bottomRightCollection.setWidth(brw); + this.bottomRightCollection.setHeight(brh); + + digest(this.topLeftCollection); + digest(this.topRightCollection); + digest(this.bottomLeftCollection); + digest(this.bottomRightCollection); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + var run = function (positions, items, rendered) { + BI.each(positions, function (i, item) { + var cell = { + type: "bi.collection_table_cell", + cell: items[item.row][item.col] + }; + rendered.push(cell); + }); + }; + run(this.topLeftItems, o.header, leftHeader); + run(this.topRightItems, o.header, rightHeader); + run(this.bottomLeftItems, this._getActualItems(), leftItems); + run(this.bottomRightItems, this._getActualItems(), rightItems); + + this.topLeftCollection._populate(leftHeader); + this.topRightCollection._populate(rightHeader); + this.bottomLeftCollection._populate(leftItems); + this.bottomRightCollection._populate(rightItems); + }, + + _digest: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + //如果表头位置不够,取消表头冻结 + if (this._getFreezeHeaderHeight() <= 0) { + this.topLeftItems = []; + this.topRightItems = []; + this.bottomLeftItems = this._serialize(this._getActualItems(), 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); + this.bottomRightItems = this._serialize(this._getActualItems(), freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); + } else { + this.topLeftItems = this._serialize(o.header, 0, freezeColLength, o.headerRowSize, o.columnSize, o.mergeCols); + this.topRightItems = this._serialize(o.header, freezeColLength, o.columnSize.length, o.headerRowSize, o.columnSize, true); + this.bottomLeftItems = this._serialize(o.items, 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols); + this.bottomRightItems = this._serialize(o.items, freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols); + } + }, + + _serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols, mergeRows) { + mergeCols = mergeCols || []; + mergeRows = mergeRows || []; + var self = this, o = this.options; + var result = [], cache = {}, preCol = {}, preRow = {}, map = {}; + var summaryColumnSize = []; + for (var i = startCol; i < endCol; i++) { + if (i === startCol) { + summaryColumnSize[i] = columnSize[i]; + } else { + summaryColumnSize[i] = summaryColumnSize[i - 1] + columnSize[i]; + } + } + var mergeRow = function (i, j) { + preCol[j]._height += rowHeight; + preCol[j].__mergeRows.push(i); + }; + + var mergeCol = function (i, j) { + preRow[i]._width += columnSize[j]; + preRow[i].__mergeCols.push(j); + }; + + var createOneEl = function (r, c) { + var width = columnSize[c]; + var height = rowHeight; + map[r][c]._row = r; + map[r][c]._col = c; + map[r][c]._width = width; + map[r][c]._height = height; + preCol[c] = map[r][c]; + preCol[c].__mergeRows = [r]; + preRow[r] = map[r][c]; + preRow[r].__mergeCols = [c]; + + result.push({ + x: summaryColumnSize[c] - columnSize[c], + y: +r * rowHeight, + item: map[r][c] + }); + }; + + BI.each(items, function (i, cols) { + for (var j = startCol; j < endCol; j++) { + if (!cache[i]) { + cache[i] = {}; + } + if (!map[i]) { + map[i] = {}; + } + cache[i][j] = cols[j]; + map[i][j] = {}; + if (mergeCols === true || mergeCols.indexOf(j) > -1 || mergeRows === true || mergeRows.indexOf(i) > -1) { + if (i === 0 && j === startCol) { + createOneEl(0, startCol); + } else if (j === startCol && i > 0) { + var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); + if (isNeedMergeRow === true) { + mergeRow(i, j); + preRow[i] = preCol[j]; + } else { + createOneEl(i, j); + } + } else if (i === 0 && j > startCol) { + var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); + if (isNeedMergeCol === true) { + mergeCol(i, j); + preCol[j] = preRow[i]; + } else { + createOneEl(i, j); + } + } else { + var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); + var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); + if (isNeedMergeCol && isNeedMergeRow) { + continue; + //mergeRow(i, j);//优先合并列 + } + if (isNeedMergeCol) { + mergeCol(i, j); + } + if (isNeedMergeRow) { + mergeRow(i, j); + } + if (!isNeedMergeCol && !isNeedMergeRow) { + createOneEl(i, j); + } + } + } else { + createOneEl(i, j); + } + } + }); + return BI.map(result, function (i, item) { + return { + x: item.x, + y: item.y, + row: item.item._row, + col: item.item._col, + width: item.item._width, + height: item.item._height + } + }); + }, + + _populate: function () { + if (this._width <= 0 || this._height <= 0) { + return; + } + if (this._isNeedDigest === true) { + this._digest(); + } + this._isNeedDigest = false; + this._populateTable(); + this._populateScrollbar(); + }, + + getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + setVerticalScroll: function (scrollTop) { + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.topLeftCollection.setScrollLeft(scrollLeft); + this.bottomLeftCollection.setScrollLeft(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.topRightCollection.setScrollLeft(scrollLeft); + this.bottomRightCollection.setScrollLeft(scrollLeft); + }, + + getVerticalScroll: function () { + return this.bottomRightCollection.getScrollTop(); + }, + + getLeftHorizontalScroll: function () { + return this.bottomLeftCollection.getScrollLeft(); + }, + + getRightHorizontalScroll: function () { + return this.bottomRightCollection.getScrollLeft(); + }, + + setWidth: function (width) { + BI.CollectionTable.superclass.setWidth.apply(this, arguments); + this._width = this.options.width - BI.GridTableScrollbar.SIZE; + }, + + setHeight: function (height) { + BI.CollectionTable.superclass.setHeight.apply(this, arguments); + this._height = this.options.height - BI.GridTableScrollbar.SIZE; + }, + + setColumnSize: function (columnSize) { + this._isNeedDigest = true; + this.options.columnSize = columnSize; + }, + + setRegionColumnSize: function (regionColumnSize) { + this._isNeedDigest = true; + this.options.regionColumnSize = regionColumnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + populate: function (items, header) { + if (items && items !== this.options.items) { + this._isNeedDigest = true; + this.options.items = items; + this._restore(); + } + if (header && header !== this.options.header) { + this._isNeedDigest = true; + this.options.header = header; + this._restore(); + } + this._populate(); + }, + + _restore: function () { + this.topLeftCollection.restore(); + this.topRightCollection.restore(); + this.bottomLeftCollection.restore(); + this.bottomRightCollection.restore(); + }, + + restore: function () { + this._restore(); + } +}); +BI.shortcut('bi.collection_table', BI.CollectionTable);/** + * QuickCollectionTable + * + * Created by GUY on 2016/1/12. + * @class BI.QuickCollectionTable + * @extends BI.CollectionTable + */ +BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, { + _defaultConfig: function () { + return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-quick-collection-table" + }); + }, + + render: function () { + BI.QuickCollectionTable.superclass.render.apply(this, arguments); + var self = this, o = this.options; + this.topLeftCollection.setOverflowX(false); + this.topLeftCollection.setOverflowY(false); + this.topRightCollection.setOverflowX(false); + this.topRightCollection.setOverflowY(false); + this.bottomLeftCollection.setOverflowX(false); + this.bottomLeftCollection.setOverflowY(false); + this.bottomRightCollection.setOverflowX(false); + this.bottomRightCollection.setOverflowY(false); + }, + + mounted: function () { + BI.QuickCollectionTable.superclass.mounted.apply(this, arguments); + var self = this; + this._topLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._topRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this.topLeftCollection.element.mousewheel(function (e) { + self._topLeftWheelHandler.onWheel(e.originalEvent); + }); + this.topRightCollection.element.mousewheel(function (e) { + self._topRightWheelHandler.onWheel(e.originalEvent); + }); + this.bottomLeftCollection.element.mousewheel(function (e) { + self._bottomLeftWheelHandler.onWheel(e.originalEvent); + }); + this.bottomRightCollection.element.mousewheel(function (e) { + self._bottomRightWheelHandler.onWheel(e.originalEvent); + }); + }, + + _shouldHandleLeftX: function (delta) { + if (delta > 0) { + return this.bottomLeftCollection.getScrollLeft() < this.bottomLeftCollection.getMaxScrollLeft(); + } else { + return this.bottomLeftCollection.getScrollLeft() > 0; + } + }, + + _shouldHandleRightX: function (delta) { + if (delta > 0) { + return this.bottomRightCollection.getScrollLeft() < this.bottomRightCollection.getMaxScrollLeft(); + } else { + return this.bottomRightCollection.getScrollLeft() > 0; + } + }, + + _shouldHandleY: function (delta) { + if (delta > 0) { + return this.bottomRightCollection.getScrollTop() < this.bottomRightCollection.getMaxScrollTop(); + } else { + return this.bottomRightCollection.getScrollTop() > 0; + } + }, + + _onWheelLeft: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomLeftCollection.getScrollTop(); + var scrollLeft = this.bottomLeftCollection.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + this.topLeftCollection.setScrollLeft(scrollLeft); + this.bottomLeftCollection.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _onWheelRight: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomRightCollection.getScrollTop(); + var scrollLeft = this.bottomRightCollection.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + this.topRightCollection.setScrollLeft(scrollLeft); + this.bottomRightCollection.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = [] + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftCollection.setWidth(otlw); + this.topLeftCollection.setHeight(otlh); + this.topRightCollection.setWidth(otrw); + this.topRightCollection.setHeight(otrh); + this.bottomLeftCollection.setWidth(oblw); + this.bottomLeftCollection.setHeight(oblh); + this.bottomRightCollection.setWidth(obrw); + this.bottomRightCollection.setHeight(obrh); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + var run = function (positions, items, rendered) { + BI.each(positions, function (i, item) { + var cell = { + type: "bi.collection_table_cell", + cell: items[item.row][item.col] + }; + rendered.push(cell); + }); + }; + run(this.topLeftItems, o.header, leftHeader); + run(this.topRightItems, o.header, rightHeader); + run(this.bottomLeftItems, this._getActualItems(), leftItems); + run(this.bottomRightItems, this._getActualItems(), rightItems); + + this.topLeftCollection.populate(leftHeader); + this.topRightCollection.populate(rightHeader); + this.bottomLeftCollection.populate(leftItems); + this.bottomRightCollection.populate(rightItems); + } +}); +BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/** + * + * 表格单元格 + * + * Created by GUY on 2016/1/12. + * @class BI.GridTableCell + * @extends BI.Widget + */ +BI.GridTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-table-cell bi-border-right bi-border-bottom", + width: 0, + height: 0, + _rowIndex: 0, + _columnIndex: 0, + _left: 0, + _top: 0, + cell: {} + }) + }, + + _init: function () { + BI.GridTableCell.superclass._init.apply(this, arguments); + var o = this.options; + this.cell = BI.createWidget(BI.extend({ + type: "bi.label" + }, o.cell, { + cls: (o.cell.cls || "") + "grid-table-cell-wrapper", + width: o.width - (o._columnIndex === 0 ? 1 : 0) - 1, + height: o.height - (o._rowIndex === 0 ? 1 : 0) - 1 + })); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.cell, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + }, + + setWidth: function (width) { + BI.GridTableCell.superclass.setWidth.apply(this, arguments); + var o = this.options; + this.cell.setWidth(o.width - (o._columnIndex === 0 ? 1 : 0) - 1); + }, + + setHeight: function (height) { + BI.GridTableCell.superclass.setHeight.apply(this, arguments); + var o = this.options; + this.cell.setHeight(o.height - (o._rowIndex === 0 ? 1 : 0) - 1); + } +}); + +BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/** + * GridTable + * + * Created by GUY on 2016/1/12. + * @class BI.GridTable + * @extends BI.Widget + */ +BI.GridTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-table", + headerRowSize: 25, + rowSize: 25, + columnSize: [], + isNeedFreeze: false, + freezeCols: [], + header: [], + items: [], + regionColumnSize: [] + }); + }, + + render: function () { + var self = this, o = this.options; + this._width = 0; + this._height = 0; + this._scrollBarSize = BI.DOM.getScrollWidth(); + var rowHeightGetter = function () { + return o.rowSize; + }; + var columnLeftWidthGetter = function (index) { + return o.columnSize[index]; + }; + var columnRightWidthGetter = function (index) { + return o.columnSize[index + self._getFreezeColLength()]; + }; + this.topLeftGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnLeftWidthGetter + }); + this.topLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomLeftGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topRightGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnRightWidthGetter + }); + this.topRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomRightGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomLeftGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnLeftWidthGetter + }); + this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomRightGrid.setScrollTop(scroll.scrollTop); + self.topLeftGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomRightGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnRightWidthGetter + }); + this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomLeftGrid.setScrollTop(scroll.scrollTop); + self.topRightGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topLeftGrid] + }); + this.topRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topRightGrid] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomLeftGrid] + }); + this.bottomRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomRightGrid] + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topLeft, + top: 0, + left: 0 + }, { + el: this.topRight, + top: 0 + }, { + el: this.bottomLeft, + left: 0 + }, { + el: this.bottomRight + }] + }); + + this.topScrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + width: BI.GridTableScrollbar.SIZE + }); + this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { + self.bottomLeftGrid.setScrollTop(scrollTop); + self.bottomRightGrid.setScrollTop(scrollTop); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.leftScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topLeftGrid.setScrollLeft(scrollLeft); + self.bottomLeftGrid.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.rightScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topRightGrid.setScrollLeft(scrollLeft); + self.bottomRightGrid.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.scrollBarLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topScrollbar, + right: 0, + top: 0 + }, { + el: this.leftScrollbar, + left: 0 + }, { + el: this.rightScrollbar + }] + }); + this._width = o.width - BI.GridTableScrollbar.SIZE; + this._height = o.height - BI.GridTableScrollbar.SIZE; + this.header = this._getHeader(); + this.items = this._getItems(); + }, + + mounted: function () { + var o = this.options; + if (o.items.length > 0 || o.header.length > 0) { + this._populate(); + } + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; + }, + + _getFreezeHeaderHeight: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return 0; + } + return o.header.length * o.headerRowSize; + }, + + _getActualItems: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return o.header.concat(o.items); + } + return o.items; + }, + + _populateScrollbar: function () { + var o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); + this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); + this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(), this.bottomRightGrid.getScrollTop())); + this.topScrollbar.populate(); + + this.leftScrollbar.setContentSize(totalLeftColumnSize); + this.leftScrollbar.setSize(regionSize); + this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()); + this.leftScrollbar.populate(); + + this.rightScrollbar.setContentSize(totalRightColumnSize); + this.rightScrollbar.setSize(this._width - regionSize); + this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()); + this.rightScrollbar.populate(); + + var items = this.scrollBarLayout.attr("items"); + items[0].top = this._getFreezeHeaderHeight(); + items[1].top = this._height; + items[2].top = this._height; + items[2].left = regionSize; + this.scrollBarLayout.attr("items", items); + this.scrollBarLayout.resize(); + }, + + _getHeader: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + var leftHeader = [], rightHeader = []; + BI.each(o.header, function (i, cols) { + leftHeader[i] = []; + rightHeader[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftHeader[i].push(cell); + } else { + rightHeader[i].push(cell); + } + }); + }); + return [leftHeader, rightHeader]; + }, + + _getItems: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + var leftItems = [], rightItems = []; + BI.each(this._getActualItems(), function (i, cols) { + leftItems[i] = []; + rightItems[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftItems[i].push(cell); + } else { + rightItems[i].push(cell); + } + }); + }); + return [leftItems, rightItems]; + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + var freezeColLength = this._getFreezeColLength(); + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + var tlw = otlw + this._scrollBarSize; + var tlh = otlh + this._scrollBarSize; + var trw = otrw + this._scrollBarSize; + var trh = otrh + this._scrollBarSize; + var blw = oblw + this._scrollBarSize; + var blh = oblh + this._scrollBarSize; + var brw = obrw + this._scrollBarSize; + var brh = obrh + this._scrollBarSize; + + var digest = function (el) { + el.element.css({ + overflow: "scroll", + overflowX: "scroll", + overflowY: "scroll" + }) + }; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftGrid.setWidth(tlw); + this.topLeftGrid.setHeight(tlh); + this.topRightGrid.setWidth(trw); + this.topRightGrid.setHeight(trh); + this.bottomLeftGrid.setWidth(blw); + this.bottomLeftGrid.setHeight(blh); + this.bottomRightGrid.setWidth(brw); + this.bottomRightGrid.setHeight(brh); + + digest(this.topLeftGrid); + digest(this.topRightGrid); + digest(this.bottomLeftGrid); + digest(this.bottomRightGrid); + + this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); + this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.topRightGrid.setEstimatedRowSize(o.headerRowSize); + this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); + this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.bottomRightGrid.setEstimatedRowSize(o.rowSize); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + this.topLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.topRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + + function overscan(grid, w, h, rSize, cSize) { + var rCount = h / rSize; + var cCount = w / cSize; + if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { + grid.attr("overscanRowCount", 100); + grid.attr("overscanColumnCount", 100); + } + } + + if (freezeColLength > 0) { + overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); + overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength); + } + if (o.columnSize.length - freezeColLength > 0) { + overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + } + + this.topLeftGrid._populate(this.header[0]); + this.topRightGrid._populate(this.header[1]); + this.bottomLeftGrid._populate(this.items[0]); + this.bottomRightGrid._populate(this.items[1]); + }, + + _populate: function () { + if (this._width <= 0 || this._height <= 0) { + return; + } + this._populateTable(); + this._populateScrollbar(); + }, + + getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + setVerticalScroll: function (scrollTop) { + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.topLeftGrid.setScrollLeft(scrollLeft); + this.bottomLeftGrid.setScrollLeft(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.topRightGrid.setScrollLeft(scrollLeft); + this.bottomRightGrid.setScrollLeft(scrollLeft); + }, + + getVerticalScroll: function () { + return this.bottomRightGrid.getScrollTop(); + }, + + getLeftHorizontalScroll: function () { + return this.bottomLeftGrid.getScrollLeft(); + }, + + getRightHorizontalScroll: function () { + return this.bottomRightGrid.getScrollLeft(); + }, + + setWidth: function (width) { + BI.GridTable.superclass.setWidth.apply(this, arguments); + this._width = this.options.width - BI.GridTableScrollbar.SIZE; + }, + + setHeight: function (height) { + BI.GridTable.superclass.setHeight.apply(this, arguments); + this._height = this.options.height - BI.GridTableScrollbar.SIZE; + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this._isNeedDigest = true; + }, + + setRegionColumnSize: function (regionColumnSize) { + this.options.regionColumnSize = regionColumnSize; + this._isNeedDigest = true; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + populate: function (items, header) { + if (items && this.options.items !== items) { + this.options.items = items; + this.items = this._getItems(); + this._restore(); + } + if (header && this.options.header !== header) { + this.options.header = header; + this.header = this._getHeader(); + this._restore(); + } + this._populate(); + }, + + _restore: function () { + this.topLeftGrid.restore(); + this.topRightGrid.restore(); + this.bottomLeftGrid.restore(); + this.bottomRightGrid.restore(); + }, + + restore: function () { + this._restore(); + } +}); +BI.shortcut('bi.grid_table', BI.GridTable);/** + * QuickGridTable + * + * Created by GUY on 2016/1/12. + * @class BI.QuickGridTable + * @extends BI.GridTable + */ +BI.QuickGridTable = BI.inherit(BI.GridTable, { + _defaultConfig: function () { + return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-quick-grid-table" + }); + }, + + render: function () { + BI.QuickGridTable.superclass.render.apply(this, arguments); + var self = this, o = this.options; + this.topLeftGrid.setOverflowX(false); + this.topLeftGrid.setOverflowY(false); + this.topRightGrid.setOverflowX(false); + this.topRightGrid.setOverflowY(false); + this.bottomLeftGrid.setOverflowX(false); + this.bottomLeftGrid.setOverflowY(false); + this.bottomRightGrid.setOverflowX(false); + this.bottomRightGrid.setOverflowY(false); + }, + + mounted: function () { + BI.QuickGridTable.superclass.mounted.apply(this, arguments); + var self = this; + this._topLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._topRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this.topLeftGrid.element.mousewheel(function (e) { + self._topLeftWheelHandler.onWheel(e.originalEvent); + }); + this.topRightGrid.element.mousewheel(function (e) { + self._topRightWheelHandler.onWheel(e.originalEvent); + }); + this.bottomLeftGrid.element.mousewheel(function (e) { + self._bottomLeftWheelHandler.onWheel(e.originalEvent); + }); + this.bottomRightGrid.element.mousewheel(function (e) { + self._bottomRightWheelHandler.onWheel(e.originalEvent); + }); + }, + + _shouldHandleLeftX: function (delta) { + if (delta > 0) { + return this.bottomLeftGrid.getScrollLeft() < this.bottomLeftGrid.getMaxScrollLeft(); + } else { + return this.bottomLeftGrid.getScrollLeft() > 0; + } + }, + + _shouldHandleRightX: function (delta) { + if (delta > 0) { + return this.bottomRightGrid.getScrollLeft() < this.bottomRightGrid.getMaxScrollLeft(); + } else { + return this.bottomRightGrid.getScrollLeft() > 0; + } + }, + + _shouldHandleY: function (delta) { + if (delta > 0) { + return this.bottomRightGrid.getScrollTop() < this.bottomRightGrid.getMaxScrollTop(); + } else { + return this.bottomRightGrid.getScrollTop() > 0; + } + }, + + _onWheelLeft: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomLeftGrid.getScrollTop(); + var scrollLeft = this.bottomLeftGrid.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + this.topLeftGrid.setScrollLeft(scrollLeft); + this.bottomLeftGrid.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _onWheelRight: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomRightGrid.getScrollTop(); + var scrollLeft = this.bottomRightGrid.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + this.topRightGrid.setScrollLeft(scrollLeft); + this.bottomRightGrid.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + var freezeColLength = this._getFreezeColLength(); + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftGrid.setWidth(otlw); + this.topLeftGrid.setHeight(otlh); + this.topRightGrid.setWidth(otrw); + this.topRightGrid.setHeight(otrh); + this.bottomLeftGrid.setWidth(oblw); + this.bottomLeftGrid.setHeight(oblh); + this.bottomRightGrid.setWidth(obrw); + this.bottomRightGrid.setHeight(obrh); + + this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); + this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.topRightGrid.setEstimatedRowSize(o.headerRowSize); + this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); + this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.bottomRightGrid.setEstimatedRowSize(o.rowSize); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + BI.each(o.header, function (i, cols) { + leftHeader[i] = []; + rightHeader[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftHeader[i].push(cell); + } else { + rightHeader[i].push(cell); + } + }); + }); + BI.each(this._getActualItems(), function (i, cols) { + leftItems[i] = []; + rightItems[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftItems[i].push(cell); + } else { + rightItems[i].push(cell); + } + }); + }); + + this.topLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.topRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + + function overscan(grid, w, h, rSize, cSize) { + var rCount = h / rSize; + var cCount = w / cSize; + if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { + grid.attr("overscanRowCount", 100); + grid.attr("overscanColumnCount", 100); + } + } + + if (freezeColLength > 0) { + overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); + overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength); + } + if (o.columnSize.length - freezeColLength > 0) { + overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + } + + this.topLeftGrid.populate(leftHeader); + this.topRightGrid.populate(rightHeader); + this.bottomLeftGrid.populate(leftItems); + this.bottomRightGrid.populate(rightItems); + } +}); +BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/** + * + * 表格滚动条 + * + * Created by GUY on 2016/1/12. + * @class BI.GridTableScrollbar + * @extends BI.Widget + */ +BI.GridTableScrollbar = BI.inherit(BI.Widget, { + _const: { + FACE_MARGIN: 4, + FACE_MARGIN_2: 4 * 2, + FACE_SIZE_MIN: 30, + KEYBOARD_SCROLL_AMOUNT: 40 + }, + _defaultConfig: function () { + return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this, arguments), { + baseCls: "scrollbar-layout-main public-scrollbar-main", + attributes: { + tabIndex: 0 + }, + contentSize: 0, + defaultPosition: 0, + isOpaque: false, + orientation: "vertical", + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + this.focused = false; + this.isDragging = false; + this.face = BI.createWidget({ + type: "bi.layout", + cls: "scrollbar-layout-face public-scrollbar-face " + + (this._isHorizontal() ? "scrollbar-layout-face-horizontal" : "scrollbar-layout-face-vertical") + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.face, + left: 0, + top: 0 + }] + }); + }, + + mounted: function () { + var self = this, o = this.options; + var onWheel = o.orientation === 'horizontal' ? this._onWheelX : this._onWheelY; + this._wheelHandler = new BI.WheelHandler( + BI.bind(onWheel, this), + BI.bind(this._shouldHandleX, this), + BI.bind(this._shouldHandleY, this) + ); + this._mouseMoveTracker = new BI.MouseMoveTracker( + BI.bind(this._onMouseMove, this), + BI.bind(this._onMouseMoveEnd, this), + document + ); + this.element.on("mousedown", BI.bind(this._onMouseDown, this)); + this.element.on("mousewheel", function (e) { + self._wheelHandler.onWheel(e.originalEvent); + }); + this.element.on("keydown", BI.bind(this._onKeyDown, this)); + this.element.on("focus", function () { + self.focused = true; + self._populate(); + }); + this.element.on("blur", function () { + self.focused = false; + self._populate(); + }); + if (this._isHorizontal()) { + this.element.addClass("scrollbar-layout-main-horizontal"); + } else { + this.element.addClass("scrollbar-layout-main-vertical"); + } + this._populate(); + }, + + _isHorizontal: function () { + return this.options.orientation === 'horizontal' + }, + + _getScale: function () { + var o = this.options; + var scale = o.size / o.contentSize; + var faceSize = o.size * scale; + + if (faceSize < this._const.FACE_SIZE_MIN) { + scale = (o.size - this._const.FACE_SIZE_MIN) / (o.contentSize - o.size); + } + return scale; + }, + + _getFaceSize: function () { + var o = this.options; + var scale = o.size / o.contentSize; + var faceSize = o.size * scale; + + if (faceSize < this._const.FACE_SIZE_MIN) { + faceSize = this._const.FACE_SIZE_MIN; + } + return faceSize; + }, + + _shouldHandleX: function (delta) { + return this.options.orientation === 'horizontal' ? + this._shouldHandleChange(delta) : + false; + }, + + _shouldHandleY: function (delta) { + return this.options.orientation !== 'horizontal' ? + this._shouldHandleChange(delta) : + false; + }, + + _shouldHandleChange: function (delta) { + return this.options.position + delta !== this.options.position; + }, + + _onWheelY: function (deltaX, deltaY) { + this._onWheel(deltaY); + }, + + _onWheelX: function (deltaX, deltaY) { + this._onWheel(deltaX); + }, + + _onWheel: function (delta) { + var maxPosition = this.options.contentSize - this.options.size; + this.options.position += delta; + if (this.options.position < 0) { + this.options.position = 0; + } else if (this.options.position > maxPosition) { + this.options.position = maxPosition; + } + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _onMouseDown: function (e) { + if (e.target !== this.face.element[0]) { + var position = this._isHorizontal() ? e.offsetX : e.offsetY; + position /= this._getScale(); + this.options.position = BI.clamp(position - (this._getFaceSize() * 0.5 / this._getScale()), 0, this.options.contentSize - this.options.size); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + } else { + this._mouseMoveTracker.captureMouseMoves(e); + } + try { + this.element[0].focus(); + } catch (e) { + + } + }, + + _onMouseMove: function (deltaX, deltaY) { + var delta = this._isHorizontal() ? deltaX : deltaY; + delta /= this._getScale(); + this.options.position = BI.clamp(this.options.position + delta, 0, this.options.contentSize - this.options.size); + this.isDragging = this._mouseMoveTracker.isDragging(); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _onMouseMoveEnd: function (event) { + this._mouseMoveTracker.releaseMouseMoves(); + if (this.isDragging === true) { + this.isDragging = false; + this._populate(); + } + }, + + _onKeyDown: function (event) { + var Keys = { + BACKSPACE: 8, + TAB: 9, + RETURN: 13, + ALT: 18, + ESC: 27, + SPACE: 32, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + DELETE: 46, + COMMA: 188, + PERIOD: 190, + A: 65, + Z: 90, + ZERO: 48, + NUMPAD_0: 96, + NUMPAD_9: 105 + }; + var keyCode = event.keyCode; + + if (keyCode === Keys.TAB) { + return; + } + + var distance = 40; + var direction = 0; + + if (this._isHorizontal()) { + switch (keyCode) { + case Keys.HOME: + direction = -1; + distance = this.options.contentSize; + break; + + case Keys.LEFT: + direction = -1; + break; + + case Keys.RIGHT: + direction = 1; + break; + + default: + return; + } + } + + if (!this._isHorizontal()) { + switch (keyCode) { + case Keys.SPACE: + if (event.shiftKey) { + direction = -1; + } else { + direction = 1; + } + break; + + case Keys.HOME: + direction = -1; + distance = this.options.contentSize; + break; + + case Keys.UP: + direction = -1; + break; + + case Keys.DOWN: + direction = 1; + break; + + case Keys.PAGE_UP: + direction = -1; + distance = this.options.size; + break; + + case Keys.PAGE_DOWN: + direction = 1; + distance = this.options.size; + break; + + default: + return; + } + } + + this.options.position = BI.clamp(this.options.position + (distance * direction), 0, this.options.contentSize - this.options.size); + event.preventDefault(); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + + var size = o.size; + var isHorizontal = this._isHorizontal(); + var isActive = this.focused || this.isDragging; + + var faceSize = this._getFaceSize(); + var isOpaque = o.isOpaque; + this.element[isOpaque === true ? "addClass" : "removeClass"]("public-scrollbar-main-opaque"); + this.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-main-active"); + + this.face.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-face-active"); + + var position = o.position * this._getScale() + this._const.FACE_MARGIN; + + var items = this.contextLayout.attr("items"); + if (isHorizontal) { + this.setWidth(size); + this.face.setWidth(faceSize - this._const.FACE_MARGIN_2); + items[0].left = position; + items[0].top = 0; + } else { + this.setHeight(size); + this.face.setHeight(faceSize - this._const.FACE_MARGIN_2); + items[0].left = 0; + items[0].top = position; + } + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.options.size = size; + }, + + populate: function () { + this._populate(); + } +}); +BI.GridTableScrollbar.SIZE = 10; +BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar); + + +BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, { + _const: { + FACE_MARGIN: 4, + FACE_MARGIN_2: 4 * 2, + FACE_SIZE_MIN: 30, + KEYBOARD_SCROLL_AMOUNT: 40 + }, + _defaultConfig: function () { + return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + position: 0, + size: 0 + }) + }, + + _init: function () { + BI.GridTableHorizontalScrollbar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.scrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + orientation: "horizontal", + isOpaque: true, + position: o.position, + contentSize: o.contentSize, + size: o.size + }); + this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function () { + self.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, arguments); + }); + BI.createWidget({ + type: "bi.absolute", + cls: "horizontal-scrollbar", + element: this, + width: o.size, + height: BI.GridTableScrollbar.SIZE, + items: [{ + el: { + type: "bi.absolute", + scrollable: false, + height: BI.GridTableScrollbar.SIZE, + items: [{ + el: this.scrollbar, + left: 0, + top: 0 + }] + }, + top: 0, + left: 0, + right: 0 + }] + }); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + this.scrollbar.setContentSize(contentSize); + }, + + setPosition: function (position) { + this.options.position = position; + this.scrollbar.setPosition(position); + }, + + setSize: function (size) { + this.setWidth(size); + this.options.size = size; + this.scrollbar.setSize(size); + }, + + populate: function () { + this.scrollbar.populate(); + var o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + } +}); +BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/** + * + * 表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableHeaderCell + * @extends BI.Single + */ +BI.TableHeaderCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-header-cell", + text: "" + }) + }, + + _init: function () { + BI.TableHeaderCell.superclass._init.apply(this, arguments); + BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "center", + height: this.options.height, + text: this.options.text, + value: this.options.value + }) + } +}); + +BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/** + * + * 表格 + * + * 能处理静态宽度以及动态宽度的表, 百分比宽度的表请使用PreviewTable + * + * Created by GUY on 2015/9/22. + * @class BI.Table + * @extends BI.Widget + */ +BI.Table = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Table.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table", + logic: { //冻结的页面布局逻辑 + dynamic: false + }, + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 + + isNeedMerge: false,//是否需要合并单元格 + mergeCols: [], //合并的单元格列号 + mergeRule: function (row1, row2) { //合并规则, 默认相等时合并 + return BI.isEqual(row1, row2); + }, + + columnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: false, + + header: [], + footer: false, + items: [] //二维数组 + }) + }, + + _calculateWidth: function (width) { + if (!width || width === "0") { + return ""; + } + width = BI.parseFloat(width); + if (width < 0) { + width = 0; + } + return width > 1.01 ? width : (width * 100 + "%"); + }, + + _calculateHeight: function (height) { + return height ? height : ""; + }, + + _isRightFreeze: function () { + return BI.isNotEmptyArray(this.options.freezeCols) && BI.first(this.options.freezeCols) !== 0; + }, + + _createTopLeft: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.topLeftColGroupTds = {}; + this.topLeftBodyTds = {}; + this.topLeftBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnLeft, this.topLeftColGroupTds); + var body = this.topLeftBody = this._body(); + body.element.append(this._createHeaderCells(this.topLeftItems, this.columnLeft, this.mergeLeft, this.topLeftBodyTds, this.topLeftBodyItems)); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.topLeftContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createTopRight: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.topRightColGroupTds = {}; + this.topRightBodyTds = {}; + this.topRightBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnRight, this.topRightColGroupTds); + var body = this.topRightBody = this._body(); + body.element.append(this._createHeaderCells(this.topRightItems, this.columnRight, this.mergeRight, this.topRightBodyTds, this.topRightBodyItems, this.columnLeft.length)); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (!isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w)) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.topRightContainer = BI.createWidget({ + type: "bi.adaptive", + width: w || undefined, + items: [table] + })); + }, + + _createBottomLeft: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.bottomLeftColGroupTds = {}; + this.bottomLeftBodyTds = {}; + this.bottomLeftBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnLeft, this.bottomLeftColGroupTds); + var body = this._createBottomLeftBody(); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.bottomLeftContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createBottomLeftBody: function () { + var body = this.bottomLeftBody = this._body(); + body.element.append(this._createCells(this.bottomLeftItems, this.columnLeft, this.mergeLeft, this.bottomLeftBodyTds, this.bottomLeftBodyItems)); + return body; + }, + + _createBottomRight: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.bottomRightColGroupTds = {}; + this.bottomRightBodyTds = {}; + this.bottomRightBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnRight, this.bottomRightColGroupTds); + var body = this._createBottomRightBody(); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (!isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.bottomRightContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createBottomRightBody: function () { + var body = this.bottomRightBody = this._body(); + body.element.append(this._createCells(this.bottomRightItems, this.columnRight, this.mergeRight, this.bottomRightBodyTds, this.bottomRightBodyItems, this.columnLeft.length)); + return body; + }, + + _createFreezeTable: function () { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + var split = this._split(o.header); + this.topLeftItems = split.left; + this.topRightItems = split.right; + split = this._split(o.items); + this.bottomLeftItems = split.left; + this.bottomRightItems = split.right; + + this.columnLeft = []; + this.columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + self[isRight ? "columnRight" : "columnLeft"].push(size); + } else { + self[isRight ? "columnLeft" : "columnRight"].push(size); + } + }); + this.mergeLeft = []; + this.mergeRight = []; + BI.each(o.mergeCols, function (i, col) { + if (o.freezeCols.contains(col)) { + self[isRight ? "mergeRight" : "mergeLeft"].push(col); + } else { + self[isRight ? "mergeLeft" : "mergeRight"].push(col); + } + }); + + var topLeft = this._createTopLeft(); + var topRight = this._createTopRight(); + var bottomLeft = this._createBottomLeft(); + var bottomRight = this._createBottomRight(); + + this.scrollTopLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-top-left", + width: "100%", + height: "100%", + scrollable: false, + items: [topLeft] + }); + this.scrollTopRight = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-top-right", + width: "100%", + height: "100%", + scrollable: false, + items: [topRight] + }); + this.scrollBottomLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-bottom-left", + width: "100%", + height: "100%", + scrollable: isRight || null, + scrollx: !isRight, + items: [bottomLeft] + }); + this.scrollBottomRight = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-bottom-right", + width: "100%", + height: "100%", + scrollable: !isRight || null, + scrollx: isRight, + items: [bottomRight] + }); + this.topLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "top-left", + scrollable: false, + items: [this.scrollTopLeft] + }); + this.topRight = BI.createWidget({ + type: "bi.adaptive", + cls: "top-right", + scrollable: false, + items: [this.scrollTopRight] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-left", + // scrollable: false, + items: [this.scrollBottomLeft] + }); + this.bottomRight = BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-right", + scrollable: false, + items: [this.scrollBottomRight] + }); + + var headerHeight = o.header.length * ((o.headerRowSize || o.rowSize) + 1) + 1; + var leftWidth = BI.sum(o.freezeCols, function (i, col) { + return o.columnSize[col] > 1 ? o.columnSize[col] + 1 : o.columnSize[col]; + }); + + this._resize = function () { + if (self.scrollBottomLeft.element.is(":visible")) { + self.scrollBottomLeft.element.css({"overflow-x": "auto"}); + self.scrollBottomRight.element.css({"overflow-x": "auto"}); + self.setColumnSize(o.columnSize); + if (isRight) { + self.scrollBottomLeft.element.css({"overflow-y": "auto"}); + } else { + self.scrollBottomRight.element.css({"overflow-y": "auto"}); + } + if (self.scrollBottomLeft.element.hasHorizonScroll() || self.scrollBottomRight.element.hasHorizonScroll()) { + self.scrollBottomLeft.element.css("overflow-x", "scroll"); + self.scrollBottomRight.element.css("overflow-x", "scroll"); + } + if (self.scrollBottomRight.element.hasVerticalScroll()) { + self.scrollTopRight.element.css("overflow-y", "scroll"); + } else { + self.scrollTopRight.element.css("overflow-y", "hidden"); + } + if (self.scrollBottomLeft.element.hasVerticalScroll()) { + self.scrollTopLeft.element.css("overflow-y", "scroll"); + } else { + self.scrollTopLeft.element.css("overflow-y", "hidden"); + } + self.scrollTopLeft.element[0].scrollLeft = self.scrollBottomLeft.element[0].scrollLeft; + self.scrollTopRight.element[0].scrollLeft = self.scrollBottomRight.element[0].scrollLeft; + self.scrollBottomLeft.element[0].scrollTop = self.scrollBottomRight.element[0].scrollTop; + } + }; + + var regionColumnSize = o.regionColumnSize; + if (o.freezeCols.length === 0) { + regionColumnSize = isRight ? ['fill', 0] : [0, 'fill']; + } else if (o.freezeCols.length >= o.columnSize.length) { + regionColumnSize = isRight ? [0, 'fill'] : ['fill', 0]; + } + this.partitions = BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + rows: 2, + columns: 2, + columnSize: regionColumnSize || (isRight ? ['fill', leftWidth] : [leftWidth, 'fill']), + rowSize: [headerHeight, 'fill'], + items: [[{ + el: this.topLeft + }, { + el: this.topRight + }], [{ + el: this.bottomLeft + }, { + el: this.bottomRight + }]] + })))); + + this._initFreezeScroll(); + BI.nextTick(function () { + if (self.element.is(":visible")) { + self._resize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); + } + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._resize(); + self.fireEvent(BI.Table.EVENT_TABLE_RESIZE); + }); + }, + + _initFreezeScroll: function () { + var self = this, o = this.options; + scroll(this.scrollBottomRight.element, this.scrollTopRight.element, this.scrollBottomLeft.element); + // scroll(this.scrollBottomLeft.element, this.scrollTopLeft.element, this.scrollBottomRight.element); + + function scroll(scrollElement, scrollTopElement, otherElement) { + scrollElement.scroll(function (e) { + otherElement.scrollTop(scrollElement.scrollTop()); + scrollTopElement.scrollLeft(scrollElement.scrollLeft()); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); + }); + } + }, + + resize: function () { + this._resize && this._resize(); + }, + + _createCells: function (items, columnSize, mergeCols, TDs, Ws, start, rowSize) { + var self = this, o = this.options, preCol = {}, preRow = {}, preRW = {}, preCW = {}, map = {}; + columnSize = columnSize || o.columnSize; + mergeCols = mergeCols || o.mergeCols; + TDs = TDs || {}; + Ws = Ws || {}; + start = start || 0; + rowSize || (rowSize = o.rowSize); + var frag = document.createDocumentFragment(); + BI.each(items, function (i, rows) { + var tr = $("<tr>").addClass((i & 1) === 0 ? "odd" : "even"); + BI.each(rows, function (j, row) { + if (!map[i]) { + map[i] = {}; + } + if (!TDs[i]) { + TDs[i] = {}; + } + if (!Ws[i]) { + Ws[i] = {}; + } + map[i][j] = row; + + if (o.isNeedMerge && mergeCols.contains(j)) { + if (i === 0 && j === 0) { + createOneEl(0, 0); + } else if (j === 0 && i > 0) { + var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); + if (isNeedMergeRow === true) { + mergeRow(i, j); + preRow[i] = preCol[j]; + preRW[i] = preCW[j]; + } else { + createOneEl(i, j); + } + } else if (i === 0 && j > 0) { + var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); + if (isNeedMergeCol === true) { + mergeCol(i, j); + preCol[j] = preRow[i]; + preCW[j] = preRW[i]; + } else { + createOneEl(i, j); + } + } else { + var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); + var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); + if (isNeedMergeCol && isNeedMergeRow) { + return; + } + if (isNeedMergeCol) { + mergeCol(i, j); + } + if (isNeedMergeRow) { + mergeRow(i, j); + } + if (!isNeedMergeCol && !isNeedMergeRow) { + createOneEl(i, j); + } + } + } else { + createOneEl(i, j); + } + }); + function mergeRow(i, j) { + var height = (preCol[j].attr("height") | 0) + rowSize + 1; + preCol[j].attr("height", height).css("height", height); + //preCW[j].element.css("height", height); + var rowspan = ((preCol[j].attr("rowspan") || 1) | 0) + 1; + preCol[j].attr("rowspan", rowspan); + preCol[j].__mergeRows.pushDistinct(i); + TDs[i][j] = preCol[j]; + Ws[i][j] = preCW[j]; + } + + function mergeCol(i, j) { + if (columnSize[j]) { + var width = preRow[i].attr("width") | 0; + if (width > 1.05 && columnSize[j]) { + width = width + columnSize[j] + 1; + if (j === columnSize.length - 1) { + width--; + } + } else { + width = width + columnSize[j] + } + width = self._calculateWidth(width); + preRow[i].attr("width", width).css("width", width); + preRW[i].element.width(width); + } + var colspan = ((preRow[i].attr("colspan") || 1) | 0) + 1; + preRow[i].attr("colspan", colspan); + preRow[i].__mergeCols.pushDistinct(j); + TDs[i][j] = preRow[i]; + Ws[i][j] = preRW[i]; + } + + function createOneEl(r, c) { + var width = self._calculateWidth(columnSize[c]); + if (width > 1.05 && c === columnSize.length - 1) { + width--; + } + var height = self._calculateHeight(rowSize); + var td = $("<td>").attr("height", height) + .attr("width", width).css({"width": width, "height": height, "position": "relative"}) + .addClass((c & 1) === 0 ? "odd-col" : "even-col") + .addClass(r === 0 ? "first-row" : "") + .addClass(c === 0 ? "first-col" : "") + .addClass(c === rows.length - 1 ? "last-col" : ""); + var w = BI.createWidget(map[r][c], { + type: "bi.table_cell", + textAlign: "left", + width: BI.isNumeric(width) ? width : "", + height: BI.isNumeric(height) ? height : "", + _row: r, + _col: c + start + }); + self.addWidget(w.getName(), w); + w._mount(); + w.element.css("position", "relative"); + td.append(w.element); + tr.append(td); + preCol[c] = td; + preCol[c].__mergeRows = [r]; + preCW[c] = w; + preRow[r] = td; + preRow[r].__mergeCols = [c]; + preRW[r] = w; + TDs[r][c] = td; + Ws[r][c] = w; + } + + frag.appendChild(tr[0]); + }); + return frag; + }, + + _createColGroupCells: function (columnSize, store) { + var self = this, o = this.options; + columnSize = columnSize || o.columnSize; + store = store || {}; + var frag = document.createDocumentFragment(); + BI.each(columnSize, function (i, size) { + var width = self._calculateWidth(size); + var col = $("<col>").attr("width", width).css("width", width); + store[i] = col; + frag.appendChild(col[0]); + }); + return frag; + }, + + _createHeaderCells: function (items, columnSize, mergeCols, TDs, Ws, start) { + var self = this, o = this.options; + start || (start = 0); + var frag = this._createCells(items, columnSize, BI.range(o.columnSize.length), TDs, Ws, start, o.headerRowSize || o.rowSize); + + return frag; + }, + + _createFooterCells: function (items, columnSize, TDs, Ws) { + var o = this.options; + var frag = this._createCells(items, columnSize, [], TDs, Ws, 0); + return frag; + }, + + _createColGroup: function (columnSize, store, widgets) { + var self = this, o = this.options; + this.colgroup = this._colgroup(); + this.colgroup.element.append(this._createColGroupCells(columnSize, store, widgets)); + return this.colgroup; + }, + + _createHeader: function () { + var self = this, o = this.options; + if (o.header === false) { + return; + } + this.header = this._header(); + this.header.element.append(this._createHeaderCells(o.header, null, null, this.headerTds, this.headerItems)); + return this.header; + }, + + _createFooter: function (columnSize, store, widgets) { + var self = this, o = this.options; + if (o.footer === false) { + return; + } + this.footer = this._footer(); + this.footer.element.append(this._createFooterCells(o.footer, null, this.footerTds, this.footerItems)); + return this.footer; + }, + + + _createBody: function () { + var self = this, o = this.options; + this.body = this._body(); + this.body.element.append(this._createCells(o.items, null, null, this.bodyTds, this.bodyItems)); + return this.body; + }, + + _createNormalTable: function () { + var self = this, o = this.options, table = this._table(); + this.colgroupTds = {}; + this.headerTds = {}; + this.footerTds = {}; + this.bodyTds = {}; + + this.headerItems = {}; + this.footerItems = {}; + this.bodyItems = {}; + var colgroup = this._createColGroup(null, this.colgroupTds); + var header = this._createHeader(); + var footer = this._createFooter(); + var body = this._createBody(); + + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, header, footer, body] + }); + + var w = BI.sum(this.options.columnSize) || undefined; + w = this._calculateWidth(w); + if (BI.isNumeric(w) && w > 1) { + w += o.columnSize.length; + } + this.tableContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + }); + + this.scrollBottomRight = BI.createWidget({ + type: "bi.adaptive", + width: "100%", + height: "100%", + cls: "scroll-bottom-right", + scrollable: true, + items: [this.tableContainer] + }); + + BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-right", + element: this, + scrollable: false, + items: [this.scrollBottomRight] + }); + + this._initNormalScroll(); + BI.nextTick(function () { + if (self.element.is(":visible")) { + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); + } + }); + }, + + _initNormalScroll: function () { + var self = this; + this.scrollBottomRight.element.scroll(function (e) { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); + }); + }, + + _split: function (items) { + var o = this.options, left = [], right = [], isRight = this._isRightFreeze(); + BI.each(items, function (i, rows) { + left.push([]); + right.push([]); + BI.each(rows, function (j, cell) { + if (o.freezeCols.contains(j)) { + (isRight ? right : left)[i].push(cell); + } else { + (isRight ? left : right)[i].push(cell); + } + }) + }); + return { + left: left, + right: right + } + }, + + _table: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "table", + cls: "table", + attribute: {"cellspacing": 0, "cellpadding": 0} + }); + }, + + _header: function () { + return BI.createWidget({ + type: "bi.layout", + cls: "header", + tagName: "thead" + }); + }, + + _footer: function () { + return BI.createWidget({ + type: "bi.layout", + cls: "footer", + tagName: "tfoot" + }); + }, + + _body: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "tbody", + cls: "body" + }); + }, + + _colgroup: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "colgroup" + }); + }, + + _init: function () { + BI.Table.superclass._init.apply(this, arguments); + + this.populate(this.options.items); + }, + + setColumnSize: function (columnSize) { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + o.columnSize = columnSize || []; + if (o.isNeedFreeze) { + var columnLeft = []; + var columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + isRight ? columnRight.push(size) : columnLeft.push(size); + } else { + isRight ? columnLeft.push(size) : columnRight.push(size); + } + }); + var topleft = 0, topright = 1, bottomleft = 2, bottomright = 3; + var run = function (direction) { + var colgroupTds, bodyTds, bodyItems, sizes; + switch (direction) { + case topleft: + colgroupTds = self.topLeftColGroupTds; + bodyTds = self.topLeftBodyTds; + bodyItems = self.topLeftBodyItems; + sizes = columnLeft; + break; + case topright: + colgroupTds = self.topRightColGroupTds; + bodyTds = self.topRightBodyTds; + bodyItems = self.topRightBodyItems; + sizes = columnRight; + break; + case bottomleft: + colgroupTds = self.bottomLeftColGroupTds; + bodyTds = self.bottomLeftBodyTds; + bodyItems = self.bottomLeftBodyItems; + sizes = columnLeft; + break; + case bottomright: + colgroupTds = self.bottomRightColGroupTds; + bodyTds = self.bottomRightBodyTds; + bodyItems = self.bottomRightBodyItems; + sizes = columnRight; + break; + } + BI.each(colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (sizes[i] !== "" && width !== sizes[i]) { + var w = self._calculateWidth(sizes[i]); + colgroup.attr("width", w).css("width", w); + BI.each(bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(bodyItems, function (j, items) { + if (items[i]) { + if (bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }) + }; + run(topleft); + run(topright); + run(bottomleft); + run(bottomright); + + var lw = 0, rw = 0; + this.columnLeft = []; + this.columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + lw += size; + self[isRight ? "columnRight" : "columnLeft"].push(size); + } else { + rw += size; + self[isRight ? "columnLeft" : "columnRight"].push(size); + } + }); + lw = this._calculateWidth(lw); + rw = this._calculateWidth(rw); + + if (BI.isNumeric(lw)) { + lw = BI.parseFloat(lw) + o.freezeCols.length; + } + if (BI.isNumeric(rw)) { + rw = BI.parseFloat(rw) + o.columnSize.length - o.freezeCols.length; + } + this.topLeftContainer.element.width(isRight ? rw : lw); + this.bottomLeftContainer.element.width(isRight ? rw : lw); + this.topRightContainer.element.width(isRight ? lw : rw); + this.bottomRightContainer.element.width(isRight ? lw : rw); + this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; + this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; + } else { + BI.each(this.colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (o.columnSize[i] !== "" && width !== o.columnSize[i]) { + var w = self._calculateWidth(o.columnSize[i]); + colgroup.attr("width", w).css("width", w); + BI.each(self.bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.headerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.footerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.bodyItems, function (j, items) { + if (items[i]) { + if (self.bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + BI.each(self.headerItems, function (j, items) { + if (items[i]) { + if (self.headerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.headerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.headerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + BI.each(self.footerItems, function (j, items) { + if (items[i]) { + if (self.footerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.footerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.footerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }); + var w = this._calculateWidth(BI.sum(o.columnSize)); + if (w > 1.05) { + w += o.columnSize.length; + } + if (w > 1.05) { + this.tableContainer.element.width(w); + } + } + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getCalculateColumnSize: function () { + var self = this, o = this.options; + var columnSize = []; + if (o.isNeedFreeze === true) { + if (BI.size(this.bottomLeftBodyTds) > 0 || BI.size(this.bottomRightBodyTds) > 0) { + if (!BI.any(this.bottomLeftBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.bottomLeftBodyTds[0], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.bottomLeftBodyTds[0]) - 1) { + width++; + } + columnSize.push(width); + }); + } + if (!BI.any(this.bottomRightBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.bottomRightBodyTds[0], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.bottomRightBodyTds[0]) - 1) { + width++; + } + columnSize.push(width); + }); + } + return columnSize; + } + if (!BI.any(this.topLeftBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.topLeftBodyTds[BI.size(self.topLeftBodyTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + if (!BI.any(this.topRightBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.topRightBodyTds[BI.size(self.topRightBodyTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + } else { + BI.each(this.headerTds[BI.size(this.headerTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.headerTds[BI.size(self.headerTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + return columnSize; + }, + + setHeaderColumnSize: function (columnSize) { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + if (o.isNeedFreeze) { + var columnLeft = []; + var columnRight = []; + BI.each(columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + isRight ? columnRight.push(size) : columnLeft.push(size); + } else { + isRight ? columnLeft.push(size) : columnRight.push(size); + } + }); + var topleft = 0, topright = 1; + var run = function (direction) { + var colgroupTds, bodyTds, bodyItems, sizes; + switch (direction) { + case topleft: + colgroupTds = self.topLeftColGroupTds; + bodyTds = self.topLeftBodyTds; + bodyItems = self.topLeftBodyItems; + sizes = columnLeft; + break; + case topright: + colgroupTds = self.topRightColGroupTds; + bodyTds = self.topRightBodyTds; + bodyItems = self.topRightBodyItems; + sizes = columnRight; + break; + } + BI.each(colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (width !== sizes[i]) { + var w = self._calculateWidth(sizes[i]); + colgroup.attr("width", w).css("width", w); + BI.each(bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(bodyItems, function (j, items) { + if (items[i]) { + if (bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }) + }; + run(topleft); + run(topright); + + var lw = 0, rw = 0; + BI.each(columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + lw += size; + } else { + rw += size; + } + }); + lw = this._calculateWidth(lw); + rw = this._calculateWidth(rw); + + if (BI.isNumeric(lw)) { + lw = BI.parseFloat(lw) + o.freezeCols.length; + } + if (BI.isNumeric(rw)) { + rw = BI.parseFloat(rw) + columnSize.length - o.freezeCols.length; + } + this.topLeftContainer.element.width(isRight ? rw : lw); + this.topRightContainer.element.width(isRight ? lw : rw); + this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; + this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; + } else { + BI.each(this.colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (width !== columnSize[i]) { + var w = self._calculateWidth(columnSize[i]); + colgroup.attr("width", w).css("width", w); + BI.each(self.headerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.headerItems, function (j, items) { + if (items[i]) { + if (self.headerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(columnSize, function (t, s) { + if (self.headerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.headerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }); + var cW = this._calculateWidth(BI.sum(columnSize)); + if (cW > 1.05) { + cW = cW + columnSize.length; + } + this.tableContainer.element.width(cW); + } + }, + + setRegionColumnSize: function (columnSize) { + var self = this, o = this.options; + o.regionColumnSize = columnSize; + if (o.freezeCols.length === 0) { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", this._isRightFreeze() ? ['fill', 0] : [0, 'fill']); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } else if (o.freezeCols.length > 0 && o.freezeCols.length < o.columnSize.length) { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", columnSize); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } else { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", this._isRightFreeze() ? [0, 'fill'] : ['fill', 0]); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + getCalculateRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element.width(), this.scrollBottomRight.element.width()]; + } + return [this.scrollBottomRight.element.width()]; + }, + + getCalculateRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollTopRight.element.height(), this.scrollBottomRight.element.height()]; + } + return [this.scrollBottomRight.element.height()]; + }, + + getClientRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].clientWidth, this.scrollBottomRight.element[0].clientWidth]; + } + return [this.scrollBottomRight.element[0].clientWidth]; + }, + + getClientRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].clientHeight, this.scrollBottomRight.element[0].clientHeight]; + } + return [this.scrollBottomRight.element[0].clientHeight]; + }, + + getScrollRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].scrollWidth, this.scrollBottomRight.element[0].scrollWidth]; + } + return [this.scrollBottomRight.element[0].scrollWidth]; + }, + + getScrollRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + if (o.freezeCols.length < o.columnSize.length) { + return [this.scrollTopRight.element[0].scrollHeight, this.scrollBottomRight.element[0].scrollHeight]; + } else { + return [this.scrollTopLeft.element[0].scrollHeight, this.scrollBottomLeft.element[0].scrollHeight]; + } + } + return [this.scrollBottomRight.element[0].scrollHeight]; + }, + + hasVerticalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element.hasVerticalScroll() || this.scrollBottomLeft.element.hasVerticalScroll(); + } + return this.scrollBottomRight.element.hasVerticalScroll(); + }, + + setVerticalScroll: function (scrollTop) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { + this.scrollBottomRight.element[0].scrollTop = scrollTop; + } + if (this.scrollBottomLeft.element[0].scrollTop !== scrollTop) { + this.scrollBottomLeft.element[0].scrollTop = scrollTop; + } + } else { + if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { + this.scrollBottomRight.element[0].scrollTop = scrollTop; + } + } + }, + + setLeftHorizontalScroll: function (scrollLeft) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomLeft.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomLeft.element[0].scrollLeft = scrollLeft; + } + if (this.scrollTopLeft.element[0].scrollLeft !== scrollLeft) { + this.scrollTopLeft.element[0].scrollLeft = scrollLeft; + } + } else { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + } + }, + + setRightHorizontalScroll: function (scrollLeft) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + if (this.scrollTopRight.element[0].scrollLeft !== scrollLeft) { + this.scrollTopRight.element[0].scrollLeft = scrollLeft; + } + } else { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + } + }, + + getVerticalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element[0].scrollTop || this.scrollBottomLeft.element[0].scrollTop; + } + return this.scrollBottomRight.element[0].scrollTop; + }, + + getLeftHorizontalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomLeft.element[0].scrollLeft; + } + return this.scrollBottomRight.element[0].scrollLeft; + }, + + getRightHorizontalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element[0].scrollLeft; + } + return this.scrollBottomRight.element[0].scrollLeft; + }, + + getColumns: function () { + var o = this.options; + if (o.isNeedFreeze) { + return { + topLeft: this.topLeftBodyItems, + topRight: this.topRightBodyItems, + bottomLeft: this.bottomLeftBodyItems, + bottomRight: this.bottomRightBodyItems + } + } else { + return { + header: this.headerItems, + body: this.bodyItems, + footer: this.footerItems + } + } + }, + + populate: function (items, header) { + this.options.items = items || []; + if (header) { + this.options.header = header; + } + this.empty(); + if (this.options.isNeedFreeze) { + this._createFreezeTable(); + } else { + this._createNormalTable(); + } + } +}) +; +BI.Table.EVENT_TABLE_AFTER_INIT = "EVENT_TABLE_AFTER_INIT"; +BI.Table.EVENT_TABLE_RESIZE = "EVENT_TABLE_RESIZE"; +BI.Table.EVENT_TABLE_SCROLL = "EVENT_TABLE_SCROLL"; +BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE = "EVENT_TABLE_BEFORE_COLUMN_RESIZE"; +BI.Table.EVENT_TABLE_COLUMN_RESIZE = "EVENT_TABLE_COLUMN_RESIZE"; +BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE"; + +BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE"; +BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE"; +BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE"; +BI.shortcut("bi.table_view", BI.Table); /** * * 表格单元格 @@ -32676,2853 +32676,2853 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, { this.cell.setHeight(o.height); } }); -BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/** - * - * 可调整列宽的grid表格 - * - * Created by GUY on 2016/1/12. - * @class BI.ResizableTable - * @extends BI.Widget - */ -BI.ResizableTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-resizable-table", - el: { - type: "bi.grid_table" - }, - isNeedFreeze: false, - isNeedResize: true, - isResizeAdapt: false, - headerRowSize: 25, - rowSize: 25, - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - freezeCols: [], - header: [], - items: [], - regionColumnSize: [] - }) - }, - - _init: function () { - BI.ResizableTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.resizer = BI.createWidget({ - type: "bi.layout", - cls: "resizable-table-resizer", - invisible: true, - width: 2 - }); - this.regionResizerHandler = this._createResizerHandler(); - this.table = BI.createWidget(o.el, { - type: "bi.grid_table", - element: this, - width: o.width, - height: o.height, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - columnSize: o.columnSize, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: BI.bind(this._mergeRule, this), - - header: this._formatHeader(o.header), - items: o.items, - regionColumnSize: o.regionColumnSize - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.regionResizerHandler, - left: 0, - top: 0, - bottom: 0 - }, { - el: this.resizer, - left: 0, - top: 0 - }] - }); - this._populate(); - }, - - _mergeRule: function (row1, row2) { - var o = this.options; - if (row1.type === "bi.resizable_table_cell") { - row1 = row1.cell; - } - if (row2.type === "bi.resizable_table_cell") { - row2 = row2.cell; - } - return o.mergeRule(row1, row2); - }, - - _createResizerHandler: function () { - var self = this, o = this.options; - var regionResizerHandler = BI.createWidget({ - type: "bi.absolute", - cls: "resizable-table-region-resizer", - invisible: true, - width: 6, - items: [{ - el: { - type: "bi.layout", - width: 2, - cls: "resizable-table-region-resizer-knob" - }, - left: 2, - top: 0, - bottom: 0 - }] - }); - var size = 0, offset = 0, defaultSize = 0, start = false; - var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { - if (mouseMoveTracker.isDragging()) { - start = true; - offset += deltaX; - size = BI.clamp(defaultSize + offset, 15, o.width - 15); - - self.regionResizerHandler.element.addClass("dragging"); - self._setRegionResizerHandlerPosition(size - 3, 0); - } - - }, function () { - if (start === true) { - o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15); - self.table.setRegionColumnSize(o.regionColumnSize); - if (o.isResizeAdapt === true) { - var freezeColumnSize = self._getFreezeColumnSize(); - o.columnSize[self._getFreezeColLength() - 1] += o.regionColumnSize[0] - freezeColumnSize; - self.table.setColumnSize(o.columnSize); - } - self.table.populate(); - self._populate(); - self.regionResizerHandler.element.removeClass("dragging"); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE); - start = false; - } - mouseMoveTracker.releaseMouseMoves(); - }, document); - regionResizerHandler.element.on("mousedown", function (event) { - defaultSize = size = self._getRegionSize(); - offset = 0; - self._setResizerPosition(0, 0); - mouseMoveTracker.captureMouseMoves(event); - }); - return regionResizerHandler; - }, - - _setResizerPosition: function (left, top) { - this.resizer.element.css({ - left: left + "px", - top: top + "px" - }); - }, - - _setRegionResizerHandlerPosition: function (left, top) { - this.regionResizerHandler.element.css({ - left: left + "px", - top: top + "px" - }); - }, - - _getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - _getRegionRowSize: function () { - var o = this.options; - return [o.header.length * o.headerRowSize, - Math.min(o.height - o.header.length * o.headerRowSize, o.items.length * o.rowSize)]; - }, - - _getFreezeColLength: function () { - return this.options.freezeCols.length; - }, - - _getFreezeColumnSize: function () { - var columnSize = this.options.columnSize; - var sum = 0; - for (var i = 0, len = this._getFreezeColLength(); i < len; i++) { - sum += columnSize[i]; - } - return sum; - }, - - _getResizerLeft: function (j) { - var left = 0; - var columnSize = this.options.columnSize; - var freezeColLength = this._getFreezeColLength(); - for (var i = (j >= freezeColLength ? freezeColLength : 0); i < j; i++) { - left += columnSize[i] || 0; - } - if (j >= freezeColLength) { - left += this.table.getRegionSize(); - left -= this.table.getRightHorizontalScroll(); - } else { - left -= this.table.getLeftHorizontalScroll(); - } - return left; - }, - - _formatHeader: function (header) { - var self = this, o = this.options; - var result = []; - var resize = function (j, size) { - self.resizer.setVisible(true); - var height = o.headerRowSize + self._getRegionRowSize()[1]; - self.resizer.setHeight(height); - //TODO 不知道为什么加入这段代码会使得列宽调整出问题 - // if (o.minColumnSize[j]) { - // if (size === o.minColumnSize[j]) { - // self.resizer.element.addClass("suitable"); - // } else { - // self.resizer.element.removeClass("suitable"); - // } - // } - self._setResizerPosition(self._getResizerLeft(j) + size, (o.header.length - 1) * o.headerRowSize); - }; - var stop = function (j, size) { - self.resizer.setVisible(false); - var columnSize = o.columnSize.slice(); - columnSize[j] = size; - o.columnSize = columnSize; - self.table.setColumnSize(columnSize); - self.table.populate(); - self._populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE); - }; - BI.each(header, function (i, cols) { - if (i === header.length - 1) { - result[i] = []; - BI.each(cols, function (j, col) { - if (j === self._getFreezeColLength() - 1 || j === cols.length - 1) { - result[i][j] = col; - } else { - result[i][j] = { - type: "bi.resizable_table_cell", - cell: col, - suitableSize: o.minColumnSize[j], - maxSize: o.maxColumnSize[j], - resize: BI.bind(resize, null, j), - stop: BI.bind(stop, null, j) - }; - if (o.isNeedMerge) { - var r = i; - while (r > 0 && self._mergeRule(result[r][j], result[r - 1][j])) { - result[r - 1][j] = { - type: "bi.resizable_table_cell", - cell: result[r - 1][j], - suitableSize: o.minColumnSize[j], - maxSize: o.maxColumnSize[j], - resize: BI.bind(resize, null, j), - stop: BI.bind(stop, null, j) - }; - r--; - } - } - } - }); - } else { - result.push(cols); - } - }); - return result; - }, - - _populate: function () { - var o = this.options; - var regionSize = this._getRegionSize(); - if (regionSize > 0) { - this.regionResizerHandler.setVisible(true); - this._setRegionResizerHandlerPosition(regionSize - 3, 0); - } else { - this.regionResizerHandler.setVisible(false); - } - }, - - setWidth: function (width) { - BI.ResizableTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width) - }, - - setHeight: function (height) { - BI.ResizableTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this.table.setColumnSize(columnSize); - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function () { - BI.ResizableTable.superclass.attr.apply(this, arguments); - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header) { - if (items) { - this.options.items = items; - } - if (header) { - this.options.header = header; - if (this.options.isNeedResize) { - header = this._formatHeader(header); - } - } - this.table.populate(items, header); - this._populate(); - } -}); - -BI.shortcut("bi.resizable_table", BI.ResizableTable);/** - * - * 自定义树 - * - * Created by GUY on 2015/9/7. - * @class BI.CustomTree - * @extends BI.Single - */ -BI.CustomTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-custom-tree", - expander: { - el: {}, - popup: { - type: "bi.custom_tree" - } - }, - - items: [], - itemsCreator: BI.emptyFn, - - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.CustomTree.superclass._init.apply(this, arguments); - this.initTree(this.options.items); - }, - - _formatItems: function (nodes) { - var self = this, o = this.options; - nodes = BI.Tree.transformToTreeFormat(nodes); - - var items = []; - BI.each(nodes, function (i, node) { - if (BI.isNotEmptyArray(node.children) || node.isParent === true) { - var item = BI.extend({ - type: "bi.expander", - el: {}, - popup: {type: "bi.custom_tree"} - }, BI.deepClone(o.expander), { - id: node.id, - pId: node.pId, - value: node.value - }); - var el = BI.stripEL(node); - if (!BI.isWidget(el)) { - el = BI.clone(el); - delete el.children; - BI.extend(item.el, el); - } else { - item.el = el; - } - item.popup.expander = BI.deepClone(o.expander); - item.items = item.popup.items = node.children; - item.itemsCreator = item.popup.itemsCreator = function (op) { - if (BI.isNotNull(op.node)) {//从子节点传过来的itemsCreator直接向上传递 - return o.itemsCreator.apply(self, arguments); - } - var args = Array.prototype.slice.call(arguments, 0); - args[0].node = node; - return o.itemsCreator.apply(self, args); - }; - BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el)); - items.push(item); - } else { - items.push(node); - } - }); - return items; - }, - - //构造树结构, - initTree: function (nodes) { - var self = this, o = this.options; - this.tree = BI.createWidget(o.el, { - element: this, - items: this._formatItems(nodes), - itemsCreator: function (op, callback) { - o.itemsCreator.apply(this, [op, function (items) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = self._formatItems(items); - callback.apply(null, args); - }]); - } - }); - this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj); - } - }) - }, - - //生成树方法 - stroke: function (nodes) { - this.populate.apply(this, arguments); - }, - - populate: function (nodes) { - var args = Array.prototype.slice.call(arguments, 0); - if (arguments.length > 0) { - args[0] = this._formatItems(nodes); - } - this.tree.populate.apply(this.tree, args); - }, - - setValue: function (v) { - this.tree && this.tree.setValue(v); - }, - - getValue: function () { - return this.tree ? this.tree.getValue() : []; - }, - - getAllButtons: function () { - return this.tree ? this.tree.getAllButtons() : []; - }, - - getAllLeaves: function () { - return this.tree ? this.tree.getAllLeaves() : []; - }, - - getNodeById: function (id) { - return this.tree && this.tree.getNodeById(id); - }, - - getNodeByValue: function (id) { - return this.tree && this.tree.getNodeByValue(id); - }, - - empty: function () { - this.tree.empty(); - } -}); -BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.custom_tree", BI.CustomTree);/* - * JQuery zTree core v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-06-18 - */ -(function($){ - var settings = {}, roots = {}, caches = {}, - //default consts of core - _consts = { - className: { - BUTTON: "button", - LEVEL: "level", - ICO_LOADING: "ico_loading", - SWITCH: "switch" - }, - event: { - NODECREATED: "ztree_nodeCreated", - CLICK: "ztree_click", - EXPAND: "ztree_expand", - COLLAPSE: "ztree_collapse", - ASYNC_SUCCESS: "ztree_async_success", - ASYNC_ERROR: "ztree_async_error", - REMOVE: "ztree_remove", - SELECTED: "ztree_selected", - UNSELECTED: "ztree_unselected" - }, - id: { - A: "_a", - ICON: "_ico", - SPAN: "_span", - SWITCH: "_switch", - UL: "_ul" - }, - line: { - ROOT: "root", - ROOTS: "roots", - CENTER: "center", - BOTTOM: "bottom", - NOLINE: "noline", - LINE: "line" - }, - folder: { - OPEN: "open", - CLOSE: "close", - DOCU: "docu" - }, - node: { - CURSELECTED: "curSelectedNode" - } - }, - //default setting of core - _setting = { - treeId: "", - treeObj: null, - view: { - addDiyDom: null, - autoCancelSelected: true, - dblClickExpand: true, - expandSpeed: "fast", - fontCss: {}, - nameIsHTML: false, - selectedMulti: true, - showIcon: true, - showLine: true, - showTitle: true, - txtSelectedEnable: false - }, - data: { - key: { - children: "children", - name: "name", - title: "", - url: "url" - }, - simpleData: { - enable: false, - idKey: "id", - pIdKey: "pId", - rootPId: null - }, - keep: { - parent: false, - leaf: false - } - }, - async: { - enable: false, - contentType: "application/x-www-form-urlencoded", - type: "post", - dataType: "text", - url: "", - autoParam: [], - otherParam: [], - dataFilter: null - }, - callback: { - beforeAsync:null, - beforeClick:null, - beforeDblClick:null, - beforeRightClick:null, - beforeMouseDown:null, - beforeMouseUp:null, - beforeExpand:null, - beforeCollapse:null, - beforeRemove:null, - - onAsyncError:null, - onAsyncSuccess:null, - onNodeCreated:null, - onClick:null, - onDblClick:null, - onRightClick:null, - onMouseDown:null, - onMouseUp:null, - onExpand:null, - onCollapse:null, - onRemove:null - } - }, - //default root of core - //zTree use root to save full data - _initRoot = function (setting) { - var r = data.getRoot(setting); - if (!r) { - r = {}; - data.setRoot(setting, r); - } - r[setting.data.key.children] = []; - r.expandTriggerFlag = false; - r.curSelectedList = []; - r.noSelection = true; - r.createdNodes = []; - r.zId = 0; - r._ver = (new Date()).getTime(); - }, - //default cache of core - _initCache = function(setting) { - var c = data.getCache(setting); - if (!c) { - c = {}; - data.setCache(setting, c); - } - c.nodes = []; - c.doms = []; - }, - //default bindEvent of core - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.NODECREATED, function (event, treeId, node) { - tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); - }); - - o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { - tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); - }); - - o.bind(c.EXPAND, function (event, treeId, node) { - tools.apply(setting.callback.onExpand, [event, treeId, node]); - }); - - o.bind(c.COLLAPSE, function (event, treeId, node) { - tools.apply(setting.callback.onCollapse, [event, treeId, node]); - }); - - o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { - tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); - }); - - o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { - tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); - }); - - o.bind(c.REMOVE, function (event, treeId, treeNode) { - tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); - }); - - o.bind(c.SELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onSelected, [srcEvent, treeId, node]); - }); - o.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.NODECREATED) - .unbind(c.CLICK) - .unbind(c.EXPAND) - .unbind(c.COLLAPSE) - .unbind(c.ASYNC_SUCCESS) - .unbind(c.ASYNC_ERROR) - .unbind(c.REMOVE) - .unbind(c.SELECTED) - .unbind(c.UNSELECTED); - }, - //default event proxy of core - _eventProxy = function(event) { - var target = event.target, - setting = data.getSetting(event.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null, - tmp = null; - - if (tools.eqs(event.type, "mousedown")) { - treeEventType = "mousedown"; - } else if (tools.eqs(event.type, "mouseup")) { - treeEventType = "mouseup"; - } else if (tools.eqs(event.type, "contextmenu")) { - treeEventType = "contextmenu"; - } else if (tools.eqs(event.type, "click")) { - if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "switchNode"; - } else { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "clickNode"; - } - } - } else if (tools.eqs(event.type, "dblclick")) { - treeEventType = "dblclick"; - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "switchNode"; - } - } - if (treeEventType.length > 0 && tId.length == 0) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) {tId = tools.getNodeMainDom(tmp).id;} - } - // event to node - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "switchNode" : - if (!node.isParent) { - nodeEventType = ""; - } else if (tools.eqs(event.type, "click") - || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { - nodeEventCallback = handler.onSwitchNode; - } else { - nodeEventType = ""; - } - break; - case "clickNode" : - nodeEventCallback = handler.onClickNode; - break; - } - } - // event to zTree - switch (treeEventType) { - case "mousedown" : - treeEventCallback = handler.onZTreeMousedown; - break; - case "mouseup" : - treeEventCallback = handler.onZTreeMouseup; - break; - case "dblclick" : - treeEventCallback = handler.onZTreeDblclick; - break; - case "contextmenu" : - treeEventCallback = handler.onZTreeContextmenu; - break; - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of core - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var r = data.getRoot(setting), - childKey = setting.data.key.children; - n.level = level; - n.tId = setting.treeId + "_" + (++r.zId); - n.parentTId = parentNode ? parentNode.tId : null; - n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; - if (n[childKey] && n[childKey].length > 0) { - n.isParent = true; - n.zAsync = true; - } else { - n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; - n.open = (n.isParent && !setting.async.enable) ? n.open : false; - n.zAsync = !n.isParent; - } - n.isFirstNode = isFirstNode; - n.isLastNode = isLastNode; - n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; - n.getPreNode = function() {return data.getPreNode(setting, n);}; - n.getNextNode = function() {return data.getNextNode(setting, n);}; - n.isAjaxing = false; - data.fixPIdKeyValue(setting, n); - }, - _init = { - bind: [_bindEvent], - unbind: [_unbindEvent], - caches: [_initCache], - nodes: [_initNode], - proxys: [_eventProxy], - roots: [_initRoot], - beforeA: [], - afterA: [], - innerBeforeA: [], - innerAfterA: [], - zTreeTools: [] - }, - //method of operate data - data = { - addNodeCache: function(setting, node) { - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; - }, - getNodeCacheId: function(tId) { - return tId.substring(tId.lastIndexOf("_")+1); - }, - addAfterA: function(afterA) { - _init.afterA.push(afterA); - }, - addBeforeA: function(beforeA) { - _init.beforeA.push(beforeA); - }, - addInnerAfterA: function(innerAfterA) { - _init.innerAfterA.push(innerAfterA); - }, - addInnerBeforeA: function(innerBeforeA) { - _init.innerBeforeA.push(innerBeforeA); - }, - addInitBind: function(bindEvent) { - _init.bind.push(bindEvent); - }, - addInitUnBind: function(unbindEvent) { - _init.unbind.push(unbindEvent); - }, - addInitCache: function(initCache) { - _init.caches.push(initCache); - }, - addInitNode: function(initNode) { - _init.nodes.push(initNode); - }, - addInitProxy: function(initProxy, isFirst) { - if (!!isFirst) { - _init.proxys.splice(0,0,initProxy); - } else { - _init.proxys.push(initProxy); - } - }, - addInitRoot: function(initRoot) { - _init.roots.push(initRoot); - }, - addNodesData: function(setting, parentNode, nodes) { - var childKey = setting.data.key.children; - if (!parentNode[childKey]) parentNode[childKey] = []; - if (parentNode[childKey].length > 0) { - parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; - view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); - } - parentNode.isParent = true; - parentNode[childKey] = parentNode[childKey].concat(nodes); - }, - addSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - if (!data.isSelectedNode(setting, node)) { - root.curSelectedList.push(node); - } - }, - addCreatedNode: function(setting, node) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - root.createdNodes.push(node); - } - }, - addZTreeTools: function(zTreeTools) { - _init.zTreeTools.push(zTreeTools); - }, - exSetting: function(s) { - $.extend(true, _setting, s); - }, - fixPIdKeyValue: function(setting, node) { - if (setting.data.simpleData.enable) { - node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; - } - }, - getAfterA: function(setting, node, array) { - for (var i=0, j=_init.afterA.length; i<j; i++) { - _init.afterA[i].apply(this, arguments); - } - }, - getBeforeA: function(setting, node, array) { - for (var i=0, j=_init.beforeA.length; i<j; i++) { - _init.beforeA[i].apply(this, arguments); - } - }, - getInnerAfterA: function(setting, node, array) { - for (var i=0, j=_init.innerAfterA.length; i<j; i++) { - _init.innerAfterA[i].apply(this, arguments); - } - }, - getInnerBeforeA: function(setting, node, array) { - for (var i=0, j=_init.innerBeforeA.length; i<j; i++) { - _init.innerBeforeA[i].apply(this, arguments); - } - }, - getCache: function(setting) { - return caches[setting.treeId]; - }, - getNextNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length-1; i<=l; i++) { - if (p[childKey][i] === node) { - return (i==l ? null : p[childKey][i+1]); - } - } - return null; - }, - getNodeByParam: function(setting, nodes, key, value) { - if (!nodes || !key) return null; - var childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i][key] == value) { - return nodes[i]; - } - var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value); - if (tmp) return tmp; - } - return null; - }, - getNodeCache: function(setting, tId) { - if (!tId) return null; - var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; - return n ? n : null; - }, - getNodeName: function(setting, node) { - var nameKey = setting.data.key.name; - return "" + node[nameKey]; - }, - getNodeTitle: function(setting, node) { - var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; - return "" + node[t]; - }, - getNodes: function(setting) { - return data.getRoot(setting)[setting.data.key.children]; - }, - getNodesByParam: function(setting, nodes, key, value) { - if (!nodes || !key) return []; - var childKey = setting.data.key.children, - result = []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i][key] == value) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByParamFuzzy: function(setting, nodes, key, value) { - if (!nodes || !key) return []; - var childKey = setting.data.key.children, - result = []; - value = value.toLowerCase(); - for (var i = 0, l = nodes.length; i < l; i++) { - if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { - if (!nodes) return (isSingle ? null : []); - var childKey = setting.data.key.children, - result = isSingle ? null : []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (tools.apply(filter, [nodes[i], invokeParam], false)) { - if (isSingle) {return nodes[i];} - result.push(nodes[i]); - } - var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); - if (isSingle && !!tmpResult) {return tmpResult;} - result = isSingle ? tmpResult : result.concat(tmpResult); - } - return result; - }, - getPreNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length; i<l; i++) { - if (p[childKey][i] === node) { - return (i==0 ? null : p[childKey][i-1]); - } - } - return null; - }, - getRoot: function(setting) { - return setting ? roots[setting.treeId] : null; - }, - getRoots: function() { - return roots; - }, - getSetting: function(treeId) { - return settings[treeId]; - }, - getSettings: function() { - return settings; - }, - getZTreeTools: function(treeId) { - var r = this.getRoot(this.getSetting(treeId)); - return r ? r.treeTools : null; - }, - initCache: function(setting) { - for (var i=0, j=_init.caches.length; i<j; i++) { - _init.caches[i].apply(this, arguments); - } - }, - initNode: function(setting, level, node, parentNode, preNode, nextNode) { - for (var i=0, j=_init.nodes.length; i<j; i++) { - _init.nodes[i].apply(this, arguments); - } - }, - initRoot: function(setting) { - for (var i=0, j=_init.roots.length; i<j; i++) { - _init.roots[i].apply(this, arguments); - } - }, - isSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - for (var i=0, j=root.curSelectedList.length; i<j; i++) { - if(node === root.curSelectedList[i]) return true; - } - return false; - }, - removeNodeCache: function(setting, node) { - var childKey = setting.data.key.children; - if (node[childKey]) { - for (var i=0, l=node[childKey].length; i<l; i++) { - arguments.callee(setting, node[childKey][i]); - } - } - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; - }, - removeSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - for (var i=0, j=root.curSelectedList.length; i<j; i++) { - if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { - root.curSelectedList.splice(i, 1); - i--;j--; - } - } - }, - setCache: function(setting, cache) { - caches[setting.treeId] = cache; - }, - setRoot: function(setting, root) { - roots[setting.treeId] = root; - }, - setZTreeTools: function(setting, zTreeTools) { - for (var i=0, j=_init.zTreeTools.length; i<j; i++) { - _init.zTreeTools[i].apply(this, arguments); - } - }, - transformToArrayFormat: function (setting, nodes) { - if (!nodes) return []; - var childKey = setting.data.key.children, - r = []; - if (tools.isArray(nodes)) { - for (var i=0, l=nodes.length; i<l; i++) { - r.push(nodes[i]); - if (nodes[i][childKey]) - r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey])); - } - } else { - r.push(nodes); - if (nodes[childKey]) - r = r.concat(data.transformToArrayFormat(setting, nodes[childKey])); - } - return r; - }, - transformTozTreeFormat: function(setting, sNodes) { - var i,l, - key = setting.data.simpleData.idKey, - parentKey = setting.data.simpleData.pIdKey, - childKey = setting.data.key.children; - if (!key || key=="" || !sNodes) return []; - - if (tools.isArray(sNodes)) { - var r = []; - var tmpMap = []; - for (i=0, l=sNodes.length; i<l; i++) { - tmpMap[sNodes[i][key]] = sNodes[i]; - } - for (i=0, l=sNodes.length; i<l; i++) { - if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) { - if (!tmpMap[sNodes[i][parentKey]][childKey]) - tmpMap[sNodes[i][parentKey]][childKey] = []; - tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]); - } else { - r.push(sNodes[i]); - } - } - return r; - }else { - return [sNodes]; - } - } - }, - //method of event proxy - event = { - bindEvent: function(setting) { - for (var i=0, j=_init.bind.length; i<j; i++) { - _init.bind[i].apply(this, arguments); - } - }, - unbindEvent: function(setting) { - for (var i=0, j=_init.unbind.length; i<j; i++) { - _init.unbind[i].apply(this, arguments); - } - }, - bindTree: function(setting) { - var eventParam = { - treeId: setting.treeId - }, - o = setting.treeObj; - if (!setting.view.txtSelectedEnable) { - // for can't select text - o.bind('selectstart', function(e){ - var node - var n = e.originalEvent.srcElement.nodeName.toLowerCase(); - return (n === "input" || n === "textarea" ); - }).css({ - "-moz-user-select":"-moz-none" - }); - } - o.bind('click', eventParam, event.proxy); - o.bind('dblclick', eventParam, event.proxy); - o.bind('mouseover', eventParam, event.proxy); - o.bind('mouseout', eventParam, event.proxy); - o.bind('mousedown', eventParam, event.proxy); - o.bind('mouseup', eventParam, event.proxy); - o.bind('contextmenu', eventParam, event.proxy); - }, - unbindTree: function(setting) { - var o = setting.treeObj; - o.unbind('click', event.proxy) - .unbind('dblclick', event.proxy) - .unbind('mouseover', event.proxy) - .unbind('mouseout', event.proxy) - .unbind('mousedown', event.proxy) - .unbind('mouseup', event.proxy) - .unbind('contextmenu', event.proxy); - }, - doProxy: function(e) { - var results = []; - for (var i=0, j=_init.proxys.length; i<j; i++) { - var proxyResult = _init.proxys[i].apply(this, arguments); - results.push(proxyResult); - if (proxyResult.stop) { - break; - } - } - return results; - }, - proxy: function(e) { - var setting = data.getSetting(e.data.treeId); - if (!tools.uCanDo(setting, e)) return true; - var results = event.doProxy(e), - r = true, x = false; - for (var i=0, l=results.length; i<l; i++) { - var proxyResult = results[i]; - if (proxyResult.nodeEventCallback) { - x = true; - r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; - } - if (proxyResult.treeEventCallback) { - x = true; - r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; - } - } - return r; - } - }, - //method of event handler - handler = { - onSwitchNode: function (event, node) { - var setting = data.getSetting(event.data.treeId); - if (node.open) { - if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; - data.getRoot(setting).expandTriggerFlag = true; - view.switchNode(setting, node); - } else { - if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; - data.getRoot(setting).expandTriggerFlag = true; - view.switchNode(setting, node); - } - return true; - }, - onClickNode: function (event, node) { - var setting = data.getSetting(event.data.treeId), - clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; - if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; - if (clickFlag === 0) { - view.cancelPreSelectedNode(setting, node); - } else { - view.selectNode(setting, node, clickFlag === 2); - } - setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); - return true; - }, - onZTreeMousedown: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { - tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); - } - return true; - }, - onZTreeMouseup: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { - tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); - } - return true; - }, - onZTreeDblclick: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { - tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); - } - return true; - }, - onZTreeContextmenu: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { - tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); - } - return (typeof setting.callback.onRightClick) != "function"; - } - }, - //method of tools for zTree - tools = { - apply: function(fun, param, defaultValue) { - if ((typeof fun) == "function") { - return fun.apply(zt, param?param:[]); - } - return defaultValue; - }, - canAsync: function(setting, node) { - var childKey = setting.data.key.children; - return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0))); - }, - clone: function (obj){ - if (obj === null) return null; - var o = tools.isArray(obj) ? [] : {}; - for(var i in obj){ - o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); - } - return o; - }, - eqs: function(str1, str2) { - return str1.toLowerCase() === str2.toLowerCase(); - }, - isArray: function(arr) { - return Object.prototype.toString.apply(arr) === "[object Array]"; - }, - $: function(node, exp, setting) { - if (!!exp && typeof exp != "string") { - setting = exp; - exp = ""; - } - if (typeof node == "string") { - return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); - } else { - return $("#" + node.tId + exp, setting ? setting.treeObj : null); - } - }, - getMDom: function (setting, curDom, targetExpr) { - if (!curDom) return null; - while (curDom && curDom.id !== setting.treeId) { - for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) { - if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { - return curDom; - } - } - curDom = curDom.parentNode; - } - return null; - }, - getNodeMainDom:function(target) { - return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); - }, - isChildOrSelf: function(dom, parentId) { - return ( $(dom).closest("#" + parentId).length> 0 ); - }, - uCanDo: function(setting, e) { - return true; - } - }, - //method of operate ztree dom - view = { - addNodes: function(setting, parentNode, newNodes, isSilent) { - if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { - return; - } - if (!tools.isArray(newNodes)) { - newNodes = [newNodes]; - } - if (setting.data.simpleData.enable) { - newNodes = data.transformTozTreeFormat(setting, newNodes); - } - if (parentNode) { - var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), - target_icoObj = $$(parentNode, consts.id.ICON, setting), - target_ulObj = $$(parentNode, consts.id.UL, setting); - - if (!parentNode.open) { - view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); - view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); - parentNode.open = false; - target_ulObj.css({ - "display": "none" - }); - } - - data.addNodesData(setting, parentNode, newNodes); - view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); - if (!isSilent) { - view.expandCollapseParentNode(setting, parentNode, true); - } - } else { - data.addNodesData(setting, data.getRoot(setting), newNodes); - view.createNodes(setting, 0, newNodes, null); - } - }, - appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { - if (!nodes) return []; - var html = [], - childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - var node = nodes[i]; - if (initFlag) { - var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), - tmpPChild = tmpPNode[childKey], - isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), - isLastNode = (i == (nodes.length - 1)); - data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); - data.addNodeCache(setting, node); - } - - var childHtml = []; - if (node[childKey] && node[childKey].length > 0) { - //make child html first, because checkType - childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); - } - if (openFlag) { - - view.makeDOMNodeMainBefore(html, setting, node); - view.makeDOMNodeLine(html, setting, node); - data.getBeforeA(setting, node, html); - view.makeDOMNodeNameBefore(html, setting, node); - data.getInnerBeforeA(setting, node, html); - view.makeDOMNodeIcon(html, setting, node); - data.getInnerAfterA(setting, node, html); - view.makeDOMNodeNameAfter(html, setting, node); - data.getAfterA(setting, node, html); - if (node.isParent && node.open) { - view.makeUlHtml(setting, node, html, childHtml.join('')); - } - view.makeDOMNodeMainAfter(html, setting, node); - data.addCreatedNode(setting, node); - } - } - return html; - }, - appendParentULDom: function(setting, node) { - var html = [], - nObj = $$(node, setting); - if (!nObj.get(0) && !!node.parentTId) { - view.appendParentULDom(setting, node.getParentNode()); - nObj = $$(node, setting); - } - var ulObj = $$(node, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.remove(); - } - var childKey = setting.data.key.children, - childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); - view.makeUlHtml(setting, node, html, childHtml.join('')); - nObj.append(html.join('')); - }, - asyncNode: function(setting, node, isSilent, callback) { - var i, l; - if (node && !node.isParent) { - tools.apply(callback); - return false; - } else if (node && node.isAjaxing) { - return false; - } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { - tools.apply(callback); - return false; - } - if (node) { - node.isAjaxing = true; - var icoObj = $$(node, consts.id.ICON, setting); - icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); - } - - var tmpParam = {}; - for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { - var pKey = setting.async.autoParam[i].split("="), spKey = pKey; - if (pKey.length>1) { - spKey = pKey[1]; - pKey = pKey[0]; - } - tmpParam[spKey] = node[pKey]; - } - if (tools.isArray(setting.async.otherParam)) { - for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { - tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; - } - } else { - for (var p in setting.async.otherParam) { - tmpParam[p] = setting.async.otherParam[p]; - } - } - - var _tmpV = data.getRoot(setting)._ver; - $.ajax({ - contentType: setting.async.contentType, - cache: false, - type: setting.async.type, - url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), - data: tmpParam, - dataType: setting.async.dataType, - success: function(msg) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - var newNodes = []; - try { - if (!msg || msg.length == 0) { - newNodes = []; - } else if (typeof msg == "string") { - newNodes = eval("(" + msg + ")"); - } else { - newNodes = msg; - } - } catch(err) { - newNodes = msg; - } - - if (node) { - node.isAjaxing = null; - node.zAsync = true; - } - view.setNodeLineIcos(setting, node); - if (newNodes && newNodes !== "") { - newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); - view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); - } else { - view.addNodes(setting, node, [], !!isSilent); - } - setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); - tools.apply(callback); - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - if (node) node.isAjaxing = null; - view.setNodeLineIcos(setting, node); - setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); - } - }); - return true; - }, - cancelPreSelectedNode: function (setting, node, excludeNode) { - var list = data.getRoot(setting).curSelectedList, - i, n; - for (i=list.length-1; i>=0; i--) { - n = list[i]; - if (node === n || (!node && (!excludeNode || excludeNode !== n))) { - $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); - if (node) { - data.removeSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - break; - } else { - list.splice(i, 1); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - } - } - } - }, - createNodeCallback: function(setting) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - while (root.createdNodes.length>0) { - var node = root.createdNodes.shift(); - tools.apply(setting.view.addDiyDom, [setting.treeId, node]); - if (!!setting.callback.onNodeCreated) { - setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); - } - } - } - }, - createNodes: function(setting, level, nodes, parentNode) { - if (!nodes || nodes.length == 0) return; - var root = data.getRoot(setting), - childKey = setting.data.key.children, - openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); - root.createdNodes = []; - var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); - if (!parentNode) { - setting.treeObj.append(zTreeHtml.join('')); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.append(zTreeHtml.join('')); - } - } - view.createNodeCallback(setting); - }, - destroy: function(setting) { - if (!setting) return; - data.initCache(setting); - data.initRoot(setting); - event.unbindTree(setting); - event.unbindEvent(setting); - setting.treeObj.empty(); - delete settings[setting.treeId]; - }, - expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (!node) { - tools.apply(callback, []); - return; - } - if (root.expandTriggerFlag) { - var _callback = callback; - callback = function(){ - if (_callback) _callback(); - if (node.open) { - setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); - } else { - setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); - } - }; - root.expandTriggerFlag = false; - } - if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { - view.appendParentULDom(setting, node); - view.createNodeCallback(setting); - } - if (node.open == expandFlag) { - tools.apply(callback, []); - return; - } - var ulObj = $$(node, consts.id.UL, setting), - switchObj = $$(node, consts.id.SWITCH, setting), - icoObj = $$(node, consts.id.ICON, setting); - - if (node.isParent) { - node.open = !node.open; - if (node.iconOpen && node.iconClose) { - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - } - - if (node.open) { - view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); - view.replaceIcoClass(node, icoObj, consts.folder.OPEN); - if (animateFlag == false || setting.view.expandSpeed == "") { - ulObj.show(); - tools.apply(callback, []); - } else { - if (node[childKey] && node[childKey].length > 0) { - ulObj.slideDown(setting.view.expandSpeed, callback); - } else { - ulObj.show(); - tools.apply(callback, []); - } - } - } else { - view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); - view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); - if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { - ulObj.hide(); - tools.apply(callback, []); - } else { - ulObj.slideUp(setting.view.expandSpeed, callback); - } - } - } else { - tools.apply(callback, []); - } - }, - expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { - if (!node) return; - if (!node.parentTId) { - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); - return; - } else { - view.expandCollapseNode(setting, node, expandFlag, animateFlag); - } - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); - } - }, - expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - treeNodes = (node) ? node[childKey]: root[childKey], - selfAnimateSign = (node) ? false : animateFlag, - expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; - data.getRoot(setting).expandTriggerFlag = false; - if (treeNodes) { - for (var i = 0, l = treeNodes.length; i < l; i++) { - if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); - } - } - data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); - }, - isSelectedNode: function (setting, node) { - if (!node) { - return false; - } - var list = data.getRoot(setting).curSelectedList, - i; - for (i=list.length-1; i>=0; i--) { - if (node === list[i]) { - return true; - } - } - return false; - }, - makeDOMNodeIcon: function(html, setting, node) { - var nameStr = data.getNodeName(setting, node), - name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); - html.push("<span id='", node.tId, consts.id.ICON, - "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), - "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, - "'>",name,"</span>"); - }, - makeDOMNodeLine: function(html, setting, node) { - html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>"); - }, - makeDOMNodeMainAfter: function(html, setting, node) { - html.push("</li>"); - }, - makeDOMNodeMainBefore: function(html, setting, node) { - html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>"); - }, - makeDOMNodeNameAfter: function(html, setting, node) { - html.push("</a>"); - }, - makeDOMNodeNameBefore: function(html, setting, node) { - var title = data.getNodeTitle(setting, node), - url = view.makeNodeUrl(setting, node), - fontcss = view.makeNodeFontCss(setting, node), - fontStyle = []; - for (var f in fontcss) { - fontStyle.push(f, ":", fontcss[f], ";"); - } - html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''), - "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), - "'"); - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");} - html.push(">"); - }, - makeNodeFontCss: function(setting, node) { - var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); - return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; - }, - makeNodeIcoClass: function(setting, node) { - var icoCss = ["ico"]; - if (!node.isAjaxing) { - icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; - if (node.isParent) { - icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - icoCss.push(consts.folder.DOCU); - } - } - return consts.className.BUTTON + " " + icoCss.join('_'); - }, - makeNodeIcoStyle: function(setting, node) { - var icoStyle = []; - if (!node.isAjaxing) { - var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; - if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); - if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { - icoStyle.push("width:0px;height:0px;"); - } - } - return icoStyle.join(''); - }, - makeNodeLineClass: function(setting, node) { - var lineClass = []; - if (setting.view.showLine) { - if (node.level == 0 && node.isFirstNode && node.isLastNode) { - lineClass.push(consts.line.ROOT); - } else if (node.level == 0 && node.isFirstNode) { - lineClass.push(consts.line.ROOTS); - } else if (node.isLastNode) { - lineClass.push(consts.line.BOTTOM); - } else { - lineClass.push(consts.line.CENTER); - } - } else { - lineClass.push(consts.line.NOLINE); - } - if (node.isParent) { - lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - lineClass.push(consts.folder.DOCU); - } - return view.makeNodeLineClassEx(node) + lineClass.join('_'); - }, - makeNodeLineClassEx: function(node) { - return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; - }, - makeNodeTarget: function(node) { - return (node.target || "_blank"); - }, - makeNodeUrl: function(setting, node) { - var urlKey = setting.data.key.url; - return node[urlKey] ? node[urlKey] : null; - }, - makeUlHtml: function(setting, node, html, content) { - html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>"); - html.push(content); - html.push("</ul>"); - }, - makeUlLineClass: function(setting, node) { - return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); - }, - removeChildNodes: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - nodes = node[childKey]; - if (!nodes) return; - - for (var i = 0, l = nodes.length; i < l; i++) { - data.removeNodeCache(setting, nodes[i]); - } - data.removeSelectedNode(setting); - delete node[childKey]; - - if (!setting.data.keep.parent) { - node.isParent = false; - node.open = false; - var tmp_switchObj = $$(node, consts.id.SWITCH, setting), - tmp_icoObj = $$(node, consts.id.ICON, setting); - view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); - $$(node, consts.id.UL, setting).remove(); - } else { - $$(node, consts.id.UL, setting).empty(); - } - }, - setFirstNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][0].isFirstNode = true; - } - }, - setLastNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][childLength - 1].isLastNode = true; - } - }, - removeNode: function(setting, node) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : root; - - node.isFirstNode = false; - node.isLastNode = false; - node.getPreNode = function() {return null;}; - node.getNextNode = function() {return null;}; - - if (!data.getNodeCache(setting, node.tId)) { - return; - } - - $$(node, setting).remove(); - data.removeNodeCache(setting, node); - data.removeSelectedNode(setting, node); - - for (var i = 0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i].tId == node.tId) { - parentNode[childKey].splice(i, 1); - break; - } - } - view.setFirstNode(setting, parentNode); - view.setLastNode(setting, parentNode); - - var tmp_ulObj,tmp_switchObj,tmp_icoObj, - childLength = parentNode[childKey].length; - - //repair nodes old parent - if (!setting.data.keep.parent && childLength == 0) { - //old parentNode has no child nodes - parentNode.isParent = false; - parentNode.open = false; - tmp_ulObj = $$(parentNode, consts.id.UL, setting); - tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); - tmp_icoObj = $$(parentNode, consts.id.ICON, setting); - view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (setting.view.showLine && childLength > 0) { - //old parentNode has child nodes - var newLast = parentNode[childKey][childLength - 1]; - tmp_ulObj = $$(newLast, consts.id.UL, setting); - tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); - tmp_icoObj = $$(newLast, consts.id.ICON, setting); - if (parentNode == root) { - if (parentNode[childKey].length == 1) { - //node was root, and ztree has only one root after move node - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); - } else { - var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); - view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - } else { - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - tmp_ulObj.removeClass(consts.line.LINE); - } - }, - replaceIcoClass: function(node, obj, newName) { - if (!obj || node.isAjaxing) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[tmpList.length-1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - }, - replaceSwitchClass: function(node, obj, newName) { - if (!obj) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.line.ROOT: - case consts.line.ROOTS: - case consts.line.CENTER: - case consts.line.BOTTOM: - case consts.line.NOLINE: - tmpList[0] = view.makeNodeLineClassEx(node) + newName; - break; - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - if (newName !== consts.folder.DOCU) { - obj.removeAttr("disabled"); - } else { - obj.attr("disabled", "disabled"); - } - }, - selectNode: function(setting, node, addFlag) { - if (!addFlag) { - view.cancelPreSelectedNode(setting, null, node); - } - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); - data.addSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); - }, - setNodeFontCss: function(setting, treeNode) { - var aObj = $$(treeNode, consts.id.A, setting), - fontCss = view.makeNodeFontCss(setting, treeNode); - if (fontCss) { - aObj.css(fontCss); - } - }, - setNodeLineIcos: function(setting, node) { - if (!node) return; - var switchObj = $$(node, consts.id.SWITCH, setting), - ulObj = $$(node, consts.id.UL, setting), - icoObj = $$(node, consts.id.ICON, setting), - ulLine = view.makeUlLineClass(setting, node); - if (ulLine.length==0) { - ulObj.removeClass(consts.line.LINE); - } else { - ulObj.addClass(ulLine); - } - switchObj.attr("class", view.makeNodeLineClass(setting, node)); - if (node.isParent) { - switchObj.removeAttr("disabled"); - } else { - switchObj.attr("disabled", "disabled"); - } - icoObj.removeAttr("style"); - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - icoObj.attr("class", view.makeNodeIcoClass(setting, node)); - }, - setNodeName: function(setting, node) { - var title = data.getNodeTitle(setting, node), - nObj = $$(node, consts.id.SPAN, setting); - nObj.empty(); - if (setting.view.nameIsHTML) { - nObj.html(data.getNodeName(setting, node)); - } else { - nObj.text(data.getNodeName(setting, node)); - } - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("title", !title ? "" : title); - } - }, - setNodeTarget: function(setting, node) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("target", view.makeNodeTarget(node)); - }, - setNodeUrl: function(setting, node) { - var aObj = $$(node, consts.id.A, setting), - url = view.makeNodeUrl(setting, node); - if (url == null || url.length == 0) { - aObj.removeAttr("href"); - } else { - aObj.attr("href", url); - } - }, - switchNode: function(setting, node) { - if (node.open || !tools.canAsync(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - } else if (setting.async.enable) { - if (!view.asyncNode(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - return; - } - } else if (node) { - view.expandCollapseNode(setting, node, !node.open); - } - } - }; - // zTree defind - $.fn.zTree = { - consts : _consts, - _z : { - tools: tools, - view: view, - event: event, - data: data - }, - getZTreeObj: function(treeId) { - var o = data.getZTreeTools(treeId); - return o ? o : null; - }, - destroy: function(treeId) { - if (!!treeId && treeId.length > 0) { - view.destroy(data.getSetting(treeId)); - } else { - for(var s in settings) { - view.destroy(settings[s]); - } - } - }, - init: function(obj, zSetting, zNodes) { - var setting = tools.clone(_setting); - $.extend(true, setting, zSetting); - setting.treeId = obj.attr("id"); - setting.treeObj = obj; - setting.treeObj.empty(); - settings[setting.treeId] = setting; - //For some older browser,(e.g., ie6) - if(typeof document.body.style.maxHeight === "undefined") { - setting.view.expandSpeed = ""; - } - data.initRoot(setting); - var root = data.getRoot(setting), - childKey = setting.data.key.children; - zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; - if (setting.data.simpleData.enable) { - root[childKey] = data.transformTozTreeFormat(setting, zNodes); - } else { - root[childKey] = zNodes; - } - - data.initCache(setting); - event.unbindTree(setting); - event.bindTree(setting); - event.unbindEvent(setting); - event.bindEvent(setting); - - var zTreeTools = { - setting : setting, - addNodes : function(parentNode, newNodes, isSilent) { - if (!newNodes) return null; - if (!parentNode) parentNode = null; - if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; - var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); - function addCallback() { - view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); - } - - if (tools.canAsync(setting, parentNode)) { - view.asyncNode(setting, parentNode, isSilent, addCallback); - } else { - addCallback(); - } - return xNewNodes; - }, - cancelSelectedNode : function(node) { - view.cancelPreSelectedNode(setting, node); - }, - destroy : function() { - view.destroy(setting); - }, - expandAll : function(expandFlag) { - expandFlag = !!expandFlag; - view.expandCollapseSonNode(setting, null, expandFlag, true); - return expandFlag; - }, - expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { - if (!node || !node.isParent) return null; - if (expandFlag !== true && expandFlag !== false) { - expandFlag = !node.open; - } - callbackFlag = !!callbackFlag; - - if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { - return null; - } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { - return null; - } - if (expandFlag && node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); - } - if (expandFlag === node.open && !sonSign) { - return null; - } - - data.getRoot(setting).expandTriggerFlag = callbackFlag; - if (!tools.canAsync(setting, node) && sonSign) { - view.expandCollapseSonNode(setting, node, expandFlag, true, function() { - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - }); - } else { - node.open = !expandFlag; - view.switchNode(this.setting, node); - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - } - return expandFlag; - }, - getNodes : function() { - return data.getNodes(setting); - }, - getNodeByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodeByTId : function(tId) { - return data.getNodeCache(setting, tId); - }, - getNodesByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByParamFuzzy : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { - isSingle = !!isSingle; - if (!filter || (typeof filter != "function")) return (isSingle ? null : []); - return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); - }, - getNodeIndex : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i] == node) return i; - } - return -1; - }, - getSelectedNodes : function() { - var r = [], list = data.getRoot(setting).curSelectedList; - for (var i=0, l=list.length; i<l; i++) { - r.push(list[i]); - } - return r; - }, - isSelectedNode : function(node) { - return data.isSelectedNode(setting, node); - }, - reAsyncChildNodes : function(parentNode, reloadType, isSilent) { - if (!this.setting.async.enable) return; - var isRoot = !parentNode; - if (isRoot) { - parentNode = data.getRoot(setting); - } - if (reloadType=="refresh") { - var childKey = this.setting.data.key.children; - for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) { - data.removeNodeCache(setting, parentNode[childKey][i]); - } - data.removeSelectedNode(setting); - parentNode[childKey] = []; - if (isRoot) { - this.setting.treeObj.empty(); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - ulObj.empty(); - } - } - view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent); - }, - refresh : function() { - this.setting.treeObj.empty(); - var root = data.getRoot(setting), - nodes = root[setting.data.key.children] - data.initRoot(setting); - root[setting.data.key.children] = nodes - data.initCache(setting); - view.createNodes(setting, 0, root[setting.data.key.children]); - }, - removeChildNodes : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - nodes = node[childKey]; - view.removeChildNodes(setting, node); - return nodes ? nodes : null; - }, - removeNode : function(node, callbackFlag) { - if (!node) return; - callbackFlag = !!callbackFlag; - if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; - view.removeNode(setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); - } - }, - selectNode : function(node, addFlag) { - if (!node) return; - if (tools.uCanDo(setting)) { - addFlag = setting.view.selectedMulti && addFlag; - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() { - try{$$(node, setting).focus().blur();}catch(e){} - }); - } else { - try{$$(node, setting).focus().blur();}catch(e){} - } - view.selectNode(setting, node, addFlag); - } - }, - transformTozTreeNodes : function(simpleNodes) { - return data.transformTozTreeFormat(setting, simpleNodes); - }, - transformToArray : function(nodes) { - return data.transformToArrayFormat(setting, nodes); - }, - updateNode : function(node, checkTypeFlag) { - if (!node) return; - var nObj = $$(node, setting); - if (nObj.get(0) && tools.uCanDo(setting)) { - view.setNodeName(setting, node); - view.setNodeTarget(setting, node); - view.setNodeUrl(setting, node); - view.setNodeLineIcos(setting, node); - view.setNodeFontCss(setting, node); - } - } - } - root.treeTools = zTreeTools; - data.setZTreeTools(setting, zTreeTools); - - if (root[childKey] && root[childKey].length > 0) { - view.createNodes(setting, 0, root[childKey]); - } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { - view.asyncNode(setting); - } - return zTreeTools; - } - }; - - var zt = $.fn.zTree, - $$ = tools.$, - consts = zt.consts; -})(jQuery);/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-06-18 - */ -(function($){ - //default consts of excheck - var _consts = { - event: { - CHECK: "ztree_check" - }, - id: { - CHECK: "_check" - }, - checkbox: { - STYLE: "checkbox", - DEFAULT: "chk", - DISABLED: "disable", - FALSE: "false", - TRUE: "true", - FULL: "full", - PART: "part", - FOCUS: "focus" - }, - radio: { - STYLE: "radio", - TYPE_ALL: "all", - TYPE_LEVEL: "level" - } - }, - //default setting of excheck - _setting = { - check: { - enable: false, - autoCheckTrigger: false, - chkStyle: _consts.checkbox.STYLE, - nocheckInherit: false, - chkDisabledInherit: false, - radioType: _consts.radio.TYPE_LEVEL, - chkboxType: { - "Y": "ps", - "N": "ps" - } - }, - data: { - key: { - checked: "checked" - } - }, - callback: { - beforeCheck:null, - onCheck:null - } - }, - //default root of excheck - _initRoot = function (setting) { - var r = data.getRoot(setting); - r.radioCheckedList = []; - }, - //default cache of excheck - _initCache = function(treeId) {}, - //default bind event of excheck - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.CHECK, function (event, srcEvent, treeId, node) { - event.srcEvent = srcEvent; - tools.apply(setting.callback.onCheck, [event, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.CHECK); - }, - //default event proxy of excheck - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null; - - if (tools.eqs(e.type, "mouseover")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoverCheck"; - } - } else if (tools.eqs(e.type, "mouseout")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoutCheck"; - } - } else if (tools.eqs(e.type, "click")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "checkNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "checkNode" : - nodeEventCallback = _handler.onCheckNode; - break; - case "mouseoverCheck" : - nodeEventCallback = _handler.onMouseoverCheck; - break; - case "mouseoutCheck" : - nodeEventCallback = _handler.onMouseoutCheck; - break; - } - } - var proxyResult = { - stop: nodeEventType === "checkNode", - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of excheck - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var checkedKey = setting.data.key.checked; - if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); - n[checkedKey] = !!n[checkedKey]; - n.checkedOld = n[checkedKey]; - if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); - n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); - if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); - n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); - if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); - n.halfCheck = !!n.halfCheck; - n.check_Child_State = -1; - n.check_Focus = false; - n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; - - if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { - var r = data.getRoot(setting); - r.radioCheckedList.push(n); - } - }, - //add dom for check - _beforeA = function(setting, node, html) { - var checkedKey = setting.data.key.checked; - if (setting.check.enable) { - data.makeChkFlag(setting, node); - html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>"); - } - }, - //update zTreeObj, add method of check - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { - var checkedKey = this.setting.data.key.checked; - if (node.chkDisabled === true) return; - if (checked !== true && checked !== false) { - checked = !node[checkedKey]; - } - callbackFlag = !!callbackFlag; - - if (node[checkedKey] === checked && !checkTypeFlag) { - return; - } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { - return; - } - if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { - node[checkedKey] = checked; - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); - } - } - } - - zTreeTools.checkAllNodes = function(checked) { - view.repairAllChk(this.setting, !!checked); - } - - zTreeTools.getCheckedNodes = function(checked) { - var childKey = this.setting.data.key.children; - checked = (checked !== false); - return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); - } - - zTreeTools.getChangeCheckedNodes = function() { - var childKey = this.setting.data.key.children; - return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); - } - - zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { - disabled = !!disabled; - inheritParent = !!inheritParent; - inheritChildren = !!inheritChildren; - view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); - view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); - } - - var _updateNode = zTreeTools.updateNode; - zTreeTools.updateNode = function(node, checkTypeFlag) { - if (_updateNode) _updateNode.apply(zTreeTools, arguments); - if (!node || !this.setting.check.enable) return; - var nObj = $$(node, this.setting); - if (nObj.get(0) && tools.uCanDo(this.setting)) { - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - } - } - }, - //method of operate data - _data = { - getRadioCheckedList: function(setting) { - var checkedList = data.getRoot(setting).radioCheckedList; - for (var i=0, j=checkedList.length; i<j; i++) { - if(!data.getNodeCache(setting, checkedList[i].tId)) { - checkedList.splice(i, 1); - i--; j--; - } - } - return checkedList; - }, - getCheckStatus: function(setting, node) { - if (!setting.check.enable || node.nocheck || node.chkDisabled) return null; - var checkedKey = setting.data.key.checked, - r = { - checked: node[checkedKey], - half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) - }; - return r; - }, - getTreeCheckedNodes: function(setting, nodes, checked, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { - results.push(nodes[i]); - if(onlyOne) { - break; - } - } - data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); - if(onlyOne && results.length > 0) { - break; - } - } - return results; - }, - getTreeChangeCheckedNodes: function(setting, nodes, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked; - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { - results.push(nodes[i]); - } - data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); - } - return results; - }, - makeChkFlag: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - chkFlag = -1; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var cNode = node[childKey][i]; - var tmp = -1; - if (setting.check.chkStyle == consts.radio.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 2; - } else if (cNode[checkedKey]) { - tmp = 2; - } else { - tmp = cNode.check_Child_State > 0 ? 2:0; - } - if (tmp == 2) { - chkFlag = 2; break; - } else if (tmp == 0){ - chkFlag = 0; - } - } else if (setting.check.chkStyle == consts.checkbox.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 1; - } else if (cNode[checkedKey] ) { - tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; - } else { - tmp = (cNode.check_Child_State > 0) ? 1 : 0; - } - if (tmp === 1) { - chkFlag = 1; break; - } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { - chkFlag = 1; break; - } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { - chkFlag = 1; break; - } else if (tmp > -1) { - chkFlag = tmp; - } - } - } - } - node.check_Child_State = chkFlag; - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onCheckNode: function (event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkedKey = setting.data.key.checked; - if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; - node[checkedKey] = !node[checkedKey]; - view.checkNodeRelation(setting, node); - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - view.repairParentChkClassWithSelf(setting, node); - setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); - return true; - }, - onMouseoverCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = true; - view.setChkClass(setting, checkObj, node); - return true; - }, - onMouseoutCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = false; - view.setChkClass(setting, checkObj, node); - return true; - } - }, - //method of tools for zTree - _tools = { - - }, - //method of operate ztree dom - _view = { - checkNodeRelation: function(setting, node) { - var pNode, i, l, - childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - r = consts.radio; - if (setting.check.chkStyle == r.STYLE) { - var checkedList = data.getRadioCheckedList(setting); - if (node[checkedKey]) { - if (setting.check.radioType == r.TYPE_ALL) { - for (i = checkedList.length-1; i >= 0; i--) { - pNode = checkedList[i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - checkedList.splice(i, 1); - - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - if (pNode.parentTId != node.parentTId) { - view.repairParentChkClassWithSelf(setting, pNode); - } - } - } - checkedList.push(node); - } else { - var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (i = 0, l = parentNode[childKey].length; i < l; i++) { - pNode = parentNode[childKey][i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - } - } - } - } else if (setting.check.radioType == r.TYPE_ALL) { - for (i = 0, l = checkedList.length; i < l; i++) { - if (node == checkedList[i]) { - checkedList.splice(i, 1); - break; - } - } - } - - } else { - if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, false); - } - if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, false); - } - } - }, - makeChkClass: function(setting, node) { - var checkedKey = setting.data.key.checked, - c = consts.checkbox, r = consts.radio, - fullStyle = ""; - if (node.chkDisabled === true) { - fullStyle = c.DISABLED; - } else if (node.halfCheck) { - fullStyle = c.PART; - } else if (setting.check.chkStyle == r.STYLE) { - fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; - } else { - fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); - } - var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; - chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; - return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; - }, - repairAllChk: function(setting, checked) { - if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { - var checkedKey = setting.data.key.checked, - childKey = setting.data.key.children, - root = data.getRoot(setting); - for (var i = 0, l = root[childKey].length; i<l ; i++) { - var node = root[childKey][i]; - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = checked; - } - view.setSonNodeCheckBox(setting, node, checked); - } - } - }, - repairChkClass: function(setting, node) { - if (!node) return; - data.makeChkFlag(setting, node); - if (node.nocheck !== true) { - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - } - }, - repairParentChkClass: function(setting, node) { - if (!node || !node.parentTId) return; - var pNode = node.getParentNode(); - view.repairChkClass(setting, pNode); - view.repairParentChkClass(setting, pNode); - }, - repairParentChkClassWithSelf: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children; - if (node[childKey] && node[childKey].length > 0) { - view.repairParentChkClass(setting, node[childKey][0]); - } else { - view.repairParentChkClass(setting, node); - } - }, - repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - var childKey = setting.data.key.children; - if (node.chkDisabled != chkDisabled) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - if (node[childKey] && inherit) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var sNode = node[childKey][i]; - view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); - } - } - }, - repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - if (node.chkDisabled != chkDisabled && inherit) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); - }, - setChkClass: function(setting, obj, node) { - if (!obj) return; - if (node.nocheck === true) { - obj.hide(); - } else { - obj.show(); - } - obj.attr('class', view.makeChkClass(setting, node)); - }, - setParentNodeCheckBox: function(setting, node, value, srcNode) { - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - data.makeChkFlag(setting, node); - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - if (node.parentTId) { - var pSign = true; - if (!value) { - var pNodes = node.getParentNode()[childKey]; - for (var i = 0, l = pNodes.length; i < l; i++) { - if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) - || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { - pSign = false; - break; - } - } - } - if (pSign) { - view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); - } - } - }, - setSonNodeCheckBox: function(setting, node, value, srcNode) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - - var hasDisable = false; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { - var sNode = node[childKey][i]; - view.setSonNodeCheckBox(setting, sNode, value, srcNode); - if (sNode.chkDisabled === true) hasDisable = true; - } - } - - if (node != data.getRoot(setting) && node.chkDisabled !== true) { - if (hasDisable && node.nocheck !== true) { - data.makeChkFlag(setting, node); - } - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; - } else { - node.check_Child_State = -1; - } - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy, true); - data.addInitRoot(_initRoot); - data.addBeforeA(_beforeA); - data.addZTreeTools(_zTreeTools); - - var _createNodes = view.createNodes; - view.createNodes = function(setting, level, nodes, parentNode) { - if (_createNodes) _createNodes.apply(view, arguments); - if (!nodes) return; - view.repairParentChkClassWithSelf(setting, parentNode); - } - var _removeNode = view.removeNode; - view.removeNode = function(setting, node) { - var parentNode = node.getParentNode(); - if (_removeNode) _removeNode.apply(view, arguments); - if (!node || !parentNode) return; - view.repairChkClass(setting, parentNode); - view.repairParentChkClass(setting, parentNode); - } - - var _appendNodes = view.appendNodes; - view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { - var html = ""; - if (_appendNodes) { - html = _appendNodes.apply(view, arguments); - } - if (parentNode) { - data.makeChkFlag(setting, parentNode); - } - return html; - } +BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/** + * + * 可调整列宽的grid表格 + * + * Created by GUY on 2016/1/12. + * @class BI.ResizableTable + * @extends BI.Widget + */ +BI.ResizableTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-resizable-table", + el: { + type: "bi.grid_table" + }, + isNeedFreeze: false, + isNeedResize: true, + isResizeAdapt: false, + headerRowSize: 25, + rowSize: 25, + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + freezeCols: [], + header: [], + items: [], + regionColumnSize: [] + }) + }, + + _init: function () { + BI.ResizableTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.resizer = BI.createWidget({ + type: "bi.layout", + cls: "resizable-table-resizer", + invisible: true, + width: 2 + }); + this.regionResizerHandler = this._createResizerHandler(); + this.table = BI.createWidget(o.el, { + type: "bi.grid_table", + element: this, + width: o.width, + height: o.height, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + columnSize: o.columnSize, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: BI.bind(this._mergeRule, this), + + header: this._formatHeader(o.header), + items: o.items, + regionColumnSize: o.regionColumnSize + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.regionResizerHandler, + left: 0, + top: 0, + bottom: 0 + }, { + el: this.resizer, + left: 0, + top: 0 + }] + }); + this._populate(); + }, + + _mergeRule: function (row1, row2) { + var o = this.options; + if (row1.type === "bi.resizable_table_cell") { + row1 = row1.cell; + } + if (row2.type === "bi.resizable_table_cell") { + row2 = row2.cell; + } + return o.mergeRule(row1, row2); + }, + + _createResizerHandler: function () { + var self = this, o = this.options; + var regionResizerHandler = BI.createWidget({ + type: "bi.absolute", + cls: "resizable-table-region-resizer", + invisible: true, + width: 6, + items: [{ + el: { + type: "bi.layout", + width: 2, + cls: "resizable-table-region-resizer-knob" + }, + left: 2, + top: 0, + bottom: 0 + }] + }); + var size = 0, offset = 0, defaultSize = 0, start = false; + var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { + if (mouseMoveTracker.isDragging()) { + start = true; + offset += deltaX; + size = BI.clamp(defaultSize + offset, 15, o.width - 15); + + self.regionResizerHandler.element.addClass("dragging"); + self._setRegionResizerHandlerPosition(size - 3, 0); + } + + }, function () { + if (start === true) { + o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15); + self.table.setRegionColumnSize(o.regionColumnSize); + if (o.isResizeAdapt === true) { + var freezeColumnSize = self._getFreezeColumnSize(); + o.columnSize[self._getFreezeColLength() - 1] += o.regionColumnSize[0] - freezeColumnSize; + self.table.setColumnSize(o.columnSize); + } + self.table.populate(); + self._populate(); + self.regionResizerHandler.element.removeClass("dragging"); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE); + start = false; + } + mouseMoveTracker.releaseMouseMoves(); + }, document); + regionResizerHandler.element.on("mousedown", function (event) { + defaultSize = size = self._getRegionSize(); + offset = 0; + self._setResizerPosition(0, 0); + mouseMoveTracker.captureMouseMoves(event); + }); + return regionResizerHandler; + }, + + _setResizerPosition: function (left, top) { + this.resizer.element.css({ + left: left + "px", + top: top + "px" + }); + }, + + _setRegionResizerHandlerPosition: function (left, top) { + this.regionResizerHandler.element.css({ + left: left + "px", + top: top + "px" + }); + }, + + _getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + _getRegionRowSize: function () { + var o = this.options; + return [o.header.length * o.headerRowSize, + Math.min(o.height - o.header.length * o.headerRowSize, o.items.length * o.rowSize)]; + }, + + _getFreezeColLength: function () { + return this.options.freezeCols.length; + }, + + _getFreezeColumnSize: function () { + var columnSize = this.options.columnSize; + var sum = 0; + for (var i = 0, len = this._getFreezeColLength(); i < len; i++) { + sum += columnSize[i]; + } + return sum; + }, + + _getResizerLeft: function (j) { + var left = 0; + var columnSize = this.options.columnSize; + var freezeColLength = this._getFreezeColLength(); + for (var i = (j >= freezeColLength ? freezeColLength : 0); i < j; i++) { + left += columnSize[i] || 0; + } + if (j >= freezeColLength) { + left += this.table.getRegionSize(); + left -= this.table.getRightHorizontalScroll(); + } else { + left -= this.table.getLeftHorizontalScroll(); + } + return left; + }, + + _formatHeader: function (header) { + var self = this, o = this.options; + var result = []; + var resize = function (j, size) { + self.resizer.setVisible(true); + var height = o.headerRowSize + self._getRegionRowSize()[1]; + self.resizer.setHeight(height); + //TODO 不知道为什么加入这段代码会使得列宽调整出问题 + // if (o.minColumnSize[j]) { + // if (size === o.minColumnSize[j]) { + // self.resizer.element.addClass("suitable"); + // } else { + // self.resizer.element.removeClass("suitable"); + // } + // } + self._setResizerPosition(self._getResizerLeft(j) + size, (o.header.length - 1) * o.headerRowSize); + }; + var stop = function (j, size) { + self.resizer.setVisible(false); + var columnSize = o.columnSize.slice(); + columnSize[j] = size; + o.columnSize = columnSize; + self.table.setColumnSize(columnSize); + self.table.populate(); + self._populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE); + }; + BI.each(header, function (i, cols) { + if (i === header.length - 1) { + result[i] = []; + BI.each(cols, function (j, col) { + if (j === self._getFreezeColLength() - 1 || j === cols.length - 1) { + result[i][j] = col; + } else { + result[i][j] = { + type: "bi.resizable_table_cell", + cell: col, + suitableSize: o.minColumnSize[j], + maxSize: o.maxColumnSize[j], + resize: BI.bind(resize, null, j), + stop: BI.bind(stop, null, j) + }; + if (o.isNeedMerge) { + var r = i; + while (r > 0 && self._mergeRule(result[r][j], result[r - 1][j])) { + result[r - 1][j] = { + type: "bi.resizable_table_cell", + cell: result[r - 1][j], + suitableSize: o.minColumnSize[j], + maxSize: o.maxColumnSize[j], + resize: BI.bind(resize, null, j), + stop: BI.bind(stop, null, j) + }; + r--; + } + } + } + }); + } else { + result.push(cols); + } + }); + return result; + }, + + _populate: function () { + var o = this.options; + var regionSize = this._getRegionSize(); + if (regionSize > 0) { + this.regionResizerHandler.setVisible(true); + this._setRegionResizerHandlerPosition(regionSize - 3, 0); + } else { + this.regionResizerHandler.setVisible(false); + } + }, + + setWidth: function (width) { + BI.ResizableTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width) + }, + + setHeight: function (height) { + BI.ResizableTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this.table.setColumnSize(columnSize); + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function () { + BI.ResizableTable.superclass.attr.apply(this, arguments); + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header) { + if (items) { + this.options.items = items; + } + if (header) { + this.options.header = header; + if (this.options.isNeedResize) { + header = this._formatHeader(header); + } + } + this.table.populate(items, header); + this._populate(); + } +}); + +BI.shortcut("bi.resizable_table", BI.ResizableTable);/** + * + * 自定义树 + * + * Created by GUY on 2015/9/7. + * @class BI.CustomTree + * @extends BI.Single + */ +BI.CustomTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-custom-tree", + expander: { + el: {}, + popup: { + type: "bi.custom_tree" + } + }, + + items: [], + itemsCreator: BI.emptyFn, + + el: { + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.CustomTree.superclass._init.apply(this, arguments); + this.initTree(this.options.items); + }, + + _formatItems: function (nodes) { + var self = this, o = this.options; + nodes = BI.Tree.transformToTreeFormat(nodes); + + var items = []; + BI.each(nodes, function (i, node) { + if (BI.isNotEmptyArray(node.children) || node.isParent === true) { + var item = BI.extend({ + type: "bi.expander", + el: {}, + popup: {type: "bi.custom_tree"} + }, BI.deepClone(o.expander), { + id: node.id, + pId: node.pId, + value: node.value + }); + var el = BI.stripEL(node); + if (!BI.isWidget(el)) { + el = BI.clone(el); + delete el.children; + BI.extend(item.el, el); + } else { + item.el = el; + } + item.popup.expander = BI.deepClone(o.expander); + item.items = item.popup.items = node.children; + item.itemsCreator = item.popup.itemsCreator = function (op) { + if (BI.isNotNull(op.node)) {//从子节点传过来的itemsCreator直接向上传递 + return o.itemsCreator.apply(self, arguments); + } + var args = Array.prototype.slice.call(arguments, 0); + args[0].node = node; + return o.itemsCreator.apply(self, args); + }; + BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el)); + items.push(item); + } else { + items.push(node); + } + }); + return items; + }, + + //构造树结构, + initTree: function (nodes) { + var self = this, o = this.options; + this.tree = BI.createWidget(o.el, { + element: this, + items: this._formatItems(nodes), + itemsCreator: function (op, callback) { + o.itemsCreator.apply(this, [op, function (items) { + var args = Array.prototype.slice.call(arguments, 0); + args[0] = self._formatItems(items); + callback.apply(null, args); + }]); + } + }); + this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj); + } + }) + }, + + //生成树方法 + stroke: function (nodes) { + this.populate.apply(this, arguments); + }, + + populate: function (nodes) { + var args = Array.prototype.slice.call(arguments, 0); + if (arguments.length > 0) { + args[0] = this._formatItems(nodes); + } + this.tree.populate.apply(this.tree, args); + }, + + setValue: function (v) { + this.tree && this.tree.setValue(v); + }, + + getValue: function () { + return this.tree ? this.tree.getValue() : []; + }, + + getAllButtons: function () { + return this.tree ? this.tree.getAllButtons() : []; + }, + + getAllLeaves: function () { + return this.tree ? this.tree.getAllLeaves() : []; + }, + + getNodeById: function (id) { + return this.tree && this.tree.getNodeById(id); + }, + + getNodeByValue: function (id) { + return this.tree && this.tree.getNodeByValue(id); + }, + + empty: function () { + this.tree.empty(); + } +}); +BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.custom_tree", BI.CustomTree);/* + * JQuery zTree core v3.5.18 + * http://zTree.me/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * email: hunter.z@263.net + * Date: 2015-06-18 + */ +(function($){ + var settings = {}, roots = {}, caches = {}, + //default consts of core + _consts = { + className: { + BUTTON: "button", + LEVEL: "level", + ICO_LOADING: "ico_loading", + SWITCH: "switch" + }, + event: { + NODECREATED: "ztree_nodeCreated", + CLICK: "ztree_click", + EXPAND: "ztree_expand", + COLLAPSE: "ztree_collapse", + ASYNC_SUCCESS: "ztree_async_success", + ASYNC_ERROR: "ztree_async_error", + REMOVE: "ztree_remove", + SELECTED: "ztree_selected", + UNSELECTED: "ztree_unselected" + }, + id: { + A: "_a", + ICON: "_ico", + SPAN: "_span", + SWITCH: "_switch", + UL: "_ul" + }, + line: { + ROOT: "root", + ROOTS: "roots", + CENTER: "center", + BOTTOM: "bottom", + NOLINE: "noline", + LINE: "line" + }, + folder: { + OPEN: "open", + CLOSE: "close", + DOCU: "docu" + }, + node: { + CURSELECTED: "curSelectedNode" + } + }, + //default setting of core + _setting = { + treeId: "", + treeObj: null, + view: { + addDiyDom: null, + autoCancelSelected: true, + dblClickExpand: true, + expandSpeed: "fast", + fontCss: {}, + nameIsHTML: false, + selectedMulti: true, + showIcon: true, + showLine: true, + showTitle: true, + txtSelectedEnable: false + }, + data: { + key: { + children: "children", + name: "name", + title: "", + url: "url" + }, + simpleData: { + enable: false, + idKey: "id", + pIdKey: "pId", + rootPId: null + }, + keep: { + parent: false, + leaf: false + } + }, + async: { + enable: false, + contentType: "application/x-www-form-urlencoded", + type: "post", + dataType: "text", + url: "", + autoParam: [], + otherParam: [], + dataFilter: null + }, + callback: { + beforeAsync:null, + beforeClick:null, + beforeDblClick:null, + beforeRightClick:null, + beforeMouseDown:null, + beforeMouseUp:null, + beforeExpand:null, + beforeCollapse:null, + beforeRemove:null, + + onAsyncError:null, + onAsyncSuccess:null, + onNodeCreated:null, + onClick:null, + onDblClick:null, + onRightClick:null, + onMouseDown:null, + onMouseUp:null, + onExpand:null, + onCollapse:null, + onRemove:null + } + }, + //default root of core + //zTree use root to save full data + _initRoot = function (setting) { + var r = data.getRoot(setting); + if (!r) { + r = {}; + data.setRoot(setting, r); + } + r[setting.data.key.children] = []; + r.expandTriggerFlag = false; + r.curSelectedList = []; + r.noSelection = true; + r.createdNodes = []; + r.zId = 0; + r._ver = (new Date()).getTime(); + }, + //default cache of core + _initCache = function(setting) { + var c = data.getCache(setting); + if (!c) { + c = {}; + data.setCache(setting, c); + } + c.nodes = []; + c.doms = []; + }, + //default bindEvent of core + _bindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.bind(c.NODECREATED, function (event, treeId, node) { + tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); + }); + + o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { + tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); + }); + + o.bind(c.EXPAND, function (event, treeId, node) { + tools.apply(setting.callback.onExpand, [event, treeId, node]); + }); + + o.bind(c.COLLAPSE, function (event, treeId, node) { + tools.apply(setting.callback.onCollapse, [event, treeId, node]); + }); + + o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { + tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); + }); + + o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { + tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); + }); + + o.bind(c.REMOVE, function (event, treeId, treeNode) { + tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); + }); + + o.bind(c.SELECTED, function (event, srcEvent, treeId, node) { + tools.apply(setting.callback.onSelected, [srcEvent, treeId, node]); + }); + o.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) { + tools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]); + }); + }, + _unbindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.unbind(c.NODECREATED) + .unbind(c.CLICK) + .unbind(c.EXPAND) + .unbind(c.COLLAPSE) + .unbind(c.ASYNC_SUCCESS) + .unbind(c.ASYNC_ERROR) + .unbind(c.REMOVE) + .unbind(c.SELECTED) + .unbind(c.UNSELECTED); + }, + //default event proxy of core + _eventProxy = function(event) { + var target = event.target, + setting = data.getSetting(event.data.treeId), + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null, + tmp = null; + + if (tools.eqs(event.type, "mousedown")) { + treeEventType = "mousedown"; + } else if (tools.eqs(event.type, "mouseup")) { + treeEventType = "mouseup"; + } else if (tools.eqs(event.type, "contextmenu")) { + treeEventType = "contextmenu"; + } else if (tools.eqs(event.type, "click")) { + if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "switchNode"; + } else { + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "clickNode"; + } + } + } else if (tools.eqs(event.type, "dblclick")) { + treeEventType = "dblclick"; + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "switchNode"; + } + } + if (treeEventType.length > 0 && tId.length == 0) { + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) {tId = tools.getNodeMainDom(tmp).id;} + } + // event to node + if (tId.length>0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "switchNode" : + if (!node.isParent) { + nodeEventType = ""; + } else if (tools.eqs(event.type, "click") + || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { + nodeEventCallback = handler.onSwitchNode; + } else { + nodeEventType = ""; + } + break; + case "clickNode" : + nodeEventCallback = handler.onClickNode; + break; + } + } + // event to zTree + switch (treeEventType) { + case "mousedown" : + treeEventCallback = handler.onZTreeMousedown; + break; + case "mouseup" : + treeEventCallback = handler.onZTreeMouseup; + break; + case "dblclick" : + treeEventCallback = handler.onZTreeDblclick; + break; + case "contextmenu" : + treeEventCallback = handler.onZTreeContextmenu; + break; + } + var proxyResult = { + stop: false, + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of core + _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + var r = data.getRoot(setting), + childKey = setting.data.key.children; + n.level = level; + n.tId = setting.treeId + "_" + (++r.zId); + n.parentTId = parentNode ? parentNode.tId : null; + n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; + if (n[childKey] && n[childKey].length > 0) { + n.isParent = true; + n.zAsync = true; + } else { + n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; + n.open = (n.isParent && !setting.async.enable) ? n.open : false; + n.zAsync = !n.isParent; + } + n.isFirstNode = isFirstNode; + n.isLastNode = isLastNode; + n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; + n.getPreNode = function() {return data.getPreNode(setting, n);}; + n.getNextNode = function() {return data.getNextNode(setting, n);}; + n.isAjaxing = false; + data.fixPIdKeyValue(setting, n); + }, + _init = { + bind: [_bindEvent], + unbind: [_unbindEvent], + caches: [_initCache], + nodes: [_initNode], + proxys: [_eventProxy], + roots: [_initRoot], + beforeA: [], + afterA: [], + innerBeforeA: [], + innerAfterA: [], + zTreeTools: [] + }, + //method of operate data + data = { + addNodeCache: function(setting, node) { + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; + }, + getNodeCacheId: function(tId) { + return tId.substring(tId.lastIndexOf("_")+1); + }, + addAfterA: function(afterA) { + _init.afterA.push(afterA); + }, + addBeforeA: function(beforeA) { + _init.beforeA.push(beforeA); + }, + addInnerAfterA: function(innerAfterA) { + _init.innerAfterA.push(innerAfterA); + }, + addInnerBeforeA: function(innerBeforeA) { + _init.innerBeforeA.push(innerBeforeA); + }, + addInitBind: function(bindEvent) { + _init.bind.push(bindEvent); + }, + addInitUnBind: function(unbindEvent) { + _init.unbind.push(unbindEvent); + }, + addInitCache: function(initCache) { + _init.caches.push(initCache); + }, + addInitNode: function(initNode) { + _init.nodes.push(initNode); + }, + addInitProxy: function(initProxy, isFirst) { + if (!!isFirst) { + _init.proxys.splice(0,0,initProxy); + } else { + _init.proxys.push(initProxy); + } + }, + addInitRoot: function(initRoot) { + _init.roots.push(initRoot); + }, + addNodesData: function(setting, parentNode, nodes) { + var childKey = setting.data.key.children; + if (!parentNode[childKey]) parentNode[childKey] = []; + if (parentNode[childKey].length > 0) { + parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; + view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); + } + parentNode.isParent = true; + parentNode[childKey] = parentNode[childKey].concat(nodes); + }, + addSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + if (!data.isSelectedNode(setting, node)) { + root.curSelectedList.push(node); + } + }, + addCreatedNode: function(setting, node) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + root.createdNodes.push(node); + } + }, + addZTreeTools: function(zTreeTools) { + _init.zTreeTools.push(zTreeTools); + }, + exSetting: function(s) { + $.extend(true, _setting, s); + }, + fixPIdKeyValue: function(setting, node) { + if (setting.data.simpleData.enable) { + node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; + } + }, + getAfterA: function(setting, node, array) { + for (var i=0, j=_init.afterA.length; i<j; i++) { + _init.afterA[i].apply(this, arguments); + } + }, + getBeforeA: function(setting, node, array) { + for (var i=0, j=_init.beforeA.length; i<j; i++) { + _init.beforeA[i].apply(this, arguments); + } + }, + getInnerAfterA: function(setting, node, array) { + for (var i=0, j=_init.innerAfterA.length; i<j; i++) { + _init.innerAfterA[i].apply(this, arguments); + } + }, + getInnerBeforeA: function(setting, node, array) { + for (var i=0, j=_init.innerBeforeA.length; i<j; i++) { + _init.innerBeforeA[i].apply(this, arguments); + } + }, + getCache: function(setting) { + return caches[setting.treeId]; + }, + getNextNode: function(setting, node) { + if (!node) return null; + var childKey = setting.data.key.children, + p = node.parentTId ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l=p[childKey].length-1; i<=l; i++) { + if (p[childKey][i] === node) { + return (i==l ? null : p[childKey][i+1]); + } + } + return null; + }, + getNodeByParam: function(setting, nodes, key, value) { + if (!nodes || !key) return null; + var childKey = setting.data.key.children; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i][key] == value) { + return nodes[i]; + } + var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value); + if (tmp) return tmp; + } + return null; + }, + getNodeCache: function(setting, tId) { + if (!tId) return null; + var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; + return n ? n : null; + }, + getNodeName: function(setting, node) { + var nameKey = setting.data.key.name; + return "" + node[nameKey]; + }, + getNodeTitle: function(setting, node) { + var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; + return "" + node[t]; + }, + getNodes: function(setting) { + return data.getRoot(setting)[setting.data.key.children]; + }, + getNodesByParam: function(setting, nodes, key, value) { + if (!nodes || !key) return []; + var childKey = setting.data.key.children, + result = []; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i][key] == value) { + result.push(nodes[i]); + } + result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value)); + } + return result; + }, + getNodesByParamFuzzy: function(setting, nodes, key, value) { + if (!nodes || !key) return []; + var childKey = setting.data.key.children, + result = []; + value = value.toLowerCase(); + for (var i = 0, l = nodes.length; i < l; i++) { + if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) { + result.push(nodes[i]); + } + result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); + } + return result; + }, + getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { + if (!nodes) return (isSingle ? null : []); + var childKey = setting.data.key.children, + result = isSingle ? null : []; + for (var i = 0, l = nodes.length; i < l; i++) { + if (tools.apply(filter, [nodes[i], invokeParam], false)) { + if (isSingle) {return nodes[i];} + result.push(nodes[i]); + } + var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); + if (isSingle && !!tmpResult) {return tmpResult;} + result = isSingle ? tmpResult : result.concat(tmpResult); + } + return result; + }, + getPreNode: function(setting, node) { + if (!node) return null; + var childKey = setting.data.key.children, + p = node.parentTId ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l=p[childKey].length; i<l; i++) { + if (p[childKey][i] === node) { + return (i==0 ? null : p[childKey][i-1]); + } + } + return null; + }, + getRoot: function(setting) { + return setting ? roots[setting.treeId] : null; + }, + getRoots: function() { + return roots; + }, + getSetting: function(treeId) { + return settings[treeId]; + }, + getSettings: function() { + return settings; + }, + getZTreeTools: function(treeId) { + var r = this.getRoot(this.getSetting(treeId)); + return r ? r.treeTools : null; + }, + initCache: function(setting) { + for (var i=0, j=_init.caches.length; i<j; i++) { + _init.caches[i].apply(this, arguments); + } + }, + initNode: function(setting, level, node, parentNode, preNode, nextNode) { + for (var i=0, j=_init.nodes.length; i<j; i++) { + _init.nodes[i].apply(this, arguments); + } + }, + initRoot: function(setting) { + for (var i=0, j=_init.roots.length; i<j; i++) { + _init.roots[i].apply(this, arguments); + } + }, + isSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + for (var i=0, j=root.curSelectedList.length; i<j; i++) { + if(node === root.curSelectedList[i]) return true; + } + return false; + }, + removeNodeCache: function(setting, node) { + var childKey = setting.data.key.children; + if (node[childKey]) { + for (var i=0, l=node[childKey].length; i<l; i++) { + arguments.callee(setting, node[childKey][i]); + } + } + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; + }, + removeSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + for (var i=0, j=root.curSelectedList.length; i<j; i++) { + if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { + root.curSelectedList.splice(i, 1); + i--;j--; + } + } + }, + setCache: function(setting, cache) { + caches[setting.treeId] = cache; + }, + setRoot: function(setting, root) { + roots[setting.treeId] = root; + }, + setZTreeTools: function(setting, zTreeTools) { + for (var i=0, j=_init.zTreeTools.length; i<j; i++) { + _init.zTreeTools[i].apply(this, arguments); + } + }, + transformToArrayFormat: function (setting, nodes) { + if (!nodes) return []; + var childKey = setting.data.key.children, + r = []; + if (tools.isArray(nodes)) { + for (var i=0, l=nodes.length; i<l; i++) { + r.push(nodes[i]); + if (nodes[i][childKey]) + r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey])); + } + } else { + r.push(nodes); + if (nodes[childKey]) + r = r.concat(data.transformToArrayFormat(setting, nodes[childKey])); + } + return r; + }, + transformTozTreeFormat: function(setting, sNodes) { + var i,l, + key = setting.data.simpleData.idKey, + parentKey = setting.data.simpleData.pIdKey, + childKey = setting.data.key.children; + if (!key || key=="" || !sNodes) return []; + + if (tools.isArray(sNodes)) { + var r = []; + var tmpMap = []; + for (i=0, l=sNodes.length; i<l; i++) { + tmpMap[sNodes[i][key]] = sNodes[i]; + } + for (i=0, l=sNodes.length; i<l; i++) { + if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) { + if (!tmpMap[sNodes[i][parentKey]][childKey]) + tmpMap[sNodes[i][parentKey]][childKey] = []; + tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]); + } else { + r.push(sNodes[i]); + } + } + return r; + }else { + return [sNodes]; + } + } + }, + //method of event proxy + event = { + bindEvent: function(setting) { + for (var i=0, j=_init.bind.length; i<j; i++) { + _init.bind[i].apply(this, arguments); + } + }, + unbindEvent: function(setting) { + for (var i=0, j=_init.unbind.length; i<j; i++) { + _init.unbind[i].apply(this, arguments); + } + }, + bindTree: function(setting) { + var eventParam = { + treeId: setting.treeId + }, + o = setting.treeObj; + if (!setting.view.txtSelectedEnable) { + // for can't select text + o.bind('selectstart', function(e){ + var node + var n = e.originalEvent.srcElement.nodeName.toLowerCase(); + return (n === "input" || n === "textarea" ); + }).css({ + "-moz-user-select":"-moz-none" + }); + } + o.bind('click', eventParam, event.proxy); + o.bind('dblclick', eventParam, event.proxy); + o.bind('mouseover', eventParam, event.proxy); + o.bind('mouseout', eventParam, event.proxy); + o.bind('mousedown', eventParam, event.proxy); + o.bind('mouseup', eventParam, event.proxy); + o.bind('contextmenu', eventParam, event.proxy); + }, + unbindTree: function(setting) { + var o = setting.treeObj; + o.unbind('click', event.proxy) + .unbind('dblclick', event.proxy) + .unbind('mouseover', event.proxy) + .unbind('mouseout', event.proxy) + .unbind('mousedown', event.proxy) + .unbind('mouseup', event.proxy) + .unbind('contextmenu', event.proxy); + }, + doProxy: function(e) { + var results = []; + for (var i=0, j=_init.proxys.length; i<j; i++) { + var proxyResult = _init.proxys[i].apply(this, arguments); + results.push(proxyResult); + if (proxyResult.stop) { + break; + } + } + return results; + }, + proxy: function(e) { + var setting = data.getSetting(e.data.treeId); + if (!tools.uCanDo(setting, e)) return true; + var results = event.doProxy(e), + r = true, x = false; + for (var i=0, l=results.length; i<l; i++) { + var proxyResult = results[i]; + if (proxyResult.nodeEventCallback) { + x = true; + r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + if (proxyResult.treeEventCallback) { + x = true; + r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + } + return r; + } + }, + //method of event handler + handler = { + onSwitchNode: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (node.open) { + if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } else { + if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } + return true; + }, + onClickNode: function (event, node) { + var setting = data.getSetting(event.data.treeId), + clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; + if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; + if (clickFlag === 0) { + view.cancelPreSelectedNode(setting, node); + } else { + view.selectNode(setting, node, clickFlag === 2); + } + setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); + return true; + }, + onZTreeMousedown: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); + } + return true; + }, + onZTreeMouseup: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); + } + return true; + }, + onZTreeDblclick: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); + } + return true; + }, + onZTreeContextmenu: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); + } + return (typeof setting.callback.onRightClick) != "function"; + } + }, + //method of tools for zTree + tools = { + apply: function(fun, param, defaultValue) { + if ((typeof fun) == "function") { + return fun.apply(zt, param?param:[]); + } + return defaultValue; + }, + canAsync: function(setting, node) { + var childKey = setting.data.key.children; + return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0))); + }, + clone: function (obj){ + if (obj === null) return null; + var o = tools.isArray(obj) ? [] : {}; + for(var i in obj){ + o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); + } + return o; + }, + eqs: function(str1, str2) { + return str1.toLowerCase() === str2.toLowerCase(); + }, + isArray: function(arr) { + return Object.prototype.toString.apply(arr) === "[object Array]"; + }, + $: function(node, exp, setting) { + if (!!exp && typeof exp != "string") { + setting = exp; + exp = ""; + } + if (typeof node == "string") { + return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); + } else { + return $("#" + node.tId + exp, setting ? setting.treeObj : null); + } + }, + getMDom: function (setting, curDom, targetExpr) { + if (!curDom) return null; + while (curDom && curDom.id !== setting.treeId) { + for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) { + if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { + return curDom; + } + } + curDom = curDom.parentNode; + } + return null; + }, + getNodeMainDom:function(target) { + return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); + }, + isChildOrSelf: function(dom, parentId) { + return ( $(dom).closest("#" + parentId).length> 0 ); + }, + uCanDo: function(setting, e) { + return true; + } + }, + //method of operate ztree dom + view = { + addNodes: function(setting, parentNode, newNodes, isSilent) { + if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { + return; + } + if (!tools.isArray(newNodes)) { + newNodes = [newNodes]; + } + if (setting.data.simpleData.enable) { + newNodes = data.transformTozTreeFormat(setting, newNodes); + } + if (parentNode) { + var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), + target_icoObj = $$(parentNode, consts.id.ICON, setting), + target_ulObj = $$(parentNode, consts.id.UL, setting); + + if (!parentNode.open) { + view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); + view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); + parentNode.open = false; + target_ulObj.css({ + "display": "none" + }); + } + + data.addNodesData(setting, parentNode, newNodes); + view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); + if (!isSilent) { + view.expandCollapseParentNode(setting, parentNode, true); + } + } else { + data.addNodesData(setting, data.getRoot(setting), newNodes); + view.createNodes(setting, 0, newNodes, null); + } + }, + appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { + if (!nodes) return []; + var html = [], + childKey = setting.data.key.children; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (initFlag) { + var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), + tmpPChild = tmpPNode[childKey], + isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), + isLastNode = (i == (nodes.length - 1)); + data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); + data.addNodeCache(setting, node); + } + + var childHtml = []; + if (node[childKey] && node[childKey].length > 0) { + //make child html first, because checkType + childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); + } + if (openFlag) { + + view.makeDOMNodeMainBefore(html, setting, node); + view.makeDOMNodeLine(html, setting, node); + data.getBeforeA(setting, node, html); + view.makeDOMNodeNameBefore(html, setting, node); + data.getInnerBeforeA(setting, node, html); + view.makeDOMNodeIcon(html, setting, node); + data.getInnerAfterA(setting, node, html); + view.makeDOMNodeNameAfter(html, setting, node); + data.getAfterA(setting, node, html); + if (node.isParent && node.open) { + view.makeUlHtml(setting, node, html, childHtml.join('')); + } + view.makeDOMNodeMainAfter(html, setting, node); + data.addCreatedNode(setting, node); + } + } + return html; + }, + appendParentULDom: function(setting, node) { + var html = [], + nObj = $$(node, setting); + if (!nObj.get(0) && !!node.parentTId) { + view.appendParentULDom(setting, node.getParentNode()); + nObj = $$(node, setting); + } + var ulObj = $$(node, consts.id.UL, setting); + if (ulObj.get(0)) { + ulObj.remove(); + } + var childKey = setting.data.key.children, + childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); + view.makeUlHtml(setting, node, html, childHtml.join('')); + nObj.append(html.join('')); + }, + asyncNode: function(setting, node, isSilent, callback) { + var i, l; + if (node && !node.isParent) { + tools.apply(callback); + return false; + } else if (node && node.isAjaxing) { + return false; + } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { + tools.apply(callback); + return false; + } + if (node) { + node.isAjaxing = true; + var icoObj = $$(node, consts.id.ICON, setting); + icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); + } + + var tmpParam = {}; + for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { + var pKey = setting.async.autoParam[i].split("="), spKey = pKey; + if (pKey.length>1) { + spKey = pKey[1]; + pKey = pKey[0]; + } + tmpParam[spKey] = node[pKey]; + } + if (tools.isArray(setting.async.otherParam)) { + for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { + tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; + } + } else { + for (var p in setting.async.otherParam) { + tmpParam[p] = setting.async.otherParam[p]; + } + } + + var _tmpV = data.getRoot(setting)._ver; + $.ajax({ + contentType: setting.async.contentType, + cache: false, + type: setting.async.type, + url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), + data: tmpParam, + dataType: setting.async.dataType, + success: function(msg) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + var newNodes = []; + try { + if (!msg || msg.length == 0) { + newNodes = []; + } else if (typeof msg == "string") { + newNodes = eval("(" + msg + ")"); + } else { + newNodes = msg; + } + } catch(err) { + newNodes = msg; + } + + if (node) { + node.isAjaxing = null; + node.zAsync = true; + } + view.setNodeLineIcos(setting, node); + if (newNodes && newNodes !== "") { + newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); + view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); + } else { + view.addNodes(setting, node, [], !!isSilent); + } + setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); + tools.apply(callback); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + if (node) node.isAjaxing = null; + view.setNodeLineIcos(setting, node); + setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); + } + }); + return true; + }, + cancelPreSelectedNode: function (setting, node, excludeNode) { + var list = data.getRoot(setting).curSelectedList, + i, n; + for (i=list.length-1; i>=0; i--) { + n = list[i]; + if (node === n || (!node && (!excludeNode || excludeNode !== n))) { + $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); + if (node) { + data.removeSelectedNode(setting, node); + setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); + break; + } else { + list.splice(i, 1); + setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); + } + } + } + }, + createNodeCallback: function(setting) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + while (root.createdNodes.length>0) { + var node = root.createdNodes.shift(); + tools.apply(setting.view.addDiyDom, [setting.treeId, node]); + if (!!setting.callback.onNodeCreated) { + setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); + } + } + } + }, + createNodes: function(setting, level, nodes, parentNode) { + if (!nodes || nodes.length == 0) return; + var root = data.getRoot(setting), + childKey = setting.data.key.children, + openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); + root.createdNodes = []; + var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); + if (!parentNode) { + setting.treeObj.append(zTreeHtml.join('')); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + if (ulObj.get(0)) { + ulObj.append(zTreeHtml.join('')); + } + } + view.createNodeCallback(setting); + }, + destroy: function(setting) { + if (!setting) return; + data.initCache(setting); + data.initRoot(setting); + event.unbindTree(setting); + event.unbindEvent(setting); + setting.treeObj.empty(); + delete settings[setting.treeId]; + }, + expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting), + childKey = setting.data.key.children; + if (!node) { + tools.apply(callback, []); + return; + } + if (root.expandTriggerFlag) { + var _callback = callback; + callback = function(){ + if (_callback) _callback(); + if (node.open) { + setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); + } else { + setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); + } + }; + root.expandTriggerFlag = false; + } + if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { + view.appendParentULDom(setting, node); + view.createNodeCallback(setting); + } + if (node.open == expandFlag) { + tools.apply(callback, []); + return; + } + var ulObj = $$(node, consts.id.UL, setting), + switchObj = $$(node, consts.id.SWITCH, setting), + icoObj = $$(node, consts.id.ICON, setting); + + if (node.isParent) { + node.open = !node.open; + if (node.iconOpen && node.iconClose) { + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + } + + if (node.open) { + view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); + view.replaceIcoClass(node, icoObj, consts.folder.OPEN); + if (animateFlag == false || setting.view.expandSpeed == "") { + ulObj.show(); + tools.apply(callback, []); + } else { + if (node[childKey] && node[childKey].length > 0) { + ulObj.slideDown(setting.view.expandSpeed, callback); + } else { + ulObj.show(); + tools.apply(callback, []); + } + } + } else { + view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); + view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); + if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { + ulObj.hide(); + tools.apply(callback, []); + } else { + ulObj.slideUp(setting.view.expandSpeed, callback); + } + } + } else { + tools.apply(callback, []); + } + }, + expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { + if (!node) return; + if (!node.parentTId) { + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); + return; + } else { + view.expandCollapseNode(setting, node, expandFlag, animateFlag); + } + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); + } + }, + expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting), + childKey = setting.data.key.children, + treeNodes = (node) ? node[childKey]: root[childKey], + selfAnimateSign = (node) ? false : animateFlag, + expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; + data.getRoot(setting).expandTriggerFlag = false; + if (treeNodes) { + for (var i = 0, l = treeNodes.length; i < l; i++) { + if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); + } + } + data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); + }, + isSelectedNode: function (setting, node) { + if (!node) { + return false; + } + var list = data.getRoot(setting).curSelectedList, + i; + for (i=list.length-1; i>=0; i--) { + if (node === list[i]) { + return true; + } + } + return false; + }, + makeDOMNodeIcon: function(html, setting, node) { + var nameStr = data.getNodeName(setting, node), + name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + html.push("<span id='", node.tId, consts.id.ICON, + "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), + "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, + "'>",name,"</span>"); + }, + makeDOMNodeLine: function(html, setting, node) { + html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>"); + }, + makeDOMNodeMainAfter: function(html, setting, node) { + html.push("</li>"); + }, + makeDOMNodeMainBefore: function(html, setting, node) { + html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>"); + }, + makeDOMNodeNameAfter: function(html, setting, node) { + html.push("</a>"); + }, + makeDOMNodeNameBefore: function(html, setting, node) { + var title = data.getNodeTitle(setting, node), + url = view.makeNodeUrl(setting, node), + fontcss = view.makeNodeFontCss(setting, node), + fontStyle = []; + for (var f in fontcss) { + fontStyle.push(f, ":", fontcss[f], ";"); + } + html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''), + "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), + "'"); + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");} + html.push(">"); + }, + makeNodeFontCss: function(setting, node) { + var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); + return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; + }, + makeNodeIcoClass: function(setting, node) { + var icoCss = ["ico"]; + if (!node.isAjaxing) { + icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; + if (node.isParent) { + icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + icoCss.push(consts.folder.DOCU); + } + } + return consts.className.BUTTON + " " + icoCss.join('_'); + }, + makeNodeIcoStyle: function(setting, node) { + var icoStyle = []; + if (!node.isAjaxing) { + var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; + if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); + if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { + icoStyle.push("width:0px;height:0px;"); + } + } + return icoStyle.join(''); + }, + makeNodeLineClass: function(setting, node) { + var lineClass = []; + if (setting.view.showLine) { + if (node.level == 0 && node.isFirstNode && node.isLastNode) { + lineClass.push(consts.line.ROOT); + } else if (node.level == 0 && node.isFirstNode) { + lineClass.push(consts.line.ROOTS); + } else if (node.isLastNode) { + lineClass.push(consts.line.BOTTOM); + } else { + lineClass.push(consts.line.CENTER); + } + } else { + lineClass.push(consts.line.NOLINE); + } + if (node.isParent) { + lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + lineClass.push(consts.folder.DOCU); + } + return view.makeNodeLineClassEx(node) + lineClass.join('_'); + }, + makeNodeLineClassEx: function(node) { + return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; + }, + makeNodeTarget: function(node) { + return (node.target || "_blank"); + }, + makeNodeUrl: function(setting, node) { + var urlKey = setting.data.key.url; + return node[urlKey] ? node[urlKey] : null; + }, + makeUlHtml: function(setting, node, html, content) { + html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>"); + html.push(content); + html.push("</ul>"); + }, + makeUlLineClass: function(setting, node) { + return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); + }, + removeChildNodes: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children, + nodes = node[childKey]; + if (!nodes) return; + + for (var i = 0, l = nodes.length; i < l; i++) { + data.removeNodeCache(setting, nodes[i]); + } + data.removeSelectedNode(setting); + delete node[childKey]; + + if (!setting.data.keep.parent) { + node.isParent = false; + node.open = false; + var tmp_switchObj = $$(node, consts.id.SWITCH, setting), + tmp_icoObj = $$(node, consts.id.ICON, setting); + view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); + $$(node, consts.id.UL, setting).remove(); + } else { + $$(node, consts.id.UL, setting).empty(); + } + }, + setFirstNode: function(setting, parentNode) { + var childKey = setting.data.key.children, childLength = parentNode[childKey].length; + if ( childLength > 0) { + parentNode[childKey][0].isFirstNode = true; + } + }, + setLastNode: function(setting, parentNode) { + var childKey = setting.data.key.children, childLength = parentNode[childKey].length; + if ( childLength > 0) { + parentNode[childKey][childLength - 1].isLastNode = true; + } + }, + removeNode: function(setting, node) { + var root = data.getRoot(setting), + childKey = setting.data.key.children, + parentNode = (node.parentTId) ? node.getParentNode() : root; + + node.isFirstNode = false; + node.isLastNode = false; + node.getPreNode = function() {return null;}; + node.getNextNode = function() {return null;}; + + if (!data.getNodeCache(setting, node.tId)) { + return; + } + + $$(node, setting).remove(); + data.removeNodeCache(setting, node); + data.removeSelectedNode(setting, node); + + for (var i = 0, l = parentNode[childKey].length; i < l; i++) { + if (parentNode[childKey][i].tId == node.tId) { + parentNode[childKey].splice(i, 1); + break; + } + } + view.setFirstNode(setting, parentNode); + view.setLastNode(setting, parentNode); + + var tmp_ulObj,tmp_switchObj,tmp_icoObj, + childLength = parentNode[childKey].length; + + //repair nodes old parent + if (!setting.data.keep.parent && childLength == 0) { + //old parentNode has no child nodes + parentNode.isParent = false; + parentNode.open = false; + tmp_ulObj = $$(parentNode, consts.id.UL, setting); + tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); + tmp_icoObj = $$(parentNode, consts.id.ICON, setting); + view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); + tmp_ulObj.css("display", "none"); + + } else if (setting.view.showLine && childLength > 0) { + //old parentNode has child nodes + var newLast = parentNode[childKey][childLength - 1]; + tmp_ulObj = $$(newLast, consts.id.UL, setting); + tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); + tmp_icoObj = $$(newLast, consts.id.ICON, setting); + if (parentNode == root) { + if (parentNode[childKey].length == 1) { + //node was root, and ztree has only one root after move node + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); + } else { + var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); + view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + } else { + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + tmp_ulObj.removeClass(consts.line.LINE); + } + }, + replaceIcoClass: function(node, obj, newName) { + if (!obj || node.isAjaxing) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[tmpList.length-1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + }, + replaceSwitchClass: function(node, obj, newName) { + if (!obj) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.line.ROOT: + case consts.line.ROOTS: + case consts.line.CENTER: + case consts.line.BOTTOM: + case consts.line.NOLINE: + tmpList[0] = view.makeNodeLineClassEx(node) + newName; + break; + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + if (newName !== consts.folder.DOCU) { + obj.removeAttr("disabled"); + } else { + obj.attr("disabled", "disabled"); + } + }, + selectNode: function(setting, node, addFlag) { + if (!addFlag) { + view.cancelPreSelectedNode(setting, null, node); + } + $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); + data.addSelectedNode(setting, node); + setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); + }, + setNodeFontCss: function(setting, treeNode) { + var aObj = $$(treeNode, consts.id.A, setting), + fontCss = view.makeNodeFontCss(setting, treeNode); + if (fontCss) { + aObj.css(fontCss); + } + }, + setNodeLineIcos: function(setting, node) { + if (!node) return; + var switchObj = $$(node, consts.id.SWITCH, setting), + ulObj = $$(node, consts.id.UL, setting), + icoObj = $$(node, consts.id.ICON, setting), + ulLine = view.makeUlLineClass(setting, node); + if (ulLine.length==0) { + ulObj.removeClass(consts.line.LINE); + } else { + ulObj.addClass(ulLine); + } + switchObj.attr("class", view.makeNodeLineClass(setting, node)); + if (node.isParent) { + switchObj.removeAttr("disabled"); + } else { + switchObj.attr("disabled", "disabled"); + } + icoObj.removeAttr("style"); + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + icoObj.attr("class", view.makeNodeIcoClass(setting, node)); + }, + setNodeName: function(setting, node) { + var title = data.getNodeTitle(setting, node), + nObj = $$(node, consts.id.SPAN, setting); + nObj.empty(); + if (setting.view.nameIsHTML) { + nObj.html(data.getNodeName(setting, node)); + } else { + nObj.text(data.getNodeName(setting, node)); + } + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("title", !title ? "" : title); + } + }, + setNodeTarget: function(setting, node) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("target", view.makeNodeTarget(node)); + }, + setNodeUrl: function(setting, node) { + var aObj = $$(node, consts.id.A, setting), + url = view.makeNodeUrl(setting, node); + if (url == null || url.length == 0) { + aObj.removeAttr("href"); + } else { + aObj.attr("href", url); + } + }, + switchNode: function(setting, node) { + if (node.open || !tools.canAsync(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + } else if (setting.async.enable) { + if (!view.asyncNode(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + return; + } + } else if (node) { + view.expandCollapseNode(setting, node, !node.open); + } + } + }; + // zTree defind + $.fn.zTree = { + consts : _consts, + _z : { + tools: tools, + view: view, + event: event, + data: data + }, + getZTreeObj: function(treeId) { + var o = data.getZTreeTools(treeId); + return o ? o : null; + }, + destroy: function(treeId) { + if (!!treeId && treeId.length > 0) { + view.destroy(data.getSetting(treeId)); + } else { + for(var s in settings) { + view.destroy(settings[s]); + } + } + }, + init: function(obj, zSetting, zNodes) { + var setting = tools.clone(_setting); + $.extend(true, setting, zSetting); + setting.treeId = obj.attr("id"); + setting.treeObj = obj; + setting.treeObj.empty(); + settings[setting.treeId] = setting; + //For some older browser,(e.g., ie6) + if(typeof document.body.style.maxHeight === "undefined") { + setting.view.expandSpeed = ""; + } + data.initRoot(setting); + var root = data.getRoot(setting), + childKey = setting.data.key.children; + zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; + if (setting.data.simpleData.enable) { + root[childKey] = data.transformTozTreeFormat(setting, zNodes); + } else { + root[childKey] = zNodes; + } + + data.initCache(setting); + event.unbindTree(setting); + event.bindTree(setting); + event.unbindEvent(setting); + event.bindEvent(setting); + + var zTreeTools = { + setting : setting, + addNodes : function(parentNode, newNodes, isSilent) { + if (!newNodes) return null; + if (!parentNode) parentNode = null; + if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; + var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); + function addCallback() { + view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); + } + + if (tools.canAsync(setting, parentNode)) { + view.asyncNode(setting, parentNode, isSilent, addCallback); + } else { + addCallback(); + } + return xNewNodes; + }, + cancelSelectedNode : function(node) { + view.cancelPreSelectedNode(setting, node); + }, + destroy : function() { + view.destroy(setting); + }, + expandAll : function(expandFlag) { + expandFlag = !!expandFlag; + view.expandCollapseSonNode(setting, null, expandFlag, true); + return expandFlag; + }, + expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { + if (!node || !node.isParent) return null; + if (expandFlag !== true && expandFlag !== false) { + expandFlag = !node.open; + } + callbackFlag = !!callbackFlag; + + if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { + return null; + } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { + return null; + } + if (expandFlag && node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); + } + if (expandFlag === node.open && !sonSign) { + return null; + } + + data.getRoot(setting).expandTriggerFlag = callbackFlag; + if (!tools.canAsync(setting, node) && sonSign) { + view.expandCollapseSonNode(setting, node, expandFlag, true, function() { + if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} + }); + } else { + node.open = !expandFlag; + view.switchNode(this.setting, node); + if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} + } + return expandFlag; + }, + getNodes : function() { + return data.getNodes(setting); + }, + getNodeByParam : function(key, value, parentNode) { + if (!key) return null; + return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodeByTId : function(tId) { + return data.getNodeCache(setting, tId); + }, + getNodesByParam : function(key, value, parentNode) { + if (!key) return null; + return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodesByParamFuzzy : function(key, value, parentNode) { + if (!key) return null; + return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { + isSingle = !!isSingle; + if (!filter || (typeof filter != "function")) return (isSingle ? null : []); + return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); + }, + getNodeIndex : function(node) { + if (!node) return null; + var childKey = setting.data.key.children, + parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l = parentNode[childKey].length; i < l; i++) { + if (parentNode[childKey][i] == node) return i; + } + return -1; + }, + getSelectedNodes : function() { + var r = [], list = data.getRoot(setting).curSelectedList; + for (var i=0, l=list.length; i<l; i++) { + r.push(list[i]); + } + return r; + }, + isSelectedNode : function(node) { + return data.isSelectedNode(setting, node); + }, + reAsyncChildNodes : function(parentNode, reloadType, isSilent) { + if (!this.setting.async.enable) return; + var isRoot = !parentNode; + if (isRoot) { + parentNode = data.getRoot(setting); + } + if (reloadType=="refresh") { + var childKey = this.setting.data.key.children; + for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) { + data.removeNodeCache(setting, parentNode[childKey][i]); + } + data.removeSelectedNode(setting); + parentNode[childKey] = []; + if (isRoot) { + this.setting.treeObj.empty(); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + ulObj.empty(); + } + } + view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent); + }, + refresh : function() { + this.setting.treeObj.empty(); + var root = data.getRoot(setting), + nodes = root[setting.data.key.children] + data.initRoot(setting); + root[setting.data.key.children] = nodes + data.initCache(setting); + view.createNodes(setting, 0, root[setting.data.key.children]); + }, + removeChildNodes : function(node) { + if (!node) return null; + var childKey = setting.data.key.children, + nodes = node[childKey]; + view.removeChildNodes(setting, node); + return nodes ? nodes : null; + }, + removeNode : function(node, callbackFlag) { + if (!node) return; + callbackFlag = !!callbackFlag; + if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; + view.removeNode(setting, node); + if (callbackFlag) { + this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); + } + }, + selectNode : function(node, addFlag) { + if (!node) return; + if (tools.uCanDo(setting)) { + addFlag = setting.view.selectedMulti && addFlag; + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() { + try{$$(node, setting).focus().blur();}catch(e){} + }); + } else { + try{$$(node, setting).focus().blur();}catch(e){} + } + view.selectNode(setting, node, addFlag); + } + }, + transformTozTreeNodes : function(simpleNodes) { + return data.transformTozTreeFormat(setting, simpleNodes); + }, + transformToArray : function(nodes) { + return data.transformToArrayFormat(setting, nodes); + }, + updateNode : function(node, checkTypeFlag) { + if (!node) return; + var nObj = $$(node, setting); + if (nObj.get(0) && tools.uCanDo(setting)) { + view.setNodeName(setting, node); + view.setNodeTarget(setting, node); + view.setNodeUrl(setting, node); + view.setNodeLineIcos(setting, node); + view.setNodeFontCss(setting, node); + } + } + } + root.treeTools = zTreeTools; + data.setZTreeTools(setting, zTreeTools); + + if (root[childKey] && root[childKey].length > 0) { + view.createNodes(setting, 0, root[childKey]); + } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { + view.asyncNode(setting); + } + return zTreeTools; + } + }; + + var zt = $.fn.zTree, + $$ = tools.$, + consts = zt.consts; +})(jQuery);/* + * JQuery zTree excheck v3.5.18 + * http://zTree.me/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * email: hunter.z@263.net + * Date: 2015-06-18 + */ +(function($){ + //default consts of excheck + var _consts = { + event: { + CHECK: "ztree_check" + }, + id: { + CHECK: "_check" + }, + checkbox: { + STYLE: "checkbox", + DEFAULT: "chk", + DISABLED: "disable", + FALSE: "false", + TRUE: "true", + FULL: "full", + PART: "part", + FOCUS: "focus" + }, + radio: { + STYLE: "radio", + TYPE_ALL: "all", + TYPE_LEVEL: "level" + } + }, + //default setting of excheck + _setting = { + check: { + enable: false, + autoCheckTrigger: false, + chkStyle: _consts.checkbox.STYLE, + nocheckInherit: false, + chkDisabledInherit: false, + radioType: _consts.radio.TYPE_LEVEL, + chkboxType: { + "Y": "ps", + "N": "ps" + } + }, + data: { + key: { + checked: "checked" + } + }, + callback: { + beforeCheck:null, + onCheck:null + } + }, + //default root of excheck + _initRoot = function (setting) { + var r = data.getRoot(setting); + r.radioCheckedList = []; + }, + //default cache of excheck + _initCache = function(treeId) {}, + //default bind event of excheck + _bindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.bind(c.CHECK, function (event, srcEvent, treeId, node) { + event.srcEvent = srcEvent; + tools.apply(setting.callback.onCheck, [event, treeId, node]); + }); + }, + _unbindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.unbind(c.CHECK); + }, + //default event proxy of excheck + _eventProxy = function(e) { + var target = e.target, + setting = data.getSetting(e.data.treeId), + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null; + + if (tools.eqs(e.type, "mouseover")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "mouseoverCheck"; + } + } else if (tools.eqs(e.type, "mouseout")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "mouseoutCheck"; + } + } else if (tools.eqs(e.type, "click")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "checkNode"; + } + } + if (tId.length>0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "checkNode" : + nodeEventCallback = _handler.onCheckNode; + break; + case "mouseoverCheck" : + nodeEventCallback = _handler.onMouseoverCheck; + break; + case "mouseoutCheck" : + nodeEventCallback = _handler.onMouseoutCheck; + break; + } + } + var proxyResult = { + stop: nodeEventType === "checkNode", + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of excheck + _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + var checkedKey = setting.data.key.checked; + if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); + n[checkedKey] = !!n[checkedKey]; + n.checkedOld = n[checkedKey]; + if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); + n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); + if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); + n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); + if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); + n.halfCheck = !!n.halfCheck; + n.check_Child_State = -1; + n.check_Focus = false; + n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; + + if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { + var r = data.getRoot(setting); + r.radioCheckedList.push(n); + } + }, + //add dom for check + _beforeA = function(setting, node, html) { + var checkedKey = setting.data.key.checked; + if (setting.check.enable) { + data.makeChkFlag(setting, node); + html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>"); + } + }, + //update zTreeObj, add method of check + _zTreeTools = function(setting, zTreeTools) { + zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { + var checkedKey = this.setting.data.key.checked; + if (node.chkDisabled === true) return; + if (checked !== true && checked !== false) { + checked = !node[checkedKey]; + } + callbackFlag = !!callbackFlag; + + if (node[checkedKey] === checked && !checkTypeFlag) { + return; + } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { + return; + } + if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { + node[checkedKey] = checked; + var checkObj = $$(node, consts.id.CHECK, this.setting); + if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); + view.setChkClass(this.setting, checkObj, node); + view.repairParentChkClassWithSelf(this.setting, node); + if (callbackFlag) { + this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); + } + } + } + + zTreeTools.checkAllNodes = function(checked) { + view.repairAllChk(this.setting, !!checked); + } + + zTreeTools.getCheckedNodes = function(checked) { + var childKey = this.setting.data.key.children; + checked = (checked !== false); + return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); + } + + zTreeTools.getChangeCheckedNodes = function() { + var childKey = this.setting.data.key.children; + return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); + } + + zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { + disabled = !!disabled; + inheritParent = !!inheritParent; + inheritChildren = !!inheritChildren; + view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); + view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); + } + + var _updateNode = zTreeTools.updateNode; + zTreeTools.updateNode = function(node, checkTypeFlag) { + if (_updateNode) _updateNode.apply(zTreeTools, arguments); + if (!node || !this.setting.check.enable) return; + var nObj = $$(node, this.setting); + if (nObj.get(0) && tools.uCanDo(this.setting)) { + var checkObj = $$(node, consts.id.CHECK, this.setting); + if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); + view.setChkClass(this.setting, checkObj, node); + view.repairParentChkClassWithSelf(this.setting, node); + } + } + }, + //method of operate data + _data = { + getRadioCheckedList: function(setting) { + var checkedList = data.getRoot(setting).radioCheckedList; + for (var i=0, j=checkedList.length; i<j; i++) { + if(!data.getNodeCache(setting, checkedList[i].tId)) { + checkedList.splice(i, 1); + i--; j--; + } + } + return checkedList; + }, + getCheckStatus: function(setting, node) { + if (!setting.check.enable || node.nocheck || node.chkDisabled) return null; + var checkedKey = setting.data.key.checked, + r = { + checked: node[checkedKey], + half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) + }; + return r; + }, + getTreeCheckedNodes: function(setting, nodes, checked, results) { + if (!nodes) return []; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); + results = !results ? [] : results; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { + results.push(nodes[i]); + if(onlyOne) { + break; + } + } + data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); + if(onlyOne && results.length > 0) { + break; + } + } + return results; + }, + getTreeChangeCheckedNodes: function(setting, nodes, results) { + if (!nodes) return []; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked; + results = !results ? [] : results; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { + results.push(nodes[i]); + } + data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); + } + return results; + }, + makeChkFlag: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + chkFlag = -1; + if (node[childKey]) { + for (var i = 0, l = node[childKey].length; i < l; i++) { + var cNode = node[childKey][i]; + var tmp = -1; + if (setting.check.chkStyle == consts.radio.STYLE) { + if (cNode.nocheck === true || cNode.chkDisabled === true) { + tmp = cNode.check_Child_State; + } else if (cNode.halfCheck === true) { + tmp = 2; + } else if (cNode[checkedKey]) { + tmp = 2; + } else { + tmp = cNode.check_Child_State > 0 ? 2:0; + } + if (tmp == 2) { + chkFlag = 2; break; + } else if (tmp == 0){ + chkFlag = 0; + } + } else if (setting.check.chkStyle == consts.checkbox.STYLE) { + if (cNode.nocheck === true || cNode.chkDisabled === true) { + tmp = cNode.check_Child_State; + } else if (cNode.halfCheck === true) { + tmp = 1; + } else if (cNode[checkedKey] ) { + tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; + } else { + tmp = (cNode.check_Child_State > 0) ? 1 : 0; + } + if (tmp === 1) { + chkFlag = 1; break; + } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { + chkFlag = 1; break; + } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { + chkFlag = 1; break; + } else if (tmp > -1) { + chkFlag = tmp; + } + } + } + } + node.check_Child_State = chkFlag; + } + }, + //method of event proxy + _event = { + + }, + //method of event handler + _handler = { + onCheckNode: function (event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkedKey = setting.data.key.checked; + if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; + node[checkedKey] = !node[checkedKey]; + view.checkNodeRelation(setting, node); + var checkObj = $$(node, consts.id.CHECK, setting); + view.setChkClass(setting, checkObj, node); + view.repairParentChkClassWithSelf(setting, node); + setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); + return true; + }, + onMouseoverCheck: function(event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkObj = $$(node, consts.id.CHECK, setting); + node.check_Focus = true; + view.setChkClass(setting, checkObj, node); + return true; + }, + onMouseoutCheck: function(event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkObj = $$(node, consts.id.CHECK, setting); + node.check_Focus = false; + view.setChkClass(setting, checkObj, node); + return true; + } + }, + //method of tools for zTree + _tools = { + + }, + //method of operate ztree dom + _view = { + checkNodeRelation: function(setting, node) { + var pNode, i, l, + childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + r = consts.radio; + if (setting.check.chkStyle == r.STYLE) { + var checkedList = data.getRadioCheckedList(setting); + if (node[checkedKey]) { + if (setting.check.radioType == r.TYPE_ALL) { + for (i = checkedList.length-1; i >= 0; i--) { + pNode = checkedList[i]; + if (pNode[checkedKey] && pNode != node) { + pNode[checkedKey] = false; + checkedList.splice(i, 1); + + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); + if (pNode.parentTId != node.parentTId) { + view.repairParentChkClassWithSelf(setting, pNode); + } + } + } + checkedList.push(node); + } else { + var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + for (i = 0, l = parentNode[childKey].length; i < l; i++) { + pNode = parentNode[childKey][i]; + if (pNode[checkedKey] && pNode != node) { + pNode[checkedKey] = false; + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); + } + } + } + } else if (setting.check.radioType == r.TYPE_ALL) { + for (i = 0, l = checkedList.length; i < l; i++) { + if (node == checkedList[i]) { + checkedList.splice(i, 1); + break; + } + } + } + + } else { + if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, true); + } + if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, false); + } + if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, true); + } + if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, false); + } + } + }, + makeChkClass: function(setting, node) { + var checkedKey = setting.data.key.checked, + c = consts.checkbox, r = consts.radio, + fullStyle = ""; + if (node.chkDisabled === true) { + fullStyle = c.DISABLED; + } else if (node.halfCheck) { + fullStyle = c.PART; + } else if (setting.check.chkStyle == r.STYLE) { + fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; + } else { + fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); + } + var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; + chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; + return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; + }, + repairAllChk: function(setting, checked) { + if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { + var checkedKey = setting.data.key.checked, + childKey = setting.data.key.children, + root = data.getRoot(setting); + for (var i = 0, l = root[childKey].length; i<l ; i++) { + var node = root[childKey][i]; + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = checked; + } + view.setSonNodeCheckBox(setting, node, checked); + } + } + }, + repairChkClass: function(setting, node) { + if (!node) return; + data.makeChkFlag(setting, node); + if (node.nocheck !== true) { + var checkObj = $$(node, consts.id.CHECK, setting); + view.setChkClass(setting, checkObj, node); + } + }, + repairParentChkClass: function(setting, node) { + if (!node || !node.parentTId) return; + var pNode = node.getParentNode(); + view.repairChkClass(setting, pNode); + view.repairParentChkClass(setting, pNode); + }, + repairParentChkClassWithSelf: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children; + if (node[childKey] && node[childKey].length > 0) { + view.repairParentChkClass(setting, node[childKey][0]); + } else { + view.repairParentChkClass(setting, node); + } + }, + repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { + if (!node) return; + var childKey = setting.data.key.children; + if (node.chkDisabled != chkDisabled) { + node.chkDisabled = chkDisabled; + } + view.repairChkClass(setting, node); + if (node[childKey] && inherit) { + for (var i = 0, l = node[childKey].length; i < l; i++) { + var sNode = node[childKey][i]; + view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); + } + } + }, + repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { + if (!node) return; + if (node.chkDisabled != chkDisabled && inherit) { + node.chkDisabled = chkDisabled; + } + view.repairChkClass(setting, node); + view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); + }, + setChkClass: function(setting, obj, node) { + if (!obj) return; + if (node.nocheck === true) { + obj.hide(); + } else { + obj.show(); + } + obj.attr('class', view.makeChkClass(setting, node)); + }, + setParentNodeCheckBox: function(setting, node, value, srcNode) { + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + data.makeChkFlag(setting, node); + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = value; + view.setChkClass(setting, checkObj, node); + if (setting.check.autoCheckTrigger && node != srcNode) { + setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); + } + } + if (node.parentTId) { + var pSign = true; + if (!value) { + var pNodes = node.getParentNode()[childKey]; + for (var i = 0, l = pNodes.length; i < l; i++) { + if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) + || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { + pSign = false; + break; + } + } + } + if (pSign) { + view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); + } + } + }, + setSonNodeCheckBox: function(setting, node, value, srcNode) { + if (!node) return; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + + var hasDisable = false; + if (node[childKey]) { + for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { + var sNode = node[childKey][i]; + view.setSonNodeCheckBox(setting, sNode, value, srcNode); + if (sNode.chkDisabled === true) hasDisable = true; + } + } + + if (node != data.getRoot(setting) && node.chkDisabled !== true) { + if (hasDisable && node.nocheck !== true) { + data.makeChkFlag(setting, node); + } + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = value; + if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; + } else { + node.check_Child_State = -1; + } + view.setChkClass(setting, checkObj, node); + if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { + setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); + } + } + + } + }, + + _z = { + tools: _tools, + view: _view, + event: _event, + data: _data + }; + $.extend(true, $.fn.zTree.consts, _consts); + $.extend(true, $.fn.zTree._z, _z); + + var zt = $.fn.zTree, + tools = zt._z.tools, + consts = zt.consts, + view = zt._z.view, + data = zt._z.data, + event = zt._z.event, + $$ = tools.$; + + data.exSetting(_setting); + data.addInitBind(_bindEvent); + data.addInitUnBind(_unbindEvent); + data.addInitCache(_initCache); + data.addInitNode(_initNode); + data.addInitProxy(_eventProxy, true); + data.addInitRoot(_initRoot); + data.addBeforeA(_beforeA); + data.addZTreeTools(_zTreeTools); + + var _createNodes = view.createNodes; + view.createNodes = function(setting, level, nodes, parentNode) { + if (_createNodes) _createNodes.apply(view, arguments); + if (!nodes) return; + view.repairParentChkClassWithSelf(setting, parentNode); + } + var _removeNode = view.removeNode; + view.removeNode = function(setting, node) { + var parentNode = node.getParentNode(); + if (_removeNode) _removeNode.apply(view, arguments); + if (!node || !parentNode) return; + view.repairChkClass(setting, parentNode); + view.repairParentChkClass(setting, parentNode); + } + + var _appendNodes = view.appendNodes; + view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { + var html = ""; + if (_appendNodes) { + html = _appendNodes.apply(view, arguments); + } + if (parentNode) { + data.makeChkFlag(setting, parentNode); + } + return html; + } })(jQuery); \ No newline at end of file diff --git a/bi/case.js b/bi/case.js index 01949c87c..5a102525e 100644 --- a/bi/case.js +++ b/bi/case.js @@ -1,12444 +1,12444 @@ -/** - * 可以改变图标的button - * - * Created by GUY on 2016/2/2. +/** + * 可以改变图标的button + * + * Created by GUY on 2016/2/2. + * + * @class BI.IconChangeButton + * @extends BI.Single + */ +BI.IconChangeButton = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-icon-change-button", + iconClass: "", + iconWidth: null, + iconHeight: null, + + stopEvent: false, + stopPropagation: false, + selected: false, + once: false, //点击一次选中有效,再点无效 + forceSelected: false, //点击即选中, 选中了就不会被取消 + forceNotSelected: false, //无论怎么点击都不会被选中 + disableSelected: false, //使能选中 + + shadow: false, + isShadowShowingOnSelected: false, //选中状态下是否显示阴影 + trigger: null, + handler: BI.emptyFn + }) + }, + + _init: function () { + BI.IconChangeButton.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.button = BI.createWidget({ + type: "bi.icon_button", + element: this, + cls: o.iconClass, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight, + + stopEvent: o.stopEvent, + stopPropagation: o.stopPropagation, + selected: o.selected, + once: o.once, + forceSelected: o.forceSelected, + forceNotSelected: o.forceNotSelected, + disableSelected: o.disableSelected, + + shadow: o.shadow, + isShadowShowingOnSelected: o.isShadowShowingOnSelected, + trigger: o.trigger, + handler: o.handler + }); + + this.button.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.button.on(BI.IconButton.EVENT_CHANGE, function () { + self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments); + }); + }, + + isSelected: function () { + return this.button.isSelected(); + }, + + setSelected: function (b) { + this.button.setSelected(b); + }, + + setIcon: function (cls) { + var o = this.options; + if (o.iconClass !== cls) { + this.element.removeClass(o.iconClass).addClass(cls); + o.iconClass = cls; + } + } +}); +BI.IconChangeButton.EVENT_CHANGE = "IconChangeButton.EVENT_CHANGE"; +BI.shortcut("bi.icon_change_button", BI.IconChangeButton);/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.HalfIconButton = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + extraCls: "bi-half-icon-button check-half-select-icon", + height: 16, + width: 16, + iconWidth: 16, + iconHeight: 16, + selected: false + }) + }, + + _init : function() { + BI.HalfIconButton.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.HalfIconButton.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.HalfIconButton.EVENT_CHANGE); + } + } +}); +BI.HalfIconButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE"; + +BI.shortcut("bi.half_icon_button", BI.HalfIconButton);/** + * 统一的trigger图标按钮 + * + * Created by GUY on 2015/9/16. + * @class BI.TriggerIconButton + * @extends BI.IconButton + */ +BI.TriggerIconButton = BI.inherit(BI.IconButton, { + + _defaultConfig: function () { + var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", + extraCls: "pull-down-font" + }); + }, + + _init: function () { + BI.TriggerIconButton.superclass._init.apply(this, arguments); + }, + + doClick: function () { + BI.TriggerIconButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this); + } + } +}); +BI.TriggerIconButton.EVENT_CHANGE = "TriggerIconButton.EVENT_CHANGE"; +BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.MultiSelectItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multi-select-item", + height: 25, + logic: { + dynamic: false + } + }) + }, + _init: function () { + BI.MultiSelectItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + rgap: o.rgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.center_adapt", + items: [this.checkbox], + width: 36 + }, this.text) + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.MultiSelectItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + if (this.isValid()) { + this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setSelected: function (v) { + BI.MultiSelectItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); +BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);/** + * Created by GUY on 2016/2/2. + * + * @class BI.SingleSelectIconTextItem + * @extends BI.BasicButton + */ +BI.SingleSelectIconTextItem = BI.inherit(BI.Single, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-icon-text-item bi-list-item-active", + iconClass: "", + hgap: 10, + height: 25 + }) + }, + _init: function () { + BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.icon_text_item", + element: this, + cls: o.iconClass, + once: o.once, + selected: o.selected, + height: o.height, + iconHeight: o.iconHeight, + iconWidth: o.iconWidth, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + isSelected: function () { + return this.text.isSelected(); + }, + + setSelected: function (b) { + this.text.setSelected(b); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments); + } +}); + +BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.SingleSelectItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-item bi-list-item-active", + hgap: 10, + height: 25, + textAlign: "left", + }) + }, + _init: function () { + BI.SingleSelectItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectItem.superclass.doClick.apply(this, arguments); + }, + + setSelected: function (v) { + BI.SingleSelectItem.superclass.setSelected.apply(this, arguments); + } +}); + +BI.shortcut("bi.single_select_item", BI.SingleSelectItem);/** + * guy + * 单选框item + * @type {*|void|Object} + */ +BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-radio-item bi-list-item-active", + logic: { + dynamic: false + }, + hgap: 10, + height: 25 + }) + }, + _init: function () { + BI.SingleSelectRadioItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.radio = BI.createWidget({ + type: "bi.radio" + }); + this.radio.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(!self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.center_adapt", + items: [this.radio], + width: 36 + }, this.text) + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments); + this.radio.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments); + this.radio.setSelected(v); + + } +}); + +BI.shortcut("bi.single_select_radio_item", BI.SingleSelectRadioItem);/** + * Created by roy on 15/10/16. + */ +BI.ArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-arrow-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }); + }, + _init: function () { + var self = this, o = this.options; + BI.ArrowNode.superclass._init.apply(this, arguments); + this.checkbox = BI.createWidget({ + type: "bi.arrow_tree_group_node_checkbox", + iconWidth: 13, + iconHeight: 13 + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.ArrowNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isOpened()); + }, + setValue: function (v) { + this.text.setValue(v); + }, + + setOpened: function (v) { + BI.ArrowNode.superclass.setOpened.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.arrow_group_node", BI.ArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.FirstPlusGroupNode + * @extends BI.NodeButton + */ +BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-first-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.FirstPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.first_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.first_plus_group_node", BI.FirstPlusGroupNode);/** + * Created by User on 2016/3/31. + */ +/** + * > + icon + 文本 + * @class BI.IconArrowNode + * @extends BI.NodeButton + */ +BI.IconArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-arrow-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25, + iconHeight: 13, + iconWidth: 13, + iconCls: "" + }) + }, + _init: function () { + BI.IconArrowNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.tree_group_node_checkbox", + width: 23, + stopPropagation: true + }); + + var icon = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls, + width: 23, + items: [{ + type: "bi.icon", + height: o.iconHeight, + width: o.iconWidth + }] + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, { + width: 23, + el: icon + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.IconArrowNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.IconArrowNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.icon_arrow_node", BI.IconArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.LastPlusGroupNode + * @extends BI.NodeButton + */ +BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-last-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.LastPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.last_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if(type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.last_plus_group_node", BI.LastPlusGroupNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.MidPlusGroupNode + * @extends BI.NodeButton + */ +BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-mid-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.MidPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.mid_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.mid_plus_group_node", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-multilayer-icon-arrow-node bi-list-item", + layer: 0,//第几层级 + id: "", + pId: "", + open: false, + height: 25, + iconHeight: 13, + iconWidth: 13, + iconCls: "" + }) + }, + _init: function () { + BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.node = BI.createWidget({ + type: "bi.icon_arrow_node", + iconCls: o.iconCls, + //logic: { + // dynamic: true + //}, + id: o.id, + pId: o.pId, + open: o.open, + height: o.height, + iconHeight: o.iconHeight, + iconWidth: o.iconWidth, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.node.on(BI.Controller.EVENT_CHANGE, function (type) { + self.setSelected(self.isSelected()); + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var items = []; + BI.count(0, o.layer, function () { + items.push({ + type: "bi.layout", + width: 13, + height: o.height + }) + }); + items.push(this.node); + BI.createWidget({ + type: "bi.td", + element: this, + columnSize: BI.makeArray(o.layer, 13), + items: [items] + }) + }, + + isOnce: function () { + return true; + }, + + doRedMark: function () { + this.node.doRedMark.apply(this.node, arguments); + }, + + unRedMark: function () { + this.node.unRedMark.apply(this.node, arguments); + }, + + isSelected: function () { + return this.node.isSelected(); + }, + + setSelected: function (b) { + BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments); + this.node.setSelected(b); + }, + + doClick: function () { + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.node.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments); + this.node.setOpened(v); + } +}); + +BI.shortcut("bi.multilayer_icon_arrow_node", BI.MultiLayerIconArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.PlusGroupNode + * @extends BI.NodeButton + */ +BI.PlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.PlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.tree_node_checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.PlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.PlusGroupNode.superclass.setOpened.apply(this, arguments); + if (this.checkbox) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/** + * 三角号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.TriangleGroupNode + * @extends BI.NodeButton + */ +BI.TriangleGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.TriangleGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + iconWidth: 13, + iconHeight: 13, + type: "bi.tree_group_node_checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py, + keyword: o.keyword + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.TriangleGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isOpened()); + }, + + setOpened: function (v) { + BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments); + this.checkbox.setSelected(v); + }, + + setText: function(text){ + BI.TriangleGroupNode.superclass.setText.apply(this, arguments); + this.text.setText(text); + } +}); + +BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-first-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.FirstTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.FirstTreeLeafItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.FirstTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + height: 25, + iconWidth: 16, + iconHeight: 16, + iconCls: "" + }) + }, + + _init: function () { + BI.IconTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var icon = BI.createWidget({ + type: "bi.center_adapt", + width: 23, + cls: o.iconCls, + items: [{ + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + }] + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 23, + el: icon + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.IconTreeLeafItem.superclass.doClick.apply(this, arguments); + }, + + setSelected: function (v) { + BI.IconTreeLeafItem.superclass.setSelected.apply(this, arguments); + } +}); + +BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-last-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.LastTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.LastTreeLeafItem.superclass.doClick.apply(this, arguments); + // this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.LastTreeLeafItem.superclass.setSelected.apply(this, arguments); + // this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-mid-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.MidTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.MidTreeLeafItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.MidTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.mid_tree_leaf_item", BI.MidTreeLeafItem);/** + * @class BI.MultiLayerIconTreeLeafItem + * @extends BI.BasicButton + */ +BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multilayer-icon-tree-leaf-item bi-list-item-active", + layer: 0, + height: 25, + iconCls: "", + iconHeight: 14, + iconWidth: 12 + }) + }, + _init: function () { + BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.item = BI.createWidget({ + type: "bi.icon_tree_leaf_item", + cls: "bi-list-item-none", + iconCls: o.iconCls, + id: o.id, + pId: o.pId, + isFront: true, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.item.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) {//本身实现click功能 + return; + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var items = []; + BI.count(0, o.layer, function () { + items.push({ + type: "bi.layout", + width: 13, + height: o.height + }) + }); + items.push(this.item); + BI.createWidget({ + type: "bi.td", + element: this, + columnSize: BI.makeArray(o.layer, 13), + items: [items] + }); + }, + + doRedMark: function () { + this.item.doRedMark.apply(this.item, arguments); + }, + + unRedMark: function () { + this.item.unRedMark.apply(this.item, arguments); + }, + + doHighLight: function () { + this.item.doHighLight.apply(this.item, arguments); + }, + + unHighLight: function () { + this.item.unHighLight.apply(this.item, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments); + this.item.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.item.setSelected(v); + }, + + getValue: function(){ + return this.options.value; + } +}); + +BI.shortcut("bi.multilayer_icon_tree_leaf_item", BI.MultiLayerIconTreeLeafItem);/** + * 树叶子节点 + * Created by GUY on 2015/9/6. + * @class BI.TreeTextLeafItem + * @extends BI.BasicButton + */ +BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function() { + return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-tree-text-leaf-item bi-list-item-active", + id: "", + pId: "", + height: 25, + hgap: 0, + lgap: 0, + rgap: 0 + }) + }, + _init : function() { + BI.TreeTextLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + lgap: o.lgap, + rgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + BI.createWidget({ + type: "bi.htape", + element: this, + items: [{ + el: this.text + }] + }) + }, + + doRedMark: function(){ + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function(){ + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function(){ + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function(){ + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function(){ + return this.options.id; + }, + + getPId: function(){ + return this.options.pId; + } +}); + +BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** + * Created by GUY on 2015/8/28. + * @class BI.Calendar + * @extends BI.Widget + */ +BI.Calendar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-calendar", + logic: { + dynamic: false + }, + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + year: 2015, + month: 7, //7表示八月 + day: 25 + }) + }, + + _dateCreator: function (Y, M, D) { + var self = this, o = this.options, log = {}, De = new Date(); + var mins = o.min.match(/\d+/g); + var maxs = o.max.match(/\d+/g); + Y < (mins[0] | 0) && (Y = (mins[0] | 0)); + Y > (maxs[0] | 0) && (Y = (maxs[0] | 0)); + + De.setFullYear(Y, M, D); + log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()]; + + var MD = Date._MD.slice(0); + MD[1] = Date.isLeap(log.ymd[0]) ? 29 : 28; + + De.setFullYear(log.ymd[0], log.ymd[1], 1); + log.FDay = De.getDay(); + + log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; + log.NDay = 1; + + var items = []; + BI.each(BI.range(42), function (i) { + var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; + if (i < log.FDay) { + td.lastMonth = true; + DD = i + log.PDay; + MM === 1 && (YY -= 1); + MM = MM === 1 ? 12 : MM - 1; + } else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { + DD = i - log.FDay + 1; + if (i - log.FDay + 1 === log.ymd[2]) { + td.currentDay = true; + } + } else { + td.nextMonth = true; + DD = log.NDay++; + MM === 12 && (YY += 1); + MM = MM === 12 ? 1 : MM + 1; + } + if (Date.checkVoid(YY, MM, DD, mins, maxs)[0]) { + td.disabled = true; + } + td.text = DD; + items.push(td); + }) + return items; + }, + + _init: function () { + BI.Calendar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var items = BI.map(Date._SDN.slice(0, 7), function (i, value) { + return { + type: "bi.label", + height: 25, + text: value + } + }) + var title = BI.createWidget({ + type: "bi.button_group", + height: 25, + items: items + }) + var days = this._dateCreator(o.year, o.month, o.day); + items = []; + items.push(days.slice(0, 7)); + items.push(days.slice(7, 14)); + items.push(days.slice(14, 21)); + items.push(days.slice(21, 28)); + items.push(days.slice(28, 35)); + items.push(days.slice(35, 42)); + + items = BI.map(items, function (i, item) { + return BI.map(item, function (j, td) { + return BI.extend(td, { + type: "bi.text_item", + cls: "bi-list-item-active", + textAlign: "center", + whiteSpace: "normal", + once: false, + forceSelected: true, + height: 25, + value: o.year + "-" + o.month + "-" + td.text, + disabled: td.lastMonth || td.nextMonth || td.disabled + //selected: td.currentDay + }); + }); + }); + + this.days = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(items, {}), + layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + columns: 7, + rows: 6, + columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], + rowSize: 25 + }))] + }); + this.days.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + BI.createWidget(BI.extend({ + element: this + + }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", title, this.days) + })))); + }, + + isFrontDate: function () { + var o = this.options, c = this._const; + var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); + Y = Y | 0; + De.setFullYear(Y, M, 1); + var newDate = De.getOffsetDate(-1 * (day + 1)); + return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; + }, + + isFinalDate: function () { + var o = this.options, c = this._const; + var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); + Y = Y | 0; + De.setFullYear(Y, M, 1); + var newDate = De.getOffsetDate(42 - day); + return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; + }, + + setValue: function (ob) { + this.days.setValue([ob.year + "-" + ob.month + "-" + ob.day]); + }, + + getValue: function () { + var date = this.days.getValue()[0].match(/\d+/g); + return { + year: date[0] | 0, + month: date[1] | 0, + day: date[2] | 0 + } + } +}); + +BI.extend(BI.Calendar, { + getPageByDateJSON: function (json) { + var year = new Date().getFullYear(); + var month = new Date().getMonth(); + var page = (json.year - year) * 12; + page += json.month - month; + return page; + }, + getDateJSONByPage: function(v){ + var months = new Date().getMonth(); + var page = v; + + //对当前page做偏移,使到当前年初 + page = page + months; + + var year = BI.parseInt(page / 12); + if(page < 0 && page % 12 !== 0){ + year--; + } + var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12); + return { + year: new Date().getFullYear() + year, + month: month + } + } +}); + +BI.shortcut("bi.calendar", BI.Calendar);/** + * Created by GUY on 2015/8/28. + * @class BI.YearCalendar + * @extends BI.Widget + */ +BI.YearCalendar = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-year-calendar", + behaviors: {}, + logic: { + dynamic: false + }, + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + year: null + }) + }, + + _yearCreator: function (Y) { + var o = this.options; + Y = Y | 0; + var start = BI.YearCalendar.getStartYear(Y); + var items = []; + BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) { + var td = {}; + if (Date.checkVoid(start + i, 1, 1, o.min, o.max)[0]) { + td.disabled = true; + } + td.text = start + i; + items.push(td); + }); + return items; + }, + + _init: function () { + BI.YearCalendar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.currentYear = new Date().getFullYear(); + var years = this._yearCreator(o.year || this.currentYear); + + //纵向排列年 + var len = years.length, tyears = BI.makeArray(len, ""); + var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; + BI.each(years, function (i, y) { + tyears[i] = years[map[i]]; + }); + var items = []; + items.push(tyears.slice(0, 2)); + items.push(tyears.slice(2, 4)); + items.push(tyears.slice(4, 6)); + items.push(tyears.slice(6, 8)); + items.push(tyears.slice(8, 10)); + items.push(tyears.slice(10, 12)); + + items = BI.map(items, function (i, item) { + return BI.map(item, function (j, td) { + return BI.extend(td, { + type: "bi.text_item", + cls: "bi-list-item-active", + textAlign: "center", + whiteSpace: "normal", + once: false, + forceSelected: true, + height: 23, + width: 38, + value: td.text, + disabled: td.disabled + }); + }); + }); + + this.years = BI.createWidget({ + type: "bi.button_group", + behaviors: o.behaviors, + items: BI.createItems(items, {}), + layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + columns: 2, + rows: 6, + columnSize: [1 / 2, 1 / 2], + rowSize: 25 + })), { + type: "bi.center_adapt", + vgap: 1 + }] + }); + this.years.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + BI.createWidget(BI.extend({ + element: this + + }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", this.years) + })))); + }, + + isFrontYear: function () { + var o = this.options; + var Y = o.year; + Y = Y | 0; + return !!Date.checkVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0]; + }, + + isFinalYear: function () { + var o = this.options, c = this._const; + var Y = o.year; + Y = Y | 0; + return !!Date.checkVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0]; + }, + + setValue: function (val) { + this.years.setValue([val]); + }, + + getValue: function () { + return this.years.getValue()[0]; + } +}); +//类方法 +BI.extend(BI.YearCalendar, { + INTERVAL: 12, + + //获取显示的第一年 + getStartYear: function (year) { + var cur = new Date().getFullYear(); + return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL; + }, + + getEndYear: function (year) { + return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; + }, + + getPageByYear: function (year) { + var cur = new Date().getFullYear(); + year = BI.YearCalendar.getStartYear(year); + return (year - cur + 3) / BI.YearCalendar.INTERVAL; + } +}); + +BI.shortcut("bi.year_calendar", BI.YearCalendar);/** + * 绘制一些较复杂的canvas + * + * Created by GUY on 2015/11/24. + * @class BI.ComplexCanvas + * @extends BI.Widget + */ +BI.ComplexCanvas = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-complex-canvas" + }) + }, + + + _init: function () { + BI.ComplexCanvas.superclass._init.apply(this, arguments); + var o = this.options; + this.canvas = BI.createWidget({ + type: "bi.canvas", + element: this, + width: o.width, + height: o.height + }); + }, + + //绘制树枝节点 + branch: function (x0, y0, x1, y1, x2, y2) { + var self = this, args = [].slice.call(arguments); + if (args.length <= 5) { + return this.canvas.line.apply(this.canvas, arguments); + } + var options; + if (BI.isOdd(args.length)) { + options = BI.last(args); + args = BI.initial(args); + } + args = [].slice.call(args, 2); + var odd = BI.filter(args, function (i) { + return i % 2 === 0; + }); + var even = BI.filter(args, function (i) { + return i % 2 !== 0; + }); + options || (options = {}); + var offset = options.offset || 20; + if ((y0 > y1 && y0 > y2) || (y0 < y1 && y0 < y2)) { + if (y0 > y1 && y0 > y2) { + var y = Math.max.apply(this, even) + offset; + } else { + var y = Math.min.apply(this, even) - offset; + } + var minx = Math.min.apply(this, odd); + var minix = BI.indexOf(odd, minx); + var maxx = Math.max.apply(this, odd); + var maxix = BI.indexOf(odd, maxx); + this.canvas.line(minx, even[minix], minx, y, maxx, y, maxx, even[maxix], options); + BI.each(odd, function (i, dot) { + if (i !== maxix && i !== minix) { + self.canvas.line(dot, even[i], dot, y, options); + } + }); + this.canvas.line(x0, y, x0, y0, options); + return; + } + if ((x0 > x1 && x0 > x2) || (x0 < x1 && x0 < x2)) { + if (x0 > x1 && x0 > x2) { + var x = Math.max.apply(this, odd) + offset; + } else { + var x = Math.min.apply(this, odd) - offset; + } + var miny = Math.min.apply(this, even); + var miniy = BI.indexOf(even, miny); + var maxy = Math.max.apply(this, even); + var maxiy = BI.indexOf(even, maxy); + this.canvas.line(odd[miniy], miny, x, miny, x, maxy, odd[maxiy], maxy, options); + BI.each(even, function (i, dot) { + if (i !== miniy && i !== maxiy) { + self.canvas.line(odd[i], dot, x, dot, options); + } + }); + this.canvas.line(x, y0, x0, y0, options); + return; + } + }, + + stroke: function (callback) { + this.canvas.stroke(callback); + } +}); + +BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/** + * Created by roy on 15/10/16. + * 上箭头与下箭头切换的树节点 + */ +BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{ + _defaultConfig:function(){ + return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{ + extraCls:"bi-arrow-tree-group-node", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function(){ + BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments); + }, + setSelected: function(v){ + BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"); + } else { + this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font"); + } + } +}); +BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox);/** + * 十字型的树节点 + * @class BI.CheckingMarkNode + * @extends BI.IconButton + */ +BI.CheckingMarkNode = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), { + extraCls: "check-mark-font", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function() { + BI.CheckingMarkNode.superclass._init.apply(this, arguments); + this.setSelected(this.options.selected); + + }, + setSelected: function(v){ + BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("check-mark-font"); + } else { + this.element.removeClass("check-mark-font"); + } + } +}); +BI.shortcut("bi.checking_mark_node", BI.CheckingMarkNode);/** + * 十字型的树节点 + * @class BI.FirstTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type2", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type2"); + } else { + this.element.removeClass("tree-expand-icon-type2"); + } + } +}); +BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox);/** + * 十字型的树节点 + * @class BI.LastTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type4", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type3"); + } else { + this.element.removeClass("tree-expand-icon-type3"); + } + } +}); +BI.shortcut("bi.last_tree_node_checkbox", BI.LastTreeNodeCheckbox);/** + * 十字型的树节点 + * @class BI.MidTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type3", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type3"); + } else { + this.element.removeClass("tree-expand-icon-type3"); + } + } +}); +BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/** + * 三角形的树节点 + * Created by GUY on 2015/9/6. + * @class BI.TreeGroupNodeCheckbox + * @extends BI.IconButton + */ +BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-node-triangle-collapse-font", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function() { + BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"); + } else { + this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font"); + } + } +}); +BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/** + * 十字型的树节点 + * @class BI.TreeNodeCheckbox + * @extends BI.IconButton + */ +BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type1", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.TreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.addClass("tree-expand-icon-type1"); + } else { + this.element.removeClass("tree-expand-icon-type1"); + } + } +}); +BI.shortcut("bi.tree_node_checkbox", BI.TreeNodeCheckbox);/*! + * clipboard.js v1.6.1 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +try {//IE8下会抛错 + (function (f) { + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f() + } else if (typeof define === "function" && define.amd) { + define([], f) + } else { + var g; + if (typeof window !== "undefined") { + g = window + } else if (typeof global !== "undefined") { + g = global + } else if (typeof self !== "undefined") { + g = self + } else { + g = this + } + g.Clipboard = f() + } + })(function () { + var define, module, exports; + return (function e(t, n, r) { + function s(o, u) { + if (!n[o]) { + if (!t[o]) { + var a = typeof require == "function" && require; + if (!u && a)return a(o, !0); + if (i)return i(o, !0); + var f = new Error("Cannot find module '" + o + "'"); + throw f.code = "MODULE_NOT_FOUND", f + } + var l = n[o] = {exports: {}}; + t[o][0].call(l.exports, function (e) { + var n = t[o][1][e]; + return s(n ? n : e) + }, l, l.exports, e, t, n, r) + } + return n[o].exports + } + + var i = typeof require == "function" && require; + for (var o = 0; o < r.length; o++)s(r[o]); + return s + })({ + 1: [function (require, module, exports) { + var DOCUMENT_NODE_TYPE = 9; + + /** + * A polyfill for Element.matches() + */ + if (typeof Element !== 'undefined' && !Element.prototype.matches) { + var proto = Element.prototype; + + proto.matches = proto.matchesSelector || + proto.mozMatchesSelector || + proto.msMatchesSelector || + proto.oMatchesSelector || + proto.webkitMatchesSelector; + } + + /** + * Finds the closest parent that matches a selector. + * + * @param {Element} element + * @param {String} selector + * @return {Function} + */ + function closest(element, selector) { + while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + if (element.matches(selector)) return element; + element = element.parentNode; + } + } + + module.exports = closest; + + }, {}], 2: [function (require, module, exports) { + var closest = require('./closest'); + + /** + * Delegates event to a selector. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ + function delegate(element, selector, type, callback, useCapture) { + var listenerFn = listener.apply(this, arguments); + + element.addEventListener(type, listenerFn, useCapture); + + return { + destroy: function () { + element.removeEventListener(type, listenerFn, useCapture); + } + } + } + + /** + * Finds closest match and invokes callback. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Function} + */ + function listener(element, selector, type, callback) { + return function (e) { + e.delegateTarget = closest(e.target, selector); + + if (e.delegateTarget) { + callback.call(element, e); + } + } + } + + module.exports = delegate; + + }, {"./closest": 1}], 3: [function (require, module, exports) { + /** + * Check if argument is a HTML element. + * + * @param {Object} value + * @return {Boolean} + */ + exports.node = function (value) { + return value !== undefined + && value instanceof HTMLElement + && value.nodeType === 1; + }; + + /** + * Check if argument is a list of HTML elements. + * + * @param {Object} value + * @return {Boolean} + */ + exports.nodeList = function (value) { + var type = Object.prototype.toString.call(value); + + return value !== undefined + && (type === '[object NodeList]' || type === '[object HTMLCollection]') + && ('length' in value) + && (value.length === 0 || exports.node(value[0])); + }; + + /** + * Check if argument is a string. + * + * @param {Object} value + * @return {Boolean} + */ + exports.string = function (value) { + return typeof value === 'string' + || value instanceof String; + }; + + /** + * Check if argument is a function. + * + * @param {Object} value + * @return {Boolean} + */ + exports.fn = function (value) { + var type = Object.prototype.toString.call(value); + + return type === '[object Function]'; + }; + + }, {}], 4: [function (require, module, exports) { + var is = require('./is'); + var delegate = require('delegate'); + + /** + * Validates all params and calls the right + * listener function based on its target type. + * + * @param {String|HTMLElement|HTMLCollection|NodeList} target + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listen(target, type, callback) { + if (!target && !type && !callback) { + throw new Error('Missing required arguments'); + } + + if (!is.string(type)) { + throw new TypeError('Second argument must be a String'); + } + + if (!is.fn(callback)) { + throw new TypeError('Third argument must be a Function'); + } + + if (is.node(target)) { + return listenNode(target, type, callback); + } + else if (is.nodeList(target)) { + return listenNodeList(target, type, callback); + } + else if (is.string(target)) { + return listenSelector(target, type, callback); + } + else { + throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); + } + } + + /** + * Adds an event listener to a HTML element + * and returns a remove listener function. + * + * @param {HTMLElement} node + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenNode(node, type, callback) { + node.addEventListener(type, callback); + + return { + destroy: function () { + node.removeEventListener(type, callback); + } + } + } + + /** + * Add an event listener to a list of HTML elements + * and returns a remove listener function. + * + * @param {NodeList|HTMLCollection} nodeList + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenNodeList(nodeList, type, callback) { + Array.prototype.forEach.call(nodeList, function (node) { + node.addEventListener(type, callback); + }); + + return { + destroy: function () { + Array.prototype.forEach.call(nodeList, function (node) { + node.removeEventListener(type, callback); + }); + } + } + } + + /** + * Add an event listener to a selector + * and returns a remove listener function. + * + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenSelector(selector, type, callback) { + return delegate(document.body, selector, type, callback); + } + + module.exports = listen; + + }, {"./is": 3, "delegate": 2}], 5: [function (require, module, exports) { + function select(element) { + var selectedText; + + if (element.nodeName === 'SELECT') { + element.focus(); + + selectedText = element.value; + } + else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { + var isReadOnly = element.hasAttribute('readonly'); + + if (!isReadOnly) { + element.setAttribute('readonly', ''); + } + + element.select(); + element.setSelectionRange(0, element.value.length); + + if (!isReadOnly) { + element.removeAttribute('readonly'); + } + + selectedText = element.value; + } + else { + if (element.hasAttribute('contenteditable')) { + element.focus(); + } + + var selection = window.getSelection(); + var range = document.createRange(); + + range.selectNodeContents(element); + selection.removeAllRanges(); + selection.addRange(range); + + selectedText = selection.toString(); + } + + return selectedText; + } + + module.exports = select; + + }, {}], 6: [function (require, module, exports) { + function E() { + // Keep this empty so it's easier to inherit from + // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) + } + + E.prototype = { + on: function (name, callback, ctx) { + var e = this.e || (this.e = {}); + + (e[name] || (e[name] = [])).push({ + fn: callback, + ctx: ctx + }); + + return this; + }, + + once: function (name, callback, ctx) { + var self = this; + + function listener() { + self.off(name, listener); + callback.apply(ctx, arguments); + }; + + listener._ = callback + return this.on(name, listener, ctx); + }, + + emit: function (name) { + var data = [].slice.call(arguments, 1); + var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var i = 0; + var len = evtArr.length; + + for (i; i < len; i++) { + evtArr[i].fn.apply(evtArr[i].ctx, data); + } + + return this; + }, + + off: function (name, callback) { + var e = this.e || (this.e = {}); + var evts = e[name]; + var liveEvents = []; + + if (evts && callback) { + for (var i = 0, len = evts.length; i < len; i++) { + if (evts[i].fn !== callback && evts[i].fn._ !== callback) + liveEvents.push(evts[i]); + } + } + + // Remove event from queue to prevent memory leak + // Suggested by https://github.com/lazd + // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 + + (liveEvents.length) + ? e[name] = liveEvents + : delete e[name]; + + return this; + } + }; + + module.exports = E; + + }, {}], 7: [function (require, module, exports) { + (function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', 'select'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('select')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.select); + global.clipboardAction = mod.exports; + } + })(this, function (module, _select) { + 'use strict'; + + var _select2 = _interopRequireDefault(_select); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + var ClipboardAction = function () { + /** + * @param {Object} options + */ + function ClipboardAction(options) { + _classCallCheck(this, ClipboardAction); + + this.resolveOptions(options); + this.initSelection(); + } + + /** + * Defines base properties passed from constructor. + * @param {Object} options + */ + + + _createClass(ClipboardAction, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = options.action; + this.emitter = options.emitter; + this.target = options.target; + this.text = options.text; + this.trigger = options.trigger; + + this.selectedText = ''; + } + }, { + key: 'initSelection', + value: function initSelection() { + if (this.text) { + this.selectFake(); + } else if (this.target) { + this.selectTarget(); + } + } + }, { + key: 'selectFake', + value: function selectFake() { + var _this = this; + + var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; + + this.removeFake(); + + this.fakeHandlerCallback = function () { + return _this.removeFake(); + }; + this.fakeHandler = document.body.addEventListener('click', this.fakeHandlerCallback) || true; + + this.fakeElem = document.createElement('textarea'); + // Prevent zooming on iOS + this.fakeElem.style.fontSize = '12pt'; + // Reset box model + this.fakeElem.style.border = '0'; + this.fakeElem.style.padding = '0'; + this.fakeElem.style.margin = '0'; + // Move element out of screen horizontally + this.fakeElem.style.position = 'absolute'; + this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; + // Move element to the same position vertically + var yPosition = window.pageYOffset || document.documentElement.scrollTop; + this.fakeElem.style.top = yPosition + 'px'; + + this.fakeElem.setAttribute('readonly', ''); + this.fakeElem.value = this.text; + + document.body.appendChild(this.fakeElem); + + this.selectedText = (0, _select2["default"])(this.fakeElem); + this.copyText(); + } + }, { + key: 'removeFake', + value: function removeFake() { + if (this.fakeHandler) { + document.body.removeEventListener('click', this.fakeHandlerCallback); + this.fakeHandler = null; + this.fakeHandlerCallback = null; + } + + if (this.fakeElem) { + document.body.removeChild(this.fakeElem); + this.fakeElem = null; + } + } + }, { + key: 'selectTarget', + value: function selectTarget() { + this.selectedText = (0, _select2["default"])(this.target); + this.copyText(); + } + }, { + key: 'copyText', + value: function copyText() { + var succeeded = void 0; + + try { + succeeded = document.execCommand(this.action); + } catch (err) { + succeeded = false; + } + + this.handleResult(succeeded); + } + }, { + key: 'handleResult', + value: function handleResult(succeeded) { + this.emitter.emit(succeeded ? 'success' : 'error', { + action: this.action, + text: this.selectedText, + trigger: this.trigger, + clearSelection: this.clearSelection.bind(this) + }); + } + }, { + key: 'clearSelection', + value: function clearSelection() { + if (this.target) { + this.target.blur(); + } + + window.getSelection().removeAllRanges(); + } + }, { + key: 'destroy', + value: function destroy() { + this.removeFake(); + } + }, { + key: 'action', + set: function set() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; + + this._action = action; + + if (this._action !== 'copy' && this._action !== 'cut') { + throw new Error('Invalid "action" value, use either "copy" or "cut"'); + } + }, + get: function get() { + return this._action; + } + }, { + key: 'target', + set: function set(target) { + if (target !== undefined) { + if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { + if (this.action === 'copy' && target.hasAttribute('disabled')) { + throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); + } + + if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { + throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); + } + + this._target = target; + } else { + throw new Error('Invalid "target" value, use a valid Element'); + } + } + }, + get: function get() { + return this._target; + } + }]); + + return ClipboardAction; + }(); + + module.exports = ClipboardAction; + }); + + }, {"select": 5}], 8: [function (require, module, exports) { + (function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); + global.clipboard = mod.exports; + } + })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { + 'use strict'; + + var _clipboardAction2 = _interopRequireDefault(_clipboardAction); + + var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); + + var _goodListener2 = _interopRequireDefault(_goodListener); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + + var Clipboard = function (_Emitter) { + _inherits(Clipboard, _Emitter); + + /** + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + * @param {Object} options + */ + function Clipboard(trigger, options) { + _classCallCheck(this, Clipboard); + + var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); + + _this.resolveOptions(options); + _this.listenClick(trigger); + return _this; + } + + /** + * Defines if attributes would be resolved using internal setter functions + * or custom functions that were passed in the constructor. + * @param {Object} options + */ + + + _createClass(Clipboard, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = typeof options.action === 'function' ? options.action : this.defaultAction; + this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; + this.text = typeof options.text === 'function' ? options.text : this.defaultText; + } + }, { + key: 'listenClick', + value: function listenClick(trigger) { + var _this2 = this; + + this.listener = (0, _goodListener2["default"])(trigger, 'click', function (e) { + return _this2.onClick(e); + }); + } + }, { + key: 'onClick', + value: function onClick(e) { + var trigger = e.delegateTarget || e.currentTarget; + + if (this.clipboardAction) { + this.clipboardAction = null; + } + + this.clipboardAction = new _clipboardAction2["default"]({ + action: this.action(trigger), + target: this.target(trigger), + text: this.text(trigger), + trigger: trigger, + emitter: this + }); + } + }, { + key: 'defaultAction', + value: function defaultAction(trigger) { + return getAttributeValue('action', trigger); + } + }, { + key: 'defaultTarget', + value: function defaultTarget(trigger) { + var selector = getAttributeValue('target', trigger); + + if (selector) { + return document.querySelector(selector); + } + } + }, { + key: 'defaultText', + value: function defaultText(trigger) { + return getAttributeValue('text', trigger); + } + }, { + key: 'destroy', + value: function destroy() { + this.listener.destroy(); + + if (this.clipboardAction) { + this.clipboardAction.destroy(); + this.clipboardAction = null; + } + } + }], [{ + key: 'isSupported', + value: function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; + + var actions = typeof action === 'string' ? [action] : action; + var support = !!document.queryCommandSupported; + + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + + return support; + } + }]); + + return Clipboard; + }(_tinyEmitter2["default"]); + + /** + * Helper function to retrieve attribute value. + * @param {String} suffix + * @param {Element} element + */ + function getAttributeValue(suffix, element) { + var attribute = 'data-clipboard-' + suffix; + + if (!element.hasAttribute(attribute)) { + return; + } + + return element.getAttribute(attribute); + } + + module.exports = Clipboard; + }); + + }, {"./clipboard-action": 7, "good-listener": 4, "tiny-emitter": 6}] + }, {}, [8])(8) + }); +} catch (e) { + /* + * zClip :: jQuery ZeroClipboard v1.1.1 + * http://steamdev.com/zclip + * + * Copyright 2011, SteamDev + * Released under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + * Date: Wed Jun 01, 2011 + */ + + + (function ($) { + + $.fn.zclip = function (params) { + + if (typeof params == "object" && !params.length) { + + var settings = $.extend({ + + path: 'ZeroClipboard.swf', + copy: null, + beforeCopy: null, + afterCopy: null, + clickAfter: true, + setHandCursor: true, + setCSSEffects: true + + }, params); + + + return this.each(function () { + + var o = $(this); + + if (o.is(':visible') && (typeof settings.copy == 'string' || $.isFunction(settings.copy))) { + + ZeroClipboard.setMoviePath(settings.path); + var clip = new ZeroClipboard.Client(); + + if ($.isFunction(settings.copy)) { + o.bind('zClip_copy', settings.copy); + } + if ($.isFunction(settings.beforeCopy)) { + o.bind('zClip_beforeCopy', settings.beforeCopy); + } + if ($.isFunction(settings.afterCopy)) { + o.bind('zClip_afterCopy', settings.afterCopy); + } + + clip.setHandCursor(settings.setHandCursor); + clip.setCSSEffects(settings.setCSSEffects); + clip.addEventListener('mouseOver', function (client) { + o.trigger('mouseenter'); + }); + clip.addEventListener('mouseOut', function (client) { + o.trigger('mouseleave'); + }); + clip.addEventListener('mouseDown', function (client) { + + o.trigger('mousedown'); + + if (!$.isFunction(settings.copy)) { + clip.setText(settings.copy); + } else { + clip.setText(o.triggerHandler('zClip_copy')); + } + + if ($.isFunction(settings.beforeCopy)) { + o.trigger('zClip_beforeCopy'); + } + + }); + + clip.addEventListener('complete', function (client, text) { + + if ($.isFunction(settings.afterCopy)) { + + o.trigger('zClip_afterCopy'); + + } else { + if (text.length > 500) { + text = text.substr(0, 500) + "...\n\n(" + (text.length - 500) + " characters not shown)"; + } + + o.removeClass('hover'); + alert("Copied text to clipboard:\n\n " + text); + } + + if (settings.clickAfter) { + o.trigger('click'); + } + + }); + + + clip.glue(o[0], o.parent()[0]); + + $(window).bind('load resize', function () { + clip.reposition(); + }); + + + } + + }); + + } else if (typeof params == "string") { + + return this.each(function () { + + var o = $(this); + + params = params.toLowerCase(); + var zclipId = o.data('zclipId'); + var clipElm = $('#' + zclipId + '.zclip'); + + if (params == "remove") { + + clipElm.remove(); + o.removeClass('active hover'); + + } else if (params == "hide") { + + clipElm.hide(); + o.removeClass('active hover'); + + } else if (params == "show") { + + clipElm.show(); + + } + + }); + + } + + } + + + })(jQuery); + + +// ZeroClipboard +// Simple Set Clipboard System +// Author: Joseph Huckaby + var ZeroClipboard = { + + version: "1.0.7", + clients: {}, + // registered upload clients on page, indexed by id + moviePath: 'ZeroClipboard.swf', + // URL to movie + nextId: 1, + // ID of next movie + $: function (thingy) { + // simple DOM lookup utility function + if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); + if (!thingy.addClass) { + // extend element with a few useful methods + thingy.hide = function () { + this.style.display = 'none'; + }; + thingy.show = function () { + this.style.display = ''; + }; + thingy.addClass = function (name) { + this.removeClass(name); + this.className += ' ' + name; + }; + thingy.removeClass = function (name) { + var classes = this.className.split(/\s+/); + var idx = -1; + for (var k = 0; k < classes.length; k++) { + if (classes[k] == name) { + idx = k; + k = classes.length; + } + } + if (idx > -1) { + classes.splice(idx, 1); + this.className = classes.join(' '); + } + return this; + }; + thingy.hasClass = function (name) { + return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); + }; + } + return thingy; + }, + + setMoviePath: function (path) { + // set path to ZeroClipboard.swf + this.moviePath = path; + }, + + dispatch: function (id, eventName, args) { + // receive event from flash movie, send to client + var client = this.clients[id]; + if (client) { + client.receiveEvent(eventName, args); + } + }, + + register: function (id, client) { + // register new client to receive events + this.clients[id] = client; + }, + + getDOMObjectPosition: function (obj, stopObj) { + // get absolute coordinates for dom element + var info = { + left: 0, + top: 0, + width: obj.width ? obj.width : obj.offsetWidth, + height: obj.height ? obj.height : obj.offsetHeight + }; + + if (obj && (obj != stopObj)) { + info.left += obj.offsetLeft; + info.top += obj.offsetTop; + } + + return info; + }, + + Client: function (elem) { + // constructor for new simple upload client + this.handlers = {}; + + // unique ID + this.id = ZeroClipboard.nextId++; + this.movieId = 'ZeroClipboardMovie_' + this.id; + + // register client with singleton to receive flash events + ZeroClipboard.register(this.id, this); + + // create movie + if (elem) this.glue(elem); + } + }; + + ZeroClipboard.Client.prototype = { + + id: 0, + // unique ID for us + ready: false, + // whether movie is ready to receive events or not + movie: null, + // reference to movie object + clipText: '', + // text to copy to clipboard + handCursorEnabled: true, + // whether to show hand cursor, or default pointer cursor + cssEffects: true, + // enable CSS mouse effects on dom container + handlers: null, + // user event handlers + glue: function (elem, appendElem, stylesToAdd) { + // glue to DOM element + // elem can be ID or actual DOM element object + this.domElement = ZeroClipboard.$(elem); + + // float just above object, or zIndex 99 if dom element isn't set + var zIndex = 99; + if (this.domElement.style.zIndex) { + zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; + } + + if (typeof(appendElem) == 'string') { + appendElem = ZeroClipboard.$(appendElem); + } else if (typeof(appendElem) == 'undefined') { + appendElem = document.getElementsByTagName('body')[0]; + } + + // find X/Y position of domElement + var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); + + // create floating DIV above element + this.div = document.createElement('div'); + this.div.className = "zclip"; + this.div.id = "zclip-" + this.movieId; + $(this.domElement).data('zclipId', 'zclip-' + this.movieId); + var style = this.div.style; + style.position = 'absolute'; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + style.width = '' + box.width + 'px'; + style.height = '' + box.height + 'px'; + style.zIndex = zIndex; + + if (typeof(stylesToAdd) == 'object') { + for (addedStyle in stylesToAdd) { + style[addedStyle] = stylesToAdd[addedStyle]; + } + } + + // style.backgroundColor = '#f00'; // debug + appendElem.appendChild(this.div); + + this.div.innerHTML = this.getHTML(box.width, box.height); + }, + + getHTML: function (width, height) { + // return HTML for movie + var html = ''; + var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; + + if (navigator.userAgent.match(/MSIE/)) { + // IE gets an OBJECT tag + var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; + html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; + } else { + // all other browsers get an EMBED tag + html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; + } + return html; + }, + + hide: function () { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function () { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function () { + // destroy control and floater + if (this.domElement && this.div) { + this.hide(); + this.div.innerHTML = ''; + + var body = document.getElementsByTagName('body')[0]; + try { + body.removeChild(this.div); + } catch (e) { + ; + } + + this.domElement = null; + this.div = null; + } + }, + + reposition: function (elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard.$(elem); + if (!this.domElement) this.hide(); + } + + if (this.domElement && this.div) { + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + setText: function (newText) { + // set text to be copied to clipboard + this.clipText = newText; + if (this.ready) { + this.movie.setText(newText); + } + }, + + addEventListener: function (eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(func); + }, + + setHandCursor: function (enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) { + this.movie.setHandCursor(enabled); + } + }, + + setCSSEffects: function (enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !!enabled; + }, + + receiveEvent: function (eventName, args) { + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 1); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 100); + this.ready = true; + return; + } + + this.ready = true; + try { + this.movie.setText(this.clipText); + } catch (e) { + } + try { + this.movie.setHandCursor(this.handCursorEnabled); + } catch (e) { + } + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('hover'); + if (this.recoverActive) { + this.domElement.addClass('active'); + } + + + } + + + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + this.domElement.removeClass('hover'); + + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][func[1]](this, args); + } else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } + + }; +}/** + * 复制 + * Created by GUY on 2016/2/16. + * @class BI.ClipBoard + * @extends BI.BasicButton + */ +BI.ClipBoard = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-clipboard", + copy: BI.emptyFn, + afterCopy: BI.emptyFn + }) + }, + + _init: function () { + BI.ClipBoard.superclass._init.apply(this, arguments); + }, + + mounted: function () { + var self = this, o = this.options; + if (window.Clipboard) { + this.clipboard = new Clipboard(this.element[0], { + text: function () { + return BI.isFunction(o.copy) ? o.copy() : o.copy; + } + }); + this.clipboard.on("success", o.afterCopy) + } else { + this.element.zclip({ + path: BI.resourceURL + "/ZeroClipboard.swf", + copy: o.copy, + beforeCopy: o.beforeCopy, + afterCopy: o.afterCopy + }); + } + }, + + destroyed: function () { + this.clipboard && this.clipboard.destroy(); + } +}); + +BI.shortcut("bi.clipboard", BI.ClipBoard);/** + * 自定义选色 + * + * Created by GUY on 2015/11/17. + * @class BI.CustomColorChooser + * @extends BI.Widget + */ +BI.CustomColorChooser = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-custom-color-chooser", + width: 227, + height: 245 + }) + }, + + _init: function () { + BI.CustomColorChooser.superclass._init.apply(this, arguments); + var self = this; + this.editor = BI.createWidget({ + type: "bi.color_picker_editor", + width: 195 + }); + this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + }); + this.farbtastic = BI.createWidget({ + type: "bi.farbtastic" + }); + this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + type: "bi.absolute", + items: [{ + el: this.editor, + left: 15, + top: 10, + right: 15 + }], + height: 30 + }, { + type: "bi.absolute", + items: [{ + el: this.farbtastic, + left: 15, + right: 15, + top: 10 + }], + height: 215 + }] + }) + }, + + setValue: function (color) { + this.editor.setValue(color); + this.farbtastic.setValue(color); + }, + + getValue: function () { + return this.editor.getValue(); + } +}); +BI.CustomColorChooser.EVENT_CHANGE = "CustomColorChooser.EVENT_CHANGE"; +BI.shortcut("bi.custom_color_chooser", BI.CustomColorChooser);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooser + * @extends BI.Widget + */ +BI.ColorChooser = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-chooser", + el: {} + }) + }, + + _init: function () { + BI.ColorChooser.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(BI.extend({ + type: "bi.color_chooser_trigger", + width: o.width, + height: o.height + }, o.el)); + this.colorPicker = BI.createWidget({ + type: "bi.color_chooser_popup" + }); + + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 1, + el: this.trigger, + popup: { + el: this.colorPicker, + stopPropagation: false, + minWidth: 202 + } + }); + + var fn = function () { + var color = self.colorPicker.getValue(); + self.trigger.setValue(color); + var colors = BI.string2Array(BI.Cache.getItem("colors") || ""); + var que = new BI.Queue(8); + que.fromArray(colors); + que.remove(color); + que.unshift(color); + BI.Cache.setItem("colors", BI.array2String(que.toArray())); + }; + + this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () { + fn(); + }); + + this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { + fn(); + self.combo.hideView(); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || "")); + }); + + this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); + }) + }, + + isViewVisible: function () { + return this.combo.isViewVisible(); + }, + + setValue: function (color) { + this.combo.setValue(color); + }, + + getValue: function () { + return this.colorPicker.getValue(); + } +}); +BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser", BI.ColorChooser);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooserPopup + * @extends BI.Widget + */ +BI.ColorChooserPopup = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-chooser-popup", + height: 145 + }) + }, + + _init: function () { + BI.ColorChooserPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colorEditor = BI.createWidget({ + type: "bi.color_picker_editor" + }); + + this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); + }); + + this.storeColors = BI.createWidget({ + type: "bi.color_picker", + items: [[{ + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }]], + width: 190, + height: 25 + }); + this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { + self.setValue(this.getValue()[0]); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + }); + + this.colorPicker = BI.createWidget({ + type: "bi.color_picker", + width: 190, + height: 50 + }); + + this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { + self.setValue(this.getValue()[0]); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + }); + + this.customColorChooser = BI.createWidget({ + type: "bi.custom_color_chooser" + }); + + var panel = BI.createWidget({ + type: "bi.popup_panel", + buttons: [BI.i18nText("BI-Basic_Cancel"), BI.i18nText("BI-Basic_Save")], + title: BI.i18nText("BI-Custom_Color"), + el: this.customColorChooser, + stopPropagation: false, + bgap: -1, + rgap: 1, + lgap: 1, + minWidth: 227 + }); + + this.more = BI.createWidget({ + type: "bi.combo", + direction: "right,top", + isNeedAdjustHeight: false, + el: { + type: "bi.text_item", + cls: "color-chooser-popup-more bi-list-item", + textAlign: "center", + height: 20, + text: BI.i18nText("BI-Basic_More") + "..." + }, + popup: panel + }); + + this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self.customColorChooser.setValue(self.getValue()); + }); + panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) { + switch (index) { + case 0: + self.more.hideView(); + break; + case 1: + self.setValue(self.customColorChooser.getValue()); + self.more.hideView(); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + break; + } + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: { + type: "bi.absolute", + cls: "bi-background bi-border-bottom", + items: [{ + el: this.colorEditor, + left: 0, + right: 0, + top: 5 + }] + }, + height: 30 + }, { + el: { + type: "bi.absolute", + items: [{ + el: this.storeColors, + left: 5, + right: 5, + top: 5 + }] + }, + height: 30 + }, { + el: { + type: "bi.absolute", + items: [{ + el: this.colorPicker, + left: 5, + right: 5, + top: 5 + }] + }, + height: 65 + }, { + el: this.more, + height: 20 + }] + }) + }, + + setStoreColors: function (colors) { + if (BI.isArray(colors)) { + var items = BI.map(colors, function (i, color) { + return { + value: color + } + }); + BI.count(colors.length, 8, function (i) { + items.push({ + value: "", + disabled: true + }) + }); + this.storeColors.populate([items]); + } + }, + + setValue: function (color) { + this.colorEditor.setValue(color); + this.colorPicker.setValue(color); + this.storeColors.setValue(color); + }, + + getValue: function () { + return this.colorEditor.getValue(); + } +}); +BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE"; +BI.ColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooserTrigger + * @extends BI.Trigger + */ +BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", + height: 30 + }) + }, + + _init: function () { + BI.ColorChooserTrigger.superclass._init.apply(this, arguments); + this.colorContainer = BI.createWidget({ + type: "bi.layout", + cls: "bi-card color-chooser-trigger-content" + }); + + var down = BI.createWidget({ + type: "bi.icon_button", + disableSelected: true, + cls: "icon-combo-down-icon trigger-triangle-font", + width: 12, + height: 8 + }); + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.colorContainer, + left: 3, + right: 3, + top: 3, + bottom: 3 + }, { + el: down, + right: 3, + bottom: 3 + }] + }); + if (this.options.value) { + this.setValue(this.options.value); + } + }, + + setValue: function (color) { + BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments); + if (color === "") { + this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); + } else if (color === "transparent") { + this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background") + } else { + this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background"); + } + } +}); +BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser_trigger", BI.ColorChooserTrigger);/** + * 简单选色控件按钮 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPickerButton + * @extends BI.BasicButton + */ +BI.ColorPickerButton = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-color-picker-button bi-background bi-border-top bi-border-left" + }) + }, + + _init: function () { + BI.ColorPickerButton.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.value) { + this.element.css("background-color", o.value); + var name = this.getName(); + this.element.hover(function () { + self._createMask(); + if (self.isEnabled()) { + BI.Maskers.show(name); + } + }, function () { + if (!self.isSelected()) { + BI.Maskers.hide(name); + } + }); + } + }, + + _createMask: function () { + var o = this.options, name = this.getName(); + if (this.isEnabled() && !BI.Maskers.has(name)) { + var w = BI.Maskers.make(name, this, { + offset: { + left: -1, + top: -1, + right: -1, + bottom: -1 + } + }); + w.element.addClass("color-picker-button-mask").css("background-color", o.value); + } + }, + + setSelected: function (b) { + BI.ColorPickerButton.superclass.setSelected.apply(this, arguments); + if (!!b) { + this._createMask(); + } + BI.Maskers[!!b ? "show" : "hide"](this.getName()); + } +}); +BI.ColorPickerButton.EVENT_CHANGE = "ColorPickerButton.EVENT_CHANGE"; +BI.shortcut("bi.color_picker_button", BI.ColorPickerButton);/** + * 简单选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPicker + * @extends BI.Widget + */ +BI.ColorPicker = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-picker", + items: null + }) + }, + + _items: [ + [{ + value: "#ffffff" + }, { + value: "#f2f2f2" + }, { + value: "#e5e5e5" + }, { + value: "#d9d9d9" + }, { + value: "#cccccc" + }, { + value: "#bfbfbf" + }, { + value: "#b2b2b2" + }, { + value: "#a6a6a6" + }, { + value: "#999999" + }, { + value: "#8c8c8c" + }, { + value: "#808080" + }, { + value: "#737373" + }, { + value: "#666666" + }, { + value: "#4d4d4d" + }, { + value: "#333333" + }, { + value: "#000000" + }], + [{ + value: "#d8b5a6" + }, { + value: "#ff9e9a" + }, { + value: "#ffc17d" + }, { + value: "#f5e56b" + }, { + value: "#d8e698" + }, { + value: "#e0ebaf" + }, { + value: "#c3d825" + }, { + value: "#bce2e8" + }, { + value: "#85d3cd" + }, { + value: "#bce2e8" + }, { + value: "#a0d8ef" + }, { + value: "#89c3eb" + }, { + value: "#bbc8e6" + }, { + value: "#bbbcde" + }, { + value: "#d6b4cc" + }, { + value: "#fbc0d3" + }], + [{ + value: "#bb9581" + }, { + value: "#f37d79" + }, { + value: "#fba74f" + }, { + value: "#ffdb4f" + }, { + value: "#c7dc68" + }, { + value: "#b0ca71" + }, { + value: "#99ab4e" + }, { + value: "#84b9cb" + }, { + value: "#00a3af" + }, { + value: "#2ca9e1" + }, { + value: "#0095d9" + }, { + value: "#4c6cb3" + }, { + value: "#8491c3" + }, { + value: "#a59aca" + }, { + value: "#cc7eb1" + }, { + value: "#e89bb4" + }], + [{ + value: "#9d775f" + }, { + value: "#dd4b4b" + }, { + value: "#ef8b07" + }, { + value: "#fcc800" + }, { + value: "#aacf53" + }, { + value: "#82ae46" + }, { + value: "#69821b" + }, { + value: "#59b9c6" + }, { + value: "#2a83a2" + }, { + value: "#007bbb" + }, { + value: "#19448e" + }, { + value: "#274a78" + }, { + value: "#4a488e" + }, { + value: "#7058a3" + }, { + value: "#884898" + }, { + value: "#d47596" + }] + ], + + _init: function () { + BI.ColorPicker.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colors = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(o.items || this._items, { + type: "bi.color_picker_button", + once: false + }), + layouts: [{ + type: "bi.grid" + }] + }); + this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () { + self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments); + }) + }, + + populate: function(items){ + var args =[].slice.call(arguments); + args[0] = BI.createItems(items, { + type: "bi.color_picker_button", + once: false + }); + this.colors.populate.apply(this.colors, args); + }, + + setValue: function (color) { + this.colors.setValue(color); + }, + + getValue: function () { + return this.colors.getValue(); + } +}); +BI.ColorPicker.EVENT_CHANGE = "ColorPicker.EVENT_CHANGE"; +BI.shortcut("bi.color_picker", BI.ColorPicker);/** + * 简单选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPickerEditor + * @extends BI.Widget + */ +BI.ColorPickerEditor = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-picker-editor", + width: 200, + height: 20 + }) + }, + + _init: function () { + BI.ColorPickerEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colorShow = BI.createWidget({ + type: "bi.layout", + cls: "color-picker-editor-display bi-card", + height: 20 + }); + var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { + type: "bi.label", + cls: "color-picker-editor-label", + width: 10, + height: 20 + })); + + var checker = function (v) { + return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255; + }; + var Ws = BI.createWidgets([{}, {}, {}], { + type: "bi.small_text_editor", + cls: "color-picker-editor-input", + validationChecker: checker, + errorText: BI.i18nText("BI-Color_Picker_Error_Text"), + allowBlank: true, + value: 255, + width: 32, + height: 20 + }); + BI.each(Ws, function (i, w) { + w.on(BI.TextEditor.EVENT_CHANGE, function () { + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + }); + this.R = Ws[0]; + this.G = Ws[1]; + this.B = Ws[2]; + + this.none = BI.createWidget({ + type: "bi.checkbox", + title: BI.i18nText("BI-Basic_Auto") + }); + this.none.on(BI.Checkbox.EVENT_CHANGE, function () { + if (this.isSelected()) { + self.lastColor = self.getValue(); + self.setValue(""); + } else { + self.setValue(self.lastColor || "#000000"); + } + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + + this.transparent = BI.createWidget({ + type: "bi.checkbox", + title: BI.i18nText("BI-Transparent_Color") + }); + this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () { + if (this.isSelected()) { + self.lastColor = self.getValue(); + self.setValue("transparent"); + } else { + self.setValue(self.lastColor || "#000000"); + } + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + + BI.createWidget({ + type: "bi.htape", + element: this, + items: [{ + el: this.colorShow, + width: 'fill' + }, { + el: RGB[0], + lgap: 10, + width: 16 + }, { + el: this.R, + width: 32 + }, { + el: RGB[1], + lgap: 10, + width: 16 + }, { + el: this.G, + width: 32 + }, { + el: RGB[2], + lgap: 10, + width: 16 + }, { + el: this.B, + width: 32 + }, { + el: { + type: "bi.center_adapt", + items: [this.none] + }, + width: 18 + }, { + el: { + type: "bi.center_adapt", + items: [this.transparent] + }, + width: 18 + }] + }) + }, + + setValue: function (color) { + if (color === "transparent") { + this.transparent.setSelected(true); + this.none.setSelected(false); + this.R.setValue(""); + this.G.setValue(""); + this.B.setValue(""); + return; + } + if (!color) { + color = ""; + this.none.setSelected(true); + } else { + this.none.setSelected(false); + } + this.transparent.setSelected(false); + this.colorShow.element.css("background-color", color); + var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); + this.R.setValue(BI.isNull(json.r) ? "" : json.r); + this.G.setValue(BI.isNull(json.g) ? "" : json.g); + this.B.setValue(BI.isNull(json.b) ? "" : json.b); + }, + + getValue: function () { + if (this.transparent.isSelected()) { + return "transparent"; + } + return BI.DOM.rgb2hex(BI.DOM.json2rgb({ + r: this.R.getValue(), + g: this.G.getValue(), + b: this.B.getValue() + })) + } +}); +BI.ColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE"; +BI.shortcut("bi.color_picker_editor", BI.ColorPickerEditor);/** + * 选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.Farbtastic + * @extends BI.Widget + */ +BI.Farbtastic = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-farbtastic", + width: 195, + height: 195 + }) + }, + + _init: function () { + BI.Farbtastic.superclass._init.apply(this, arguments); + }, + + mounted: function () { + var self = this; + this.farbtastic = $.farbtastic(this.element, function (v) { + self.fireEvent(BI.Farbtastic.EVENT_CHANGE, self.getValue(), self); + }); + }, + + setValue: function (color) { + this.farbtastic.setColor(color); + }, + + getValue: function () { + return this.farbtastic.color; + } +}); +BI.Farbtastic.EVENT_CHANGE = "Farbtastic.EVENT_CHANGE"; +BI.shortcut("bi.farbtastic", BI.Farbtastic);/** + * Farbtastic Color Picker 1.2 + * © 2008 Steven Wittens + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +jQuery.fn.farbtastic = function (callback) { + $.farbtastic(this, callback); + return this; +}; + +jQuery.farbtastic = function (container, callback) { + var container = $(container).get(0); + return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); +} + +jQuery._farbtastic = function (container, callback) { + // Store farbtastic object + var fb = this; + + // Insert markup + $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>'); + var e = $('.farbtastic', container); + fb.wheel = $('.wheel', container).get(0); + // Dimensions + fb.radius = 84; + fb.square = 100; + fb.width = 194; + + // Fix background PNGs in IE6 + if (navigator.appVersion.match(/MSIE [0-6]\./)) { + $('*', e).each(function () { + if (this.currentStyle.backgroundImage != 'none') { + var image = this.currentStyle.backgroundImage; + image = this.currentStyle.backgroundImage.substring(5, image.length - 2); + $(this).css({ + 'backgroundImage': 'none', + 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" + }); + } + }); + } + + /** + * Link to the given element(s) or callback. + */ + fb.linkTo = function (callback) { + // Unbind previous nodes + if (typeof fb.callback == 'object') { + $(fb.callback).unbind('keyup', fb.updateValue); + } + + // Reset color + fb.color = null; + + // Bind callback or elements + if (typeof callback == 'function') { + fb.callback = callback; + } + else if (typeof callback == 'object' || typeof callback == 'string') { + fb.callback = $(callback); + fb.callback.bind('keyup', fb.updateValue); + if (fb.callback.get(0).value) { + fb.setColor(fb.callback.get(0).value); + } + } + return this; + } + fb.updateValue = function (event) { + if (this.value && this.value != fb.color) { + fb.setColor(this.value); + } + } + + /** + * Change color with HTML syntax #123456 + */ + fb.setColor = function (color) { + var unpack = fb.unpack(color); + if (fb.color != color && unpack) { + fb.color = color; + fb.rgb = unpack; + fb.hsl = fb.RGBToHSL(fb.rgb); + fb.updateDisplay(); + } + return this; + } + + /** + * Change color with HSL triplet [0..1, 0..1, 0..1] + */ + fb.setHSL = function (hsl) { + fb.hsl = hsl; + fb.rgb = fb.HSLToRGB(hsl); + fb.color = fb.pack(fb.rgb); + fb.updateDisplay(); + return this; + } + + ///////////////////////////////////////////////////// + + /** + * Retrieve the coordinates of the given event relative to the center + * of the widget. + */ + fb.widgetCoords = function (event) { + var x, y; + var el = event.target || event.srcElement; + var reference = fb.wheel; + + if (typeof event.offsetX != 'undefined') { + // Use offset coordinates and find common offsetParent + var pos = { x: event.offsetX, y: event.offsetY }; + + // Send the coordinates upwards through the offsetParent chain. + var e = el; + while (e) { + e.mouseX = pos.x; + e.mouseY = pos.y; + pos.x += e.offsetLeft; + pos.y += e.offsetTop; + e = e.offsetParent; + } + + // Look for the coordinates starting from the wheel widget. + var e = reference; + var offset = { x: 0, y: 0 } + while (e) { + if (typeof e.mouseX != 'undefined') { + x = e.mouseX - offset.x; + y = e.mouseY - offset.y; + break; + } + offset.x += e.offsetLeft; + offset.y += e.offsetTop; + e = e.offsetParent; + } + + // Reset stored coordinates + e = el; + while (e) { + e.mouseX = undefined; + e.mouseY = undefined; + e = e.offsetParent; + } + } + else { + // Use absolute coordinates + var pos = fb.absolutePosition(reference); + x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; + y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; + } + // Subtract distance to middle + return { x: x - fb.width / 2, y: y - fb.width / 2 }; + } + + /** + * Mousedown handler + */ + fb.mousedown = function (event) { + // Capture mouse + if (!document.dragging) { + $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); + document.dragging = true; + } + + // Check which area is being dragged + var pos = fb.widgetCoords(event); + fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; + + // Process + fb.mousemove(event); + return false; + } + + /** + * Mousemove handler + */ + fb.mousemove = function (event) { + // Get coordinates relative to color picker center + var pos = fb.widgetCoords(event); + + // Set new HSL parameters + if (fb.circleDrag) { + var hue = Math.atan2(pos.x, -pos.y) / 6.28; + if (hue < 0) hue += 1; + fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); + } + else { + var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); + var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); + fb.setHSL([fb.hsl[0], sat, lum]); + } + return false; + } + + /** + * Mouseup handler + */ + fb.mouseup = function () { + // Uncapture mouse + $(document).unbind('mousemove', fb.mousemove); + $(document).unbind('mouseup', fb.mouseup); + document.dragging = false; + } + + /** + * Update the markers and styles + */ + fb.updateDisplay = function () { + // Markers + var angle = fb.hsl[0] * 6.28; + $('.h-marker', e).css({ + left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', + top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' + }); + + $('.sl-marker', e).css({ + left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', + top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' + }); + + // Saturation/Luminance gradient + $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); + + // Linked elements or callback + if (typeof fb.callback == 'object') { + // Set background/foreground color + $(fb.callback).css({ + backgroundColor: fb.color, + color: fb.hsl[2] > 0.5 ? '#000' : '#fff' + }); + + // Change linked value + $(fb.callback).each(function() { + if (this.value && this.value != fb.color) { + this.value = fb.color; + } + }); + } + else if (typeof fb.callback == 'function') { + fb.callback.call(fb, fb.color); + } + } + + /** + * Get absolute position of element + */ + fb.absolutePosition = function (el) { + var r = { x: el.offsetLeft, y: el.offsetTop }; + // Resolve relative to offsetParent + if (el.offsetParent) { + var tmp = fb.absolutePosition(el.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; + }; + + /* Various color utility functions */ + fb.pack = function (rgb) { + var r = Math.round(rgb[0] * 255); + var g = Math.round(rgb[1] * 255); + var b = Math.round(rgb[2] * 255); + return '#' + (r < 16 ? '0' : '') + r.toString(16) + + (g < 16 ? '0' : '') + g.toString(16) + + (b < 16 ? '0' : '') + b.toString(16); + } + + fb.unpack = function (color) { + if (color.length == 7) { + return [parseInt('0x' + color.substring(1, 3)) / 255, + parseInt('0x' + color.substring(3, 5)) / 255, + parseInt('0x' + color.substring(5, 7)) / 255]; + } + else if (color.length == 4) { + return [parseInt('0x' + color.substring(1, 2)) / 15, + parseInt('0x' + color.substring(2, 3)) / 15, + parseInt('0x' + color.substring(3, 4)) / 15]; + } + } + + fb.HSLToRGB = function (hsl) { + var m1, m2, r, g, b; + var h = hsl[0], s = hsl[1], l = hsl[2]; + m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; + m1 = l * 2 - m2; + return [this.hueToRGB(m1, m2, h+0.33333), + this.hueToRGB(m1, m2, h), + this.hueToRGB(m1, m2, h-0.33333)]; + } + + fb.hueToRGB = function (m1, m2, h) { + h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); + if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; + if (h * 2 < 1) return m2; + if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; + return m1; + } + + fb.RGBToHSL = function (rgb) { + var min, max, delta, h, s, l; + var r = rgb[0], g = rgb[1], b = rgb[2]; + min = Math.min(r, Math.min(g, b)); + max = Math.max(r, Math.max(g, b)); + delta = max - min; + l = (min + max) / 2; + s = 0; + if (l > 0 && l < 1) { + s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); + } + h = 0; + if (delta > 0) { + if (max == r && max != g) h += (g - b) / delta; + if (max == g && max != b) h += (2 + (b - r) / delta); + if (max == b && max != r) h += (4 + (r - g) / delta); + h /= 6; + } + return [h, s, l]; + } + + // Install mousedown handler (the others are set on the document on-demand) + $('*', e).mousedown(fb.mousedown); + + // Init color + fb.setColor('#000000'); + + // Set linked elements/callback + if (callback) { + fb.linkTo(callback); + } +}/** + * Created by GUY on 2017/2/8. * - * @class BI.IconChangeButton - * @extends BI.Single + * @class BI.BubbleCombo + * @extends BI.Widget */ -BI.IconChangeButton = BI.inherit(BI.Single, { +BI.BubbleCombo = BI.inherit(BI.Widget, { + _const: { + TRIANGLE_LENGTH: 6 + }, _defaultConfig: function () { - var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-icon-change-button", - iconClass: "", - iconWidth: null, - iconHeight: null, - - stopEvent: false, + return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-bubble-combo", + trigger: "click", + toggle: true, + direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right + isDefaultInit: false, + destroyWhenHide: false, + isNeedAdjustHeight: true,//是否需要高度调整 + isNeedAdjustWidth: true, stopPropagation: false, - selected: false, - once: false, //点击一次选中有效,再点无效 - forceSelected: false, //点击即选中, 选中了就不会被取消 - forceNotSelected: false, //无论怎么点击都不会被选中 - disableSelected: false, //使能选中 - - shadow: false, - isShadowShowingOnSelected: false, //选中状态下是否显示阴影 - trigger: null, - handler: BI.emptyFn + adjustLength: 0,//调整的距离 + // adjustXOffset: 0, + // adjustYOffset: 10, + hideChecker: BI.emptyFn, + offsetStyle: "left", //left,right,center + el: {}, + popup: {}, }) }, - _init: function () { - BI.IconChangeButton.superclass._init.apply(this, arguments); + BI.BubbleCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.button = BI.createWidget({ - type: "bi.icon_button", + this.combo = BI.createWidget({ + type: "bi.combo", element: this, - cls: o.iconClass, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight, - - stopEvent: o.stopEvent, - stopPropagation: o.stopPropagation, - selected: o.selected, - once: o.once, - forceSelected: o.forceSelected, - forceNotSelected: o.forceNotSelected, - disableSelected: o.disableSelected, - - shadow: o.shadow, - isShadowShowingOnSelected: o.isShadowShowingOnSelected, trigger: o.trigger, - handler: o.handler + toggle: o.toggle, + direction: o.direction, + isDefaultInit: o.isDefaultInit, + destroyWhenHide: o.destroyWhenHide, + isNeedAdjustHeight: o.isNeedAdjustHeight, + isNeedAdjustWidth: o.isNeedAdjustWidth, + adjustLength: this._getAdjustLength(), + stopPropagation: o.stopPropagation, + adjustXOffset: 0, + adjustYOffset: 0, + hideChecker: o.hideChecker, + offsetStyle: o.offsetStyle, + el: o.el, + popup: BI.extend({ + type: "bi.bubble_popup_view" + }, o.popup), }); - - this.button.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments); }); - this.button.on(BI.IconButton.EVENT_CHANGE, function () { - self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments); + this.combo.on(BI.Combo.EVENT_CHANGE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments); + }); + this.combo.on(BI.Combo.EVENT_EXPAND, function () { + self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments); + }); + this.combo.on(BI.Combo.EVENT_COLLAPSE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () { + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self._showTriangle(); + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { + self._hideTriangle(); + self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments); }); }, - isSelected: function () { - return this.button.isSelected(); - }, - - setSelected: function (b) { - this.button.setSelected(b); + _getAdjustLength: function () { + return this._const.TRIANGLE_LENGTH + this.options.adjustLength; }, - setIcon: function (cls) { - var o = this.options; - if (o.iconClass !== cls) { - this.element.removeClass(o.iconClass).addClass(cls); - o.iconClass = cls; + _createTriangle: function (direction) { + var pos = {}, op = {}; + var adjustLength = this.options.adjustLength; + var offset = this.element.offset(); + var left = offset.left, right = offset.left + this.element.outerWidth(); + var top = offset.top, bottom = offset.top + this.element.outerHeight(); + switch (direction) { + case "left": + pos = { + top: top, + height: this.element.outerHeight(), + left: left - adjustLength - this._const.TRIANGLE_LENGTH + }; + op = {width: this._const.TRIANGLE_LENGTH}; + break; + case "right": + pos = { + top: top, + height: this.element.outerHeight(), + left: right + adjustLength + }; + op = {width: this._const.TRIANGLE_LENGTH}; + break; + case "top": + pos = { + left: left, + width: this.element.outerWidth(), + top: top - adjustLength - this._const.TRIANGLE_LENGTH + }; + op = {height: this._const.TRIANGLE_LENGTH}; + break; + case "bottom": + pos = { + left: left, + width: this.element.outerWidth(), + top: bottom + adjustLength + }; + op = {height: this._const.TRIANGLE_LENGTH}; + break; + default: + break; } - } -}); -BI.IconChangeButton.EVENT_CHANGE = "IconChangeButton.EVENT_CHANGE"; -BI.shortcut("bi.icon_change_button", BI.IconChangeButton);/** - * guy - * @extends BI.Single - * @type {*|void|Object} - */ -BI.HalfIconButton = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments); - return BI.extend(conf, { - extraCls: "bi-half-icon-button check-half-select-icon", - height: 16, - width: 16, - iconWidth: 16, - iconHeight: 16, - selected: false + this.triangle && this.triangle.destroy(); + this.triangle = BI.createWidget(op, { + type: "bi.center_adapt", + cls: "button-combo-triangle-wrapper", + items: [{ + type: "bi.layout", + cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" + }] + }); + pos.el = this.triangle; + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [pos] }) }, - _init : function() { - BI.HalfIconButton.superclass._init.apply(this, arguments); + _createLeftTriangle: function () { + this._createTriangle("left"); }, - doClick: function(){ - BI.HalfIconButton.superclass.doClick.apply(this, arguments); - if(this.isValid()){ - this.fireEvent(BI.HalfIconButton.EVENT_CHANGE); - } - } -}); -BI.HalfIconButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE"; - -BI.shortcut("bi.half_icon_button", BI.HalfIconButton);/** - * 统一的trigger图标按钮 - * - * Created by GUY on 2015/9/16. - * @class BI.TriggerIconButton - * @extends BI.IconButton - */ -BI.TriggerIconButton = BI.inherit(BI.IconButton, { - - _defaultConfig: function () { - var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", - extraCls: "pull-down-font" - }); + _createRightTriangle: function () { + this._createTriangle("right"); }, - _init: function () { - BI.TriggerIconButton.superclass._init.apply(this, arguments); + _createTopTriangle: function () { + this._createTriangle("top"); }, - doClick: function () { - BI.TriggerIconButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this); - } - } -}); -BI.TriggerIconButton.EVENT_CHANGE = "TriggerIconButton.EVENT_CHANGE"; -BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.MultiSelectItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multi-select-item", - height: 25, - logic: { - dynamic: false - } - }) + _createBottomTriangle: function () { + this._createTriangle("bottom"); }, - _init: function () { - BI.MultiSelectItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - rgap: o.rgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.center_adapt", - items: [this.checkbox], - width: 36 - }, this.text) - })))); + _showTriangle: function () { + var pos = this.combo.getPopupPosition(); + switch (pos.dir) { + case "left,top": + case "left,bottom": + this._createLeftTriangle(); + this.combo.getView().showLine("right"); + break; + case "right,top": + case "right,bottom": + this._createRightTriangle(); + this.combo.getView().showLine("left"); + break; + case "top,left": + case "top,right": + this._createTopTriangle(); + this.combo.getView().showLine("bottom"); + break; + case "bottom,left": + case "bottom,right": + this._createBottomTriangle(); + this.combo.getView().showLine("top"); + break; + } }, - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); + _hideTriangle: function () { + this.triangle && this.triangle.destroy(); + this.triangle = null; + this.combo.getView() && this.combo.getView().hideLine(); }, - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); + hideView: function () { + this._hideTriangle(); + this.combo && this.combo.hideView(); }, - doClick: function () { - BI.MultiSelectItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - if (this.isValid()) { - this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this); - } + showView: function () { + this.combo && this.combo.showView(); }, - setSelected: function (v) { - BI.MultiSelectItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); + isViewVisible: function () { + return this.combo.isViewVisible(); } }); -BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);/** - * Created by GUY on 2016/2/2. + +BI.BubbleCombo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.BubbleCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.BubbleCombo.EVENT_EXPAND = "EVENT_EXPAND"; +BI.BubbleCombo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.BubbleCombo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.BubbleCombo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.BubbleCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; +BI.shortcut("bi.bubble_combo", BI.BubbleCombo);/** + * Created by GUY on 2017/2/8. + * + * @class BI.BubblePopupView + * @extends BI.PopupView + */ +BI.BubblePopupView = BI.inherit(BI.PopupView, { + _defaultConfig: function () { + var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(config, { + baseCls: config.baseCls + " bi-bubble-popup-view" + }) + }, + _init: function () { + BI.BubblePopupView.superclass._init.apply(this, arguments); + }, + + showLine: function (direction) { + var pos = {}, op = {}; + switch (direction) { + case "left": + pos = { + top: 0, + bottom: 0, + left: -1 + }; + op = {width: 3}; + break; + case "right": + pos = { + top: 0, + bottom: 0, + right: -1 + }; + op = {width: 3}; + break; + case "top": + pos = { + left: 0, + right: 0, + top: -1 + }; + op = {height: 3}; + break; + case "bottom": + pos = { + left: 0, + right: 0, + bottom: -1 + }; + op = {height: 3}; + break; + default: + break; + } + this.line = BI.createWidget(op, { + type: "bi.layout", + cls: "bubble-popup-line bi-high-light-background" + }); + pos.el = this.line; + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [pos] + }) + }, + + hideLine: function () { + this.line && this.line.destroy(); + } +}); + +BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); + +/** + * Created by GUY on 2017/2/8. + * + * @class BI.BubblePopupBarView + * @extends BI.BubblePopupView + */ +BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { + _defaultConfig: function () { + return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-bubble-bar-popup-view", + buttons: [{value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}, {value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}] + }) + }, + _init: function () { + BI.BubblePopupBarView.superclass._init.apply(this, arguments); + }, + _createToolBar: function () { + var o = this.options, self = this; + + var items = []; + BI.each(o.buttons.reverse(), function (i, buttonOpt) { + if(BI.isWidget(buttonOpt)){ + items.push(buttonOpt); + }else{ + items.push(BI.extend({ + type: 'bi.button', + height: 30, + handler: function (v) { + self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); + } + }, buttonOpt)) + } + }); + return BI.createWidget({ + type: 'bi.right_vertical_adapt', + height: 40, + hgap: 10, + bgap: 10, + items: items + }); + } +}); +BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; +BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/** + * Created by Young's on 2016/4/28. + */ +BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-check-editor-combo", + width: 100, + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "" + }) + }, + + _init: function () { + BI.EditorIconCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.editor_trigger", + items: o.items, + height: o.height, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () { + self.popup.setValue(this.getValue()); + self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.editorIconCheckCombo.hideView(); + self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editorIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.editorIconCheckCombo.setValue(v); + }, + + getValue: function () { + return this.trigger.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.editorIconCheckCombo.populate(items); + } +}); +BI.EditorIconCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.editor_icon_check_combo", BI.EditorIconCheckCombo);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaCombo + * @extend BI.Widget + */ +BI.FormulaCombo = BI.inherit(BI.Widget, { + + _constant: { + POPUP_HEIGHT: 450, + POPUP_WIDTH: 600, + POPUP_V_GAP: 10, + POPUP_H_GAP: 10, + ADJUST_LENGTH: 2, + HEIGHT_MAX: 10000, + MAX_HEIGHT: 500, + MAX_WIDTH: 600, + COMBO_TRIGGER_WIDTH: 300 + }, + + _defaultConfig: function () { + return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-combo", + height: 30, + items: [] + }) + }, + + _init: function () { + BI.FormulaCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.formula_ids = []; + this.input = BI.createWidget({ + type: "bi.formula_combo_trigger", + height: o.height, + items: o.items + }); + this.formulaPopup = BI.createWidget({ + type: "bi.formula_combo_popup", + fieldItems: o.items + }); + + this.formulaInputCombo = BI.createWidget({ + type: "bi.combo", + element: this, + isNeedAdjustHeight: true, + isNeedAdjustWidth: false, + adjustLength: this._constant.ADJUST_LENGTH, + el: this.input, + popup: { + el: { + type: "bi.absolute", + height: this._constant.HEIGHT_MAX, + width: this._constant.POPUP_WIDTH, + items: [{ + el: this.formulaPopup, + top: this._constant.POPUP_V_GAP, + left: this._constant.POPUP_H_GAP, + right: this._constant.POPUP_V_GAP, + bottom: 0 + }] + }, + stopPropagation: false, + maxHeight: this._constant.MAX_HEIGHT, + width: this._constant.MAX_WIDTH + } + }); + this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self.formulaPopup.setValue(self.input.getValue()); + }); + this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE, function () { + self.setValue(self.formulaPopup.getValue()); + self.formulaInputCombo.hideView(); + self.fireEvent(BI.FormulaCombo.EVENT_CHANGE); + }); + this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL, function () { + self.formulaInputCombo.hideView(); + }); + }, + + setValue: function (v) { + if (this.formulaInputCombo.isViewVisible()) { + this.formulaInputCombo.hideView(); + } + this.input.setValue(v); + this.input.setText(BI.Func.getFormulaStringFromFormulaValue(v)); + this.formulaPopup.setValue(this.input.getValue()); + }, + + getFormulaTargetIds: function() { + return this.formulaPopup.getFormulaTargetIds(); + }, + + getValue: function () { + return this.input.getValue(); + } +}); +BI.FormulaCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.formula_combo", BI.FormulaCombo);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaComboPopup + * @extend BI.Widget + */ +BI.FormulaComboPopup = BI.inherit(BI.Widget, { + + _constant: { + BUTTON_HEIGHT: 30, + SOUTH_HEIGHT: 60, + SOUTH_H_GAP: 10 + }, + + _defaultConfig: function () { + return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-pane-popup" + }) + }, + + _init: function () { + BI.FormulaComboPopup.superclass._init.apply(this, arguments); + this.populate(); + }, + + populate: function () { + var self = this, fieldItems = this.options.fieldItems; + this.formula = BI.createWidget({ + type: "bi.formula_insert" + }); + this.formula.populate(fieldItems); + var confirmButton = BI.createWidget({ + type: "bi.button", + level: "common", + height: this._constant.BUTTON_HEIGHT, + text: BI.i18nText("BI-Basic_OK") + }); + var cancelButton = BI.createWidget({ + type: "bi.button", + level: "ignore", + height: this._constant.BUTTON_HEIGHT, + text: BI.i18nText("BI-Basic_Cancel") + }); + + this.formula.on(BI.FormulaInsert.EVENT_CHANGE, function () { + confirmButton.setEnable(self.formula.checkValidation()); + }); + confirmButton.on(BI.Button.EVENT_CHANGE, function () { + self.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE); + }); + cancelButton.on(BI.Button.EVENT_CHANGE, function () { + self.setValue(self.oldValue); + self.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL); + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: this.formula, + height: "fill" + }, { + el: { + type: "bi.right_vertical_adapt", + height: this._constant.SOUTH_HEIGHT, + items: [cancelButton, confirmButton], + hgap: this._constant.SOUTH_H_GAP + }, + height: this._constant.SOUTH_HEIGHT + }] + }) + }, + + getFormulaTargetIds: function(){ + return this.formula.getUsedFields(); + }, + + getValue: function () { + return this.formula.getValue(); + }, + + setValue: function (v) { + this.oldValue = v; + this.formula.setValue(v); + } +}); +BI.FormulaComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.FormulaComboPopup.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; +BI.shortcut("bi.formula_combo_popup", BI.FormulaComboPopup);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaComboTrigger + * @extend BI.Widget + */ +BI.FormulaComboTrigger = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-combo-trigger", + height: 30, + items: [] + }) + }, + + _init: function () { + BI.FormulaComboTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.label = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + textHeight: this.options.height, + lgap: 10 + }); + }, + + _getTextFromFormulaValue: function (formulaValue) { + var self = this; + var formulaString = ""; + var regx = /\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g; + var result = formulaValue.match(regx); + BI.each(result, function (i, item) { + var fieldRegx = /\$[\{][^\}]*[\}]/; + var str = item.match(fieldRegx); + if (BI.isNotEmptyArray(str)) { + var id = str[0].substring(2, item.length - 1); + var item = BI.find(BI.flatten(self.options.items), function (i, item) { + return id === item.value; + }); + formulaString = formulaString + item.text; + } else { + formulaString = formulaString + item; + } + }); + return formulaString; + }, + + getValue: function () { + return this.options.value; + }, + + setValue: function (v) { + this.options.value = v; + this.label.setText(this._getTextFromFormulaValue(v)); + } +}); +BI.shortcut("bi.formula_combo_trigger", BI.FormulaComboTrigger);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconCombo + * @extend BI.Widget + */ +BI.IconCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-icon-combo", + width: 24, + height: 24, + iconClass: "", + el: {}, + popup: {}, + minWidth: 100, + maxWidth: 'auto', + maxHeight: 300, + direction: "bottom", + adjustLength: 3,//调整的距离 + adjustXOffset: 0, + adjustYOffset: 0, + offsetStyle: "left", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }) + }, + + _init: function () { + BI.IconCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.icon_combo_trigger", + iconClass: o.iconClass, + title: o.title, + items: o.items, + width: o.width, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.popup = BI.createWidget(o.popup, { + type: "bi.icon_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.iconCombo.hideView(); + self.fireEvent(BI.IconCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.iconCombo = BI.createWidget({ + type: "bi.combo", + element: this, + direction: o.direction, + adjustLength: o.adjustLength, + adjustXOffset: o.adjustXOffset, + adjustYOffset: o.adjustYOffset, + offsetStyle: o.offsetStyle, + el: this.trigger, + popup: { + el: this.popup, + maxWidth: o.maxWidth, + maxHeight: o.maxHeight, + minWidth: o.minWidth + } + }); + }, + + showView: function () { + this.iconCombo.showView(); + }, + + hideView: function () { + this.iconCombo.hideView(); + }, + + setValue: function (v) { + this.iconCombo.setValue(v); + }, + + getValue: function () { + return this.iconCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.iconCombo.populate(items); + } +}); +BI.IconCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo", BI.IconCombo);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconComboPopup + * @extend BI.Pane + */ +BI.IconComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi.icon-combo-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.IconComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.single_select_icon_text_item", + height: 30 + }), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + populate: function (items) { + BI.IconComboPopup.superclass.populate.apply(this, arguments); + items = BI.createItems(items, { + type: "bi.single_select_icon_text_item", + height: 30 + }); + this.popup.populate(items); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.IconComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo_popup", BI.IconComboPopup);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconComboTrigger + * @extend BI.Widget + */ +BI.IconComboTrigger = BI.inherit(BI.Trigger, { + _defaultConfig: function () { + return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-combo-trigger", + el: {}, + items: [], + iconClass: "", + width: 25, + height: 25, + isShowDown: true + }); + }, + + _init: function () { + BI.IconComboTrigger.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.button = BI.createWidget(o.el, { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + disableSelected: true, + width: o.width, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.down = BI.createWidget({ + type: "bi.icon_button", + disableSelected: true, + cls: "icon-combo-down-icon trigger-triangle-font", + width: 12, + height: 8 + }); + this.down.setVisible(o.isShowDown); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.button, + left: 0, + right: 0, + top: 0, + bottom: 0 + }, { + el: this.down, + right: 0, + bottom: 0 + }] + }); + if (BI.isKey(o.value)) { + this.setValue(o.value); + } + }, + + populate: function (items) { + var o = this.options; + this.options.items = items || []; + this.button.setIcon(o.iconClass); + this.button.setSelected(false); + this.down.setSelected(false); + }, + + setValue: function (v) { + BI.IconComboTrigger.superclass.setValue.apply(this, arguments); + var o = this.options; + var iconClass = ""; + v = BI.isArray(v) ? v[0] : v; + if (BI.any(this.options.items, function (i, item) { + if (v === item.value) { + iconClass = item.iconClass; + return true; + } + })) { + this.button.setIcon(iconClass); + this.button.setSelected(true); + this.down.setSelected(true); + } else { + this.button.setIcon(o.iconClass); + this.button.setSelected(false); + this.down.setSelected(false); + } + } +}); +BI.IconComboTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo_trigger", BI.IconComboTrigger);/** + * 单选combo + * + * @class BI.StaticCombo + * @extend BI.Widget + */ +BI.StaticCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-static-combo", + height: 30, + text: "", + el: {}, + items: [], + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }) + }, + + _init: function () { + BI.StaticCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.text_icon_item", + cls: "bi-select-text-trigger bi-border pull-down-font", + text: o.text, + readonly: true, + textLgap: 5, + height: o.height - 2 + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + textAlign: o.textAlign, + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.combo.hideView(); + self.fireEvent(BI.StaticCombo.EVENT_CHANGE, arguments); + }); + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup + } + }); + }, + + populate: function (items) { + this.combo.populate(items); + }, + + setValue: function (v) { + this.combo.setValue(v); + }, + + getValue: function () { + return this.combo.getValue(); + } +}); +BI.StaticCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.static_combo", BI.StaticCombo);/** + * @class BI.TextValueCheckCombo + * @extend BI.Widget + * combo : text + icon, popup : check + text + */ +BI.TextValueCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-text-value-check-combo", + width: 100, + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "" + }) + }, + + _init: function () { + BI.TextValueCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.textIconCheckCombo.hideView(); + self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.textIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setTitle: function (title) { + this.trigger.setTitle(title); + }, + + setValue: function (v) { + this.textIconCheckCombo.setValue(v); + }, + + setWarningTitle: function (title) { + this.trigger.setWarningTitle(title); + }, + + getValue: function () { + return this.textIconCheckCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.textIconCheckCombo.populate(items); + } +}); +BI.TextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo);/** + * @class BI.SmallTextValueCheckCombo + * @extend BI.Widget + * combo : text + icon, popup : check + text + */ +BI.SmallTextValueCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { + width: 100, + height: 24, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "" + }) + }, + + _init: function () { + BI.SmallTextValueCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.small_select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.SmallTextIconCheckCombo.hideView(); + self.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.SmallTextIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.SmallTextIconCheckCombo.setValue(v); + }, + + getValue: function () { + return this.SmallTextIconCheckCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.SmallTextIconCheckCombo.populate(items); + } +}); +BI.SmallTextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.small_text_value_check_combo", BI.SmallTextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-icon-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: this._formatItems(o.items), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + _formatItems: function (items) { + return BI.map(items, function (i, item) { + return BI.extend({ + type: "bi.icon_text_item", + cls: "item-check-font bi-list-item", + height: 30 + }, item); + }); + }, + + populate: function (items) { + BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments); + this.popup.populate(this._formatItems(items)); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.TextValueCheckComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/** + * @class BI.TextValueCombo + * @extend BI.Widget + * combo : text + icon, popup : text + * 参见场景dashboard布局方式选择 + */ +BI.TextValueCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-text-value-combo", + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "", + el: {} + }) + }, + + _init: function () { + BI.TextValueCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.textIconCombo.hideView(); + self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.textIconCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.textIconCombo.setValue(v); + }, + + getValue: function () { + return this.textIconCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.textIconCombo.populate(items); + } +}); +BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** + * @class BI.SmallTextValueCombo + * @extend BI.Widget + * combo : text + icon, popup : text + * 参见场景dashboard布局方式选择 + */ +BI.SmallTextValueCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), { + width: 100, + height: 24, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + el: {}, + text: "" + }) + }, + + _init: function () { + BI.SmallTextValueCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.small_select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.SmallTextValueCombo.hideView(); + self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.SmallTextValueCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.SmallTextValueCombo.setValue(v); + }, + + getValue: function () { + return this.SmallTextValueCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.SmallTextValueCombo.populate(items); + } +}); +BI.SmallTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-icon-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.TextValueComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.single_select_item", + textAlign: o.textAlign, + height: 30 + }), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + populate: function (items) { + BI.TextValueComboPopup.superclass.populate.apply(this, arguments); + items = BI.createItems(items, { + type: "bi.single_select_item", + height: 30 + }); + this.popup.populate(items); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.TextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_combo_popup", BI.TextValueComboPopup);/** + * @class BI.TextValueDownListCombo + * @extend BI.Widget + */ +BI.TextValueDownListCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-value-down-list-combo", + height: 30, + text: "" + }) + }, + + _init: function () { + BI.TextValueDownListCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this._createValueMap(); + + this.trigger = BI.createWidget({ + type: "bi.down_list_select_text_trigger", + height: o.height, + items: o.items + }); + + this.combo = BI.createWidget({ + type: "bi.down_list_combo", + element: this, + chooseType: BI.Selection.Single, + adjustLength: 2, + height: o.height, + el: this.trigger, + items: BI.deepClone(o.items) + }); + + this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () { + self.setValue(self.combo.getValue()[0].value); + self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); + }); + + this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () { + self.setValue(self.combo.getValue()[0].childValue); + self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); + }); + }, + + _createValueMap: function () { + var self = this; + this.valueMap = {}; + BI.each(BI.flatten(this.options.items), function (idx, item) { + if (BI.has(item, "el")) { + BI.each(item.children, function (id, it) { + self.valueMap[it.value] = {value: item.el.value, childValue: it.value} + }); + } else { + self.valueMap[item.value] = {value: item.value}; + } + }); + }, + + setValue: function (v) { + v = this.valueMap[v]; + this.combo.setValue([v]); + this.trigger.setValue(v.childValue || v.value); + }, + + getValue: function () { + var v = this.combo.getValue()[0]; + return [v.childValue || v.value]; + }, + + populate: function (items) { + this.options.items = BI.flatten(items); + this.combo.populate(items); + this._createValueMap(); + } +}); +BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);/** + * 选择字段trigger, downlist专用 + * 显示形式为 父亲值(儿子值) + * + * @class BI.DownListSelectTextTrigger + * @extends BI.Trigger + */ +BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-down-list-select-text-trigger", + height: 24, + text: "" + }); + }, + + _init: function () { + BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments); + var o = this.options; + this.trigger = BI.createWidget({ + type: "bi.select_text_trigger", + element: this, + height: o.height, + items: this._formatItemArray(o.items), + text: o.text + }); + }, + + _formatItemArray: function(){ + var sourceArray = BI.flatten(BI.deepClone(this.options.items)); + var targetArray = []; + BI.each(sourceArray, function(idx, item){ + if(BI.has(item, "el")){ + BI.each(item.children, function(id, it){ + it.text = item.el.text + "(" + it.text + ")"; + }); + targetArray = BI.concat(targetArray, item.children); + }else{ + targetArray.push(item); + } + }); + return targetArray; + }, + + setValue: function (vals) { + this.trigger.setValue(vals); + }, + + populate: function (items) { + this.trigger.populate(this._formatItemArray(items)); + } +}); +BI.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** + * 有清楚按钮的文本框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.ClearEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-clear-editor", + height: 30, + errorText: "", + watermark: "", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + BI.ClearEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.ClearEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: this.editor + }, + { + el: this.clear, + width: 25 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ClearEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ClearEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ClearEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ClearEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.ClearEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ClearEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.ClearEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ClearEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ClearEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ClearEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.ClearEditor.EVENT_START = "EVENT_START"; +BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; +BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; +BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.shortcut("bi.clear_editor", BI.ClearEditor);/** + * Created by roy on 15/9/14. + */ +BI.SearchEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-search-editor bi-border", + height: 30, + errorText: "", + watermark: BI.i18nText("BI-Basic_Search"), + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + this.options.height -= 2; + BI.SearchEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.SearchEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: { + type: "bi.center_adapt", + cls: "search-font", + items: [{ + el: { + type: "bi.icon" + } + }] + }, + width: 25 + }, + { + el: self.editor + }, + { + el: this.clear, + width: 25 + } + ] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SearchEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SearchEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SearchEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SearchEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SearchEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SearchEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.SearchEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SearchEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SearchEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SearchEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.SearchEditor.EVENT_START = "EVENT_START"; +BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; +BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; +BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.shortcut("bi.search_editor", BI.SearchEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallSearchEditor + * @extends BI.SearchEditor + */ +BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { + _defaultConfig: function () { + var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-search-editor", + height: 24 + }); + }, + + _init: function () { + BI.SmallSearchEditor.superclass._init.apply(this, arguments); + } +}); +BI.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** + * 带标记的文本框 + * Created by GUY on 2016/1/25. + * @class BI.ShelterEditor + * @extends BI.Widget + */ +BI.ShelterEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-shelter-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30, + textAlign: "left" + }) + }, + + _init: function () { + BI.ShelterEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "shelter-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: o.textAlign, + height: o.height, + hgap: 4 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + arguments[2] = self; + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setTextStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.ShelterEditor.EVENT_START = "EVENT_START"; +BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; +BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; +BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.shelter_editor", BI.ShelterEditor);/** + * Created by User on 2017/7/28. + */ +BI.SignInitialEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + value: "", + text: "", + height: 30 + }) + }, + + _init: function () { + BI.SignInitialEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "sign-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: "left", + height: o.height, + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL) + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.SignInitialEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + var v = this.editor.getValue(); + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.text.setValue(v); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + var o = this.options; + this.editor.setValue(v.value); + o.text = v.text || o.text; + this._checkText(); + }, + + getValue: function () { + return { + value: this.editor.getValue(), + text: this.options.text + } + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + var o = this.options; + this._showHint(); + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.text.setValue(v); + } +}); +BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignInitialEditor.EVENT_START = "EVENT_START"; +BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** + * 带标记的文本框 + * Created by GUY on 2015/8/28. + * @class BI.SignEditor + * @extends BI.Widget + */ +BI.SignEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.SignEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "sign-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: "left", + height: o.height, + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SignEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignEditor.EVENT_START = "EVENT_START"; +BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.sign_editor", BI.SignEditor);/** + * guy + * 记录状态的输入框 + * @class BI.StateEditor + * @extends BI.Single + */ +BI.StateEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-state-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.StateEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "state-editor-infinite-text bi-disabled", + textAlign: "left", + height: o.height, + text: BI.i18nText("BI-Basic_Unrestricted"), + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.setValue(""); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.StateEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.StateEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.StateEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + focus: function () { + if (this.options.disabled === false) { + this._showInput(); + this.editor.focus(); + } + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getValue().match(/[^\s]+/g); + }, + + setState: function (v) { + BI.StateEditor.superclass.setValue.apply(this, arguments); + if (BI.isNumber(v)) { + if (v === BI.Selection.All) { + this.text.setText(BI.i18nText("BI-Select_All")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (v === BI.Selection.Multi) { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.setTitle(""); + this.text.element.addClass("state-editor-infinite-text"); + } + return; + } + if (BI.isString(v)) { + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } + return; + } + if (BI.isArray(v)) { + if (BI.isEmpty(v)) { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } else if (v.length === 1) { + this.text.setText(v[0]); + this.text.setTitle(v[0]); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } + } + } +}); +BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.StateEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.StateEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.StateEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.StateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.StateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.StateEditor.EVENT_START = "EVENT_START"; +BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.StateEditor.EVENT_STOP = "EVENT_STOP"; +BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.StateEditor.EVENT_VALID = "EVENT_VALID"; +BI.StateEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.StateEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.StateEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.state_editor", BI.StateEditor);/** + * 无限制-已选择状态输入框 + * Created by GUY on 2016/5/18. + * @class BI.SimpleStateEditor + * @extends BI.Single + */ +BI.SimpleStateEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-simple-state-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.SimpleStateEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "state-editor-infinite-text bi-disabled", + textAlign: "left", + height: o.height, + text: BI.i18nText("BI-Basic_Unrestricted"), + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.setValue(""); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getValue().match(/[^\s]+/g); + }, + + setState: function (v) { + BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); + if (BI.isNumber(v)) { + if (v === BI.Selection.All) { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (v === BI.Selection.Multi) { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } + return; + } + if (!BI.isArray(v) || v.length === 1) { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (BI.isEmpty(v)) { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } + } +}); +BI.SimpleStateEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SimpleStateEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SimpleStateEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SimpleStateEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SimpleStateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SimpleStateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SimpleStateEditor.EVENT_START = "EVENT_START"; +BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP"; +BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID"; +BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SimpleStateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** + * guy + * @class BI.TextEditor + * @extends BI.Single + */ +BI.TextEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-text-editor bi-border", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: false, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.TextEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isNumber(o.height)) { + this.element.css({height: o.height - 2}); + } + if (BI.isNumber(o.width)) { + this.element.css({width: o.width - 2}); + } + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height - 2, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.TextEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.TextEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.TextEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.TextEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_SPACE); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.TextEditor.EVENT_VALID); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.TextEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_REMOVE); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.TextEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.TextEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.TextEditor.EVENT_STOP); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.TextEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.TextEditor.EVENT_EMPTY); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setValue: function (v) { + this.editor.setValue(v); + }, + + getValue: function () { + return this.editor.getValue(); + } +}); +BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.TextEditor.EVENT_START = "EVENT_START"; +BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.TextEditor.EVENT_STOP = "EVENT_STOP"; +BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.TextEditor.EVENT_VALID = "EVENT_VALID"; +BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.text_editor", BI.TextEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.SmallTextEditor = BI.inherit(BI.TextEditor, { + _defaultConfig: function () { + var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-text-editor", + height: 25 + }); + }, + + _init: function () { + BI.SmallTextEditor.superclass._init.apply(this, arguments); + } +}); +BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** + * 有确定取消按钮的弹出层 + * @class BI.BarFloatSection + * @extends BI.FloatSection + * @abstract + */ +BI.BarFloatSection = BI.inherit(BI.FloatSection, { + _defaultConfig: function () { + return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this, arguments), { + btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText("BI-Basic_Cancel")] + }) + }, + + _init: function () { + BI.BarFloatSection.superclass._init.apply(this, arguments); + var self = this; + var flatten = ["_init", "_defaultConfig", "_vessel", "_render", "getName", "listenEnd", "local", "refresh", "load", "change"]; + flatten = BI.makeObject(flatten, true); + BI.each(this.constructor.caller.caller.caller.caller.prototype, function (key) { + if (flatten[key]) { + return; + } + var f = self[key]; + if (BI.isFunction(f)) { + self[key] = BI.bind(function () { + if (this.model._start === true) { + this._F.push({f: f, arg: arguments}); + return; + } + return f.apply(this, arguments); + }, self); + } + }) + }, + + rebuildSouth: function (south) { + var self = this, o = this.options; + this.sure = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[0], + height: 30, + value: 0, + handler: function (v) { + self.end(); + self.close(v); + } + }); + this.cancel = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[1], + height: 30, + value: 1, + level: 'ignore', + handler: function (v) { + self.close(v); + } + }); + BI.createWidget({ + type: 'bi.right_vertical_adapt', + element: south, + hgap: 5, + items: [this.cancel, this.sure] + }); + } +}); + +/** + * 有确定取消按钮的弹出层 + * @class BI.BarPopoverSection + * @extends BI.PopoverSection + * @abstract + */ +BI.BarPopoverSection = BI.inherit(BI.PopoverSection, { + _defaultConfig: function () { + return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this, arguments), { + btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] + }) + }, + + _init: function () { + BI.BarPopoverSection.superclass._init.apply(this, arguments); + }, + + rebuildSouth: function (south) { + var self = this, o = this.options; + this.sure = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[0], + warningTitle: o.warningTitle, + height: 30, + value: 0, + handler: function (v) { + self.end(); + self.close(v); + } + }); + this.cancel = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[1], + height: 30, + value: 1, + level: 'ignore', + handler: function (v) { + self.close(v); + } + }); + BI.createWidget({ + type: 'bi.right_vertical_adapt', + element: south, + hgap: 5, + items: [this.cancel, this.sure] + }); + }, + + setConfirmButtonEnable: function(v){ + this.sure.setEnable(!!v); + } +});/** + * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w + * @class BI.MultiPopupView + * @extends BI.Widget + */ + +BI.MultiPopupView = BI.inherit(BI.PopupView, { + + _defaultConfig: function () { + var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-multi-list-view", + buttons: [BI.i18nText("BI-Basic_Sure")] + }) + }, + + _init: function () { + BI.MultiPopupView.superclass._init.apply(this, arguments); + }, + + _createToolBar: function () { + var o = this.options, self = this; + if (o.buttons.length === 0) { + return; + } + + var text = []; //构造[{text:content},……] + BI.each(o.buttons, function (idx, item) { + text.push({ + text: item, + value: idx + }) + }); + + this.buttongroup = BI.createWidget({ + type: "bi.button_group", + cls: "list-view-toolbar bi-high-light bi-border-top", + height: 30, + items: BI.createItems(text, { + type: "bi.text_button", + once: false, + shadow: true, + isShadowShowingOnSelected: true + }), + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }); + + this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { + self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj); + }); + + return this.buttongroup; + } + +}); + +BI.MultiPopupView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; + +BI.shortcut("bi.multi_popup_view", BI.MultiPopupView);/** + * 可以理解为MultiPopupView和Panel两个面板的结合体 + * @class BI.PopupPanel + * @extends BI.MultiPopupView + */ + +BI.PopupPanel = BI.inherit(BI.MultiPopupView, { + + _defaultConfig: function () { + var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-popup-panel", + title: "" + }) + }, + + _init: function () { + BI.PopupPanel.superclass._init.apply(this, arguments); + }, + + _createTool: function () { + var self = this, o = this.options; + var close = BI.createWidget({ + type: "bi.icon_button", + cls: "close-h-font", + width: 25, + height: 25 + }); + close.on(BI.IconButton.EVENT_CHANGE, function () { + self.setVisible(false); + self.fireEvent(BI.PopupPanel.EVENT_CLOSE); + }); + return BI.createWidget({ + type: "bi.htape", + cls: "popup-panel-title bi-background bi-border", + height: 25, + items: [{ + el: { + type: "bi.label", + textAlign: "left", + text: o.title, + height: 25, + lgap: 10 + } + }, { + el: close, + width: 25 + }] + }); + } +}); + +BI.PopupPanel.EVENT_CHANGE = "EVENT_CHANGE"; +BI.PopupPanel.EVENT_CLOSE = "EVENT_CLOSE"; +BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; + +BI.shortcut("bi.popup_panel", BI.PopupPanel);/** + * list面板 + * + * Created by GUY on 2015/10/30. + * @class BI.ListPane + * @extends BI.Pane + */ +BI.ListPane = BI.inherit(BI.Pane, { + + _defaultConfig: function () { + var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-list-pane", + logic: { + dynamic: true + }, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + items: [], + itemsCreator: BI.emptyFn, + hasNext: BI.emptyFn, + onLoaded: BI.emptyFn, + el: { + type: "bi.button_group" + } + }) + }, + _init: function () { + BI.ListPane.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + behaviors: {}, + items: o.items, + itemsCreator: function (op, calback) { + if (op.times === 1) { + self.empty(); + BI.nextTick(function () { + self.loading() + }); + } + o.itemsCreator(op, function () { + calback.apply(self, arguments); + op.times === 1 && BI.nextTick(function () { + self.loaded(); + }); + }); + }, + hasNext: o.hasNext, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj); + } + }); + this.check(); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ + scrolly: true, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) + })))); + }, + + hasPrev: function () { + return this.button_group.hasPrev && this.button_group.hasPrev(); + }, + + hasNext: function () { + return this.button_group.hasNext && this.button_group.hasNext(); + }, + + prependItems: function (items) { + this.options.items = items.concat(this.options.items); + this.button_group.prependItems.apply(this.button_group, arguments); + this.check(); + }, + + addItems: function (items) { + this.options.items = this.options.items.concat(items); + this.button_group.addItems.apply(this.button_group, arguments); + this.check(); + }, + + removeItemAt: function (indexes) { + indexes = indexes || []; + BI.removeAt(this.options.items, indexes); + this.button_group.removeItemAt.apply(this.button_group, arguments); + this.check(); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法 + this.button_group.attr("itemsCreator").apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("参数不能为空"); + } + self.populate.apply(self, arguments); + }]); + return; + } + BI.ListPane.superclass.populate.apply(this, arguments); + this.button_group.populate.apply(this.button_group, arguments); + }, + + empty: function () { + this.button_group.empty(); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + } +}); +BI.ListPane.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.list_pane", BI.ListPane);/** + * 带有标题栏的pane + * @class BI.Panel + * @extends BI.Widget + */ +BI.Panel = BI.inherit(BI.Widget,{ + _defaultConfig : function(){ + return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{ + baseCls: "bi-panel bi-border", + title:"", + titleButtons:[], + el:{}, + logic:{ + dynamic: false + } + }); + }, + + _init:function(){ + BI.Panel.superclass._init.apply(this,arguments); + var o = this.options; + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() + ,this.options.el) + })))); + }, + + _createTitle:function(){ + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + cls: "panel-title-text", + text: o.title, + height: 30 + }); + + this.button_group = BI.createWidget({ + type:"bi.button_group", + items: o.titleButtons, + layouts: [{ + type: "bi.center_adapt", + lgap:10 + }] + }); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function(){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function(value, obj){ + self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj); + }); + + return { + el: { + type: "bi.left_right_vertical_adapt", + cls: "panel-title bi-tips bi-border-bottom bi-background", + height: 30, + items: { + left: [this.text], + right: [this.button_group] + }, + lhgap: 10, + rhgap: 10 + }, + height: 30 + }; + }, + + setTitle: function(title){ + this.text.setValue(title); + } +}); +BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE"; + +BI.shortcut("bi.panel",BI.Panel);/** + * 选择列表 + * + * Created by GUY on 2015/11/1. + * @class BI.SelectList + * @extends BI.Widget + */ +BI.SelectList = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-select-list", + direction: BI.Direction.Top,//toolbar的位置 + logic: { + dynamic: true + }, + items: [], + itemsCreator: BI.emptyFn, + hasNext: BI.emptyFn, + onLoaded: BI.emptyFn, + toolbar: { + type: "bi.multi_select_bar" + }, + el: { + type: "bi.list_pane" + } + }) + }, + _init: function () { + BI.SelectList.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + //全选 + this.toolbar = BI.createWidget(o.toolbar); + this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + var isAllSelected = this.isSelected(); + if (type === BI.Events.CLICK) { + self.setAllSelected(isAllSelected); + self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.list = BI.createWidget(o.el, { + type: "bi.list_pane", + items: o.items, + itemsCreator: function (op, callback) { + op.times === 1 && self.toolbar.setVisible(false); + o.itemsCreator(op, function (items) { + callback.apply(self, arguments); + if (op.times === 1) { + self.toolbar.setVisible(items && items.length > 0); + self.toolbar.setEnable(items && items.length > 0); + } + self._checkAllSelected(); + }); + }, + onLoaded: o.onLoaded, + hasNext: o.hasNext + }); + + this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + self._checkAllSelected(); + self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ + scrolly: true + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list) + })))); + + if (o.items.length <= 0) { + this.toolbar.setVisible(false); + this.toolbar.setEnable(false); + } + }, + + _checkAllSelected: function () { + var selectLength = this.list.getValue().length; + var notSelectLength = this.getAllLeaves().length - selectLength; + var hasNext = this.list.hasNext(); + var isAlreadyAllSelected = this.toolbar.isSelected(); + var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext)); + isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected); + this.toolbar.setHalfSelected(isHalf); + !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected)); + }, + + setAllSelected: function (v) { + BI.each(this.getAllButtons(), function (i, btn) { + (btn.setSelected || btn.setAllSelected).apply(btn, [v]); + }); + this.toolbar.setSelected(v); + this.toolbar.setHalfSelected(false); + }, + + setToolBarVisible: function (b) { + this.toolbar.setVisible(b); + }, + + isAllSelected: function () { + return this.toolbar.isSelected(); + }, + + hasPrev: function () { + return this.list.hasPrev(); + }, + + hasNext: function () { + return this.list.hasNext(); + }, + + prependItems: function (items) { + this.list.prependItems.apply(this.list, arguments); + }, + + addItems: function (items) { + this.list.addItems.apply(this.list, arguments); + }, + + setValue: function (data) { + var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL; + this.setAllSelected(selectAll); + this.list[selectAll ? "setNotSelectedValue" : "setValue"](data.value); + this._checkAllSelected(); + }, + + getValue: function () { + if (this.isAllSelected() === false) { + return { + type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + value: this.list.getValue(), + assist: this.list.getNotSelectedValue() + }; + } else { + return { + type: BI.ButtonGroup.CHOOSE_TYPE_ALL, + value: this.list.getNotSelectedValue(), + assist: this.list.getValue() + }; + } + }, + + empty: function () { + this.list.empty(); + }, + + populate: function (items) { + this.toolbar.setVisible(!BI.isEmptyArray(items)); + this.toolbar.setEnable(!BI.isEmptyArray(items)); + this.list.populate.apply(this.list, arguments); + this._checkAllSelected(); + }, + + _setEnable: function (enable) { + BI.SelectList.superclass._setEnable.apply(this, arguments); + this.toolbar.setEnable(enable); + }, + + resetHeight: function (h) { + var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); + this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : + this.list.element.css({"max-height": h - toolHeight + "px"}) + }, + + setNotSelectedValue: function () { + this.list.setNotSelectedValue.apply(this.list, arguments); + this._checkAllSelected(); + }, + + getNotSelectedValue: function () { + return this.list.getNotSelectedValue(); + }, + + getAllButtons: function () { + return this.list.getAllButtons(); + }, + + getAllLeaves: function () { + return this.list.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.list.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.list.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.list.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.list.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.list.getNodeByValue(value); + } +}); +BI.SelectList.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.select_list", BI.SelectList);/** + * Created by roy on 15/11/6. + */ +BI.LazyLoader = BI.inherit(BI.Widget, { + _const: { + PAGE: 100 + }, + _defaultConfig: function () { + return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-lazy-loader", + el: {} + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.LazyLoader.superclass._init.apply(this, arguments); + var all = o.items.length; + this.loader = BI.createWidget({ + type: "bi.loader", + element: this, + //下面是button_group的属性 + el: o.el, + + itemsCreator: function (options, populate) { + populate(self._getNextItems(options)); + }, + hasNext: function (option) { + return option.count < all; + } + }); + + this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) { + self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj) + }) + }, + _getNextItems: function (options) { + var self = this, o = this.options; + var lastNum = o.items.length - this._const.PAGE * (options.times - 1); + var lastItems = BI.last(o.items, lastNum); + var nextItems = BI.first(lastItems, this._const.PAGE); + return nextItems; + }, + + populate: function (items) { + this.loader.populate(items); + }, + + addItems: function (items) { + this.loader.addItems(items); + }, + + empty: function () { + this.loader.empty(); + }, + + setNotSelectedValue: function () { + this.loader.setNotSelectedValue.apply(this.loader, arguments); + }, + + getNotSelectedValue: function () { + return this.loader.getNotSelectedValue(); + }, + + setValue: function () { + this.loader.setValue.apply(this.loader, arguments); + }, + + getValue: function () { + return this.loader.getValue.apply(this.loader, arguments); + }, + + getAllButtons: function () { + return this.loader.getAllButtons(); + }, + + getAllLeaves: function () { + return this.loader.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.loader.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.loader.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.loader.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.loader.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.loader.getNodeByValue(value); + } +}); +BI.LazyLoader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.lazy_loader", BI.LazyLoader);/** + * 恶心的加载控件, 为解决排序问题引入的控件 + * + * Created by GUY on 2015/11/12. + * @class BI.ListLoader + * @extends BI.Widget + */ +BI.ListLoader = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-list-loader", + + isDefaultInit: true,//是否默认初始化数据 + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + next: {}, + hasNext: BI.emptyFn + }) + }, + + _nextLoad: function () { + var self = this, o = this.options; + this.next.setLoading(); + o.itemsCreator.apply(this, [{times: ++this.times}, function () { + self.next.setLoaded(); + self.addItems.apply(self, arguments); + }]); + }, + + _init: function () { + BI.ListLoader.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.itemsCreator === false) { + o.next = false; + } + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + element: this, + chooseType: 0, + items: o.items, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj); + } + }); + + if (o.next !== false) { + this.next = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.next)); + this.next.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._nextLoad(); + } + }) + } + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.next] + }); + + o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { + this.populate(); + }, this)); + if (BI.isNotEmptyArray(o.items)) { + this.populate(o.items); + } + }, + + hasNext: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasNext.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + addItems: function (items) { + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.options.items = this.options.items.concat(items); + this.next.setLoaded(); + } else { + this.next.setEnd(); + } + } + this.button_group.addItems.apply(this.button_group, arguments); + this.next.element.appendTo(this.element); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { + o.itemsCreator.apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("参数不能为空"); + } + self.populate.apply(self, arguments); + o.onLoaded(); + }]); + return; + } + this.options.items = items; + this.times = 1; + this.count = 0; + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.next.setLoaded(); + } else { + this.next.invisible(); + } + } + BI.DOM.hang([this.next]); + this.button_group.populate.apply(this.button_group, arguments); + this.next.element.appendTo(this.element); + }, + + empty: function () { + BI.DOM.hang([this.next]); + this.button_group.empty(); + this.next.element.appendTo(this.element); + BI.each([this.next], function (i, ob) { + ob && ob.setVisible(false); + }); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + } +}); +BI.ListLoader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.list_loader", BI.ListLoader);/** + * Created by GUY on 2016/4/29. * - * @class BI.SingleSelectIconTextItem - * @extends BI.BasicButton + * @class BI.SortList + * @extends BI.Widget */ -BI.SingleSelectIconTextItem = BI.inherit(BI.Single, { +BI.SortList = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-icon-text-item bi-list-item-active", - iconClass: "", - hgap: 10, - height: 25 + return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-sort-list", + + isDefaultInit: true,//是否默认初始化数据 + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + next: {}, + hasNext: BI.emptyFn + + //containment: this.element, + //connectWith: ".bi-sort-list", }) }, + _init: function () { - BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments); + BI.SortList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.icon_text_item", - element: this, - cls: o.iconClass, - once: o.once, - selected: o.selected, - height: o.height, - iconHeight: o.iconHeight, - iconWidth: o.iconWidth, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - isSelected: function () { - return this.text.isSelected(); - }, - - setSelected: function (b) { - this.text.setSelected(b); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments); - } -}); - -BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.SingleSelectItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-item bi-list-item-active", - hgap: 10, - height: 25, - textAlign: "left", - }) - }, - _init: function () { - BI.SingleSelectItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", + this.loader = BI.createWidget({ + type: "bi.list_loader", element: this, - textAlign: o.textAlign, - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectItem.superclass.doClick.apply(this, arguments); - }, - - setSelected: function (v) { - BI.SingleSelectItem.superclass.setSelected.apply(this, arguments); - } -}); - -BI.shortcut("bi.single_select_item", BI.SingleSelectItem);/** - * guy - * 单选框item - * @type {*|void|Object} - */ -BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-radio-item bi-list-item-active", - logic: { - dynamic: false - }, - hgap: 10, - height: 25 - }) - }, - _init: function () { - BI.SingleSelectRadioItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radio = BI.createWidget({ - type: "bi.radio" - }); - this.radio.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(!self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.center_adapt", - items: [this.radio], - width: 36 - }, this.text) - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments); - this.radio.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments); - this.radio.setSelected(v); - - } -}); - -BI.shortcut("bi.single_select_radio_item", BI.SingleSelectRadioItem);/** - * Created by roy on 15/10/16. - */ -BI.ArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-arrow-group-node bi-list-item", - logic: { - dynamic: false + isDefaultInit: o.isDefaultInit, + el: o.el, + items: this._formatItems(o.items), + itemsCreator: function (op, callback) { + o.itemsCreator(op, function (items) { + callback(self._formatItems(items)); + }); }, - id: "", - pId: "", - open: false, - height: 25 - }); - }, - _init: function () { - var self = this, o = this.options; - BI.ArrowNode.superclass._init.apply(this, arguments); - this.checkbox = BI.createWidget({ - type: "bi.arrow_tree_group_node_checkbox", - iconWidth: 13, - iconHeight: 13 - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py + onLoaded: o.onLoaded, + count: o.count, + next: o.next, + hasNext: o.hasNext }); - - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } + this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.ArrowNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isOpened()); - }, - setValue: function (v) { - this.text.setValue(v); - }, - - setOpened: function (v) { - BI.ArrowNode.superclass.setOpened.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.arrow_group_node", BI.ArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.FirstPlusGroupNode - * @extends BI.NodeButton - */ -BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-first-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.FirstPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.first_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.first_plus_group_node", BI.FirstPlusGroupNode);/** - * Created by User on 2016/3/31. - */ -/** - * > + icon + 文本 - * @class BI.IconArrowNode - * @extends BI.NodeButton - */ -BI.IconArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-arrow-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25, - iconHeight: 13, - iconWidth: 13, - iconCls: "" - }) - }, - _init: function () { - BI.IconArrowNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.tree_group_node_checkbox", - width: 23, - stopPropagation: true - }); - - var icon = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls, - width: 23, - items: [{ - type: "bi.icon", - height: o.iconHeight, - width: o.iconWidth - }] - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, { - width: 23, - el: icon - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.IconArrowNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.IconArrowNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.icon_arrow_node", BI.IconArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.LastPlusGroupNode - * @extends BI.NodeButton - */ -BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-last-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.LastPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.last_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if(type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.last_plus_group_node", BI.LastPlusGroupNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.MidPlusGroupNode - * @extends BI.NodeButton - */ -BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-mid-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.MidPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.mid_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } + self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj); } }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.mid_plus_group_node", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - extraCls: "bi-multilayer-icon-arrow-node bi-list-item", - layer: 0,//第几层级 - id: "", - pId: "", - open: false, - height: 25, - iconHeight: 13, - iconWidth: 13, - iconCls: "" - }) - }, - _init: function () { - BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.node = BI.createWidget({ - type: "bi.icon_arrow_node", - iconCls: o.iconCls, - //logic: { - // dynamic: true - //}, - id: o.id, - pId: o.pId, - open: o.open, - height: o.height, - iconHeight: o.iconHeight, - iconWidth: o.iconWidth, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.node.on(BI.Controller.EVENT_CHANGE, function (type) { - self.setSelected(self.isSelected()); - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var items = []; - BI.count(0, o.layer, function () { - items.push({ - type: "bi.layout", - width: 13, - height: o.height - }) - }); - items.push(this.node); - BI.createWidget({ - type: "bi.td", - element: this, - columnSize: BI.makeArray(o.layer, 13), - items: [items] - }) - }, - - isOnce: function () { - return true; - }, - - doRedMark: function () { - this.node.doRedMark.apply(this.node, arguments); - }, - - unRedMark: function () { - this.node.unRedMark.apply(this.node, arguments); - }, - - isSelected: function () { - return this.node.isSelected(); - }, - - setSelected: function (b) { - BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments); - this.node.setSelected(b); - }, - - doClick: function () { - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.node.setSelected(this.isSelected()); - }, - setOpened: function (v) { - BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments); - this.node.setOpened(v); - } -}); - -BI.shortcut("bi.multilayer_icon_arrow_node", BI.MultiLayerIconArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.PlusGroupNode - * @extends BI.NodeButton - */ -BI.PlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.PlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.tree_node_checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.PlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.PlusGroupNode.superclass.setOpened.apply(this, arguments); - if (this.checkbox) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/** - * 三角号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.TriangleGroupNode - * @extends BI.NodeButton - */ -BI.TriangleGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.TriangleGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - iconWidth: 13, - iconHeight: 13, - type: "bi.tree_group_node_checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py, - keyword: o.keyword - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.TriangleGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isOpened()); - }, - - setOpened: function (v) { - BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments); - this.checkbox.setSelected(v); - }, - - setText: function(text){ - BI.TriangleGroupNode.superclass.setText.apply(this, arguments); - this.text.setText(text); - } -}); - -BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-first-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.FirstTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.FirstTreeLeafItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.FirstTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - height: 25, - iconWidth: 16, - iconHeight: 16, - iconCls: "" - }) - }, - - _init: function () { - BI.IconTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var icon = BI.createWidget({ - type: "bi.center_adapt", - width: 23, - cls: o.iconCls, - items: [{ - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - }] - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 23, - el: icon - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.IconTreeLeafItem.superclass.doClick.apply(this, arguments); - }, - - setSelected: function (v) { - BI.IconTreeLeafItem.superclass.setSelected.apply(this, arguments); - } -}); - -BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-last-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.LastTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.LastTreeLeafItem.superclass.doClick.apply(this, arguments); - // this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.LastTreeLeafItem.superclass.setSelected.apply(this, arguments); - // this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-mid-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.MidTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.MidTreeLeafItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.MidTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.mid_tree_leaf_item", BI.MidTreeLeafItem);/** - * @class BI.MultiLayerIconTreeLeafItem - * @extends BI.BasicButton - */ -BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multilayer-icon-tree-leaf-item bi-list-item-active", - layer: 0, - height: 25, - iconCls: "", - iconHeight: 14, - iconWidth: 12 - }) - }, - _init: function () { - BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.item = BI.createWidget({ - type: "bi.icon_tree_leaf_item", - cls: "bi-list-item-none", - iconCls: o.iconCls, - id: o.id, - pId: o.pId, - isFront: true, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.item.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) {//本身实现click功能 - return; - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var items = []; - BI.count(0, o.layer, function () { - items.push({ - type: "bi.layout", - width: 13, - height: o.height - }) - }); - items.push(this.item); - BI.createWidget({ - type: "bi.td", - element: this, - columnSize: BI.makeArray(o.layer, 13), - items: [items] - }); - }, - - doRedMark: function () { - this.item.doRedMark.apply(this.item, arguments); - }, - - unRedMark: function () { - this.item.unRedMark.apply(this.item, arguments); - }, - - doHighLight: function () { - this.item.doHighLight.apply(this.item, arguments); - }, - - unHighLight: function () { - this.item.unHighLight.apply(this.item, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments); - this.item.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.item.setSelected(v); - }, - - getValue: function(){ - return this.options.value; - } -}); - -BI.shortcut("bi.multilayer_icon_tree_leaf_item", BI.MultiLayerIconTreeLeafItem);/** - * 树叶子节点 - * Created by GUY on 2015/9/6. - * @class BI.TreeTextLeafItem - * @extends BI.BasicButton - */ -BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function() { - return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-tree-text-leaf-item bi-list-item-active", - id: "", - pId: "", - height: 25, - hgap: 0, - lgap: 0, - rgap: 0 - }) - }, - _init : function() { - BI.TreeTextLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - lgap: o.lgap, - rgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.text - }] - }) - }, - - doRedMark: function(){ - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function(){ - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function(){ - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function(){ - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function(){ - return this.options.id; - }, - - getPId: function(){ - return this.options.pId; - } -}); - -BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** - * Created by GUY on 2015/8/28. - * @class BI.Calendar - * @extends BI.Widget - */ -BI.Calendar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-calendar", - logic: { - dynamic: false - }, - min: '1900-01-01', //最小日期 - max: '2099-12-31', //最大日期 - year: 2015, - month: 7, //7表示八月 - day: 25 - }) - }, - - _dateCreator: function (Y, M, D) { - var self = this, o = this.options, log = {}, De = new Date(); - var mins = o.min.match(/\d+/g); - var maxs = o.max.match(/\d+/g); - Y < (mins[0] | 0) && (Y = (mins[0] | 0)); - Y > (maxs[0] | 0) && (Y = (maxs[0] | 0)); - - De.setFullYear(Y, M, D); - log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()]; - - var MD = Date._MD.slice(0); - MD[1] = Date.isLeap(log.ymd[0]) ? 29 : 28; - - De.setFullYear(log.ymd[0], log.ymd[1], 1); - log.FDay = De.getDay(); - - log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; - log.NDay = 1; - - var items = []; - BI.each(BI.range(42), function (i) { - var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; - if (i < log.FDay) { - td.lastMonth = true; - DD = i + log.PDay; - MM === 1 && (YY -= 1); - MM = MM === 1 ? 12 : MM - 1; - } else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { - DD = i - log.FDay + 1; - if (i - log.FDay + 1 === log.ymd[2]) { - td.currentDay = true; - } - } else { - td.nextMonth = true; - DD = log.NDay++; - MM === 12 && (YY += 1); - MM = MM === 12 ? 1 : MM + 1; - } - if (Date.checkVoid(YY, MM, DD, mins, maxs)[0]) { - td.disabled = true; - } - td.text = DD; - items.push(td); - }) - return items; - }, - - _init: function () { - BI.Calendar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var items = BI.map(Date._SDN.slice(0, 7), function (i, value) { - return { - type: "bi.label", - height: 25, - text: value - } - }) - var title = BI.createWidget({ - type: "bi.button_group", - height: 25, - items: items - }) - var days = this._dateCreator(o.year, o.month, o.day); - items = []; - items.push(days.slice(0, 7)); - items.push(days.slice(7, 14)); - items.push(days.slice(14, 21)); - items.push(days.slice(21, 28)); - items.push(days.slice(28, 35)); - items.push(days.slice(35, 42)); - - items = BI.map(items, function (i, item) { - return BI.map(item, function (j, td) { - return BI.extend(td, { - type: "bi.text_item", - cls: "bi-list-item-active", - textAlign: "center", - whiteSpace: "normal", - once: false, - forceSelected: true, - height: 25, - value: o.year + "-" + o.month + "-" + td.text, - disabled: td.lastMonth || td.nextMonth || td.disabled - //selected: td.currentDay - }); - }); - }); - - this.days = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(items, {}), - layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - columns: 7, - rows: 6, - columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], - rowSize: 25 - }))] - }); - this.days.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - BI.createWidget(BI.extend({ - element: this - - }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", title, this.days) - })))); - }, - - isFrontDate: function () { - var o = this.options, c = this._const; - var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); - Y = Y | 0; - De.setFullYear(Y, M, 1); - var newDate = De.getOffsetDate(-1 * (day + 1)); - return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; - }, - - isFinalDate: function () { - var o = this.options, c = this._const; - var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); - Y = Y | 0; - De.setFullYear(Y, M, 1); - var newDate = De.getOffsetDate(42 - day); - return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; - }, - - setValue: function (ob) { - this.days.setValue([ob.year + "-" + ob.month + "-" + ob.day]); - }, - - getValue: function () { - var date = this.days.getValue()[0].match(/\d+/g); - return { - year: date[0] | 0, - month: date[1] | 0, - day: date[2] | 0 - } - } -}); - -BI.extend(BI.Calendar, { - getPageByDateJSON: function (json) { - var year = new Date().getFullYear(); - var month = new Date().getMonth(); - var page = (json.year - year) * 12; - page += json.month - month; - return page; - }, - getDateJSONByPage: function(v){ - var months = new Date().getMonth(); - var page = v; - - //对当前page做偏移,使到当前年初 - page = page + months; - - var year = BI.parseInt(page / 12); - if(page < 0 && page % 12 !== 0){ - year--; - } - var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12); - return { - year: new Date().getFullYear() + year, - month: month - } - } -}); - -BI.shortcut("bi.calendar", BI.Calendar);/** - * Created by GUY on 2015/8/28. - * @class BI.YearCalendar - * @extends BI.Widget - */ -BI.YearCalendar = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-year-calendar", - behaviors: {}, - logic: { - dynamic: false - }, - min: '1900-01-01', //最小日期 - max: '2099-12-31', //最大日期 - year: null - }) - }, - - _yearCreator: function (Y) { - var o = this.options; - Y = Y | 0; - var start = BI.YearCalendar.getStartYear(Y); - var items = []; - BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) { - var td = {}; - if (Date.checkVoid(start + i, 1, 1, o.min, o.max)[0]) { - td.disabled = true; - } - td.text = start + i; - items.push(td); - }); - return items; - }, - - _init: function () { - BI.YearCalendar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.currentYear = new Date().getFullYear(); - var years = this._yearCreator(o.year || this.currentYear); - - //纵向排列年 - var len = years.length, tyears = BI.makeArray(len, ""); - var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; - BI.each(years, function (i, y) { - tyears[i] = years[map[i]]; - }); - var items = []; - items.push(tyears.slice(0, 2)); - items.push(tyears.slice(2, 4)); - items.push(tyears.slice(4, 6)); - items.push(tyears.slice(6, 8)); - items.push(tyears.slice(8, 10)); - items.push(tyears.slice(10, 12)); - - items = BI.map(items, function (i, item) { - return BI.map(item, function (j, td) { - return BI.extend(td, { - type: "bi.text_item", - cls: "bi-list-item-active", - textAlign: "center", - whiteSpace: "normal", - once: false, - forceSelected: true, - height: 23, - width: 38, - value: td.text, - disabled: td.disabled - }); - }); - }); - - this.years = BI.createWidget({ - type: "bi.button_group", - behaviors: o.behaviors, - items: BI.createItems(items, {}), - layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - columns: 2, - rows: 6, - columnSize: [1 / 2, 1 / 2], - rowSize: 25 - })), { - type: "bi.center_adapt", - vgap: 1 - }] - }); - this.years.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - BI.createWidget(BI.extend({ - element: this - - }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this.years) - })))); - }, - - isFrontYear: function () { - var o = this.options; - var Y = o.year; - Y = Y | 0; - return !!Date.checkVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0]; - }, - - isFinalYear: function () { - var o = this.options, c = this._const; - var Y = o.year; - Y = Y | 0; - return !!Date.checkVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0]; - }, - - setValue: function (val) { - this.years.setValue([val]); - }, - - getValue: function () { - return this.years.getValue()[0]; - } -}); -//类方法 -BI.extend(BI.YearCalendar, { - INTERVAL: 12, - - //获取显示的第一年 - getStartYear: function (year) { - var cur = new Date().getFullYear(); - return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL; - }, - - getEndYear: function (year) { - return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; - }, - - getPageByYear: function (year) { - var cur = new Date().getFullYear(); - year = BI.YearCalendar.getStartYear(year); - return (year - cur + 3) / BI.YearCalendar.INTERVAL; - } -}); - -BI.shortcut("bi.year_calendar", BI.YearCalendar);/** - * 绘制一些较复杂的canvas - * - * Created by GUY on 2015/11/24. - * @class BI.ComplexCanvas - * @extends BI.Widget - */ -BI.ComplexCanvas = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-complex-canvas" - }) - }, - - - _init: function () { - BI.ComplexCanvas.superclass._init.apply(this, arguments); - var o = this.options; - this.canvas = BI.createWidget({ - type: "bi.canvas", - element: this, - width: o.width, - height: o.height - }); - }, - - //绘制树枝节点 - branch: function (x0, y0, x1, y1, x2, y2) { - var self = this, args = [].slice.call(arguments); - if (args.length <= 5) { - return this.canvas.line.apply(this.canvas, arguments); - } - var options; - if (BI.isOdd(args.length)) { - options = BI.last(args); - args = BI.initial(args); - } - args = [].slice.call(args, 2); - var odd = BI.filter(args, function (i) { - return i % 2 === 0; - }); - var even = BI.filter(args, function (i) { - return i % 2 !== 0; - }); - options || (options = {}); - var offset = options.offset || 20; - if ((y0 > y1 && y0 > y2) || (y0 < y1 && y0 < y2)) { - if (y0 > y1 && y0 > y2) { - var y = Math.max.apply(this, even) + offset; - } else { - var y = Math.min.apply(this, even) - offset; - } - var minx = Math.min.apply(this, odd); - var minix = BI.indexOf(odd, minx); - var maxx = Math.max.apply(this, odd); - var maxix = BI.indexOf(odd, maxx); - this.canvas.line(minx, even[minix], minx, y, maxx, y, maxx, even[maxix], options); - BI.each(odd, function (i, dot) { - if (i !== maxix && i !== minix) { - self.canvas.line(dot, even[i], dot, y, options); - } - }); - this.canvas.line(x0, y, x0, y0, options); - return; - } - if ((x0 > x1 && x0 > x2) || (x0 < x1 && x0 < x2)) { - if (x0 > x1 && x0 > x2) { - var x = Math.max.apply(this, odd) + offset; - } else { - var x = Math.min.apply(this, odd) - offset; - } - var miny = Math.min.apply(this, even); - var miniy = BI.indexOf(even, miny); - var maxy = Math.max.apply(this, even); - var maxiy = BI.indexOf(even, maxy); - this.canvas.line(odd[miniy], miny, x, miny, x, maxy, odd[maxiy], maxy, options); - BI.each(even, function (i, dot) { - if (i !== miniy && i !== maxiy) { - self.canvas.line(odd[i], dot, x, dot, options); - } - }); - this.canvas.line(x, y0, x0, y0, options); - return; - } - }, - - stroke: function (callback) { - this.canvas.stroke(callback); - } -}); - -BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/** - * Created by roy on 15/10/16. - * 上箭头与下箭头切换的树节点 - */ -BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{ - _defaultConfig:function(){ - return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{ - extraCls:"bi-arrow-tree-group-node", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function(){ - BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments); - }, - setSelected: function(v){ - BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"); - } else { - this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font"); - } - } -}); -BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox);/** - * 十字型的树节点 - * @class BI.CheckingMarkNode - * @extends BI.IconButton - */ -BI.CheckingMarkNode = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), { - extraCls: "check-mark-font", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function() { - BI.CheckingMarkNode.superclass._init.apply(this, arguments); - this.setSelected(this.options.selected); - - }, - setSelected: function(v){ - BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("check-mark-font"); - } else { - this.element.removeClass("check-mark-font"); - } - } -}); -BI.shortcut("bi.checking_mark_node", BI.CheckingMarkNode);/** - * 十字型的树节点 - * @class BI.FirstTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type2", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type2"); - } else { - this.element.removeClass("tree-expand-icon-type2"); - } - } -}); -BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox);/** - * 十字型的树节点 - * @class BI.LastTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type4", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type3"); - } else { - this.element.removeClass("tree-expand-icon-type3"); - } - } -}); -BI.shortcut("bi.last_tree_node_checkbox", BI.LastTreeNodeCheckbox);/** - * 十字型的树节点 - * @class BI.MidTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type3", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type3"); - } else { - this.element.removeClass("tree-expand-icon-type3"); - } - } -}); -BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/** - * 三角形的树节点 - * Created by GUY on 2015/9/6. - * @class BI.TreeGroupNodeCheckbox - * @extends BI.IconButton - */ -BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-node-triangle-collapse-font", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function() { - BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"); - } else { - this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font"); - } - } -}); -BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/** - * 十字型的树节点 - * @class BI.TreeNodeCheckbox - * @extends BI.IconButton - */ -BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type1", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.TreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.addClass("tree-expand-icon-type1"); - } else { - this.element.removeClass("tree-expand-icon-type1"); - } - } -}); -BI.shortcut("bi.tree_node_checkbox", BI.TreeNodeCheckbox);/*! - * clipboard.js v1.6.1 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -try {//IE8下会抛错 - (function (f) { - if (typeof exports === "object" && typeof module !== "undefined") { - module.exports = f() - } else if (typeof define === "function" && define.amd) { - define([], f) - } else { - var g; - if (typeof window !== "undefined") { - g = window - } else if (typeof global !== "undefined") { - g = global - } else if (typeof self !== "undefined") { - g = self - } else { - g = this - } - g.Clipboard = f() - } - })(function () { - var define, module, exports; - return (function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require; - if (!u && a)return a(o, !0); - if (i)return i(o, !0); - var f = new Error("Cannot find module '" + o + "'"); - throw f.code = "MODULE_NOT_FOUND", f - } - var l = n[o] = {exports: {}}; - t[o][0].call(l.exports, function (e) { - var n = t[o][1][e]; - return s(n ? n : e) - }, l, l.exports, e, t, n, r) - } - return n[o].exports - } - - var i = typeof require == "function" && require; - for (var o = 0; o < r.length; o++)s(r[o]); - return s - })({ - 1: [function (require, module, exports) { - var DOCUMENT_NODE_TYPE = 9; - - /** - * A polyfill for Element.matches() - */ - if (typeof Element !== 'undefined' && !Element.prototype.matches) { - var proto = Element.prototype; - - proto.matches = proto.matchesSelector || - proto.mozMatchesSelector || - proto.msMatchesSelector || - proto.oMatchesSelector || - proto.webkitMatchesSelector; - } - - /** - * Finds the closest parent that matches a selector. - * - * @param {Element} element - * @param {String} selector - * @return {Function} - */ - function closest(element, selector) { - while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { - if (element.matches(selector)) return element; - element = element.parentNode; - } - } - - module.exports = closest; - - }, {}], 2: [function (require, module, exports) { - var closest = require('./closest'); - - /** - * Delegates event to a selector. - * - * @param {Element} element - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @param {Boolean} useCapture - * @return {Object} - */ - function delegate(element, selector, type, callback, useCapture) { - var listenerFn = listener.apply(this, arguments); - - element.addEventListener(type, listenerFn, useCapture); - - return { - destroy: function () { - element.removeEventListener(type, listenerFn, useCapture); - } - } - } - - /** - * Finds closest match and invokes callback. - * - * @param {Element} element - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @return {Function} - */ - function listener(element, selector, type, callback) { - return function (e) { - e.delegateTarget = closest(e.target, selector); - - if (e.delegateTarget) { - callback.call(element, e); - } - } - } - - module.exports = delegate; - - }, {"./closest": 1}], 3: [function (require, module, exports) { - /** - * Check if argument is a HTML element. - * - * @param {Object} value - * @return {Boolean} - */ - exports.node = function (value) { - return value !== undefined - && value instanceof HTMLElement - && value.nodeType === 1; - }; - - /** - * Check if argument is a list of HTML elements. - * - * @param {Object} value - * @return {Boolean} - */ - exports.nodeList = function (value) { - var type = Object.prototype.toString.call(value); - - return value !== undefined - && (type === '[object NodeList]' || type === '[object HTMLCollection]') - && ('length' in value) - && (value.length === 0 || exports.node(value[0])); - }; - - /** - * Check if argument is a string. - * - * @param {Object} value - * @return {Boolean} - */ - exports.string = function (value) { - return typeof value === 'string' - || value instanceof String; - }; - - /** - * Check if argument is a function. - * - * @param {Object} value - * @return {Boolean} - */ - exports.fn = function (value) { - var type = Object.prototype.toString.call(value); - - return type === '[object Function]'; - }; - - }, {}], 4: [function (require, module, exports) { - var is = require('./is'); - var delegate = require('delegate'); - - /** - * Validates all params and calls the right - * listener function based on its target type. - * - * @param {String|HTMLElement|HTMLCollection|NodeList} target - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listen(target, type, callback) { - if (!target && !type && !callback) { - throw new Error('Missing required arguments'); - } - - if (!is.string(type)) { - throw new TypeError('Second argument must be a String'); - } - - if (!is.fn(callback)) { - throw new TypeError('Third argument must be a Function'); - } - - if (is.node(target)) { - return listenNode(target, type, callback); - } - else if (is.nodeList(target)) { - return listenNodeList(target, type, callback); - } - else if (is.string(target)) { - return listenSelector(target, type, callback); - } - else { - throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); - } - } - - /** - * Adds an event listener to a HTML element - * and returns a remove listener function. - * - * @param {HTMLElement} node - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenNode(node, type, callback) { - node.addEventListener(type, callback); - - return { - destroy: function () { - node.removeEventListener(type, callback); - } - } - } - - /** - * Add an event listener to a list of HTML elements - * and returns a remove listener function. - * - * @param {NodeList|HTMLCollection} nodeList - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenNodeList(nodeList, type, callback) { - Array.prototype.forEach.call(nodeList, function (node) { - node.addEventListener(type, callback); - }); - - return { - destroy: function () { - Array.prototype.forEach.call(nodeList, function (node) { - node.removeEventListener(type, callback); - }); - } - } - } - - /** - * Add an event listener to a selector - * and returns a remove listener function. - * - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenSelector(selector, type, callback) { - return delegate(document.body, selector, type, callback); - } - - module.exports = listen; - - }, {"./is": 3, "delegate": 2}], 5: [function (require, module, exports) { - function select(element) { - var selectedText; - - if (element.nodeName === 'SELECT') { - element.focus(); - - selectedText = element.value; - } - else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { - var isReadOnly = element.hasAttribute('readonly'); - - if (!isReadOnly) { - element.setAttribute('readonly', ''); - } - - element.select(); - element.setSelectionRange(0, element.value.length); - - if (!isReadOnly) { - element.removeAttribute('readonly'); - } - - selectedText = element.value; - } - else { - if (element.hasAttribute('contenteditable')) { - element.focus(); - } - - var selection = window.getSelection(); - var range = document.createRange(); - - range.selectNodeContents(element); - selection.removeAllRanges(); - selection.addRange(range); - - selectedText = selection.toString(); - } - - return selectedText; - } - - module.exports = select; - - }, {}], 6: [function (require, module, exports) { - function E() { - // Keep this empty so it's easier to inherit from - // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) - } - - E.prototype = { - on: function (name, callback, ctx) { - var e = this.e || (this.e = {}); - - (e[name] || (e[name] = [])).push({ - fn: callback, - ctx: ctx - }); - - return this; - }, - - once: function (name, callback, ctx) { - var self = this; - - function listener() { - self.off(name, listener); - callback.apply(ctx, arguments); - }; - - listener._ = callback - return this.on(name, listener, ctx); - }, - - emit: function (name) { - var data = [].slice.call(arguments, 1); - var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); - var i = 0; - var len = evtArr.length; - - for (i; i < len; i++) { - evtArr[i].fn.apply(evtArr[i].ctx, data); - } - - return this; - }, - - off: function (name, callback) { - var e = this.e || (this.e = {}); - var evts = e[name]; - var liveEvents = []; - - if (evts && callback) { - for (var i = 0, len = evts.length; i < len; i++) { - if (evts[i].fn !== callback && evts[i].fn._ !== callback) - liveEvents.push(evts[i]); - } - } - - // Remove event from queue to prevent memory leak - // Suggested by https://github.com/lazd - // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 - - (liveEvents.length) - ? e[name] = liveEvents - : delete e[name]; - - return this; - } - }; - - module.exports = E; - - }, {}], 7: [function (require, module, exports) { - (function (global, factory) { - if (typeof define === "function" && define.amd) { - define(['module', 'select'], factory); - } else if (typeof exports !== "undefined") { - factory(module, require('select')); - } else { - var mod = { - exports: {} - }; - factory(mod, global.select); - global.clipboardAction = mod.exports; - } - })(this, function (module, _select) { - 'use strict'; - - var _select2 = _interopRequireDefault(_select); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - } - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - var ClipboardAction = function () { - /** - * @param {Object} options - */ - function ClipboardAction(options) { - _classCallCheck(this, ClipboardAction); - - this.resolveOptions(options); - this.initSelection(); - } - - /** - * Defines base properties passed from constructor. - * @param {Object} options - */ - - - _createClass(ClipboardAction, [{ - key: 'resolveOptions', - value: function resolveOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = options.action; - this.emitter = options.emitter; - this.target = options.target; - this.text = options.text; - this.trigger = options.trigger; - - this.selectedText = ''; - } - }, { - key: 'initSelection', - value: function initSelection() { - if (this.text) { - this.selectFake(); - } else if (this.target) { - this.selectTarget(); - } - } - }, { - key: 'selectFake', - value: function selectFake() { - var _this = this; - - var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; - - this.removeFake(); - - this.fakeHandlerCallback = function () { - return _this.removeFake(); - }; - this.fakeHandler = document.body.addEventListener('click', this.fakeHandlerCallback) || true; - - this.fakeElem = document.createElement('textarea'); - // Prevent zooming on iOS - this.fakeElem.style.fontSize = '12pt'; - // Reset box model - this.fakeElem.style.border = '0'; - this.fakeElem.style.padding = '0'; - this.fakeElem.style.margin = '0'; - // Move element out of screen horizontally - this.fakeElem.style.position = 'absolute'; - this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; - // Move element to the same position vertically - var yPosition = window.pageYOffset || document.documentElement.scrollTop; - this.fakeElem.style.top = yPosition + 'px'; - - this.fakeElem.setAttribute('readonly', ''); - this.fakeElem.value = this.text; - - document.body.appendChild(this.fakeElem); - - this.selectedText = (0, _select2["default"])(this.fakeElem); - this.copyText(); - } - }, { - key: 'removeFake', - value: function removeFake() { - if (this.fakeHandler) { - document.body.removeEventListener('click', this.fakeHandlerCallback); - this.fakeHandler = null; - this.fakeHandlerCallback = null; - } - - if (this.fakeElem) { - document.body.removeChild(this.fakeElem); - this.fakeElem = null; - } - } - }, { - key: 'selectTarget', - value: function selectTarget() { - this.selectedText = (0, _select2["default"])(this.target); - this.copyText(); - } - }, { - key: 'copyText', - value: function copyText() { - var succeeded = void 0; - - try { - succeeded = document.execCommand(this.action); - } catch (err) { - succeeded = false; - } - - this.handleResult(succeeded); - } - }, { - key: 'handleResult', - value: function handleResult(succeeded) { - this.emitter.emit(succeeded ? 'success' : 'error', { - action: this.action, - text: this.selectedText, - trigger: this.trigger, - clearSelection: this.clearSelection.bind(this) - }); - } - }, { - key: 'clearSelection', - value: function clearSelection() { - if (this.target) { - this.target.blur(); - } - - window.getSelection().removeAllRanges(); - } - }, { - key: 'destroy', - value: function destroy() { - this.removeFake(); - } - }, { - key: 'action', - set: function set() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; - - this._action = action; - - if (this._action !== 'copy' && this._action !== 'cut') { - throw new Error('Invalid "action" value, use either "copy" or "cut"'); - } - }, - get: function get() { - return this._action; - } - }, { - key: 'target', - set: function set(target) { - if (target !== undefined) { - if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { - if (this.action === 'copy' && target.hasAttribute('disabled')) { - throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); - } - - if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { - throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); - } - - this._target = target; - } else { - throw new Error('Invalid "target" value, use a valid Element'); - } - } - }, - get: function get() { - return this._target; - } - }]); - - return ClipboardAction; - }(); - - module.exports = ClipboardAction; - }); - - }, {"select": 5}], 8: [function (require, module, exports) { - (function (global, factory) { - if (typeof define === "function" && define.amd) { - define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); - } else if (typeof exports !== "undefined") { - factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); - } else { - var mod = { - exports: {} - }; - factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); - global.clipboard = mod.exports; - } - })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { - 'use strict'; - - var _clipboardAction2 = _interopRequireDefault(_clipboardAction); - - var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); - - var _goodListener2 = _interopRequireDefault(_goodListener); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - function _possibleConstructorReturn(self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - } - - var Clipboard = function (_Emitter) { - _inherits(Clipboard, _Emitter); - - /** - * @param {String|HTMLElement|HTMLCollection|NodeList} trigger - * @param {Object} options - */ - function Clipboard(trigger, options) { - _classCallCheck(this, Clipboard); - - var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); - - _this.resolveOptions(options); - _this.listenClick(trigger); - return _this; - } - - /** - * Defines if attributes would be resolved using internal setter functions - * or custom functions that were passed in the constructor. - * @param {Object} options - */ - - - _createClass(Clipboard, [{ - key: 'resolveOptions', - value: function resolveOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = typeof options.action === 'function' ? options.action : this.defaultAction; - this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; - this.text = typeof options.text === 'function' ? options.text : this.defaultText; - } - }, { - key: 'listenClick', - value: function listenClick(trigger) { - var _this2 = this; - - this.listener = (0, _goodListener2["default"])(trigger, 'click', function (e) { - return _this2.onClick(e); - }); - } - }, { - key: 'onClick', - value: function onClick(e) { - var trigger = e.delegateTarget || e.currentTarget; - - if (this.clipboardAction) { - this.clipboardAction = null; - } - - this.clipboardAction = new _clipboardAction2["default"]({ - action: this.action(trigger), - target: this.target(trigger), - text: this.text(trigger), - trigger: trigger, - emitter: this - }); - } - }, { - key: 'defaultAction', - value: function defaultAction(trigger) { - return getAttributeValue('action', trigger); - } - }, { - key: 'defaultTarget', - value: function defaultTarget(trigger) { - var selector = getAttributeValue('target', trigger); - - if (selector) { - return document.querySelector(selector); - } - } - }, { - key: 'defaultText', - value: function defaultText(trigger) { - return getAttributeValue('text', trigger); - } - }, { - key: 'destroy', - value: function destroy() { - this.listener.destroy(); - - if (this.clipboardAction) { - this.clipboardAction.destroy(); - this.clipboardAction = null; - } - } - }], [{ - key: 'isSupported', - value: function isSupported() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; - - var actions = typeof action === 'string' ? [action] : action; - var support = !!document.queryCommandSupported; - - actions.forEach(function (action) { - support = support && !!document.queryCommandSupported(action); - }); - - return support; - } - }]); - - return Clipboard; - }(_tinyEmitter2["default"]); - - /** - * Helper function to retrieve attribute value. - * @param {String} suffix - * @param {Element} element - */ - function getAttributeValue(suffix, element) { - var attribute = 'data-clipboard-' + suffix; - - if (!element.hasAttribute(attribute)) { - return; - } - - return element.getAttribute(attribute); - } - - module.exports = Clipboard; - }); - - }, {"./clipboard-action": 7, "good-listener": 4, "tiny-emitter": 6}] - }, {}, [8])(8) - }); -} catch (e) { - /* - * zClip :: jQuery ZeroClipboard v1.1.1 - * http://steamdev.com/zclip - * - * Copyright 2011, SteamDev - * Released under the MIT license. - * http://www.opensource.org/licenses/mit-license.php - * - * Date: Wed Jun 01, 2011 - */ - - - (function ($) { - - $.fn.zclip = function (params) { - - if (typeof params == "object" && !params.length) { - - var settings = $.extend({ - - path: 'ZeroClipboard.swf', - copy: null, - beforeCopy: null, - afterCopy: null, - clickAfter: true, - setHandCursor: true, - setCSSEffects: true - - }, params); - - - return this.each(function () { - - var o = $(this); - - if (o.is(':visible') && (typeof settings.copy == 'string' || $.isFunction(settings.copy))) { - - ZeroClipboard.setMoviePath(settings.path); - var clip = new ZeroClipboard.Client(); - - if ($.isFunction(settings.copy)) { - o.bind('zClip_copy', settings.copy); - } - if ($.isFunction(settings.beforeCopy)) { - o.bind('zClip_beforeCopy', settings.beforeCopy); - } - if ($.isFunction(settings.afterCopy)) { - o.bind('zClip_afterCopy', settings.afterCopy); - } - - clip.setHandCursor(settings.setHandCursor); - clip.setCSSEffects(settings.setCSSEffects); - clip.addEventListener('mouseOver', function (client) { - o.trigger('mouseenter'); - }); - clip.addEventListener('mouseOut', function (client) { - o.trigger('mouseleave'); - }); - clip.addEventListener('mouseDown', function (client) { - - o.trigger('mousedown'); - - if (!$.isFunction(settings.copy)) { - clip.setText(settings.copy); - } else { - clip.setText(o.triggerHandler('zClip_copy')); - } - - if ($.isFunction(settings.beforeCopy)) { - o.trigger('zClip_beforeCopy'); - } - - }); - - clip.addEventListener('complete', function (client, text) { - - if ($.isFunction(settings.afterCopy)) { - - o.trigger('zClip_afterCopy'); - - } else { - if (text.length > 500) { - text = text.substr(0, 500) + "...\n\n(" + (text.length - 500) + " characters not shown)"; - } - - o.removeClass('hover'); - alert("Copied text to clipboard:\n\n " + text); - } - - if (settings.clickAfter) { - o.trigger('click'); - } - - }); - - - clip.glue(o[0], o.parent()[0]); - - $(window).bind('load resize', function () { - clip.reposition(); - }); - - - } - - }); - - } else if (typeof params == "string") { - - return this.each(function () { - - var o = $(this); - - params = params.toLowerCase(); - var zclipId = o.data('zclipId'); - var clipElm = $('#' + zclipId + '.zclip'); - - if (params == "remove") { - - clipElm.remove(); - o.removeClass('active hover'); - - } else if (params == "hide") { - - clipElm.hide(); - o.removeClass('active hover'); - - } else if (params == "show") { - - clipElm.show(); - - } - - }); - - } - - } - - - })(jQuery); - - -// ZeroClipboard -// Simple Set Clipboard System -// Author: Joseph Huckaby - var ZeroClipboard = { - - version: "1.0.7", - clients: {}, - // registered upload clients on page, indexed by id - moviePath: 'ZeroClipboard.swf', - // URL to movie - nextId: 1, - // ID of next movie - $: function (thingy) { - // simple DOM lookup utility function - if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); - if (!thingy.addClass) { - // extend element with a few useful methods - thingy.hide = function () { - this.style.display = 'none'; - }; - thingy.show = function () { - this.style.display = ''; - }; - thingy.addClass = function (name) { - this.removeClass(name); - this.className += ' ' + name; - }; - thingy.removeClass = function (name) { - var classes = this.className.split(/\s+/); - var idx = -1; - for (var k = 0; k < classes.length; k++) { - if (classes[k] == name) { - idx = k; - k = classes.length; - } - } - if (idx > -1) { - classes.splice(idx, 1); - this.className = classes.join(' '); - } - return this; - }; - thingy.hasClass = function (name) { - return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); - }; - } - return thingy; - }, - - setMoviePath: function (path) { - // set path to ZeroClipboard.swf - this.moviePath = path; - }, - - dispatch: function (id, eventName, args) { - // receive event from flash movie, send to client - var client = this.clients[id]; - if (client) { - client.receiveEvent(eventName, args); - } - }, - - register: function (id, client) { - // register new client to receive events - this.clients[id] = client; - }, - - getDOMObjectPosition: function (obj, stopObj) { - // get absolute coordinates for dom element - var info = { - left: 0, - top: 0, - width: obj.width ? obj.width : obj.offsetWidth, - height: obj.height ? obj.height : obj.offsetHeight - }; - - if (obj && (obj != stopObj)) { - info.left += obj.offsetLeft; - info.top += obj.offsetTop; - } - - return info; - }, - - Client: function (elem) { - // constructor for new simple upload client - this.handlers = {}; - - // unique ID - this.id = ZeroClipboard.nextId++; - this.movieId = 'ZeroClipboardMovie_' + this.id; - - // register client with singleton to receive flash events - ZeroClipboard.register(this.id, this); - - // create movie - if (elem) this.glue(elem); - } - }; - - ZeroClipboard.Client.prototype = { - - id: 0, - // unique ID for us - ready: false, - // whether movie is ready to receive events or not - movie: null, - // reference to movie object - clipText: '', - // text to copy to clipboard - handCursorEnabled: true, - // whether to show hand cursor, or default pointer cursor - cssEffects: true, - // enable CSS mouse effects on dom container - handlers: null, - // user event handlers - glue: function (elem, appendElem, stylesToAdd) { - // glue to DOM element - // elem can be ID or actual DOM element object - this.domElement = ZeroClipboard.$(elem); - - // float just above object, or zIndex 99 if dom element isn't set - var zIndex = 99; - if (this.domElement.style.zIndex) { - zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; - } - - if (typeof(appendElem) == 'string') { - appendElem = ZeroClipboard.$(appendElem); - } else if (typeof(appendElem) == 'undefined') { - appendElem = document.getElementsByTagName('body')[0]; - } - - // find X/Y position of domElement - var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); - - // create floating DIV above element - this.div = document.createElement('div'); - this.div.className = "zclip"; - this.div.id = "zclip-" + this.movieId; - $(this.domElement).data('zclipId', 'zclip-' + this.movieId); - var style = this.div.style; - style.position = 'absolute'; - style.left = '' + box.left + 'px'; - style.top = '' + box.top + 'px'; - style.width = '' + box.width + 'px'; - style.height = '' + box.height + 'px'; - style.zIndex = zIndex; - - if (typeof(stylesToAdd) == 'object') { - for (addedStyle in stylesToAdd) { - style[addedStyle] = stylesToAdd[addedStyle]; - } - } - - // style.backgroundColor = '#f00'; // debug - appendElem.appendChild(this.div); - - this.div.innerHTML = this.getHTML(box.width, box.height); - }, - - getHTML: function (width, height) { - // return HTML for movie - var html = ''; - var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; - - if (navigator.userAgent.match(/MSIE/)) { - // IE gets an OBJECT tag - var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; - html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; - } else { - // all other browsers get an EMBED tag - html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; - } - return html; - }, - - hide: function () { - // temporarily hide floater offscreen - if (this.div) { - this.div.style.left = '-2000px'; - } - }, - - show: function () { - // show ourselves after a call to hide() - this.reposition(); - }, - - destroy: function () { - // destroy control and floater - if (this.domElement && this.div) { - this.hide(); - this.div.innerHTML = ''; - - var body = document.getElementsByTagName('body')[0]; - try { - body.removeChild(this.div); - } catch (e) { - ; - } - - this.domElement = null; - this.div = null; - } - }, - - reposition: function (elem) { - // reposition our floating div, optionally to new container - // warning: container CANNOT change size, only position - if (elem) { - this.domElement = ZeroClipboard.$(elem); - if (!this.domElement) this.hide(); - } - - if (this.domElement && this.div) { - var box = ZeroClipboard.getDOMObjectPosition(this.domElement); - var style = this.div.style; - style.left = '' + box.left + 'px'; - style.top = '' + box.top + 'px'; - } - }, - - setText: function (newText) { - // set text to be copied to clipboard - this.clipText = newText; - if (this.ready) { - this.movie.setText(newText); - } - }, - - addEventListener: function (eventName, func) { - // add user event listener for event - // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel - eventName = eventName.toString().toLowerCase().replace(/^on/, ''); - if (!this.handlers[eventName]) { - this.handlers[eventName] = []; - } - this.handlers[eventName].push(func); - }, - - setHandCursor: function (enabled) { - // enable hand cursor (true), or default arrow cursor (false) - this.handCursorEnabled = enabled; - if (this.ready) { - this.movie.setHandCursor(enabled); - } - }, - - setCSSEffects: function (enabled) { - // enable or disable CSS effects on DOM container - this.cssEffects = !!enabled; - }, - - receiveEvent: function (eventName, args) { - // receive event from flash - eventName = eventName.toString().toLowerCase().replace(/^on/, ''); - - // special behavior for certain events - switch (eventName) { - case 'load': - // movie claims it is ready, but in IE this isn't always the case... - // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function - this.movie = document.getElementById(this.movieId); - if (!this.movie) { - var self = this; - setTimeout(function () { - self.receiveEvent('load', null); - }, 1); - return; - } - - // firefox on pc needs a "kick" in order to set these in certain cases - if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { - var self = this; - setTimeout(function () { - self.receiveEvent('load', null); - }, 100); - this.ready = true; - return; - } - - this.ready = true; - try { - this.movie.setText(this.clipText); - } catch (e) { - } - try { - this.movie.setHandCursor(this.handCursorEnabled); - } catch (e) { - } - break; - - case 'mouseover': - if (this.domElement && this.cssEffects) { - this.domElement.addClass('hover'); - if (this.recoverActive) { - this.domElement.addClass('active'); - } - - - } - - - break; - - case 'mouseout': - if (this.domElement && this.cssEffects) { - this.recoverActive = false; - if (this.domElement.hasClass('active')) { - this.domElement.removeClass('active'); - this.recoverActive = true; - } - this.domElement.removeClass('hover'); - - } - break; - - case 'mousedown': - if (this.domElement && this.cssEffects) { - this.domElement.addClass('active'); - } - break; - - case 'mouseup': - if (this.domElement && this.cssEffects) { - this.domElement.removeClass('active'); - this.recoverActive = false; - } - break; - } // switch eventName - if (this.handlers[eventName]) { - for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { - var func = this.handlers[eventName][idx]; - - if (typeof(func) == 'function') { - // actual function reference - func(this, args); - } else if ((typeof(func) == 'object') && (func.length == 2)) { - // PHP style object + method, i.e. [myObject, 'myMethod'] - func[0][func[1]](this, args); - } else if (typeof(func) == 'string') { - // name of function - window[func](this, args); - } - } // foreach event handler defined - } // user defined handler for event - } - - }; -}/** - * 复制 - * Created by GUY on 2016/2/16. - * @class BI.ClipBoard - * @extends BI.BasicButton - */ -BI.ClipBoard = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-clipboard", - copy: BI.emptyFn, - afterCopy: BI.emptyFn - }) - }, - - _init: function () { - BI.ClipBoard.superclass._init.apply(this, arguments); - }, - - mounted: function () { - var self = this, o = this.options; - if (window.Clipboard) { - this.clipboard = new Clipboard(this.element[0], { - text: function () { - return BI.isFunction(o.copy) ? o.copy() : o.copy; - } - }); - this.clipboard.on("success", o.afterCopy) - } else { - this.element.zclip({ - path: BI.resourceURL + "/ZeroClipboard.swf", - copy: o.copy, - beforeCopy: o.beforeCopy, - afterCopy: o.afterCopy - }); - } - }, - - destroyed: function () { - this.clipboard && this.clipboard.destroy(); - } -}); - -BI.shortcut("bi.clipboard", BI.ClipBoard);/** - * 自定义选色 - * - * Created by GUY on 2015/11/17. - * @class BI.CustomColorChooser - * @extends BI.Widget - */ -BI.CustomColorChooser = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-custom-color-chooser", - width: 227, - height: 245 - }) - }, - - _init: function () { - BI.CustomColorChooser.superclass._init.apply(this, arguments); - var self = this; - this.editor = BI.createWidget({ - type: "bi.color_picker_editor", - width: 195 - }); - this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - }); - this.farbtastic = BI.createWidget({ - type: "bi.farbtastic" - }); - this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - type: "bi.absolute", - items: [{ - el: this.editor, - left: 15, - top: 10, - right: 15 - }], - height: 30 - }, { - type: "bi.absolute", - items: [{ - el: this.farbtastic, - left: 15, - right: 15, - top: 10 - }], - height: 215 - }] - }) - }, - - setValue: function (color) { - this.editor.setValue(color); - this.farbtastic.setValue(color); - }, - - getValue: function () { - return this.editor.getValue(); - } -}); -BI.CustomColorChooser.EVENT_CHANGE = "CustomColorChooser.EVENT_CHANGE"; -BI.shortcut("bi.custom_color_chooser", BI.CustomColorChooser);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooser - * @extends BI.Widget - */ -BI.ColorChooser = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-chooser", - el: {} - }) - }, - - _init: function () { - BI.ColorChooser.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(BI.extend({ - type: "bi.color_chooser_trigger", - width: o.width, - height: o.height - }, o.el)); - this.colorPicker = BI.createWidget({ - type: "bi.color_chooser_popup" - }); - - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 1, - el: this.trigger, - popup: { - el: this.colorPicker, - stopPropagation: false, - minWidth: 202 - } - }); - - var fn = function () { - var color = self.colorPicker.getValue(); - self.trigger.setValue(color); - var colors = BI.string2Array(BI.Cache.getItem("colors") || ""); - var que = new BI.Queue(8); - que.fromArray(colors); - que.remove(color); - que.unshift(color); - BI.Cache.setItem("colors", BI.array2String(que.toArray())); - }; - - this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () { - fn(); - }); - - this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { - fn(); - self.combo.hideView(); - }); - this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || "")); - }); - - this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { - self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); - }) - }, - - isViewVisible: function () { - return this.combo.isViewVisible(); - }, - - setValue: function (color) { - this.combo.setValue(color); - }, - - getValue: function () { - return this.colorPicker.getValue(); - } -}); -BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser", BI.ColorChooser);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooserPopup - * @extends BI.Widget - */ -BI.ColorChooserPopup = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-chooser-popup", - height: 145 - }) - }, - - _init: function () { - BI.ColorChooserPopup.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colorEditor = BI.createWidget({ - type: "bi.color_picker_editor" - }); - - this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); - }); - - this.storeColors = BI.createWidget({ - type: "bi.color_picker", - items: [[{ - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }]], - width: 190, - height: 25 - }); - this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { - self.setValue(this.getValue()[0]); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - }); - - this.colorPicker = BI.createWidget({ - type: "bi.color_picker", - width: 190, - height: 50 - }); - - this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { - self.setValue(this.getValue()[0]); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - }); - - this.customColorChooser = BI.createWidget({ - type: "bi.custom_color_chooser" - }); - - var panel = BI.createWidget({ - type: "bi.popup_panel", - buttons: [BI.i18nText("BI-Basic_Cancel"), BI.i18nText("BI-Basic_Save")], - title: BI.i18nText("BI-Custom_Color"), - el: this.customColorChooser, - stopPropagation: false, - bgap: -1, - rgap: 1, - lgap: 1, - minWidth: 227 - }); - - this.more = BI.createWidget({ - type: "bi.combo", - direction: "right,top", - isNeedAdjustHeight: false, - el: { - type: "bi.text_item", - cls: "color-chooser-popup-more bi-list-item", - textAlign: "center", - height: 20, - text: BI.i18nText("BI-Basic_More") + "..." - }, - popup: panel - }); - - this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self.customColorChooser.setValue(self.getValue()); - }); - panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) { - switch (index) { - case 0: - self.more.hideView(); - break; - case 1: - self.setValue(self.customColorChooser.getValue()); - self.more.hideView(); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - break; - } - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - el: { - type: "bi.absolute", - cls: "bi-background bi-border-bottom", - items: [{ - el: this.colorEditor, - left: 0, - right: 0, - top: 5 - }] - }, - height: 30 - }, { - el: { - type: "bi.absolute", - items: [{ - el: this.storeColors, - left: 5, - right: 5, - top: 5 - }] - }, - height: 30 - }, { - el: { - type: "bi.absolute", - items: [{ - el: this.colorPicker, - left: 5, - right: 5, - top: 5 - }] - }, - height: 65 - }, { - el: this.more, - height: 20 - }] - }) - }, - - setStoreColors: function (colors) { - if (BI.isArray(colors)) { - var items = BI.map(colors, function (i, color) { - return { - value: color - } - }); - BI.count(colors.length, 8, function (i) { - items.push({ - value: "", - disabled: true - }) - }); - this.storeColors.populate([items]); - } - }, - - setValue: function (color) { - this.colorEditor.setValue(color); - this.colorPicker.setValue(color); - this.storeColors.setValue(color); - }, - - getValue: function () { - return this.colorEditor.getValue(); - } -}); -BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE"; -BI.ColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooserTrigger - * @extends BI.Trigger - */ -BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", - height: 30 - }) - }, - - _init: function () { - BI.ColorChooserTrigger.superclass._init.apply(this, arguments); - this.colorContainer = BI.createWidget({ - type: "bi.layout", - cls: "bi-card color-chooser-trigger-content" - }); - - var down = BI.createWidget({ - type: "bi.icon_button", - disableSelected: true, - cls: "icon-combo-down-icon trigger-triangle-font", - width: 12, - height: 8 - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.colorContainer, - left: 3, - right: 3, - top: 3, - bottom: 3 - }, { - el: down, - right: 3, - bottom: 3 - }] - }); - if (this.options.value) { - this.setValue(this.options.value); - } - }, - - setValue: function (color) { - BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments); - if (color === "") { - this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); - } else if (color === "transparent") { - this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background") - } else { - this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background"); - } - } -}); -BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser_trigger", BI.ColorChooserTrigger);/** - * 简单选色控件按钮 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPickerButton - * @extends BI.BasicButton - */ -BI.ColorPickerButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-color-picker-button bi-background bi-border-top bi-border-left" - }) - }, - - _init: function () { - BI.ColorPickerButton.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.value) { - this.element.css("background-color", o.value); - var name = this.getName(); - this.element.hover(function () { - self._createMask(); - if (self.isEnabled()) { - BI.Maskers.show(name); - } - }, function () { - if (!self.isSelected()) { - BI.Maskers.hide(name); - } - }); - } - }, - - _createMask: function () { - var o = this.options, name = this.getName(); - if (this.isEnabled() && !BI.Maskers.has(name)) { - var w = BI.Maskers.make(name, this, { - offset: { - left: -1, - top: -1, - right: -1, - bottom: -1 - } - }); - w.element.addClass("color-picker-button-mask").css("background-color", o.value); - } - }, - - setSelected: function (b) { - BI.ColorPickerButton.superclass.setSelected.apply(this, arguments); - if (!!b) { - this._createMask(); - } - BI.Maskers[!!b ? "show" : "hide"](this.getName()); - } -}); -BI.ColorPickerButton.EVENT_CHANGE = "ColorPickerButton.EVENT_CHANGE"; -BI.shortcut("bi.color_picker_button", BI.ColorPickerButton);/** - * 简单选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPicker - * @extends BI.Widget - */ -BI.ColorPicker = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-picker", - items: null - }) - }, - - _items: [ - [{ - value: "#ffffff" - }, { - value: "#f2f2f2" - }, { - value: "#e5e5e5" - }, { - value: "#d9d9d9" - }, { - value: "#cccccc" - }, { - value: "#bfbfbf" - }, { - value: "#b2b2b2" - }, { - value: "#a6a6a6" - }, { - value: "#999999" - }, { - value: "#8c8c8c" - }, { - value: "#808080" - }, { - value: "#737373" - }, { - value: "#666666" - }, { - value: "#4d4d4d" - }, { - value: "#333333" - }, { - value: "#000000" - }], - [{ - value: "#d8b5a6" - }, { - value: "#ff9e9a" - }, { - value: "#ffc17d" - }, { - value: "#f5e56b" - }, { - value: "#d8e698" - }, { - value: "#e0ebaf" - }, { - value: "#c3d825" - }, { - value: "#bce2e8" - }, { - value: "#85d3cd" - }, { - value: "#bce2e8" - }, { - value: "#a0d8ef" - }, { - value: "#89c3eb" - }, { - value: "#bbc8e6" - }, { - value: "#bbbcde" - }, { - value: "#d6b4cc" - }, { - value: "#fbc0d3" - }], - [{ - value: "#bb9581" - }, { - value: "#f37d79" - }, { - value: "#fba74f" - }, { - value: "#ffdb4f" - }, { - value: "#c7dc68" - }, { - value: "#b0ca71" - }, { - value: "#99ab4e" - }, { - value: "#84b9cb" - }, { - value: "#00a3af" - }, { - value: "#2ca9e1" - }, { - value: "#0095d9" - }, { - value: "#4c6cb3" - }, { - value: "#8491c3" - }, { - value: "#a59aca" - }, { - value: "#cc7eb1" - }, { - value: "#e89bb4" - }], - [{ - value: "#9d775f" - }, { - value: "#dd4b4b" - }, { - value: "#ef8b07" - }, { - value: "#fcc800" - }, { - value: "#aacf53" - }, { - value: "#82ae46" - }, { - value: "#69821b" - }, { - value: "#59b9c6" - }, { - value: "#2a83a2" - }, { - value: "#007bbb" - }, { - value: "#19448e" - }, { - value: "#274a78" - }, { - value: "#4a488e" - }, { - value: "#7058a3" - }, { - value: "#884898" - }, { - value: "#d47596" - }] - ], - - _init: function () { - BI.ColorPicker.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colors = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(o.items || this._items, { - type: "bi.color_picker_button", - once: false - }), - layouts: [{ - type: "bi.grid" - }] - }); - this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () { - self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments); - }) - }, - - populate: function(items){ - var args =[].slice.call(arguments); - args[0] = BI.createItems(items, { - type: "bi.color_picker_button", - once: false - }); - this.colors.populate.apply(this.colors, args); - }, - - setValue: function (color) { - this.colors.setValue(color); - }, - - getValue: function () { - return this.colors.getValue(); - } -}); -BI.ColorPicker.EVENT_CHANGE = "ColorPicker.EVENT_CHANGE"; -BI.shortcut("bi.color_picker", BI.ColorPicker);/** - * 简单选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPickerEditor - * @extends BI.Widget - */ -BI.ColorPickerEditor = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-picker-editor", - width: 200, - height: 20 - }) - }, - - _init: function () { - BI.ColorPickerEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colorShow = BI.createWidget({ - type: "bi.layout", - cls: "color-picker-editor-display bi-card", - height: 20 - }); - var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { - type: "bi.label", - cls: "color-picker-editor-label", - width: 10, - height: 20 - })); - - var checker = function (v) { - return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255; - }; - var Ws = BI.createWidgets([{}, {}, {}], { - type: "bi.small_text_editor", - cls: "color-picker-editor-input", - validationChecker: checker, - errorText: BI.i18nText("BI-Color_Picker_Error_Text"), - allowBlank: true, - value: 255, - width: 32, - height: 20 - }); - BI.each(Ws, function (i, w) { - w.on(BI.TextEditor.EVENT_CHANGE, function () { - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - }); - this.R = Ws[0]; - this.G = Ws[1]; - this.B = Ws[2]; - - this.none = BI.createWidget({ - type: "bi.checkbox", - title: BI.i18nText("BI-Basic_Auto") - }); - this.none.on(BI.Checkbox.EVENT_CHANGE, function () { - if (this.isSelected()) { - self.lastColor = self.getValue(); - self.setValue(""); - } else { - self.setValue(self.lastColor || "#000000"); - } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - - this.transparent = BI.createWidget({ - type: "bi.checkbox", - title: BI.i18nText("BI-Transparent_Color") - }); - this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () { - if (this.isSelected()) { - self.lastColor = self.getValue(); - self.setValue("transparent"); - } else { - self.setValue(self.lastColor || "#000000"); - } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.colorShow, - width: 'fill' - }, { - el: RGB[0], - lgap: 10, - width: 16 - }, { - el: this.R, - width: 32 - }, { - el: RGB[1], - lgap: 10, - width: 16 - }, { - el: this.G, - width: 32 - }, { - el: RGB[2], - lgap: 10, - width: 16 - }, { - el: this.B, - width: 32 - }, { - el: { - type: "bi.center_adapt", - items: [this.none] - }, - width: 18 - }, { - el: { - type: "bi.center_adapt", - items: [this.transparent] - }, - width: 18 - }] - }) - }, - - setValue: function (color) { - if (color === "transparent") { - this.transparent.setSelected(true); - this.none.setSelected(false); - this.R.setValue(""); - this.G.setValue(""); - this.B.setValue(""); - return; - } - if (!color) { - color = ""; - this.none.setSelected(true); - } else { - this.none.setSelected(false); - } - this.transparent.setSelected(false); - this.colorShow.element.css("background-color", color); - var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); - this.R.setValue(BI.isNull(json.r) ? "" : json.r); - this.G.setValue(BI.isNull(json.g) ? "" : json.g); - this.B.setValue(BI.isNull(json.b) ? "" : json.b); - }, - - getValue: function () { - if (this.transparent.isSelected()) { - return "transparent"; - } - return BI.DOM.rgb2hex(BI.DOM.json2rgb({ - r: this.R.getValue(), - g: this.G.getValue(), - b: this.B.getValue() - })) - } -}); -BI.ColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE"; -BI.shortcut("bi.color_picker_editor", BI.ColorPickerEditor);/** - * 选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.Farbtastic - * @extends BI.Widget - */ -BI.Farbtastic = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-farbtastic", - width: 195, - height: 195 - }) - }, - - _init: function () { - BI.Farbtastic.superclass._init.apply(this, arguments); - }, - - mounted: function () { - var self = this; - this.farbtastic = $.farbtastic(this.element, function (v) { - self.fireEvent(BI.Farbtastic.EVENT_CHANGE, self.getValue(), self); - }); - }, - - setValue: function (color) { - this.farbtastic.setColor(color); - }, - - getValue: function () { - return this.farbtastic.color; - } -}); -BI.Farbtastic.EVENT_CHANGE = "Farbtastic.EVENT_CHANGE"; -BI.shortcut("bi.farbtastic", BI.Farbtastic);/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -jQuery.fn.farbtastic = function (callback) { - $.farbtastic(this, callback); - return this; -}; - -jQuery.farbtastic = function (container, callback) { - var container = $(container).get(0); - return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); -} - -jQuery._farbtastic = function (container, callback) { - // Store farbtastic object - var fb = this; - - // Insert markup - $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>'); - var e = $('.farbtastic', container); - fb.wheel = $('.wheel', container).get(0); - // Dimensions - fb.radius = 84; - fb.square = 100; - fb.width = 194; - - // Fix background PNGs in IE6 - if (navigator.appVersion.match(/MSIE [0-6]\./)) { - $('*', e).each(function () { - if (this.currentStyle.backgroundImage != 'none') { - var image = this.currentStyle.backgroundImage; - image = this.currentStyle.backgroundImage.substring(5, image.length - 2); - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }); - } - }); - } - - /** - * Link to the given element(s) or callback. - */ - fb.linkTo = function (callback) { - // Unbind previous nodes - if (typeof fb.callback == 'object') { - $(fb.callback).unbind('keyup', fb.updateValue); - } - - // Reset color - fb.color = null; - - // Bind callback or elements - if (typeof callback == 'function') { - fb.callback = callback; - } - else if (typeof callback == 'object' || typeof callback == 'string') { - fb.callback = $(callback); - fb.callback.bind('keyup', fb.updateValue); - if (fb.callback.get(0).value) { - fb.setColor(fb.callback.get(0).value); - } - } - return this; - } - fb.updateValue = function (event) { - if (this.value && this.value != fb.color) { - fb.setColor(this.value); - } - } - - /** - * Change color with HTML syntax #123456 - */ - fb.setColor = function (color) { - var unpack = fb.unpack(color); - if (fb.color != color && unpack) { - fb.color = color; - fb.rgb = unpack; - fb.hsl = fb.RGBToHSL(fb.rgb); - fb.updateDisplay(); - } - return this; - } - - /** - * Change color with HSL triplet [0..1, 0..1, 0..1] - */ - fb.setHSL = function (hsl) { - fb.hsl = hsl; - fb.rgb = fb.HSLToRGB(hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - ///////////////////////////////////////////////////// - - /** - * Retrieve the coordinates of the given event relative to the center - * of the widget. - */ - fb.widgetCoords = function (event) { - var x, y; - var el = event.target || event.srcElement; - var reference = fb.wheel; - - if (typeof event.offsetX != 'undefined') { - // Use offset coordinates and find common offsetParent - var pos = { x: event.offsetX, y: event.offsetY }; - - // Send the coordinates upwards through the offsetParent chain. - var e = el; - while (e) { - e.mouseX = pos.x; - e.mouseY = pos.y; - pos.x += e.offsetLeft; - pos.y += e.offsetTop; - e = e.offsetParent; - } - - // Look for the coordinates starting from the wheel widget. - var e = reference; - var offset = { x: 0, y: 0 } - while (e) { - if (typeof e.mouseX != 'undefined') { - x = e.mouseX - offset.x; - y = e.mouseY - offset.y; - break; - } - offset.x += e.offsetLeft; - offset.y += e.offsetTop; - e = e.offsetParent; - } - - // Reset stored coordinates - e = el; - while (e) { - e.mouseX = undefined; - e.mouseY = undefined; - e = e.offsetParent; - } - } - else { - // Use absolute coordinates - var pos = fb.absolutePosition(reference); - x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; - y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; - } - // Subtract distance to middle - return { x: x - fb.width / 2, y: y - fb.width / 2 }; - } - - /** - * Mousedown handler - */ - fb.mousedown = function (event) { - // Capture mouse - if (!document.dragging) { - $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); - document.dragging = true; - } - - // Check which area is being dragged - var pos = fb.widgetCoords(event); - fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; - - // Process - fb.mousemove(event); - return false; - } - - /** - * Mousemove handler - */ - fb.mousemove = function (event) { - // Get coordinates relative to color picker center - var pos = fb.widgetCoords(event); - - // Set new HSL parameters - if (fb.circleDrag) { - var hue = Math.atan2(pos.x, -pos.y) / 6.28; - if (hue < 0) hue += 1; - fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); - } - else { - var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); - var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); - fb.setHSL([fb.hsl[0], sat, lum]); - } - return false; - } - - /** - * Mouseup handler - */ - fb.mouseup = function () { - // Uncapture mouse - $(document).unbind('mousemove', fb.mousemove); - $(document).unbind('mouseup', fb.mouseup); - document.dragging = false; - } - - /** - * Update the markers and styles - */ - fb.updateDisplay = function () { - // Markers - var angle = fb.hsl[0] * 6.28; - $('.h-marker', e).css({ - left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', - top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' - }); - - $('.sl-marker', e).css({ - left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', - top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' - }); - - // Saturation/Luminance gradient - $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); - - // Linked elements or callback - if (typeof fb.callback == 'object') { - // Set background/foreground color - $(fb.callback).css({ - backgroundColor: fb.color, - color: fb.hsl[2] > 0.5 ? '#000' : '#fff' - }); - - // Change linked value - $(fb.callback).each(function() { - if (this.value && this.value != fb.color) { - this.value = fb.color; - } - }); - } - else if (typeof fb.callback == 'function') { - fb.callback.call(fb, fb.color); - } - } - - /** - * Get absolute position of element - */ - fb.absolutePosition = function (el) { - var r = { x: el.offsetLeft, y: el.offsetTop }; - // Resolve relative to offsetParent - if (el.offsetParent) { - var tmp = fb.absolutePosition(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; - }; - - /* Various color utility functions */ - fb.pack = function (rgb) { - var r = Math.round(rgb[0] * 255); - var g = Math.round(rgb[1] * 255); - var b = Math.round(rgb[2] * 255); - return '#' + (r < 16 ? '0' : '') + r.toString(16) + - (g < 16 ? '0' : '') + g.toString(16) + - (b < 16 ? '0' : '') + b.toString(16); - } - - fb.unpack = function (color) { - if (color.length == 7) { - return [parseInt('0x' + color.substring(1, 3)) / 255, - parseInt('0x' + color.substring(3, 5)) / 255, - parseInt('0x' + color.substring(5, 7)) / 255]; - } - else if (color.length == 4) { - return [parseInt('0x' + color.substring(1, 2)) / 15, - parseInt('0x' + color.substring(2, 3)) / 15, - parseInt('0x' + color.substring(3, 4)) / 15]; - } - } - - fb.HSLToRGB = function (hsl) { - var m1, m2, r, g, b; - var h = hsl[0], s = hsl[1], l = hsl[2]; - m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; - m1 = l * 2 - m2; - return [this.hueToRGB(m1, m2, h+0.33333), - this.hueToRGB(m1, m2, h), - this.hueToRGB(m1, m2, h-0.33333)]; - } - - fb.hueToRGB = function (m1, m2, h) { - h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); - if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; - if (h * 2 < 1) return m2; - if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; - return m1; - } - - fb.RGBToHSL = function (rgb) { - var min, max, delta, h, s, l; - var r = rgb[0], g = rgb[1], b = rgb[2]; - min = Math.min(r, Math.min(g, b)); - max = Math.max(r, Math.max(g, b)); - delta = max - min; - l = (min + max) / 2; - s = 0; - if (l > 0 && l < 1) { - s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); - } - h = 0; - if (delta > 0) { - if (max == r && max != g) h += (g - b) / delta; - if (max == g && max != b) h += (2 + (b - r) / delta); - if (max == b && max != r) h += (4 + (r - g) / delta); - h /= 6; - } - return [h, s, l]; - } - - // Install mousedown handler (the others are set on the document on-demand) - $('*', e).mousedown(fb.mousedown); - - // Init color - fb.setColor('#000000'); - - // Set linked elements/callback - if (callback) { - fb.linkTo(callback); - } -}/** - * Created by GUY on 2017/2/8. - * - * @class BI.BubbleCombo - * @extends BI.Widget - */ -BI.BubbleCombo = BI.inherit(BI.Widget, { - _const: { - TRIANGLE_LENGTH: 6 - }, - _defaultConfig: function () { - return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bubble-combo", - trigger: "click", - toggle: true, - direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right - isDefaultInit: false, - destroyWhenHide: false, - isNeedAdjustHeight: true,//是否需要高度调整 - isNeedAdjustWidth: true, - stopPropagation: false, - adjustLength: 0,//调整的距离 - // adjustXOffset: 0, - // adjustYOffset: 10, - hideChecker: BI.emptyFn, - offsetStyle: "left", //left,right,center - el: {}, - popup: {}, - }) - }, - _init: function () { - BI.BubbleCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - trigger: o.trigger, - toggle: o.toggle, - direction: o.direction, - isDefaultInit: o.isDefaultInit, - destroyWhenHide: o.destroyWhenHide, - isNeedAdjustHeight: o.isNeedAdjustHeight, - isNeedAdjustWidth: o.isNeedAdjustWidth, - adjustLength: this._getAdjustLength(), - stopPropagation: o.stopPropagation, - adjustXOffset: 0, - adjustYOffset: 0, - hideChecker: o.hideChecker, - offsetStyle: o.offsetStyle, - el: o.el, - popup: BI.extend({ - type: "bi.bubble_popup_view" - }, o.popup), - }); - this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments); - }); - this.combo.on(BI.Combo.EVENT_CHANGE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments); - }); - this.combo.on(BI.Combo.EVENT_EXPAND, function () { - self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments); - }); - this.combo.on(BI.Combo.EVENT_COLLAPSE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments); - }); - this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () { - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments); - }); - this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments); - }); - this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self._showTriangle(); - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments); - }); - this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { - self._hideTriangle(); - self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments); - }); - this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments); - }); - }, - - _getAdjustLength: function () { - return this._const.TRIANGLE_LENGTH + this.options.adjustLength; - }, - - _createTriangle: function (direction) { - var pos = {}, op = {}; - var adjustLength = this.options.adjustLength; - var offset = this.element.offset(); - var left = offset.left, right = offset.left + this.element.outerWidth(); - var top = offset.top, bottom = offset.top + this.element.outerHeight(); - switch (direction) { - case "left": - pos = { - top: top, - height: this.element.outerHeight(), - left: left - adjustLength - this._const.TRIANGLE_LENGTH - }; - op = {width: this._const.TRIANGLE_LENGTH}; - break; - case "right": - pos = { - top: top, - height: this.element.outerHeight(), - left: right + adjustLength - }; - op = {width: this._const.TRIANGLE_LENGTH}; - break; - case "top": - pos = { - left: left, - width: this.element.outerWidth(), - top: top - adjustLength - this._const.TRIANGLE_LENGTH - }; - op = {height: this._const.TRIANGLE_LENGTH}; - break; - case "bottom": - pos = { - left: left, - width: this.element.outerWidth(), - top: bottom + adjustLength - }; - op = {height: this._const.TRIANGLE_LENGTH}; - break; - default: - break; - } - this.triangle && this.triangle.destroy(); - this.triangle = BI.createWidget(op, { - type: "bi.center_adapt", - cls: "button-combo-triangle-wrapper", - items: [{ - type: "bi.layout", - cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" - }] - }); - pos.el = this.triangle; - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [pos] - }) - }, - - _createLeftTriangle: function () { - this._createTriangle("left"); - }, - - _createRightTriangle: function () { - this._createTriangle("right"); - }, - - _createTopTriangle: function () { - this._createTriangle("top"); - }, - - _createBottomTriangle: function () { - this._createTriangle("bottom"); - }, - - _showTriangle: function () { - var pos = this.combo.getPopupPosition(); - switch (pos.dir) { - case "left,top": - case "left,bottom": - this._createLeftTriangle(); - this.combo.getView().showLine("right"); - break; - case "right,top": - case "right,bottom": - this._createRightTriangle(); - this.combo.getView().showLine("left"); - break; - case "top,left": - case "top,right": - this._createTopTriangle(); - this.combo.getView().showLine("bottom"); - break; - case "bottom,left": - case "bottom,right": - this._createBottomTriangle(); - this.combo.getView().showLine("top"); - break; - } - }, - - _hideTriangle: function () { - this.triangle && this.triangle.destroy(); - this.triangle = null; - this.combo.getView() && this.combo.getView().hideLine(); - }, - - hideView: function () { - this._hideTriangle(); - this.combo && this.combo.hideView(); - }, - - showView: function () { - this.combo && this.combo.showView(); - }, - - isViewVisible: function () { - return this.combo.isViewVisible(); - } -}); - -BI.BubbleCombo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.BubbleCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.BubbleCombo.EVENT_EXPAND = "EVENT_EXPAND"; -BI.BubbleCombo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.BubbleCombo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.BubbleCombo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.BubbleCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; -BI.shortcut("bi.bubble_combo", BI.BubbleCombo);/** - * Created by GUY on 2017/2/8. - * - * @class BI.BubblePopupView - * @extends BI.PopupView - */ -BI.BubblePopupView = BI.inherit(BI.PopupView, { - _defaultConfig: function () { - var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(config, { - baseCls: config.baseCls + " bi-bubble-popup-view" - }) - }, - _init: function () { - BI.BubblePopupView.superclass._init.apply(this, arguments); - }, - - showLine: function (direction) { - var pos = {}, op = {}; - switch (direction) { - case "left": - pos = { - top: 0, - bottom: 0, - left: -1 - }; - op = {width: 3}; - break; - case "right": - pos = { - top: 0, - bottom: 0, - right: -1 - }; - op = {width: 3}; - break; - case "top": - pos = { - left: 0, - right: 0, - top: -1 - }; - op = {height: 3}; - break; - case "bottom": - pos = { - left: 0, - right: 0, - bottom: -1 - }; - op = {height: 3}; - break; - default: - break; - } - this.line = BI.createWidget(op, { - type: "bi.layout", - cls: "bubble-popup-line bi-high-light-background" - }); - pos.el = this.line; - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [pos] - }) - }, - - hideLine: function () { - this.line && this.line.destroy(); - } -}); - -BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); - -/** - * Created by GUY on 2017/2/8. - * - * @class BI.BubblePopupBarView - * @extends BI.BubblePopupView - */ -BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { - _defaultConfig: function () { - return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-bubble-bar-popup-view", - buttons: [{value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}, {value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}] - }) - }, - _init: function () { - BI.BubblePopupBarView.superclass._init.apply(this, arguments); - }, - _createToolBar: function () { - var o = this.options, self = this; - - var items = []; - BI.each(o.buttons.reverse(), function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)){ - items.push(buttonOpt); - }else{ - items.push(BI.extend({ - type: 'bi.button', - height: 30, - handler: function (v) { - self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); - } - }, buttonOpt)) - } - }); - return BI.createWidget({ - type: 'bi.right_vertical_adapt', - height: 40, - hgap: 10, - bgap: 10, - items: items - }); - } -}); -BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; -BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/** - * Created by Young's on 2016/4/28. - */ -BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-check-editor-combo", - width: 100, - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "" - }) - }, - - _init: function () { - BI.EditorIconCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.editor_trigger", - items: o.items, - height: o.height, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () { - self.popup.setValue(this.getValue()); - self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.editorIconCheckCombo.hideView(); - self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editorIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.editorIconCheckCombo.setValue(v); - }, - - getValue: function () { - return this.trigger.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.editorIconCheckCombo.populate(items); - } -}); -BI.EditorIconCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.editor_icon_check_combo", BI.EditorIconCheckCombo);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaCombo - * @extend BI.Widget - */ -BI.FormulaCombo = BI.inherit(BI.Widget, { - - _constant: { - POPUP_HEIGHT: 450, - POPUP_WIDTH: 600, - POPUP_V_GAP: 10, - POPUP_H_GAP: 10, - ADJUST_LENGTH: 2, - HEIGHT_MAX: 10000, - MAX_HEIGHT: 500, - MAX_WIDTH: 600, - COMBO_TRIGGER_WIDTH: 300 - }, - - _defaultConfig: function () { - return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-combo", - height: 30, - items: [] - }) - }, - - _init: function () { - BI.FormulaCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.formula_ids = []; - this.input = BI.createWidget({ - type: "bi.formula_combo_trigger", - height: o.height, - items: o.items - }); - this.formulaPopup = BI.createWidget({ - type: "bi.formula_combo_popup", - fieldItems: o.items - }); - - this.formulaInputCombo = BI.createWidget({ - type: "bi.combo", - element: this, - isNeedAdjustHeight: true, - isNeedAdjustWidth: false, - adjustLength: this._constant.ADJUST_LENGTH, - el: this.input, - popup: { - el: { - type: "bi.absolute", - height: this._constant.HEIGHT_MAX, - width: this._constant.POPUP_WIDTH, - items: [{ - el: this.formulaPopup, - top: this._constant.POPUP_V_GAP, - left: this._constant.POPUP_H_GAP, - right: this._constant.POPUP_V_GAP, - bottom: 0 - }] - }, - stopPropagation: false, - maxHeight: this._constant.MAX_HEIGHT, - width: this._constant.MAX_WIDTH - } - }); - this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self.formulaPopup.setValue(self.input.getValue()); - }); - this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE, function () { - self.setValue(self.formulaPopup.getValue()); - self.formulaInputCombo.hideView(); - self.fireEvent(BI.FormulaCombo.EVENT_CHANGE); - }); - this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL, function () { - self.formulaInputCombo.hideView(); - }); - }, - - setValue: function (v) { - if (this.formulaInputCombo.isViewVisible()) { - this.formulaInputCombo.hideView(); - } - this.input.setValue(v); - this.input.setText(BI.Func.getFormulaStringFromFormulaValue(v)); - this.formulaPopup.setValue(this.input.getValue()); - }, - - getFormulaTargetIds: function() { - return this.formulaPopup.getFormulaTargetIds(); - }, - - getValue: function () { - return this.input.getValue(); - } -}); -BI.FormulaCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.formula_combo", BI.FormulaCombo);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaComboPopup - * @extend BI.Widget - */ -BI.FormulaComboPopup = BI.inherit(BI.Widget, { - - _constant: { - BUTTON_HEIGHT: 30, - SOUTH_HEIGHT: 60, - SOUTH_H_GAP: 10 - }, - - _defaultConfig: function () { - return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-pane-popup" - }) - }, - - _init: function () { - BI.FormulaComboPopup.superclass._init.apply(this, arguments); - this.populate(); - }, - - populate: function () { - var self = this, fieldItems = this.options.fieldItems; - this.formula = BI.createWidget({ - type: "bi.formula_insert" - }); - this.formula.populate(fieldItems); - var confirmButton = BI.createWidget({ - type: "bi.button", - level: "common", - height: this._constant.BUTTON_HEIGHT, - text: BI.i18nText("BI-Basic_OK") - }); - var cancelButton = BI.createWidget({ - type: "bi.button", - level: "ignore", - height: this._constant.BUTTON_HEIGHT, - text: BI.i18nText("BI-Basic_Cancel") - }); - - this.formula.on(BI.FormulaInsert.EVENT_CHANGE, function () { - confirmButton.setEnable(self.formula.checkValidation()); - }); - confirmButton.on(BI.Button.EVENT_CHANGE, function () { - self.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE); - }); - cancelButton.on(BI.Button.EVENT_CHANGE, function () { - self.setValue(self.oldValue); - self.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL); - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - el: this.formula, - height: "fill" - }, { - el: { - type: "bi.right_vertical_adapt", - height: this._constant.SOUTH_HEIGHT, - items: [cancelButton, confirmButton], - hgap: this._constant.SOUTH_H_GAP - }, - height: this._constant.SOUTH_HEIGHT - }] - }) - }, - - getFormulaTargetIds: function(){ - return this.formula.getUsedFields(); - }, - - getValue: function () { - return this.formula.getValue(); - }, - - setValue: function (v) { - this.oldValue = v; - this.formula.setValue(v); - } -}); -BI.FormulaComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.FormulaComboPopup.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; -BI.shortcut("bi.formula_combo_popup", BI.FormulaComboPopup);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaComboTrigger - * @extend BI.Widget - */ -BI.FormulaComboTrigger = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-combo-trigger", - height: 30, - items: [] - }) - }, - - _init: function () { - BI.FormulaComboTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.label = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - textHeight: this.options.height, - lgap: 10 - }); - }, - - _getTextFromFormulaValue: function (formulaValue) { - var self = this; - var formulaString = ""; - var regx = /\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g; - var result = formulaValue.match(regx); - BI.each(result, function (i, item) { - var fieldRegx = /\$[\{][^\}]*[\}]/; - var str = item.match(fieldRegx); - if (BI.isNotEmptyArray(str)) { - var id = str[0].substring(2, item.length - 1); - var item = BI.find(BI.flatten(self.options.items), function (i, item) { - return id === item.value; - }); - formulaString = formulaString + item.text; - } else { - formulaString = formulaString + item; - } - }); - return formulaString; - }, - - getValue: function () { - return this.options.value; - }, - - setValue: function (v) { - this.options.value = v; - this.label.setText(this._getTextFromFormulaValue(v)); - } -}); -BI.shortcut("bi.formula_combo_trigger", BI.FormulaComboTrigger);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconCombo - * @extend BI.Widget - */ -BI.IconCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-icon-combo", - width: 24, - height: 24, - iconClass: "", - el: {}, - popup: {}, - minWidth: 100, - maxWidth: 'auto', - maxHeight: 300, - direction: "bottom", - adjustLength: 3,//调整的距离 - adjustXOffset: 0, - adjustYOffset: 0, - offsetStyle: "left", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }) - }, - - _init: function () { - BI.IconCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.icon_combo_trigger", - iconClass: o.iconClass, - title: o.title, - items: o.items, - width: o.width, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.popup = BI.createWidget(o.popup, { - type: "bi.icon_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.iconCombo.hideView(); - self.fireEvent(BI.IconCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.iconCombo = BI.createWidget({ - type: "bi.combo", - element: this, - direction: o.direction, - adjustLength: o.adjustLength, - adjustXOffset: o.adjustXOffset, - adjustYOffset: o.adjustYOffset, - offsetStyle: o.offsetStyle, - el: this.trigger, - popup: { - el: this.popup, - maxWidth: o.maxWidth, - maxHeight: o.maxHeight, - minWidth: o.minWidth - } - }); - }, - - showView: function () { - this.iconCombo.showView(); - }, - - hideView: function () { - this.iconCombo.hideView(); - }, - - setValue: function (v) { - this.iconCombo.setValue(v); - }, - - getValue: function () { - return this.iconCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.iconCombo.populate(items); - } -}); -BI.IconCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo", BI.IconCombo);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconComboPopup - * @extend BI.Pane - */ -BI.IconComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi.icon-combo-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.IconComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.single_select_icon_text_item", - height: 30 - }), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - populate: function (items) { - BI.IconComboPopup.superclass.populate.apply(this, arguments); - items = BI.createItems(items, { - type: "bi.single_select_icon_text_item", - height: 30 - }); - this.popup.populate(items); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.IconComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo_popup", BI.IconComboPopup);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconComboTrigger - * @extend BI.Widget - */ -BI.IconComboTrigger = BI.inherit(BI.Trigger, { - _defaultConfig: function () { - return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-combo-trigger", - el: {}, - items: [], - iconClass: "", - width: 25, - height: 25, - isShowDown: true - }); - }, - - _init: function () { - BI.IconComboTrigger.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.button = BI.createWidget(o.el, { - type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconClass, - disableSelected: true, - width: o.width, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.down = BI.createWidget({ - type: "bi.icon_button", - disableSelected: true, - cls: "icon-combo-down-icon trigger-triangle-font", - width: 12, - height: 8 - }); - this.down.setVisible(o.isShowDown); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.button, - left: 0, - right: 0, - top: 0, - bottom: 0 - }, { - el: this.down, - right: 0, - bottom: 0 - }] - }); - if (BI.isKey(o.value)) { - this.setValue(o.value); - } - }, - - populate: function (items) { - var o = this.options; - this.options.items = items || []; - this.button.setIcon(o.iconClass); - this.button.setSelected(false); - this.down.setSelected(false); - }, - - setValue: function (v) { - BI.IconComboTrigger.superclass.setValue.apply(this, arguments); - var o = this.options; - var iconClass = ""; - v = BI.isArray(v) ? v[0] : v; - if (BI.any(this.options.items, function (i, item) { - if (v === item.value) { - iconClass = item.iconClass; - return true; - } - })) { - this.button.setIcon(iconClass); - this.button.setSelected(true); - this.down.setSelected(true); - } else { - this.button.setIcon(o.iconClass); - this.button.setSelected(false); - this.down.setSelected(false); - } - } -}); -BI.IconComboTrigger.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo_trigger", BI.IconComboTrigger);/** - * 单选combo - * - * @class BI.StaticCombo - * @extend BI.Widget - */ -BI.StaticCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-static-combo", - height: 30, - text: "", - el: {}, - items: [], - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }) - }, - - _init: function () { - BI.StaticCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.text_icon_item", - cls: "bi-select-text-trigger bi-border pull-down-font", - text: o.text, - readonly: true, - textLgap: 5, - height: o.height - 2 - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - textAlign: o.textAlign, - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.combo.hideView(); - self.fireEvent(BI.StaticCombo.EVENT_CHANGE, arguments); - }); - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup - } - }); - }, - - populate: function (items) { - this.combo.populate(items); - }, - - setValue: function (v) { - this.combo.setValue(v); - }, - - getValue: function () { - return this.combo.getValue(); - } -}); -BI.StaticCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.static_combo", BI.StaticCombo);/** - * @class BI.TextValueCheckCombo - * @extend BI.Widget - * combo : text + icon, popup : check + text - */ -BI.TextValueCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-text-value-check-combo", - width: 100, - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "" - }) - }, - - _init: function () { - BI.TextValueCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.textIconCheckCombo.hideView(); - self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.textIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setTitle: function (title) { - this.trigger.setTitle(title); - }, - - setValue: function (v) { - this.textIconCheckCombo.setValue(v); - }, - - setWarningTitle: function (title) { - this.trigger.setWarningTitle(title); - }, - - getValue: function () { - return this.textIconCheckCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.textIconCheckCombo.populate(items); - } -}); -BI.TextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo);/** - * @class BI.SmallTextValueCheckCombo - * @extend BI.Widget - * combo : text + icon, popup : check + text - */ -BI.SmallTextValueCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { - width: 100, - height: 24, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "" - }) - }, - - _init: function () { - BI.SmallTextValueCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.small_select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.SmallTextIconCheckCombo.hideView(); - self.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.SmallTextIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.SmallTextIconCheckCombo.setValue(v); - }, - - getValue: function () { - return this.SmallTextIconCheckCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.SmallTextIconCheckCombo.populate(items); - } -}); -BI.SmallTextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.small_text_value_check_combo", BI.SmallTextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-icon-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: this._formatItems(o.items), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - _formatItems: function (items) { - return BI.map(items, function (i, item) { - return BI.extend({ - type: "bi.icon_text_item", - cls: "item-check-font bi-list-item", - height: 30 - }, item); - }); - }, - - populate: function (items) { - BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments); - this.popup.populate(this._formatItems(items)); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.TextValueCheckComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/** - * @class BI.TextValueCombo - * @extend BI.Widget - * combo : text + icon, popup : text - * 参见场景dashboard布局方式选择 - */ -BI.TextValueCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-text-value-combo", - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "", - el: {} - }) - }, - - _init: function () { - BI.TextValueCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.textIconCombo.hideView(); - self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.textIconCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.textIconCombo.setValue(v); - }, - - getValue: function () { - return this.textIconCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.textIconCombo.populate(items); - } -}); -BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** - * @class BI.SmallTextValueCombo - * @extend BI.Widget - * combo : text + icon, popup : text - * 参见场景dashboard布局方式选择 - */ -BI.SmallTextValueCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), { - width: 100, - height: 24, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - el: {}, - text: "" - }) - }, - - _init: function () { - BI.SmallTextValueCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.small_select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.SmallTextValueCombo.hideView(); - self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.SmallTextValueCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.SmallTextValueCombo.setValue(v); - }, - - getValue: function () { - return this.SmallTextValueCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.SmallTextValueCombo.populate(items); - } -}); -BI.SmallTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-icon-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.TextValueComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.single_select_item", - textAlign: o.textAlign, - height: 30 - }), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - populate: function (items) { - BI.TextValueComboPopup.superclass.populate.apply(this, arguments); - items = BI.createItems(items, { - type: "bi.single_select_item", - height: 30 - }); - this.popup.populate(items); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.TextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_combo_popup", BI.TextValueComboPopup);/** - * @class BI.TextValueDownListCombo - * @extend BI.Widget - */ -BI.TextValueDownListCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-value-down-list-combo", - height: 30, - text: "" - }) - }, - - _init: function () { - BI.TextValueDownListCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this._createValueMap(); - - this.trigger = BI.createWidget({ - type: "bi.down_list_select_text_trigger", - height: o.height, - items: o.items - }); - - this.combo = BI.createWidget({ - type: "bi.down_list_combo", - element: this, - chooseType: BI.Selection.Single, - adjustLength: 2, - height: o.height, - el: this.trigger, - items: BI.deepClone(o.items) - }); - - this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () { - self.setValue(self.combo.getValue()[0].value); - self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); - }); - - this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () { - self.setValue(self.combo.getValue()[0].childValue); - self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); - }); - }, - - _createValueMap: function () { - var self = this; - this.valueMap = {}; - BI.each(BI.flatten(this.options.items), function (idx, item) { - if (BI.has(item, "el")) { - BI.each(item.children, function (id, it) { - self.valueMap[it.value] = {value: item.el.value, childValue: it.value} - }); - } else { - self.valueMap[item.value] = {value: item.value}; - } - }); - }, - - setValue: function (v) { - v = this.valueMap[v]; - this.combo.setValue([v]); - this.trigger.setValue(v.childValue || v.value); - }, - - getValue: function () { - var v = this.combo.getValue()[0]; - return [v.childValue || v.value]; - }, - - populate: function (items) { - this.options.items = BI.flatten(items); - this.combo.populate(items); - this._createValueMap(); - } -}); -BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);/** - * 选择字段trigger, downlist专用 - * 显示形式为 父亲值(儿子值) - * - * @class BI.DownListSelectTextTrigger - * @extends BI.Trigger - */ -BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-down-list-select-text-trigger", - height: 24, - text: "" - }); - }, - - _init: function () { - BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments); - var o = this.options; - this.trigger = BI.createWidget({ - type: "bi.select_text_trigger", - element: this, - height: o.height, - items: this._formatItemArray(o.items), - text: o.text - }); - }, - - _formatItemArray: function(){ - var sourceArray = BI.flatten(BI.deepClone(this.options.items)); - var targetArray = []; - BI.each(sourceArray, function(idx, item){ - if(BI.has(item, "el")){ - BI.each(item.children, function(id, it){ - it.text = item.el.text + "(" + it.text + ")"; - }); - targetArray = BI.concat(targetArray, item.children); - }else{ - targetArray.push(item); - } - }); - return targetArray; - }, - - setValue: function (vals) { - this.trigger.setValue(vals); - }, - - populate: function (items) { - this.trigger.populate(this._formatItemArray(items)); - } -}); -BI.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** - * 有清楚按钮的文本框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.ClearEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-clear-editor", - height: 30, - errorText: "", - watermark: "", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - BI.ClearEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.ClearEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: this.editor - }, - { - el: this.clear, - width: 25 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ClearEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ClearEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ClearEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ClearEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.ClearEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ClearEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.ClearEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ClearEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ClearEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ClearEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); - } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); - } - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.ClearEditor.EVENT_START = "EVENT_START"; -BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; -BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; -BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.clear_editor", BI.ClearEditor);/** - * Created by roy on 15/9/14. - */ -BI.SearchEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-search-editor bi-border", - height: 30, - errorText: "", - watermark: BI.i18nText("BI-Basic_Search"), - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - this.options.height -= 2; - BI.SearchEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.SearchEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: { - type: "bi.center_adapt", - cls: "search-font", - items: [{ - el: { - type: "bi.icon" - } - }] - }, - width: 25 - }, - { - el: self.editor - }, - { - el: this.clear, - width: 25 - } - ] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SearchEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SearchEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SearchEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SearchEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SearchEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SearchEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.SearchEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SearchEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SearchEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SearchEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); - } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); - } - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.SearchEditor.EVENT_START = "EVENT_START"; -BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; -BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; -BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.search_editor", BI.SearchEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallSearchEditor - * @extends BI.SearchEditor - */ -BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { - _defaultConfig: function () { - var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-search-editor", - height: 24 - }); - }, - - _init: function () { - BI.SmallSearchEditor.superclass._init.apply(this, arguments); - } -}); -BI.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** - * 带标记的文本框 - * Created by GUY on 2016/1/25. - * @class BI.ShelterEditor - * @extends BI.Widget - */ -BI.ShelterEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-shelter-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30, - textAlign: "left" - }) - }, - - _init: function () { - BI.ShelterEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "shelter-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: o.textAlign, - height: o.height, - hgap: 4 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - arguments[2] = self; - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setTextStyle: function (style) { - this.text.setStyle(style); - }, - - setValue: function (k) { - this.editor.setValue(k); - this._checkText(); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - this._showHint(); - this.text.setValue(v); - } -}); -BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.ShelterEditor.EVENT_START = "EVENT_START"; -BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; -BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; -BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.shelter_editor", BI.ShelterEditor);/** - * Created by User on 2017/7/28. - */ -BI.SignInitialEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - value: "", - text: "", - height: 30 - }) - }, - - _init: function () { - BI.SignInitialEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL) - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignInitialEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - var v = this.editor.getValue(); - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.text.setValue(v); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (v) { - var o = this.options; - this.editor.setValue(v.value); - o.text = v.text || o.text; - this._checkText(); - }, - - getValue: function () { - return { - value: this.editor.getValue(), - text: this.options.text - } - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - var o = this.options; - this._showHint(); - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.text.setValue(v); - } -}); -BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignInitialEditor.EVENT_START = "EVENT_START"; -BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** - * 带标记的文本框 - * Created by GUY on 2015/8/28. - * @class BI.SignEditor - * @extends BI.Widget - */ -BI.SignEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.SignEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - this._checkText(); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - this._showHint(); - this.text.setValue(v); - } -}); -BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignEditor.EVENT_START = "EVENT_START"; -BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.sign_editor", BI.SignEditor);/** - * guy - * 记录状态的输入框 - * @class BI.StateEditor - * @extends BI.Single - */ -BI.StateEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-state-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.StateEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "state-editor-infinite-text bi-disabled", - textAlign: "left", - height: o.height, - text: BI.i18nText("BI-Basic_Unrestricted"), - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.setValue(""); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.StateEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.StateEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.StateEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - focus: function () { - if (this.options.disabled === false) { - this._showInput(); - this.editor.focus(); - } - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.editor.getValue().match(/[^\s]+/g); - }, - - setState: function (v) { - BI.StateEditor.superclass.setValue.apply(this, arguments); - if (BI.isNumber(v)) { - if (v === BI.Selection.All) { - this.text.setText(BI.i18nText("BI-Select_All")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (v === BI.Selection.Multi) { - this.text.setText(BI.i18nText("BI-Select_Part")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.setTitle(""); - this.text.element.addClass("state-editor-infinite-text"); - } - return; - } - if (BI.isString(v)) { - // if (BI.isEmpty(v)) { - // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - // this.text.setTitle(""); - // this.text.element.addClass("state-editor-infinite-text"); - // } else { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - // } - return; - } - if (BI.isArray(v)) { - if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } else if (v.length === 1) { - this.text.setText(v[0]); - this.text.setTitle(v[0]); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Select_Part")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } - } - } -}); -BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.StateEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.StateEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.StateEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.StateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.StateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.StateEditor.EVENT_START = "EVENT_START"; -BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.StateEditor.EVENT_STOP = "EVENT_STOP"; -BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.StateEditor.EVENT_VALID = "EVENT_VALID"; -BI.StateEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.StateEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.StateEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.state_editor", BI.StateEditor);/** - * 无限制-已选择状态输入框 - * Created by GUY on 2016/5/18. - * @class BI.SimpleStateEditor - * @extends BI.Single - */ -BI.SimpleStateEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-simple-state-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.SimpleStateEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "state-editor-infinite-text bi-disabled", - textAlign: "left", - height: o.height, - text: BI.i18nText("BI-Basic_Unrestricted"), - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.setValue(""); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL); - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.editor.getValue().match(/[^\s]+/g); - }, - - setState: function (v) { - BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); - if (BI.isNumber(v)) { - if (v === BI.Selection.All) { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (v === BI.Selection.Multi) { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } - return; - } - if (!BI.isArray(v) || v.length === 1) { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } - } -}); -BI.SimpleStateEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SimpleStateEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SimpleStateEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SimpleStateEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SimpleStateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SimpleStateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SimpleStateEditor.EVENT_START = "EVENT_START"; -BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP"; -BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID"; -BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SimpleStateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** - * guy - * @class BI.TextEditor - * @extends BI.Single - */ -BI.TextEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - extraCls: "bi-text-editor bi-border", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.TextEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 2}); - } - if (BI.isNumber(o.width)) { - this.element.css({width: o.width - 2}); - } - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height - 2, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.TextEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.TextEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.TextEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.TextEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.TextEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.TextEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_REMOVE); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.TextEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.TextEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.TextEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.TextEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.TextEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.TextEditor.EVENT_EMPTY); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setValue: function (v) { - this.editor.setValue(v); - }, - - getValue: function () { - return this.editor.getValue(); - } -}); -BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.TextEditor.EVENT_START = "EVENT_START"; -BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.TextEditor.EVENT_STOP = "EVENT_STOP"; -BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.TextEditor.EVENT_VALID = "EVENT_VALID"; -BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.text_editor", BI.TextEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.SmallTextEditor = BI.inherit(BI.TextEditor, { - _defaultConfig: function () { - var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-text-editor", - height: 25 - }); - }, - - _init: function () { - BI.SmallTextEditor.superclass._init.apply(this, arguments); - } -}); -BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** - * 有确定取消按钮的弹出层 - * @class BI.BarFloatSection - * @extends BI.FloatSection - * @abstract - */ -BI.BarFloatSection = BI.inherit(BI.FloatSection, { - _defaultConfig: function () { - return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this, arguments), { - btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText("BI-Basic_Cancel")] - }) - }, - - _init: function () { - BI.BarFloatSection.superclass._init.apply(this, arguments); - var self = this; - var flatten = ["_init", "_defaultConfig", "_vessel", "_render", "getName", "listenEnd", "local", "refresh", "load", "change"]; - flatten = BI.makeObject(flatten, true); - BI.each(this.constructor.caller.caller.caller.caller.prototype, function (key) { - if (flatten[key]) { - return; - } - var f = self[key]; - if (BI.isFunction(f)) { - self[key] = BI.bind(function () { - if (this.model._start === true) { - this._F.push({f: f, arg: arguments}); - return; - } - return f.apply(this, arguments); - }, self); - } - }) - }, - - rebuildSouth: function (south) { - var self = this, o = this.options; - this.sure = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[0], - height: 30, - value: 0, - handler: function (v) { - self.end(); - self.close(v); - } - }); - this.cancel = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[1], - height: 30, - value: 1, - level: 'ignore', - handler: function (v) { - self.close(v); - } - }); - BI.createWidget({ - type: 'bi.right_vertical_adapt', - element: south, - hgap: 5, - items: [this.cancel, this.sure] - }); - } -}); - -/** - * 有确定取消按钮的弹出层 - * @class BI.BarPopoverSection - * @extends BI.PopoverSection - * @abstract - */ -BI.BarPopoverSection = BI.inherit(BI.PopoverSection, { - _defaultConfig: function () { - return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this, arguments), { - btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] - }) - }, - - _init: function () { - BI.BarPopoverSection.superclass._init.apply(this, arguments); - }, - - rebuildSouth: function (south) { - var self = this, o = this.options; - this.sure = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[0], - warningTitle: o.warningTitle, - height: 30, - value: 0, - handler: function (v) { - self.end(); - self.close(v); - } - }); - this.cancel = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[1], - height: 30, - value: 1, - level: 'ignore', - handler: function (v) { - self.close(v); - } - }); - BI.createWidget({ - type: 'bi.right_vertical_adapt', - element: south, - hgap: 5, - items: [this.cancel, this.sure] - }); - }, - - setConfirmButtonEnable: function(v){ - this.sure.setEnable(!!v); - } -});/** - * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w - * @class BI.MultiPopupView - * @extends BI.Widget - */ - -BI.MultiPopupView = BI.inherit(BI.PopupView, { - - _defaultConfig: function () { - var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-multi-list-view", - buttons: [BI.i18nText("BI-Basic_Sure")] - }) - }, - - _init: function () { - BI.MultiPopupView.superclass._init.apply(this, arguments); - }, - - _createToolBar: function () { - var o = this.options, self = this; - if (o.buttons.length === 0) { - return; - } - - var text = []; //构造[{text:content},……] - BI.each(o.buttons, function (idx, item) { - text.push({ - text: item, - value: idx - }) - }); - - this.buttongroup = BI.createWidget({ - type: "bi.button_group", - cls: "list-view-toolbar bi-high-light bi-border-top", - height: 30, - items: BI.createItems(text, { - type: "bi.text_button", - once: false, - shadow: true, - isShadowShowingOnSelected: true - }), - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }); - - this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { - self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj); - }); - - return this.buttongroup; - } - -}); - -BI.MultiPopupView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; - -BI.shortcut("bi.multi_popup_view", BI.MultiPopupView);/** - * 可以理解为MultiPopupView和Panel两个面板的结合体 - * @class BI.PopupPanel - * @extends BI.MultiPopupView - */ - -BI.PopupPanel = BI.inherit(BI.MultiPopupView, { - - _defaultConfig: function () { - var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-popup-panel", - title: "" - }) - }, - - _init: function () { - BI.PopupPanel.superclass._init.apply(this, arguments); - }, - - _createTool: function () { - var self = this, o = this.options; - var close = BI.createWidget({ - type: "bi.icon_button", - cls: "close-h-font", - width: 25, - height: 25 - }); - close.on(BI.IconButton.EVENT_CHANGE, function () { - self.setVisible(false); - self.fireEvent(BI.PopupPanel.EVENT_CLOSE); - }); - return BI.createWidget({ - type: "bi.htape", - cls: "popup-panel-title bi-background bi-border", - height: 25, - items: [{ - el: { - type: "bi.label", - textAlign: "left", - text: o.title, - height: 25, - lgap: 10 - } - }, { - el: close, - width: 25 - }] - }); - } -}); - -BI.PopupPanel.EVENT_CHANGE = "EVENT_CHANGE"; -BI.PopupPanel.EVENT_CLOSE = "EVENT_CLOSE"; -BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; - -BI.shortcut("bi.popup_panel", BI.PopupPanel);/** - * list面板 - * - * Created by GUY on 2015/10/30. - * @class BI.ListPane - * @extends BI.Pane - */ -BI.ListPane = BI.inherit(BI.Pane, { - - _defaultConfig: function () { - var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-list-pane", - logic: { - dynamic: true - }, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - items: [], - itemsCreator: BI.emptyFn, - hasNext: BI.emptyFn, - onLoaded: BI.emptyFn, - el: { - type: "bi.button_group" - } - }) - }, - _init: function () { - BI.ListPane.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - behaviors: {}, - items: o.items, - itemsCreator: function (op, calback) { - if (op.times === 1) { - self.empty(); - BI.nextTick(function () { - self.loading() - }); - } - o.itemsCreator(op, function () { - calback.apply(self, arguments); - op.times === 1 && BI.nextTick(function () { - self.loaded(); - }); - }); - }, - hasNext: o.hasNext, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj); - } - }); - this.check(); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ - scrolly: true, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) - })))); - }, - - hasPrev: function () { - return this.button_group.hasPrev && this.button_group.hasPrev(); - }, - - hasNext: function () { - return this.button_group.hasNext && this.button_group.hasNext(); - }, - - prependItems: function (items) { - this.options.items = items.concat(this.options.items); - this.button_group.prependItems.apply(this.button_group, arguments); - this.check(); - }, - - addItems: function (items) { - this.options.items = this.options.items.concat(items); - this.button_group.addItems.apply(this.button_group, arguments); - this.check(); - }, - - removeItemAt: function (indexes) { - indexes = indexes || []; - BI.removeAt(this.options.items, indexes); - this.button_group.removeItemAt.apply(this.button_group, arguments); - this.check(); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法 - this.button_group.attr("itemsCreator").apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("参数不能为空"); - } - self.populate.apply(self, arguments); - }]); - return; - } - BI.ListPane.superclass.populate.apply(this, arguments); - this.button_group.populate.apply(this.button_group, arguments); - }, - - empty: function () { - this.button_group.empty(); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - } -}); -BI.ListPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.list_pane", BI.ListPane);/** - * 带有标题栏的pane - * @class BI.Panel - * @extends BI.Widget - */ -BI.Panel = BI.inherit(BI.Widget,{ - _defaultConfig : function(){ - return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{ - baseCls: "bi-panel bi-border", - title:"", - titleButtons:[], - el:{}, - logic:{ - dynamic: false - } - }); - }, - - _init:function(){ - BI.Panel.superclass._init.apply(this,arguments); - var o = this.options; - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() - ,this.options.el) - })))); - }, - - _createTitle:function(){ - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - cls: "panel-title-text", - text: o.title, - height: 30 - }); - - this.button_group = BI.createWidget({ - type:"bi.button_group", - items: o.titleButtons, - layouts: [{ - type: "bi.center_adapt", - lgap:10 - }] - }); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function(value, obj){ - self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj); - }); - - return { - el: { - type: "bi.left_right_vertical_adapt", - cls: "panel-title bi-tips bi-border-bottom bi-background", - height: 30, - items: { - left: [this.text], - right: [this.button_group] - }, - lhgap: 10, - rhgap: 10 - }, - height: 30 - }; - }, - - setTitle: function(title){ - this.text.setValue(title); - } -}); -BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE"; - -BI.shortcut("bi.panel",BI.Panel);/** - * 选择列表 - * - * Created by GUY on 2015/11/1. - * @class BI.SelectList - * @extends BI.Widget - */ -BI.SelectList = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-select-list", - direction: BI.Direction.Top,//toolbar的位置 - logic: { - dynamic: true - }, - items: [], - itemsCreator: BI.emptyFn, - hasNext: BI.emptyFn, - onLoaded: BI.emptyFn, - toolbar: { - type: "bi.multi_select_bar" - }, - el: { - type: "bi.list_pane" - } - }) - }, - _init: function () { - BI.SelectList.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - //全选 - this.toolbar = BI.createWidget(o.toolbar); - this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - var isAllSelected = this.isSelected(); - if (type === BI.Events.CLICK) { - self.setAllSelected(isAllSelected); - self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.list = BI.createWidget(o.el, { - type: "bi.list_pane", - items: o.items, - itemsCreator: function (op, callback) { - op.times === 1 && self.toolbar.setVisible(false); - o.itemsCreator(op, function (items) { - callback.apply(self, arguments); - if (op.times === 1) { - self.toolbar.setVisible(items && items.length > 0); - self.toolbar.setEnable(items && items.length > 0); - } - self._checkAllSelected(); - }); - }, - onLoaded: o.onLoaded, - hasNext: o.hasNext - }); - - this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - self._checkAllSelected(); - self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ - scrolly: true - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list) - })))); - - if (o.items.length <= 0) { - this.toolbar.setVisible(false); - this.toolbar.setEnable(false); - } - }, - - _checkAllSelected: function () { - var selectLength = this.list.getValue().length; - var notSelectLength = this.getAllLeaves().length - selectLength; - var hasNext = this.list.hasNext(); - var isAlreadyAllSelected = this.toolbar.isSelected(); - var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext)); - isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected); - this.toolbar.setHalfSelected(isHalf); - !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected)); - }, - - setAllSelected: function (v) { - BI.each(this.getAllButtons(), function (i, btn) { - (btn.setSelected || btn.setAllSelected).apply(btn, [v]); - }); - this.toolbar.setSelected(v); - this.toolbar.setHalfSelected(false); - }, - - setToolBarVisible: function (b) { - this.toolbar.setVisible(b); - }, - - isAllSelected: function () { - return this.toolbar.isSelected(); - }, - - hasPrev: function () { - return this.list.hasPrev(); - }, - - hasNext: function () { - return this.list.hasNext(); - }, - - prependItems: function (items) { - this.list.prependItems.apply(this.list, arguments); - }, - - addItems: function (items) { - this.list.addItems.apply(this.list, arguments); - }, - - setValue: function (data) { - var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL; - this.setAllSelected(selectAll); - this.list[selectAll ? "setNotSelectedValue" : "setValue"](data.value); - this._checkAllSelected(); - }, - - getValue: function () { - if (this.isAllSelected() === false) { - return { - type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - value: this.list.getValue(), - assist: this.list.getNotSelectedValue() - }; - } else { - return { - type: BI.ButtonGroup.CHOOSE_TYPE_ALL, - value: this.list.getNotSelectedValue(), - assist: this.list.getValue() - }; - } - }, - - empty: function () { - this.list.empty(); - }, - - populate: function (items) { - this.toolbar.setVisible(!BI.isEmptyArray(items)); - this.toolbar.setEnable(!BI.isEmptyArray(items)); - this.list.populate.apply(this.list, arguments); - this._checkAllSelected(); - }, - - _setEnable: function (enable) { - BI.SelectList.superclass._setEnable.apply(this, arguments); - this.toolbar.setEnable(enable); - }, - - resetHeight: function (h) { - var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); - this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : - this.list.element.css({"max-height": h - toolHeight + "px"}) - }, - - setNotSelectedValue: function () { - this.list.setNotSelectedValue.apply(this.list, arguments); - this._checkAllSelected(); - }, - - getNotSelectedValue: function () { - return this.list.getNotSelectedValue(); - }, - - getAllButtons: function () { - return this.list.getAllButtons(); - }, - - getAllLeaves: function () { - return this.list.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.list.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.list.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.list.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.list.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.list.getNodeByValue(value); - } -}); -BI.SelectList.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.select_list", BI.SelectList);/** - * Created by roy on 15/11/6. - */ -BI.LazyLoader = BI.inherit(BI.Widget, { - _const: { - PAGE: 100 - }, - _defaultConfig: function () { - return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-lazy-loader", - el: {} - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.LazyLoader.superclass._init.apply(this, arguments); - var all = o.items.length; - this.loader = BI.createWidget({ - type: "bi.loader", - element: this, - //下面是button_group的属性 - el: o.el, - - itemsCreator: function (options, populate) { - populate(self._getNextItems(options)); - }, - hasNext: function (option) { - return option.count < all; - } - }); - - this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj) - }) - }, - _getNextItems: function (options) { - var self = this, o = this.options; - var lastNum = o.items.length - this._const.PAGE * (options.times - 1); - var lastItems = BI.last(o.items, lastNum); - var nextItems = BI.first(lastItems, this._const.PAGE); - return nextItems; - }, - - populate: function (items) { - this.loader.populate(items); - }, - - addItems: function (items) { - this.loader.addItems(items); - }, - - empty: function () { - this.loader.empty(); - }, - - setNotSelectedValue: function () { - this.loader.setNotSelectedValue.apply(this.loader, arguments); - }, - - getNotSelectedValue: function () { - return this.loader.getNotSelectedValue(); - }, - - setValue: function () { - this.loader.setValue.apply(this.loader, arguments); - }, - - getValue: function () { - return this.loader.getValue.apply(this.loader, arguments); - }, - - getAllButtons: function () { - return this.loader.getAllButtons(); - }, - - getAllLeaves: function () { - return this.loader.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.loader.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.loader.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.loader.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.loader.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.loader.getNodeByValue(value); - } -}); -BI.LazyLoader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.lazy_loader", BI.LazyLoader);/** - * 恶心的加载控件, 为解决排序问题引入的控件 - * - * Created by GUY on 2015/11/12. - * @class BI.ListLoader - * @extends BI.Widget - */ -BI.ListLoader = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-list-loader", - - isDefaultInit: true,//是否默认初始化数据 - - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, - - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, - - //下面是分页信息 - count: false, - next: {}, - hasNext: BI.emptyFn - }) - }, - - _nextLoad: function () { - var self = this, o = this.options; - this.next.setLoading(); - o.itemsCreator.apply(this, [{times: ++this.times}, function () { - self.next.setLoaded(); - self.addItems.apply(self, arguments); - }]); - }, - - _init: function () { - BI.ListLoader.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.itemsCreator === false) { - o.next = false; - } - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - element: this, - chooseType: 0, - items: o.items, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj); - } - }); - - if (o.next !== false) { - this.next = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.next)); - this.next.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._nextLoad(); - } - }) - } - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.next] - }); - - o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { - this.populate(); - }, this)); - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - hasNext: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasNext.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - addItems: function (items) { - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.options.items = this.options.items.concat(items); - this.next.setLoaded(); - } else { - this.next.setEnd(); - } - } - this.button_group.addItems.apply(this.button_group, arguments); - this.next.element.appendTo(this.element); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { - o.itemsCreator.apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("参数不能为空"); - } - self.populate.apply(self, arguments); - o.onLoaded(); - }]); - return; - } - this.options.items = items; - this.times = 1; - this.count = 0; - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.next.setLoaded(); - } else { - this.next.invisible(); - } - } - BI.DOM.hang([this.next]); - this.button_group.populate.apply(this.button_group, arguments); - this.next.element.appendTo(this.element); - }, - - empty: function () { - BI.DOM.hang([this.next]); - this.button_group.empty(); - this.next.element.appendTo(this.element); - BI.each([this.next], function (i, ob) { - ob && ob.setVisible(false); - }); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - } -}); -BI.ListLoader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.list_loader", BI.ListLoader);/** - * Created by GUY on 2016/4/29. - * - * @class BI.SortList - * @extends BI.Widget - */ -BI.SortList = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-sort-list", - - isDefaultInit: true,//是否默认初始化数据 - - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, - - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, - - //下面是分页信息 - count: false, - next: {}, - hasNext: BI.emptyFn - - //containment: this.element, - //connectWith: ".bi-sort-list", - }) - }, - - _init: function () { - BI.SortList.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.loader = BI.createWidget({ - type: "bi.list_loader", - element: this, - isDefaultInit: o.isDefaultInit, - el: o.el, - items: this._formatItems(o.items), - itemsCreator: function (op, callback) { - o.itemsCreator(op, function (items) { - callback(self._formatItems(items)); - }); - }, - onLoaded: o.onLoaded, - count: o.count, - next: o.next, - hasNext: o.hasNext - }); - this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj); - } - }); - - this.loader.element.sortable({ - containment: o.containment || this.element, - connectWith: o.connectWith || ".bi-sort-list", - items: ".sort-item", - cursor: o.cursor || "drag", - tolerance: o.tolerance || "intersect", - placeholder: { - element: function ($currentItem) { - var holder = BI.createWidget({ - type: "bi.layout", - cls: "bi-sortable-holder", - height: $currentItem.outerHeight() - }); - holder.element.css({ - "margin-left": $currentItem.css("margin-left"), - "margin-right": $currentItem.css("margin-right"), - "margin-top": $currentItem.css("margin-top"), - "margin-bottom": $currentItem.css("margin-bottom"), - "margin": $currentItem.css("margin") - }); - return holder.element; - }, - update: function () { - - } - }, - start: function (event, ui) { - - }, - stop: function (event, ui) { - self.fireEvent(BI.SortList.EVENT_CHANGE); - }, - over: function (event, ui) { - - } - }); - }, - - _formatItems: function (items) { - BI.each(items, function (i, item) { - item = BI.stripEL(item); - item.cls = item.cls ? item.cls + " sort-item" : "sort-item"; - item.attributes = { - sorted: item.value - }; - }); - return items; - }, - - hasNext: function () { - return this.loader.hasNext(); - }, - - addItems: function (items) { - this.loader.addItems(items); - }, - - populate: function (items) { - if (items) { - arguments[0] = this._formatItems(items); - } - this.loader.populate.apply(this.loader, arguments); - }, - - empty: function () { - this.loader.empty(); - }, - - setNotSelectedValue: function () { - this.loader.setNotSelectedValue.apply(this.loader, arguments); - }, - - getNotSelectedValue: function () { - return this.loader.getNotSelectedValue(); - }, - - setValue: function () { - this.loader.setValue.apply(this.loader, arguments); - }, - - getValue: function () { - return this.loader.getValue(); - }, - - getAllButtons: function () { - return this.loader.getAllButtons(); - }, - - getAllLeaves: function () { - return this.loader.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.loader.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.loader.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.loader.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.loader.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.loader.getNodeByValue(value); - }, - - getSortedValues: function () { - return this.loader.element.sortable("toArray", {attribute: "sorted"}); - } -}); -BI.SortList.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.sort_list", BI.SortList);/** - * 有总页数和总行数的分页控件 - * Created by Young's on 2016/10/13. - */ -BI.AllCountPager = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-all-count-pager", - height: 30, - pages: 1, //必选项 - curr: 1, //初始化当前页, pages为数字时可用, - count: 1 //总行数 - }) - }, - _init: function () { - BI.AllCountPager.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.small_text_editor", - cls: "pager-editor", - validationChecker: function (v) { - return (self.rowCount.getValue() === 0 && v === "0") || BI.isPositiveInteger(v); - }, - hgap: 4, - vgap: 0, - value: o.curr, - errorText: BI.i18nText("BI-Please_Input_Positive_Integer"), - width: 35, - height: 20 - }); - - this.pager = BI.createWidget({ - type: "bi.pager", - width: 36, - layouts: [{ - type: "bi.horizontal", - hgap: 1, - vgap: 1 - }], - - dynamicShow: false, - pages: o.pages, - curr: o.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Previous_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - cls: "all-pager-prev column-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Next_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - cls: "all-pager-next column-next-page-h-font" - }, - - hasPrev: o.hasPrev, - hasNext: o.hasNext, - firstPage: o.firstPage, - lastPage: o.lastPage - }); - - this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () { - self.pager.setValue(BI.parseInt(self.editor.getValue())); - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.editor.setValue(self.pager.getCurrentPage()); - }); - - this.allPages = BI.createWidget({ - type: "bi.label", - width: 30, - title: o.pages, - text: "/" + o.pages - }); - - this.rowCount = BI.createWidget({ - type: "bi.label", - height: o.height, - hgap: 5, - text: o.count, - title: o.count - }); - - var count = BI.createWidget({ - type: "bi.left", - height: o.height, - scrollable: false, - items: [{ - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Basic_Total"), - width: 15 - }, this.rowCount, { - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Tiao_Data"), - width: 50, - textAlign: "left" - }] - }); - BI.createWidget({ - type: "bi.center_adapt", - element: this, - columnSize: ["", 35, 40, 36], - items: [count, this.editor, this.allPages, this.pager] - }) - }, - - alwaysShowPager: true, - - setAllPages: function (v) { - this.allPages.setText("/" + v); - this.allPages.setTitle(v); - this.pager.setAllPages(v); - this.editor.setEnable(v >= 1); - }, - - setValue: function (v) { - this.pager.setValue(v); - }, - - setVPage: function (v) { - this.pager.setValue(v); - }, - - setCount: function (count) { - this.rowCount.setText(count); - this.rowCount.setTitle(count); - }, - - getCurrentPage: function () { - return this.pager.getCurrentPage(); - }, - - hasPrev: function () { - return this.pager.hasPrev(); - }, - - hasNext: function () { - return this.pager.hasNext(); - }, - - setPagerVisible: function (b) { - this.editor.setVisible(b); - this.allPages.setVisible(b); - this.pager.setVisible(b); - }, - - populate: function () { - this.pager.populate(); - } -}); -BI.AllCountPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.all_count_pager", BI.AllCountPager);/** - * 显示页码的分页控件 - * - * Created by GUY on 2016/6/30. - * @class BI.DirectionPager - * @extends BI.Widget - */ -BI.DirectionPager = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-direction-pager", - height: 30, - horizontal: { - pages: false, //总页数 - curr: 1, //初始化当前页, pages为数字时可用 - - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn, - firstPage: 1, - lastPage: BI.emptyFn - }, - vertical: { - pages: false, //总页数 - curr: 1, //初始化当前页, pages为数字时可用 - - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn, - firstPage: 1, - lastPage: BI.emptyFn - } - }) - }, - _init: function () { - BI.DirectionPager.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var v = o.vertical, h = o.horizontal; - this._createVPager(); - this._createHPager(); - this.layout = BI.createWidget({ - type: "bi.absolute", - scrollable: false, - element: this, - items: [{ - el: this.vpager, - top: 5, - right: 74 - }, { - el: this.vlabel, - top: 5, - right: 111 - }, { - el: this.hpager, - top: 5, - right: -9 - }, { - el: this.hlabel, - top: 5, - right: 28 - }] - }); - }, - - _createVPager: function () { - var self = this, o = this.options; - var v = o.vertical; - this.vlabel = BI.createWidget({ - type: "bi.label", - width: 24, - height: 20, - value: v.curr, - title: v.curr - }); - this.vpager = BI.createWidget({ - type: "bi.pager", - width: 76, - layouts: [{ - type: "bi.horizontal", - scrollx: false, - rgap: 24, - vgap: 1 - }], - - dynamicShow: false, - pages: v.pages, - curr: v.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Up_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-prev column-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Down_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-next column-next-page-h-font" - }, - - hasPrev: v.hasPrev, - hasNext: v.hasNext, - firstPage: v.firstPage, - lastPage: v.lastPage - }); - - this.vpager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.DirectionPager.EVENT_CHANGE); - }); - this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.vlabel.setValue(this.getCurrentPage()); - self.vlabel.setTitle(this.getCurrentPage()); - }); - }, - - _createHPager: function () { - var self = this, o = this.options; - var h = o.horizontal; - this.hlabel = BI.createWidget({ - type: "bi.label", - width: 24, - height: 20, - value: h.curr, - title: h.curr - }); - this.hpager = BI.createWidget({ - type: "bi.pager", - width: 76, - layouts: [{ - type: "bi.horizontal", - scrollx: false, - rgap: 24, - vgap: 1 - }], - - dynamicShow: false, - pages: h.pages, - curr: h.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Left_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-prev row-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Right_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-next row-next-page-h-font" - }, - - hasPrev: h.hasPrev, - hasNext: h.hasNext, - firstPage: h.firstPage, - lastPage: h.lastPage - }); - - this.hpager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.DirectionPager.EVENT_CHANGE); - }); - this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.hlabel.setValue(this.getCurrentPage()); - self.hlabel.setTitle(this.getCurrentPage()); - }); - }, - - getVPage: function () { - return this.vpager.getCurrentPage(); - }, - - getHPage: function () { - return this.hpager.getCurrentPage(); - }, - - setVPage: function (v) { - this.vpager.setValue(v); - this.vlabel.setValue(v); - this.vlabel.setTitle(v); - }, - - setHPage: function (v) { - this.hpager.setValue(v); - this.hlabel.setValue(v); - this.hlabel.setTitle(v); - }, - - hasVNext: function () { - return this.vpager.hasNext(); - }, - - hasHNext: function () { - return this.hpager.hasNext(); - }, - - hasVPrev: function () { - return this.vpager.hasPrev(); - }, - - hasHPrev: function () { - return this.hpager.hasPrev(); - }, - - setHPagerVisible: function (b) { - this.hpager.setVisible(b); - this.hlabel.setVisible(b); - }, - - setVPagerVisible: function (b) { - this.vpager.setVisible(b); - this.vlabel.setVisible(b); - }, - - populate: function () { - this.vpager.populate(); - this.hpager.populate(); - var vShow = false, hShow = false; - if (!this.hasHNext() && !this.hasHPrev()) { - this.setHPagerVisible(false); - } else { - this.setHPagerVisible(true); - hShow = true; - } - if (!this.hasVNext() && !this.hasVPrev()) { - this.setVPagerVisible(false); - } else { - this.setVPagerVisible(true); - vShow = true; - } - this.setVisible(hShow || vShow); - var num = [74, 111, -9, 28]; - var items = this.layout.attr("items"); - - if (vShow === true && hShow === true) { - items[0].right = num[0]; - items[1].right = num[1]; - items[2].right = num[2]; - items[3].right = num[3]; - } else if (vShow === true) { - items[0].right = num[2]; - items[1].right = num[3]; - } else if (hShow === true) { - items[2].right = num[2]; - items[3].right = num[3]; - } - this.layout.attr("items", items); - this.layout.resize(); - }, - - clear: function () { - this.vpager.attr("curr", 1); - this.hpager.attr("curr", 1); - } -}); -BI.DirectionPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.direction_pager", BI.DirectionPager);/** - * 分页控件 - * - * Created by GUY on 2015/8/31. - * @class BI.DetailPager - * @extends BI.Widget - */ -BI.DetailPager = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-detail-pager", - behaviors: {}, - layouts: [{ - type: "bi.horizontal", - hgap: 10, - vgap: 0 - }], - - dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 - //dynamicShow为false时以下两个有用 - dynamicShowFirstLast: false,//是否动态显示首页、尾页 - dynamicShowPrevNext: false,//是否动态显示上一页、下一页 - pages: false, //总页数 - curr: function () { - return 1; - }, //初始化当前页 - groups: 0, //连续显示分页数 - jump: BI.emptyFn, //分页的回调函数 - - first: false, //是否显示首页 - last: false, //是否显示尾页 - prev: "上一页", - next: "下一页", - - firstPage: 1, - lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 - return 1; - }, - hasPrev: BI.emptyFn, //pages不可用时有效 - hasNext: BI.emptyFn //pages不可用时有效 - }) - }, - _init: function () { - BI.DetailPager.superclass._init.apply(this, arguments); - var self = this; - this.currPage = BI.result(this.options, "curr"); - //翻页太灵敏 - this._lock = false; - this._debouce = BI.debounce(function () { - self._lock = false; - }, 300); - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options, view = [], dict = {}; - this.empty(); - var pages = BI.result(o, "pages"); - var curr = BI.result(this, "currPage"); - var groups = BI.result(o, "groups"); - var first = BI.result(o, "first"); - var last = BI.result(o, "last"); - var prev = BI.result(o, "prev"); - var next = BI.result(o, "next"); - - if (pages === false) { - groups = 0; - first = false; - last = false; - } else { - groups > pages && (groups = pages); - } - - //计算当前组 - dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); - - //当前页非首页,则输出上一页 - if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { - if (BI.isKey(prev)) { - view.push({ - text: prev, - value: "prev", - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }) - } else { - view.push(BI.extend({ - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }, prev)); - } - } - - //当前组非首组,则输出首页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { - view.push({ - text: first, - value: "first", - disabled: !(dict.index > 1 && groups !== 0) - }); - if (dict.index > 1 && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - } - - //输出当前页组 - dict.poor = Math.floor((groups - 1) / 2); - dict.start = dict.index > 1 ? curr - dict.poor : 1; - dict.end = dict.index > 1 ? (function () { - var max = curr + (groups - dict.poor - 1); - return max > pages ? pages : max; - }()) : groups; - if (dict.end - dict.start < groups - 1) { //最后一组状态 - dict.start = dict.end - groups + 1; - } - var s = dict.start, e = dict.end; - if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { - s++; - e--; - } - for (; s <= e; s++) { - if (s === curr) { - view.push({ - text: s, - value: s, - selected: true - }) - } else { - view.push({ - text: s, - value: s - }) - } - } - - //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { - if (pages > groups && dict.end < pages && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - view.push({ - text: last, - value: "last", - disabled: !(pages > groups && dict.end < pages && groups !== 0) - }) - } - - //当前页不为尾页时,输出下一页 - dict.flow = !prev && groups === 0; - if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { - view.push((function () { - if (BI.isKey(next)) { - if (pages === false) { - return {text: next, value: "next", disabled: o.hasNext(curr) === false} - } - return (dict.flow && curr === pages) - ? - {text: next, value: "next", disabled: true} - : - {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; - } else { - return BI.extend({ - disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) - }, next); - } - }())); - } - - this.button_group = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(view, { - cls: "page-item bi-border bi-list-item-active", - height: 23, - hgap: 10 - }), - behaviors: o.behaviors, - layouts: o.layouts - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self._lock === true) { - return; - } - self._lock = true; - self._debouce(); - if (type === BI.Events.CLICK) { - var v = self.button_group.getValue()[0]; - switch (v) { - case "first": - self.currPage = 1; - break; - case "last": - self.currPage = pages; - break; - case "prev": - self.currPage--; - break; - case "next": - self.currPage++; - break; - default: - self.currPage = v; - break; - } - o.jump.apply(self, [{ - pages: pages, - curr: self.currPage - }]); - self._populate(); - self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE); - }, - - getCurrentPage: function () { - return this.currPage; - }, - - setAllPages: function (pages) { - this.options.pages = pages; - }, - - hasPrev: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasPrev(v) : v > 1; - }, - - hasNext: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasNext(v) : v < pages; - }, - - setValue: function (v) { - var o = this.options; - v = v | 0; - v = v < 1 ? 1 : v; - if (o.pages === false) { - var lastPage = BI.result(o, "lastPage"), firstPage = 1; - this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); - } else { - v = v > o.pages ? o.pages : v; - this.currPage = v; - } - this._populate(); - }, - - getValue: function () { - var val = this.button_group.getValue()[0]; - switch (val) { - case "prev": - return -1; - case "next": - return 1; - case "first": - return BI.MIN; - case "last": - return BI.MAX; - default : - return val; - } - }, - - attr: function (key, value) { - BI.DetailPager.superclass.attr.apply(this, arguments); - if (key === "curr") { - this.currPage = BI.result(this.options, "curr"); - } - }, - - populate: function () { - this._populate(); - } -}); -BI.DetailPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.DetailPager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; -BI.shortcut("bi.detail_pager", BI.DetailPager);/** - * 分段控件使用的button - * - * Created by GUY on 2015/9/7. - * @class BI.SegmentButton - * @extends BI.BasicButton - */ -BI.SegmentButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active', - shadow: true, - readonly: true, - hgap: 5 - }) - }, - - _init: function () { - BI.SegmentButton.superclass._init.apply(this, arguments); - var opts = this.options, self = this; - //if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) { - // this.element.css({lineHeight : (opts.height - 2) + 'px'}); - //} - this.text = BI.createWidget({ - type: "bi.label", - element: this, - height: opts.height - 2, - whiteSpace: opts.whiteSpace, - text: opts.text, - value: opts.value, - hgap: opts.hgap - }) - }, - - setSelected: function () { - BI.SegmentButton.superclass.setSelected.apply(this, arguments); - }, - - setText: function (text) { - BI.SegmentButton.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - destroy: function () { - BI.SegmentButton.superclass.destroy.apply(this, arguments); - } -}); -BI.shortcut('bi.segment_button', BI.SegmentButton);/** - * 单选按钮组 - * - * Created by GUY on 2015/9/7. - * @class BI.Segment - * @extends BI.Widget - */ -BI.Segment = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-segment", - items: [], - height: 30 - }); - }, - _init: function () { - BI.Segment.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.buttonGroup = BI.createWidget({ - element: this, - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.segment_button", - height: o.height - 2, - whiteSpace: o.whiteSpace - }), - layout: [ - { - type: "bi.center" - } - ] - }) - this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) - }); - this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { - self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj) - }) - }, - - setValue: function (v) { - this.buttonGroup.setValue(v); - }, - - setEnabledValue: function (v) { - this.buttonGroup.setEnabledValue(v); - }, - - getValue: function () { - return this.buttonGroup.getValue(); - } -}); -BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut('bi.segment', BI.Segment);/** - * 自适应宽度的表格 - * - * Created by GUY on 2016/2/3. - * @class BI.AdaptiveTable - * @extends BI.Widget - */ -BI.AdaptiveTable = BI.inherit(BI.Widget, { - - _const: { - perColumnSize: 100 - }, - - _defaultConfig: function () { - return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-adaptive-table", - el: { - type: "bi.resizable_table" - }, - isNeedResize: true, - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 - - isNeedMerge: false,//是否需要合并单元格 - mergeCols: [], //合并的单元格列号 - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - header: [], - items: [], //二维数组 - - //交叉表头 - crossHeader: [], - crossItems: [] - }); - }, - - _init: function () { - BI.AdaptiveTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: false, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: data.columnSize, - - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: data.regionColumnSize, - - header: o.header, - items: o.items, - //交叉表头 - crossHeader: o.crossHeader, - crossItems: o.crossItems - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - self._populate(); - self.table.populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.columnSize = this.getColumnSize(); - self._populate(); - self.table.populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze === true ? this.options.freezeCols.length : 0; - }, - - _digest: function () { - var o = this.options; - var columnSize = o.columnSize.slice(); - var regionColumnSize = o.regionColumnSize.slice(); - var freezeCols = o.freezeCols.slice(); - var regionSize = o.regionColumnSize[0]; - var freezeColLength = this._getFreezeColLength(); - if (!regionSize || regionSize > o.width - 10 || regionSize < 10) { - regionSize = (freezeColLength > o.columnSize.length / 2 ? 2 / 3 : 1 / 3) * o.width; - } - if (freezeColLength === 0) { - regionSize = 0; - } - if (freezeCols.length >= columnSize.length) { - freezeCols = []; - } - if (!BI.isNumber(columnSize[0])) { - columnSize = o.minColumnSize.slice(); - } - var summaryFreezeColumnSize = 0, summaryColumnSize = 0; - BI.each(columnSize, function (i, size) { - if (i < freezeColLength) { - summaryFreezeColumnSize += size; - } - summaryColumnSize += size; - }); - if (freezeColLength > 0) { - columnSize[freezeColLength - 1] = BI.clamp(regionSize - (summaryFreezeColumnSize - columnSize[freezeColLength - 1]), - o.minColumnSize[freezeColLength - 1] || 10, o.maxColumnSize[freezeColLength - 1] || Number.MAX_VALUE); - } - if (columnSize.length > 0) { - columnSize[columnSize.length - 1] = BI.clamp(o.width - BI.GridTableScrollbar.SIZE - regionSize - (summaryColumnSize - summaryFreezeColumnSize - columnSize[columnSize.length - 1]), - o.minColumnSize[columnSize.length - 1] || 10, o.maxColumnSize[columnSize.length - 1] || Number.MAX_VALUE); - } - regionColumnSize[0] = regionSize; - - return { - freezeCols: freezeCols, - columnSize: columnSize, - regionColumnSize: regionColumnSize - } - }, - - _populate: function () { - var o = this.options; - var data = this._digest(); - o.regionColumnSize = data.regionColumnSize; - o.columnSize = data.columnSize; - this.table.setColumnSize(data.columnSize); - this.table.setRegionColumnSize(data.regionColumnSize); - this.table.attr("freezeCols", data.freezeCols); - }, - - setWidth: function (width) { - BI.AdaptiveTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.AdaptiveTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (regionColumnSize) { - this.options.regionColumnSize = regionColumnSize; - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var v = BI.AdaptiveTable.superclass.attr.apply(this, arguments); - if (key === "freezeCols") { - return v; - } - return this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items) { - var self = this, o = this.options; - this._populate(); - this.table.populate.apply(this.table, arguments); - }, - - destroy: function () { - this.table.destroy(); - BI.AdaptiveTable.superclass.destroy.apply(this, arguments); - } -}); -BI.shortcut('bi.adaptive_table', BI.AdaptiveTable);/** - * - * 层级树状结构的表格 - * - * Created by GUY on 2016/8/12. - * @class BI.DynamicSummaryLayerTreeTable - * @extends BI.Widget - */ -BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dynamic-summary-layer-tree-table", - - el: { - type: "bi.resizable_table" - }, - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - //行表头 - rowHeaderCreator: null, - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - footer: false, - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _createHeader: function (vDeep) { - var self = this, o = this.options; - var header = o.header || [], crossHeader = o.crossHeader || []; - var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); - var result = []; - BI.each(items, function (row, node) { - var c = [crossHeader[row]]; - result.push(c.concat(node || [])); - }); - if (header && header.length > 0) { - var newHeader = this._formatColumns(header); - var deep = this._getHDeep(); - if (deep <= 0) { - newHeader.unshift(o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }); - } else { - newHeader[0] = o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }; - } - result.push(newHeader); - } - return result; - }, - - _formatItems: function (nodes, header, deep) { - var self = this, o = this.options; - var result = []; - - function track(node, layer) { - node.type || (node.type = "bi.layer_tree_table_cell"); - node.layer = layer; - var next = [node]; - next = next.concat(node.values || []); - if (next.length > 0) { - result.push(next); - } - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child, layer + 1); - }); - } - } - - BI.each(nodes, function (i, node) { - BI.each(node.children, function (j, c) { - track(c, 0); - }); - if (BI.isArray(node.values)) { - var next = [{ - type: "bi.table_style_cell", - text: BI.i18nText("BI-Summary_Values"), - styleGetter: function () { - return o.summaryCellStyleGetter(true); - } - }].concat(node.values); - result.push(next) - } - }); - return BI.DynamicSummaryTreeTable.formatSummaryItems(result, header, o.crossItems, 1); - }, - - _formatColumns: function (columns, deep) { - if (BI.isNotEmptyArray(columns)) { - deep = deep || this._getHDeep(); - return columns.slice(Math.max(0, deep - 1)); - } - return columns; - }, - - _formatFreezeCols: function () { - if (this.options.freezeCols.length > 0) { - return [0]; - } - return []; - }, - - _formatColumnSize: function (columnSize, deep) { - if (columnSize.length <= 0) { - return []; - } - var result = [0]; - deep = deep || this._getHDeep(); - BI.each(columnSize, function (i, size) { - if (i < deep) { - result[0] += size; - return; - } - result.push(size); - }); - return result; - }, - - _recomputeColumnSize: function () { - var o = this.options; - o.regionColumnSize = this.table.getRegionColumnSize(); - var columnSize = this.table.getColumnSize().slice(); - if (o.freezeCols.length > 1) { - for (var i = 0; i < o.freezeCols.length - 1; i++) { - columnSize.splice(1, 0, 0); - } - } - o.columnSize = columnSize; - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = this._createHeader(vDeep); - var data = this._formatItems(o.items, header, deep); - var columnSize = o.columnSize.slice(); - var minColumnSize = o.minColumnSize.slice(); - var maxColumnSize = o.maxColumnSize.slice(); - BI.removeAt(columnSize, data.deletedCols); - BI.removeAt(minColumnSize, data.deletedCols); - BI.removeAt(maxColumnSize, data.deletedCols); - return { - header: data.header, - items: data.items, - columnSize: this._formatColumnSize(columnSize, deep), - minColumnSize: this._formatColumns(minColumnSize, deep), - maxColumnSize: this._formatColumns(maxColumnSize, deep), - freezeCols: this._formatFreezeCols() - } - }, - - _init: function () { - BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: [], - mergeRule: o.mergeRule, - columnSize: data.columnSize, - minColumnSize: data.minColumnSize, - maxColumnSize: data.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - regionColumnSize: o.regionColumnSize, - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - self._recomputeColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - self._recomputeColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - setWidth: function (width) { - BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var self = this; - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self.attr(k, v); - }); - return; - } - BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "columnSize": - case "minColumnSize": - case "maxColumnSize": - case "freezeCols": - case "mergeCols": - return; - } - this.table.attr.apply(this.table, [key, value]); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.attr("freezeCols", data.freezeCols); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.shortcut("bi.dynamic_summary_layer_tree_table", BI.DynamicSummaryLayerTreeTable);/** - * - * 树状结构的表格 - * - * Created by GUY on 2015/8/12. - * @class BI.DynamicSummaryTreeTable - * @extends BI.Widget - */ -BI.DynamicSummaryTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dynamic-summary-tree-table", - el: { - type: "bi.resizable_table" - }, - - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - footer: false, - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _init: function () { - BI.DynamicSummaryTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: o.columnSize, - minColumnSize: o.minColumnSize, - maxColumnSize: o.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: o.regionColumnSize, - - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - var columnSize = this.getColumnSize(); - var length = o.columnSize.length - columnSize.length; - o.columnSize = columnSize.slice(); - o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - var columnSize = this.getColumnSize(); - var length = o.columnSize.length - columnSize.length; - o.columnSize = columnSize.slice(); - o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); - var items = BI.DynamicSummaryTreeTable.formatHorizontalItems(o.items, deep, false, o.summaryCellStyleGetter); - var data = BI.DynamicSummaryTreeTable.formatSummaryItems(items, header, o.crossItems, deep); - var columnSize = o.columnSize.slice(); - var minColumnSize = o.minColumnSize.slice(); - var maxColumnSize = o.maxColumnSize.slice(); - BI.removeAt(columnSize, data.deletedCols); - BI.removeAt(minColumnSize, data.deletedCols); - BI.removeAt(maxColumnSize, data.deletedCols); - return { - header: data.header, - items: data.items, - columnSize: columnSize, - minColumnSize: minColumnSize, - maxColumnSize: maxColumnSize - }; - }, - - setWidth: function (width) { - BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key) { - BI.DynamicSummaryTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "minColumnSize": - case "maxColumnSize": - return; - } - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.DynamicSummaryTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.extend(BI.DynamicSummaryTreeTable, { - - formatHorizontalItems: function (nodes, deep, isCross, styleGetter) { - var result = []; - - function track(store, node) { - var next; - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - var next; - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - track(next, child); - }); - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - if ((store == -1 || node.children.length > 1) && BI.isNotEmptyArray(node.values)) { - var summary = { - text: BI.i18nText("BI-Summary_Values"), - type: "bi.table_style_cell", - styleGetter: function () { - return styleGetter(store === -1) - } - }; - for (var i = next.length; i < deep; i++) { - next.push(summary); - } - if (!isCross) { - next = next.concat(node.values); - } - if (next.length > 0) { - if (!isCross) { - result.push(next); - } else { - for (var k = 0, l = node.values.length; k < l; k++) { - result.push(next); - } - } - } - } - return; - } - if (store != -1) { - next = store.slice(); - for (var i = next.length; i < deep; i++) { - next.push(node); - } - } else { - next = []; - } - if (!isCross && BI.isArray(node.values)) { - next = next.concat(node.values); - } - if (isCross && BI.isArray(node.values)) { - for (var i = 0, len = node.values.length; i < len - 1; i++) { - if (next.length > 0) { - result.push(next); - } - } - } - if (next.length > 0) { - result.push(next); - } - } - - BI.each(nodes, function (i, node) { - track(-1, node); - }); - //填充空位 - BI.each(result, function (i, line) { - var last = BI.last(line); - for (var j = line.length; j < deep; j++) { - line.push(last); - } - }); - return result; - }, - - formatSummaryItems: function (items, header, crossItems, deep) { - //求纵向需要去除的列 - var cols = []; - var leaf = 0; - - function track(node) { - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child); - }); - if (BI.isNotEmptyArray(node.values)) { - if (node.children.length === 1) { - for (var i = 0; i < node.values.length; i++) { - cols.push(leaf + i + deep); - } - } - leaf += node.values.length; - } - return; - } - if (node.values && node.values.length > 1) { - leaf += node.values.length; - } else { - leaf++; - } - } - - BI.each(crossItems, function (i, node) { - track(node); - }); - - if (cols.length > 0) { - var nHeader = [], nItems = []; - BI.each(header, function (i, node) { - var nNode = node.slice(); - BI.removeAt(nNode, cols); - nHeader.push(nNode); - }); - BI.each(items, function (i, node) { - var nNode = node.slice(); - BI.removeAt(nNode, cols); - nItems.push(nNode);; - }); - header = nHeader; - items = nItems; - } - return {items: items, header: header, deletedCols: cols}; - } -}); - -BI.shortcut("bi.dynamic_summary_tree_table", BI.DynamicSummaryTreeTable);/** - * Created by GUY on 2016/5/7. - * @class BI.LayerTreeTableCell - * @extends BI.Single - */ -BI.LayerTreeTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-layer-tree-table-cell", - layer: 0, - text: "" - }) - }, - - _init: function () { - BI.LayerTreeTableCell.superclass._init.apply(this, arguments); - var o = this.options; - BI.createWidget({ - type: "bi.label", - element: this.element, - textAlign: "left", - whiteSpace: "nowrap", - height: o.height, - text: o.text, - value: o.value, - lgap: 5 + 30 * o.layer, - rgap: 5 - }) - } -}); - -BI.shortcut("bi.layer_tree_table_cell", BI.LayerTreeTableCell);/** - * - * 层级树状结构的表格 - * - * Created by GUY on 2016/5/7. - * @class BI.LayerTreeTable - * @extends BI.Widget - */ -BI.LayerTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-layer-tree-table", - el: { - type: "bi.resizable_table" - }, - - isNeedResize: false,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - rowHeaderCreator: null, - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _createHeader: function (vDeep) { - var self = this, o = this.options; - var header = o.header || [], crossHeader = o.crossHeader || []; - var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); - var result = []; - BI.each(items, function (row, node) { - var c = [crossHeader[row]]; - result.push(c.concat(node || [])); - }); - if (header && header.length > 0) { - var newHeader = this._formatColumns(header); - var deep = this._getHDeep(); - if (deep <= 0) { - newHeader.unshift(o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }); - } else { - newHeader[0] = o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }; - } - result.push(newHeader); - } - return result; - }, - - _formatItems: function (nodes) { - var self = this, o = this.options; - var result = []; - - function track(node, layer) { - node.type || (node.type = "bi.layer_tree_table_cell"); - node.layer = layer; - var next = [node]; - next = next.concat(node.values || []); - if (next.length > 0) { - result.push(next); - } - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child, layer + 1); - }); - } - } - - BI.each(nodes, function (i, node) { - BI.each(node.children, function (j, c) { - track(c, 0); - }); - if (BI.isArray(node.values)) { - var next = [{ - type: "bi.table_style_cell", text: BI.i18nText("BI-Summary_Values"), styleGetter: function () { - return o.summaryCellStyleGetter(true); - } - }].concat(node.values); - result.push(next) - } - }); - return result; - }, - - _formatColumns: function (columns, deep) { - if (BI.isNotEmptyArray(columns)) { - deep = deep || this._getHDeep(); - return columns.slice(Math.max(0, deep - 1)); - } - return columns; - }, - - _formatFreezeCols: function () { - if (this.options.freezeCols.length > 0) { - return [0]; - } - return []; - }, - - _formatColumnSize: function (columnSize, deep) { - if (columnSize.length <= 0) { - return []; - } - var result = [0]; - deep = deep || this._getHDeep(); - BI.each(columnSize, function (i, size) { - if (i < deep) { - result[0] += size; - return; - } - result.push(size); - }); - return result; - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - return { - header: this._createHeader(vDeep), - items: this._formatItems(o.items), - columnSize: this._formatColumnSize(o.columnSize, deep), - minColumnSize: this._formatColumns(o.minColumnSize, deep), - maxColumnSize: this._formatColumns(o.maxColumnSize, deep), - freezeCols: this._formatFreezeCols() - } - }, - - _init: function () { - BI.LayerTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: [], - mergeRule: o.mergeRule, - columnSize: data.columnSize, - minColumnSize: data.minColumnSize, - maxColumnSize: data.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - regionColumnSize: o.regionColumnSize, - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - setWidth: function (width) { - BI.LayerTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.LayerTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - var columnSize = this.table.getColumnSize(); - var deep = this._getHDeep(); - var pre = []; - if (deep > 0) { - pre = BI.makeArray(deep, columnSize[0] / deep); - } - return pre.concat(columnSize.slice(1)); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var self = this; - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self.attr(k, v); - }); - return; - } - BI.LayerTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "columnSize": - case "minColumnSize": - case "maxColumnSize": - case "freezeCols": - case "mergeCols": - return; - } - this.table.attr.apply(this.table, [key, value]); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - o.items = items || []; - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("freezeCols", data.freezeCols); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.LayerTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.shortcut("bi.layer_tree_table", BI.LayerTreeTable);/** - * - * Created by GUY on 2016/5/26. - * @class BI.TableStyleCell - * @extends BI.Single - */ -BI.TableStyleCell = BI.inherit(BI.Single, { - - _defaultConfig: function () { - return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-style-cell", - styleGetter: BI.emptyFn - }); - }, - - _init: function () { - BI.TableStyleCell.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - forceCenter: true, - hgap: 5, - text: o.text - }); - this._digestStyle(); - }, - - _digestStyle: function () { - var o = this.options; - var style = o.styleGetter(); - if (style) { - this.text.element.css(style); - } - }, - - setText: function (text) { - this.text.setText(text); - }, - - populate: function () { - this._digestStyle(); - } -}); -BI.shortcut('bi.table_style_cell', BI.TableStyleCell);/** - * - * 树状结构的表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableTree - * @extends BI.Widget - */ -BI.TableTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-tree", - el: { - type: "bi.resizable_table" - }, - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _init: function () { - BI.TableTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: o.columnSize, - minColumnSize: o.minColumnSize, - maxColumnSize: o.maxColumnSize, - - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: o.regionColumnSize, - - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _digest: function () { - var self = this, o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); - var items = BI.TableTree.formatItems(o.items, deep, false, o.summaryCellStyleGetter); - return { - header: header, - items: items - } - }, - - setWidth: function (width) { - BI.TableTree.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.TableTree.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this.table.setColumnSize(columnSize); - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function () { - BI.TableTree.superclass.attr.apply(this, arguments); - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items || []; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.TableTree.superclass.destroy.apply(this, arguments); - } -}); - -BI.extend(BI.TableTree, { - formatHeader: function (header, crossHeader, crossItems, hDeep, vDeep, styleGetter) { - var items = BI.TableTree.formatCrossItems(crossItems, vDeep, styleGetter); - var result = []; - for (var i = 0; i < vDeep; i++) { - var c = []; - for (var j = 0; j < hDeep; j++) { - c.push(crossHeader[i]); - } - result.push(c.concat(items[i] || [])); - } - if (header && header.length > 0) { - result.push(header); - } - return result; - }, - - formatItems: function (nodes, deep, isCross, styleGetter) { - var self = this; - var result = []; - - function track(store, node) { - var next; - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - var next; - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - track(next, child); - }); - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - if (/**(store == -1 || node.children.length > 1) &&**/ BI.isNotEmptyArray(node.values)) { - var summary = { - text: BI.i18nText("BI-Summary_Values"), - type: "bi.table_style_cell", - styleGetter: function () { - return styleGetter(store === -1) - } - }; - for (var i = next.length; i < deep; i++) { - next.push(summary); - } - if (!isCross) { - next = next.concat(node.values); - } - if (next.length > 0) { - if (!isCross) { - result.push(next); - } else { - for (var k = 0, l = node.values.length; k < l; k++) { - result.push(next); - } - } - } - } - - return; - } - if (store != -1) { - next = store.slice(); - for (var i = next.length; i < deep; i++) { - next.push(node); - } - } else { - next = []; - } - if (!isCross && BI.isArray(node.values)) { - next = next.concat(node.values); - } - if (isCross && BI.isArray(node.values)) { - for (var i = 0, len = node.values.length; i < len - 1; i++) { - if (next.length > 0) { - result.push(next); - } - } - } - if (next.length > 0) { - result.push(next); - } - } - - BI.each(nodes, function (i, node) { - track(-1, node); - }); - //填充空位 - BI.each(result, function (i, line) { - var last = BI.last(line); - for (var j = line.length; j < deep; j++) { - line.push(last); - } - }); - return result; - }, - - formatCrossItems: function (nodes, deep, styleGetter) { - var items = BI.TableTree.formatItems(nodes, deep, true, styleGetter); - return BI.unzip(items); - }, - - maxDeep: function (nodes) { - function track(deep, node) { - var d = deep; - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - d = Math.max(d, track(deep + 1, child)); - }); - } - return d; - } - - var deep = 1; - if (BI.isObject(nodes)) { - BI.each(nodes, function (i, node) { - deep = Math.max(deep, track(1, node)); - }); - } - return deep; - } -}); - -BI.shortcut("bi.tree_table", BI.TableTree);/** - * guy - * 复选导航条 - * Created by GUY on 2015/8/25. - * @class BI.MultiSelectBar - * @extends BI.BasicButton - */ -BI.MultiSelectBar = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multi-select-bar", - height: 25, - text: BI.i18nText('BI-Select_All'), - isAllCheckedBySelectedValue: BI.emptyFn, - //手动控制选中 - disableSelected: true, - isHalfCheckedBySelectedValue: function (selectedValues) { - return selectedValues.length > 0; - } - }) - }, - _init: function () { - BI.MultiSelectBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox", - stopPropagation: true, - handler: function () { - self.setSelected(self.isSelected()); - } - }); - this.half = BI.createWidget({ - type: "bi.half_icon_button", - stopPropagation: true, - handler: function () { - self.setSelected(true); - } - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); - }); - this.half.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); - }); - this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () { - self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); - }); - this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () { - self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - width: 36, - el: { - type: "bi.center_adapt", - items: [this.checkbox, this.half] - } - }, { - el: this.text - }] - }); - this.half.invisible(); - }, - - //自己手动控制选中 - beforeClick: function () { - var isHalf = this.isHalfSelected(), isSelected = this.isSelected(); - if (isHalf === true) { - this.setSelected(true); - } else { - this.setSelected(!isSelected); - } - }, - - setSelected: function (v) { - this.checkbox.setSelected(v); - this.setHalfSelected(false); - }, - - setHalfSelected: function (b) { - this._half = !!b; - if (b === true) { - this.half.visible(); - this.checkbox.invisible(); - } else { - this.half.invisible(); - this.checkbox.visible(); - } - }, - - isHalfSelected: function () { - return !!this._half; - }, - - isSelected: function () { - return this.checkbox.isSelected(); - }, - - setValue: function (selectedValues) { - BI.MultiSelectBar.superclass.setValue.apply(this, arguments); - var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments); - this.setSelected(isAllChecked); - !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments)); - } -}); -BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE"; -BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);/** - * 倒立的Branch - * @class BI.HandStandBranchExpander - * @extend BI.Widget - * create by young - */ -BI.HandStandBranchExpander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-handstand-branch-expander", - direction: BI.Direction.Top, - logic: { - dynamic: true - }, - el: {type: "bi.label"}, - popup: {} - }) - }, - - _init: function () { - BI.HandStandBranchExpander.superclass._init.apply(this, arguments); - var o = this.options; - this._initExpander(); - this._initBranchView(); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, { - type: "bi.center_adapt", - items: [this.expander] - }, this.branchView) - })))); - }, - - _initExpander: function () { - var self = this, o = this.options; - this.expander = BI.createWidget(o.el); - this.expander.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - _initBranchView: function () { - var self = this, o = this.options; - this.branchView = BI.createWidget(o.popup, {}); - this.branchView.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function (items) { - this.branchView.populate.apply(this.branchView, arguments); - }, - - getValue: function () { - return this.branchView.getValue(); - } -}); -BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/** - * @class BI.BranchExpander - * @extend BI.Widget - * create by young - */ -BI.BranchExpander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-expander", - direction: BI.Direction.Left, - logic: { - dynamic: true - }, - el: {}, - popup: {} - }) - }, - - _init: function () { - BI.BranchExpander.superclass._init.apply(this, arguments); - var o = this.options; - this._initExpander(); - this._initBranchView(); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView) - })))); - }, - - _initExpander: function () { - var self = this, o = this.options; - this.expander = BI.createWidget(o.el, { - type: "bi.label", - width: 30, - height: "100%" - }); - this.expander.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - _initBranchView: function () { - var self = this, o = this.options; - this.branchView = BI.createWidget(o.popup, {}); - this.branchView.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function (items) { - this.branchView.populate.apply(this.branchView, arguments); - }, - - getValue: function () { - return this.branchView.getValue(); - } -}); -BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.branch_expander", BI.BranchExpander);/** - * @class BI.HandStandBranchTree - * @extends BI.Widget - * create by young - * 横向分支的树 - */ -BI.HandStandBranchTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-handstand-branch-tree", - expander: {}, - el: {}, - items: [] - }) - }, - _init: function () { - BI.HandStandBranchTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.branchTree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - type: "bi.handstand_branch_expander", - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - el: BI.extend({ - type: "bi.button_tree", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - layouts: [{ - type: "bi.horizontal_adapt" - }] - }, o.el), - items: this.options.items - }); - this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ - self.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE, arguments); - }); - this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function () { - this.branchTree.populate.apply(this.branchTree, arguments); - }, - - getValue: function () { - return this.branchTree.getValue(); - } -}); -BI.HandStandBranchTree.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.handstand_branch_tree", BI.HandStandBranchTree);/** - * @class BI.BranchTree - * @extends BI.Widget - * create by young - * 横向分支的树 - */ -BI.BranchTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-tree", - expander: {}, - el: {}, - items: [] - }) - }, - _init: function () { - BI.BranchTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.branchTree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - type: "bi.branch_expander", - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - el: BI.extend({ - type: "bi.button_tree", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - layouts: [{ - type: "bi.vertical" - }] - }, o.el), - items: this.options.items - }); - this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ - self.fireEvent(BI.BranchTree.EVENT_CHANGE, arguments); - }); - this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function () { - this.branchTree.populate.apply(this.branchTree, arguments); - }, - - getValue: function () { - return this.branchTree.getValue(); - } -}); -BI.BranchTree.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.branch_tree", BI.BranchTree);/** - * guy - * 异步树 - * @class BI.DisplayTree - * @extends BI.TreeView - */ -BI.DisplayTree = BI.inherit(BI.TreeView, { - _defaultConfig: function () { - return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-display-tree" - }) - }, - _init: function () { - BI.DisplayTree.superclass._init.apply(this, arguments); - }, - - //配置属性 - _configSetting: function () { - var setting = { - view: { - selectedMulti: false, - dblClickExpand: false, - showIcon: false, - showTitle: false - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - callback: { - beforeCollapse: beforeCollapse - } - }; - - function beforeCollapse(treeId, treeNode) { - return false; - } - - return setting; - }, - - _dealWidthNodes: function (nodes) { - nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); - var self = this, o = this.options; - BI.each(nodes, function (i, node) { - if (node.count > 0) { - node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; - } else { - node.text = node.value; - } - }); - return nodes; - }, - - initTree: function (nodes, setting) { - var setting = setting || this._configSetting(); - this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); - }, - - destroy: function () { - BI.DisplayTree.superclass.destroy.apply(this, arguments); - } -}); -BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE"; + this.loader.element.sortable({ + containment: o.containment || this.element, + connectWith: o.connectWith || ".bi-sort-list", + items: ".sort-item", + cursor: o.cursor || "drag", + tolerance: o.tolerance || "intersect", + placeholder: { + element: function ($currentItem) { + var holder = BI.createWidget({ + type: "bi.layout", + cls: "bi-sortable-holder", + height: $currentItem.outerHeight() + }); + holder.element.css({ + "margin-left": $currentItem.css("margin-left"), + "margin-right": $currentItem.css("margin-right"), + "margin-top": $currentItem.css("margin-top"), + "margin-bottom": $currentItem.css("margin-bottom"), + "margin": $currentItem.css("margin") + }); + return holder.element; + }, + update: function () { -BI.shortcut("bi.display_tree", BI.DisplayTree);/** - * guy - * 二级树 - * @class BI.LevelTree - * @extends BI.Single - */ -BI.LevelTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-level-tree", - el: { - chooseType: 0 + } }, - expander: {}, - items: [] - }) - }, - - _init: function () { - BI.LevelTree.superclass._init.apply(this, arguments); + start: function (event, ui) { - this.initTree(this.options.items); - }, + }, + stop: function (event, ui) { + self.fireEvent(BI.SortList.EVENT_CHANGE); + }, + over: function (event, ui) { - _formatItems: function (nodes, layer) { - var self = this; - BI.each(nodes, function (i, node) { - var extend = {layer: layer}; - if (!BI.isKey(node.id)) { - node.id = BI.UUID(); - } - if (node.isParent === true || BI.isNotEmptyArray(node.children)) { - switch (i) { - case 0 : - extend.type = "bi.first_plus_group_node"; - break; - case nodes.length - 1 : - extend.type = "bi.last_plus_group_node"; - break; - default : - extend.type = "bi.mid_plus_group_node"; - break; - } - BI.defaults(node, extend); - self._formatItems(node.children, layer + 1); - } else { - switch (i) { - case nodes.length - 1: - extend.type = "bi.last_tree_leaf_item"; - break; - default : - extend.type = "bi.mid_tree_leaf_item"; - } - BI.defaults(node, extend); } }); - return nodes; }, - _assertId: function (sNodes) { - BI.each(sNodes, function (i, node) { - if (!BI.isKey(node.id)) { - node.id = BI.UUID(); - } + _formatItems: function (items) { + BI.each(items, function (i, item) { + item = BI.stripEL(item); + item.cls = item.cls ? item.cls + " sort-item" : "sort-item"; + item.attributes = { + sorted: item.value + }; }); + return items; }, - //构造树结构, - initTree: function (nodes) { - var self = this, o = this.options; - this.empty(); - this._assertId(nodes); - this.tree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - - items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), - - el: BI.extend({ - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - }, o.el) - }); - this.tree.on(BI.Controller.EVENT_CHANGE, function (type) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.LevelTree.EVENT_CHANGE, arguments); - } - }) + hasNext: function () { + return this.loader.hasNext(); }, - //生成树方法 - stroke: function (nodes) { - this.tree.stroke.apply(this.tree, arguments); + addItems: function (items) { + this.loader.addItems(items); }, populate: function (items) { - items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0); - this.tree.populate(items); + if (items) { + arguments[0] = this._formatItems(items); + } + this.loader.populate.apply(this.loader, arguments); }, - setValue: function (v) { - this.tree.setValue(v); + empty: function () { + this.loader.empty(); }, - getValue: function () { - return this.tree.getValue(); + setNotSelectedValue: function () { + this.loader.setNotSelectedValue.apply(this.loader, arguments); }, - getAllLeaves: function () { - return this.tree.getAllLeaves(); + getNotSelectedValue: function () { + return this.loader.getNotSelectedValue(); }, - getNodeById: function (id) { - return this.tree.getNodeById(id); + setValue: function () { + this.loader.setValue.apply(this.loader, arguments); }, - getNodeByValue: function (id) { - return this.tree.getNodeByValue(id); - } -}); -BI.LevelTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.level_tree", BI.LevelTree);/** - * 简单的多选树 - * - * Created by GUY on 2016/2/16. - * @class BI.SimpleTreeView - * @extends BI.Widget - */ -BI.SimpleTreeView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-simple-tree", - itemsCreator: BI.emptyFn, - items: null - }) + getValue: function () { + return this.loader.getValue(); }, - _init: function () { - BI.SimpleTreeView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.structure = new BI.Tree(); - this.tree = BI.createWidget({ - type: "bi.tree_view", - element: this, - itemsCreator: function (op, callback) { - var fn = function (items) { - callback({ - items: items - }); - self.structure.initTree(BI.Tree.transformToTreeFormat(items)); - }; - if (BI.isNotNull(o.items)) { - fn(o.items); - } else { - o.itemsCreator(op, fn); - } - } - }); - this.tree.on(BI.TreeView.EVENT_CHANGE, function () { - self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments); - }); - if (BI.isNotEmptyArray(o.items)) { - this.populate(); - } + + getAllButtons: function () { + return this.loader.getAllButtons(); }, - populate: function (items, keyword) { - if (items) { - this.options.items = items; - } - this.tree.stroke({ - keyword: keyword - }); + getAllLeaves: function () { + return this.loader.getAllLeaves(); }, - setValue: function (v) { - v || (v = []); - var self = this, map = {}; - var selected = []; - BI.each(v, function (i, val) { - var node = self.structure.search(val, "value"); - if (node) { - var p = node; - p = p.getParent(); - if (p) { - if (!map[p.value]) { - map[p.value] = 0; - } - map[p.value]++; - } + getSelectedButtons: function () { + return this.loader.getSelectedButtons(); + }, - while (p && p.getChildrenLength() <= map[p.value]) { - selected.push(p.value); - p = p.getParent(); - if (p) { - if (!map[p.value]) { - map[p.value] = 0; - } - map[p.value]++; - } - } - } - }); + getNotSelectedButtons: function () { + return this.loader.getNotSelectedButtons(); + }, - this.tree.setValue(BI.makeObject(v.concat(selected))); + getIndexByValue: function (value) { + return this.loader.getIndexByValue(value); }, - _getValue: function () { - var self = this, result = [], val = this.tree.getValue(); - var track = function (nodes) { - BI.each(nodes, function (key, node) { - if (BI.isEmpty(node)) { - result.push(key); - } else { - track(node); - } - }) - }; - track(val); - return result; + getNodeById: function (id) { + return this.loader.getNodeById(id); }, - empty: function () { - this.tree.empty(); + getNodeByValue: function (value) { + return this.loader.getNodeByValue(value); }, - getValue: function () { - var self = this, result = [], val = this._getValue(); - BI.each(val, function (i, key) { - var target = self.structure.search(key, "value"); - if (target) { - self.structure._traverse(target, function (node) { - if (node.isLeaf()) { - result.push(node.value); - } - }) - } - }); - return result; + getSortedValues: function () { + return this.loader.element.sortable("toArray", {attribute: "sorted"}); } }); -BI.SimpleTreeView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.simple_tree", BI.SimpleTreeView); +BI.SortList.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.sort_list", BI.SortList);/** + * 有总页数和总行数的分页控件 + * Created by Young's on 2016/10/13. + */ +BI.AllCountPager = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-all-count-pager", + height: 30, + pages: 1, //必选项 + curr: 1, //初始化当前页, pages为数字时可用, + count: 1 //总行数 + }) + }, + _init: function () { + BI.AllCountPager.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.small_text_editor", + cls: "pager-editor", + validationChecker: function (v) { + return (self.rowCount.getValue() === 0 && v === "0") || BI.isPositiveInteger(v); + }, + hgap: 4, + vgap: 0, + value: o.curr, + errorText: BI.i18nText("BI-Please_Input_Positive_Integer"), + width: 35, + height: 20 + }); + + this.pager = BI.createWidget({ + type: "bi.pager", + width: 36, + layouts: [{ + type: "bi.horizontal", + hgap: 1, + vgap: 1 + }], + + dynamicShow: false, + pages: o.pages, + curr: o.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Previous_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + cls: "all-pager-prev column-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Next_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + cls: "all-pager-next column-next-page-h-font" + }, + + hasPrev: o.hasPrev, + hasNext: o.hasNext, + firstPage: o.firstPage, + lastPage: o.lastPage + }); + + this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () { + self.pager.setValue(BI.parseInt(self.editor.getValue())); + self.fireEvent(BI.AllCountPager.EVENT_CHANGE); + }); + this.pager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.AllCountPager.EVENT_CHANGE); + }); + this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.editor.setValue(self.pager.getCurrentPage()); + }); + + this.allPages = BI.createWidget({ + type: "bi.label", + width: 30, + title: o.pages, + text: "/" + o.pages + }); + + this.rowCount = BI.createWidget({ + type: "bi.label", + height: o.height, + hgap: 5, + text: o.count, + title: o.count + }); + + var count = BI.createWidget({ + type: "bi.left", + height: o.height, + scrollable: false, + items: [{ + type: "bi.label", + height: o.height, + text: BI.i18nText("BI-Basic_Total"), + width: 15 + }, this.rowCount, { + type: "bi.label", + height: o.height, + text: BI.i18nText("BI-Tiao_Data"), + width: 50, + textAlign: "left" + }] + }); + BI.createWidget({ + type: "bi.center_adapt", + element: this, + columnSize: ["", 35, 40, 36], + items: [count, this.editor, this.allPages, this.pager] + }) + }, + + alwaysShowPager: true, + + setAllPages: function (v) { + this.allPages.setText("/" + v); + this.allPages.setTitle(v); + this.pager.setAllPages(v); + this.editor.setEnable(v >= 1); + }, + + setValue: function (v) { + this.pager.setValue(v); + }, + + setVPage: function (v) { + this.pager.setValue(v); + }, + + setCount: function (count) { + this.rowCount.setText(count); + this.rowCount.setTitle(count); + }, + + getCurrentPage: function () { + return this.pager.getCurrentPage(); + }, + + hasPrev: function () { + return this.pager.hasPrev(); + }, + + hasNext: function () { + return this.pager.hasNext(); + }, + + setPagerVisible: function (b) { + this.editor.setVisible(b); + this.allPages.setVisible(b); + this.pager.setVisible(b); + }, + + populate: function () { + this.pager.populate(); + } +}); +BI.AllCountPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.all_count_pager", BI.AllCountPager);/** + * 显示页码的分页控件 + * + * Created by GUY on 2016/6/30. + * @class BI.DirectionPager + * @extends BI.Widget + */ +BI.DirectionPager = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-direction-pager", + height: 30, + horizontal: { + pages: false, //总页数 + curr: 1, //初始化当前页, pages为数字时可用 + + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn, + firstPage: 1, + lastPage: BI.emptyFn + }, + vertical: { + pages: false, //总页数 + curr: 1, //初始化当前页, pages为数字时可用 + + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn, + firstPage: 1, + lastPage: BI.emptyFn + } + }) + }, + _init: function () { + BI.DirectionPager.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var v = o.vertical, h = o.horizontal; + this._createVPager(); + this._createHPager(); + this.layout = BI.createWidget({ + type: "bi.absolute", + scrollable: false, + element: this, + items: [{ + el: this.vpager, + top: 5, + right: 74 + }, { + el: this.vlabel, + top: 5, + right: 111 + }, { + el: this.hpager, + top: 5, + right: -9 + }, { + el: this.hlabel, + top: 5, + right: 28 + }] + }); + }, + + _createVPager: function () { + var self = this, o = this.options; + var v = o.vertical; + this.vlabel = BI.createWidget({ + type: "bi.label", + width: 24, + height: 20, + value: v.curr, + title: v.curr + }); + this.vpager = BI.createWidget({ + type: "bi.pager", + width: 76, + layouts: [{ + type: "bi.horizontal", + scrollx: false, + rgap: 24, + vgap: 1 + }], + + dynamicShow: false, + pages: v.pages, + curr: v.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Up_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-prev column-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Down_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-next column-next-page-h-font" + }, + + hasPrev: v.hasPrev, + hasNext: v.hasNext, + firstPage: v.firstPage, + lastPage: v.lastPage + }); + + this.vpager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.DirectionPager.EVENT_CHANGE); + }); + this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.vlabel.setValue(this.getCurrentPage()); + self.vlabel.setTitle(this.getCurrentPage()); + }); + }, + + _createHPager: function () { + var self = this, o = this.options; + var h = o.horizontal; + this.hlabel = BI.createWidget({ + type: "bi.label", + width: 24, + height: 20, + value: h.curr, + title: h.curr + }); + this.hpager = BI.createWidget({ + type: "bi.pager", + width: 76, + layouts: [{ + type: "bi.horizontal", + scrollx: false, + rgap: 24, + vgap: 1 + }], + + dynamicShow: false, + pages: h.pages, + curr: h.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Left_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-prev row-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Right_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-next row-next-page-h-font" + }, + + hasPrev: h.hasPrev, + hasNext: h.hasNext, + firstPage: h.firstPage, + lastPage: h.lastPage + }); + + this.hpager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.DirectionPager.EVENT_CHANGE); + }); + this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.hlabel.setValue(this.getCurrentPage()); + self.hlabel.setTitle(this.getCurrentPage()); + }); + }, + + getVPage: function () { + return this.vpager.getCurrentPage(); + }, + + getHPage: function () { + return this.hpager.getCurrentPage(); + }, + + setVPage: function (v) { + this.vpager.setValue(v); + this.vlabel.setValue(v); + this.vlabel.setTitle(v); + }, + + setHPage: function (v) { + this.hpager.setValue(v); + this.hlabel.setValue(v); + this.hlabel.setTitle(v); + }, + + hasVNext: function () { + return this.vpager.hasNext(); + }, + + hasHNext: function () { + return this.hpager.hasNext(); + }, + + hasVPrev: function () { + return this.vpager.hasPrev(); + }, + + hasHPrev: function () { + return this.hpager.hasPrev(); + }, + + setHPagerVisible: function (b) { + this.hpager.setVisible(b); + this.hlabel.setVisible(b); + }, + + setVPagerVisible: function (b) { + this.vpager.setVisible(b); + this.vlabel.setVisible(b); + }, + + populate: function () { + this.vpager.populate(); + this.hpager.populate(); + var vShow = false, hShow = false; + if (!this.hasHNext() && !this.hasHPrev()) { + this.setHPagerVisible(false); + } else { + this.setHPagerVisible(true); + hShow = true; + } + if (!this.hasVNext() && !this.hasVPrev()) { + this.setVPagerVisible(false); + } else { + this.setVPagerVisible(true); + vShow = true; + } + this.setVisible(hShow || vShow); + var num = [74, 111, -9, 28]; + var items = this.layout.attr("items"); + + if (vShow === true && hShow === true) { + items[0].right = num[0]; + items[1].right = num[1]; + items[2].right = num[2]; + items[3].right = num[3]; + } else if (vShow === true) { + items[0].right = num[2]; + items[1].right = num[3]; + } else if (hShow === true) { + items[2].right = num[2]; + items[3].right = num[3]; + } + this.layout.attr("items", items); + this.layout.resize(); + }, + + clear: function () { + this.vpager.attr("curr", 1); + this.hpager.attr("curr", 1); + } +}); +BI.DirectionPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.direction_pager", BI.DirectionPager);/** + * 分页控件 + * + * Created by GUY on 2015/8/31. + * @class BI.DetailPager + * @extends BI.Widget + */ +BI.DetailPager = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-detail-pager", + behaviors: {}, + layouts: [{ + type: "bi.horizontal", + hgap: 10, + vgap: 0 + }], + + dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 + //dynamicShow为false时以下两个有用 + dynamicShowFirstLast: false,//是否动态显示首页、尾页 + dynamicShowPrevNext: false,//是否动态显示上一页、下一页 + pages: false, //总页数 + curr: function () { + return 1; + }, //初始化当前页 + groups: 0, //连续显示分页数 + jump: BI.emptyFn, //分页的回调函数 + + first: false, //是否显示首页 + last: false, //是否显示尾页 + prev: "上一页", + next: "下一页", + + firstPage: 1, + lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 + return 1; + }, + hasPrev: BI.emptyFn, //pages不可用时有效 + hasNext: BI.emptyFn //pages不可用时有效 + }) + }, + _init: function () { + BI.DetailPager.superclass._init.apply(this, arguments); + var self = this; + this.currPage = BI.result(this.options, "curr"); + //翻页太灵敏 + this._lock = false; + this._debouce = BI.debounce(function () { + self._lock = false; + }, 300); + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options, view = [], dict = {}; + this.empty(); + var pages = BI.result(o, "pages"); + var curr = BI.result(this, "currPage"); + var groups = BI.result(o, "groups"); + var first = BI.result(o, "first"); + var last = BI.result(o, "last"); + var prev = BI.result(o, "prev"); + var next = BI.result(o, "next"); + + if (pages === false) { + groups = 0; + first = false; + last = false; + } else { + groups > pages && (groups = pages); + } + + //计算当前组 + dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); + + //当前页非首页,则输出上一页 + if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { + if (BI.isKey(prev)) { + view.push({ + text: prev, + value: "prev", + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }) + } else { + view.push(BI.extend({ + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }, prev)); + } + } + + //当前组非首组,则输出首页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { + view.push({ + text: first, + value: "first", + disabled: !(dict.index > 1 && groups !== 0) + }); + if (dict.index > 1 && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + } + + //输出当前页组 + dict.poor = Math.floor((groups - 1) / 2); + dict.start = dict.index > 1 ? curr - dict.poor : 1; + dict.end = dict.index > 1 ? (function () { + var max = curr + (groups - dict.poor - 1); + return max > pages ? pages : max; + }()) : groups; + if (dict.end - dict.start < groups - 1) { //最后一组状态 + dict.start = dict.end - groups + 1; + } + var s = dict.start, e = dict.end; + if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { + s++; + e--; + } + for (; s <= e; s++) { + if (s === curr) { + view.push({ + text: s, + value: s, + selected: true + }) + } else { + view.push({ + text: s, + value: s + }) + } + } + + //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { + if (pages > groups && dict.end < pages && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + view.push({ + text: last, + value: "last", + disabled: !(pages > groups && dict.end < pages && groups !== 0) + }) + } + + //当前页不为尾页时,输出下一页 + dict.flow = !prev && groups === 0; + if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { + view.push((function () { + if (BI.isKey(next)) { + if (pages === false) { + return {text: next, value: "next", disabled: o.hasNext(curr) === false} + } + return (dict.flow && curr === pages) + ? + {text: next, value: "next", disabled: true} + : + {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; + } else { + return BI.extend({ + disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) + }, next); + } + }())); + } + + this.button_group = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(view, { + cls: "page-item bi-border bi-list-item-active", + height: 23, + hgap: 10 + }), + behaviors: o.behaviors, + layouts: o.layouts + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self._lock === true) { + return; + } + self._lock = true; + self._debouce(); + if (type === BI.Events.CLICK) { + var v = self.button_group.getValue()[0]; + switch (v) { + case "first": + self.currPage = 1; + break; + case "last": + self.currPage = pages; + break; + case "prev": + self.currPage--; + break; + case "next": + self.currPage++; + break; + default: + self.currPage = v; + break; + } + o.jump.apply(self, [{ + pages: pages, + curr: self.currPage + }]); + self._populate(); + self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE); + }, + + getCurrentPage: function () { + return this.currPage; + }, + + setAllPages: function (pages) { + this.options.pages = pages; + }, + + hasPrev: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasPrev(v) : v > 1; + }, + + hasNext: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasNext(v) : v < pages; + }, + + setValue: function (v) { + var o = this.options; + v = v | 0; + v = v < 1 ? 1 : v; + if (o.pages === false) { + var lastPage = BI.result(o, "lastPage"), firstPage = 1; + this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); + } else { + v = v > o.pages ? o.pages : v; + this.currPage = v; + } + this._populate(); + }, + + getValue: function () { + var val = this.button_group.getValue()[0]; + switch (val) { + case "prev": + return -1; + case "next": + return 1; + case "first": + return BI.MIN; + case "last": + return BI.MAX; + default : + return val; + } + }, + + attr: function (key, value) { + BI.DetailPager.superclass.attr.apply(this, arguments); + if (key === "curr") { + this.currPage = BI.result(this.options, "curr"); + } + }, + + populate: function () { + this._populate(); + } +}); +BI.DetailPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.DetailPager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; +BI.shortcut("bi.detail_pager", BI.DetailPager);/** + * 分段控件使用的button + * + * Created by GUY on 2015/9/7. + * @class BI.SegmentButton + * @extends BI.BasicButton + */ +BI.SegmentButton = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active', + shadow: true, + readonly: true, + hgap: 5 + }) + }, + + _init: function () { + BI.SegmentButton.superclass._init.apply(this, arguments); + var opts = this.options, self = this; + //if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) { + // this.element.css({lineHeight : (opts.height - 2) + 'px'}); + //} + this.text = BI.createWidget({ + type: "bi.label", + element: this, + height: opts.height - 2, + whiteSpace: opts.whiteSpace, + text: opts.text, + value: opts.value, + hgap: opts.hgap + }) + }, + + setSelected: function () { + BI.SegmentButton.superclass.setSelected.apply(this, arguments); + }, + + setText: function (text) { + BI.SegmentButton.superclass.setText.apply(this, arguments); + this.text.setText(text); + }, + + destroy: function () { + BI.SegmentButton.superclass.destroy.apply(this, arguments); + } +}); +BI.shortcut('bi.segment_button', BI.SegmentButton);/** + * 单选按钮组 + * + * Created by GUY on 2015/9/7. + * @class BI.Segment + * @extends BI.Widget + */ +BI.Segment = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-segment", + items: [], + height: 30 + }); + }, + _init: function () { + BI.Segment.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.buttonGroup = BI.createWidget({ + element: this, + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.segment_button", + height: o.height - 2, + whiteSpace: o.whiteSpace + }), + layout: [ + { + type: "bi.center" + } + ] + }) + this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) + }); + this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { + self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj) + }) + }, + + setValue: function (v) { + this.buttonGroup.setValue(v); + }, + + setEnabledValue: function (v) { + this.buttonGroup.setEnabledValue(v); + }, + + getValue: function () { + return this.buttonGroup.getValue(); + } +}); +BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut('bi.segment', BI.Segment);/** + * 自适应宽度的表格 + * + * Created by GUY on 2016/2/3. + * @class BI.AdaptiveTable + * @extends BI.Widget + */ +BI.AdaptiveTable = BI.inherit(BI.Widget, { + + _const: { + perColumnSize: 100 + }, + + _defaultConfig: function () { + return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-adaptive-table", + el: { + type: "bi.resizable_table" + }, + isNeedResize: true, + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 + + isNeedMerge: false,//是否需要合并单元格 + mergeCols: [], //合并的单元格列号 + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + header: [], + items: [], //二维数组 + + //交叉表头 + crossHeader: [], + crossItems: [] + }); + }, + + _init: function () { + BI.AdaptiveTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: false, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: data.columnSize, + + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: data.regionColumnSize, + + header: o.header, + items: o.items, + //交叉表头 + crossHeader: o.crossHeader, + crossItems: o.crossItems + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + self._populate(); + self.table.populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.columnSize = this.getColumnSize(); + self._populate(); + self.table.populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze === true ? this.options.freezeCols.length : 0; + }, + + _digest: function () { + var o = this.options; + var columnSize = o.columnSize.slice(); + var regionColumnSize = o.regionColumnSize.slice(); + var freezeCols = o.freezeCols.slice(); + var regionSize = o.regionColumnSize[0]; + var freezeColLength = this._getFreezeColLength(); + if (!regionSize || regionSize > o.width - 10 || regionSize < 10) { + regionSize = (freezeColLength > o.columnSize.length / 2 ? 2 / 3 : 1 / 3) * o.width; + } + if (freezeColLength === 0) { + regionSize = 0; + } + if (freezeCols.length >= columnSize.length) { + freezeCols = []; + } + if (!BI.isNumber(columnSize[0])) { + columnSize = o.minColumnSize.slice(); + } + var summaryFreezeColumnSize = 0, summaryColumnSize = 0; + BI.each(columnSize, function (i, size) { + if (i < freezeColLength) { + summaryFreezeColumnSize += size; + } + summaryColumnSize += size; + }); + if (freezeColLength > 0) { + columnSize[freezeColLength - 1] = BI.clamp(regionSize - (summaryFreezeColumnSize - columnSize[freezeColLength - 1]), + o.minColumnSize[freezeColLength - 1] || 10, o.maxColumnSize[freezeColLength - 1] || Number.MAX_VALUE); + } + if (columnSize.length > 0) { + columnSize[columnSize.length - 1] = BI.clamp(o.width - BI.GridTableScrollbar.SIZE - regionSize - (summaryColumnSize - summaryFreezeColumnSize - columnSize[columnSize.length - 1]), + o.minColumnSize[columnSize.length - 1] || 10, o.maxColumnSize[columnSize.length - 1] || Number.MAX_VALUE); + } + regionColumnSize[0] = regionSize; + + return { + freezeCols: freezeCols, + columnSize: columnSize, + regionColumnSize: regionColumnSize + } + }, + + _populate: function () { + var o = this.options; + var data = this._digest(); + o.regionColumnSize = data.regionColumnSize; + o.columnSize = data.columnSize; + this.table.setColumnSize(data.columnSize); + this.table.setRegionColumnSize(data.regionColumnSize); + this.table.attr("freezeCols", data.freezeCols); + }, + + setWidth: function (width) { + BI.AdaptiveTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.AdaptiveTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (regionColumnSize) { + this.options.regionColumnSize = regionColumnSize; + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var v = BI.AdaptiveTable.superclass.attr.apply(this, arguments); + if (key === "freezeCols") { + return v; + } + return this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items) { + var self = this, o = this.options; + this._populate(); + this.table.populate.apply(this.table, arguments); + }, + + destroy: function () { + this.table.destroy(); + BI.AdaptiveTable.superclass.destroy.apply(this, arguments); + } +}); +BI.shortcut('bi.adaptive_table', BI.AdaptiveTable);/** + * + * 层级树状结构的表格 + * + * Created by GUY on 2016/8/12. + * @class BI.DynamicSummaryLayerTreeTable + * @extends BI.Widget + */ +BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-dynamic-summary-layer-tree-table", + + el: { + type: "bi.resizable_table" + }, + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + //行表头 + rowHeaderCreator: null, + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + footer: false, + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _createHeader: function (vDeep) { + var self = this, o = this.options; + var header = o.header || [], crossHeader = o.crossHeader || []; + var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); + var result = []; + BI.each(items, function (row, node) { + var c = [crossHeader[row]]; + result.push(c.concat(node || [])); + }); + if (header && header.length > 0) { + var newHeader = this._formatColumns(header); + var deep = this._getHDeep(); + if (deep <= 0) { + newHeader.unshift(o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }); + } else { + newHeader[0] = o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }; + } + result.push(newHeader); + } + return result; + }, + + _formatItems: function (nodes, header, deep) { + var self = this, o = this.options; + var result = []; + + function track(node, layer) { + node.type || (node.type = "bi.layer_tree_table_cell"); + node.layer = layer; + var next = [node]; + next = next.concat(node.values || []); + if (next.length > 0) { + result.push(next); + } + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child, layer + 1); + }); + } + } + + BI.each(nodes, function (i, node) { + BI.each(node.children, function (j, c) { + track(c, 0); + }); + if (BI.isArray(node.values)) { + var next = [{ + type: "bi.table_style_cell", + text: BI.i18nText("BI-Summary_Values"), + styleGetter: function () { + return o.summaryCellStyleGetter(true); + } + }].concat(node.values); + result.push(next) + } + }); + return BI.DynamicSummaryTreeTable.formatSummaryItems(result, header, o.crossItems, 1); + }, + + _formatColumns: function (columns, deep) { + if (BI.isNotEmptyArray(columns)) { + deep = deep || this._getHDeep(); + return columns.slice(Math.max(0, deep - 1)); + } + return columns; + }, + + _formatFreezeCols: function () { + if (this.options.freezeCols.length > 0) { + return [0]; + } + return []; + }, + + _formatColumnSize: function (columnSize, deep) { + if (columnSize.length <= 0) { + return []; + } + var result = [0]; + deep = deep || this._getHDeep(); + BI.each(columnSize, function (i, size) { + if (i < deep) { + result[0] += size; + return; + } + result.push(size); + }); + return result; + }, + + _recomputeColumnSize: function () { + var o = this.options; + o.regionColumnSize = this.table.getRegionColumnSize(); + var columnSize = this.table.getColumnSize().slice(); + if (o.freezeCols.length > 1) { + for (var i = 0; i < o.freezeCols.length - 1; i++) { + columnSize.splice(1, 0, 0); + } + } + o.columnSize = columnSize; + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = this._createHeader(vDeep); + var data = this._formatItems(o.items, header, deep); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); + return { + header: data.header, + items: data.items, + columnSize: this._formatColumnSize(columnSize, deep), + minColumnSize: this._formatColumns(minColumnSize, deep), + maxColumnSize: this._formatColumns(maxColumnSize, deep), + freezeCols: this._formatFreezeCols() + } + }, + + _init: function () { + BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: [], + mergeRule: o.mergeRule, + columnSize: data.columnSize, + minColumnSize: data.minColumnSize, + maxColumnSize: data.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + regionColumnSize: o.regionColumnSize, + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + self._recomputeColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + self._recomputeColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + setWidth: function (width) { + BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var self = this; + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self.attr(k, v); + }); + return; + } + BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "columnSize": + case "minColumnSize": + case "maxColumnSize": + case "freezeCols": + case "mergeCols": + return; + } + this.table.attr.apply(this.table, [key, value]); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.attr("freezeCols", data.freezeCols); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.shortcut("bi.dynamic_summary_layer_tree_table", BI.DynamicSummaryLayerTreeTable);/** + * + * 树状结构的表格 + * + * Created by GUY on 2015/8/12. + * @class BI.DynamicSummaryTreeTable + * @extends BI.Widget + */ +BI.DynamicSummaryTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-dynamic-summary-tree-table", + el: { + type: "bi.resizable_table" + }, + + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + footer: false, + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _init: function () { + BI.DynamicSummaryTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: o.columnSize, + minColumnSize: o.minColumnSize, + maxColumnSize: o.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: o.regionColumnSize, + + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + var columnSize = this.getColumnSize(); + var length = o.columnSize.length - columnSize.length; + o.columnSize = columnSize.slice(); + o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + var columnSize = this.getColumnSize(); + var length = o.columnSize.length - columnSize.length; + o.columnSize = columnSize.slice(); + o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); + var items = BI.DynamicSummaryTreeTable.formatHorizontalItems(o.items, deep, false, o.summaryCellStyleGetter); + var data = BI.DynamicSummaryTreeTable.formatSummaryItems(items, header, o.crossItems, deep); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); + return { + header: data.header, + items: data.items, + columnSize: columnSize, + minColumnSize: minColumnSize, + maxColumnSize: maxColumnSize + }; + }, + + setWidth: function (width) { + BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key) { + BI.DynamicSummaryTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "minColumnSize": + case "maxColumnSize": + return; + } + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.DynamicSummaryTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.extend(BI.DynamicSummaryTreeTable, { + + formatHorizontalItems: function (nodes, deep, isCross, styleGetter) { + var result = []; + + function track(store, node) { + var next; + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + var next; + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + track(next, child); + }); + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + if ((store == -1 || node.children.length > 1) && BI.isNotEmptyArray(node.values)) { + var summary = { + text: BI.i18nText("BI-Summary_Values"), + type: "bi.table_style_cell", + styleGetter: function () { + return styleGetter(store === -1) + } + }; + for (var i = next.length; i < deep; i++) { + next.push(summary); + } + if (!isCross) { + next = next.concat(node.values); + } + if (next.length > 0) { + if (!isCross) { + result.push(next); + } else { + for (var k = 0, l = node.values.length; k < l; k++) { + result.push(next); + } + } + } + } + return; + } + if (store != -1) { + next = store.slice(); + for (var i = next.length; i < deep; i++) { + next.push(node); + } + } else { + next = []; + } + if (!isCross && BI.isArray(node.values)) { + next = next.concat(node.values); + } + if (isCross && BI.isArray(node.values)) { + for (var i = 0, len = node.values.length; i < len - 1; i++) { + if (next.length > 0) { + result.push(next); + } + } + } + if (next.length > 0) { + result.push(next); + } + } + + BI.each(nodes, function (i, node) { + track(-1, node); + }); + //填充空位 + BI.each(result, function (i, line) { + var last = BI.last(line); + for (var j = line.length; j < deep; j++) { + line.push(last); + } + }); + return result; + }, + + formatSummaryItems: function (items, header, crossItems, deep) { + //求纵向需要去除的列 + var cols = []; + var leaf = 0; + + function track(node) { + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child); + }); + if (BI.isNotEmptyArray(node.values)) { + if (node.children.length === 1) { + for (var i = 0; i < node.values.length; i++) { + cols.push(leaf + i + deep); + } + } + leaf += node.values.length; + } + return; + } + if (node.values && node.values.length > 1) { + leaf += node.values.length; + } else { + leaf++; + } + } + + BI.each(crossItems, function (i, node) { + track(node); + }); + + if (cols.length > 0) { + var nHeader = [], nItems = []; + BI.each(header, function (i, node) { + var nNode = node.slice(); + BI.removeAt(nNode, cols); + nHeader.push(nNode); + }); + BI.each(items, function (i, node) { + var nNode = node.slice(); + BI.removeAt(nNode, cols); + nItems.push(nNode);; + }); + header = nHeader; + items = nItems; + } + return {items: items, header: header, deletedCols: cols}; + } +}); + +BI.shortcut("bi.dynamic_summary_tree_table", BI.DynamicSummaryTreeTable);/** + * Created by GUY on 2016/5/7. + * @class BI.LayerTreeTableCell + * @extends BI.Single + */ +BI.LayerTreeTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-layer-tree-table-cell", + layer: 0, + text: "" + }) + }, + + _init: function () { + BI.LayerTreeTableCell.superclass._init.apply(this, arguments); + var o = this.options; + BI.createWidget({ + type: "bi.label", + element: this.element, + textAlign: "left", + whiteSpace: "nowrap", + height: o.height, + text: o.text, + value: o.value, + lgap: 5 + 30 * o.layer, + rgap: 5 + }) + } +}); + +BI.shortcut("bi.layer_tree_table_cell", BI.LayerTreeTableCell);/** + * + * 层级树状结构的表格 + * + * Created by GUY on 2016/5/7. + * @class BI.LayerTreeTable + * @extends BI.Widget + */ +BI.LayerTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-layer-tree-table", + el: { + type: "bi.resizable_table" + }, + + isNeedResize: false,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + rowHeaderCreator: null, + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _createHeader: function (vDeep) { + var self = this, o = this.options; + var header = o.header || [], crossHeader = o.crossHeader || []; + var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); + var result = []; + BI.each(items, function (row, node) { + var c = [crossHeader[row]]; + result.push(c.concat(node || [])); + }); + if (header && header.length > 0) { + var newHeader = this._formatColumns(header); + var deep = this._getHDeep(); + if (deep <= 0) { + newHeader.unshift(o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }); + } else { + newHeader[0] = o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }; + } + result.push(newHeader); + } + return result; + }, + + _formatItems: function (nodes) { + var self = this, o = this.options; + var result = []; + + function track(node, layer) { + node.type || (node.type = "bi.layer_tree_table_cell"); + node.layer = layer; + var next = [node]; + next = next.concat(node.values || []); + if (next.length > 0) { + result.push(next); + } + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child, layer + 1); + }); + } + } + + BI.each(nodes, function (i, node) { + BI.each(node.children, function (j, c) { + track(c, 0); + }); + if (BI.isArray(node.values)) { + var next = [{ + type: "bi.table_style_cell", text: BI.i18nText("BI-Summary_Values"), styleGetter: function () { + return o.summaryCellStyleGetter(true); + } + }].concat(node.values); + result.push(next) + } + }); + return result; + }, + + _formatColumns: function (columns, deep) { + if (BI.isNotEmptyArray(columns)) { + deep = deep || this._getHDeep(); + return columns.slice(Math.max(0, deep - 1)); + } + return columns; + }, + + _formatFreezeCols: function () { + if (this.options.freezeCols.length > 0) { + return [0]; + } + return []; + }, + + _formatColumnSize: function (columnSize, deep) { + if (columnSize.length <= 0) { + return []; + } + var result = [0]; + deep = deep || this._getHDeep(); + BI.each(columnSize, function (i, size) { + if (i < deep) { + result[0] += size; + return; + } + result.push(size); + }); + return result; + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + return { + header: this._createHeader(vDeep), + items: this._formatItems(o.items), + columnSize: this._formatColumnSize(o.columnSize, deep), + minColumnSize: this._formatColumns(o.minColumnSize, deep), + maxColumnSize: this._formatColumns(o.maxColumnSize, deep), + freezeCols: this._formatFreezeCols() + } + }, + + _init: function () { + BI.LayerTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: [], + mergeRule: o.mergeRule, + columnSize: data.columnSize, + minColumnSize: data.minColumnSize, + maxColumnSize: data.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + regionColumnSize: o.regionColumnSize, + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + setWidth: function (width) { + BI.LayerTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.LayerTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + var columnSize = this.table.getColumnSize(); + var deep = this._getHDeep(); + var pre = []; + if (deep > 0) { + pre = BI.makeArray(deep, columnSize[0] / deep); + } + return pre.concat(columnSize.slice(1)); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var self = this; + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self.attr(k, v); + }); + return; + } + BI.LayerTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "columnSize": + case "minColumnSize": + case "maxColumnSize": + case "freezeCols": + case "mergeCols": + return; + } + this.table.attr.apply(this.table, [key, value]); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + o.items = items || []; + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("freezeCols", data.freezeCols); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.LayerTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.shortcut("bi.layer_tree_table", BI.LayerTreeTable);/** + * + * Created by GUY on 2016/5/26. + * @class BI.TableStyleCell + * @extends BI.Single + */ +BI.TableStyleCell = BI.inherit(BI.Single, { + + _defaultConfig: function () { + return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-style-cell", + styleGetter: BI.emptyFn + }); + }, + + _init: function () { + BI.TableStyleCell.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + forceCenter: true, + hgap: 5, + text: o.text + }); + this._digestStyle(); + }, + + _digestStyle: function () { + var o = this.options; + var style = o.styleGetter(); + if (style) { + this.text.element.css(style); + } + }, + + setText: function (text) { + this.text.setText(text); + }, + + populate: function () { + this._digestStyle(); + } +}); +BI.shortcut('bi.table_style_cell', BI.TableStyleCell);/** + * + * 树状结构的表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableTree + * @extends BI.Widget + */ +BI.TableTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-tree", + el: { + type: "bi.resizable_table" + }, + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _init: function () { + BI.TableTree.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: o.columnSize, + minColumnSize: o.minColumnSize, + maxColumnSize: o.maxColumnSize, + + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: o.regionColumnSize, + + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _digest: function () { + var self = this, o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); + var items = BI.TableTree.formatItems(o.items, deep, false, o.summaryCellStyleGetter); + return { + header: header, + items: items + } + }, + + setWidth: function (width) { + BI.TableTree.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.TableTree.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this.table.setColumnSize(columnSize); + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function () { + BI.TableTree.superclass.attr.apply(this, arguments); + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items || []; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.TableTree.superclass.destroy.apply(this, arguments); + } +}); + +BI.extend(BI.TableTree, { + formatHeader: function (header, crossHeader, crossItems, hDeep, vDeep, styleGetter) { + var items = BI.TableTree.formatCrossItems(crossItems, vDeep, styleGetter); + var result = []; + for (var i = 0; i < vDeep; i++) { + var c = []; + for (var j = 0; j < hDeep; j++) { + c.push(crossHeader[i]); + } + result.push(c.concat(items[i] || [])); + } + if (header && header.length > 0) { + result.push(header); + } + return result; + }, + + formatItems: function (nodes, deep, isCross, styleGetter) { + var self = this; + var result = []; + + function track(store, node) { + var next; + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + var next; + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + track(next, child); + }); + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + if (/**(store == -1 || node.children.length > 1) &&**/ BI.isNotEmptyArray(node.values)) { + var summary = { + text: BI.i18nText("BI-Summary_Values"), + type: "bi.table_style_cell", + styleGetter: function () { + return styleGetter(store === -1) + } + }; + for (var i = next.length; i < deep; i++) { + next.push(summary); + } + if (!isCross) { + next = next.concat(node.values); + } + if (next.length > 0) { + if (!isCross) { + result.push(next); + } else { + for (var k = 0, l = node.values.length; k < l; k++) { + result.push(next); + } + } + } + } + + return; + } + if (store != -1) { + next = store.slice(); + for (var i = next.length; i < deep; i++) { + next.push(node); + } + } else { + next = []; + } + if (!isCross && BI.isArray(node.values)) { + next = next.concat(node.values); + } + if (isCross && BI.isArray(node.values)) { + for (var i = 0, len = node.values.length; i < len - 1; i++) { + if (next.length > 0) { + result.push(next); + } + } + } + if (next.length > 0) { + result.push(next); + } + } + + BI.each(nodes, function (i, node) { + track(-1, node); + }); + //填充空位 + BI.each(result, function (i, line) { + var last = BI.last(line); + for (var j = line.length; j < deep; j++) { + line.push(last); + } + }); + return result; + }, + + formatCrossItems: function (nodes, deep, styleGetter) { + var items = BI.TableTree.formatItems(nodes, deep, true, styleGetter); + return BI.unzip(items); + }, + + maxDeep: function (nodes) { + function track(deep, node) { + var d = deep; + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + d = Math.max(d, track(deep + 1, child)); + }); + } + return d; + } + + var deep = 1; + if (BI.isObject(nodes)) { + BI.each(nodes, function (i, node) { + deep = Math.max(deep, track(1, node)); + }); + } + return deep; + } +}); + +BI.shortcut("bi.tree_table", BI.TableTree);/** + * guy + * 复选导航条 + * Created by GUY on 2015/8/25. + * @class BI.MultiSelectBar + * @extends BI.BasicButton + */ +BI.MultiSelectBar = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multi-select-bar", + height: 25, + text: BI.i18nText('BI-Select_All'), + isAllCheckedBySelectedValue: BI.emptyFn, + //手动控制选中 + disableSelected: true, + isHalfCheckedBySelectedValue: function (selectedValues) { + return selectedValues.length > 0; + } + }) + }, + _init: function () { + BI.MultiSelectBar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox", + stopPropagation: true, + handler: function () { + self.setSelected(self.isSelected()); + } + }); + this.half = BI.createWidget({ + type: "bi.half_icon_button", + stopPropagation: true, + handler: function () { + self.setSelected(true); + } + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); + }); + this.half.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); + }); + this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); + }); + this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + BI.createWidget({ + type: "bi.htape", + element: this, + items: [{ + width: 36, + el: { + type: "bi.center_adapt", + items: [this.checkbox, this.half] + } + }, { + el: this.text + }] + }); + this.half.invisible(); + }, + + //自己手动控制选中 + beforeClick: function () { + var isHalf = this.isHalfSelected(), isSelected = this.isSelected(); + if (isHalf === true) { + this.setSelected(true); + } else { + this.setSelected(!isSelected); + } + }, + + setSelected: function (v) { + this.checkbox.setSelected(v); + this.setHalfSelected(false); + }, + + setHalfSelected: function (b) { + this._half = !!b; + if (b === true) { + this.half.visible(); + this.checkbox.invisible(); + } else { + this.half.invisible(); + this.checkbox.visible(); + } + }, + + isHalfSelected: function () { + return !!this._half; + }, + + isSelected: function () { + return this.checkbox.isSelected(); + }, + + setValue: function (selectedValues) { + BI.MultiSelectBar.superclass.setValue.apply(this, arguments); + var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments); + this.setSelected(isAllChecked); + !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments)); + } +}); +BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE"; +BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);/** + * 倒立的Branch + * @class BI.HandStandBranchExpander + * @extend BI.Widget + * create by young + */ +BI.HandStandBranchExpander = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-handstand-branch-expander", + direction: BI.Direction.Top, + logic: { + dynamic: true + }, + el: {type: "bi.label"}, + popup: {} + }) + }, + + _init: function () { + BI.HandStandBranchExpander.superclass._init.apply(this, arguments); + var o = this.options; + this._initExpander(); + this._initBranchView(); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, { + type: "bi.center_adapt", + items: [this.expander] + }, this.branchView) + })))); + }, + + _initExpander: function () { + var self = this, o = this.options; + this.expander = BI.createWidget(o.el); + this.expander.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + _initBranchView: function () { + var self = this, o = this.options; + this.branchView = BI.createWidget(o.popup, {}); + this.branchView.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + populate: function (items) { + this.branchView.populate.apply(this.branchView, arguments); + }, + + getValue: function () { + return this.branchView.getValue(); + } +}); +BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/** + * @class BI.BranchExpander + * @extend BI.Widget + * create by young + */ +BI.BranchExpander = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-expander", + direction: BI.Direction.Left, + logic: { + dynamic: true + }, + el: {}, + popup: {} + }) + }, + + _init: function () { + BI.BranchExpander.superclass._init.apply(this, arguments); + var o = this.options; + this._initExpander(); + this._initBranchView(); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView) + })))); + }, + + _initExpander: function () { + var self = this, o = this.options; + this.expander = BI.createWidget(o.el, { + type: "bi.label", + width: 30, + height: "100%" + }); + this.expander.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + _initBranchView: function () { + var self = this, o = this.options; + this.branchView = BI.createWidget(o.popup, {}); + this.branchView.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + populate: function (items) { + this.branchView.populate.apply(this.branchView, arguments); + }, + + getValue: function () { + return this.branchView.getValue(); + } +}); +BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.branch_expander", BI.BranchExpander);/** + * @class BI.HandStandBranchTree + * @extends BI.Widget + * create by young + * 横向分支的树 + */ +BI.HandStandBranchTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-handstand-branch-tree", + expander: {}, + el: {}, + items: [] + }) + }, + _init: function () { + BI.HandStandBranchTree.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.branchTree = BI.createWidget({ + type: "bi.custom_tree", + element: this, + expander: BI.extend({ + type: "bi.handstand_branch_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: BI.extend({ + type: "bi.button_tree", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + layouts: [{ + type: "bi.horizontal_adapt" + }] + }, o.el), + items: this.options.items + }); + this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ + self.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE, arguments); + }); + this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + populate: function () { + this.branchTree.populate.apply(this.branchTree, arguments); + }, + + getValue: function () { + return this.branchTree.getValue(); + } +}); +BI.HandStandBranchTree.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.handstand_branch_tree", BI.HandStandBranchTree);/** + * @class BI.BranchTree + * @extends BI.Widget + * create by young + * 横向分支的树 + */ +BI.BranchTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-tree", + expander: {}, + el: {}, + items: [] + }) + }, + _init: function () { + BI.BranchTree.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.branchTree = BI.createWidget({ + type: "bi.custom_tree", + element: this, + expander: BI.extend({ + type: "bi.branch_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: BI.extend({ + type: "bi.button_tree", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + layouts: [{ + type: "bi.vertical" + }] + }, o.el), + items: this.options.items + }); + this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ + self.fireEvent(BI.BranchTree.EVENT_CHANGE, arguments); + }); + this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + populate: function () { + this.branchTree.populate.apply(this.branchTree, arguments); + }, + + getValue: function () { + return this.branchTree.getValue(); + } +}); +BI.BranchTree.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.branch_tree", BI.BranchTree);/** + * guy + * 异步树 + * @class BI.DisplayTree + * @extends BI.TreeView + */ +BI.DisplayTree = BI.inherit(BI.TreeView, { + _defaultConfig: function () { + return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-display-tree" + }) + }, + _init: function () { + BI.DisplayTree.superclass._init.apply(this, arguments); + }, + + //配置属性 + _configSetting: function () { + var setting = { + view: { + selectedMulti: false, + dblClickExpand: false, + showIcon: false, + showTitle: false + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + callback: { + beforeCollapse: beforeCollapse + } + }; + + function beforeCollapse(treeId, treeNode) { + return false; + } + + return setting; + }, + + _dealWidthNodes: function (nodes) { + nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); + var self = this, o = this.options; + BI.each(nodes, function (i, node) { + if (node.count > 0) { + node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; + } else { + node.text = node.value; + } + }); + return nodes; + }, + + initTree: function (nodes, setting) { + var setting = setting || this._configSetting(); + this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); + }, + + destroy: function () { + BI.DisplayTree.superclass.destroy.apply(this, arguments); + } +}); +BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.display_tree", BI.DisplayTree);/** + * guy + * 二级树 + * @class BI.LevelTree + * @extends BI.Single + */ +BI.LevelTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-level-tree", + el: { + chooseType: 0 + }, + expander: {}, + items: [] + }) + }, + + _init: function () { + BI.LevelTree.superclass._init.apply(this, arguments); + + this.initTree(this.options.items); + }, + + _formatItems: function (nodes, layer) { + var self = this; + BI.each(nodes, function (i, node) { + var extend = {layer: layer}; + if (!BI.isKey(node.id)) { + node.id = BI.UUID(); + } + if (node.isParent === true || BI.isNotEmptyArray(node.children)) { + switch (i) { + case 0 : + extend.type = "bi.first_plus_group_node"; + break; + case nodes.length - 1 : + extend.type = "bi.last_plus_group_node"; + break; + default : + extend.type = "bi.mid_plus_group_node"; + break; + } + BI.defaults(node, extend); + self._formatItems(node.children, layer + 1); + } else { + switch (i) { + case nodes.length - 1: + extend.type = "bi.last_tree_leaf_item"; + break; + default : + extend.type = "bi.mid_tree_leaf_item"; + } + BI.defaults(node, extend); + } + }); + return nodes; + }, + + _assertId: function (sNodes) { + BI.each(sNodes, function (i, node) { + if (!BI.isKey(node.id)) { + node.id = BI.UUID(); + } + }); + }, + + //构造树结构, + initTree: function (nodes) { + var self = this, o = this.options; + this.empty(); + this._assertId(nodes); + this.tree = BI.createWidget({ + type: "bi.custom_tree", + element: this, + expander: BI.extend({ + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + + items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), + + el: BI.extend({ + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + }, o.el) + }); + this.tree.on(BI.Controller.EVENT_CHANGE, function (type) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.LevelTree.EVENT_CHANGE, arguments); + } + }) + }, + + //生成树方法 + stroke: function (nodes) { + this.tree.stroke.apply(this.tree, arguments); + }, + + populate: function (items) { + items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0); + this.tree.populate(items); + }, + + setValue: function (v) { + this.tree.setValue(v); + }, + + getValue: function () { + return this.tree.getValue(); + }, + + getAllLeaves: function () { + return this.tree.getAllLeaves(); + }, + + getNodeById: function (id) { + return this.tree.getNodeById(id); + }, + + getNodeByValue: function (id) { + return this.tree.getNodeByValue(id); + } +}); +BI.LevelTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.level_tree", BI.LevelTree);/** + * 简单的多选树 + * + * Created by GUY on 2016/2/16. + * @class BI.SimpleTreeView + * @extends BI.Widget + */ +BI.SimpleTreeView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-simple-tree", + itemsCreator: BI.emptyFn, + items: null + }) + }, + _init: function () { + BI.SimpleTreeView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.structure = new BI.Tree(); + this.tree = BI.createWidget({ + type: "bi.tree_view", + element: this, + itemsCreator: function (op, callback) { + var fn = function (items) { + callback({ + items: items + }); + self.structure.initTree(BI.Tree.transformToTreeFormat(items)); + }; + if (BI.isNotNull(o.items)) { + fn(o.items); + } else { + o.itemsCreator(op, fn); + } + } + }); + this.tree.on(BI.TreeView.EVENT_CHANGE, function () { + self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments); + }); + if (BI.isNotEmptyArray(o.items)) { + this.populate(); + } + }, + + populate: function (items, keyword) { + if (items) { + this.options.items = items; + } + this.tree.stroke({ + keyword: keyword + }); + }, + + setValue: function (v) { + v || (v = []); + var self = this, map = {}; + var selected = []; + BI.each(v, function (i, val) { + var node = self.structure.search(val, "value"); + if (node) { + var p = node; + p = p.getParent(); + if (p) { + if (!map[p.value]) { + map[p.value] = 0; + } + map[p.value]++; + } + + while (p && p.getChildrenLength() <= map[p.value]) { + selected.push(p.value); + p = p.getParent(); + if (p) { + if (!map[p.value]) { + map[p.value] = 0; + } + map[p.value]++; + } + } + } + }); + + this.tree.setValue(BI.makeObject(v.concat(selected))); + }, + + _getValue: function () { + var self = this, result = [], val = this.tree.getValue(); + var track = function (nodes) { + BI.each(nodes, function (key, node) { + if (BI.isEmpty(node)) { + result.push(key); + } else { + track(node); + } + }) + }; + track(val); + return result; + }, + + empty: function () { + this.tree.empty(); + }, + + getValue: function () { + var self = this, result = [], val = this._getValue(); + BI.each(val, function (i, key) { + var target = self.structure.search(key, "value"); + if (target) { + self.structure._traverse(target, function (node) { + if (node.isLeaf()) { + result.push(node.value); + } + }) + } + }); + return result; + } +}); +BI.SimpleTreeView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.simple_tree", BI.SimpleTreeView); /** * 文本输入框trigger * @@ -12517,254 +12517,254 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, { } }); BI.EditorTrigger.EVENT_CHANGE = "BI.EditorTrigger.EVENT_CHANGE"; -BI.shortcut("bi.editor_trigger", BI.EditorTrigger);/** - * 图标按钮trigger - * - * Created by GUY on 2015/10/8. - * @class BI.IconTrigger - * @extends BI.Trigger - */ -BI.IconTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-trigger", - el: {}, - height: 30 - }); - }, - _init: function () { - var o = this.options; - BI.IconTrigger.superclass._init.apply(this, arguments); - this.iconButton = BI.createWidget(o.el, { - type: "bi.trigger_icon_button", - element: this, - width: o.width, - height: o.height - }); - } -}); -BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** - * 文字trigger - * - * Created by GUY on 2015/9/15. - * @class BI.TextTrigger - * @extends BI.Trigger - */ -BI.TextTrigger = BI.inherit(BI.Trigger, { - _const: { - hgap: 4, - triggerWidth: 30 - }, - - _defaultConfig: function () { - var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-trigger", - height: 30 - }); - }, - - _init: function () { - BI.TextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - height: o.height, - text: o.text, - hgap: c.hgap - }); - this.trigerButton = BI.createWidget({ - type: "bi.trigger_icon_button", - cls: "bi-border-left", - width: c.triggerWidth - }); - - BI.createWidget({ - element: this, - type: 'bi.htape', - items: [ - { - el: this.text - }, { - el: this.trigerButton, - width: c.triggerWidth - } - ] - }); - }, - - setValue: function (value) { - this.text.setValue(value); - this.text.setTitle(value); - }, - - setText: function (text) { - this.text.setText(text); - this.text.setTitle(text); - } -}); -BI.shortcut("bi.text_trigger", BI.TextTrigger);/** - * 选择字段trigger - * - * Created by GUY on 2015/9/15. - * @class BI.SelectTextTrigger - * @extends BI.Trigger - */ -BI.SelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-select-text-trigger bi-border", - height: 24 - }); - }, - - _init: function () { - this.options.height -= 2; - BI.SelectTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.text_trigger", - element: this, - height: o.height - }); - if (BI.isKey(o.text)) { - this.setValue(o.text); - } - }, - - setValue: function (vals) { - var o = this.options; - vals = BI.isArray(vals) ? vals : [vals]; - var result = []; - var items = BI.Tree.transformToArrayFormat(this.options.items); - BI.each(items, function (i, item) { - if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { - result.push(item.text || item.value); - } - }); - - if (result.length > 0) { - this.trigger.setText(result.join(",")); - } else { - this.trigger.setText(o.text); - } - }, - - populate: function (items) { - this.options.items = items; - } -}); -BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** - * 选择字段trigger小一号的 - * - * @class BI.SmallSelectTextTrigger - * @extends BI.Trigger - */ -BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-small-select-text-trigger bi-border", - height: 20 - }); - }, - - _init: function () { - this.options.height -= 2; - BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.small_text_trigger", - element: this, - height: o.height - 2 - }); - if (BI.isKey(o.text)) { - this.setValue(o.text); - } - }, - - setValue: function (vals) { - var o = this.options; - vals = BI.isArray(vals) ? vals : [vals]; - var result = []; - var items = BI.Tree.transformToArrayFormat(this.options.items); - BI.each(items, function (i, item) { - if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { - result.push(item.text || item.value); - } - }); - - if (result.length > 0) { - this.trigger.element.removeClass("bi-water-mark"); - this.trigger.setText(result.join(",")); - } else { - this.trigger.element.addClass("bi-water-mark"); - this.trigger.setText(o.text); - } - }, - - populate: function (items) { - this.options.items = items; - } -}); -BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);/** - * 文字trigger(右边小三角小一号的) == - * - * @class BI.SmallTextTrigger - * @extends BI.Trigger - */ -BI.SmallTextTrigger = BI.inherit(BI.Trigger, { - _const: { - hgap: 4, - triggerWidth: 20 - }, - - _defaultConfig: function () { - var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-trigger", - height: 20 - }); - }, - - _init: function () { - BI.SmallTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - height: o.height, - text: o.text, - hgap: c.hgap - }); - this.trigerButton = BI.createWidget({ - type: "bi.trigger_icon_button", - width: c.triggerWidth - }); - - BI.createWidget({ - element: this, - type: 'bi.htape', - items: [ - { - el: this.text - }, { - el: this.trigerButton, - width: c.triggerWidth - } - ] - }); - }, - - setValue: function (value) { - this.text.setValue(value); - }, - - setText: function (text) { - this.text.setText(text); - } -}); +BI.shortcut("bi.editor_trigger", BI.EditorTrigger);/** + * 图标按钮trigger + * + * Created by GUY on 2015/10/8. + * @class BI.IconTrigger + * @extends BI.Trigger + */ +BI.IconTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-trigger", + el: {}, + height: 30 + }); + }, + _init: function () { + var o = this.options; + BI.IconTrigger.superclass._init.apply(this, arguments); + this.iconButton = BI.createWidget(o.el, { + type: "bi.trigger_icon_button", + element: this, + width: o.width, + height: o.height + }); + } +}); +BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.TextTrigger + * @extends BI.Trigger + */ +BI.TextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.TextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [ + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.text_trigger", BI.TextTrigger);/** + * 选择字段trigger + * + * Created by GUY on 2015/9/15. + * @class BI.SelectTextTrigger + * @extends BI.Trigger + */ +BI.SelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-select-text-trigger bi-border", + height: 24 + }); + }, + + _init: function () { + this.options.height -= 2; + BI.SelectTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.text_trigger", + element: this, + height: o.height + }); + if (BI.isKey(o.text)) { + this.setValue(o.text); + } + }, + + setValue: function (vals) { + var o = this.options; + vals = BI.isArray(vals) ? vals : [vals]; + var result = []; + var items = BI.Tree.transformToArrayFormat(this.options.items); + BI.each(items, function (i, item) { + if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { + result.push(item.text || item.value); + } + }); + + if (result.length > 0) { + this.trigger.setText(result.join(",")); + } else { + this.trigger.setText(o.text); + } + }, + + populate: function (items) { + this.options.items = items; + } +}); +BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** + * 选择字段trigger小一号的 + * + * @class BI.SmallSelectTextTrigger + * @extends BI.Trigger + */ +BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-small-select-text-trigger bi-border", + height: 20 + }); + }, + + _init: function () { + this.options.height -= 2; + BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.small_text_trigger", + element: this, + height: o.height - 2 + }); + if (BI.isKey(o.text)) { + this.setValue(o.text); + } + }, + + setValue: function (vals) { + var o = this.options; + vals = BI.isArray(vals) ? vals : [vals]; + var result = []; + var items = BI.Tree.transformToArrayFormat(this.options.items); + BI.each(items, function (i, item) { + if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { + result.push(item.text || item.value); + } + }); + + if (result.length > 0) { + this.trigger.element.removeClass("bi-water-mark"); + this.trigger.setText(result.join(",")); + } else { + this.trigger.element.addClass("bi-water-mark"); + this.trigger.setText(o.text); + } + }, + + populate: function (items) { + this.options.items = items; + } +}); +BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);/** + * 文字trigger(右边小三角小一号的) == + * + * @class BI.SmallTextTrigger + * @extends BI.Trigger + */ +BI.SmallTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 20 + }, + + _defaultConfig: function () { + var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 20 + }); + }, + + _init: function () { + BI.SmallTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [ + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + }, + + setText: function (text) { + this.text.setText(text); + } +}); BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger); \ No newline at end of file diff --git a/bi/slider.js b/bi/slider.js index 4d6770f4b..bc751db5a 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -1,17 +1,17 @@ /** * Created by zcf on 2016/9/22. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderButton = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-button-button" + baseCls: "bi-single-slider-button" }); }, _init: function () { BI.extend(BI.Slider.superclass._init.apply(this, arguments)); this.slider = BI.createWidget({ type: "bi.icon_button", - cls: "widget-button-icon button-button", + cls: "widget-slider-icon slider-button", iconWidth: 14, iconHeight: 14, height: 14, @@ -30,7 +30,7 @@ BI.Slider = BI.inherit(BI.Widget, { }); } }); -BI.shortcut("bi.single_slider_slider", BI.Slider);/** +BI.shortcut("bi.single_slider_button", BI.SliderButton);/** * Created by zcf on 2016/9/22. */ BI.SingleSlider = BI.inherit(BI.Widget, { @@ -69,7 +69,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { this.track = this._createTrackWrapper(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", @@ -338,7 +338,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { var c = this._constant; var track = this._createTrack(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", diff --git a/demo/js/widget/slider/demo.slider.js b/demo/js/widget/slider/demo.slider.js index 6a5e377e3..6412a351f 100644 --- a/demo/js/widget/slider/demo.slider.js +++ b/demo/js/widget/slider/demo.slider.js @@ -11,32 +11,67 @@ Demo.Slider = BI.inherit(BI.Widget, { }, _init: function () { Demo.Slider.superclass._init.apply(this, arguments); - var self = this; - BI.createWidget({ - type: "bi.vertical_adapt", - element: this, + + var slider = BI.createWidget({ + type: "bi.slider", + min: 16, + max: 50, width: 100, - items: [{ - type: "bi.htape", - items: [{ - el: { - type: "bi.slider", - min: 16, - max: 50, - ref: function (_ref) { - self.slider = _ref; - } - } - }], - height: 30, - width: 100 - }] + height: 50 }); - this.slider.setValue("30"); - this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () { + slider.setValue("30"); + + slider.on(BI.SliderNormal.EVENT_CHANGE, function () { console.log(this.getValue()); - }) + }); + + var singleSlider = BI.createWidget({ + type: "bi.single_slider", + min: 16, + max: 50 + }); + + singleSlider.populate(); + + var normalSingleSlider = BI.createWidget({ + type: "bi.single_slider_normal", + min: 16, + max: 50 + }); + + normalSingleSlider.populate(); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + items: [{ + el: slider + }] + }, + height: 200 + }, { + el: { + type: "bi.center_adapt", + items: [{ + el: singleSlider + }] + }, + height: 200 + }, { + el: { + type: "bi.center_adapt", + items: [{ + el: normalSingleSlider + }] + }, + height: 200 + }], + hgap: 20 + }); } }); BI.shortcut("demo.slider", Demo.Slider); \ No newline at end of file diff --git a/dist/demo.js b/dist/demo.js index 866d02553..df5e44441 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -4487,7 +4487,41 @@ Demo.BorderLayout = BI.inherit(BI.Widget, { } } }); -BI.shortcut("demo.border", Demo.BorderLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, { +BI.shortcut("demo.border", Demo.BorderLayout);/** + * Created by User on 2017/3/22. + */ +Demo.CenterLayout = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-center" + }, + render: function () { + return { + type: "bi.center", + items: [{ + type: "bi.label", + text: "Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局", + cls: "layout-bg1", + whiteSpace: "normal" + },{ + type: "bi.label", + text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", + cls: "layout-bg2", + whiteSpace: "normal" + },{ + type: "bi.label", + text: "Center 3", + cls: "layout-bg3" + },{ + type: "bi.label", + text: "Center 4", + cls: "layout-bg5" + }], + hgap: 20, + vgap: 20 + } + } +}); +BI.shortcut("demo.center_layout", Demo.CenterLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, { props: { baseCls: "demo-absolute" }, @@ -4570,40 +4604,6 @@ BI.shortcut("demo.border", Demo.BorderLayout);Demo.CenterAdapt = BI.inherit(BI.W BI.shortcut("demo.center_adapt", Demo.CenterAdapt);/** * Created by User on 2017/3/22. */ -Demo.CenterLayout = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-center" - }, - render: function () { - return { - type: "bi.center", - items: [{ - type: "bi.label", - text: "Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局", - cls: "layout-bg1", - whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", - cls: "layout-bg2", - whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 3", - cls: "layout-bg3" - },{ - type: "bi.label", - text: "Center 4", - cls: "layout-bg5" - }], - hgap: 20, - vgap: 20 - } - } -}); -BI.shortcut("demo.center_layout", Demo.CenterLayout);/** - * Created by User on 2017/3/22. - */ Demo.FloatCenterLayout = BI.inherit(BI.Widget, { props: { baseCls: "demo-float-center" @@ -4848,6 +4848,55 @@ Demo.GridLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.grid", Demo.GridLayout);/** + * Created by User on 2017/3/21. + */ +Demo.Horizontal = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-horizontal" + }, + render: function () { + return { + type: "bi.vertical", + items: [{ + type: "bi.horizontal", + items: [{ + type: "bi.absolute", + items: [{ + el: { + type: "bi.text_button", + cls: "layout-bg1", + text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", + height: 30 + }, + left: 0, + right: 0 + }], + width: 100, + height: 30 + }, { + type: "bi.absolute", + items: [{ + el: { + type: "bi.text_button", + cls: "layout-bg2", + text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", + height: 30 + }, + left: 0, + right: 0 + }], + width: 200, + height: 30 + }] + }], + lgap: 20, + rgap: 80, + tgap: 80, + bgap: 50 + } + } +}); +BI.shortcut("demo.horizontal", Demo.Horizontal);/** * Created by User on 2017/3/22. */ Demo.HorizontalAdapt = BI.inherit(BI.Widget, { @@ -4964,55 +5013,6 @@ Demo.HorizontalFloat = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.horizontal_float", Demo.HorizontalFloat);/** - * Created by User on 2017/3/21. - */ -Demo.Horizontal = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-horizontal" - }, - render: function () { - return { - type: "bi.vertical", - items: [{ - type: "bi.horizontal", - items: [{ - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg1", - text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", - height: 30 - }, - left: 0, - right: 0 - }], - width: 100, - height: 30 - }, { - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg2", - text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", - height: 30 - }, - left: 0, - right: 0 - }], - width: 200, - height: 30 - }] - }], - lgap: 20, - rgap: 80, - tgap: 80, - bgap: 50 - } - } -}); -BI.shortcut("demo.horizontal", Demo.Horizontal);/** * Created by User on 2017/3/22. */ Demo.HtapeLayout = BI.inherit(BI.Widget, { @@ -5358,6 +5358,30 @@ Demo.TdLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.td", Demo.TdLayout);/** + * Created by User on 2017/3/21. + */ +Demo.VerticalLayout = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-vertical" + }, + render: function () { + return { + type: "bi.vertical", + items: [{ + type: "bi.label", + cls: "layout-bg1", + text: "这里设置了hgap(水平间距),vgap(垂直间距)", + height: 30 + }, { + type: "bi.label", + cls: "layout-bg2", + text: "这里设置了hgap(水平间距),vgap(垂直间距)", + height: 30 + }] + } + } +}); +BI.shortcut("demo.vertical", Demo.VerticalLayout);/** * Created by User on 2017/3/22. */ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, { @@ -5399,30 +5423,6 @@ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.vertical_adapt", Demo.VerticalAdaptLayout);/** - * Created by User on 2017/3/21. - */ -Demo.VerticalLayout = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-vertical" - }, - render: function () { - return { - type: "bi.vertical", - items: [{ - type: "bi.label", - cls: "layout-bg1", - text: "这里设置了hgap(水平间距),vgap(垂直间距)", - height: 30 - }, { - type: "bi.label", - cls: "layout-bg2", - text: "这里设置了hgap(水平间距),vgap(垂直间距)", - height: 30 - }] - } - } -}); -BI.shortcut("demo.vertical", Demo.VerticalLayout);/** * Created by User on 2017/3/22. */ Demo.VtapeLayout = BI.inherit(BI.Widget, { @@ -8445,32 +8445,67 @@ Demo.Slider = BI.inherit(BI.Widget, { }, _init: function () { Demo.Slider.superclass._init.apply(this, arguments); - var self = this; - BI.createWidget({ - type: "bi.vertical_adapt", - element: this, + + var slider = BI.createWidget({ + type: "bi.slider", + min: 16, + max: 50, width: 100, - items: [{ - type: "bi.htape", - items: [{ - el: { - type: "bi.slider", - min: 16, - max: 50, - ref: function (_ref) { - self.slider = _ref; - } - } - }], - height: 30, - width: 100 - }] + height: 50 }); - this.slider.setValue("30"); - this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () { + slider.setValue("30"); + + slider.on(BI.SliderNormal.EVENT_CHANGE, function () { console.log(this.getValue()); - }) + }); + + var singleSlider = BI.createWidget({ + type: "bi.single_slider", + min: 16, + max: 50 + }); + + singleSlider.populate(); + + var normalSingleSlider = BI.createWidget({ + type: "bi.single_slider_normal", + min: 16, + max: 50 + }); + + normalSingleSlider.populate(); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + items: [{ + el: slider + }] + }, + height: 200 + }, { + el: { + type: "bi.center_adapt", + items: [{ + el: singleSlider + }] + }, + height: 200 + }, { + el: { + type: "bi.center_adapt", + items: [{ + el: normalSingleSlider + }] + }, + height: 200 + }], + hgap: 20 + }); } }); BI.shortcut("demo.slider", Demo.Slider);/** diff --git a/dist/slider.js b/dist/slider.js index 4d6770f4b..bc751db5a 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -1,17 +1,17 @@ /** * Created by zcf on 2016/9/22. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderButton = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-button-button" + baseCls: "bi-single-slider-button" }); }, _init: function () { BI.extend(BI.Slider.superclass._init.apply(this, arguments)); this.slider = BI.createWidget({ type: "bi.icon_button", - cls: "widget-button-icon button-button", + cls: "widget-slider-icon slider-button", iconWidth: 14, iconHeight: 14, height: 14, @@ -30,7 +30,7 @@ BI.Slider = BI.inherit(BI.Widget, { }); } }); -BI.shortcut("bi.single_slider_slider", BI.Slider);/** +BI.shortcut("bi.single_slider_button", BI.SliderButton);/** * Created by zcf on 2016/9/22. */ BI.SingleSlider = BI.inherit(BI.Widget, { @@ -69,7 +69,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { this.track = this._createTrackWrapper(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", @@ -338,7 +338,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { var c = this._constant; var track = this._createTrack(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", diff --git a/src/addons/slider/slider/singleslider/button/iconbutton.slider.js b/src/addons/slider/slider/singleslider/button/iconbutton.slider.js index bdf0a2c35..fc8906124 100644 --- a/src/addons/slider/slider/singleslider/button/iconbutton.slider.js +++ b/src/addons/slider/slider/singleslider/button/iconbutton.slider.js @@ -1,17 +1,17 @@ /** * Created by zcf on 2016/9/22. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderButton = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-button-button" + baseCls: "bi-single-slider-button" }); }, _init: function () { BI.extend(BI.Slider.superclass._init.apply(this, arguments)); this.slider = BI.createWidget({ type: "bi.icon_button", - cls: "widget-button-icon button-button", + cls: "widget-slider-icon slider-button", iconWidth: 14, iconHeight: 14, height: 14, @@ -30,4 +30,4 @@ BI.Slider = BI.inherit(BI.Widget, { }); } }); -BI.shortcut("bi.single_slider_slider", BI.Slider); \ No newline at end of file +BI.shortcut("bi.single_slider_button", BI.SliderButton); \ No newline at end of file diff --git a/src/addons/slider/slider/singleslider/singleslider.js b/src/addons/slider/slider/singleslider/singleslider.js index ac70baa2c..025f24fd0 100644 --- a/src/addons/slider/slider/singleslider/singleslider.js +++ b/src/addons/slider/slider/singleslider/singleslider.js @@ -37,7 +37,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { this.track = this._createTrackWrapper(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", diff --git a/src/addons/slider/slider/singleslider/singleslider.normal.js b/src/addons/slider/slider/singleslider/singleslider.normal.js index ef591e52f..769089f77 100644 --- a/src/addons/slider/slider/singleslider/singleslider.normal.js +++ b/src/addons/slider/slider/singleslider/singleslider.normal.js @@ -28,7 +28,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { var c = this._constant; var track = this._createTrack(); this.slider = BI.createWidget({ - type: "bi.single_slider_slider" + type: "bi.single_slider_button" }); this.slider.element.draggable({ axis: "x", From a2490b20f10ee18a2b3ad9282f441df02b034b59 Mon Sep 17 00:00:00 2001 From: imp <imp@fanruan.com> Date: Tue, 12 Sep 2017 15:42:22 +0800 Subject: [PATCH 06/14] update --- Gruntfile.js | 2 +- bi/case.js | 75 ++ bi/slider.js | 799 ------------------ demo/js/widget/slider/demo.slider.js | 40 +- dist/demo.js | 40 +- dist/slider.js | 255 +----- .../singleslider/button/iconbutton.slider.js | 8 +- .../{slider => }/singleslider/singleslider.js | 2 +- .../singleslider/singleslider.normal.js | 0 src/addons/slider/slider/slider.button.js | 44 - src/addons/slider/slider/slider.js | 201 ----- 11 files changed, 117 insertions(+), 1349 deletions(-) rename src/addons/slider/{slider => }/singleslider/button/iconbutton.slider.js (70%) rename src/addons/slider/{slider => }/singleslider/singleslider.js (99%) rename src/addons/slider/{slider => }/singleslider/singleslider.normal.js (100%) delete mode 100644 src/addons/slider/slider/slider.button.js delete mode 100644 src/addons/slider/slider/slider.js diff --git a/Gruntfile.js b/Gruntfile.js index 30f18a642..e45eaaaec 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -83,7 +83,7 @@ module.exports = function (grunt) { }, sliderJs: { src: [ - 'src/addons/slider/slider/**/*.js' + 'src/addons/slider/singleslider/**/*.js' ], dest: 'dist/slider.js' }, diff --git a/bi/case.js b/bi/case.js index 5a102525e..7f196ca75 100644 --- a/bi/case.js +++ b/bi/case.js @@ -12545,6 +12545,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, { } }); BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.IconTextTrigger + * @extends BI.Trigger + */ +BI.IconTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.IconTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [{ + el: { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + ref: function (_ref) { + self.icon = _ref; + }, + disableSelected: true + }, + width: 24 + }, + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setIcon: function (iconCls) { + this.icon.setIcon(iconCls); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** * 文字trigger * * Created by GUY on 2015/9/15. diff --git a/bi/slider.js b/bi/slider.js index d28871148..e69de29bb 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -1,799 +0,0 @@ -/** - * Created by zcf on 2016/9/22. - */ -BI.SliderButton = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider-button" - }); - }, - _init: function () { - BI.extend(BI.Slider.superclass._init.apply(this, arguments)); - this.slider = BI.createWidget({ - type: "bi.icon_button", - cls: "widget-slider-icon slider-button", - iconWidth: 14, - iconHeight: 14, - height: 14, - width: 14 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.slider, - top: 7, - left: -7 - }], - width: 0, - height: 14 - }); - } -}); -BI.shortcut("bi.single_slider_button", BI.SliderButton);/** - * Created by zcf on 2016/9/22. - */ -BI.SingleSlider = BI.inherit(BI.Widget, { - _constant: { - EDITOR_WIDTH: 90, - EDITOR_HEIGHT: 30, - HEIGHT: 28, - SLIDER_WIDTH_HALF: 15, - SLIDER_WIDTH: 30, - SLIDER_HEIGHT: 30, - TRACK_HEIGHT: 24 - }, - _defaultConfig: function () { - return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track" - }); - }, - _init: function () { - BI.SingleSlider.superclass._init.apply(this, arguments); - - var self = this; - var c = this._constant; - this.enable = false; - this.value = ""; - - this.grayTrack = BI.createWidget({ - type: "bi.layout", - cls: "gray-track", - height: 6 - }); - this.blueTrack = BI.createWidget({ - type: "bi.layout", - cls: "blue-track bi-high-light-background", - height: 6 - }); - this.track = this._createTrackWrapper(); - - this.slider = BI.createWidget({ - type: "bi.single_slider_button" - }); - this.slider.element.draggable({ - axis: "x", - containment: this.grayTrack.element, - scroll: false, - drag: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 - self._setBlueTrack(significantPercent); - self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.label.setValue(v); - self.value = v; - }, - stop: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); - } - }); - var sliderVertical = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [this.slider] - }], - hgap: c.SLIDER_WIDTH_HALF, - height: c.SLIDER_HEIGHT - }); - sliderVertical.element.click(function (e) { - if (self.enable) { - var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; - var trackLength = self.track.element[0].scrollWidth; - var percent = 0; - if (offset < 0) { - percent = 0 - } - if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { - percent = offset * 100 / self._getGrayTrackLength(); - } - if (offset > (trackLength - c.SLIDER_WIDTH)) { - percent = 100 - } - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.label.setValue(v); - self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); - } - }); - this.label = BI.createWidget({ - type: "bi.sign_editor", - cls: "slider-editor-button bi-border", - errorText: "", - height: c.HEIGHT, - width: c.EDITOR_WIDTH, - allowBlank: false, - validationChecker: function (v) { - return self._checkValidation(v); - }, - quitChecker: function (v) { - return self._checkValidation(v); - } - }); - this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var v = BI.parseFloat(this.getValue()); - self.value = v; - var percent = self._getPercentByValue(v); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setAllPosition(significantPercent); - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); - }); - this._setVisible(false); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.track, - width: "100%", - height: c.TRACK_HEIGHT - }] - }], - hgap: 7, - height: c.TRACK_HEIGHT - }, - top: 33, - left: 0, - width: "100%" - }, { - el: sliderVertical, - top: 30, - left: 0, - width: "100%" - }, { - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [this.label] - }], - rgap: c.EDITOR_WIDTH, - height: c.EDITOR_HEIGHT - }, - top: 0, - left: 0, - width: "100%" - }] - }) - }, - - _createTrackWrapper: function () { - return BI.createWidget({ - type: "bi.absolute", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.grayTrack, - top: 0, - left: 0, - width: "100%" - }, { - el: this.blueTrack, - top: 0, - left: 0, - width: "0%" - }] - }], - hgap: 8, - height: 8 - }, - top: 8, - left: 0, - width: "100%" - }] - }) - }, - - _checkValidation: function (v) { - return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max) - }, - - _setBlueTrack: function (percent) { - this.blueTrack.element.css({"width": percent + "%"}); - }, - - _setLabelPosition: function (percent) { - this.label.element.css({"left": percent + "%"}); - }, - - _setSliderPosition: function (percent) { - this.slider.element.css({"left": percent + "%"}); - }, - - _setAllPosition: function (percent) { - this._setSliderPosition(percent); - this._setLabelPosition(percent); - this._setBlueTrack(percent); - }, - - _setVisible: function (visible) { - this.slider.setVisible(visible); - this.label.setVisible(visible); - }, - - _getGrayTrackLength: function () { - return this.grayTrack.element[0].scrollWidth - }, - - _getValueByPercent: function (percent) { - var thousandth = BI.parseInt(percent * 10); - return (((this.max - this.min) * thousandth) / 1000 + this.min); - }, - - _getPercentByValue: function (v) { - return (v - this.min) * 100 / (this.max - this.min); - }, - - getValue: function () { - return this.value; - }, - - setValue: function (v) { - var value = BI.parseFloat(v); - if ((!isNaN(value))) { - if (this._checkValidation(value)) { - this.value = value; - } - if (value > this.max) { - this.value = this.max; - } - if (value < this.min) { - this.value = this.min; - } - } - }, - - setMinAndMax: function (v) { - var minNumber = BI.parseFloat(v.min); - var maxNumber = BI.parseFloat(v.max); - if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { - this.min = minNumber; - this.max = maxNumber; - } - }, - - reset: function () { - this._setVisible(false); - this.enable = false; - this.value = ""; - this.min = 0; - this.max = 0; - this._setBlueTrack(0); - }, - - populate: function () { - if (!isNaN(this.min) && !isNaN(this.max)) { - this._setVisible(true); - this.enable = true; - this.label.setErrorText(BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number")); - if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { - this.label.setValue(this.value); - this._setAllPosition(this._getPercentByValue(this.value)); - } else { - this.label.setValue(this.max); - this._setAllPosition(100); - } - } - } -}); -BI.SingleSlider.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.single_slider", BI.SingleSlider);/** - * normal single slider - * Created by Young on 2017/6/21. - */ -BI.SingleSliderNormal = BI.inherit(BI.Widget, { - - _constant: { - EDITOR_WIDTH: 90, - EDITOR_HEIGHT: 30, - HEIGHT: 28, - SLIDER_WIDTH_HALF: 15, - SLIDER_WIDTH: 30, - SLIDER_HEIGHT: 30, - TRACK_HEIGHT: 24 - }, - - props: { - baseCls: "bi-single-button bi-button-track", - minMax: { - min: 0, - max: 100 - }, - color: "#3f8ce8" - }, - - render: function () { - var self = this; - var c = this._constant; - var track = this._createTrack(); - this.slider = BI.createWidget({ - type: "bi.single_slider_button" - }); - this.slider.element.draggable({ - axis: "x", - containment: this.grayTrack.element, - scroll: false, - drag: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 - self._setBlueTrack(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.value = v; - self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG, v); - }, - stop: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); - } - }); - - var sliderVertical = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [this.slider] - }], - hgap: c.SLIDER_WIDTH_HALF, - height: c.SLIDER_HEIGHT - }); - sliderVertical.element.click(function (e) { - if (self.enable) { - var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; - var trackLength = self.track.element[0].scrollWidth; - var percent = 0; - if (offset < 0) { - percent = 0 - } - if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { - percent = offset * 100 / self._getGrayTrackLength(); - } - if (offset > (trackLength - c.SLIDER_WIDTH)) { - percent = 100 - } - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.value = v; - self.fireEvent(BI.SingleSlider.EVENT_CHANGE); - } - }); - - return { - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: track, - width: "100%", - height: c.TRACK_HEIGHT - }] - }], - hgap: 7, - height: c.TRACK_HEIGHT - }, - top: 3, - left: 0, - width: "100%" - }, { - el: sliderVertical, - top: 0, - left: 0, - width: "100%" - }] - } - }, - - _createTrack: function () { - var self = this; - var c = this._constant; - this.grayTrack = BI.createWidget({ - type: "bi.layout", - cls: "gray-track", - height: 6 - }); - this.blueTrack = BI.createWidget({ - type: "bi.layout", - cls: "blue-track", - height: 6 - }); - this.blueTrack.element.css({"background-color": this.options.color}); - - return { - type: "bi.absolute", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.grayTrack, - top: 0, - left: 0, - width: "100%" - }, { - el: this.blueTrack, - top: 0, - left: 0, - width: "0%" - }] - }], - hgap: 8, - height: 8 - }, - top: 8, - left: 0, - width: "100%" - }], - ref: function (ref) { - self.track = ref; - } - } - }, - - _checkValidation: function (v) { - return !(BI.isNull(v) || v < this.min || v > this.max) - }, - - _setBlueTrack: function (percent) { - this.blueTrack.element.css({"width": percent + "%"}); - }, - - _setSliderPosition: function (percent) { - this.slider.element.css({"left": percent + "%"}); - }, - - _setAllPosition: function (percent) { - this._setSliderPosition(percent); - this._setBlueTrack(percent); - }, - - _setVisible: function (visible) { - this.slider.setVisible(visible); - }, - - _getGrayTrackLength: function () { - return this.grayTrack.element[0].scrollWidth - }, - - _getValueByPercent: function (percent) { - var thousandth = BI.parseInt(percent * 10); - return (((this.max - this.min) * thousandth) / 1000 + this.min); - }, - - _getPercentByValue: function (v) { - return (v - this.min) * 100 / (this.max - this.min); - }, - - getValue: function () { - return this.value; - }, - - setValue: function (v) { - var value = BI.parseFloat(v); - if ((!isNaN(value))) { - if (this._checkValidation(value)) { - this.value = value; - } - if (value > this.max) { - this.value = this.max; - } - if (value < this.min) { - this.value = this.min; - } - } - }, - - setMinAndMax: function (v) { - var minNumber = BI.parseFloat(v.min); - var maxNumber = BI.parseFloat(v.max); - if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { - this.min = minNumber; - this.max = maxNumber; - } - }, - - reset: function () { - this._setVisible(false); - this.enable = false; - this.value = ""; - this.min = 0; - this.max = 0; - this._setBlueTrack(0); - }, - - populate: function () { - if (!isNaN(this.min) && !isNaN(this.max)) { - this._setVisible(true); - this.enable = true; - if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { - this._setAllPosition(this._getPercentByValue(this.value)); - } else { - this._setAllPosition(100); - } - } - } -}); -BI.SingleSliderNormal.EVENT_DRAG = "EVENT_DRAG"; -BI.shortcut("bi.single_slider_normal", BI.SingleSliderNormal);/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderButton = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SliderButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider-button" - }); - }, - _init: function () { - BI.extend(BI.SliderButton.superclass._init.apply(this, arguments)); - var self = this; - var sliderButton = BI.createWidget({ - type: "bi.icon_button", - cls: "column-next-page-h-font", - iconWidth: 16, - iconHeight: 16, - height: 16, - width: 16 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: sliderButton, - left: -8 - }, { - el: { - type: "bi.label", - ref: function (_ref) { - self.label = _ref; - } - }, - left: -8, - top: -10 - }] - }); - }, - - setValue: function (v) { - this.label.setText(v); - } -}); -BI.shortcut("bi.slider_button", BI.SliderButton);/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderNormal = BI.inherit(BI.Widget, { - _constant: { - HEIGHT: 28, - SLIDER_WIDTH_HALF: 10, - SLIDER_WIDTH: 25, - SLIDER_HEIGHT: 30, - TRACK_HEIGHT: 24 - }, - - _defaultConfig: function () { - return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider", - min: 10, - max: 50 - }) - }, - - _init: function () { - BI.SliderNormal.superclass._init.apply(this, arguments); - var self = this; - var c = this._constant, o = this.options; - this.enable = false; - this.value = o.min; - this.min = o.min; - this.max = o.max; - - this.rightTrack = BI.createWidget({ - type: "bi.layout", - cls: "bi-slider-track", - height: 5 - }); - this.track = this._createTrack(); - - this.slider = BI.createWidget({ - type: "bi.slider_button" - }); - this.slider.setValue(this.getValue()); - this.slider.element.draggable({ - axis: "x", - containment: this.rightTrack.element, - scroll: false, - drag: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v) + 1; - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - }, - stop: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - var sliderVertical = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.slider, - top: 10 - }] - }], - hgap: c.SLIDER_WIDTH_HALF, - height: c.SLIDER_HEIGHT - }); - sliderVertical.element.click(function (e) { - if (self.enable) { - var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; - var trackLength = self.track.element[0].scrollWidth; - var percent = 0; - if (offset < 0) { - percent = 0 - } - if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { - percent = offset * 100 / self._getRightTrackLength(); - } - if (offset > (trackLength - c.SLIDER_WIDTH)) { - percent = 100 - } - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v); - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.track, - width: "100%", - height: c.TRACK_HEIGHT - }] - }], - height: c.TRACK_HEIGHT - }, - top: 33, - left: 0, - width: "100%" - }, { - el: sliderVertical, - top: 15, - left: 0, - width: "100%" - }] - }); - }, - - _createTrack: function () { - return BI.createWidget({ - type: "bi.absolute", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.rightTrack, - top: 0, - left: 0, - width: "100%" - }] - }], - hgap: 8, - height: 5 - }, - top: 5, - left: 0, - width: "100%" - }] - }) - }, - - _checkValidation: function (v) { - return !(BI.isNull(v) || v < this.min || v > this.max) - }, - - _setSliderPosition: function (percent) { - this.slider.element.css({"left": percent + "%"}); - }, - - _getRightTrackLength: function () { - return this.rightTrack.element[0].scrollWidth - }, - - _getValueByPercent: function (percent) { - var thousandth = BI.parseInt(percent * 10); - return (((this.max - this.min) * thousandth) / 1000 + this.min); - }, - - _getPercentByValue: function (v) { - return (v - this.min) * 100 / (this.max - this.min); - }, - - getValue: function () { - return this.value; - }, - - setValue: function (v) { - var value = BI.parseFloat(v); - if ((!isNaN(value))) { - if (this._checkValidation(value)) { - this.value = value; - } - if (value > this.max) { - this.value = this.max; - } - if (value < this.min) { - this.value = this.min; - } - } - - if (!isNaN(this.min) && !isNaN(this.max)) { - this.enable = true; - if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { - this.slider.setValue(BI.parseInt(this.value)); - this._setSliderPosition(this._getPercentByValue(this.value)); - } else { - this.slider.setValue(this.max); - this._setSliderPosition(100); - } - } - } -}); - -BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.SliderNormal); \ No newline at end of file diff --git a/demo/js/widget/slider/demo.slider.js b/demo/js/widget/slider/demo.slider.js index 6412a351f..56a97ccad 100644 --- a/demo/js/widget/slider/demo.slider.js +++ b/demo/js/widget/slider/demo.slider.js @@ -12,48 +12,38 @@ Demo.Slider = BI.inherit(BI.Widget, { _init: function () { Demo.Slider.superclass._init.apply(this, arguments); - var slider = BI.createWidget({ - type: "bi.slider", - min: 16, - max: 50, - width: 100, + var singleSlider = BI.createWidget({ + type: "bi.single_slider", + width: 300, height: 50 }); - slider.setValue("30"); - - slider.on(BI.SliderNormal.EVENT_CHANGE, function () { - console.log(this.getValue()); - }); - - var singleSlider = BI.createWidget({ - type: "bi.single_slider", - min: 16, - max: 50 + singleSlider.setMinAndMax({ + min: 10, + max: 100 }); singleSlider.populate(); var normalSingleSlider = BI.createWidget({ type: "bi.single_slider_normal", - min: 16, - max: 50 + height: 30, + width: 300 }); + normalSingleSlider.setMinAndMax({ + min: 0, + max: 100 + }); + + normalSingleSlider.setValue(10); + normalSingleSlider.populate(); BI.createWidget({ type: "bi.vtape", element: this, items: [{ - el: { - type: "bi.center_adapt", - items: [{ - el: slider - }] - }, - height: 200 - }, { el: { type: "bi.center_adapt", items: [{ diff --git a/dist/demo.js b/dist/demo.js index df5e44441..9f9c13df8 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -8446,48 +8446,38 @@ Demo.Slider = BI.inherit(BI.Widget, { _init: function () { Demo.Slider.superclass._init.apply(this, arguments); - var slider = BI.createWidget({ - type: "bi.slider", - min: 16, - max: 50, - width: 100, + var singleSlider = BI.createWidget({ + type: "bi.single_slider", + width: 300, height: 50 }); - slider.setValue("30"); - - slider.on(BI.SliderNormal.EVENT_CHANGE, function () { - console.log(this.getValue()); - }); - - var singleSlider = BI.createWidget({ - type: "bi.single_slider", - min: 16, - max: 50 + singleSlider.setMinAndMax({ + min: 10, + max: 100 }); singleSlider.populate(); var normalSingleSlider = BI.createWidget({ type: "bi.single_slider_normal", - min: 16, - max: 50 + height: 30, + width: 300 + }); + + normalSingleSlider.setMinAndMax({ + min: 0, + max: 100 }); + normalSingleSlider.setValue(10); + normalSingleSlider.populate(); BI.createWidget({ type: "bi.vtape", element: this, items: [{ - el: { - type: "bi.center_adapt", - items: [{ - el: slider - }] - }, - height: 200 - }, { el: { type: "bi.center_adapt", items: [{ diff --git a/dist/slider.js b/dist/slider.js index d28871148..04ba397d9 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -1,14 +1,14 @@ /** * Created by zcf on 2016/9/22. */ -BI.SliderButton = BI.inherit(BI.Widget, { +BI.SliderIconButton = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-slider-button" }); }, _init: function () { - BI.extend(BI.Slider.superclass._init.apply(this, arguments)); + BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments)); this.slider = BI.createWidget({ type: "bi.icon_button", cls: "widget-slider-icon slider-button", @@ -30,7 +30,7 @@ BI.SliderButton = BI.inherit(BI.Widget, { }); } }); -BI.shortcut("bi.single_slider_button", BI.SliderButton);/** +BI.shortcut("bi.single_slider_button", BI.SliderIconButton);/** * Created by zcf on 2016/9/22. */ BI.SingleSlider = BI.inherit(BI.Widget, { @@ -127,7 +127,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { cls: "slider-editor-button bi-border", errorText: "", height: c.HEIGHT, - width: c.EDITOR_WIDTH, + width: c.EDITOR_WIDTH - 2, allowBlank: false, validationChecker: function (v) { return self._checkValidation(v); @@ -553,247 +553,4 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { } }); BI.SingleSliderNormal.EVENT_DRAG = "EVENT_DRAG"; -BI.shortcut("bi.single_slider_normal", BI.SingleSliderNormal);/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderButton = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SliderButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider-button" - }); - }, - _init: function () { - BI.extend(BI.SliderButton.superclass._init.apply(this, arguments)); - var self = this; - var sliderButton = BI.createWidget({ - type: "bi.icon_button", - cls: "column-next-page-h-font", - iconWidth: 16, - iconHeight: 16, - height: 16, - width: 16 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: sliderButton, - left: -8 - }, { - el: { - type: "bi.label", - ref: function (_ref) { - self.label = _ref; - } - }, - left: -8, - top: -10 - }] - }); - }, - - setValue: function (v) { - this.label.setText(v); - } -}); -BI.shortcut("bi.slider_button", BI.SliderButton);/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderNormal = BI.inherit(BI.Widget, { - _constant: { - HEIGHT: 28, - SLIDER_WIDTH_HALF: 10, - SLIDER_WIDTH: 25, - SLIDER_HEIGHT: 30, - TRACK_HEIGHT: 24 - }, - - _defaultConfig: function () { - return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider", - min: 10, - max: 50 - }) - }, - - _init: function () { - BI.SliderNormal.superclass._init.apply(this, arguments); - var self = this; - var c = this._constant, o = this.options; - this.enable = false; - this.value = o.min; - this.min = o.min; - this.max = o.max; - - this.rightTrack = BI.createWidget({ - type: "bi.layout", - cls: "bi-slider-track", - height: 5 - }); - this.track = this._createTrack(); - - this.slider = BI.createWidget({ - type: "bi.slider_button" - }); - this.slider.setValue(this.getValue()); - this.slider.element.draggable({ - axis: "x", - containment: this.rightTrack.element, - scroll: false, - drag: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v) + 1; - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - }, - stop: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - var sliderVertical = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.slider, - top: 10 - }] - }], - hgap: c.SLIDER_WIDTH_HALF, - height: c.SLIDER_HEIGHT - }); - sliderVertical.element.click(function (e) { - if (self.enable) { - var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; - var trackLength = self.track.element[0].scrollWidth; - var percent = 0; - if (offset < 0) { - percent = 0 - } - if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { - percent = offset * 100 / self._getRightTrackLength(); - } - if (offset > (trackLength - c.SLIDER_WIDTH)) { - percent = 100 - } - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v); - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.track, - width: "100%", - height: c.TRACK_HEIGHT - }] - }], - height: c.TRACK_HEIGHT - }, - top: 33, - left: 0, - width: "100%" - }, { - el: sliderVertical, - top: 15, - left: 0, - width: "100%" - }] - }); - }, - - _createTrack: function () { - return BI.createWidget({ - type: "bi.absolute", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.rightTrack, - top: 0, - left: 0, - width: "100%" - }] - }], - hgap: 8, - height: 5 - }, - top: 5, - left: 0, - width: "100%" - }] - }) - }, - - _checkValidation: function (v) { - return !(BI.isNull(v) || v < this.min || v > this.max) - }, - - _setSliderPosition: function (percent) { - this.slider.element.css({"left": percent + "%"}); - }, - - _getRightTrackLength: function () { - return this.rightTrack.element[0].scrollWidth - }, - - _getValueByPercent: function (percent) { - var thousandth = BI.parseInt(percent * 10); - return (((this.max - this.min) * thousandth) / 1000 + this.min); - }, - - _getPercentByValue: function (v) { - return (v - this.min) * 100 / (this.max - this.min); - }, - - getValue: function () { - return this.value; - }, - - setValue: function (v) { - var value = BI.parseFloat(v); - if ((!isNaN(value))) { - if (this._checkValidation(value)) { - this.value = value; - } - if (value > this.max) { - this.value = this.max; - } - if (value < this.min) { - this.value = this.min; - } - } - - if (!isNaN(this.min) && !isNaN(this.max)) { - this.enable = true; - if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { - this.slider.setValue(BI.parseInt(this.value)); - this._setSliderPosition(this._getPercentByValue(this.value)); - } else { - this.slider.setValue(this.max); - this._setSliderPosition(100); - } - } - } -}); - -BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.SliderNormal); \ No newline at end of file +BI.shortcut("bi.single_slider_normal", BI.SingleSliderNormal); \ No newline at end of file diff --git a/src/addons/slider/slider/singleslider/button/iconbutton.slider.js b/src/addons/slider/singleslider/button/iconbutton.slider.js similarity index 70% rename from src/addons/slider/slider/singleslider/button/iconbutton.slider.js rename to src/addons/slider/singleslider/button/iconbutton.slider.js index fc8906124..63e9f2b18 100644 --- a/src/addons/slider/slider/singleslider/button/iconbutton.slider.js +++ b/src/addons/slider/singleslider/button/iconbutton.slider.js @@ -1,14 +1,14 @@ /** * Created by zcf on 2016/9/22. */ -BI.SliderButton = BI.inherit(BI.Widget, { +BI.SliderIconButton = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-slider-button" }); }, _init: function () { - BI.extend(BI.Slider.superclass._init.apply(this, arguments)); + BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments)); this.slider = BI.createWidget({ type: "bi.icon_button", cls: "widget-slider-icon slider-button", @@ -30,4 +30,4 @@ BI.SliderButton = BI.inherit(BI.Widget, { }); } }); -BI.shortcut("bi.single_slider_button", BI.SliderButton); \ No newline at end of file +BI.shortcut("bi.single_slider_button", BI.SliderIconButton); \ No newline at end of file diff --git a/src/addons/slider/slider/singleslider/singleslider.js b/src/addons/slider/singleslider/singleslider.js similarity index 99% rename from src/addons/slider/slider/singleslider/singleslider.js rename to src/addons/slider/singleslider/singleslider.js index fa4646f99..a7a6f8483 100644 --- a/src/addons/slider/slider/singleslider/singleslider.js +++ b/src/addons/slider/singleslider/singleslider.js @@ -95,7 +95,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { cls: "slider-editor-button bi-border", errorText: "", height: c.HEIGHT, - width: c.EDITOR_WIDTH, + width: c.EDITOR_WIDTH - 2, allowBlank: false, validationChecker: function (v) { return self._checkValidation(v); diff --git a/src/addons/slider/slider/singleslider/singleslider.normal.js b/src/addons/slider/singleslider/singleslider.normal.js similarity index 100% rename from src/addons/slider/slider/singleslider/singleslider.normal.js rename to src/addons/slider/singleslider/singleslider.normal.js diff --git a/src/addons/slider/slider/slider.button.js b/src/addons/slider/slider/slider.button.js deleted file mode 100644 index 3666d39a7..000000000 --- a/src/addons/slider/slider/slider.button.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderButton = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SliderButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider-button" - }); - }, - _init: function () { - BI.extend(BI.SliderButton.superclass._init.apply(this, arguments)); - var self = this; - var sliderButton = BI.createWidget({ - type: "bi.icon_button", - cls: "column-next-page-h-font", - iconWidth: 16, - iconHeight: 16, - height: 16, - width: 16 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: sliderButton, - left: -8 - }, { - el: { - type: "bi.label", - ref: function (_ref) { - self.label = _ref; - } - }, - left: -8, - top: -10 - }] - }); - }, - - setValue: function (v) { - this.label.setText(v); - } -}); -BI.shortcut("bi.slider_button", BI.SliderButton); \ No newline at end of file diff --git a/src/addons/slider/slider/slider.js b/src/addons/slider/slider/slider.js deleted file mode 100644 index 51efde461..000000000 --- a/src/addons/slider/slider/slider.js +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Created by Urthur on 2017/9/4. - */ -BI.SliderNormal = BI.inherit(BI.Widget, { - _constant: { - HEIGHT: 28, - SLIDER_WIDTH_HALF: 10, - SLIDER_WIDTH: 25, - SLIDER_HEIGHT: 30, - TRACK_HEIGHT: 24 - }, - - _defaultConfig: function () { - return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-slider", - min: 10, - max: 50 - }) - }, - - _init: function () { - BI.SliderNormal.superclass._init.apply(this, arguments); - var self = this; - var c = this._constant, o = this.options; - this.enable = false; - this.value = o.min; - this.min = o.min; - this.max = o.max; - - this.rightTrack = BI.createWidget({ - type: "bi.layout", - cls: "bi-slider-track", - height: 5 - }); - this.track = this._createTrack(); - - this.slider = BI.createWidget({ - type: "bi.slider_button" - }); - this.slider.setValue(this.getValue()); - this.slider.element.draggable({ - axis: "x", - containment: this.rightTrack.element, - scroll: false, - drag: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v) + 1; - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - }, - stop: function (e, ui) { - var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - var sliderVertical = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.slider, - top: 10 - }] - }], - hgap: c.SLIDER_WIDTH_HALF, - height: c.SLIDER_HEIGHT - }); - sliderVertical.element.click(function (e) { - if (self.enable) { - var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; - var trackLength = self.track.element[0].scrollWidth; - var percent = 0; - if (offset < 0) { - percent = 0 - } - if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { - percent = offset * 100 / self._getRightTrackLength(); - } - if (offset > (trackLength - c.SLIDER_WIDTH)) { - percent = 100 - } - var significantPercent = BI.parseFloat(percent.toFixed(1)); - self._setSliderPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); - self.value = BI.parseInt(v); - self.slider.setValue(self.getValue()); - self.fireEvent(BI.SliderNormal.EVENT_CHANGE); - } - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.track, - width: "100%", - height: c.TRACK_HEIGHT - }] - }], - height: c.TRACK_HEIGHT - }, - top: 33, - left: 0, - width: "100%" - }, { - el: sliderVertical, - top: 15, - left: 0, - width: "100%" - }] - }); - }, - - _createTrack: function () { - return BI.createWidget({ - type: "bi.absolute", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.absolute", - items: [{ - el: this.rightTrack, - top: 0, - left: 0, - width: "100%" - }] - }], - hgap: 8, - height: 5 - }, - top: 5, - left: 0, - width: "100%" - }] - }) - }, - - _checkValidation: function (v) { - return !(BI.isNull(v) || v < this.min || v > this.max) - }, - - _setSliderPosition: function (percent) { - this.slider.element.css({"left": percent + "%"}); - }, - - _getRightTrackLength: function () { - return this.rightTrack.element[0].scrollWidth - }, - - _getValueByPercent: function (percent) { - var thousandth = BI.parseInt(percent * 10); - return (((this.max - this.min) * thousandth) / 1000 + this.min); - }, - - _getPercentByValue: function (v) { - return (v - this.min) * 100 / (this.max - this.min); - }, - - getValue: function () { - return this.value; - }, - - setValue: function (v) { - var value = BI.parseFloat(v); - if ((!isNaN(value))) { - if (this._checkValidation(value)) { - this.value = value; - } - if (value > this.max) { - this.value = this.max; - } - if (value < this.min) { - this.value = this.min; - } - } - - if (!isNaN(this.min) && !isNaN(this.max)) { - this.enable = true; - if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { - this.slider.setValue(BI.parseInt(this.value)); - this._setSliderPosition(this._getPercentByValue(this.value)); - } else { - this.slider.setValue(this.max); - this._setSliderPosition(100); - } - } - } -}); - -BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.SliderNormal); \ No newline at end of file From efc8221cfa97d4df8a8d32c9af05d2da35b0a2ee Mon Sep 17 00:00:00 2001 From: imp <imp@fanruan.com> Date: Tue, 12 Sep 2017 16:04:28 +0800 Subject: [PATCH 07/14] update --- Gruntfile.js | 2 +- bi/slider.js | 556 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 557 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index e45eaaaec..ec9a69b2c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -226,7 +226,7 @@ module.exports = function (grunt) { }, bi_sliderJs: { src: [ - 'src/addons/slider/slider/**/*.js' + 'src/addons/slider/singleslider/**/*.js' ], dest: 'bi/slider.js' }, diff --git a/bi/slider.js b/bi/slider.js index e69de29bb..04ba397d9 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -0,0 +1,556 @@ +/** + * Created by zcf on 2016/9/22. + */ +BI.SliderIconButton = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-single-slider-button" + }); + }, + _init: function () { + BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments)); + this.slider = BI.createWidget({ + type: "bi.icon_button", + cls: "widget-slider-icon slider-button", + iconWidth: 14, + iconHeight: 14, + height: 14, + width: 14 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.slider, + top: 7, + left: -7 + }], + width: 0, + height: 14 + }); + } +}); +BI.shortcut("bi.single_slider_button", BI.SliderIconButton);/** + * Created by zcf on 2016/9/22. + */ +BI.SingleSlider = BI.inherit(BI.Widget, { + _constant: { + EDITOR_WIDTH: 90, + EDITOR_HEIGHT: 30, + HEIGHT: 28, + SLIDER_WIDTH_HALF: 15, + SLIDER_WIDTH: 30, + SLIDER_HEIGHT: 30, + TRACK_HEIGHT: 24 + }, + _defaultConfig: function () { + return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-single-slider bi-slider-track" + }); + }, + _init: function () { + BI.SingleSlider.superclass._init.apply(this, arguments); + + var self = this; + var c = this._constant; + this.enable = false; + this.value = ""; + + this.grayTrack = BI.createWidget({ + type: "bi.layout", + cls: "gray-track", + height: 6 + }); + this.blueTrack = BI.createWidget({ + type: "bi.layout", + cls: "blue-track bi-high-light-background", + height: 6 + }); + this.track = this._createTrackWrapper(); + + this.slider = BI.createWidget({ + type: "bi.single_slider_button" + }); + this.slider.element.draggable({ + axis: "x", + containment: this.grayTrack.element, + scroll: false, + drag: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 + self._setBlueTrack(significantPercent); + self._setLabelPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + self.label.setValue(v); + self.value = v; + }, + stop: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setSliderPosition(significantPercent); + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); + } + }); + var sliderVertical = BI.createWidget({ + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.slider] + }], + hgap: c.SLIDER_WIDTH_HALF, + height: c.SLIDER_HEIGHT + }); + sliderVertical.element.click(function (e) { + if (self.enable) { + var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; + var trackLength = self.track.element[0].scrollWidth; + var percent = 0; + if (offset < 0) { + percent = 0 + } + if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { + percent = offset * 100 / self._getGrayTrackLength(); + } + if (offset > (trackLength - c.SLIDER_WIDTH)) { + percent = 100 + } + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + self.label.setValue(v); + self.value = v; + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); + } + }); + this.label = BI.createWidget({ + type: "bi.sign_editor", + cls: "slider-editor-button bi-border", + errorText: "", + height: c.HEIGHT, + width: c.EDITOR_WIDTH - 2, + allowBlank: false, + validationChecker: function (v) { + return self._checkValidation(v); + }, + quitChecker: function (v) { + return self._checkValidation(v); + } + }); + this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); + }); + this._setVisible(false); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.track, + width: "100%", + height: c.TRACK_HEIGHT + }] + }], + hgap: 7, + height: c.TRACK_HEIGHT + }, + top: 33, + left: 0, + width: "100%" + }, { + el: sliderVertical, + top: 30, + left: 0, + width: "100%" + }, { + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.label] + }], + rgap: c.EDITOR_WIDTH, + height: c.EDITOR_HEIGHT + }, + top: 0, + left: 0, + width: "100%" + }] + }) + }, + + _createTrackWrapper: function () { + return BI.createWidget({ + type: "bi.absolute", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.grayTrack, + top: 0, + left: 0, + width: "100%" + }, { + el: this.blueTrack, + top: 0, + left: 0, + width: "0%" + }] + }], + hgap: 8, + height: 8 + }, + top: 8, + left: 0, + width: "100%" + }] + }) + }, + + _checkValidation: function (v) { + return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max) + }, + + _setBlueTrack: function (percent) { + this.blueTrack.element.css({"width": percent + "%"}); + }, + + _setLabelPosition: function (percent) { + this.label.element.css({"left": percent + "%"}); + }, + + _setSliderPosition: function (percent) { + this.slider.element.css({"left": percent + "%"}); + }, + + _setAllPosition: function (percent) { + this._setSliderPosition(percent); + this._setLabelPosition(percent); + this._setBlueTrack(percent); + }, + + _setVisible: function (visible) { + this.slider.setVisible(visible); + this.label.setVisible(visible); + }, + + _getGrayTrackLength: function () { + return this.grayTrack.element[0].scrollWidth + }, + + _getValueByPercent: function (percent) { + var thousandth = BI.parseInt(percent * 10); + return (((this.max - this.min) * thousandth) / 1000 + this.min); + }, + + _getPercentByValue: function (v) { + return (v - this.min) * 100 / (this.max - this.min); + }, + + getValue: function () { + return this.value; + }, + + setValue: function (v) { + var value = BI.parseFloat(v); + if ((!isNaN(value))) { + if (this._checkValidation(value)) { + this.value = value; + } + if (value > this.max) { + this.value = this.max; + } + if (value < this.min) { + this.value = this.min; + } + } + }, + + setMinAndMax: function (v) { + var minNumber = BI.parseFloat(v.min); + var maxNumber = BI.parseFloat(v.max); + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { + this.min = minNumber; + this.max = maxNumber; + } + }, + + reset: function () { + this._setVisible(false); + this.enable = false; + this.value = ""; + this.min = 0; + this.max = 0; + this._setBlueTrack(0); + }, + + populate: function () { + if (!isNaN(this.min) && !isNaN(this.max)) { + this._setVisible(true); + this.enable = true; + this.label.setErrorText(BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number")); + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { + this.label.setValue(this.value); + this._setAllPosition(this._getPercentByValue(this.value)); + } else { + this.label.setValue(this.max); + this._setAllPosition(100); + } + } + } +}); +BI.SingleSlider.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.single_slider", BI.SingleSlider);/** + * normal single slider + * Created by Young on 2017/6/21. + */ +BI.SingleSliderNormal = BI.inherit(BI.Widget, { + + _constant: { + EDITOR_WIDTH: 90, + EDITOR_HEIGHT: 30, + HEIGHT: 28, + SLIDER_WIDTH_HALF: 15, + SLIDER_WIDTH: 30, + SLIDER_HEIGHT: 30, + TRACK_HEIGHT: 24 + }, + + props: { + baseCls: "bi-single-button bi-button-track", + minMax: { + min: 0, + max: 100 + }, + color: "#3f8ce8" + }, + + render: function () { + var self = this; + var c = this._constant; + var track = this._createTrack(); + this.slider = BI.createWidget({ + type: "bi.single_slider_button" + }); + this.slider.element.draggable({ + axis: "x", + containment: this.grayTrack.element, + scroll: false, + drag: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 + self._setBlueTrack(significantPercent); + var v = self._getValueByPercent(significantPercent); + self.value = v; + self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG, v); + }, + stop: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setSliderPosition(significantPercent); + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); + } + }); + + var sliderVertical = BI.createWidget({ + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.slider] + }], + hgap: c.SLIDER_WIDTH_HALF, + height: c.SLIDER_HEIGHT + }); + sliderVertical.element.click(function (e) { + if (self.enable) { + var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; + var trackLength = self.track.element[0].scrollWidth; + var percent = 0; + if (offset < 0) { + percent = 0 + } + if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { + percent = offset * 100 / self._getGrayTrackLength(); + } + if (offset > (trackLength - c.SLIDER_WIDTH)) { + percent = 100 + } + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + self.value = v; + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); + } + }); + + return { + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: track, + width: "100%", + height: c.TRACK_HEIGHT + }] + }], + hgap: 7, + height: c.TRACK_HEIGHT + }, + top: 3, + left: 0, + width: "100%" + }, { + el: sliderVertical, + top: 0, + left: 0, + width: "100%" + }] + } + }, + + _createTrack: function () { + var self = this; + var c = this._constant; + this.grayTrack = BI.createWidget({ + type: "bi.layout", + cls: "gray-track", + height: 6 + }); + this.blueTrack = BI.createWidget({ + type: "bi.layout", + cls: "blue-track", + height: 6 + }); + this.blueTrack.element.css({"background-color": this.options.color}); + + return { + type: "bi.absolute", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.grayTrack, + top: 0, + left: 0, + width: "100%" + }, { + el: this.blueTrack, + top: 0, + left: 0, + width: "0%" + }] + }], + hgap: 8, + height: 8 + }, + top: 8, + left: 0, + width: "100%" + }], + ref: function (ref) { + self.track = ref; + } + } + }, + + _checkValidation: function (v) { + return !(BI.isNull(v) || v < this.min || v > this.max) + }, + + _setBlueTrack: function (percent) { + this.blueTrack.element.css({"width": percent + "%"}); + }, + + _setSliderPosition: function (percent) { + this.slider.element.css({"left": percent + "%"}); + }, + + _setAllPosition: function (percent) { + this._setSliderPosition(percent); + this._setBlueTrack(percent); + }, + + _setVisible: function (visible) { + this.slider.setVisible(visible); + }, + + _getGrayTrackLength: function () { + return this.grayTrack.element[0].scrollWidth + }, + + _getValueByPercent: function (percent) { + var thousandth = BI.parseInt(percent * 10); + return (((this.max - this.min) * thousandth) / 1000 + this.min); + }, + + _getPercentByValue: function (v) { + return (v - this.min) * 100 / (this.max - this.min); + }, + + getValue: function () { + return this.value; + }, + + setValue: function (v) { + var value = BI.parseFloat(v); + if ((!isNaN(value))) { + if (this._checkValidation(value)) { + this.value = value; + } + if (value > this.max) { + this.value = this.max; + } + if (value < this.min) { + this.value = this.min; + } + } + }, + + setMinAndMax: function (v) { + var minNumber = BI.parseFloat(v.min); + var maxNumber = BI.parseFloat(v.max); + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { + this.min = minNumber; + this.max = maxNumber; + } + }, + + reset: function () { + this._setVisible(false); + this.enable = false; + this.value = ""; + this.min = 0; + this.max = 0; + this._setBlueTrack(0); + }, + + populate: function () { + if (!isNaN(this.min) && !isNaN(this.max)) { + this._setVisible(true); + this.enable = true; + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { + this._setAllPosition(this._getPercentByValue(this.value)); + } else { + this._setAllPosition(100); + } + } + } +}); +BI.SingleSliderNormal.EVENT_DRAG = "EVENT_DRAG"; +BI.shortcut("bi.single_slider_normal", BI.SingleSliderNormal); \ No newline at end of file From 5f3c505fd0e8efc51dfaa0d6344ab766b289fd42 Mon Sep 17 00:00:00 2001 From: Urthur <urthur@fanruan.com> Date: Tue, 12 Sep 2017 17:02:01 +0800 Subject: [PATCH 08/14] =?UTF-8?q?slider=20=E6=B7=BB=E5=8A=A0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/base.js | 70826 ++++++++-------- bi/slider.js | 15 +- demo/js/widget/slider/demo.slider.js | 5 + dist/demo.js | 5 + dist/slider.js | 15 +- .../slider/singleslider/singleslider.js | 15 +- 6 files changed, 35453 insertions(+), 35428 deletions(-) diff --git a/bi/base.js b/bi/base.js index fefa9aac9..dcf07f9dd 100644 --- a/bi/base.js +++ b/bi/base.js @@ -1,32567 +1,32567 @@ -/*! - * jQuery Mousewheel 3.1.13 - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - */ - -(function (factory) { - if ( typeof define === 'function' && define.amd ) { - // AMD. Register as an anonymous module. - define(['../core/jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS style for Browserify - module.exports = factory; - } else { - // Browser globals - factory(jQuery); - } -}(function ($) { - - var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], - toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? - ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], - slice = Array.prototype.slice, - nullLowestDeltaTimeout, lowestDelta; - - if ( $.event.fixHooks ) { - for ( var i = toFix.length; i; ) { - $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; - } - } - - var special = $.event.special.mousewheel = { - version: '3.1.12', - - setup: function() { - if ( this.addEventListener ) { - for ( var i = toBind.length; i; ) { - this.addEventListener( toBind[--i], handler, false ); - } - } else { - this.onmousewheel = handler; - } - }, - - teardown: function() { - if ( this.removeEventListener ) { - for ( var i = toBind.length; i; ) { - this.removeEventListener( toBind[--i], handler, false ); - } - } else { - this.onmousewheel = null; - } - }, - - settings: { - adjustOldDeltas: true, // see shouldAdjustOldDeltas() below - normalizeOffset: true // calls getBoundingClientRect for each event - } - }; - - $.fn.extend({ - mousewheel: function(fn) { - return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); - }, - - unmousewheel: function(fn) { - return this.unbind('mousewheel', fn); - } - }); - - - function handler(event) { - var orgEvent = event || window.event, - args = slice.call(arguments, 1), - delta = 0, - deltaX = 0, - deltaY = 0, - absDelta = 0, - offsetX = 0, - offsetY = 0; - event = $.event.fix(orgEvent); - event.type = 'mousewheel'; - - // Old school scrollwheel delta - if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } - if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } - if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } - if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } - - // Firefox < 17 horizontal scrolling related to DOMMouseScroll event - if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { - deltaX = deltaY * -1; - deltaY = 0; - } - - // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy - delta = deltaY === 0 ? deltaX : deltaY; - - // New school wheel delta (wheel event) - if ( 'deltaY' in orgEvent ) { - deltaY = orgEvent.deltaY * -1; - delta = deltaY; - } - if ( 'deltaX' in orgEvent ) { - deltaX = orgEvent.deltaX; - if ( deltaY === 0 ) { delta = deltaX * -1; } - } - - // No change actually happened, no reason to go any further - if ( deltaY === 0 && deltaX === 0 ) { return; } - - // Need to convert lines and pages to pixels if we aren't already in pixels - // There are three delta modes: - // * deltaMode 0 is by pixels, nothing to do - // * deltaMode 1 is by lines - // * deltaMode 2 is by pages - if ( orgEvent.deltaMode === 1 ) { - var lineHeight = 40; - delta *= lineHeight; - deltaY *= lineHeight; - deltaX *= lineHeight; - } else if ( orgEvent.deltaMode === 2 ) { - var pageHeight = 800; - delta *= pageHeight; - deltaY *= pageHeight; - deltaX *= pageHeight; - } - - // Store lowest absolute delta to normalize the delta values - absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); - - if ( !lowestDelta || absDelta < lowestDelta ) { - lowestDelta = absDelta; - - // Adjust older deltas if necessary - if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { - lowestDelta /= 40; - } - } - - // Adjust older deltas if necessary - if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { - // Divide all the things by 40! - delta /= 40; - deltaX /= 40; - deltaY /= 40; - } - - // Get a whole, normalized value for the deltas - delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); - deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); - deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); - - // Normalise offsetX and offsetY properties - if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { - var boundingRect = this.getBoundingClientRect(); - offsetX = event.clientX - boundingRect.left; - offsetY = event.clientY - boundingRect.top; - } - - // Add information to the event object - event.deltaX = deltaX; - event.deltaY = deltaY; - event.deltaFactor = lowestDelta; - event.offsetX = offsetX; - event.offsetY = offsetY; - // Go ahead and set deltaMode to 0 since we converted to pixels - // Although this is a little odd since we overwrite the deltaX/Y - // properties with normalized deltas. - event.deltaMode = 0; - - // Add event and delta to the front of the arguments - args.unshift(event, delta, deltaX, deltaY); - - // Clearout lowestDelta after sometime to better - // handle multiple device types that give different - // a different lowestDelta - // Ex: trackpad = 3 and mouse wheel = 120 - if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } - nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); - - return ($.event.dispatch || $.event.handle).apply(this, args); - } - - function nullLowestDelta() { - lowestDelta = null; - } - - function shouldAdjustOldDeltas(orgEvent, absDelta) { - // If this is an older event and the delta is divisable by 120, - // then we are assuming that the browser is treating this as an - // older mouse wheel event and that we should divide the deltas - // by 40 to try and get a more usable deltaFactor. - // Side note, this actually impacts the reported scroll distance - // in older browsers and can cause scrolling to be slower than native. - // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. - return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; - } - -}));/** - * 当没有元素时有提示信息的view - * - * Created by GUY on 2015/9/8. - * @class BI.Pane - * @extends BI.Widget - * @abstract - */ -BI.Pane = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pane", - tipText: BI.i18nText("BI-No_Selected_Item"), - overlap: true, - onLoaded: BI.emptyFn - }) - }, - - _init: function () { - BI.Pane.superclass._init.apply(this, arguments); - }, - - _assertTip: function () { - var o = this.options; - if (!this._tipText) { - this._tipText = BI.createWidget({ - type: "bi.label", - cls: "bi-tips", - text: o.tipText, - height: 25 - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this._tipText], - bgap: 25 - }); - } - }, - - loading: function () { - var self = this, o = this.options; - if (o.overlap === true) { - if (!BI.Layers.has(this.getName())) { - BI.createWidget({ - type: 'bi.vtape', - items: [{ - el: { - type: "bi.layout", - cls: "loading-background" - }, - height: 30 - }], - element: BI.Layers.make(this.getName(), this) - }); - } - BI.Layers.show(self.getName()); - } else if (BI.isNull(this._loading)) { - this._loading = BI.createWidget({ - type: "bi.layout", - cls: "loading-background", - height: 30 - }); - this._loading.element.css("zIndex", 1); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this._loading, - left: 0, - right: 0, - top: 0 - }] - }) - } - }, - - loaded: function () { - var self = this, o = this.options; - BI.Layers.remove(self.getName()); - this._loading && this._loading.destroy(); - this._loading && (this._loading = null); - o.onLoaded(); - self.fireEvent(BI.Pane.EVENT_LOADED); - }, - - check: function () { - this.setTipVisible(BI.isEmpty(this.options.items)); - }, - - setTipVisible: function (b) { - if (b === true) { - this._assertTip(); - this._tipText.setVisible(true); - } else { - this._tipText && this._tipText.setVisible(false); - } - }, - - populate: function (items) { - this.options.items = items || []; - this.check(); - }, - - empty: function () { - - } -}); -BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** - * guy - * 这仅仅只是一个超类, 所有简单控件的基类 - * 1、类的控制, - * 2、title的控制 - * 3、文字超过边界显示3个点 - * 4、cursor默认pointor - * @class BI.Single - * @extends BI.Widget - * @abstract - */ -BI.Single = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-single", - readonly: false, - title: null, - warningTitle: null, - tipType: null, // success或warning - value: null - }) - }, - - _showToolTip: function (e, opt) { - opt || (opt = {}); - var self = this; - var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); - var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); - if (BI.isKey(title)) { - BI.Tooltips.show(e, this.getName(), title, type, this, opt); - } - }, - - _hideTooltip: function () { - var self = this; - var tooltip = BI.Tooltips.get(this.getName()); - if (BI.isNotNull(tooltip)) { - tooltip.element.fadeOut(200, function () { - BI.Tooltips.remove(self.getName()); - }); - } - }, - - _init: function () { - BI.Single.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isKey(o.title) || BI.isKey(o.warningTitle) - || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { - this.enableHover(); - } - }, - - enableHover: function (opt) { - opt || (opt = {}); - var self = this; - if (!this._hoverBinded) { - this.element.on("mouseenter.title" + this.getName(), function (e) { - self._e = e; - if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { - self.timeout = BI.delay(function () { - self._showToolTip(self._e || e, opt); - }, 200); - } else if (self.getTipType() === "success" || self.isEnabled()) { - self.timeout = BI.delay(function () { - self._showToolTip(self._e || e, opt); - }, 500); - } - }); - this.element.on("mousemove.title" + this.getName(), function (e) { - self._e = e; - if (!self.element.__isMouseInBounds__(e)) { - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - } - }); - this.element.on("mouseleave.title" + this.getName(), function () { - self._e = null; - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - }); - this._hoverBinded = true; - } - }, - - disabledHover: function () { - //取消hover事件 - if (BI.isNotNull(this.timeout)) { - clearTimeout(this.timeout); - } - this._hideTooltip(); - $(this.element).unbind("mouseenter.title" + this.getName()) - .unbind("mousemove.title" + this.getName()) - .unbind("mouseleave.title" + this.getName()); - this._hoverBinded = false; - }, - - populate: function (items) { - this.items = items || []; - }, - - //opt: {container: '', belowMouse: false} - setTitle: function (title, opt) { - this.options.title = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - setWarningTitle: function (title, opt) { - this.options.warningTitle = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - getTipType: function () { - return this.options.tipType; - }, - - isReadOnly: function () { - return !!this.options.readonly; - }, - - getTitle: function () { - var title = this.options.title; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - getWarningTitle: function () { - var title = this.options.warningTitle; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - setValue: function (val) { - if (!this.options.readonly) { - this.options.value = val; - } - }, - - getValue: function () { - return this.options.value; - } -});/** - * guy 表示一行数据,通过position来定位位置的数据 - * @class BI.Text - * @extends BI.Single - */ -BI.Text = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Text.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text", - textAlign: "left", - whiteSpace: "normal", - lineHeight: null, - handler: null,//如果传入handler,表示处理文字的点击事件,不是区域的 - hgap: 0, - vgap: 0, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - text: "", - py: "" - }) - }, - - _init: function () { - BI.Text.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.hgap + o.lgap > 0) { - this.element.css({ - "padding-left": o.hgap + o.lgap + "px" - }) - } - if (o.hgap + o.rgap > 0) { - this.element.css({ - "padding-right": o.hgap + o.rgap + "px" - }) - } - if (o.vgap + o.tgap > 0) { - this.element.css({ - "padding-top": o.vgap + o.tgap + "px" - }) - } - if (o.vgap + o.bgap > 0) { - this.element.css({ - "padding-bottom": o.vgap + o.bgap + "px" - }) - } - if (BI.isNumber(o.height)) { - this.element.css({"lineHeight": o.height + "px"}); - } - if (BI.isNumber(o.lineHeight)) { - this.element.css({"lineHeight": o.lineHeight + "px"}); - } - this.element.css({ - "textAlign": o.textAlign, - "whiteSpace": o.whiteSpace - }); - if (o.handler) { - this.text = BI.createWidget({ - type: "bi.layout", - tagName: 'span' - }); - this.text.element.click(function () { - o.handler(self.getValue()); - }); - BI.createWidget({ - type: "bi.default", - element: this, - items: [this.text] - }); - } else { - this.text = this; - } - if (BI.isKey(o.text)) { - this.setText(o.text); - } else if (BI.isKey(o.value)) { - this.setText(o.value); - } - if (BI.isKey(o.keyword)) { - this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); - } - }, - - doRedMark: function (keyword) { - var o = this.options; - this.text.element.__textKeywordMarked__(o.text || o.value, keyword, o.py); - }, - - unRedMark: function () { - var o = this.options; - this.text.element.__textKeywordMarked__(o.text || o.value, "", o.py); - }, - - doHighLight: function () { - this.text.element.addClass("bi-high-light"); - }, - - unHighLight: function () { - this.text.element.removeClass("bi-high-light"); - }, - - setValue: function (text) { - BI.Text.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.setText(text); - } - }, - - setStyle: function (css) { - this.text.element.css(css) - }, - - setText: function (text) { - BI.Text.superclass.setText.apply(this, arguments); - this.options.text = text; - this.text.element.text((text + "").replaceAll(" ", " ")); - } -}); - -BI.shortcut("bi.text", BI.Text);/** - * guy - * @class BI.BasicButton - * @extends BI.Single - * - * 一般的button父级 - */ -BI.BasicButton = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), - value: "", - text: "", - stopEvent: false, - stopPropagation: false, - selected: false, - once: false, //点击一次选中有效,再点无效 - forceSelected: false, //点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发 - forceNotSelected: false, //无论怎么点击都不会被选中 - disableSelected: false, //使能选中 - - shadow: false, - isShadowShowingOnSelected: false, //选中状态下是否显示阴影 - trigger: null, - handler: BI.emptyFn - }) - }, - _init: function () { - BI.BasicButton.superclass._init.apply(this, arguments); - var opts = this.options; - if (opts.selected === true) { - BI.nextTick(BI.bind(function () { - this.setSelected(opts.selected); - }, this)); - } - BI.nextTick(BI.bind(this.bindEvent, this)); - - if (opts.shadow) { - this._createShadow(); - } - }, - - _createShadow: function () { - var self = this, o = this.options; - - var assertMask = function () { - if (!self.$mask) { - self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, { - type: "bi.layout", - cls: "bi-button-mask" - }); - self.$mask.invisible(); - BI.createWidget({ - type: "bi.absolute", - element: self, - items: [{ - el: self.$mask, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - } - }; - - this.element.mouseup(function () { - if (!self._hover && !o.isShadowShowingOnSelected) { - assertMask(); - self.$mask.invisible(); - } - }); - this.element.on("mouseenter." + this.getName(), function (e) { - if (self.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) { - assertMask(); - self.$mask.visible(); - } - } - }); - this.element.on("mousemove." + this.getName(), function (e) { - if (!self.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && !self._hover) { - assertMask(); - self.$mask.invisible(); - } - } - }); - this.element.on("mouseleave." + this.getName(), function () { - if (self.isEnabled() && !self._hover) { - assertMask(); - self.$mask.invisible(); - } - }); - }, - - bindEvent: function () { - var self = this; - var o = this.options, hand = this.handle(); - if (!hand) { - return; - } - hand = hand.element; - var triggerArr = (o.trigger || "").split(","); - BI.each(triggerArr, function (idx, trigger) { - switch (trigger) { - case "mouseup": - var mouseDown = false; - hand.mousedown(function () { - mouseDown = true; - ev(e); - }); - hand.mouseup(function (e) { - if (mouseDown === true) { - clk(e); - } - mouseDown = false; - ev(e); - }); - break; - case "mousedown": - var mouseDown = false; - var selected = false; - hand.mousedown(function (e) { - // if (e.button === 0) { - $(document).bind("mouseup." + self.getName(), function (e) { - // if (e.button === 0) { - if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { - // self.setSelected(!self.isSelected()); - self._trigger(); - } - mouseDown = false; - $(document).unbind("mouseup." + self.getName()); - // } - }); - if (mouseDown === true) { - return; - } - if (self.isSelected()) { - selected = true; - } else { - clk(e); - } - mouseDown = true; - ev(e); - // } - }); - hand.mouseup(function (e) { - // if (e.button === 0) { - if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { - clk(e); - } - mouseDown = false; - selected = false; - $(document).unbind("mouseup." + self.getName()); - // } - }); - break; - case "dblclick": - hand.dblclick(clk); - break; - case "lclick": - var mouseDown = false; - var interval; - hand.mousedown(function (e) { - $(document).bind("mouseup." + self.getName(), function (e) { - interval && clearInterval(interval); - interval = null; - mouseDown = false; - $(document).unbind("mouseup." + self.getName()); - }); - if (mouseDown === true) { - return; - } - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { - return; - } - interval = setInterval(function () { - self.doClick(); - }, 100); - mouseDown = true; - ev(e); - }); - break; - default: - if (o.stopEvent || o.stopPropagation) { - hand.mousedown(function (e) { - ev(e); - }); - hand.mouseup(function (e) { - ev(e); - }); - } - hand.click(clk); - break; - } - }); - - //之后的300ms点击无效 - var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true); - - function ev(e) { - if (o.stopEvent) { - e.stopEvent(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - } - - function clk(e) { - ev(e); - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { - return; - } - onClick.apply(self, arguments); - } - }, - - _trigger: function () { - var o = this.options; - if(!this.isEnabled()){ - return; - } - if (!this.isDisableSelected()) { - this.isForceSelected() ? this.setSelected(true) : - (this.isForceNotSelected() ? this.setSelected(false) : - this.setSelected(!this.isSelected())); - } - if (this.isValid()) { - o.handler.call(this, this.getValue(), this); - var v = this.getValue(); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this); - this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this); - } - }, - - _doClick: function (e) { - if (this.isValid()) { - this.beforeClick(e); - } - this._trigger(); - if (this.isValid()) { - this.doClick(e); - } - }, - - beforeClick: function () { - - }, - - doClick: function () { - - }, - - handle: function () { - return this; - }, - - hover: function () { - this._hover = true; - this.handle().element.addClass("hover"); - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(true); - } - }, - - dishover: function () { - this._hover = false; - this.handle().element.removeClass("hover"); - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(false); - } - }, - - setSelected: function (b) { - var o = this.options; - o.selected = b; - if (b) { - this.handle().element.addClass("active"); - } else { - this.handle().element.removeClass("active"); - } - if (o.shadow && !o.isShadowShowingOnSelected) { - this.$mask && this.$mask.setVisible(false); - } - }, - - isSelected: function () { - return this.options.selected; - }, - - isOnce: function () { - return this.options.once; - }, - - isForceSelected: function () { - return this.options.forceSelected; - }, - - isForceNotSelected: function () { - return this.options.forceNotSelected; - }, - - isDisableSelected: function () { - return this.options.disableSelected; - }, - - setText: function (text) { - this.options.text = text; - }, - - getText: function () { - return this.options.text; - }, - - _setEnable: function (enable) { - BI.BasicButton.superclass._setEnable.apply(this, arguments); - if (enable === true) { - this.element.removeClass("base-disabled disabled"); - } else if (enable === false) { - this.element.addClass("base-disabled disabled"); - } - if (!enable) { - if (this.options.shadow) { - this.$mask && this.$mask.setVisible(false); - } - } - }, - - empty: function () { - $(document).unbind("mouseup." + this.getName()); - BI.BasicButton.superclass.empty.apply(this, arguments); - }, - - destroy: function () { - BI.BasicButton.superclass.destroy.apply(this, arguments); - } -}); -BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** - * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 - * - * Created by GUY on 2015/9/9. - * @class BI.NodeButton - * @extends BI.BasicButton - * @abstract - */ -BI.NodeButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function() { - var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls: (conf.baseCls || "") + " bi-node", - open: false - }) - }, - - _init:function() { - BI.NodeButton.superclass._init.apply(this, arguments); - var self = this; - BI.nextTick(function(){ - self.setOpened(self.isOpened()); - }) - }, - - doClick: function(){ - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.setOpened(!this.isOpened()); - }, - - isOnce: function(){ - return false; - }, - - isOpened: function(){ - return !!this.options.open; - }, - - setOpened: function(b){ - this.options.open = !!b; - }, - - triggerCollapse: function(){ - if(this.isOpened()) { - this.setOpened(false); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); - } - }, - - triggerExpand: function(){ - if(!this.isOpened()) { - this.setOpened(true); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); - } - } -});/** - * guy - * tip提示 - * zIndex在10亿级别 - * @class BI.Tip - * @extends BI.Single - * @abstract - */ -BI.Tip = BI.inherit(BI.Single, { - _defaultConfig: function() { - var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-tip", - zIndex: BI.zIndex_tip - }) - }, - - _init : function() { - BI.Tip.superclass._init.apply(this, arguments); - this.element.css({"zIndex": this.options.zIndex}); - } -});/** - * Created by GUY on 2015/6/26. - * @class BI.ButtonGroup - * @extends BI.Widget - */ - -BI.ButtonGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-button-group", - behaviors: {}, - items: [], - chooseType: BI.Selection.Single, - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }) - }, - - _init: function () { - BI.ButtonGroup.superclass._init.apply(this, arguments); - var behaviors = {}; - BI.each(this.options.behaviors, function (key, rule) { - behaviors[key] = BI.BehaviorFactory.createBehavior(key, { - rule: rule - }) - }); - this.behaviors = behaviors; - this.populate(this.options.items); - }, - - _createBtns: function (items) { - var o = this.options; - return BI.createWidgets(BI.createItems(items, { - type: "bi.text_button" - })); - }, - - _btnsCreator: function (items) { - var self = this, args = Array.prototype.slice.call(arguments), o = this.options; - var buttons = this._createBtns(items); - args[0] = buttons; - - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }); - BI.each(buttons, function (i, btn) { - btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - self.setValue(btn.getValue()); - break; - case BI.ButtonGroup.CHOOSE_TYPE_NONE: - self.setValue([]); - break; - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - } - }); - btn.on(BI.Events.DESTROY, function () { - BI.remove(self.buttons, btn); - }) - }); - - return buttons; - }, - - _packageBtns: function (btns) { - var o = this.options; - for (var i = o.layouts.length - 1; i > 0; i--) { - btns = BI.map(btns, function (k, it) { - return BI.extend({}, o.layouts[i], { - items: [ - BI.extend({}, o.layouts[i].el, { - el: it - }) - ] - }) - }) - } - return btns; - }, - - _packageSimpleItems: function (btns) { - var o = this.options; - return BI.map(o.items, function (i, item) { - if (BI.stripEL(item) === item) { - return btns[i]; - } - return BI.extend({}, item, { - el: btns[i] - }) - }) - }, - - _packageItems: function (items, packBtns) { - return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); - }, - - _packageLayout: function (items) { - var o = this.options, layout = BI.deepClone(o.layouts[0]); - - var lay = BI.formatEL(layout).el; - while (lay && lay.items && !BI.isEmpty(lay.items)) { - lay = BI.formatEL(lay.items[0]).el; - } - lay.items = items; - return layout; - }, - - //如果是一个简单的layout - _isSimpleLayout: function () { - var o = this.options; - return o.layouts.length === 1 && !BI.isArray(o.items[0]) - }, - - doBehavior: function () { - var args = Array.prototype.slice.call(arguments); - args.unshift(this.buttons); - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }) - }, - - prependItems: function (items) { - var o = this.options; - var btns = this._btnsCreator.apply(this, arguments); - this.buttons = BI.concat(btns, this.buttons); - - if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) { - this.layouts.prependItems(btns); - return; - } - - items = this._packageItems(items, this._packageBtns(btns)); - this.layouts.prependItems(this._packageLayout(items).items); - }, - - addItems: function (items) { - var o = this.options; - var btns = this._btnsCreator.apply(this, arguments); - this.buttons = BI.concat(this.buttons, btns); - - //如果是一个简单的layout - if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) { - this.layouts.addItems(btns); - return; - } - - items = this._packageItems(items, this._packageBtns(btns)); - this.layouts.addItems(this._packageLayout(items).items); - }, - - removeItemAt: function (indexes) { - BI.removeAt(this.buttons, indexes); - this.layouts.removeItemAt(indexes); - }, - - removeItems: function (values) { - values = BI.isArray(values) ? values : [values]; - var deleted = []; - BI.each(this.buttons, function (i, button) { - if (BI.deepContains(values, button.getValue())) { - deleted.push(i); - } - }); - BI.removeAt(this.buttons, deleted); - this.layouts.removeItemAt(deleted); - }, - - populate: function (items) { - items = items || []; - this.empty(); - this.options.items = items; - - this.buttons = this._btnsCreator.apply(this, arguments); - if (this._isSimpleLayout()) { - items = this._packageSimpleItems(this.buttons); - } else { - items = this._packageItems(items, this._packageBtns(this.buttons)); - } - - this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); - }, - - setNotSelectedValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setSelected && item.setSelected(false); - } else { - item.setSelected && item.setSelected(true); - } - }); - }, - - setEnabledValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setEnable(true); - } else { - item.setEnable(false); - } - }); - }, - - setValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.deepContains(v, item.getValue())) { - item.setSelected && item.setSelected(true); - } else { - item.setSelected && item.setSelected(false); - } - }); - }, - - getNotSelectedValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !(item.isSelected && item.isSelected())) { - v.push(item.getValue()); - } - }); - return v; - }, - - getValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && item.isSelected && item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getAllButtons: function () { - return this.buttons; - }, - - getAllLeaves: function () { - return this.buttons; - }, - - getSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isSelected && item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getNotSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isSelected && !item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getIndexByValue: function (value) { - var index = -1; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.getValue() === value) { - index = i; - return true; - } - }); - return index; - }, - - getNodeById: function (id) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.options.id === id) { - node = item; - return true; - } - }); - return node; - }, - - getNodeByValue: function (value) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled() && item.getValue() === value) { - node = item; - return true; - } - }); - return node; - }, - - empty: function () { - BI.ButtonGroup.superclass.empty.apply(this, arguments); - this.options.items = []; - }, - - destroy: function () { - BI.ButtonGroup.superclass.destroy.apply(this, arguments); - this.options.items = []; - } -}); -BI.extend(BI.ButtonGroup, { - CHOOSE_TYPE_SINGLE: BI.Selection.Single, - CHOOSE_TYPE_MULTI: BI.Selection.Multi, - CHOOSE_TYPE_ALL: BI.Selection.All, - CHOOSE_TYPE_NONE: BI.Selection.None, - CHOOSE_TYPE_DEFAULT: BI.Selection.Default -}); -BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.button_group", BI.ButtonGroup);/** - * Created by GUY on 2015/8/10. - * @class BI.ButtonTree - * @extends BI.ButtonGroup - */ - -BI.ButtonTree = BI.inherit(BI.ButtonGroup, { - _defaultConfig: function () { - return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-button-tree" - }) - }, - - _init: function () { - BI.ButtonTree.superclass._init.apply(this, arguments); - }, - - setNotSelectedValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (!BI.isFunction(item.setSelected)) { - item.setNotSelectedValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setSelected(false); - } else { - item.setSelected(true); - } - }); - }, - - setEnabledValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (BI.isFunction(item.setEnabledValue)) { - item.setEnabledValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setEnable(true); - } else { - item.setEnable(false); - } - }); - }, - - setValue: function (v) { - v = BI.isArray(v) ? v : [v]; - BI.each(this.buttons, function (i, item) { - if (!BI.isFunction(item.setSelected)) { - item.setValue(v); - return; - } - if (BI.deepContains(v, item.getValue())) { - item.setSelected(true); - } else { - item.setSelected(false); - } - }); - }, - - getNotSelectedValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - v = BI.concat(v, item.getNotSelectedValue()); - return; - } - if (item.isEnabled() && item.isSelected && !item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getValue: function () { - var v = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - v = BI.concat(v, item.getValue()); - return; - } - if (item.isEnabled() && item.isSelected && item.isSelected()) { - v.push(item.getValue()); - } - }); - return v; - }, - - getSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - btns = btns.concat(item.getSelectedButtons()); - return; - } - if (item.isSelected && item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - getNotSelectedButtons: function () { - var btns = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - btns = btns.concat(item.getNotSelectedButtons()); - return; - } - if (item.isSelected && !item.isSelected()) { - btns.push(item); - } - }); - return btns; - }, - - //获取所有的叶子节点 - getAllLeaves: function () { - var leaves = []; - BI.each(this.buttons, function (i, item) { - if (item.isEnabled() && !BI.isFunction(item.setSelected)) { - leaves = leaves.concat(item.getAllLeaves()); - return; - } - if (item.isEnabled()) { - leaves.push(item); - } - }); - return leaves; - }, - - getIndexByValue: function (value) { - var index = -1; - BI.any(this.buttons, function (i, item) { - var vs = item.getValue(); - if (item.isEnabled() && (vs === value || BI.contains(vs, value))) { - index = i; - return true; - } - }); - return index; - }, - - getNodeById: function (id) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled()) { - if (item.attr("id") === id) { - node = item; - return true; - } else if (BI.isFunction(item.getNodeById)) { - if (node = item.getNodeById(id)) { - return true; - } - } - } - }); - return node; - }, - - getNodeByValue: function (value) { - var node; - BI.any(this.buttons, function (i, item) { - if (item.isEnabled()) { - if (BI.isFunction(item.getNodeByValue)) { - if (node = item.getNodeByValue(value)) { - return true; - } - } else if (item.attr("value") === value) { - node = item; - return true; - } - } - }); - return node; - } -}); -BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.button_tree", BI.ButtonTree);/** - * guy - * 异步树 - * @class BI.TreeView - * @extends BI.Pane - */ -BI.TreeView = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-tree", - paras: {}, - itemsCreator: BI.emptyFn - }) - }, - _init: function () { - BI.TreeView.superclass._init.apply(this, arguments); - this._stop = false; - - this._createTree(); - this.tip = BI.createWidget({ - type: "bi.loading_bar", - invisible: true, - handler: BI.bind(this._loadMore, this) - }); - BI.createWidget({ - type: "bi.vertical", - scrollable: true, - scrolly: false, - element: this, - items: [this.tip] - }); - - }, - - _createTree: function () { - this.id = "bi-tree" + BI.UUID(); - if (this.nodes) { - this.nodes.destroy(); - } - if (this.tree) { - this.tree.destroy(); - } - this.tree = BI.createWidget({ - type: "bi.layout", - element: "<ul id='" + this.id + "' class='ztree'></ul>" - }); - BI.createWidget({ - type: "bi.default", - element: this.element, - items: [this.tree] - }); - }, - - //选择节点触发方法 - _selectTreeNode: function (treeId, treeNode) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this); - this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this); - }, - - //配置属性 - _configSetting: function () { - var paras = this.options.paras; - var self = this; - var setting = { - async: { - enable: true, - url: getUrl, - autoParam: ["id", "name"], - otherParam: BI.cjkEncodeDO(paras) - }, - check: { - enable: true - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true, - dblClickExpand: false - }, - callback: { - beforeExpand: beforeExpand, - onAsyncSuccess: onAsyncSuccess, - onAsyncError: onAsyncError, - beforeCheck: beforeCheck, - onCheck: onCheck, - onExpand: onExpand, - onCollapse: onCollapse, - onClick: onClick - } - }; - var className = "dark", perTime = 100; - - function onClick(event, treeId, treeNode) { - self.nodes.checkNode(treeNode, !treeNode.checked, true, true); - } - - function getUrl(treeId, treeNode) { - var parentNode = self._getParentValues(treeNode); - treeNode.times = treeNode.times || 1; - var param = "id=" + treeNode.id - + "×=" + (treeNode.times++) - + "&parentValues= " + window.encodeURIComponent(BI.jsonEncode(parentNode)) - + "&checkState=" + window.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); - - return BI.servletURL + '?op=' + self.options.op + '&cmd=' + self.options.cmd + "&" + param; - } - - function beforeExpand(treeId, treeNode) { - if (!treeNode.isAjaxing) { - if (!treeNode.children) { - treeNode.times = 1; - ajaxGetNodes(treeNode, "refresh"); - } - return true; - } else { - BI.Msg.toast("Please Wait。", "warning"); - return false; - } - } - - function onAsyncSuccess(event, treeId, treeNode, msg) { - treeNode.halfCheck = false; - if (!msg || msg.length === 0 || /^<html>[\s,\S]*<\/html>$/gi.test(msg) || self._stop) { - return; - } - var zTree = self.nodes; - var totalCount = treeNode.count || 0; - - //尝试去获取下一组节点,若获取值为空数组,表示获取完成 - // TODO by GUY - if (treeNode.children.length > totalCount) { - treeNode.count = treeNode.children.length; - BI.delay(function () { - ajaxGetNodes(treeNode); - }, perTime); - } else { - //treeNode.icon = ""; - zTree.updateNode(treeNode); - zTree.selectNode(treeNode.children[0]); - //className = (className === "dark" ? "":"dark"); - } - } - - function onAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) { - var zTree = self.nodes; - BI.Msg.toast("Error!", "warning"); - //treeNode.icon = ""; - //zTree.updateNode(treeNode); - } - - function ajaxGetNodes(treeNode, reloadType) { - var zTree = self.nodes; - if (reloadType == "refresh") { - //treeNode.icon = BI.servletURL +"?op=resource&resource=/com/fr/bi/web/css/base/third/ztree/img/loading.gif"; - zTree.updateNode(treeNode); - } - zTree.reAsyncChildNodes(treeNode, reloadType, true); - } - - function beforeCheck(treeId, treeNode) { - treeNode.halfCheck = false; - if (treeNode.checked === true) { - //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy - //所有的半选状态都需要取消halfCheck=true的情况 - function track(children) { - BI.each(children, function (i, ch) { - if (ch.halfCheck === true) { - ch.halfCheck = false; - track(ch.children); - } - }) - } - - track(treeNode.children); - var treeObj = self.nodes; - var nodes = treeObj.getSelectedNodes(); - $.each(nodes, function (index, node) { - node.halfCheck = false; - }) - } - } - - function onCheck(event, treeId, treeNode) { - self._selectTreeNode(treeId, treeNode); - } - - function onExpand(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - function onCollapse(event, treeId, treeNode) { - } - - return setting; - }, - - _getParentValues: function (treeNode) { - if (!treeNode.getParentNode()) { - return []; - } - var parentNode = treeNode.getParentNode(); - var result = this._getParentValues(parentNode); - result = result.concat([this._getNodeValue(parentNode)]); - return result; - }, - - _getNodeValue: function (node) { - //去除标红 - return node.value == null ? node.text.replace(/<[^>]+>/g, "").replaceAll(" ", " ") : node.value; - }, - - //获取半选框值 - _getHalfSelectedValues: function (map, node) { - var self = this; - var checkState = node.getCheckStatus(); - //将未选的去掉 - if (checkState.checked === false && checkState.half === false) { - return; - } - //如果节点已展开,并且是半选 - if (BI.isNotEmptyArray(node.children) && checkState.half === true) { - var children = node.children; - BI.each(children, function (i, ch) { - self._getHalfSelectedValues(map, ch); - }); - return; - } - var parent = node.parentValues || self._getParentValues(node); - var path = parent.concat(this._getNodeValue(node)); - if (BI.isNotEmptyArray(node.children) || checkState.half === false) { - this._buildTree(map, path); - return; - } - var storeValues = BI.deepClone(this.options.paras.selectedValues); - var treeNode = this._getTree(storeValues, path); - this._addTreeNode(map, parent, this._getNodeValue(node), treeNode); - }, - - _getTree: function (map, values) { - var cur = map; - BI.any(values, function (i, value) { - if (cur[value] == null) { - return true; - } - cur = cur[value]; - }); - return cur; - }, - - _addTreeNode: function (map, values, key, value) { - var cur = map; - BI.each(values, function (i, value) { - if (cur[value] == null) { - cur[value] = {}; - } - cur = cur[value]; - }); - cur[key] = value; - }, - - //构造树节点 - _buildTree: function (map, values) { - var cur = map; - BI.each(values, function (i, value) { - if (cur[value] == null) { - cur[value] = {}; - } - cur = cur[value]; - }) - }, - - //获取选中的值 - _getSelectedValues: function () { - var self = this; - var hashMap = {}; - var rootNoots = this.nodes.getNodes(); - track(rootNoots); - function track(nodes) { - BI.each(nodes, function (i, node) { - var checkState = node.getCheckStatus(); - if (checkState.checked === true || checkState.half === true) { - if (checkState.half === true) { - self._getHalfSelectedValues(hashMap, node); - } else { - var parentValues = node.parentValues || self._getParentValues(node); - var values = parentValues.concat([self._getNodeValue(node)]); - self._buildTree(hashMap, values); - } - } - }) - } - - return hashMap; - }, - - //处理节点 - _dealWidthNodes: function (nodes) { - var self = this, o = this.options; - var ns = BI.Tree.arrayFormat(nodes); - BI.each(ns, function (i, n) { - n.title = n.title || n.text || n.value; - //处理标红 - if (BI.isKey(o.paras.keyword)) { - n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html(); - } else { - n.text = (n.text + "").replaceAll(" ", " "); - } - }); - return nodes; - }, - - _loadMore: function () { - var self = this, o = this.options; - this.tip.setLoading(); - var op = BI.extend({}, o.paras, { - times: ++this.times - }); - o.itemsCreator(op, function (res) { - if (self._stop === true) { - return; - } - var hasNext = !!res.hasNext, nodes = res.items || []; - - if (!hasNext) { - self.tip.setEnd(); - } else { - self.tip.setLoaded(); - } - if (nodes.length > 0) { - self.nodes.addNodes(null, self._dealWidthNodes(nodes)); - } - }); - }, - - //生成树内部方法 - _initTree: function (setting) { - var self = this, o = this.options; - self.fireEvent(BI.Events.INIT); - this.times = 1; - var tree = this.tree; - tree.empty(); - this.loading(); - this.tip.setVisible(false); - var callback = function (nodes) { - if (self._stop === true) { - return; - } - self.nodes = $.fn.zTree.init(tree.element, setting, nodes); - }; - var op = BI.extend({}, o.paras, { - times: 1 - }); - - o.itemsCreator(op, function (res) { - if (self._stop === true) { - return; - } - var hasNext = !!res.hasNext, nodes = res.items || []; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes)); - } - self.setTipVisible(nodes.length <= 0); - self.loaded(); - if (!hasNext) { - self.tip.invisible(); - } else { - self.tip.setLoaded(); - } - op.times === 1 && self.fireEvent(BI.Events.AFTERINIT); - }); - }, - - //构造树结构, - initTree: function (nodes, setting) { - var setting = setting || { - async: { - enable: false - }, - check: { - enable: false - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true - }, - callback: {} - }; - this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); - }, - - start: function () { - this._stop = false; - }, - - stop: function () { - this._stop = true; - }, - - //生成树方法 - stroke: function (config) { - delete this.options.keyword; - BI.extend(this.options.paras, config); - var setting = this._configSetting(); - this._createTree(); - this.start(); - this._initTree(setting); - }, - - populate: function () { - this.stroke.apply(this, arguments); - }, - - hasChecked: function () { - var treeObj = this.nodes; - return treeObj.getCheckedNodes(true).length > 0; - }, - - checkAll: function (checked) { - function setNode(children) { - BI.each(children, function (i, child) { - child.halfCheck = false; - setNode(child.children); - }); - } - - BI.each(this.nodes.getNodes(), function (i, node) { - node.halfCheck = false; - setNode(node.children); - }); - this.nodes && this.nodes.checkAllNodes(checked); - }, - - expandAll: function (flag) { - this.nodes && this.nodes.expandAll(flag); - }, - - //设置树节点的状态 - setValue: function (value, param) { - this.checkAll(false); - this.updateValue(value, param); - this.refresh(); - }, - - setSelectedValue: function (value) { - this.options.paras.selectedValues = BI.deepClone(value || {}); - }, - - updateValue: function (values, param) { - if (!this.nodes) { - return; - } - param || (param = "value"); - var treeObj = this.nodes; - BI.each(values, function (v, op) { - var nodes = treeObj.getNodesByParam(param, v, null); - BI.each(nodes, function (j, node) { - BI.extend(node, {checked: true}, op); - treeObj.updateNode(node); - }) - }); - }, - - refresh: function () { - this.nodes && this.nodes.refresh(); - }, - - getValue: function () { - if (!this.nodes) { - return null; - } - return this._getSelectedValues(); - }, - - destroyed: function () { - this.stop(); - this.nodes && this.nodes.destroy(); - } -}); -BI.extend(BI.TreeView, { - REQ_TYPE_INIT_DATA: 1, - REQ_TYPE_ADJUST_DATA: 2, - REQ_TYPE_SELECT_DATA: 3, - REQ_TYPE_GET_SELECTED_DATA: 4 -}); - -BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TreeView.EVENT_INIT = BI.Events.INIT; -BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT; - -BI.shortcut("bi.tree_view", BI.TreeView);/** - * guy - * 同步树 - * @class BI.AsyncTree - * @extends BI.TreeView - */ -BI.AsyncTree = BI.inherit(BI.TreeView, { - _defaultConfig: function () { - return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {}) - }, - _init: function () { - BI.AsyncTree.superclass._init.apply(this, arguments); - }, - - //配置属性 - _configSetting: function () { - var paras = this.options.paras; - var self = this; - var setting = { - async: { - enable: false, - otherParam: BI.cjkEncodeDO(paras) - }, - check: { - enable: true - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - view: { - showIcon: false, - expandSpeed: "", - nameIsHTML: true, - dblClickExpand: false - }, - callback: { - beforeCheck: beforeCheck, - onCheck: onCheck, - beforeExpand: beforeExpand, - onExpand: onExpand, - onCollapse: onCollapse, - onClick: onClick - } - }; - - function onClick(event, treeId, treeNode) { - var zTree = $.fn.zTree.getZTreeObj(treeId); - zTree.checkNode(treeNode, !treeNode.checked, true, true); - } - - function beforeCheck(treeId, treeNode) { - treeNode.halfCheck = false; - if (treeNode.checked === true) { - //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy - //所有的半选状态都需要取消halfCheck=true的情况 - function track(children) { - BI.each(children, function (i, ch) { - if (ch.halfCheck === true) { - ch.halfCheck = false; - track(ch.children); - } - }) - } - - track(treeNode.children); - - var treeObj = $.fn.zTree.getZTreeObj(treeId); - var nodes = treeObj.getSelectedNodes(); - BI.each(nodes, function (index, node) { - node.halfCheck = false; - }) - } - } - - function beforeExpand(treeId, treeNode) { - self._beforeExpandNode(treeId, treeNode); - } - - function onCheck(event, treeId, treeNode) { - self._selectTreeNode(treeId, treeNode); - } - - function onExpand(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - function onCollapse(event, treeId, treeNode) { - treeNode.halfCheck = false; - } - - return setting; - }, - - _selectTreeNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); - var name = this._getNodeValue(treeNode); -// var values = parentValues.concat([name]); - if (treeNode.checked === true) { - } else { - var tNode = treeNode; - var pNode = this._getTree(this.options.paras.selectedValues, parentValues); - if (BI.isNotNull(pNode[name])) { - delete pNode[name]; - } - while (tNode != null && BI.isEmpty(pNode)) { - parentValues = parentValues.slice(0, parentValues.length - 1); - tNode = tNode.getParentNode(); - if (tNode != null) { - pNode = this._getTree(this.options.paras.selectedValues, parentValues); - name = this._getNodeValue(tNode); - delete pNode[name]; - } - } - } - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - }, - - //展开节点 - _beforeExpandNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = treeNode.parentValues || self._getParentValues(treeNode); - var op = BI.extend({}, o.paras, { - id: treeNode.id, - times: 1, - parentValues: parentValues.concat(this._getNodeValue(treeNode)), - checkState: treeNode.getCheckStatus() - }); - var complete = function (d) { - var nodes = d.items || []; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes), !!d.hasNext); - } - }; - var times = 1; - - function callback(nodes, hasNext) { - self.nodes.addNodes(treeNode, nodes); - - if (hasNext === true) { - BI.delay(function () { - times++; - op.times = times; - o.itemsCreator(op, complete); - }, 100); - } - } - - if (!treeNode.children) { - o.itemsCreator(op, complete) - } - }, - - _join: function (valueA, valueB) { - var self = this; - var map = {}; - track([], valueA, valueB); - track([], valueB, valueA); - function track(parent, node, compare) { - BI.each(node, function (n, item) { - if (BI.isNull(compare[n])) { - self._addTreeNode(map, parent, n, item); - } else if (BI.isEmpty(compare[n])) { - self._addTreeNode(map, parent, n, {}); - } else { - track(parent.concat([n]), node[n], compare[n]); - } - }) - } - - return map; - }, - - hasChecked: function () { - return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments); - }, - - getValue: function () { - if (!this.nodes) { - return {}; - } - var checkedValues = this._getSelectedValues(); - if (BI.isEmpty(checkedValues)) { - return BI.deepClone(this.options.paras.selectedValues); - } - if (BI.isEmpty(this.options.paras.selectedValues)) { - return checkedValues; - } - return this._join(checkedValues, this.options.paras.selectedValues); - }, - - //生成树方法 - stroke: function (config) { - delete this.options.keyword; - BI.extend(this.options.paras, config); - var setting = this._configSetting(); - this._initTree(setting); - } -}); - -BI.shortcut("bi.async_tree", BI.AsyncTree);/** - * guy - * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点 - * @class BI.PartTree - * @extends BI.AsyncTree - */ -BI.PartTree = BI.inherit(BI.AsyncTree, { - _defaultConfig: function () { - return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {}) - }, - - _init: function () { - BI.PartTree.superclass._init.apply(this, arguments); - }, - - _loadMore: function () { - var self = this, o = this.options; - var op = BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_INIT_DATA, - times: ++this.times - }); - this.tip.setLoading(); - o.itemsCreator(op, function (d) { - var hasNext = !!d.hasNext, nodes = d.items || []; - o.paras.lastSearchValue = d.lastSearchValue; - if (self._stop === true) { - return; - } - if (!hasNext) { - self.tip.setEnd(); - } else { - self.tip.setLoaded(); - } - if (nodes.length > 0) { - self.nodes.addNodes(null, self._dealWidthNodes(nodes)); - } - }); - }, - - _selectTreeNode: function (treeId, treeNode) { - var self = this, o = this.options; - var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); - var name = this._getNodeValue(treeNode); - if (treeNode.checked === true) { - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - } else { - //如果选中的值中不存在该值不处理 - var t = this.options.paras.selectedValues; - var p = parentValues.concat(name); - for (var i = 0, len = p.length; i < len; i++) { - t = t[p[i]]; - if (t == null) { - return; - } - if (BI.isEmpty(t)) { - break; - } - } - o.itemsCreator(BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_SELECT_DATA, - notSelectedValue: name, - parentValues: parentValues - }), function (new_values) { - self.options.paras.selectedValues = new_values; - BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); - }); - } - }, - - _getSelectedValues: function () { - var self = this; - var hashMap = {}; - var rootNoots = this.nodes.getNodes(); - track(rootNoots); - function track(nodes) { - BI.each(nodes, function (i, node) { - var checkState = node.getCheckStatus(); - if (checkState.checked === false) { - return true; - } - var parentValues = node.parentValues || self._getParentValues(node); - //把文字中的html去掉,其实就是把文字颜色去掉 - var values = parentValues.concat([self._getNodeValue(node)]); - self._buildTree(hashMap, values); -// if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){ -// continue; -// } - if (BI.isNotEmptyArray(node.children)) { - track(node.children); - return true; - } - if (checkState.half === true) { - self._getHalfSelectedValues(hashMap, node); - } - }) - } - - return hashMap; - }, - - _initTree: function (setting, keyword) { - var self = this, o = this.options; - this.times = 1; - var tree = this.tree; - tree.empty(); - self.tip.setVisible(false); - this.loading(); - var op = BI.extend({}, o.paras, { - type: BI.TreeView.REQ_TYPE_INIT_DATA, - times: this.times - }); - var complete = function (d) { - if (self._stop === true || keyword != o.paras.keyword) { - return; - } - var hasNext = !!d.hasNext, nodes = d.items || []; - o.paras.lastSearchValue = d.lastSearchValue; - if (nodes.length > 0) { - callback(self._dealWidthNodes(nodes)); - } - self.setTipVisible(nodes.length <= 0); - self.loaded(); - if (!hasNext) { - self.tip.invisible(); - } else { - self.tip.setLoaded(); - } - self.fireEvent(BI.Events.AFTERINIT); - }; - - function callback(nodes) { - if (self._stop === true) { - return; - } - self.nodes = $.fn.zTree.init(tree.element, setting, nodes); - } - - BI.delay(function () { - o.itemsCreator(op, complete); - }, 100); - }, - - getValue: function () { - var o = this.options; - var result = BI.PartTree.superclass.getValue.apply(this, arguments); - o.itemsCreator({ - type: BI.TreeView.REQ_TYPE_ADJUST_DATA, - selectedValues: result - }, function (res) { - result = res; - }); - return result; - }, - - //生成树方法 - stroke: function (config) { - var o = this.options; - delete o.paras.keyword; - BI.extend(o.paras, config); - delete o.paras.lastSearchValue; - var setting = this._configSetting(); - this._initTree(setting, o.paras.keyword); - } -}); - -BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController(); -BI.Layers = new BI.LayerController(); -BI.Maskers = new BI.MaskersController(); -BI.Bubbles = new BI.BubblesController(); -BI.Tooltips = new BI.TooltipsController(); -BI.Popovers = new BI.FloatBoxController(); -BI.Broadcasts = new BI.BroadcastController(); -BI.StyleLoaders = new BI.StyleLoaderManager();/** - * canvas绘图 - * - * Created by GUY on 2015/11/18. - * @class BI.Canvas - * @extends BI.Widget - */ -BI.Canvas = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-canvas" - }) - }, - - _init: function () { - BI.Canvas.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var canvas = document.createElement("canvas"); - if (!document.createElement('canvas').getContext) { - canvas = window.G_vmlCanvasManager.initElement(canvas); - } - this.element.append(canvas); - canvas.width = o.width; - canvas.height = o.height; - $(canvas).width("100%"); - $(canvas).height("100%"); - this.canvas = canvas; - this._queue = []; - }, - - _getContext: function () { - if (!this.ctx) { - this.ctx = this.canvas.getContext('2d'); - } - return this.ctx; - }, - - _attr: function (key, value) { - var self = this; - if (BI.isNull(key)) { - return; - } - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self._queue.push({k: k, v: v}); - }); - return; - } - this._queue.push({k: key, v: value}); - }, - - _line: function (x0, y0) { - var self = this; - var args = [].slice.call(arguments, 2); - if (BI.isOdd(args.length)) { - this._attr(BI.last(args)); - args = BI.initial(args); - } - this._attr("moveTo", [x0, y0]); - var odd = BI.filter(args, function (i) { - return i % 2 === 0; - }); - var even = BI.filter(args, function (i) { - return i % 2 !== 0; - }); - args = BI.zip(odd, even); - BI.each(args, function (i, point) { - self._attr("lineTo", point); - }); - }, - - line: function (x0, y0, x1, y1) { - this._line.apply(this, arguments); - this._attr("stroke", []); - }, - - rect: function (x, y, w, h, color) { - this._attr("fillStyle", color); - this._attr("fillRect", [x, y, w, h]); - }, - - circle: function (x, y, radius, color) { - this._attr({ - fillStyle: color, - beginPath: [], - arc: [x, y, radius, 0, Math.PI * 2, true], - closePath: [], - fill: [] - }); - }, - - hollow: function () { - this._attr("beginPath", []); - this._line.apply(this, arguments); - this._attr("closePath", []); - this._attr("stroke", []); - }, - - solid: function () { - this.hollow.apply(this, arguments); - this._attr("fill", []); - }, - - gradient: function (x0, y0, x1, y1, start, end) { - var grd = this._getContext().createLinearGradient(x0, y0, x1, y1); - grd.addColorStop(0, start); - grd.addColorStop(1, end); - return grd; - }, - - reset: function () { - this._getContext().clearRect(0, 0, this.canvas.width, this.canvas.height); - }, - - stroke: function (callback) { - var self = this; - BI.nextTick(function () { - var ctx = self._getContext(); - BI.each(self._queue, function (i, q) { - if (BI.isFunction(ctx[q.k])) { - ctx[q.k].apply(ctx, q.v); - } else { - ctx[q.k] = q.v; - } - }); - self._queue = []; - callback && callback(); - }); - } -}); -BI.shortcut("bi.canvas", BI.Canvas);/** - * CollectionView - * - * Created by GUY on 2016/1/15. - * @class BI.CollectionView - * @extends BI.Widget - */ -BI.CollectionView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection", - // width: 400, //必设 - // height: 300, //必设 - overflowX: true, - overflowY: true, - cellSizeAndPositionGetter: BI.emptyFn, - horizontalOverscanSize: 0, - verticalOverscanSize: 0, - scrollLeft: 0, - scrollTop: 0, - items: [] - }); - }, - - _init: function () { - BI.CollectionView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - this._debounceRelease = BI.debounce(function () { - self._scrollLock = false; - }, 1000 / 60); - this.container = BI.createWidget({ - type: "bi.absolute" - }); - this.element.scroll(function () { - if (self._scrollLock === true) { - return; - } - o.scrollLeft = self.element.scrollLeft(); - o.scrollTop = self.element.scrollTop(); - self._calculateChildrenToRender(); - self.fireEvent(BI.CollectionView.EVENT_SCROLL, { - scrollLeft: o.scrollLeft, - scrollTop: o.scrollTop - }); - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - scrollable: o.overflowX === true && o.overflowY === true, - scrolly: o.overflowX === false && o.overflowY === true, - scrollx: o.overflowX === true && o.overflowY === false, - items: [this.container] - }); - if (o.items.length > 0) { - this._calculateSizeAndPositionData(); - this._populate(); - } - if (o.scrollLeft !== 0 || o.scrollTop !== 0) { - BI.nextTick(function () { - self.element.scrollTop(o.scrollTop); - self.element.scrollLeft(o.scrollLeft); - }); - } - }, - - _calculateSizeAndPositionData: function () { - var o = this.options; - var cellMetadata = []; - var sectionManager = new BI.SectionManager(); - var height = 0; - var width = 0; - - for (var index = 0, len = o.items.length; index < len; index++) { - var cellMetadatum = o.cellSizeAndPositionGetter(index); - - if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || - cellMetadatum.width == null || isNaN(cellMetadatum.width) || - cellMetadatum.x == null || isNaN(cellMetadatum.x) || - cellMetadatum.y == null || isNaN(cellMetadatum.y)) { - throw Error(); - } - - height = Math.max(height, cellMetadatum.y + cellMetadatum.height); - width = Math.max(width, cellMetadatum.x + cellMetadatum.width); - - cellMetadatum.index = index; - cellMetadata[index] = cellMetadatum; - sectionManager.registerCell(cellMetadatum, index); - } - - this._cellMetadata = cellMetadata; - this._sectionManager = sectionManager; - this._height = height; - this._width = width; - }, - - _cellRenderers: function (height, width, x, y) { - this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y); - return this._cellGroupRenderer() - }, - - _cellGroupRenderer: function () { - var self = this, o = this.options; - var rendered = []; - BI.each(this._lastRenderedCellIndices, function (i, index) { - var cellMetadata = self._sectionManager.getCellMetadata(index); - rendered.push(cellMetadata); - }); - return rendered; - }, - - _calculateChildrenToRender: function () { - var self = this, o = this.options; - var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()); - var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()); - var left = Math.max(0, scrollLeft - o.horizontalOverscanSize); - var top = Math.max(0, scrollTop - o.verticalOverscanSize); - var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize); - var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize); - if (right > 0 && bottom > 0) { - //如果滚动的区间并没有超出渲染的范围 - if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { - return; - } - var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top); - var renderedCells = [], renderedKeys = [], renderedWidgets = {}; - //存储所有的left和top - var lefts = {}, tops = {}; - for (var i = 0, len = childrenToDisplay.length; i < len; i++) { - var datum = childrenToDisplay[i]; - lefts[datum.x] = datum.x; - lefts[datum.x + datum.width] = datum.x + datum.width; - tops[datum.y] = datum.y; - tops[datum.y + datum.height] = datum.y + datum.height; - } - lefts = BI.toArray(lefts); - tops = BI.toArray(tops); - var leftMap = BI.invert(lefts); - var topMap = BI.invert(tops); - //存储上下左右四个边界 - var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {}; - var assertMinBorder = function (border, offset) { - if (border[offset] == null) { - border[offset] = Number.MAX_VALUE; - } - }; - var assertMaxBorder = function (border, offset) { - if (border[offset] == null) { - border[offset] = 0; - } - }; - for (var i = 0, len = childrenToDisplay.length; i < len; i++) { - var datum = childrenToDisplay[i]; - var index = BI.deepIndexOf(this.renderedKeys, datum.index); - var child; - if (index > -1) { - if (datum.width !== this.renderedCells[index]._width) { - this.renderedCells[index]._width = datum.width; - this.renderedCells[index].el.setWidth(datum.width); - } - if (datum.height !== this.renderedCells[index]._height) { - this.renderedCells[index]._height = datum.height; - this.renderedCells[index].el.setHeight(datum.height); - } - if (this.renderedCells[index]._left !== datum.x) { - this.renderedCells[index].el.element.css("left", datum.x + "px"); - } - if (this.renderedCells[index]._top !== datum.y) { - this.renderedCells[index].el.element.css("top", datum.y + "px"); - } - renderedCells.push(child = this.renderedCells[index]); - } else { - child = BI.createWidget(BI.extend({ - type: "bi.label", - width: datum.width, - height: datum.height - }, o.items[datum.index], { - cls: (o.items[datum.index].cls || "") + " container-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), - _left: datum.x, - _top: datum.y - })); - renderedCells.push({ - el: child, - left: datum.x, - top: datum.y, - _left: datum.x, - _top: datum.y, - _width: datum.width, - _height: datum.height - }); - } - var startTopIndex = topMap[datum.y] | 0; - var endTopIndex = topMap[datum.y + datum.height] | 0; - for (var k = startTopIndex; k <= endTopIndex; k++) { - var t = tops[k]; - assertMinBorder(leftBorder, t); - assertMaxBorder(rightBorder, t); - leftBorder[t] = Math.min(leftBorder[t], datum.x); - rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width); - } - var startLeftIndex = leftMap[datum.x] | 0; - var endLeftIndex = leftMap[datum.x + datum.width] | 0; - for (var k = startLeftIndex; k <= endLeftIndex; k++) { - var l = lefts[k]; - assertMinBorder(topBorder, l); - assertMaxBorder(bottomBorder, l); - topBorder[l] = Math.min(topBorder[l], datum.y); - bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height); - } - - renderedKeys.push(datum.index); - renderedWidgets[i] = child; - } - //已存在的, 需要添加的和需要删除的 - var existSet = {}, addSet = {}, deleteArray = []; - BI.each(renderedKeys, function (i, key) { - if (BI.deepContains(self.renderedKeys, key)) { - existSet[i] = key; - } else { - addSet[i] = key; - } - }); - BI.each(this.renderedKeys, function (i, key) { - if (BI.deepContains(existSet, key)) { - return; - } - if (BI.deepContains(addSet, key)) { - return; - } - deleteArray.push(i); - }); - BI.each(deleteArray, function (i, index) { - //性能优化,不调用destroy方法防止触发destroy事件 - self.renderedCells[index].el._destroy(); - }); - var addedItems = []; - BI.each(addSet, function (index) { - addedItems.push(renderedCells[index]) - }); - this.container.addItems(addedItems); - //拦截父子级关系 - this.container._children = renderedWidgets; - this.container.attr("items", renderedCells); - this.renderedCells = renderedCells; - this.renderedKeys = renderedKeys; - - //Todo 左右比较特殊 - var minX = BI.min(leftBorder); - var maxX = BI.max(rightBorder); - - var minY = BI.max(topBorder); - var maxY = BI.min(bottomBorder); - - this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; - } - }, - - _getMaxScrollLeft: function () { - return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); - }, - - _getMaxScrollTop: function () { - return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); - }, - - _populate: function (items) { - var o = this.options; - this._reRange(); - if (items && items !== this.options.items) { - this.options.items = items; - this._calculateSizeAndPositionData(); - } - if (o.items.length > 0) { - this.container.setWidth(this._width); - this.container.setHeight(this._height); - - this._calculateChildrenToRender(); - this.element.scrollTop(o.scrollTop); - this.element.scrollLeft(o.scrollLeft); - } - }, - - setScrollLeft: function (scrollLeft) { - if (this.options.scrollLeft === scrollLeft) { - return; - } - this._scrollLock = true; - this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollLeft(this.options.scrollLeft); - }, - - setScrollTop: function (scrollTop) { - if (this.options.scrollTop === scrollTop) { - return; - } - this._scrollLock = true; - this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollTop(this.options.scrollTop); - }, - - setOverflowX: function (b) { - var self = this; - if (this.options.overflowX !== !!b) { - this.options.overflowX = !!b; - BI.nextTick(function () { - self.element.css({overflowX: !!b ? "auto" : "hidden"}); - }); - } - }, - - setOverflowY: function (b) { - var self = this; - if (this.options.overflowY !== !!b) { - this.options.overflowY = !!b; - BI.nextTick(function () { - self.element.css({overflowY: !!b ? "auto" : "hidden"}); - }); - } - }, - - getScrollLeft: function () { - return this.options.scrollLeft; - }, - - getScrollTop: function () { - return this.options.scrollTop; - }, - - getMaxScrollLeft: function () { - return this._getMaxScrollLeft(); - }, - - getMaxScrollTop: function () { - return this._getMaxScrollTop(); - }, - - //重新计算children - _reRange: function () { - this.renderRange = {}; - }, - - _clearChildren: function () { - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - BI.each(this.renderedCells, function (i, cell) { - cell.el._destroy(); - }); - this._clearChildren(); - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - }, - - populate: function (items) { - if (items && items !== this.options.items) { - this.restore(); - } - this._populate(items); - } -}); -BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut('bi.collection_view', BI.CollectionView);/** - * @class BI.Combo - * @extends BI.Widget - */ -BI.Combo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-combo", - trigger: "click", - toggle: true, - direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right - isDefaultInit: false, - destroyWhenHide: false, - isNeedAdjustHeight: true,//是否需要高度调整 - isNeedAdjustWidth: true, - stopEvent: false, - stopPropagation: false, - adjustLength: 0,//调整的距离 - adjustXOffset: 0, - adjustYOffset: 0, - hideChecker: BI.emptyFn, - offsetStyle: "left", //left,right,center - el: {}, - popup: {}, - comboClass: "bi-combo-popup", - hoverClass: "bi-combo-hover" - }) - }, - - _init: function () { - BI.Combo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._initCombo(); - this._initPullDownAction(); - this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); - } - } - }); - - self.element.on("mouseenter." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self.element.addClass(o.hoverClass); - } - }); - self.element.on("mouseleave." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self.element.removeClass(o.hoverClass); - } - }); - - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.combo} - ] - }); - o.isDefaultInit && (this._assertPopupView()); - BI.Resizers.add(this.getName(), BI.bind(function () { - if (this.isViewVisible()) { - this._hideView(); - } - }, this)); - }, - - _toggle: function () { - this._assertPopupViewRender(); - if (this.popupView.isVisible()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - var st = function (e) { - if (o.stopEvent) { - e.stopEvent(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - }; - BI.each(evs, function (i, ev) { - switch (ev) { - case "hover": - self.element.on("mouseenter." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } - }); - self.element.on("mouseleave." + self.getName(), function (e) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); - self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - }); - break; - case "click": - var debounce = BI.debounce(function (e) { - if (self.combo.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isViewVisible()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); - self.fireEvent(BI.Combo.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); - self.fireEvent(BI.Combo.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true); - self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { - debounce(e); - st(e); - }); - break; - } - }); - }, - - _initCombo: function () { - this.combo = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this; - if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { - type: "bi.popup_view" - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - self.combo.setValue(self.getValue()); - self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.popupView.setVisible(false); - BI.nextTick(function () { - self.fireEvent(BI.Combo.EVENT_AFTER_INIT); - }); - } - }, - - _assertPopupViewRender: function () { - this._assertPopupView(); - if (!this._rendered) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - this._rendered = true; - } - }, - - _hideIf: function (e) { - // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) { - // return; - // } - if (this.element.find(e.target).length > 0) { - return; - } - var isHide = this.options.hideChecker.apply(this, [e]); - if (isHide === false) { - return; - } - this._hideView(); - }, - - _hideView: function () { - this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); - if (this.options.destroyWhenHide === true) { - this.popupView && this.popupView.destroy(); - this.popupView = null; - this._rendered = false; - } else { - this.popupView && this.popupView.invisible(); - } - this.element.removeClass(this.options.comboClass); - - $(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); - this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); - }, - - _popupView: function () { - this._assertPopupViewRender(); - this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); - - this.popupView.visible(); - this.adjustWidth(); - this.adjustHeight(); - - this.element.addClass(this.options.comboClass); - $(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); - this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); - }, - - adjustWidth: function () { - var o = this.options; - if (!this.popupView) { - return; - } - if (o.isNeedAdjustWidth === true) { - this.resetListWidth(""); - var width = this.popupView.element.outerWidth(); - var maxW = this.element.outerWidth() || o.width; - if (width > maxW + 80) { - maxW = maxW + 80; - } else if (width > maxW) { - maxW = width; - } - this.resetListWidth(maxW < 100 ? 100 : maxW); - } - }, - - adjustHeight: function () { - var o = this.options, p = {}; - if (!this.popupView) { - return; - } - var isVisible = this.popupView.isVisible(); - this.popupView.visible(); - switch (o.direction) { - case "bottom": - case "bottom,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle); - break; - case "top": - case "top,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); - break; - case "left": - case "left,bottom": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle); - break; - case "right": - case "right,bottom": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle); - break; - case "top,left": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle); - break; - case "bottom,left": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle); - break; - case "left,top": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle); - break; - case "right,top": - p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle); - break; - case "top,custom": - case "custom,top": - p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); - break; - case "custom,bottom": - case "bottom,custom": - p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); - break; - case "left,custom": - case "custom,left": - p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); - delete p.top; - delete p.adaptHeight; - break; - case "custom,right": - case "right,custom": - p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); - delete p.top; - delete p.adaptHeight; - break; - } - - if ("adaptHeight" in p) { - this.resetListHeight(p['adaptHeight']); - } - if ("left" in p) { - this.popupView.element.css({ - left: p.left - }); - } - if ("top" in p) { - this.popupView.element.css({ - top: p.top - }); - } - this.position = p; - this.popupView.setVisible(isVisible); - }, - - resetListHeight: function (h) { - this._assertPopupView(); - this.popupView.resetHeight && this.popupView.resetHeight(h); - }, - - resetListWidth: function (w) { - this._assertPopupView(); - this.popupView.resetWidth && this.popupView.resetWidth(w); - }, - - populate: function (items) { - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - this.combo.populate.apply(this.combo, arguments); - }, - - _setEnable: function (arg) { - BI.Combo.superclass._setEnable.apply(this, arguments); - !arg && this.element.removeClass(this.options.hoverClass); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - this._assertPopupView(); - this.combo.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - this._assertPopupView(); - return this.popupView && this.popupView.getValue(); - }, - - isViewVisible: function () { - return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible(); - }, - - showView: function () { - if (this.isEnabled() && this.combo.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - getPopupPosition: function () { - return this.position; - }, - - toggle: function () { - this._toggle(); - }, - - destroy: function () { - $(document).unbind("mousedown." + this.getName()) - .unbind("mousewheel." + this.getName()) - .unbind("mouseenter." + this.getName()) - .unbind("mousemove." + this.getName()) - .unbind("mouseleave." + this.getName()); - BI.Resizers.remove(this.getName()); - BI.Combo.superclass.destroy.apply(this, arguments); - } -}); -BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Combo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Combo.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Combo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Combo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Combo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.combo", BI.Combo);/** - * - * 某个可以展开的节点 - * - * Created by GUY on 2015/9/10. - * @class BI.Expander - * @extends BI.Widget - */ -BI.Expander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-expander", - trigger: "click", - toggle: true, - //direction: "bottom", //top,bottom四个方向 - isDefaultInit: false, //是否默认初始化子节点 - el: {}, - popup: {}, - expanderClass: "bi-expander-popup", - hoverClass: "bi-expander-hover" - }) - }, - - _init: function () { - BI.Expander.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._expanded = !!o.el.open; - this._initExpander(); - this._initPullDownAction(); - this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); - } - } - }); - - this.element.hover(function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self.element.addClass(o.hoverClass); - } - }, function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self.element.removeClass(o.hoverClass); - } - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.expander} - ] - }); - o.isDefaultInit && this._assertPopupView(); - if (this.expander.isOpened() === true) { - this._popupView(); - } - }, - - _toggle: function () { - this._assertPopupViewRender(); - if (this.popupView.isVisible()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - BI.each(evs, function (i, e) { - switch (e) { - case "hover": - self.element[e](function (e) { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } - }, function () { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - }); - break; - default : - if (e) { - self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { - if (self.expander.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isExpanded()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander); - self.fireEvent(BI.Expander.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true)); - } - break; - } - }) - }, - - _initExpander: function () { - this.expander = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this; - if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { - type: "bi.button_group", - cls: "expander-popup", - layouts: [{ - type: "bi.vertical", - hgap: 0, - vgap: 0 - }] - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - //self.setValue(self.getValue()); - self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj); - } - }); - this.popupView.setVisible(this.isExpanded()); - BI.nextTick(function () { - self.fireEvent(BI.Expander.EVENT_AFTER_INIT); - }); - } - }, - - _assertPopupViewRender: function () { - this._assertPopupView(); - if (!this._rendered) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - this._rendered = true; - } - }, - - _hideView: function () { - this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW); - this._expanded = false; - this.expander.setOpened(false); - this.popupView && this.popupView.invisible(); - this.element.removeClass(this.options.expanderClass); - - this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW); - }, - - _popupView: function () { - this._assertPopupViewRender(); - this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW); - this._expanded = true; - this.expander.setOpened(true); - this.popupView.visible(); - this.element.addClass(this.options.expanderClass); - this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW); - }, - - populate: function (items) { - //this._assertPopupView(); - this.popupView && this.popupView.populate.apply(this.popupView, arguments); - this.expander.populate.apply(this.expander, arguments); - }, - - _setEnable: function (arg) { - BI.Expander.superclass._setEnable.apply(this, arguments); - !arg && this.element.removeClass(this.options.hoverClass); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - //this._assertPopupView(); - this.expander.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - //this._assertPopupView(); - return this.popupView ? this.popupView.getValue() : []; - }, - - isViewVisible: function () { - return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible(); - }, - - isExpanded: function () { - return this._expanded; - }, - - showView: function () { - if (this.isEnabled() && this.expander.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - getAllLeaves: function () { - return this.popupView && this.popupView.getAllLeaves(); - }, - - getNodeById: function (id) { - if (this.expander.options.id === id) { - return this.expander; - } - return this.popupView && this.popupView.getNodeById(id); - }, - - getNodeByValue: function (value) { - if (this.expander.getValue() === value) { - return this.expander; - } - return this.popupView && this.popupView.getNodeByValue(value); - }, - - destroy: function () { - BI.Expander.superclass.destroy.apply(this, arguments); - } -}); -BI.Expander.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Expander.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Expander.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Expander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Expander.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Expander.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.expander", BI.Expander);/** - * Created by GUY on 2015/8/10. - */ - -BI.ComboGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-combo-group bi-list-item", - - //以下这些属性对每一个combo都是公用的 - trigger: "click,hover", - direction: "right", - adjustLength: 0, - isDefaultInit: false, - isNeedAdjustHeight: false, - isNeedAdjustWidth: false, - - el: {type: "bi.text_button", text: "", value: ""}, - children: [], - - popup: { - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - } - } - }) - }, - - _init: function () { - BI.ComboGroup.superclass._init.apply(this, arguments); - this.populate(this.options.el); - }, - - populate: function (item) { - var self = this, o = this.options; - var children = o.children; - if (BI.isEmpty(children)) { - throw new Error("ComboGroup构造错误"); - } - BI.each(children, function (i, ch) { - var son = BI.formatEL(ch).el.children; - ch = BI.formatEL(ch).el; - if (!BI.isEmpty(son)) { - ch.el = BI.clone(ch); - ch.children = son; - ch.type = "bi.combo_group"; - ch.action = o.action; - ch.height = o.height; - ch.direction = o.direction; - ch.isDefaultInit = o.isDefaultInit; - ch.isNeedAdjustHeight = o.isNeedAdjustHeight; - ch.isNeedAdjustWidth = o.isNeedAdjustWidth; - ch.adjustLength = o.adjustLength; - ch.popup = o.popup; - } - }) - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - height: o.height, - trigger: o.trigger, - direction: o.direction, - isDefaultInit: o.isDefaultInit, - isNeedAdjustWidth: o.isNeedAdjustWidth, - isNeedAdjustHeight: o.isNeedAdjustHeight, - adjustLength: o.adjustLength, - el: item, - popup: BI.extend({}, o.popup, { - el: BI.extend({ - items: children - }, o.popup.el) - }) - }) - this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj); - } - }) - }, - - getValue: function () { - return this.combo.getValue(); - }, - - setValue: function (v) { - this.combo.setValue(v); - } -}); -BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-virtual-group", - items: [], - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }) - }, - - render: function () { - this.populate(this.options.items); - }, - - _packageBtns: function (items) { - var o = this.options; - - for (var i = o.layouts.length - 1; i > 0; i--) { - items = BI.map(items, function (k, it) { - return BI.extend({}, o.layouts[i], { - items: [ - BI.extend({}, o.layouts[i].el, { - el: BI.stripEL(it) - }) - ] - }) - }) - } - return items; - }, - - _packageItems: function (items, packBtns) { - return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); - }, - - _packageLayout: function (items) { - var o = this.options, layout = BI.deepClone(o.layouts[0]); - - var lay = BI.formatEL(layout).el; - while (lay && lay.items && !BI.isEmpty(lay.items)) { - lay = BI.formatEL(lay.items[0]).el; - } - lay.items = items; - return layout; - }, - - addItems: function (items) { - this.layouts.addItems(items); - }, - - prependItems: function (items) { - this.layouts.prependItems(items); - }, - - setValue: function (v) { - this.layouts.setValue(v); - }, - - getValue: function () { - return this.layouts.getValue(); - }, - - empty: function () { - this.layouts.empty(); - }, - - populate: function (items) { - var self = this; - items = items || []; - this.options.items = items; - items = this._packageBtns(items); - if (!this.layouts) { - this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); - } else { - this.layouts.populate(items); - } - } -}); -BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.virtual_group", BI.VirtualGroup);/** - * 加载控件 - * - * Created by GUY on 2015/8/31. - * @class BI.Loader - * @extends BI.Widget - */ -BI.Loader = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-loader", - - direction: "top", - isDefaultInit: true,//是否默认初始化数据 - logic: { - dynamic: true, - scrolly: true - }, - - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, - - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, - - //下面是分页信息 - count: false, - prev: false, - next: {}, - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn - }) - }, - - _prevLoad: function () { - var self = this, o = this.options; - this.prev.setLoading(); - o.itemsCreator.apply(this, [{times: --this.times}, function () { - self.prev.setLoaded(); - self.prependItems.apply(self, arguments); - }]); - }, - - _nextLoad: function () { - var self = this, o = this.options; - this.next.setLoading(); - o.itemsCreator.apply(this, [{times: ++this.times}, function () { - self.next.setLoaded(); - self.addItems.apply(self, arguments); - }]); - }, - - _init: function () { - BI.Loader.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.itemsCreator === false) { - o.prev = false; - o.next = false; - } - if (o.prev !== false) { - this.prev = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.prev)); - this.prev.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._prevLoad(); - } - }); - } - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - chooseType: 0, - items: o.items, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Loader.EVENT_CHANGE, obj); - } - }); - - if (o.next !== false) { - this.next = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.next)); - this.next.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._nextLoad(); - } - }) - } - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ - scrolly: true - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next) - })))); - - o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { - o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); - }, this)); - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - hasPrev: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasPrev.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - hasNext: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasNext.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - prependItems: function (items) { - this.count += items.length; - if (this.next !== false) { - if (this.hasPrev()) { - this.options.items = this.options.items.concat(items); - this.prev.setLoaded(); - } else { - this.prev.setEnd(); - } - } - this.button_group.prependItems.apply(this.button_group, arguments); - }, - - addItems: function (items) { - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.options.items = this.options.items.concat(items); - this.next.setLoaded(); - } else { - this.next.setEnd(); - } - } - this.button_group.addItems.apply(this.button_group, arguments); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { - o.itemsCreator.apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("arguments can not be null!!!"); - } - self.populate.apply(self, arguments); - o.onLoaded(); - }]); - return; - } - this.options.items = items; - this.times = 1; - this.count = 0; - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.next.setLoaded(); - } else { - this.next.invisible(); - } - } - if (BI.isObject(this.prev)) { - if (this.hasPrev()) { - this.prev.setLoaded(); - } else { - this.prev.invisible(); - } - } - this.button_group.populate.apply(this.button_group, arguments); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - }, - - empty: function () { - this.button_group.empty(); - BI.each([this.prev, this.next], function (i, ob) { - ob && ob.setVisible(false); - }); - }, - - destroy: function () { - BI.Loader.superclass.destroy.apply(this, arguments); - } -}); -BI.Loader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.loader", BI.Loader);/** - * Created by GUY on 2015/6/26. - */ - -BI.Navigation = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), { - direction: "bottom",//top, bottom, left, right, custom - logic: { - dynamic: false - }, - single: false, - defaultShowIndex: false, - tab: false, - cardCreator: function (v) { - return BI.createWidget(); - }, - - afterCardCreated: BI.emptyFn, - afterCardShow: BI.emptyFn - }) - }, - - render: function () { - var self = this, o = this.options; - this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); - this.cardMap = {}; - this.showIndex = 0; - this.layout = BI.createWidget({ - type: "bi.card" - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) - })))); - - - new BI.ShowListener({ - eventObj: this.tab, - cardLayout: this.layout, - cardNameCreator: function (v) { - return self.showIndex + v; - }, - cardCreator: function (v) { - var card = o.cardCreator(v); - self.cardMap[v] = card; - return card; - }, - afterCardCreated: BI.bind(this.afterCardCreated, this), - afterCardShow: BI.bind(this.afterCardShow, this) - }); - }, - - mounted: function () { - var o = this.options; - if (o.defaultShowIndex !== false) { - this.setSelect(o.defaultShowIndex); - } - }, - - _deleteOtherCards: function (currCardName) { - var self = this, o = this.options; - if (o.single === true) { - BI.each(this.cardMap, function (name, card) { - if (name !== (currCardName + "")) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - } - }); - } - }, - - afterCardCreated: function (v) { - var self = this; - this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Navigation.EVENT_CHANGE, obj); - } - }); - this.options.afterCardCreated.apply(this, arguments); - }, - - afterCardShow: function (v) { - this.showIndex = v; - this._deleteOtherCards(v); - this.options.afterCardShow.apply(this, arguments); - }, - - populate: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.populate.apply(card, arguments); - } - }, - - _assertCard: function (v) { - if (!this.layout.isCardExisted(v)) { - var card = this.options.cardCreator(v); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); - this.afterCardCreated(v); - } - }, - - setSelect: function (v) { - this._assertCard(v); - this.layout.showCardByName(v); - this._deleteOtherCards(v); - if (this.showIndex !== v) { - this.showIndex = v; - BI.nextTick(BI.bind(this.afterCardShow, this, v)); - } - }, - - getSelect: function () { - return this.showIndex; - }, - - getSelectedCard: function () { - if (BI.isKey(this.showIndex)) { - return this.cardMap[this.showIndex]; - } - }, - - /** - * @override - */ - setValue: function (v) { - var card = this.layout.getShowingCard(); - if (card) { - card.setValue(v); - } - }, - - /** - * @override - */ - getValue: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.getValue(); - } - }, - - empty: function () { - this.layout.deleteAllCard(); - this.cardMap = {}; - }, - - destroy: function () { - BI.Navigation.superclass.destroy.apply(this, arguments); - } -}); -BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.navigation", BI.Navigation);/** - * 搜索逻辑控件 - * - * Created by GUY on 2015/9/28. - * @class BI.Searcher - * @extends BI.Widget - */ - -BI.Searcher = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-searcher", - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - - isDefaultInit: false, - isAutoSearch: true, //是否自动搜索 - isAutoSync: true, //是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一 - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - - //isAutoSearch为false时启用 - onSearch: function (op, callback) { - callback([]) - }, - - el: { - type: "bi.search_editor" - }, - - popup: { - type: "bi.searcher_view" - }, - - adapter: null, - masker: { //masker层 - offset: {} - } - }) - }, - - _init: function () { - BI.Searcher.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.editor = BI.createWidget(o.el, { - type: "bi.search_editor" - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap, - items: [this.editor] - }); - o.isDefaultInit && (this._assertPopupView()); - - var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, true); - this.editor.on(BI.Controller.EVENT_CHANGE, function (type) { - switch (type) { - case BI.Events.STARTEDIT: - self._startSearch(); - break; - case BI.Events.EMPTY: - self._stopSearch(); - break; - case BI.Events.CHANGE: - search(); - break; - case BI.Events.PAUSE: - self._pauseSearch(); - break; - } - }) - }, - - _assertPopupView: function () { - var self = this, o = this.options; - if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) { - this.popupView = BI.createWidget(o.popup, { - type: "bi.searcher_view", - chooseType: o.chooseType - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - if (o.isAutoSync) { - var values = o.adapter && o.adapter.getValue(); - if (!obj.isSelected()) { - o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); - } else { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - o.adapter && o.adapter.setValue([obj.getValue()]); - break; - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - values.push(obj.getValue()); - o.adapter && o.adapter.setValue(values); - break; - } - } - } - self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); - } - }); - BI.nextTick(function () { - self.fireEvent(BI.Searcher.EVENT_AFTER_INIT); - }); - } - if (o.masker && !BI.Maskers.has(this.getName())) { - BI.Maskers.create(this.getName(), o.adapter, BI.extend({ - container: this, - render: this.popupView - }, o.masker)); - } - }, - - _startSearch: function () { - this._assertPopupView(); - this._stop = false; - this._isSearching = true; - this.fireEvent(BI.Searcher.EVENT_START); - this.popupView.startSearch && this.popupView.startSearch(); - //搜索前先清空dom - // BI.Maskers.get(this.getName()).empty(); - BI.nextTick(function (name) { - BI.Maskers.show(name); - }, this.getName()); - }, - - _pauseSearch: function () { - var o = this.options, name = this.getName(); - this._stop = true; - BI.nextTick(function (name) { - BI.Maskers.hide(name); - }, this.getName()); - if (this._isSearching === true) { - this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch(); - this.fireEvent(BI.Searcher.EVENT_PAUSE); - } - this._isSearching = false; - }, - - _stopSearch: function () { - var o = this.options, name = this.getName(); - this._stop = true; - BI.Maskers.hide(name); - if (this._isSearching === true) { - this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); - this.fireEvent(BI.Searcher.EVENT_STOP); - } - this._isSearching = false; - }, - - _search: function () { - var self = this, o = this.options, keyword = this.editor.getValue(); - if (keyword === "" || this._stop) { - return; - } - if (o.isAutoSearch) { - var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || []; - var finding = BI.Func.getSearchResult(items, keyword); - var matched = finding.matched, finded = finding.finded; - this.popupView.populate(finded, matched, keyword); - o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue()); - self.fireEvent(BI.Searcher.EVENT_SEARCHING); - return; - } - this.popupView.loading && this.popupView.loading(); - o.onSearch({ - times: 1, - keyword: keyword, - selectedValues: o.adapter && o.adapter.getValue() - }, function (searchResult, matchResult) { - if (!self._stop) { - var args = [].slice.call(arguments); - if (args.length > 0) { - args.push(keyword); - } - BI.Maskers.show(self.getName()); - self.popupView.populate.apply(self.popupView, args); - o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue()); - self.popupView.loaded && self.popupView.loaded(); - self.fireEvent(BI.Searcher.EVENT_SEARCHING); - } - }); - }, - - setAdapter: function (adapter) { - this.options.adapter = adapter; - BI.Maskers.remove(this.getName()); - }, - - doSearch: function () { - if (this.isSearching()) { - this._search(); - } - }, - - stopSearch: function () { - this._stopSearch();//先停止搜索,然后再去设置editor为空 - //important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常) - try { - this.editor.blur(); - } catch (e) { - if (!this.editor.blur) { - throw new Error("editor没有实现blur方法"); - } - } finally { - this.editor.setValue(""); - } - }, - - isSearching: function () { - return this._isSearching; - }, - - isViewVisible: function () { - return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName()); - }, - - getView: function () { - return this.popupView; - }, - - hasMatched: function () { - this._assertPopupView(); - return this.popupView.hasMatched(); - }, - - adjustHeight: function () { - if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) { - BI.Maskers.show(this.getName()); - } - }, - - adjustView: function () { - this.isViewVisible() && BI.Maskers.show(this.getName()); - }, - - setValue: function (v) { - this._assertPopupView(); - this.popupView && this.popupView.setValue(v); - }, - - getKeyword: function () { - return this.editor.getValue(); - }, - - getKeywords: function () { - return this.editor.getKeywords(); - }, - - getValue: function () { - var o = this.options; - if (o.isAutoSync && o.adapter && o.adapter.getValue) { - return o.adapter.getValue(); - } - if (this.isSearching()) { - return this.popupView.getValue(); - } else if (o.adapter && o.adapter.getValue) { - return o.adapter.getValue(); - } else { - return this.popupView.getValue(); - } - }, - - populate: function (result, searchResult, keyword) { - var o = this.options; - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - if (o.isAutoSync && o.adapter && o.adapter.getValue) { - this.popupView.setValue(o.adapter.getValue()); - } - }, - - empty: function () { - this.popupView && this.popupView.empty(); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - BI.Searcher.superclass.destroy.apply(this, arguments); - } -}); -BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Searcher.EVENT_START = "EVENT_START"; -BI.Searcher.EVENT_STOP = "EVENT_STOP"; -BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING"; -BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - -BI.shortcut("bi.searcher", BI.Searcher);/** - * - * 切换显示或隐藏面板 - * - * Created by GUY on 2015/11/2. - * @class BI.Switcher - * @extends BI.Widget - */ -BI.Switcher = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-switcher", - direction: BI.Direction.Top, - trigger: "click", - toggle: true, - el: {}, - popup: {}, - adapter: null, - masker: {}, - switcherClass: "bi-switcher-popup", - hoverClass: "bi-switcher-hover" - }) - }, - - _init: function () { - BI.Switcher.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this._initSwitcher(); - this._initPullDownAction(); - this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self.isEnabled() && self.isValid()) { - if (type === BI.Events.EXPAND) { - self._popupView(); - } - if (type === BI.Events.COLLAPSE) { - self._hideView(); - } - if (type === BI.Events.EXPAND) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } - if (type === BI.Events.COLLAPSE) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); - } - } - }); - - this.element.hover(function () { - if (self.isEnabled() && self.switcher.isEnabled()) { - self.element.addClass(o.hoverClass); - } - }, function () { - if (self.isEnabled() && self.switcher.isEnabled()) { - self.element.removeClass(o.hoverClass); - } - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.switcher} - ] - }); - o.isDefaultInit && (this._assertPopupView()); - }, - - _toggle: function () { - this._assertPopupView(); - if (this.isExpanded()) { - this._hideView(); - } else { - if (this.isEnabled()) { - this._popupView(); - } - } - }, - - _initPullDownAction: function () { - var self = this, o = this.options; - var evs = this.options.trigger.split(","); - BI.each(evs, function (i, e) { - switch (e) { - case "hover": - self.element[e](function (e) { - if (self.isEnabled() && self.switcher.isEnabled()) { - self._popupView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } - }, function () { - if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) { - self._hideView(); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - }); - break; - default : - if (e) { - self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { - if (self.switcher.element.__isMouseInBounds__(e)) { - if (self.isEnabled() && self.switcher.isEnabled()) { - o.toggle ? self._toggle() : self._popupView(); - if (self.isExpanded()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_EXPAND); - } else { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); - self.fireEvent(BI.Switcher.EVENT_COLLAPSE); - } - } - } - }, BI.EVENT_RESPONSE_TIME, true)); - } - break; - } - }) - }, - - _initSwitcher: function () { - this.switcher = BI.createWidget(this.options.el); - }, - - _assertPopupView: function () { - var self = this, o = this.options; - if (!this._created) { - this.popupView = BI.createWidget(o.popup, { - type: "bi.button_group", - element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)), - cls: "switcher-popup", - layouts: [{ - type: "bi.vertical", - hgap: 0, - vgap: 0 - }] - }); - this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj); - } - }); - if (o.direction !== BI.Direction.Custom && !o.adapter) { - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [ - {el: this.popupView} - ] - }); - } - this._created = true; - BI.nextTick(function () { - self.fireEvent(BI.Switcher.EVENT_AFTER_INIT); - }); - } - }, - - _hideView: function () { - this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW); - var self = this, o = this.options; - o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); - BI.nextTick(function () { - o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); - self.element.removeClass(o.switcherClass); - self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW); - }); - }, - - _popupView: function () { - var self = this, o = this.options; - this._assertPopupView(); - this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW); - o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true); - BI.nextTick(function (name) { - o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true); - self.element.addClass(o.switcherClass); - self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW); - }, this.getName()); - }, - - populate: function (items) { - this._assertPopupView(); - this.popupView.populate.apply(this.popupView, arguments); - this.switcher.populate.apply(this.switcher, arguments); - }, - - _setEnable: function (arg) { - BI.Switcher.superclass._setEnable.apply(this, arguments); - !arg && this.isViewVisible() && this._hideView(); - }, - - setValue: function (v) { - this._assertPopupView(); - this.switcher.setValue(v); - this.popupView && this.popupView.setValue(v); - }, - - getValue: function () { - this._assertPopupView(); - return this.popupView ? this.popupView.getValue() : []; - }, - - setAdapter: function (adapter) { - this.options.adapter = adapter; - BI.Maskers.remove(this.getName()); - }, - - isViewVisible: function () { - return this.isEnabled() && this.switcher.isEnabled() && - (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible())); - }, - - isExpanded: function () { - return this.isViewVisible(); - }, - - showView: function () { - if (this.isEnabled() && this.switcher.isEnabled()) { - this._popupView(); - } - }, - - hideView: function () { - this._hideView(); - }, - - getView: function () { - return this.popupView; - }, - - adjustView: function () { - this.isViewVisible() && BI.Maskers.show(this.getName()); - }, - - getAllLeaves: function () { - return this.popupView && this.popupView.getAllLeaves(); - }, - - getNodeById: function (id) { - if (this.switcher.attr("id") === id) { - return this.switcher; - } - return this.popupView && this.popupView.getNodeById(id); - }, - - getNodeByValue: function (value) { - if (this.switcher.getValue() === value) { - return this.switcher; - } - return this.popupView && this.popupView.getNodeByValue(value); - }, - - empty: function () { - this.popupView && this.popupView.empty(); - }, - - destroy: function () { - BI.Switcher.superclass.destroy.apply(this, arguments); - } -}); -BI.Switcher.EVENT_EXPAND = "EVENT_EXPAND"; -BI.Switcher.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.Switcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.Switcher.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Switcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; - - -BI.Switcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - -BI.shortcut("bi.switcher", BI.Switcher);/** - * Created by GUY on 2015/6/26. - */ - -BI.Tab = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-tab", - direction: "top",//top, bottom, left, right, custom - single: false, //是不是单页面 - logic: { - dynamic: false - }, - defaultShowIndex: false, - tab: false, - cardCreator: function (v) { - return BI.createWidget(); - } - }) - }, - - render: function () { - var self = this, o = this.options; - if (BI.isObject(o.tab)) { - this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); - this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - } - this.cardMap = {}; - this.layout = BI.createWidget({ - type: "bi.card" - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) - })))); - - var listener = new BI.ShowListener({ - eventObj: this.tab, - cardLayout: this.layout, - cardCreator: function (v) { - var card = o.cardCreator.apply(self, arguments); - self.cardMap[v] = card; - return card; - }, - afterCardShow: function (v) { - self._deleteOtherCards(v); - self.curr = v; - } - }); - listener.on(BI.ShowListener.EVENT_CHANGE, function (value) { - self.fireEvent(BI.Tab.EVENT_CHANGE, value, self); - }); - }, - - _deleteOtherCards: function (currCardName) { - var self = this, o = this.options; - if (o.single === true) { - BI.each(this.cardMap, function (name, card) { - if (name !== (currCardName + "")) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - } - }); - } - }, - - _assertCard: function (v) { - if (!this.layout.isCardExisted(v)) { - var card = this.options.cardCreator(v); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); - } - }, - - mounted: function () { - var o = this.options; - if (o.defaultShowIndex !== false) { - this.setSelect(o.defaultShowIndex); - } - }, - - setSelect: function (v) { - this.tab && this.tab.setValue(v); - this._assertCard(v); - this.layout.showCardByName(v); - this._deleteOtherCards(v); - if (this.curr !== v) { - this.curr = v; - } - }, - - removeTab: function (cardname) { - var self = this, o = this.options; - BI.any(this.cardMap, function (name, card) { - if (BI.isEqual(name, (cardname + ""))) { - self.layout.deleteCardByName(name); - delete self.cardMap[name]; - return true; - } - }); - }, - - getSelect: function () { - return this.curr; - }, - - getSelectedTab: function () { - return this.layout.getShowingCard(); - }, - - getTab: function (v) { - this._assertCard(v); - return this.layout.getCardByName(v); - }, - - setValue: function (v) { - var card = this.layout.getShowingCard(); - if (card) { - card.setValue(v); - } - }, - - getValue: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.getValue(); - } - }, - - populate: function () { - var card = this.layout.getShowingCard(); - if (card) { - return card.populate && card.populate.apply(card, arguments); - } - }, - - empty: function () { - this.layout.deleteAllCard(); - this.cardMap = {}; - }, - - destroy: function () { - this.cardMap = {}; - BI.Tab.superclass.destroy.apply(this, arguments); - } -}); -BI.Tab.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.tab", BI.Tab);/** - * 表示当前对象 - * - * Created by GUY on 2015/9/7. - * @class BI.EL - * @extends BI.Widget - */ -BI.EL = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-el", - el: {}, - layout: {} - }); - }, - _init: function () { - BI.EL.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.ele = BI.createWidget(o.el); - BI.createWidget(o.layout, { - type: "bi.adaptive", - element: this, - items: [this.ele] - }); - this.ele.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - }, - - setValue: function (v) { - this.ele.setValue(v); - }, - - getValue: function () { - return this.ele.getValue(); - }, - - populate: function () { - this.ele.populate.apply(this, arguments); - } -}); -BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -// This is CodeMirror (http://codemirror.net), a code editor -// implemented in JavaScript on top of the browser's DOM. -// -// You can find some technical background for some of the code below -// at http://marijnhaverbeke.nl/blog/#cm-internals . - -(function(mod) { - this.CodeMirror = mod(); -})(function() { - "use strict"; - - // BROWSER SNIFFING - - // Kludges for bugs and behavior differences that can't be feature - // detected are enabled based on userAgent etc sniffing. - - var gecko = /gecko\/\d/i.test(navigator.userAgent); - var ie_upto10 = /MSIE \d/.test(navigator.userAgent); - var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); - var ie = ie_upto10 || ie_11up; - var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]); - var webkit = /WebKit\//.test(navigator.userAgent); - var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); - var chrome = /Chrome\//.test(navigator.userAgent); - var presto = /Opera\//.test(navigator.userAgent); - var safari = /Apple Computer/.test(navigator.vendor); - var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); - var phantom = /PhantomJS/.test(navigator.userAgent); - - var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); - // This is woefully incomplete. Suggestions for alternative methods welcome. - var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); - var mac = ios || /Mac/.test(navigator.platform); - var windows = /win/i.test(navigator.platform); - - var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/); - if (presto_version) presto_version = Number(presto_version[1]); - if (presto_version && presto_version >= 15) { presto = false; webkit = true; } - // Some browsers use the wrong event properties to signal cmd/ctrl on OS X - var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); - var captureRightClick = gecko || (ie && ie_version >= 9); - - // Optimize some code when these features are not used. - var sawReadOnlySpans = false, sawCollapsedSpans = false; - - // EDITOR CONSTRUCTOR - - // A CodeMirror instance represents an editor. This is the object - // that user code is usually dealing with. - - function CodeMirror(place, options) { - if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); - - this.options = options = options ? copyObj(options) : {}; - // Determine effective options based on given values and defaults. - copyObj(defaults, options, false); - setGuttersForLineNumbers(options); - - var doc = options.value; - if (typeof doc == "string") doc = new Doc(doc, options.mode); - this.doc = doc; - - var input = new CodeMirror.inputStyles[options.inputStyle](this); - var display = this.display = new Display(place, doc, input); - display.wrapper.CodeMirror = this; - updateGutters(this); - themeChanged(this); - if (options.lineWrapping) - this.display.wrapper.className += " CodeMirror-wrap"; - if (options.autofocus && !mobile) display.input.focus(); - initScrollbars(this); - - this.state = { - keyMaps: [], // stores maps added by addKeyMap - overlays: [], // highlighting overlays, as added by addOverlay - modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info - overwrite: false, - delayingBlurEvent: false, - focused: false, - suppressEdits: false, // used to disable editing during key handlers when in readOnly mode - pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll - draggingText: false, - highlight: new Delayed(), // stores highlight worker timeout - keySeq: null, // Unfinished key sequence - specialChars: null - }; - - var cm = this; - - // Override magic textarea content restore that IE sometimes does - // on our hidden textarea on reload - if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20); - - registerEventHandlers(this); - ensureGlobalHandlers(); - - startOperation(this); - this.curOp.forceUpdate = true; - attachDoc(this, doc); - - if ((options.autofocus && !mobile) || cm.hasFocus()) - setTimeout(bind(onFocus, this), 20); - else - onBlur(this); - - for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) - optionHandlers[opt](this, options[opt], Init); - maybeUpdateLineNumberWidth(this); - if (options.finishInit) options.finishInit(this); - for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); - endOperation(this); - // Suppress optimizelegibility in Webkit, since it breaks text - // measuring on line wrapping boundaries. - if (webkit && options.lineWrapping && - getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") - display.lineDiv.style.textRendering = "auto"; - } - - // DISPLAY CONSTRUCTOR - - // The display handles the DOM integration, both for input reading - // and content drawing. It holds references to DOM nodes and - // display-related state. - - function Display(place, doc, input) { - var d = this; - this.input = input; - - // Covers bottom-right square when both scrollbars are present. - d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); - d.scrollbarFiller.setAttribute("cm-not-content", "true"); - // Covers bottom of gutter when coverGutterNextToScrollbar is on - // and h scrollbar is present. - d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); - d.gutterFiller.setAttribute("cm-not-content", "true"); - // Will contain the actual code, positioned to cover the viewport. - d.lineDiv = elt("div", null, "CodeMirror-code"); - // Elements are added to these to represent selection and cursors. - d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); - d.cursorDiv = elt("div", null, "CodeMirror-cursors"); - // A visibility: hidden element used to find the size of things. - d.measure = elt("div", null, "CodeMirror-measure"); - // When lines outside of the viewport are measured, they are drawn in this. - d.lineMeasure = elt("div", null, "CodeMirror-measure"); - // Wraps everything that needs to exist inside the vertically-padded coordinate system - d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], - null, "position: relative; outline: none"); - // Moved around its parent to cover visible view. - d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); - // Set to the height of the document, allowing scrolling. - d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); - d.sizerWidth = null; - // Behavior of elts with overflow: auto and padding is - // inconsistent across browsers. This is used to ensure the - // scrollable area is big enough. - d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); - // Will contain the gutters, if any. - d.gutters = elt("div", null, "CodeMirror-gutters"); - d.lineGutter = null; - // Actual scrollable element. - d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); - d.scroller.setAttribute("tabIndex", "-1"); - // The element in which the editor lives. - d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); - - // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) - if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } - if (!webkit && !(gecko && mobile)) d.scroller.draggable = true; - - if (place) { - if (place.appendChild) place.appendChild(d.wrapper); - else place(d.wrapper); - } - - // Current rendered range (may be bigger than the view window). - d.viewFrom = d.viewTo = doc.first; - d.reportedViewFrom = d.reportedViewTo = doc.first; - // Information about the rendered lines. - d.view = []; - d.renderedView = null; - // Holds info about a single rendered line when it was rendered - // for measurement, while not in view. - d.externalMeasured = null; - // Empty space (in pixels) above the view - d.viewOffset = 0; - d.lastWrapHeight = d.lastWrapWidth = 0; - d.updateLineNumbers = null; - - d.nativeBarWidth = d.barHeight = d.barWidth = 0; - d.scrollbarsClipped = false; - - // Used to only resize the line number gutter when necessary (when - // the amount of lines crosses a boundary that makes its width change) - d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; - // Set to true when a non-horizontal-scrolling line widget is - // added. As an optimization, line widget aligning is skipped when - // this is false. - d.alignWidgets = false; - - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - - // Tracks the maximum line length so that the horizontal scrollbar - // can be kept static when scrolling. - d.maxLine = null; - d.maxLineLength = 0; - d.maxLineChanged = false; - - // Used for measuring wheel scrolling granularity - d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; - - // True when shift is held down. - d.shift = false; - - // Used to track whether anything happened since the context menu - // was opened. - d.selForContextMenu = null; - - d.activeTouch = null; - - input.init(d); - } - - // STATE UPDATES - - // Used to get the editor into a consistent state again when options change. - - function loadMode(cm) { - cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); - resetModeState(cm); - } - - function resetModeState(cm) { - cm.doc.iter(function(line) { - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - }); - cm.doc.frontier = cm.doc.first; - startWorker(cm, 100); - cm.state.modeGen++; - if (cm.curOp) regChange(cm); - } - - function wrappingChanged(cm) { - if (cm.options.lineWrapping) { - addClass(cm.display.wrapper, "CodeMirror-wrap"); - cm.display.sizer.style.minWidth = ""; - cm.display.sizerWidth = null; - } else { - rmClass(cm.display.wrapper, "CodeMirror-wrap"); - findMaxLine(cm); - } - estimateLineHeights(cm); - regChange(cm); - clearCaches(cm); - setTimeout(function(){updateScrollbars(cm);}, 100); - } - - // Returns a function that estimates the height of a line, to use as - // first approximation until the line becomes visible (and is thus - // properly measurable). - function estimateHeight(cm) { - var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; - var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); - return function(line) { - if (lineIsHidden(cm.doc, line)) return 0; - - var widgetsHeight = 0; - if (line.widgets) for (var i = 0; i < line.widgets.length; i++) { - if (line.widgets[i].height) widgetsHeight += line.widgets[i].height; - } - - if (wrapping) - return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; - else - return widgetsHeight + th; - }; - } - - function estimateLineHeights(cm) { - var doc = cm.doc, est = estimateHeight(cm); - doc.iter(function(line) { - var estHeight = est(line); - if (estHeight != line.height) updateLineHeight(line, estHeight); - }); - } - - function themeChanged(cm) { - cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + - cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); - clearCaches(cm); - } - - function guttersChanged(cm) { - updateGutters(cm); - regChange(cm); - setTimeout(function(){alignHorizontally(cm);}, 20); - } - - // Rebuild the gutter elements, ensure the margin to the left of the - // code matches their width. - function updateGutters(cm) { - var gutters = cm.display.gutters, specs = cm.options.gutters; - removeChildren(gutters); - for (var i = 0; i < specs.length; ++i) { - var gutterClass = specs[i]; - var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); - if (gutterClass == "CodeMirror-linenumbers") { - cm.display.lineGutter = gElt; - gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; - } - } - gutters.style.display = i ? "" : "none"; - updateGutterSpace(cm); - } - - function updateGutterSpace(cm) { - var width = cm.display.gutters.offsetWidth; - cm.display.sizer.style.marginLeft = width + "px"; - } - - // Compute the character length of a line, taking into account - // collapsed ranges (see markText) that might hide parts, and join - // other lines onto it. - function lineLength(line) { - if (line.height == 0) return 0; - var len = line.text.length, merged, cur = line; - while (merged = collapsedSpanAtStart(cur)) { - var found = merged.find(0, true); - cur = found.from.line; - len += found.from.ch - found.to.ch; - } - cur = line; - while (merged = collapsedSpanAtEnd(cur)) { - var found = merged.find(0, true); - len -= cur.text.length - found.from.ch; - cur = found.to.line; - len += cur.text.length - found.to.ch; - } - return len; - } - - // Find the longest line in the document. - function findMaxLine(cm) { - var d = cm.display, doc = cm.doc; - d.maxLine = getLine(doc, doc.first); - d.maxLineLength = lineLength(d.maxLine); - d.maxLineChanged = true; - doc.iter(function(line) { - var len = lineLength(line); - if (len > d.maxLineLength) { - d.maxLineLength = len; - d.maxLine = line; - } - }); - } - - // Make sure the gutters options contains the element - // "CodeMirror-linenumbers" when the lineNumbers option is true. - function setGuttersForLineNumbers(options) { - var found = indexOf(options.gutters, "CodeMirror-linenumbers"); - if (found == -1 && options.lineNumbers) { - options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); - } else if (found > -1 && !options.lineNumbers) { - options.gutters = options.gutters.slice(0); - options.gutters.splice(found, 1); - } - } - - // SCROLLBARS - - // Prepare DOM reads needed to update the scrollbars. Done in one - // shot to minimize update/measure roundtrips. - function measureForScrollbars(cm) { - var d = cm.display, gutterW = d.gutters.offsetWidth; - var docH = Math.round(cm.doc.height + paddingVert(cm.display)); - return { - clientHeight: d.scroller.clientHeight, - viewHeight: d.wrapper.clientHeight, - scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, - viewWidth: d.wrapper.clientWidth, - barLeft: cm.options.fixedGutter ? gutterW : 0, - docHeight: docH, - scrollHeight: docH + scrollGap(cm) + d.barHeight, - nativeBarWidth: d.nativeBarWidth, - gutterWidth: gutterW - }; - } - - function NativeScrollbars(place, scroll, cm) { - this.cm = cm; - var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); - var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); - place(vert); place(horiz); - - on(vert, "scroll", function() { - if (vert.clientHeight) scroll(vert.scrollTop, "vertical"); - }); - on(horiz, "scroll", function() { - if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal"); - }); - - this.checkedOverlay = false; - // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). - if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; - } - - NativeScrollbars.prototype = copyObj({ - update: function(measure) { - var needsH = measure.scrollWidth > measure.clientWidth + 1; - var needsV = measure.scrollHeight > measure.clientHeight + 1; - var sWidth = measure.nativeBarWidth; - - if (needsV) { - this.vert.style.display = "block"; - this.vert.style.bottom = needsH ? sWidth + "px" : "0"; - var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); - // A bug in IE8 can cause this value to be negative, so guard it. - this.vert.firstChild.style.height = - Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; - } else { - this.vert.style.display = ""; - this.vert.firstChild.style.height = "0"; - } - - if (needsH) { - this.horiz.style.display = "block"; - this.horiz.style.right = needsV ? sWidth + "px" : "0"; - this.horiz.style.left = measure.barLeft + "px"; - var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); - this.horiz.firstChild.style.width = - (measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; - } else { - this.horiz.style.display = ""; - this.horiz.firstChild.style.width = "0"; - } - - if (!this.checkedOverlay && measure.clientHeight > 0) { - if (sWidth == 0) this.overlayHack(); - this.checkedOverlay = true; - } - - return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}; - }, - setScrollLeft: function(pos) { - if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos; - }, - setScrollTop: function(pos) { - if (this.vert.scrollTop != pos) this.vert.scrollTop = pos; - }, - overlayHack: function() { - var w = mac && !mac_geMountainLion ? "12px" : "18px"; - this.horiz.style.minHeight = this.vert.style.minWidth = w; - var self = this; - var barMouseDown = function(e) { - if (e_target(e) != self.vert && e_target(e) != self.horiz) - operation(self.cm, onMouseDown)(e); - }; - on(this.vert, "mousedown", barMouseDown); - on(this.horiz, "mousedown", barMouseDown); - }, - clear: function() { - var parent = this.horiz.parentNode; - parent.removeChild(this.horiz); - parent.removeChild(this.vert); - } - }, NativeScrollbars.prototype); - - function NullScrollbars() {} - - NullScrollbars.prototype = copyObj({ - update: function() { return {bottom: 0, right: 0}; }, - setScrollLeft: function() {}, - setScrollTop: function() {}, - clear: function() {} - }, NullScrollbars.prototype); - - CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; - - function initScrollbars(cm) { - if (cm.display.scrollbars) { - cm.display.scrollbars.clear(); - if (cm.display.scrollbars.addClass) - rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); - } - - cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) { - cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); - // Prevent clicks in the scrollbars from killing focus - on(node, "mousedown", function() { - if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0); - }); - node.setAttribute("cm-not-content", "true"); - }, function(pos, axis) { - if (axis == "horizontal") setScrollLeft(cm, pos); - else setScrollTop(cm, pos); - }, cm); - if (cm.display.scrollbars.addClass) - addClass(cm.display.wrapper, cm.display.scrollbars.addClass); - } - - function updateScrollbars(cm, measure) { - if (!measure) measure = measureForScrollbars(cm); - var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; - updateScrollbarsInner(cm, measure); - for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { - if (startWidth != cm.display.barWidth && cm.options.lineWrapping) - updateHeightsInViewport(cm); - updateScrollbarsInner(cm, measureForScrollbars(cm)); - startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; - } - } - - // Re-synchronize the fake scrollbars with the actual size of the - // content. - function updateScrollbarsInner(cm, measure) { - var d = cm.display; - var sizes = d.scrollbars.update(measure); - - d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; - d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; - - if (sizes.right && sizes.bottom) { - d.scrollbarFiller.style.display = "block"; - d.scrollbarFiller.style.height = sizes.bottom + "px"; - d.scrollbarFiller.style.width = sizes.right + "px"; - } else d.scrollbarFiller.style.display = ""; - if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { - d.gutterFiller.style.display = "block"; - d.gutterFiller.style.height = sizes.bottom + "px"; - d.gutterFiller.style.width = measure.gutterWidth + "px"; - } else d.gutterFiller.style.display = ""; - } - - // Compute the lines that are visible in a given viewport (defaults - // the the current scroll position). viewport may contain top, - // height, and ensure (see op.scrollToPos) properties. - function visibleLines(display, doc, viewport) { - var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; - top = Math.floor(top - paddingTop(display)); - var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; - - var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); - // Ensure is a {from: {line, ch}, to: {line, ch}} object, and - // forces those lines into the viewport (if possible). - if (viewport && viewport.ensure) { - var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; - if (ensureFrom < from) { - from = ensureFrom; - to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); - } else if (Math.min(ensureTo, doc.lastLine()) >= to) { - from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); - to = ensureTo; - } - } - return {from: from, to: Math.max(to, from + 1)}; - } - - // LINE NUMBERS - - // Re-align line numbers and gutter marks to compensate for - // horizontal scrolling. - function alignHorizontally(cm) { - var display = cm.display, view = display.view; - if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; - var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; - var gutterW = display.gutters.offsetWidth, left = comp + "px"; - for (var i = 0; i < view.length; i++) if (!view[i].hidden) { - if (cm.options.fixedGutter && view[i].gutter) - view[i].gutter.style.left = left; - var align = view[i].alignable; - if (align) for (var j = 0; j < align.length; j++) - align[j].style.left = left; - } - if (cm.options.fixedGutter) - display.gutters.style.left = (comp + gutterW) + "px"; - } - - // Used to ensure that the line number gutter is still the right - // size for the current document size. Returns true when an update - // is needed. - function maybeUpdateLineNumberWidth(cm) { - if (!cm.options.lineNumbers) return false; - var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; - if (last.length != display.lineNumChars) { - var test = display.measure.appendChild(elt("div", [elt("div", last)], - "CodeMirror-linenumber CodeMirror-gutter-elt")); - var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; - display.lineGutter.style.width = ""; - display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; - display.lineNumWidth = display.lineNumInnerWidth + padding; - display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; - display.lineGutter.style.width = display.lineNumWidth + "px"; - updateGutterSpace(cm); - return true; - } - return false; - } - - function lineNumberFor(options, i) { - return String(options.lineNumberFormatter(i + options.firstLineNumber)); - } - - // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, - // but using getBoundingClientRect to get a sub-pixel-accurate - // result. - function compensateForHScroll(display) { - return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; - } - - // DISPLAY DRAWING - - function DisplayUpdate(cm, viewport, force) { - var display = cm.display; - - this.viewport = viewport; - // Store some values that we'll need later (but don't want to force a relayout for) - this.visible = visibleLines(display, cm.doc, viewport); - this.editorIsHidden = !display.wrapper.offsetWidth; - this.wrapperHeight = display.wrapper.clientHeight; - this.wrapperWidth = display.wrapper.clientWidth; - this.oldDisplayWidth = displayWidth(cm); - this.force = force; - this.dims = getDimensions(cm); - this.events = []; - } - - DisplayUpdate.prototype.signal = function(emitter, type) { - if (hasHandler(emitter, type)) - this.events.push(arguments); - }; - DisplayUpdate.prototype.finish = function() { - for (var i = 0; i < this.events.length; i++) - signal.apply(null, this.events[i]); - }; - - function maybeClipScrollbars(cm) { - var display = cm.display; - if (!display.scrollbarsClipped && display.scroller.offsetWidth) { - display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; - display.heightForcer.style.height = scrollGap(cm) + "px"; - display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; - display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; - display.scrollbarsClipped = true; - } - } - - // Does the actual updating of the line display. Bails out - // (returning false) when there is nothing to be done and forced is - // false. - function updateDisplayIfNeeded(cm, update) { - var display = cm.display, doc = cm.doc; - - if (update.editorIsHidden) { - resetView(cm); - return false; - } - - // Bail out if the visible area is already rendered and nothing changed. - if (!update.force && - update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && - display.renderedView == display.view && countDirtyView(cm) == 0) - return false; - - if (maybeUpdateLineNumberWidth(cm)) { - resetView(cm); - update.dims = getDimensions(cm); - } - - // Compute a suitable new viewport (from & to) - var end = doc.first + doc.size; - var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); - var to = Math.min(end, update.visible.to + cm.options.viewportMargin); - if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom); - if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo); - if (sawCollapsedSpans) { - from = visualLineNo(cm.doc, from); - to = visualLineEndNo(cm.doc, to); - } - - var different = from != display.viewFrom || to != display.viewTo || - display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; - adjustView(cm, from, to); - - display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); - // Position the mover div to align with the current scroll position - cm.display.mover.style.top = display.viewOffset + "px"; - - var toUpdate = countDirtyView(cm); - if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) - return false; - - // For big changes, we hide the enclosing element during the - // update, since that speeds up the operations on most browsers. - var focused = activeElt(); - if (toUpdate > 4) display.lineDiv.style.display = "none"; - patchDisplay(cm, display.updateLineNumbers, update.dims); - if (toUpdate > 4) display.lineDiv.style.display = ""; - display.renderedView = display.view; - // There might have been a widget with a focused element that got - // hidden or updated, if so re-focus it. - if (focused && activeElt() != focused && focused.offsetHeight) focused.focus(); - - // Prevent selection and cursors from interfering with the scroll - // width and height. - removeChildren(display.cursorDiv); - removeChildren(display.selectionDiv); - display.gutters.style.height = 0; - - if (different) { - display.lastWrapHeight = update.wrapperHeight; - display.lastWrapWidth = update.wrapperWidth; - startWorker(cm, 400); - } - - display.updateLineNumbers = null; - - return true; - } - - function postUpdateDisplay(cm, update) { - var viewport = update.viewport; - for (var first = true;; first = false) { - if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { - // Clip forced viewport to actual scrollable area. - if (viewport && viewport.top != null) - viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; - // Updated line heights might result in the drawn area not - // actually covering the viewport. Keep looping until it does. - update.visible = visibleLines(cm.display, cm.doc, viewport); - if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) - break; - } - if (!updateDisplayIfNeeded(cm, update)) break; - updateHeightsInViewport(cm); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - setDocumentHeight(cm, barMeasure); - updateScrollbars(cm, barMeasure); - } - - update.signal(cm, "update", cm); - if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { - update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); - cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; - } - } - - function updateDisplaySimple(cm, viewport) { - var update = new DisplayUpdate(cm, viewport); - if (updateDisplayIfNeeded(cm, update)) { - updateHeightsInViewport(cm); - postUpdateDisplay(cm, update); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - setDocumentHeight(cm, barMeasure); - updateScrollbars(cm, barMeasure); - update.finish(); - } - } - - function setDocumentHeight(cm, measure) { - cm.display.sizer.style.minHeight = measure.docHeight + "px"; - var total = measure.docHeight + cm.display.barHeight; - cm.display.heightForcer.style.top = total + "px"; - cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + "px"; - } - - // Read the actual heights of the rendered lines, and update their - // stored heights to match. - function updateHeightsInViewport(cm) { - var display = cm.display; - var prevBottom = display.lineDiv.offsetTop; - for (var i = 0; i < display.view.length; i++) { - var cur = display.view[i], height; - if (cur.hidden) continue; - if (ie && ie_version < 8) { - var bot = cur.node.offsetTop + cur.node.offsetHeight; - height = bot - prevBottom; - prevBottom = bot; - } else { - var box = cur.node.getBoundingClientRect(); - height = box.bottom - box.top; - } - var diff = cur.line.height - height; - if (height < 2) height = textHeight(display); - if (diff > .001 || diff < -.001) { - updateLineHeight(cur.line, height); - updateWidgetHeight(cur.line); - if (cur.rest) for (var j = 0; j < cur.rest.length; j++) - updateWidgetHeight(cur.rest[j]); - } - } - } - - // Read and store the height of line widgets associated with the - // given line. - function updateWidgetHeight(line) { - if (line.widgets) for (var i = 0; i < line.widgets.length; ++i) - line.widgets[i].height = line.widgets[i].node.offsetHeight; - } - - // Do a bulk-read of the DOM positions and sizes needed to draw the - // view, so that we don't interleave reading and writing to the DOM. - function getDimensions(cm) { - var d = cm.display, left = {}, width = {}; - var gutterLeft = d.gutters.clientLeft; - for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { - left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; - width[cm.options.gutters[i]] = n.clientWidth; - } - return {fixedPos: compensateForHScroll(d), - gutterTotalWidth: d.gutters.offsetWidth, - gutterLeft: left, - gutterWidth: width, - wrapperWidth: d.wrapper.clientWidth}; - } - - // Sync the actual display DOM structure with display.view, removing - // nodes for lines that are no longer in view, and creating the ones - // that are not there yet, and updating the ones that are out of - // date. - function patchDisplay(cm, updateNumbersFrom, dims) { - var display = cm.display, lineNumbers = cm.options.lineNumbers; - var container = display.lineDiv, cur = container.firstChild; - - function rm(node) { - var next = node.nextSibling; - // Works around a throw-scroll bug in OS X Webkit - if (webkit && mac && cm.display.currentWheelTarget == node) - node.style.display = "none"; - else - node.parentNode.removeChild(node); - return next; - } - - var view = display.view, lineN = display.viewFrom; - // Loop over the elements in the view, syncing cur (the DOM nodes - // in display.lineDiv) with the view as we go. - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (lineView.hidden) { - } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet - var node = buildLineElement(cm, lineView, lineN, dims); - container.insertBefore(node, cur); - } else { // Already drawn - while (cur != lineView.node) cur = rm(cur); - var updateNumber = lineNumbers && updateNumbersFrom != null && - updateNumbersFrom <= lineN && lineView.lineNumber; - if (lineView.changes) { - if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false; - updateLineForChanges(cm, lineView, lineN, dims); - } - if (updateNumber) { - removeChildren(lineView.lineNumber); - lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); - } - cur = lineView.node.nextSibling; - } - lineN += lineView.size; - } - while (cur) cur = rm(cur); - } - - // When an aspect of a line changes, a string is added to - // lineView.changes. This updates the relevant part of the line's - // DOM structure. - function updateLineForChanges(cm, lineView, lineN, dims) { - for (var j = 0; j < lineView.changes.length; j++) { - var type = lineView.changes[j]; - if (type == "text") updateLineText(cm, lineView); - else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims); - else if (type == "class") updateLineClasses(lineView); - else if (type == "widget") updateLineWidgets(cm, lineView, dims); - } - lineView.changes = null; - } - - // Lines with gutter elements, widgets or a background class need to - // be wrapped, and have the extra elements added to the wrapper div - function ensureLineWrapped(lineView) { - if (lineView.node == lineView.text) { - lineView.node = elt("div", null, null, "position: relative"); - if (lineView.text.parentNode) - lineView.text.parentNode.replaceChild(lineView.node, lineView.text); - lineView.node.appendChild(lineView.text); - if (ie && ie_version < 8) lineView.node.style.zIndex = 2; - } - return lineView.node; - } - - function updateLineBackground(lineView) { - var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; - if (cls) cls += " CodeMirror-linebackground"; - if (lineView.background) { - if (cls) lineView.background.className = cls; - else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } - } else if (cls) { - var wrap = ensureLineWrapped(lineView); - lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); - } - } - - // Wrapper around buildLineContent which will reuse the structure - // in display.externalMeasured when possible. - function getLineContent(cm, lineView) { - var ext = cm.display.externalMeasured; - if (ext && ext.line == lineView.line) { - cm.display.externalMeasured = null; - lineView.measure = ext.measure; - return ext.built; - } - return buildLineContent(cm, lineView); - } - - // Redraw the line's text. Interacts with the background and text - // classes because the mode may output tokens that influence these - // classes. - function updateLineText(cm, lineView) { - var cls = lineView.text.className; - var built = getLineContent(cm, lineView); - if (lineView.text == lineView.node) lineView.node = built.pre; - lineView.text.parentNode.replaceChild(built.pre, lineView.text); - lineView.text = built.pre; - if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { - lineView.bgClass = built.bgClass; - lineView.textClass = built.textClass; - updateLineClasses(lineView); - } else if (cls) { - lineView.text.className = cls; - } - } - - function updateLineClasses(lineView) { - updateLineBackground(lineView); - if (lineView.line.wrapClass) - ensureLineWrapped(lineView).className = lineView.line.wrapClass; - else if (lineView.node != lineView.text) - lineView.node.className = ""; - var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; - lineView.text.className = textClass || ""; - } - - function updateLineGutter(cm, lineView, lineN, dims) { - if (lineView.gutter) { - lineView.node.removeChild(lineView.gutter); - lineView.gutter = null; - } - var markers = lineView.line.gutterMarkers; - if (cm.options.lineNumbers || markers) { - var wrap = ensureLineWrapped(lineView); - var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + - (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + - "px; width: " + dims.gutterTotalWidth + "px"); - cm.display.input.setUneditable(gutterWrap); - wrap.insertBefore(gutterWrap, lineView.text); - if (lineView.line.gutterClass) - gutterWrap.className += " " + lineView.line.gutterClass; - if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) - lineView.lineNumber = gutterWrap.appendChild( - elt("div", lineNumberFor(cm.options, lineN), - "CodeMirror-linenumber CodeMirror-gutter-elt", - "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " - + cm.display.lineNumInnerWidth + "px")); - if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { - var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; - if (found) - gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + - dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); - } - } - } - - function updateLineWidgets(cm, lineView, dims) { - if (lineView.alignable) lineView.alignable = null; - for (var node = lineView.node.firstChild, next; node; node = next) { - var next = node.nextSibling; - if (node.className == "CodeMirror-linewidget") - lineView.node.removeChild(node); - } - insertLineWidgets(cm, lineView, dims); - } - - // Build a line's DOM representation from scratch - function buildLineElement(cm, lineView, lineN, dims) { - var built = getLineContent(cm, lineView); - lineView.text = lineView.node = built.pre; - if (built.bgClass) lineView.bgClass = built.bgClass; - if (built.textClass) lineView.textClass = built.textClass; - - updateLineClasses(lineView); - updateLineGutter(cm, lineView, lineN, dims); - insertLineWidgets(cm, lineView, dims); - return lineView.node; - } - - // A lineView may contain multiple logical lines (when merged by - // collapsed spans). The widgets for all of them need to be drawn. - function insertLineWidgets(cm, lineView, dims) { - insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); - if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) - insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); - } - - function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { - if (!line.widgets) return; - var wrap = ensureLineWrapped(lineView); - for (var i = 0, ws = line.widgets; i < ws.length; ++i) { - var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); - if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true"); - positionLineWidget(widget, node, lineView, dims); - cm.display.input.setUneditable(node); - if (allowAbove && widget.above) - wrap.insertBefore(node, lineView.gutter || lineView.text); - else - wrap.appendChild(node); - signalLater(widget, "redraw"); - } - } - - function positionLineWidget(widget, node, lineView, dims) { - if (widget.noHScroll) { - (lineView.alignable || (lineView.alignable = [])).push(node); - var width = dims.wrapperWidth; - node.style.left = dims.fixedPos + "px"; - if (!widget.coverGutter) { - width -= dims.gutterTotalWidth; - node.style.paddingLeft = dims.gutterTotalWidth + "px"; - } - node.style.width = width + "px"; - } - if (widget.coverGutter) { - node.style.zIndex = 5; - node.style.position = "relative"; - if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; - } - } - - // POSITION OBJECT - - // A Pos instance represents a position within the text. - var Pos = CodeMirror.Pos = function(line, ch) { - if (!(this instanceof Pos)) return new Pos(line, ch); - this.line = line; this.ch = ch; - }; - - // Compare two positions, return 0 if they are the same, a negative - // number when a is less, and a positive number otherwise. - var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; }; - - function copyPos(x) {return Pos(x.line, x.ch);} - function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; } - function minPos(a, b) { return cmp(a, b) < 0 ? a : b; } - - // INPUT HANDLING - - function ensureFocus(cm) { - if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } - } - - function isReadOnly(cm) { - return cm.options.readOnly || cm.doc.cantEdit; - } - - // This will be set to an array of strings when copying, so that, - // when pasting, we know what kind of selections the copied text - // was made out of. - var lastCopied = null; - - function applyTextInput(cm, inserted, deleted, sel, origin) { - var doc = cm.doc; - cm.display.shift = false; - if (!sel) sel = doc.sel; - - var paste = cm.state.pasteIncoming || origin == "paste"; - var textLines = splitLines(inserted), multiPaste = null; - // When pasing N lines into N selections, insert one line per selection - if (paste && sel.ranges.length > 1) { - if (lastCopied && lastCopied.join("\n") == inserted) - multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines); - else if (textLines.length == sel.ranges.length) - multiPaste = map(textLines, function(l) { return [l]; }); - } - - // Normal behavior is to insert the new text into every selection - for (var i = sel.ranges.length - 1; i >= 0; i--) { - var range = sel.ranges[i]; - var from = range.from(), to = range.to(); - if (range.empty()) { - if (deleted && deleted > 0) // Handle deletion - from = Pos(from.line, from.ch - deleted); - else if (cm.state.overwrite && !paste) // Handle overwrite - to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); - } - var updateInput = cm.curOp.updateInput; - var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, - origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}; - makeChange(cm.doc, changeEvent); - signalLater(cm, "inputRead", cm, changeEvent); - } - if (inserted && !paste) - triggerElectric(cm, inserted); - - ensureCursorVisible(cm); - cm.curOp.updateInput = updateInput; - cm.curOp.typing = true; - cm.state.pasteIncoming = cm.state.cutIncoming = false; - } - - function handlePaste(e, cm) { - var pasted = e.clipboardData && e.clipboardData.getData("text/plain"); - if (pasted) { - e.preventDefault(); - runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, "paste"); }); - return true; - } - } - - function triggerElectric(cm, inserted) { - // When an 'electric' character is inserted, immediately trigger a reindent - if (!cm.options.electricChars || !cm.options.smartIndent) return; - var sel = cm.doc.sel; - - for (var i = sel.ranges.length - 1; i >= 0; i--) { - var range = sel.ranges[i]; - if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue; - var mode = cm.getModeAt(range.head); - var indented = false; - if (mode.electricChars) { - for (var j = 0; j < mode.electricChars.length; j++) - if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { - indented = indentLine(cm, range.head.line, "smart"); - break; - } - } else if (mode.electricInput) { - if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) - indented = indentLine(cm, range.head.line, "smart"); - } - if (indented) signalLater(cm, "electricInput", cm, range.head.line); - } - } - - function copyableRanges(cm) { - var text = [], ranges = []; - for (var i = 0; i < cm.doc.sel.ranges.length; i++) { - var line = cm.doc.sel.ranges[i].head.line; - var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; - ranges.push(lineRange); - text.push(cm.getRange(lineRange.anchor, lineRange.head)); - } - return {text: text, ranges: ranges}; - } - - function disableBrowserMagic(field) { - field.setAttribute("autocorrect", "off"); - field.setAttribute("autocapitalize", "off"); - field.setAttribute("spellcheck", "false"); - } - - // TEXTAREA INPUT STYLE - - function TextareaInput(cm) { - this.cm = cm; - // See input.poll and input.reset - this.prevInput = ""; - - // Flag that indicates whether we expect input to appear real soon - // now (after some event like 'keypress' or 'input') and are - // polling intensively. - this.pollingFast = false; - // Self-resetting timeout for the poller - this.polling = new Delayed(); - // Tracks when input.reset has punted to just putting a short - // string into the textarea instead of the full selection. - this.inaccurateSelection = false; - // Used to work around IE issue with selection being forgotten when focus moves away from textarea - this.hasSelection = false; - this.composing = null; - }; - - function hiddenTextarea() { - var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none"); - var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); - // The textarea is kept positioned near the cursor to prevent the - // fact that it'll be scrolled into view on input from scrolling - // our fake cursor out of view. On webkit, when wrap=off, paste is - // very slow. So make the area wide instead. - if (webkit) te.style.width = "1000px"; - else te.setAttribute("wrap", "off"); - // If border: 0; -- iOS fails to open keyboard (issue #1287) - if (ios) te.style.border = "1px solid black"; - disableBrowserMagic(te); - return div; - } - - TextareaInput.prototype = copyObj({ - init: function(display) { - var input = this, cm = this.cm; - - // Wraps and hides input textarea - var div = this.wrapper = hiddenTextarea(); - // The semihidden textarea that is focused when the editor is - // focused, and receives input. - var te = this.textarea = div.firstChild; - display.wrapper.insertBefore(div, display.wrapper.firstChild); - - // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) - if (ios) te.style.width = "0px"; - - on(te, "input", function() { - if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null; - input.poll(); - }); - - on(te, "paste", function(e) { - if (handlePaste(e, cm)) return true; - - cm.state.pasteIncoming = true; - input.fastPoll(); - }); - - function prepareCopyCut(e) { - if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); - if (input.inaccurateSelection) { - input.prevInput = ""; - input.inaccurateSelection = false; - te.value = lastCopied.join("\n"); - selectInput(te); - } - } else if (!cm.options.lineWiseCopyCut) { - return; - } else { - var ranges = copyableRanges(cm); - lastCopied = ranges.text; - if (e.type == "cut") { - cm.setSelections(ranges.ranges, null, sel_dontScroll); - } else { - input.prevInput = ""; - te.value = ranges.text.join("\n"); - selectInput(te); - } - } - if (e.type == "cut") cm.state.cutIncoming = true; - } - on(te, "cut", prepareCopyCut); - on(te, "copy", prepareCopyCut); - - on(display.scroller, "paste", function(e) { - if (eventInWidget(display, e)) return; - cm.state.pasteIncoming = true; - input.focus(); - }); - - // Prevent normal selection in the editor (we handle our own) - on(display.lineSpace, "selectstart", function(e) { - if (!eventInWidget(display, e)) e_preventDefault(e); - }); - - on(te, "compositionstart", function() { - var start = cm.getCursor("from"); - input.composing = { - start: start, - range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) - }; - }); - on(te, "compositionend", function() { - if (input.composing) { - input.poll(); - input.composing.range.clear(); - input.composing = null; - } - }); - }, - - prepareSelection: function() { - // Redraw the selection and/or cursor - var cm = this.cm, display = cm.display, doc = cm.doc; - var result = prepareSelection(cm); - - // Move the hidden textarea near the cursor to prevent scrolling artifacts - if (cm.options.moveInputWithCursor) { - var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); - var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); - result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, - headPos.top + lineOff.top - wrapOff.top)); - result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, - headPos.left + lineOff.left - wrapOff.left)); - } - - return result; - }, - - showSelection: function(drawn) { - var cm = this.cm, display = cm.display; - removeChildrenAndAdd(display.cursorDiv, drawn.cursors); - removeChildrenAndAdd(display.selectionDiv, drawn.selection); - if (drawn.teTop != null) { - this.wrapper.style.top = drawn.teTop + "px"; - this.wrapper.style.left = drawn.teLeft + "px"; - } - }, - - // Reset the input to correspond to the selection (or to be empty, - // when not typing and nothing is selected) - reset: function(typing) { - if (this.contextMenuPending) return; - var minimal, selected, cm = this.cm, doc = cm.doc; - if (cm.somethingSelected()) { - this.prevInput = ""; - var range = doc.sel.primary(); - minimal = hasCopyEvent && - (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); - var content = minimal ? "-" : selected || cm.getSelection(); - this.textarea.value = content; - if (cm.state.focused) selectInput(this.textarea); - if (ie && ie_version >= 9) this.hasSelection = content; - } else if (!typing) { - this.prevInput = this.textarea.value = ""; - if (ie && ie_version >= 9) this.hasSelection = null; - } - this.inaccurateSelection = minimal; - }, - - getField: function() { return this.textarea; }, - - supportsTouch: function() { return false; }, - - focus: function() { - if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { - try { this.textarea.focus(); } - catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM - } - }, - - blur: function() { this.textarea.blur(); }, - - resetPosition: function() { - this.wrapper.style.top = this.wrapper.style.left = 0; - }, - - receivedFocus: function() { this.slowPoll(); }, - - // Poll for input changes, using the normal rate of polling. This - // runs as long as the editor is focused. - slowPoll: function() { - var input = this; - if (input.pollingFast) return; - input.polling.set(this.cm.options.pollInterval, function() { - input.poll(); - if (input.cm.state.focused) input.slowPoll(); - }); - }, - - // When an event has just come in that is likely to add or change - // something in the input textarea, we poll faster, to ensure that - // the change appears on the screen quickly. - fastPoll: function() { - var missed = false, input = this; - input.pollingFast = true; - function p() { - var changed = input.poll(); - if (!changed && !missed) {missed = true; input.polling.set(60, p);} - else {input.pollingFast = false; input.slowPoll();} - } - input.polling.set(20, p); - }, - - // Read input from the textarea, and update the document to match. - // When something is selected, it is present in the textarea, and - // selected (unless it is huge, in which case a placeholder is - // used). When nothing is selected, the cursor sits after previously - // seen text (can be empty), which is stored in prevInput (we must - // not reset the textarea when typing, because that breaks IME). - poll: function() { - var cm = this.cm, input = this.textarea, prevInput = this.prevInput; - // Since this is called a *lot*, try to bail out as cheaply as - // possible when it is clear that nothing happened. hasSelection - // will be the case when there is a lot of text in the textarea, - // in which case reading its value would be expensive. - if (this.contextMenuPending || !cm.state.focused || - (hasSelection(input) && !prevInput) || - isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq) - return false; - - var text = input.value; - // If nothing changed, bail. - if (text == prevInput && !cm.somethingSelected()) return false; - // Work around nonsensical selection resetting in IE9/10, and - // inexplicable appearance of private area unicode characters on - // some key combos in Mac (#2689). - if (ie && ie_version >= 9 && this.hasSelection === text || - mac && /[\uf700-\uf7ff]/.test(text)) { - cm.display.input.reset(); - return false; - } - - if (cm.doc.sel == cm.display.selForContextMenu) { - var first = text.charCodeAt(0); - if (first == 0x200b && !prevInput) prevInput = "\u200b"; - if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); } - } - // Find the part of the input that is actually new - var same = 0, l = Math.min(prevInput.length, text.length); - while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; - - var self = this; - runInOp(cm, function() { - applyTextInput(cm, text.slice(same), prevInput.length - same, - null, self.composing ? "*compose" : null); - - // Don't leave long text in the textarea, since it makes further polling slow - if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = ""; - else self.prevInput = text; - - if (self.composing) { - self.composing.range.clear(); - self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"), - {className: "CodeMirror-composing"}); - } - }); - return true; - }, - - ensurePolled: function() { - if (this.pollingFast && this.poll()) this.pollingFast = false; - }, - - onKeyPress: function() { - if (ie && ie_version >= 9) this.hasSelection = null; - this.fastPoll(); - }, - - onContextMenu: function(e) { - var input = this, cm = input.cm, display = cm.display, te = input.textarea; - var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; - if (!pos || presto) return; // Opera is difficult. - - // Reset the current text selection only if the click is done outside of the selection - // and 'resetSelectionOnContextMenu' option is true. - var reset = cm.options.resetSelectionOnContextMenu; - if (reset && cm.doc.sel.contains(pos) == -1) - operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); - - var oldCSS = te.style.cssText; - input.wrapper.style.position = "absolute"; - te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + - "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " + - (ie ? "rgba(255, 255, 255, .05)" : "transparent") + - "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; - if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712) - display.input.focus(); - if (webkit) window.scrollTo(null, oldScrollY); - display.input.reset(); - // Adds "Select all" to context menu in FF - if (!cm.somethingSelected()) te.value = input.prevInput = " "; - input.contextMenuPending = true; - display.selForContextMenu = cm.doc.sel; - clearTimeout(display.detectingSelectAll); - - // Select-all will be greyed out if there's nothing to select, so - // this adds a zero-width space so that we can later check whether - // it got selected. - function prepareSelectAllHack() { - if (te.selectionStart != null) { - var selected = cm.somethingSelected(); - var extval = "\u200b" + (selected ? te.value : ""); - te.value = "\u21da"; // Used to catch context-menu undo - te.value = extval; - input.prevInput = selected ? "" : "\u200b"; - te.selectionStart = 1; te.selectionEnd = extval.length; - // Re-set this, in case some other handler touched the - // selection in the meantime. - display.selForContextMenu = cm.doc.sel; - } - } - function rehide() { - input.contextMenuPending = false; - input.wrapper.style.position = "relative"; - te.style.cssText = oldCSS; - if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); - - // Try to detect the user choosing select-all - if (te.selectionStart != null) { - if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); - var i = 0, poll = function() { - if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && - te.selectionEnd > 0 && input.prevInput == "\u200b") - operation(cm, commands.selectAll)(cm); - else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); - else display.input.reset(); - }; - display.detectingSelectAll = setTimeout(poll, 200); - } - } - - if (ie && ie_version >= 9) prepareSelectAllHack(); - if (captureRightClick) { - e_stop(e); - var mouseup = function() { - off(window, "mouseup", mouseup); - setTimeout(rehide, 20); - }; - on(window, "mouseup", mouseup); - } else { - setTimeout(rehide, 50); - } - }, - - setUneditable: nothing, - - needsContentAttribute: false - }, TextareaInput.prototype); - - // CONTENTEDITABLE INPUT STYLE - - function ContentEditableInput(cm) { - this.cm = cm; - this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; - this.polling = new Delayed(); - this.gracePeriod = false; - } - - ContentEditableInput.prototype = copyObj({ - init: function(display) { - var input = this, cm = input.cm; - var div = input.div = display.lineDiv; - div.contentEditable = "true"; - disableBrowserMagic(div); - - on(div, "paste", function(e) { handlePaste(e, cm); }) - - on(div, "compositionstart", function(e) { - var data = e.data; - input.composing = {sel: cm.doc.sel, data: data, startData: data}; - if (!data) return; - var prim = cm.doc.sel.primary(); - var line = cm.getLine(prim.head.line); - var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length)); - if (found > -1 && found <= prim.head.ch) - input.composing.sel = simpleSelection(Pos(prim.head.line, found), - Pos(prim.head.line, found + data.length)); - }); - on(div, "compositionupdate", function(e) { - input.composing.data = e.data; - }); - on(div, "compositionend", function(e) { - var ours = input.composing; - if (!ours) return; - if (e.data != ours.startData && !/\u200b/.test(e.data)) - ours.data = e.data; - // Need a small delay to prevent other code (input event, - // selection polling) from doing damage when fired right after - // compositionend. - setTimeout(function() { - if (!ours.handled) - input.applyComposition(ours); - if (input.composing == ours) - input.composing = null; - }, 50); - }); - - on(div, "touchstart", function() { - input.forceCompositionEnd(); - }); - - on(div, "input", function() { - if (input.composing) return; - if (!input.pollContent()) - runInOp(input.cm, function() {regChange(cm);}); - }); - - function onCopyCut(e) { - if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); - if (e.type == "cut") cm.replaceSelection("", null, "cut"); - } else if (!cm.options.lineWiseCopyCut) { - return; - } else { - var ranges = copyableRanges(cm); - lastCopied = ranges.text; - if (e.type == "cut") { - cm.operation(function() { - cm.setSelections(ranges.ranges, 0, sel_dontScroll); - cm.replaceSelection("", null, "cut"); - }); - } - } - // iOS exposes the clipboard API, but seems to discard content inserted into it - if (e.clipboardData && !ios) { - e.preventDefault(); - e.clipboardData.clearData(); - e.clipboardData.setData("text/plain", lastCopied.join("\n")); - } else { - // Old-fashioned briefly-focus-a-textarea hack - var kludge = hiddenTextarea(), te = kludge.firstChild; - cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); - te.value = lastCopied.join("\n"); - var hadFocus = document.activeElement; - selectInput(te); - setTimeout(function() { - cm.display.lineSpace.removeChild(kludge); - hadFocus.focus(); - }, 50); - } - } - on(div, "copy", onCopyCut); - on(div, "cut", onCopyCut); - }, - - prepareSelection: function() { - var result = prepareSelection(this.cm, false); - result.focus = this.cm.state.focused; - return result; - }, - - showSelection: function(info) { - if (!info || !this.cm.display.view.length) return; - if (info.focus) this.showPrimarySelection(); - this.showMultipleSelections(info); - }, - - showPrimarySelection: function() { - var sel = window.getSelection(), prim = this.cm.doc.sel.primary(); - var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset); - var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset); - if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && - cmp(minPos(curAnchor, curFocus), prim.from()) == 0 && - cmp(maxPos(curAnchor, curFocus), prim.to()) == 0) - return; - - var start = posToDOM(this.cm, prim.from()); - var end = posToDOM(this.cm, prim.to()); - if (!start && !end) return; - - var view = this.cm.display.view; - var old = sel.rangeCount && sel.getRangeAt(0); - if (!start) { - start = {node: view[0].measure.map[2], offset: 0}; - } else if (!end) { // FIXME dangerously hacky - var measure = view[view.length - 1].measure; - var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; - end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; - } - - try { var rng = range(start.node, start.offset, end.offset, end.node); } - catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible - if (rng) { - sel.removeAllRanges(); - sel.addRange(rng); - if (old && sel.anchorNode == null) sel.addRange(old); - else if (gecko) this.startGracePeriod(); - } - this.rememberSelection(); - }, - - startGracePeriod: function() { - var input = this; - clearTimeout(this.gracePeriod); - this.gracePeriod = setTimeout(function() { - input.gracePeriod = false; - if (input.selectionChanged()) - input.cm.operation(function() { input.cm.curOp.selectionChanged = true; }); - }, 20); - }, - - showMultipleSelections: function(info) { - removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); - removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); - }, - - rememberSelection: function() { - var sel = window.getSelection(); - this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; - this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; - }, - - selectionInEditor: function() { - var sel = window.getSelection(); - if (!sel.rangeCount) return false; - var node = sel.getRangeAt(0).commonAncestorContainer; - return contains(this.div, node); - }, - - focus: function() { - if (this.cm.options.readOnly != "nocursor") this.div.focus(); - }, - blur: function() { this.div.blur(); }, - getField: function() { return this.div; }, - - supportsTouch: function() { return true; }, - - receivedFocus: function() { - var input = this; - if (this.selectionInEditor()) - this.pollSelection(); - else - runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; }); - - function poll() { - if (input.cm.state.focused) { - input.pollSelection(); - input.polling.set(input.cm.options.pollInterval, poll); - } - } - this.polling.set(this.cm.options.pollInterval, poll); - }, - - selectionChanged: function() { - var sel = window.getSelection(); - return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || - sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset; - }, - - pollSelection: function() { - if (!this.composing && !this.gracePeriod && this.selectionChanged()) { - var sel = window.getSelection(), cm = this.cm; - this.rememberSelection(); - var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); - var head = domToPos(cm, sel.focusNode, sel.focusOffset); - if (anchor && head) runInOp(cm, function() { - setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); - if (anchor.bad || head.bad) cm.curOp.selectionChanged = true; - }); - } - }, - - pollContent: function() { - var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); - var from = sel.from(), to = sel.to(); - if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false; - - var fromIndex; - if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { - var fromLine = lineNo(display.view[0].line); - var fromNode = display.view[0].node; - } else { - var fromLine = lineNo(display.view[fromIndex].line); - var fromNode = display.view[fromIndex - 1].node.nextSibling; - } - var toIndex = findViewIndex(cm, to.line); - if (toIndex == display.view.length - 1) { - var toLine = display.viewTo - 1; - var toNode = display.lineDiv.lastChild; - } else { - var toLine = lineNo(display.view[toIndex + 1].line) - 1; - var toNode = display.view[toIndex + 1].node.previousSibling; - } - - var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); - var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); - while (newText.length > 1 && oldText.length > 1) { - if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } - else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } - else break; - } - - var cutFront = 0, cutEnd = 0; - var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); - while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) - ++cutFront; - var newBot = lst(newText), oldBot = lst(oldText); - var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), - oldBot.length - (oldText.length == 1 ? cutFront : 0)); - while (cutEnd < maxCutEnd && - newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) - ++cutEnd; - - newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd); - newText[0] = newText[0].slice(cutFront); - - var chFrom = Pos(fromLine, cutFront); - var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); - if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { - replaceRange(cm.doc, newText, chFrom, chTo, "+input"); - return true; - } - }, - - ensurePolled: function() { - this.forceCompositionEnd(); - }, - reset: function() { - this.forceCompositionEnd(); - }, - forceCompositionEnd: function() { - if (!this.composing || this.composing.handled) return; - this.applyComposition(this.composing); - this.composing.handled = true; - this.div.blur(); - this.div.focus(); - }, - applyComposition: function(composing) { - if (composing.data && composing.data != composing.startData) - operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel); - }, - - setUneditable: function(node) { - node.setAttribute("contenteditable", "false"); - }, - - onKeyPress: function(e) { - e.preventDefault(); - operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); - }, - - onContextMenu: nothing, - resetPosition: nothing, - - needsContentAttribute: true - }, ContentEditableInput.prototype); - - function posToDOM(cm, pos) { - var view = findViewForLine(cm, pos.line); - if (!view || view.hidden) return null; - var line = getLine(cm.doc, pos.line); - var info = mapFromLineView(view, line, pos.line); - - var order = getOrder(line), side = "left"; - if (order) { - var partPos = getBidiPartAt(order, pos.ch); - side = partPos % 2 ? "right" : "left"; - } - var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); - result.offset = result.collapse == "right" ? result.end : result.start; - return result; - } - - function badPos(pos, bad) { if (bad) pos.bad = true; return pos; } - - function domToPos(cm, node, offset) { - var lineNode; - if (node == cm.display.lineDiv) { - lineNode = cm.display.lineDiv.childNodes[offset]; - if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true); - node = null; offset = 0; - } else { - for (lineNode = node;; lineNode = lineNode.parentNode) { - if (!lineNode || lineNode == cm.display.lineDiv) return null; - if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break; - } - } - for (var i = 0; i < cm.display.view.length; i++) { - var lineView = cm.display.view[i]; - if (lineView.node == lineNode) - return locateNodeInLineView(lineView, node, offset); - } - } - - function locateNodeInLineView(lineView, node, offset) { - var wrapper = lineView.text.firstChild, bad = false; - if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true); - if (node == wrapper) { - bad = true; - node = wrapper.childNodes[offset]; - offset = 0; - if (!node) { - var line = lineView.rest ? lst(lineView.rest) : lineView.line; - return badPos(Pos(lineNo(line), line.text.length), bad); - } - } - - var textNode = node.nodeType == 3 ? node : null, topNode = node; - if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { - textNode = node.firstChild; - if (offset) offset = textNode.nodeValue.length; - } - while (topNode.parentNode != wrapper) topNode = topNode.parentNode; - var measure = lineView.measure, maps = measure.maps; - - function find(textNode, topNode, offset) { - for (var i = -1; i < (maps ? maps.length : 0); i++) { - var map = i < 0 ? measure.map : maps[i]; - for (var j = 0; j < map.length; j += 3) { - var curNode = map[j + 2]; - if (curNode == textNode || curNode == topNode) { - var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); - var ch = map[j] + offset; - if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)]; - return Pos(line, ch); - } - } - } - } - var found = find(textNode, topNode, offset); - if (found) return badPos(found, bad); - - // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems - for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { - found = find(after, after.firstChild, 0); - if (found) - return badPos(Pos(found.line, found.ch - dist), bad); - else - dist += after.textContent.length; - } - for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { - found = find(before, before.firstChild, -1); - if (found) - return badPos(Pos(found.line, found.ch + dist), bad); - else - dist += after.textContent.length; - } - } - - function domTextBetween(cm, from, to, fromLine, toLine) { - var text = "", closing = false; - function recognizeMarker(id) { return function(marker) { return marker.id == id; }; } - function walk(node) { - if (node.nodeType == 1) { - var cmText = node.getAttribute("cm-text"); - if (cmText != null) { - if (cmText == "") cmText = node.textContent.replace(/\u200b/g, ""); - text += cmText; - return; - } - var markerID = node.getAttribute("cm-marker"), range; - if (markerID) { - var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); - if (found.length && (range = found[0].find())) - text += getBetween(cm.doc, range.from, range.to).join("\n"); - return; - } - if (node.getAttribute("contenteditable") == "false") return; - for (var i = 0; i < node.childNodes.length; i++) - walk(node.childNodes[i]); - if (/^(pre|div|p)$/i.test(node.nodeName)) - closing = true; - } else if (node.nodeType == 3) { - var val = node.nodeValue; - if (!val) return; - if (closing) { - text += "\n"; - closing = false; - } - text += val; - } - } - for (;;) { - walk(from); - if (from == to) break; - from = from.nextSibling; - } - return text; - } - - CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; - - // SELECTION / CURSOR - - // Selection objects are immutable. A new one is created every time - // the selection changes. A selection is one or more non-overlapping - // (and non-touching) ranges, sorted, and an integer that indicates - // which one is the primary selection (the one that's scrolled into - // view, that getCursor returns, etc). - function Selection(ranges, primIndex) { - this.ranges = ranges; - this.primIndex = primIndex; - } - - Selection.prototype = { - primary: function() { return this.ranges[this.primIndex]; }, - equals: function(other) { - if (other == this) return true; - if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false; - for (var i = 0; i < this.ranges.length; i++) { - var here = this.ranges[i], there = other.ranges[i]; - if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false; - } - return true; - }, - deepCopy: function() { - for (var out = [], i = 0; i < this.ranges.length; i++) - out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); - return new Selection(out, this.primIndex); - }, - somethingSelected: function() { - for (var i = 0; i < this.ranges.length; i++) - if (!this.ranges[i].empty()) return true; - return false; - }, - contains: function(pos, end) { - if (!end) end = pos; - for (var i = 0; i < this.ranges.length; i++) { - var range = this.ranges[i]; - if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) - return i; - } - return -1; - } - }; - - function Range(anchor, head) { - this.anchor = anchor; this.head = head; - } - - Range.prototype = { - from: function() { return minPos(this.anchor, this.head); }, - to: function() { return maxPos(this.anchor, this.head); }, - empty: function() { - return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; - } - }; - - // Take an unsorted, potentially overlapping set of ranges, and - // build a selection out of it. 'Consumes' ranges array (modifying - // it). - function normalizeSelection(ranges, primIndex) { - var prim = ranges[primIndex]; - ranges.sort(function(a, b) { return cmp(a.from(), b.from()); }); - primIndex = indexOf(ranges, prim); - for (var i = 1; i < ranges.length; i++) { - var cur = ranges[i], prev = ranges[i - 1]; - if (cmp(prev.to(), cur.from()) >= 0) { - var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); - var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; - if (i <= primIndex) --primIndex; - ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); - } - } - return new Selection(ranges, primIndex); - } - - function simpleSelection(anchor, head) { - return new Selection([new Range(anchor, head || anchor)], 0); - } - - // Most of the external API clips given positions to make sure they - // actually exist within the document. - function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} - function clipPos(doc, pos) { - if (pos.line < doc.first) return Pos(doc.first, 0); - var last = doc.first + doc.size - 1; - if (pos.line > last) return Pos(last, getLine(doc, last).text.length); - return clipToLen(pos, getLine(doc, pos.line).text.length); - } - function clipToLen(pos, linelen) { - var ch = pos.ch; - if (ch == null || ch > linelen) return Pos(pos.line, linelen); - else if (ch < 0) return Pos(pos.line, 0); - else return pos; - } - function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} - function clipPosArray(doc, array) { - for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]); - return out; - } - - // SELECTION UPDATES - - // The 'scroll' parameter given to many of these indicated whether - // the new cursor position should be scrolled into view after - // modifying the selection. - - // If shift is held or the extend flag is set, extends a range to - // include a given position (and optionally a second position). - // Otherwise, simply returns the range between the given positions. - // Used for cursor motion and such. - function extendRange(doc, range, head, other) { - if (doc.cm && doc.cm.display.shift || doc.extend) { - var anchor = range.anchor; - if (other) { - var posBefore = cmp(head, anchor) < 0; - if (posBefore != (cmp(other, anchor) < 0)) { - anchor = head; - head = other; - } else if (posBefore != (cmp(head, other) < 0)) { - head = other; - } - } - return new Range(anchor, head); - } else { - return new Range(other || head, head); - } - } - - // Extend the primary selection range, discard the rest. - function extendSelection(doc, head, other, options) { - setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options); - } - - // Extend all selections (pos is an array of selections with length - // equal the number of selections) - function extendSelections(doc, heads, options) { - for (var out = [], i = 0; i < doc.sel.ranges.length; i++) - out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); - var newSel = normalizeSelection(out, doc.sel.primIndex); - setSelection(doc, newSel, options); - } - - // Updates a single range in the selection. - function replaceOneSelection(doc, i, range, options) { - var ranges = doc.sel.ranges.slice(0); - ranges[i] = range; - setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options); - } - - // Reset the selection to a single range. - function setSimpleSelection(doc, anchor, head, options) { - setSelection(doc, simpleSelection(anchor, head), options); - } - - // Give beforeSelectionChange handlers a change to influence a - // selection update. - function filterSelectionChange(doc, sel) { - var obj = { - ranges: sel.ranges, - update: function(ranges) { - this.ranges = []; - for (var i = 0; i < ranges.length; i++) - this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), - clipPos(doc, ranges[i].head)); - } - }; - signal(doc, "beforeSelectionChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); - if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1); - else return sel; - } - - function setSelectionReplaceHistory(doc, sel, options) { - var done = doc.history.done, last = lst(done); - if (last && last.ranges) { - done[done.length - 1] = sel; - setSelectionNoUndo(doc, sel, options); - } else { - setSelection(doc, sel, options); - } - } - - // Set a new selection. - function setSelection(doc, sel, options) { - setSelectionNoUndo(doc, sel, options); - addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); - } - - function setSelectionNoUndo(doc, sel, options) { - if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) - sel = filterSelectionChange(doc, sel); - - var bias = options && options.bias || - (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); - setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); - - if (!(options && options.scroll === false) && doc.cm) - ensureCursorVisible(doc.cm); - } - - function setSelectionInner(doc, sel) { - if (sel.equals(doc.sel)) return; - - doc.sel = sel; - - if (doc.cm) { - doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true; - signalCursorActivity(doc.cm); - } - signalLater(doc, "cursorActivity", doc); - } - - // Verify that the selection does not partially select any atomic - // marked ranges. - function reCheckSelection(doc) { - setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); - } - - // Return a selection that does not partially select any atomic - // ranges. - function skipAtomicInSelection(doc, sel, bias, mayClear) { - var out; - for (var i = 0; i < sel.ranges.length; i++) { - var range = sel.ranges[i]; - var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear); - var newHead = skipAtomic(doc, range.head, bias, mayClear); - if (out || newAnchor != range.anchor || newHead != range.head) { - if (!out) out = sel.ranges.slice(0, i); - out[i] = new Range(newAnchor, newHead); - } - } - return out ? normalizeSelection(out, sel.primIndex) : sel; - } - - // Ensure a given position is not inside an atomic range. - function skipAtomic(doc, pos, bias, mayClear) { - var flipped = false, curPos = pos; - var dir = bias || 1; - doc.cantEdit = false; - search: for (;;) { - var line = getLine(doc, curPos.line); - if (line.markedSpans) { - for (var i = 0; i < line.markedSpans.length; ++i) { - var sp = line.markedSpans[i], m = sp.marker; - if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && - (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { - if (mayClear) { - signal(m, "beforeCursorEnter"); - if (m.explicitlyCleared) { - if (!line.markedSpans) break; - else {--i; continue;} - } - } - if (!m.atomic) continue; - var newPos = m.find(dir < 0 ? -1 : 1); - if (cmp(newPos, curPos) == 0) { - newPos.ch += dir; - if (newPos.ch < 0) { - if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); - else newPos = null; - } else if (newPos.ch > line.text.length) { - if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); - else newPos = null; - } - if (!newPos) { - if (flipped) { - // Driven in a corner -- no valid cursor position found at all - // -- try again *with* clearing, if we didn't already - if (!mayClear) return skipAtomic(doc, pos, bias, true); - // Otherwise, turn off editing until further notice, and return the start of the doc - doc.cantEdit = true; - return Pos(doc.first, 0); - } - flipped = true; newPos = pos; dir = -dir; - } - } - curPos = newPos; - continue search; - } - } - } - return curPos; - } - } - - // SELECTION DRAWING - - function updateSelection(cm) { - cm.display.input.showSelection(cm.display.input.prepareSelection()); - } - - function prepareSelection(cm, primary) { - var doc = cm.doc, result = {}; - var curFragment = result.cursors = document.createDocumentFragment(); - var selFragment = result.selection = document.createDocumentFragment(); - - for (var i = 0; i < doc.sel.ranges.length; i++) { - if (primary === false && i == doc.sel.primIndex) continue; - var range = doc.sel.ranges[i]; - var collapsed = range.empty(); - if (collapsed || cm.options.showCursorWhenSelecting) - drawSelectionCursor(cm, range, curFragment); - if (!collapsed) - drawSelectionRange(cm, range, selFragment); - } - return result; - } - - // Draws a cursor for the given range - function drawSelectionCursor(cm, range, output) { - var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine); - - var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); - cursor.style.left = pos.left + "px"; - cursor.style.top = pos.top + "px"; - cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; - - if (pos.other) { - // Secondary cursor, shown when on a 'jump' in bi-directional text - var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); - otherCursor.style.display = ""; - otherCursor.style.left = pos.other.left + "px"; - otherCursor.style.top = pos.other.top + "px"; - otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; - } - } - - // Draws the given range as a highlighted selection - function drawSelectionRange(cm, range, output) { - var display = cm.display, doc = cm.doc; - var fragment = document.createDocumentFragment(); - var padding = paddingH(cm.display), leftSide = padding.left; - var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; - - function add(left, top, width, bottom) { - if (top < 0) top = 0; - top = Math.round(top); - bottom = Math.round(bottom); - fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + - "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + - "px; height: " + (bottom - top) + "px")); - } - - function drawForLine(line, fromArg, toArg) { - var lineObj = getLine(doc, line); - var lineLen = lineObj.text.length; - var start, end; - function coords(ch, bias) { - return charCoords(cm, Pos(line, ch), "div", lineObj, bias); - } - - iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { - var leftPos = coords(from, "left"), rightPos, left, right; - if (from == to) { - rightPos = leftPos; - left = right = leftPos.left; - } else { - rightPos = coords(to - 1, "right"); - if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } - left = leftPos.left; - right = rightPos.right; - } - if (fromArg == null && from == 0) left = leftSide; - if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part - add(left, leftPos.top, null, leftPos.bottom); - left = leftSide; - if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); - } - if (toArg == null && to == lineLen) right = rightSide; - if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) - start = leftPos; - if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) - end = rightPos; - if (left < leftSide + 1) left = leftSide; - add(left, rightPos.top, right - left, rightPos.bottom); - }); - return {start: start, end: end}; - } - - var sFrom = range.from(), sTo = range.to(); - if (sFrom.line == sTo.line) { - drawForLine(sFrom.line, sFrom.ch, sTo.ch); - } else { - var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); - var singleVLine = visualLine(fromLine) == visualLine(toLine); - var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; - var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; - if (singleVLine) { - if (leftEnd.top < rightStart.top - 2) { - add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); - add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); - } else { - add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); - } - } - if (leftEnd.bottom < rightStart.top) - add(leftSide, leftEnd.bottom, null, rightStart.top); - } - - output.appendChild(fragment); - } - - // Cursor-blinking - function restartBlink(cm) { - if (!cm.state.focused) return; - var display = cm.display; - clearInterval(display.blinker); - var on = true; - display.cursorDiv.style.visibility = ""; - if (cm.options.cursorBlinkRate > 0) - display.blinker = setInterval(function() { - display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; - }, cm.options.cursorBlinkRate); - else if (cm.options.cursorBlinkRate < 0) - display.cursorDiv.style.visibility = "hidden"; - } - - // HIGHLIGHT WORKER - - function startWorker(cm, time) { - if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo) - cm.state.highlight.set(time, bind(highlightWorker, cm)); - } - - function highlightWorker(cm) { - var doc = cm.doc; - if (doc.frontier < doc.first) doc.frontier = doc.first; - if (doc.frontier >= cm.display.viewTo) return; - var end = +new Date + cm.options.workTime; - var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); - var changedLines = []; - - doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) { - if (doc.frontier >= cm.display.viewFrom) { // Visible - var oldStyles = line.styles; - var highlighted = highlightLine(cm, line, state, true); - line.styles = highlighted.styles; - var oldCls = line.styleClasses, newCls = highlighted.classes; - if (newCls) line.styleClasses = newCls; - else if (oldCls) line.styleClasses = null; - var ischange = !oldStyles || oldStyles.length != line.styles.length || - oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); - for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; - if (ischange) changedLines.push(doc.frontier); - line.stateAfter = copyState(doc.mode, state); - } else { - processLine(cm, line.text, state); - line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; - } - ++doc.frontier; - if (+new Date > end) { - startWorker(cm, cm.options.workDelay); - return true; - } - }); - if (changedLines.length) runInOp(cm, function() { - for (var i = 0; i < changedLines.length; i++) - regLineChange(cm, changedLines[i], "text"); - }); - } - - // Finds the line to start with when starting a parse. Tries to - // find a line with a stateAfter, so that it can start with a - // valid state. If that fails, it returns the line with the - // smallest indentation, which tends to need the least context to - // parse correctly. - function findStartLine(cm, n, precise) { - var minindent, minline, doc = cm.doc; - var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); - for (var search = n; search > lim; --search) { - if (search <= doc.first) return doc.first; - var line = getLine(doc, search - 1); - if (line.stateAfter && (!precise || search <= doc.frontier)) return search; - var indented = countColumn(line.text, null, cm.options.tabSize); - if (minline == null || minindent > indented) { - minline = search - 1; - minindent = indented; - } - } - return minline; - } - - function getStateBefore(cm, n, precise) { - var doc = cm.doc, display = cm.display; - if (!doc.mode.startState) return true; - var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; - if (!state) state = startState(doc.mode); - else state = copyState(doc.mode, state); - doc.iter(pos, n, function(line) { - processLine(cm, line.text, state); - var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo; - line.stateAfter = save ? copyState(doc.mode, state) : null; - ++pos; - }); - if (precise) doc.frontier = pos; - return state; - } - - // POSITION MEASUREMENT - - function paddingTop(display) {return display.lineSpace.offsetTop;} - function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} - function paddingH(display) { - if (display.cachedPaddingH) return display.cachedPaddingH; - var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); - var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; - var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; - if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data; - return data; - } - - function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; } - function displayWidth(cm) { - return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; - } - function displayHeight(cm) { - return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; - } - - // Ensure the lineView.wrapping.heights array is populated. This is - // an array of bottom offsets for the lines that make up a drawn - // line. When lineWrapping is on, there might be more than one - // height. - function ensureLineHeights(cm, lineView, rect) { - var wrapping = cm.options.lineWrapping; - var curWidth = wrapping && displayWidth(cm); - if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { - var heights = lineView.measure.heights = []; - if (wrapping) { - lineView.measure.width = curWidth; - var rects = lineView.text.firstChild.getClientRects(); - for (var i = 0; i < rects.length - 1; i++) { - var cur = rects[i], next = rects[i + 1]; - if (Math.abs(cur.bottom - next.bottom) > 2) - heights.push((cur.bottom + next.top) / 2 - rect.top); - } - } - heights.push(rect.bottom - rect.top); - } - } - - // Find a line map (mapping character offsets to text nodes) and a - // measurement cache for the given line number. (A line view might - // contain multiple lines when collapsed ranges are present.) - function mapFromLineView(lineView, line, lineN) { - if (lineView.line == line) - return {map: lineView.measure.map, cache: lineView.measure.cache}; - for (var i = 0; i < lineView.rest.length; i++) - if (lineView.rest[i] == line) - return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]}; - for (var i = 0; i < lineView.rest.length; i++) - if (lineNo(lineView.rest[i]) > lineN) - return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true}; - } - - // Render a line into the hidden node display.externalMeasured. Used - // when measurement is needed for a line that's not in the viewport. - function updateExternalMeasurement(cm, line) { - line = visualLine(line); - var lineN = lineNo(line); - var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); - view.lineN = lineN; - var built = view.built = buildLineContent(cm, view); - view.text = built.pre; - removeChildrenAndAdd(cm.display.lineMeasure, built.pre); - return view; - } - - // Get a {top, bottom, left, right} box (in line-local coordinates) - // for a given character. - function measureChar(cm, line, ch, bias) { - return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); - } - - // Find a line view that corresponds to the given line number. - function findViewForLine(cm, lineN) { - if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) - return cm.display.view[findViewIndex(cm, lineN)]; - var ext = cm.display.externalMeasured; - if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) - return ext; - } - - // Measurement can be split in two steps, the set-up work that - // applies to the whole line, and the measurement of the actual - // character. Functions like coordsChar, that need to do a lot of - // measurements in a row, can thus ensure that the set-up work is - // only done once. - function prepareMeasureForLine(cm, line) { - var lineN = lineNo(line); - var view = findViewForLine(cm, lineN); - if (view && !view.text) - view = null; - else if (view && view.changes) - updateLineForChanges(cm, view, lineN, getDimensions(cm)); - if (!view) - view = updateExternalMeasurement(cm, line); - - var info = mapFromLineView(view, line, lineN); - return { - line: line, view: view, rect: null, - map: info.map, cache: info.cache, before: info.before, - hasHeights: false - }; - } - - // Given a prepared measurement object, measures the position of an - // actual character (or fetches it from the cache). - function measureCharPrepared(cm, prepared, ch, bias, varHeight) { - if (prepared.before) ch = -1; - var key = ch + (bias || ""), found; - if (prepared.cache.hasOwnProperty(key)) { - found = prepared.cache[key]; - } else { - if (!prepared.rect) - prepared.rect = prepared.view.text.getBoundingClientRect(); - if (!prepared.hasHeights) { - ensureLineHeights(cm, prepared.view, prepared.rect); - prepared.hasHeights = true; - } - found = measureCharInner(cm, prepared, ch, bias); - if (!found.bogus) prepared.cache[key] = found; - } - return {left: found.left, right: found.right, - top: varHeight ? found.rtop : found.top, - bottom: varHeight ? found.rbottom : found.bottom}; - } - - var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; - - function nodeAndOffsetInLineMap(map, ch, bias) { - var node, start, end, collapse; - // First, search the line map for the text node corresponding to, - // or closest to, the target character. - for (var i = 0; i < map.length; i += 3) { - var mStart = map[i], mEnd = map[i + 1]; - if (ch < mStart) { - start = 0; end = 1; - collapse = "left"; - } else if (ch < mEnd) { - start = ch - mStart; - end = start + 1; - } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { - end = mEnd - mStart; - start = end - 1; - if (ch >= mEnd) collapse = "right"; - } - if (start != null) { - node = map[i + 2]; - if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) - collapse = bias; - if (bias == "left" && start == 0) - while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { - node = map[(i -= 3) + 2]; - collapse = "left"; - } - if (bias == "right" && start == mEnd - mStart) - while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { - node = map[(i += 3) + 2]; - collapse = "right"; - } - break; - } - } - return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}; - } - - function measureCharInner(cm, prepared, ch, bias) { - var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); - var node = place.node, start = place.start, end = place.end, collapse = place.collapse; - - var rect; - if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. - for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned - while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start; - while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end; - if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { - rect = node.parentNode.getBoundingClientRect(); - } else if (ie && cm.options.lineWrapping) { - var rects = range(node, start, end).getClientRects(); - if (rects.length) - rect = rects[bias == "right" ? rects.length - 1 : 0]; - else - rect = nullRect; - } else { - rect = range(node, start, end).getBoundingClientRect() || nullRect; - } - if (rect.left || rect.right || start == 0) break; - end = start; - start = start - 1; - collapse = "right"; - } - if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect); - } else { // If it is a widget, simply get the box for the whole widget. - if (start > 0) collapse = bias = "right"; - var rects; - if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) - rect = rects[bias == "right" ? rects.length - 1 : 0]; - else - rect = node.getBoundingClientRect(); - } - if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { - var rSpan = node.parentNode.getClientRects()[0]; - if (rSpan) - rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; - else - rect = nullRect; - } - - var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; - var mid = (rtop + rbot) / 2; - var heights = prepared.view.measure.heights; - for (var i = 0; i < heights.length - 1; i++) - if (mid < heights[i]) break; - var top = i ? heights[i - 1] : 0, bot = heights[i]; - var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, - right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, - top: top, bottom: bot}; - if (!rect.left && !rect.right) result.bogus = true; - if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } - - return result; - } - - // Work around problem with bounding client rects on ranges being - // returned incorrectly when zoomed on IE10 and below. - function maybeUpdateRectForZooming(measure, rect) { - if (!window.screen || screen.logicalXDPI == null || - screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) - return rect; - var scaleX = screen.logicalXDPI / screen.deviceXDPI; - var scaleY = screen.logicalYDPI / screen.deviceYDPI; - return {left: rect.left * scaleX, right: rect.right * scaleX, - top: rect.top * scaleY, bottom: rect.bottom * scaleY}; - } - - function clearLineMeasurementCacheFor(lineView) { - if (lineView.measure) { - lineView.measure.cache = {}; - lineView.measure.heights = null; - if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) - lineView.measure.caches[i] = {}; - } - } - - function clearLineMeasurementCache(cm) { - cm.display.externalMeasure = null; - removeChildren(cm.display.lineMeasure); - for (var i = 0; i < cm.display.view.length; i++) - clearLineMeasurementCacheFor(cm.display.view[i]); - } - - function clearCaches(cm) { - clearLineMeasurementCache(cm); - cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; - if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; - cm.display.lineNumChars = null; - } - - function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } - function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } - - // Converts a {top, bottom, left, right} box from line-local - // coordinates into another coordinate system. Context may be one of - // "line", "div" (display.lineDiv), "local"/null (editor), "window", - // or "page". - function intoCoordSystem(cm, lineObj, rect, context) { - if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { - var size = widgetHeight(lineObj.widgets[i]); - rect.top += size; rect.bottom += size; - } - if (context == "line") return rect; - if (!context) context = "local"; - var yOff = heightAtLine(lineObj); - if (context == "local") yOff += paddingTop(cm.display); - else yOff -= cm.display.viewOffset; - if (context == "page" || context == "window") { - var lOff = cm.display.lineSpace.getBoundingClientRect(); - yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); - var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); - rect.left += xOff; rect.right += xOff; - } - rect.top += yOff; rect.bottom += yOff; - return rect; - } - - // Coverts a box from "div" coords to another coordinate system. - // Context may be "window", "page", "div", or "local"/null. - function fromCoordSystem(cm, coords, context) { - if (context == "div") return coords; - var left = coords.left, top = coords.top; - // First move into "page" coordinate system - if (context == "page") { - left -= pageScrollX(); - top -= pageScrollY(); - } else if (context == "local" || !context) { - var localBox = cm.display.sizer.getBoundingClientRect(); - left += localBox.left; - top += localBox.top; - } - - var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); - return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; - } - - function charCoords(cm, pos, context, lineObj, bias) { - if (!lineObj) lineObj = getLine(cm.doc, pos.line); - return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); - } - - // Returns a box for a given cursor position, which may have an - // 'other' property containing the position of the secondary cursor - // on a bidi boundary. - function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { - lineObj = lineObj || getLine(cm.doc, pos.line); - if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj); - function get(ch, right) { - var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); - if (right) m.left = m.right; else m.right = m.left; - return intoCoordSystem(cm, lineObj, m, context); - } - function getBidi(ch, partPos) { - var part = order[partPos], right = part.level % 2; - if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { - part = order[--partPos]; - ch = bidiRight(part) - (part.level % 2 ? 0 : 1); - right = true; - } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { - part = order[++partPos]; - ch = bidiLeft(part) - part.level % 2; - right = false; - } - if (right && ch == part.to && ch > part.from) return get(ch - 1); - return get(ch, right); - } - var order = getOrder(lineObj), ch = pos.ch; - if (!order) return get(ch); - var partPos = getBidiPartAt(order, ch); - var val = getBidi(ch, partPos); - if (bidiOther != null) val.other = getBidi(ch, bidiOther); - return val; - } - - // Used to cheaply estimate the coordinates for a position. Used for - // intermediate scroll updates. - function estimateCoords(cm, pos) { - var left = 0, pos = clipPos(cm.doc, pos); - if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch; - var lineObj = getLine(cm.doc, pos.line); - var top = heightAtLine(lineObj) + paddingTop(cm.display); - return {left: left, right: left, top: top, bottom: top + lineObj.height}; - } - - // Positions returned by coordsChar contain some extra information. - // xRel is the relative x position of the input coordinates compared - // to the found position (so xRel > 0 means the coordinates are to - // the right of the character position, for example). When outside - // is true, that means the coordinates lie outside the line's - // vertical range. - function PosWithInfo(line, ch, outside, xRel) { - var pos = Pos(line, ch); - pos.xRel = xRel; - if (outside) pos.outside = true; - return pos; - } - - // Compute the character position closest to the given coordinates. - // Input must be lineSpace-local ("div" coordinate system). - function coordsChar(cm, x, y) { - var doc = cm.doc; - y += cm.display.viewOffset; - if (y < 0) return PosWithInfo(doc.first, 0, true, -1); - var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; - if (lineN > last) - return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); - if (x < 0) x = 0; - - var lineObj = getLine(doc, lineN); - for (;;) { - var found = coordsCharInner(cm, lineObj, lineN, x, y); - var merged = collapsedSpanAtEnd(lineObj); - var mergedPos = merged && merged.find(0, true); - if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) - lineN = lineNo(lineObj = mergedPos.to.line); - else - return found; - } - } - - function coordsCharInner(cm, lineObj, lineNo, x, y) { - var innerOff = y - heightAtLine(lineObj); - var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; - var preparedMeasure = prepareMeasureForLine(cm, lineObj); - - function getX(ch) { - var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure); - wrongLine = true; - if (innerOff > sp.bottom) return sp.left - adjust; - else if (innerOff < sp.top) return sp.left + adjust; - else wrongLine = false; - return sp.left; - } - - var bidi = getOrder(lineObj), dist = lineObj.text.length; - var from = lineLeft(lineObj), to = lineRight(lineObj); - var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; - - if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); - // Do a binary search between these bounds. - for (;;) { - if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { - var ch = x < fromX || x - fromX <= toX - x ? from : to; - var xDiff = x - (ch == from ? fromX : toX); - while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; - var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, - xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); - return pos; - } - var step = Math.ceil(dist / 2), middle = from + step; - if (bidi) { - middle = from; - for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); - } - var middleX = getX(middle); - if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} - else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} - } - } - - var measureText; - // Compute the default text height. - function textHeight(display) { - if (display.cachedTextHeight != null) return display.cachedTextHeight; - if (measureText == null) { - measureText = elt("pre"); - // Measure a bunch of lines, for browsers that compute - // fractional heights. - for (var i = 0; i < 49; ++i) { - measureText.appendChild(document.createTextNode("x")); - measureText.appendChild(elt("br")); - } - measureText.appendChild(document.createTextNode("x")); - } - removeChildrenAndAdd(display.measure, measureText); - var height = measureText.offsetHeight / 50; - if (height > 3) display.cachedTextHeight = height; - removeChildren(display.measure); - return height || 1; - } - - // Compute the default character width. - function charWidth(display) { - if (display.cachedCharWidth != null) return display.cachedCharWidth; - var anchor = elt("span", "xxxxxxxxxx"); - var pre = elt("pre", [anchor]); - removeChildrenAndAdd(display.measure, pre); - var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; - if (width > 2) display.cachedCharWidth = width; - return width || 10; - } - - // OPERATIONS - - // Operations are used to wrap a series of changes to the editor - // state in such a way that each change won't have to update the - // cursor and display (which would be awkward, slow, and - // error-prone). Instead, display updates are batched and then all - // combined and executed at once. - - var operationGroup = null; - - var nextOpId = 0; - // Start a new operation. - function startOperation(cm) { - cm.curOp = { - cm: cm, - viewChanged: false, // Flag that indicates that lines might need to be redrawn - startHeight: cm.doc.height, // Used to detect need to update scrollbar - forceUpdate: false, // Used to force a redraw - updateInput: null, // Whether to reset the input textarea - typing: false, // Whether this reset should be careful to leave existing text (for compositing) - changeObjs: null, // Accumulated changes, for firing change events - cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on - cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already - selectionChanged: false, // Whether the selection needs to be redrawn - updateMaxLine: false, // Set when the widest line needs to be determined anew - scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet - scrollToPos: null, // Used to scroll to a specific position - focus: false, - id: ++nextOpId // Unique ID - }; - if (operationGroup) { - operationGroup.ops.push(cm.curOp); - } else { - cm.curOp.ownsGroup = operationGroup = { - ops: [cm.curOp], - delayedCallbacks: [] - }; - } - } - - function fireCallbacksForOps(group) { - // Calls delayed callbacks and cursorActivity handlers until no - // new ones appear - var callbacks = group.delayedCallbacks, i = 0; - do { - for (; i < callbacks.length; i++) - callbacks[i](); - for (var j = 0; j < group.ops.length; j++) { - var op = group.ops[j]; - if (op.cursorActivityHandlers) - while (op.cursorActivityCalled < op.cursorActivityHandlers.length) - op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm); - } - } while (i < callbacks.length); - } - - // Finish an operation, updating the display and signalling delayed events - function endOperation(cm) { - var op = cm.curOp, group = op.ownsGroup; - if (!group) return; - - try { fireCallbacksForOps(group); } - finally { - operationGroup = null; - for (var i = 0; i < group.ops.length; i++) - group.ops[i].cm.curOp = null; - endOperations(group); - } - } - - // The DOM updates done when an operation finishes are batched so - // that the minimum number of relayouts are required. - function endOperations(group) { - var ops = group.ops; - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_R1(ops[i]); - for (var i = 0; i < ops.length; i++) // Write DOM (maybe) - endOperation_W1(ops[i]); - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_R2(ops[i]); - for (var i = 0; i < ops.length; i++) // Write DOM (maybe) - endOperation_W2(ops[i]); - for (var i = 0; i < ops.length; i++) // Read DOM - endOperation_finish(ops[i]); - } - - function endOperation_R1(op) { - var cm = op.cm, display = cm.display; - maybeClipScrollbars(cm); - if (op.updateMaxLine) findMaxLine(cm); - - op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || - op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || - op.scrollToPos.to.line >= display.viewTo) || - display.maxLineChanged && cm.options.lineWrapping; - op.update = op.mustUpdate && - new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); - } - - function endOperation_W1(op) { - op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); - } - - function endOperation_R2(op) { - var cm = op.cm, display = cm.display; - if (op.updatedDisplay) updateHeightsInViewport(cm); - - op.barMeasure = measureForScrollbars(cm); - - // If the max line changed since it was last measured, measure it, - // and ensure the document's width matches it. - // updateDisplay_W2 will use these properties to do the actual resizing - if (display.maxLineChanged && !cm.options.lineWrapping) { - op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; - cm.display.sizerWidth = op.adjustWidthTo; - op.barMeasure.scrollWidth = - Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); - op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); - } - - if (op.updatedDisplay || op.selectionChanged) - op.preparedSelection = display.input.prepareSelection(); - } - - function endOperation_W2(op) { - var cm = op.cm; - - if (op.adjustWidthTo != null) { - cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; - if (op.maxScrollLeft < cm.doc.scrollLeft) - setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); - cm.display.maxLineChanged = false; - } - - if (op.preparedSelection) - cm.display.input.showSelection(op.preparedSelection); - if (op.updatedDisplay) - setDocumentHeight(cm, op.barMeasure); - if (op.updatedDisplay || op.startHeight != cm.doc.height) - updateScrollbars(cm, op.barMeasure); - - if (op.selectionChanged) restartBlink(cm); - - if (cm.state.focused && op.updateInput) - cm.display.input.reset(op.typing); - if (op.focus && op.focus == activeElt()) ensureFocus(op.cm); - } - - function endOperation_finish(op) { - var cm = op.cm, display = cm.display, doc = cm.doc; - - if (op.updatedDisplay) postUpdateDisplay(cm, op.update); - - // Abort mouse wheel delta measurement, when scrolling explicitly - if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) - display.wheelStartX = display.wheelStartY = null; - - // Propagate the scroll position to the actual DOM scroller - if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { - doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); - display.scrollbars.setScrollTop(doc.scrollTop); - display.scroller.scrollTop = doc.scrollTop; - } - if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { - doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft)); - display.scrollbars.setScrollLeft(doc.scrollLeft); - display.scroller.scrollLeft = doc.scrollLeft; - alignHorizontally(cm); - } - // If we need to scroll a specific position into view, do so. - if (op.scrollToPos) { - var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), - clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); - if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords); - } - - // Fire events for markers that are hidden/unidden by editing or - // undoing - var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; - if (hidden) for (var i = 0; i < hidden.length; ++i) - if (!hidden[i].lines.length) signal(hidden[i], "hide"); - if (unhidden) for (var i = 0; i < unhidden.length; ++i) - if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); - - if (display.wrapper.offsetHeight) - doc.scrollTop = cm.display.scroller.scrollTop; - - // Fire change events, and delayed event handlers - if (op.changeObjs) - signal(cm, "changes", cm, op.changeObjs); - if (op.update) - op.update.finish(); - } - - // Run the given function in an operation - function runInOp(cm, f) { - if (cm.curOp) return f(); - startOperation(cm); - try { return f(); } - finally { endOperation(cm); } - } - // Wraps a function in an operation. Returns the wrapped function. - function operation(cm, f) { - return function() { - if (cm.curOp) return f.apply(cm, arguments); - startOperation(cm); - try { return f.apply(cm, arguments); } - finally { endOperation(cm); } - }; - } - // Used to add methods to editor and doc instances, wrapping them in - // operations. - function methodOp(f) { - return function() { - if (this.curOp) return f.apply(this, arguments); - startOperation(this); - try { return f.apply(this, arguments); } - finally { endOperation(this); } - }; - } - function docMethodOp(f) { - return function() { - var cm = this.cm; - if (!cm || cm.curOp) return f.apply(this, arguments); - startOperation(cm); - try { return f.apply(this, arguments); } - finally { endOperation(cm); } - }; - } - - // VIEW TRACKING - - // These objects are used to represent the visible (currently drawn) - // part of the document. A LineView may correspond to multiple - // logical lines, if those are connected by collapsed ranges. - function LineView(doc, line, lineN) { - // The starting line - this.line = line; - // Continuing lines, if any - this.rest = visualLineContinued(line); - // Number of logical lines in this visual line - this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; - this.node = this.text = null; - this.hidden = lineIsHidden(doc, line); - } - - // Create a range of LineView objects for the given lines. - function buildViewArray(cm, from, to) { - var array = [], nextPos; - for (var pos = from; pos < to; pos = nextPos) { - var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); - nextPos = pos + view.size; - array.push(view); - } - return array; - } - - // Updates the display.view data structure for a given change to the - // document. From and to are in pre-change coordinates. Lendiff is - // the amount of lines added or subtracted by the change. This is - // used for changes that span multiple lines, or change the way - // lines are divided into visual lines. regLineChange (below) - // registers single-line changes. - function regChange(cm, from, to, lendiff) { - if (from == null) from = cm.doc.first; - if (to == null) to = cm.doc.first + cm.doc.size; - if (!lendiff) lendiff = 0; - - var display = cm.display; - if (lendiff && to < display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers > from)) - display.updateLineNumbers = from; - - cm.curOp.viewChanged = true; - - if (from >= display.viewTo) { // Change after - if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) - resetView(cm); - } else if (to <= display.viewFrom) { // Change before - if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { - resetView(cm); - } else { - display.viewFrom += lendiff; - display.viewTo += lendiff; - } - } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap - resetView(cm); - } else if (from <= display.viewFrom) { // Top overlap - var cut = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cut) { - display.view = display.view.slice(cut.index); - display.viewFrom = cut.lineN; - display.viewTo += lendiff; - } else { - resetView(cm); - } - } else if (to >= display.viewTo) { // Bottom overlap - var cut = viewCuttingPoint(cm, from, from, -1); - if (cut) { - display.view = display.view.slice(0, cut.index); - display.viewTo = cut.lineN; - } else { - resetView(cm); - } - } else { // Gap in the middle - var cutTop = viewCuttingPoint(cm, from, from, -1); - var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cutTop && cutBot) { - display.view = display.view.slice(0, cutTop.index) - .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) - .concat(display.view.slice(cutBot.index)); - display.viewTo += lendiff; - } else { - resetView(cm); - } - } - - var ext = display.externalMeasured; - if (ext) { - if (to < ext.lineN) - ext.lineN += lendiff; - else if (from < ext.lineN + ext.size) - display.externalMeasured = null; - } - } - - // Register a change to a single line. Type must be one of "text", - // "gutter", "class", "widget" - function regLineChange(cm, line, type) { - cm.curOp.viewChanged = true; - var display = cm.display, ext = cm.display.externalMeasured; - if (ext && line >= ext.lineN && line < ext.lineN + ext.size) - display.externalMeasured = null; - - if (line < display.viewFrom || line >= display.viewTo) return; - var lineView = display.view[findViewIndex(cm, line)]; - if (lineView.node == null) return; - var arr = lineView.changes || (lineView.changes = []); - if (indexOf(arr, type) == -1) arr.push(type); - } - - // Clear the view. - function resetView(cm) { - cm.display.viewFrom = cm.display.viewTo = cm.doc.first; - cm.display.view = []; - cm.display.viewOffset = 0; - } - - // Find the view element corresponding to a given line. Return null - // when the line isn't visible. - function findViewIndex(cm, n) { - if (n >= cm.display.viewTo) return null; - n -= cm.display.viewFrom; - if (n < 0) return null; - var view = cm.display.view; - for (var i = 0; i < view.length; i++) { - n -= view[i].size; - if (n < 0) return i; - } - } - - function viewCuttingPoint(cm, oldN, newN, dir) { - var index = findViewIndex(cm, oldN), diff, view = cm.display.view; - if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) - return {index: index, lineN: newN}; - for (var i = 0, n = cm.display.viewFrom; i < index; i++) - n += view[i].size; - if (n != oldN) { - if (dir > 0) { - if (index == view.length - 1) return null; - diff = (n + view[index].size) - oldN; - index++; - } else { - diff = n - oldN; - } - oldN += diff; newN += diff; - } - while (visualLineNo(cm.doc, newN) != newN) { - if (index == (dir < 0 ? 0 : view.length - 1)) return null; - newN += dir * view[index - (dir < 0 ? 1 : 0)].size; - index += dir; - } - return {index: index, lineN: newN}; - } - - // Force the view to cover a given range, adding empty view element - // or clipping off existing ones as needed. - function adjustView(cm, from, to) { - var display = cm.display, view = display.view; - if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { - display.view = buildViewArray(cm, from, to); - display.viewFrom = from; - } else { - if (display.viewFrom > from) - display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); - else if (display.viewFrom < from) - display.view = display.view.slice(findViewIndex(cm, from)); - display.viewFrom = from; - if (display.viewTo < to) - display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); - else if (display.viewTo > to) - display.view = display.view.slice(0, findViewIndex(cm, to)); - } - display.viewTo = to; - } - - // Count the number of lines in the view whose DOM representation is - // out of date (or nonexistent). - function countDirtyView(cm) { - var view = cm.display.view, dirty = 0; - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty; - } - return dirty; - } - - // EVENT HANDLERS - - // Attach the necessary event handlers when initializing the editor - function registerEventHandlers(cm) { - var d = cm.display; - on(d.scroller, "mousedown", operation(cm, onMouseDown)); - // Older IE's will not fire a second mousedown for a double click - if (ie && ie_version < 11) - on(d.scroller, "dblclick", operation(cm, function(e) { - if (signalDOMEvent(cm, e)) return; - var pos = posFromMouse(cm, e); - if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; - e_preventDefault(e); - var word = cm.findWordAt(pos); - extendSelection(cm.doc, word.anchor, word.head); - })); - else - on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); - // Some browsers fire contextmenu *after* opening the menu, at - // which point we can't mess with it anymore. Context menu is - // handled in onMouseDown for these browsers. - if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); - - // Used to suppress mouse event handling when a touch happens - var touchFinished, prevTouch = {end: 0}; - function finishTouch() { - if (d.activeTouch) { - touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000); - prevTouch = d.activeTouch; - prevTouch.end = +new Date; - } - }; - function isMouseLikeTouchEvent(e) { - if (e.touches.length != 1) return false; - var touch = e.touches[0]; - return touch.radiusX <= 1 && touch.radiusY <= 1; - } - function farAway(touch, other) { - if (other.left == null) return true; - var dx = other.left - touch.left, dy = other.top - touch.top; - return dx * dx + dy * dy > 20 * 20; - } - on(d.scroller, "touchstart", function(e) { - if (!isMouseLikeTouchEvent(e)) { - clearTimeout(touchFinished); - var now = +new Date; - d.activeTouch = {start: now, moved: false, - prev: now - prevTouch.end <= 300 ? prevTouch : null}; - if (e.touches.length == 1) { - d.activeTouch.left = e.touches[0].pageX; - d.activeTouch.top = e.touches[0].pageY; - } - } - }); - on(d.scroller, "touchmove", function() { - if (d.activeTouch) d.activeTouch.moved = true; - }); - on(d.scroller, "touchend", function(e) { - var touch = d.activeTouch; - if (touch && !eventInWidget(d, e) && touch.left != null && - !touch.moved && new Date - touch.start < 300) { - var pos = cm.coordsChar(d.activeTouch, "page"), range; - if (!touch.prev || farAway(touch, touch.prev)) // Single tap - range = new Range(pos, pos); - else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap - range = cm.findWordAt(pos); - else // Triple tap - range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); - cm.setSelection(range.anchor, range.head); - cm.focus(); - e_preventDefault(e); - } - finishTouch(); - }); - on(d.scroller, "touchcancel", finishTouch); - - // Sync scrolling between fake scrollbars and real scrollable - // area, ensure viewport is updated when scrolling. - on(d.scroller, "scroll", function() { - if (d.scroller.clientHeight) { - setScrollTop(cm, d.scroller.scrollTop); - setScrollLeft(cm, d.scroller.scrollLeft, true); - signal(cm, "scroll", cm); - } - }); - - // Listen to wheel events in order to try and update the viewport on time. - on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); - on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); - - // Prevent wrapper from ever scrolling - on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); - - d.dragFunctions = { - simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);}, - start: function(e){onDragStart(cm, e);}, - drop: operation(cm, onDrop) - }; - - var inp = d.input.getField(); - on(inp, "keyup", function(e) { onKeyUp.call(cm, e); }); - on(inp, "keydown", operation(cm, onKeyDown)); - on(inp, "keypress", operation(cm, onKeyPress)); - on(inp, "focus", bind(onFocus, cm)); - on(inp, "blur", bind(onBlur, cm)); - } - - function dragDropChanged(cm, value, old) { - var wasOn = old && old != CodeMirror.Init; - if (!value != !wasOn) { - var funcs = cm.display.dragFunctions; - var toggle = value ? on : off; - toggle(cm.display.scroller, "dragstart", funcs.start); - toggle(cm.display.scroller, "dragenter", funcs.simple); - toggle(cm.display.scroller, "dragover", funcs.simple); - toggle(cm.display.scroller, "drop", funcs.drop); - } - } - - // Called when the window resizes - function onResize(cm) { - var d = cm.display; - if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth) - return; - // Might be a text scaling operation, clear size caches. - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - d.scrollbarsClipped = false; - cm.setSize(); - } - - // MOUSE EVENTS - - // Return true when the given mouse event happened in a widget - function eventInWidget(display, e) { - for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { - if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || - (n.parentNode == display.sizer && n != display.mover)) - return true; - } - } - - // Given a mouse event, find the corresponding position. If liberal - // is false, it checks whether a gutter or scrollbar was clicked, - // and returns null if it was. forRect is used by rectangular - // selections, and tries to estimate a character position even for - // coordinates beyond the right of the text. - function posFromMouse(cm, e, liberal, forRect) { - var display = cm.display; - if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null; - - var x, y, space = display.lineSpace.getBoundingClientRect(); - // Fails unpredictably on IE[67] when mouse is dragged around quickly. - try { x = e.clientX - space.left; y = e.clientY - space.top; } - catch (e) { return null; } - var coords = coordsChar(cm, x, y), line; - if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { - var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; - coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); - } - return coords; - } - - // A mouse down can be a single click, double click, triple click, - // start of selection drag, start of text drag, new cursor - // (ctrl-click), rectangle drag (alt-drag), or xwin - // middle-click-paste. Or it might be a click on something we should - // not interfere with, such as a scrollbar or widget. - function onMouseDown(e) { - var cm = this, display = cm.display; - if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return; - display.shift = e.shiftKey; - - if (eventInWidget(display, e)) { - if (!webkit) { - // Briefly turn off draggability, to allow widgets to do - // normal dragging things. - display.scroller.draggable = false; - setTimeout(function(){display.scroller.draggable = true;}, 100); - } - return; - } - if (clickInGutter(cm, e)) return; - var start = posFromMouse(cm, e); - window.focus(); - - switch (e_button(e)) { - case 1: - if (start) - leftButtonDown(cm, e, start); - else if (e_target(e) == display.scroller) - e_preventDefault(e); - break; - case 2: - if (webkit) cm.state.lastMiddleDown = +new Date; - if (start) extendSelection(cm.doc, start); - setTimeout(function() {display.input.focus();}, 20); - e_preventDefault(e); - break; - case 3: - if (captureRightClick) onContextMenu(cm, e); - else delayBlurEvent(cm); - break; - } - } - - var lastClick, lastDoubleClick; - function leftButtonDown(cm, e, start) { - if (ie) setTimeout(bind(ensureFocus, cm), 0); - else cm.curOp.focus = activeElt(); - - var now = +new Date, type; - if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) { - type = "triple"; - } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) { - type = "double"; - lastDoubleClick = {time: now, pos: start}; - } else { - type = "single"; - lastClick = {time: now, pos: start}; - } - - var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; - if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && - type == "single" && (contained = sel.contains(start)) > -1 && - (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) && - (cmp(contained.to(), start) > 0 || start.xRel < 0)) - leftButtonStartDrag(cm, e, start, modifier); - else - leftButtonSelect(cm, e, start, type, modifier); - } - - // Start a text drag. When it ends, see if any dragging actually - // happen, and treat as a click if it didn't. - function leftButtonStartDrag(cm, e, start, modifier) { - var display = cm.display, startTime = +new Date; - var dragEnd = operation(cm, function(e2) { - if (webkit) display.scroller.draggable = false; - cm.state.draggingText = false; - off(document, "mouseup", dragEnd); - off(display.scroller, "drop", dragEnd); - if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { - e_preventDefault(e2); - if (!modifier && +new Date - 200 < startTime) - extendSelection(cm.doc, start); - // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) - if (webkit || ie && ie_version == 9) - setTimeout(function() {document.body.focus(); display.input.focus();}, 20); - else - display.input.focus(); - } - }); - // Let the drag handler handle this. - if (webkit) display.scroller.draggable = true; - cm.state.draggingText = dragEnd; - // IE's approach to draggable - if (display.scroller.dragDrop) display.scroller.dragDrop(); - on(document, "mouseup", dragEnd); - on(display.scroller, "drop", dragEnd); - } - - // Normal selection, as opposed to text dragging. - function leftButtonSelect(cm, e, start, type, addNew) { - var display = cm.display, doc = cm.doc; - e_preventDefault(e); - - var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; - if (addNew && !e.shiftKey) { - ourIndex = doc.sel.contains(start); - if (ourIndex > -1) - ourRange = ranges[ourIndex]; - else - ourRange = new Range(start, start); - } else { - ourRange = doc.sel.primary(); - ourIndex = doc.sel.primIndex; - } - - if (e.altKey) { - type = "rect"; - if (!addNew) ourRange = new Range(start, start); - start = posFromMouse(cm, e, true, true); - ourIndex = -1; - } else if (type == "double") { - var word = cm.findWordAt(start); - if (cm.display.shift || doc.extend) - ourRange = extendRange(doc, ourRange, word.anchor, word.head); - else - ourRange = word; - } else if (type == "triple") { - var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0))); - if (cm.display.shift || doc.extend) - ourRange = extendRange(doc, ourRange, line.anchor, line.head); - else - ourRange = line; - } else { - ourRange = extendRange(doc, ourRange, start); - } - - if (!addNew) { - ourIndex = 0; - setSelection(doc, new Selection([ourRange], 0), sel_mouse); - startSel = doc.sel; - } else if (ourIndex == -1) { - ourIndex = ranges.length; - setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex), - {scroll: false, origin: "*mouse"}); - } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) { - setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0)); - startSel = doc.sel; - } else { - replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); - } - - var lastPos = start; - function extendTo(pos) { - if (cmp(lastPos, pos) == 0) return; - lastPos = pos; - - if (type == "rect") { - var ranges = [], tabSize = cm.options.tabSize; - var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); - var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); - var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); - for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); - line <= end; line++) { - var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); - if (left == right) - ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); - else if (text.length > leftPos) - ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); - } - if (!ranges.length) ranges.push(new Range(start, start)); - setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), - {origin: "*mouse", scroll: false}); - cm.scrollIntoView(pos); - } else { - var oldRange = ourRange; - var anchor = oldRange.anchor, head = pos; - if (type != "single") { - if (type == "double") - var range = cm.findWordAt(pos); - else - var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); - if (cmp(range.anchor, anchor) > 0) { - head = range.head; - anchor = minPos(oldRange.from(), range.anchor); - } else { - head = range.anchor; - anchor = maxPos(oldRange.to(), range.head); - } - } - var ranges = startSel.ranges.slice(0); - ranges[ourIndex] = new Range(clipPos(doc, anchor), head); - setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse); - } - } - - var editorSize = display.wrapper.getBoundingClientRect(); - // Used to ensure timeout re-tries don't fire when another extend - // happened in the meantime (clearTimeout isn't reliable -- at - // least on Chrome, the timeouts still happen even when cleared, - // if the clear happens after their scheduled firing time). - var counter = 0; - - function extend(e) { - var curCount = ++counter; - var cur = posFromMouse(cm, e, true, type == "rect"); - if (!cur) return; - if (cmp(cur, lastPos) != 0) { - cm.curOp.focus = activeElt(); - extendTo(cur); - var visible = visibleLines(display, doc); - if (cur.line >= visible.to || cur.line < visible.from) - setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); - } else { - var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; - if (outside) setTimeout(operation(cm, function() { - if (counter != curCount) return; - display.scroller.scrollTop += outside; - extend(e); - }), 50); - } - } - - function done(e) { - counter = Infinity; - e_preventDefault(e); - display.input.focus(); - off(document, "mousemove", move); - off(document, "mouseup", up); - doc.history.lastSelOrigin = null; - } - - var move = operation(cm, function(e) { - if (!e_button(e)) done(e); - else extend(e); - }); - var up = operation(cm, done); - on(document, "mousemove", move); - on(document, "mouseup", up); - } - - // Determines whether an event happened in the gutter, and fires the - // handlers for the corresponding event. - function gutterEvent(cm, e, type, prevent, signalfn) { - try { var mX = e.clientX, mY = e.clientY; } - catch(e) { return false; } - if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false; - if (prevent) e_preventDefault(e); - - var display = cm.display; - var lineBox = display.lineDiv.getBoundingClientRect(); - - if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); - mY -= lineBox.top - display.viewOffset; - - for (var i = 0; i < cm.options.gutters.length; ++i) { - var g = display.gutters.childNodes[i]; - if (g && g.getBoundingClientRect().right >= mX) { - var line = lineAtHeight(cm.doc, mY); - var gutter = cm.options.gutters[i]; - signalfn(cm, type, cm, line, gutter, e); - return e_defaultPrevented(e); - } - } - } - - function clickInGutter(cm, e) { - return gutterEvent(cm, e, "gutterClick", true, signalLater); - } - - // Kludge to work around strange IE behavior where it'll sometimes - // re-fire a series of drag-related events right after the drop (#1551) - var lastDrop = 0; - - function onDrop(e) { - var cm = this; - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) - return; - e_preventDefault(e); - if (ie) lastDrop = +new Date; - var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; - if (!pos || isReadOnly(cm)) return; - // Might be a file drop, in which case we simply extract the text - // and insert it. - if (files && files.length && window.FileReader && window.File) { - var n = files.length, text = Array(n), read = 0; - var loadFile = function(file, i) { - var reader = new FileReader; - reader.onload = operation(cm, function() { - text[i] = reader.result; - if (++read == n) { - pos = clipPos(cm.doc, pos); - var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}; - makeChange(cm.doc, change); - setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); - } - }); - reader.readAsText(file); - }; - for (var i = 0; i < n; ++i) loadFile(files[i], i); - } else { // Normal drop - // Don't do a replace if the drop happened inside of the selected text. - if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { - cm.state.draggingText(e); - // Ensure the editor is re-focused - setTimeout(function() {cm.display.input.focus();}, 20); - return; - } - try { - var text = e.dataTransfer.getData("Text"); - if (text) { - if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) - var selected = cm.listSelections(); - setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); - if (selected) for (var i = 0; i < selected.length; ++i) - replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); - cm.replaceSelection(text, "around", "paste"); - cm.display.input.focus(); - } - } - catch(e){} - } - } - - function onDragStart(cm, e) { - if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; - - e.dataTransfer.setData("Text", cm.getSelection()); - - // Use dummy image instead of default browsers image. - // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. - if (e.dataTransfer.setDragImage && !safari) { - var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); - img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (presto) { - img.width = img.height = 1; - cm.display.wrapper.appendChild(img); - // Force a relayout, or Opera won't use our image for some obscure reason - img._top = img.offsetTop; - } - e.dataTransfer.setDragImage(img, 0, 0); - if (presto) img.parentNode.removeChild(img); - } - } - - // SCROLL EVENTS - - // Sync the scrollable area and scrollbars, ensure the viewport - // covers the visible area. - function setScrollTop(cm, val) { - if (Math.abs(cm.doc.scrollTop - val) < 2) return; - cm.doc.scrollTop = val; - if (!gecko) updateDisplaySimple(cm, {top: val}); - if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; - cm.display.scrollbars.setScrollTop(val); - if (gecko) updateDisplaySimple(cm); - startWorker(cm, 100); - } - // Sync scroller and scrollbar, ensure the gutter elements are - // aligned. - function setScrollLeft(cm, val, isScroller) { - if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; - val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); - cm.doc.scrollLeft = val; - alignHorizontally(cm); - if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; - cm.display.scrollbars.setScrollLeft(val); - } - - // Since the delta values reported on mouse wheel events are - // unstandardized between browsers and even browser versions, and - // generally horribly unpredictable, this code starts by measuring - // the scroll effect that the first few mouse wheel events have, - // and, from that, detects the way it can convert deltas to pixel - // offsets afterwards. - // - // The reason we want to know the amount a wheel event will scroll - // is that it gives us a chance to update the display before the - // actual scrolling happens, reducing flickering. - - var wheelSamples = 0, wheelPixelsPerUnit = null; - // Fill in a browser-detected starting value on browsers where we - // know one. These don't have to be accurate -- the result of them - // being wrong would just be a slight flicker on the first wheel - // scroll (if it is large enough). - if (ie) wheelPixelsPerUnit = -.53; - else if (gecko) wheelPixelsPerUnit = 15; - else if (chrome) wheelPixelsPerUnit = -.7; - else if (safari) wheelPixelsPerUnit = -1/3; - - var wheelEventDelta = function(e) { - var dx = e.wheelDeltaX, dy = e.wheelDeltaY; - if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; - if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; - else if (dy == null) dy = e.wheelDelta; - return {x: dx, y: dy}; - }; - CodeMirror.wheelEventPixels = function(e) { - var delta = wheelEventDelta(e); - delta.x *= wheelPixelsPerUnit; - delta.y *= wheelPixelsPerUnit; - return delta; - }; - - function onScrollWheel(cm, e) { - var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; - - var display = cm.display, scroll = display.scroller; - // Quit if there's nothing to scroll here - if (!(dx && scroll.scrollWidth > scroll.clientWidth || - dy && scroll.scrollHeight > scroll.clientHeight)) return; - - // Webkit browsers on OS X abort momentum scrolls when the target - // of the scroll event is removed from the scrollable element. - // This hack (see related code in patchDisplay) makes sure the - // element is kept around. - if (dy && mac && webkit) { - outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { - for (var i = 0; i < view.length; i++) { - if (view[i].node == cur) { - cm.display.currentWheelTarget = cur; - break outer; - } - } - } - } - - // On some browsers, horizontal scrolling will cause redraws to - // happen before the gutter has been realigned, causing it to - // wriggle around in a most unseemly way. When we have an - // estimated pixels/delta value, we just handle horizontal - // scrolling entirely here. It'll be slightly off from native, but - // better than glitching out. - if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { - if (dy) - setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); - setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); - e_preventDefault(e); - display.wheelStartX = null; // Abort measurement, if in progress - return; - } - - // 'Project' the visible viewport to cover the area that is being - // scrolled into view (if we know enough to estimate it). - if (dy && wheelPixelsPerUnit != null) { - var pixels = dy * wheelPixelsPerUnit; - var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; - if (pixels < 0) top = Math.max(0, top + pixels - 50); - else bot = Math.min(cm.doc.height, bot + pixels + 50); - updateDisplaySimple(cm, {top: top, bottom: bot}); - } - - if (wheelSamples < 20) { - if (display.wheelStartX == null) { - display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; - display.wheelDX = dx; display.wheelDY = dy; - setTimeout(function() { - if (display.wheelStartX == null) return; - var movedX = scroll.scrollLeft - display.wheelStartX; - var movedY = scroll.scrollTop - display.wheelStartY; - var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || - (movedX && display.wheelDX && movedX / display.wheelDX); - display.wheelStartX = display.wheelStartY = null; - if (!sample) return; - wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); - ++wheelSamples; - }, 200); - } else { - display.wheelDX += dx; display.wheelDY += dy; - } - } - } - - // KEY EVENTS - - // Run a handler that was bound to a key. - function doHandleBinding(cm, bound, dropShift) { - if (typeof bound == "string") { - bound = commands[bound]; - if (!bound) return false; - } - // Ensure previous input has been read, so that the handler sees a - // consistent view of the document - cm.display.input.ensurePolled(); - var prevShift = cm.display.shift, done = false; - try { - if (isReadOnly(cm)) cm.state.suppressEdits = true; - if (dropShift) cm.display.shift = false; - done = bound(cm) != Pass; - } finally { - cm.display.shift = prevShift; - cm.state.suppressEdits = false; - } - return done; - } - - function lookupKeyForEditor(cm, name, handle) { - for (var i = 0; i < cm.state.keyMaps.length; i++) { - var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); - if (result) return result; - } - return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) - || lookupKey(name, cm.options.keyMap, handle, cm); - } - - var stopSeq = new Delayed; - function dispatchKey(cm, name, e, handle) { - var seq = cm.state.keySeq; - if (seq) { - if (isModifierKey(name)) return "handled"; - stopSeq.set(50, function() { - if (cm.state.keySeq == seq) { - cm.state.keySeq = null; - cm.display.input.reset(); - } - }); - name = seq + " " + name; - } - var result = lookupKeyForEditor(cm, name, handle); - - if (result == "multi") - cm.state.keySeq = name; - if (result == "handled") - signalLater(cm, "keyHandled", cm, name, e); - - if (result == "handled" || result == "multi") { - e_preventDefault(e); - restartBlink(cm); - } - - if (seq && !result && /\'$/.test(name)) { - e_preventDefault(e); - return true; - } - return !!result; - } - - // Handle a key from the keydown event. - function handleKeyBinding(cm, e) { - var name = keyName(e, true); - if (!name) return false; - - if (e.shiftKey && !cm.state.keySeq) { - // First try to resolve full name (including 'Shift-'). Failing - // that, see if there is a cursor-motion command (starting with - // 'go') bound to the keyname without 'Shift-'. - return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);}) - || dispatchKey(cm, name, e, function(b) { - if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) - return doHandleBinding(cm, b); - }); - } else { - return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); }); - } - } - - // Handle a key from the keypress event - function handleCharBinding(cm, e, ch) { - return dispatchKey(cm, "'" + ch + "'", e, - function(b) { return doHandleBinding(cm, b, true); }); - } - - var lastStoppedKey = null; - function onKeyDown(e) { - var cm = this; - cm.curOp.focus = activeElt(); - if (signalDOMEvent(cm, e)) return; - // IE does strange things with escape. - if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; - var code = e.keyCode; - cm.display.shift = code == 16 || e.shiftKey; - var handled = handleKeyBinding(cm, e); - if (presto) { - lastStoppedKey = handled ? code : null; - // Opera has no cut event... we try to at least catch the key combo - if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) - cm.replaceSelection("", null, "cut"); - } - - // Turn mouse into crosshair when Alt is held on Mac. - if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) - showCrossHair(cm); - } - - function showCrossHair(cm) { - var lineDiv = cm.display.lineDiv; - addClass(lineDiv, "CodeMirror-crosshair"); - - function up(e) { - if (e.keyCode == 18 || !e.altKey) { - rmClass(lineDiv, "CodeMirror-crosshair"); - off(document, "keyup", up); - off(document, "mouseover", up); - } - } - on(document, "keyup", up); - on(document, "mouseover", up); - } - - function onKeyUp(e) { - if (e.keyCode == 16) this.doc.sel.shift = false; - signalDOMEvent(this, e); - } - - function onKeyPress(e) { - var cm = this; - if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return; - var keyCode = e.keyCode, charCode = e.charCode; - if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} - if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return; - var ch = String.fromCharCode(charCode == null ? keyCode : charCode); - if (handleCharBinding(cm, e, ch)) return; - cm.display.input.onKeyPress(e); - } - - // FOCUS/BLUR EVENTS - - function delayBlurEvent(cm) { - cm.state.delayingBlurEvent = true; - setTimeout(function() { - if (cm.state.delayingBlurEvent) { - cm.state.delayingBlurEvent = false; - onBlur(cm); - } - }, 100); - } - - function onFocus(cm) { - if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false; - - if (cm.options.readOnly == "nocursor") return; - if (!cm.state.focused) { - signal(cm, "focus", cm); - cm.state.focused = true; - addClass(cm.display.wrapper, "CodeMirror-focused"); - // This test prevents this from firing when a context - // menu is closed (since the input reset would kill the - // select-all detection hack) - if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { - cm.display.input.reset(); - if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730 - } - cm.display.input.receivedFocus(); - } - restartBlink(cm); - } - function onBlur(cm) { - if (cm.state.delayingBlurEvent) return; - - if (cm.state.focused) { - signal(cm, "blur", cm); - cm.state.focused = false; - rmClass(cm.display.wrapper, "CodeMirror-focused"); - } - clearInterval(cm.display.blinker); - setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150); - } - - // CONTEXT MENU HANDLING - - // To make the context menu work, we need to briefly unhide the - // textarea (making it as unobtrusive as possible) to let the - // right-click take effect on it. - function onContextMenu(cm, e) { - if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return; - cm.display.input.onContextMenu(e); - } - - function contextMenuInGutter(cm, e) { - if (!hasHandler(cm, "gutterContextMenu")) return false; - return gutterEvent(cm, e, "gutterContextMenu", false, signal); - } - - // UPDATING - - // Compute the position of the end of a change (its 'to' property - // refers to the pre-change end). - var changeEnd = CodeMirror.changeEnd = function(change) { - if (!change.text) return change.to; - return Pos(change.from.line + change.text.length - 1, - lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); - }; - - // Adjust a position to refer to the post-change position of the - // same text, or the end of the change if the change covers it. - function adjustForChange(pos, change) { - if (cmp(pos, change.from) < 0) return pos; - if (cmp(pos, change.to) <= 0) return changeEnd(change); - - var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; - if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; - return Pos(line, ch); - } - - function computeSelAfterChange(doc, change) { - var out = []; - for (var i = 0; i < doc.sel.ranges.length; i++) { - var range = doc.sel.ranges[i]; - out.push(new Range(adjustForChange(range.anchor, change), - adjustForChange(range.head, change))); - } - return normalizeSelection(out, doc.sel.primIndex); - } - - function offsetPos(pos, old, nw) { - if (pos.line == old.line) - return Pos(nw.line, pos.ch - old.ch + nw.ch); - else - return Pos(nw.line + (pos.line - old.line), pos.ch); - } - - // Used by replaceSelections to allow moving the selection to the - // start or around the replaced test. Hint may be "start" or "around". - function computeReplacedSel(doc, changes, hint) { - var out = []; - var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - var from = offsetPos(change.from, oldPrev, newPrev); - var to = offsetPos(changeEnd(change), oldPrev, newPrev); - oldPrev = change.to; - newPrev = to; - if (hint == "around") { - var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; - out[i] = new Range(inv ? to : from, inv ? from : to); - } else { - out[i] = new Range(from, from); - } - } - return new Selection(out, doc.sel.primIndex); - } - - // Allow "beforeChange" event handlers to influence a change - function filterChange(doc, change, update) { - var obj = { - canceled: false, - from: change.from, - to: change.to, - text: change.text, - origin: change.origin, - cancel: function() { this.canceled = true; } - }; - if (update) obj.update = function(from, to, text, origin) { - if (from) this.from = clipPos(doc, from); - if (to) this.to = clipPos(doc, to); - if (text) this.text = text; - if (origin !== undefined) this.origin = origin; - }; - signal(doc, "beforeChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); - - if (obj.canceled) return null; - return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; - } - - // Apply a change to a document, and add it to the document's - // history, and propagating it to all linked documents. - function makeChange(doc, change, ignoreReadOnly) { - if (doc.cm) { - if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly); - if (doc.cm.state.suppressEdits) return; - } - - if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { - change = filterChange(doc, change, true); - if (!change) return; - } - - // Possibly split or suppress the update based on the presence - // of read-only spans in its range. - var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); - if (split) { - for (var i = split.length - 1; i >= 0; --i) - makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); - } else { - makeChangeInner(doc, change); - } - } - - function makeChangeInner(doc, change) { - if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return; - var selAfter = computeSelAfterChange(doc, change); - addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); - - makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); - var rebased = []; - - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); - }); - } - - // Revert a change stored in a document's history. - function makeChangeFromHistory(doc, type, allowSelectionOnly) { - if (doc.cm && doc.cm.state.suppressEdits) return; - - var hist = doc.history, event, selAfter = doc.sel; - var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; - - // Verify that there is a useable event (so that ctrl-z won't - // needlessly clear selection events) - for (var i = 0; i < source.length; i++) { - event = source[i]; - if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) - break; - } - if (i == source.length) return; - hist.lastOrigin = hist.lastSelOrigin = null; - - for (;;) { - event = source.pop(); - if (event.ranges) { - pushSelectionToHistory(event, dest); - if (allowSelectionOnly && !event.equals(doc.sel)) { - setSelection(doc, event, {clearRedo: false}); - return; - } - selAfter = event; - } - else break; - } - - // Build up a reverse change object to add to the opposite history - // stack (redo when undoing, and vice versa). - var antiChanges = []; - pushSelectionToHistory(selAfter, dest); - dest.push({changes: antiChanges, generation: hist.generation}); - hist.generation = event.generation || ++hist.maxGeneration; - - var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); - - for (var i = event.changes.length - 1; i >= 0; --i) { - var change = event.changes[i]; - change.origin = type; - if (filter && !filterChange(doc, change, false)) { - source.length = 0; - return; - } - - antiChanges.push(historyChangeFromChange(doc, change)); - - var after = i ? computeSelAfterChange(doc, change) : lst(source); - makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); - if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); - var rebased = []; - - // Propagate to the linked documents - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); - }); - } - } - - // Sub-views need their line numbers shifted when text is added - // above or below them in the parent document. - function shiftDoc(doc, distance) { - if (distance == 0) return; - doc.first += distance; - doc.sel = new Selection(map(doc.sel.ranges, function(range) { - return new Range(Pos(range.anchor.line + distance, range.anchor.ch), - Pos(range.head.line + distance, range.head.ch)); - }), doc.sel.primIndex); - if (doc.cm) { - regChange(doc.cm, doc.first, doc.first - distance, distance); - for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) - regLineChange(doc.cm, l, "gutter"); - } - } - - // More lower-level change function, handling only a single document - // (not linked ones). - function makeChangeSingleDoc(doc, change, selAfter, spans) { - if (doc.cm && !doc.cm.curOp) - return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); - - if (change.to.line < doc.first) { - shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); - return; - } - if (change.from.line > doc.lastLine()) return; - - // Clip the change to the size of this doc - if (change.from.line < doc.first) { - var shift = change.text.length - 1 - (doc.first - change.from.line); - shiftDoc(doc, shift); - change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), - text: [lst(change.text)], origin: change.origin}; - } - var last = doc.lastLine(); - if (change.to.line > last) { - change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), - text: [change.text[0]], origin: change.origin}; - } - - change.removed = getBetween(doc, change.from, change.to); - - if (!selAfter) selAfter = computeSelAfterChange(doc, change); - if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans); - else updateDoc(doc, change, spans); - setSelectionNoUndo(doc, selAfter, sel_dontScroll); - } - - // Handle the interaction of a change to a document with the editor - // that this document is part of. - function makeChangeSingleDocInEditor(cm, change, spans) { - var doc = cm.doc, display = cm.display, from = change.from, to = change.to; - - var recomputeMaxLength = false, checkWidthStart = from.line; - if (!cm.options.lineWrapping) { - checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); - doc.iter(checkWidthStart, to.line + 1, function(line) { - if (line == display.maxLine) { - recomputeMaxLength = true; - return true; - } - }); - } - - if (doc.sel.contains(change.from, change.to) > -1) - signalCursorActivity(cm); - - updateDoc(doc, change, spans, estimateHeight(cm)); - - if (!cm.options.lineWrapping) { - doc.iter(checkWidthStart, from.line + change.text.length, function(line) { - var len = lineLength(line); - if (len > display.maxLineLength) { - display.maxLine = line; - display.maxLineLength = len; - display.maxLineChanged = true; - recomputeMaxLength = false; - } - }); - if (recomputeMaxLength) cm.curOp.updateMaxLine = true; - } - - // Adjust frontier, schedule worker - doc.frontier = Math.min(doc.frontier, from.line); - startWorker(cm, 400); - - var lendiff = change.text.length - (to.line - from.line) - 1; - // Remember that these lines changed, for updating the display - if (change.full) - regChange(cm); - else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) - regLineChange(cm, from.line, "text"); - else - regChange(cm, from.line, to.line + 1, lendiff); - - var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); - if (changeHandler || changesHandler) { - var obj = { - from: from, to: to, - text: change.text, - removed: change.removed, - origin: change.origin - }; - if (changeHandler) signalLater(cm, "change", cm, obj); - if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); - } - cm.display.selForContextMenu = null; - } - - function replaceRange(doc, code, from, to, origin) { - if (!to) to = from; - if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; } - if (typeof code == "string") code = splitLines(code); - makeChange(doc, {from: from, to: to, text: code, origin: origin}); - } - - // SCROLLING THINGS INTO VIEW - - // If an editor sits on the top or bottom of the window, partially - // scrolled out of view, this ensures that the cursor is visible. - function maybeScrollWindow(cm, coords) { - if (signalDOMEvent(cm, "scrollCursorIntoView")) return; - - var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; - if (coords.top + box.top < 0) doScroll = true; - else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; - if (doScroll != null && !phantom) { - var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " + - (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " + - (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " + - coords.left + "px; width: 2px;"); - cm.display.lineSpace.appendChild(scrollNode); - scrollNode.scrollIntoView(doScroll); - cm.display.lineSpace.removeChild(scrollNode); - } - } - - // Scroll a given position into view (immediately), verifying that - // it actually became visible (as line heights are accurately - // measured, the position of something may 'drift' during drawing). - function scrollPosIntoView(cm, pos, end, margin) { - if (margin == null) margin = 0; - for (var limit = 0; limit < 5; limit++) { - var changed = false, coords = cursorCoords(cm, pos); - var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); - var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), - Math.min(coords.top, endCoords.top) - margin, - Math.max(coords.left, endCoords.left), - Math.max(coords.bottom, endCoords.bottom) + margin); - var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; - if (scrollPos.scrollTop != null) { - setScrollTop(cm, scrollPos.scrollTop); - if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; - } - if (scrollPos.scrollLeft != null) { - setScrollLeft(cm, scrollPos.scrollLeft); - if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; - } - if (!changed) break; - } - return coords; - } - - // Scroll a given set of coordinates into view (immediately). - function scrollIntoView(cm, x1, y1, x2, y2) { - var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); - if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); - if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); - } - - // Calculate a new scroll position needed to scroll the given - // rectangle into view. Returns an object with scrollTop and - // scrollLeft properties. When these are undefined, the - // vertical/horizontal position does not need to be adjusted. - function calculateScrollPos(cm, x1, y1, x2, y2) { - var display = cm.display, snapMargin = textHeight(cm.display); - if (y1 < 0) y1 = 0; - var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; - var screen = displayHeight(cm), result = {}; - if (y2 - y1 > screen) y2 = y1 + screen; - var docBottom = cm.doc.height + paddingVert(display); - var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; - if (y1 < screentop) { - result.scrollTop = atTop ? 0 : y1; - } else if (y2 > screentop + screen) { - var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); - if (newTop != screentop) result.scrollTop = newTop; - } - - var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; - var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); - var tooWide = x2 - x1 > screenw; - if (tooWide) x2 = x1 + screenw; - if (x1 < 10) - result.scrollLeft = 0; - else if (x1 < screenleft) - result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)); - else if (x2 > screenw + screenleft - 3) - result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw; - return result; - } - - // Store a relative adjustment to the scroll position in the current - // operation (to be applied when the operation finishes). - function addToScrollPos(cm, left, top) { - if (left != null || top != null) resolveScrollToPos(cm); - if (left != null) - cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; - if (top != null) - cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; - } - - // Make sure that at the end of the operation the current cursor is - // shown. - function ensureCursorVisible(cm) { - resolveScrollToPos(cm); - var cur = cm.getCursor(), from = cur, to = cur; - if (!cm.options.lineWrapping) { - from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; - to = Pos(cur.line, cur.ch + 1); - } - cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; - } - - // When an operation has its scrollToPos property set, and another - // scroll action is applied before the end of the operation, this - // 'simulates' scrolling that position into view in a cheap way, so - // that the effect of intermediate scroll commands is not ignored. - function resolveScrollToPos(cm) { - var range = cm.curOp.scrollToPos; - if (range) { - cm.curOp.scrollToPos = null; - var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); - var sPos = calculateScrollPos(cm, Math.min(from.left, to.left), - Math.min(from.top, to.top) - range.margin, - Math.max(from.right, to.right), - Math.max(from.bottom, to.bottom) + range.margin); - cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); - } - } - - // API UTILITIES - - // Indent the given line. The how parameter can be "smart", - // "add"/null, "subtract", or "prev". When aggressive is false - // (typically set to true for forced single-line indents), empty - // lines are not indented, and places where the mode returns Pass - // are left alone. - function indentLine(cm, n, how, aggressive) { - var doc = cm.doc, state; - if (how == null) how = "add"; - if (how == "smart") { - // Fall back to "prev" when the mode doesn't have an indentation - // method. - if (!doc.mode.indent) how = "prev"; - else state = getStateBefore(cm, n); - } - - var tabSize = cm.options.tabSize; - var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); - if (line.stateAfter) line.stateAfter = null; - var curSpaceString = line.text.match(/^\s*/)[0], indentation; - if (!aggressive && !/\S/.test(line.text)) { - indentation = 0; - how = "not"; - } else if (how == "smart") { - indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); - if (indentation == Pass || indentation > 150) { - if (!aggressive) return; - how = "prev"; - } - } - if (how == "prev") { - if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); - else indentation = 0; - } else if (how == "add") { - indentation = curSpace + cm.options.indentUnit; - } else if (how == "subtract") { - indentation = curSpace - cm.options.indentUnit; - } else if (typeof how == "number") { - indentation = curSpace + how; - } - indentation = Math.max(0, indentation); - - var indentString = "", pos = 0; - if (cm.options.indentWithTabs) - for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} - if (pos < indentation) indentString += spaceStr(indentation - pos); - - if (indentString != curSpaceString) { - replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); - line.stateAfter = null; - return true; - } else { - // Ensure that, if the cursor was in the whitespace at the start - // of the line, it is moved to the end of that space. - for (var i = 0; i < doc.sel.ranges.length; i++) { - var range = doc.sel.ranges[i]; - if (range.head.line == n && range.head.ch < curSpaceString.length) { - var pos = Pos(n, curSpaceString.length); - replaceOneSelection(doc, i, new Range(pos, pos)); - break; - } - } - } - } - - // Utility for applying a change to a line by handle or number, - // returning the number and optionally registering the line as - // changed. - function changeLine(doc, handle, changeType, op) { - var no = handle, line = handle; - if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); - else no = lineNo(handle); - if (no == null) return null; - if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); - return line; - } - - // Helper for deleting text near the selection(s), used to implement - // backspace, delete, and similar functionality. - function deleteNearSelection(cm, compute) { - var ranges = cm.doc.sel.ranges, kill = []; - // Build up a set of ranges to kill first, merging overlapping - // ranges. - for (var i = 0; i < ranges.length; i++) { - var toKill = compute(ranges[i]); - while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { - var replaced = kill.pop(); - if (cmp(replaced.from, toKill.from) < 0) { - toKill.from = replaced.from; - break; - } - } - kill.push(toKill); - } - // Next, remove those actual ranges. - runInOp(cm, function() { - for (var i = kill.length - 1; i >= 0; i--) - replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); - ensureCursorVisible(cm); - }); - } - - // Used for horizontal relative motion. Dir is -1 or 1 (left or - // right), unit can be "char", "column" (like char, but doesn't - // cross line boundaries), "word" (across next word), or "group" (to - // the start of next group of word or non-word-non-whitespace - // chars). The visually param controls whether, in right-to-left - // text, direction 1 means to move towards the next index in the - // string, or towards the character to the right of the current - // position. The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosH(doc, pos, dir, unit, visually) { - var line = pos.line, ch = pos.ch, origDir = dir; - var lineObj = getLine(doc, line); - var possible = true; - function findNextLine() { - var l = line + dir; - if (l < doc.first || l >= doc.first + doc.size) return (possible = false); - line = l; - return lineObj = getLine(doc, l); - } - function moveOnce(boundToLine) { - var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); - if (next == null) { - if (!boundToLine && findNextLine()) { - if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); - else ch = dir < 0 ? lineObj.text.length : 0; - } else return (possible = false); - } else ch = next; - return true; - } - - if (unit == "char") moveOnce(); - else if (unit == "column") moveOnce(true); - else if (unit == "word" || unit == "group") { - var sawType = null, group = unit == "group"; - var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); - for (var first = true;; first = false) { - if (dir < 0 && !moveOnce(!first)) break; - var cur = lineObj.text.charAt(ch) || "\n"; - var type = isWordChar(cur, helper) ? "w" - : group && cur == "\n" ? "n" - : !group || /\s/.test(cur) ? null - : "p"; - if (group && !first && !type) type = "s"; - if (sawType && sawType != type) { - if (dir < 0) {dir = 1; moveOnce();} - break; - } - - if (type) sawType = type; - if (dir > 0 && !moveOnce(!first)) break; - } - } - var result = skipAtomic(doc, Pos(line, ch), origDir, true); - if (!possible) result.hitSide = true; - return result; - } - - // For relative vertical movement. Dir may be -1 or 1. Unit can be - // "page" or "line". The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosV(cm, pos, dir, unit) { - var doc = cm.doc, x = pos.left, y; - if (unit == "page") { - var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); - y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); - } else if (unit == "line") { - y = dir > 0 ? pos.bottom + 3 : pos.top - 3; - } - for (;;) { - var target = coordsChar(cm, x, y); - if (!target.outside) break; - if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } - y += dir * 5; - } - return target; - } - - // EDITOR METHODS - - // The publicly visible API. Note that methodOp(f) means - // 'wrap f in an operation, performed on its `this` parameter'. - - // This is not the complete set of editor methods. Most of the - // methods defined on the Doc type are also injected into - // CodeMirror.prototype, for backwards compatibility and - // convenience. - - CodeMirror.prototype = { - constructor: CodeMirror, - focus: function(){window.focus(); this.display.input.focus();}, - - setOption: function(option, value) { - var options = this.options, old = options[option]; - if (options[option] == value && option != "mode") return; - options[option] = value; - if (optionHandlers.hasOwnProperty(option)) - operation(this, optionHandlers[option])(this, value, old); - }, - - getOption: function(option) {return this.options[option];}, - getDoc: function() {return this.doc;}, - - addKeyMap: function(map, bottom) { - this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); - }, - removeKeyMap: function(map) { - var maps = this.state.keyMaps; - for (var i = 0; i < maps.length; ++i) - if (maps[i] == map || maps[i].name == map) { - maps.splice(i, 1); - return true; - } - }, - - addOverlay: methodOp(function(spec, options) { - var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); - if (mode.startState) throw new Error("Overlays may not be stateful."); - this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); - this.state.modeGen++; - regChange(this); - }), - removeOverlay: methodOp(function(spec) { - var overlays = this.state.overlays; - for (var i = 0; i < overlays.length; ++i) { - var cur = overlays[i].modeSpec; - if (cur == spec || typeof spec == "string" && cur.name == spec) { - overlays.splice(i, 1); - this.state.modeGen++; - regChange(this); - return; - } - } - }), - - indentLine: methodOp(function(n, dir, aggressive) { - if (typeof dir != "string" && typeof dir != "number") { - if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; - else dir = dir ? "add" : "subtract"; - } - if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); - }), - indentSelection: methodOp(function(how) { - var ranges = this.doc.sel.ranges, end = -1; - for (var i = 0; i < ranges.length; i++) { - var range = ranges[i]; - if (!range.empty()) { - var from = range.from(), to = range.to(); - var start = Math.max(end, from.line); - end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; - for (var j = start; j < end; ++j) - indentLine(this, j, how); - var newRanges = this.doc.sel.ranges; - if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) - replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); - } else if (range.head.line > end) { - indentLine(this, range.head.line, how, true); - end = range.head.line; - if (i == this.doc.sel.primIndex) ensureCursorVisible(this); - } - } - }), - - // Fetch the parser token for a given character. Useful for hacks - // that want to inspect the mode state (say, for completion). - getTokenAt: function(pos, precise) { - return takeToken(this, pos, precise); - }, - - getLineTokens: function(line, precise) { - return takeToken(this, Pos(line), precise, true); - }, - - getTokenTypeAt: function(pos) { - pos = clipPos(this.doc, pos); - var styles = getLineStyles(this, getLine(this.doc, pos.line)); - var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; - var type; - if (ch == 0) type = styles[2]; - else for (;;) { - var mid = (before + after) >> 1; - if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; - else if (styles[mid * 2 + 1] < ch) before = mid + 1; - else { type = styles[mid * 2 + 2]; break; } - } - var cut = type ? type.indexOf("cm-overlay ") : -1; - return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1); - }, - - getModeAt: function(pos) { - var mode = this.doc.mode; - if (!mode.innerMode) return mode; - return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; - }, - - getHelper: function(pos, type) { - return this.getHelpers(pos, type)[0]; - }, - - getHelpers: function(pos, type) { - var found = []; - if (!helpers.hasOwnProperty(type)) return found; - var help = helpers[type], mode = this.getModeAt(pos); - if (typeof mode[type] == "string") { - if (help[mode[type]]) found.push(help[mode[type]]); - } else if (mode[type]) { - for (var i = 0; i < mode[type].length; i++) { - var val = help[mode[type][i]]; - if (val) found.push(val); - } - } else if (mode.helperType && help[mode.helperType]) { - found.push(help[mode.helperType]); - } else if (help[mode.name]) { - found.push(help[mode.name]); - } - for (var i = 0; i < help._global.length; i++) { - var cur = help._global[i]; - if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) - found.push(cur.val); - } - return found; - }, - - getStateAfter: function(line, precise) { - var doc = this.doc; - line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); - return getStateBefore(this, line + 1, precise); - }, - - cursorCoords: function(start, mode) { - var pos, range = this.doc.sel.primary(); - if (start == null) pos = range.head; - else if (typeof start == "object") pos = clipPos(this.doc, start); - else pos = start ? range.from() : range.to(); - return cursorCoords(this, pos, mode || "page"); - }, - - charCoords: function(pos, mode) { - return charCoords(this, clipPos(this.doc, pos), mode || "page"); - }, - - coordsChar: function(coords, mode) { - coords = fromCoordSystem(this, coords, mode || "page"); - return coordsChar(this, coords.left, coords.top); - }, - - lineAtHeight: function(height, mode) { - height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; - return lineAtHeight(this.doc, height + this.display.viewOffset); - }, - heightAtLine: function(line, mode) { - var end = false, lineObj; - if (typeof line == "number") { - var last = this.doc.first + this.doc.size - 1; - if (line < this.doc.first) line = this.doc.first; - else if (line > last) { line = last; end = true; } - lineObj = getLine(this.doc, line); - } else { - lineObj = line; - } - return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top + - (end ? this.doc.height - heightAtLine(lineObj) : 0); - }, - - defaultTextHeight: function() { return textHeight(this.display); }, - defaultCharWidth: function() { return charWidth(this.display); }, - - setGutterMarker: methodOp(function(line, gutterID, value) { - return changeLine(this.doc, line, "gutter", function(line) { - var markers = line.gutterMarkers || (line.gutterMarkers = {}); - markers[gutterID] = value; - if (!value && isEmpty(markers)) line.gutterMarkers = null; - return true; - }); - }), - - clearGutter: methodOp(function(gutterID) { - var cm = this, doc = cm.doc, i = doc.first; - doc.iter(function(line) { - if (line.gutterMarkers && line.gutterMarkers[gutterID]) { - line.gutterMarkers[gutterID] = null; - regLineChange(cm, i, "gutter"); - if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; - } - ++i; - }); - }), - - lineInfo: function(line) { - if (typeof line == "number") { - if (!isLine(this.doc, line)) return null; - var n = line; - line = getLine(this.doc, line); - if (!line) return null; - } else { - var n = lineNo(line); - if (n == null) return null; - } - return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, - textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, - widgets: line.widgets}; - }, - - getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};}, - - addWidget: function(pos, node, scroll, vert, horiz) { - var display = this.display; - pos = cursorCoords(this, clipPos(this.doc, pos)); - var top = pos.bottom, left = pos.left; - node.style.position = "absolute"; - node.setAttribute("cm-ignore-events", "true"); - this.display.input.setUneditable(node); - display.sizer.appendChild(node); - if (vert == "over") { - top = pos.top; - } else if (vert == "above" || vert == "near") { - var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), - hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); - // Default to positioning above (if specified and possible); otherwise default to positioning below - if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) - top = pos.top - node.offsetHeight; - else if (pos.bottom + node.offsetHeight <= vspace) - top = pos.bottom; - if (left + node.offsetWidth > hspace) - left = hspace - node.offsetWidth; - } - node.style.top = top + "px"; - node.style.left = node.style.right = ""; - if (horiz == "right") { - left = display.sizer.clientWidth - node.offsetWidth; - node.style.right = "0px"; - } else { - if (horiz == "left") left = 0; - else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; - node.style.left = left + "px"; - } - if (scroll) - scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); - }, - - triggerOnKeyDown: methodOp(onKeyDown), - triggerOnKeyPress: methodOp(onKeyPress), - triggerOnKeyUp: onKeyUp, - - execCommand: function(cmd) { - if (commands.hasOwnProperty(cmd)) - return commands[cmd](this); - }, - - triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), - - findPosH: function(from, amount, unit, visually) { - var dir = 1; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - cur = findPosH(this.doc, cur, dir, unit, visually); - if (cur.hitSide) break; - } - return cur; - }, - - moveH: methodOp(function(dir, unit) { - var cm = this; - cm.extendSelectionsBy(function(range) { - if (cm.display.shift || cm.doc.extend || range.empty()) - return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually); - else - return dir < 0 ? range.from() : range.to(); - }, sel_move); - }), - - deleteH: methodOp(function(dir, unit) { - var sel = this.doc.sel, doc = this.doc; - if (sel.somethingSelected()) - doc.replaceSelection("", null, "+delete"); - else - deleteNearSelection(this, function(range) { - var other = findPosH(doc, range.head, dir, unit, false); - return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}; - }); - }), - - findPosV: function(from, amount, unit, goalColumn) { - var dir = 1, x = goalColumn; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - var coords = cursorCoords(this, cur, "div"); - if (x == null) x = coords.left; - else coords.left = x; - cur = findPosV(this, coords, dir, unit); - if (cur.hitSide) break; - } - return cur; - }, - - moveV: methodOp(function(dir, unit) { - var cm = this, doc = this.doc, goals = []; - var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected(); - doc.extendSelectionsBy(function(range) { - if (collapse) - return dir < 0 ? range.from() : range.to(); - var headPos = cursorCoords(cm, range.head, "div"); - if (range.goalColumn != null) headPos.left = range.goalColumn; - goals.push(headPos.left); - var pos = findPosV(cm, headPos, dir, unit); - if (unit == "page" && range == doc.sel.primary()) - addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top); - return pos; - }, sel_move); - if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++) - doc.sel.ranges[i].goalColumn = goals[i]; - }), - - // Find the word at the given position (as returned by coordsChar). - findWordAt: function(pos) { - var doc = this.doc, line = getLine(doc, pos.line).text; - var start = pos.ch, end = pos.ch; - if (line) { - var helper = this.getHelper(pos, "wordChars"); - if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; - var startChar = line.charAt(start); - var check = isWordChar(startChar, helper) - ? function(ch) { return isWordChar(ch, helper); } - : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} - : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; - while (start > 0 && check(line.charAt(start - 1))) --start; - while (end < line.length && check(line.charAt(end))) ++end; - } - return new Range(Pos(pos.line, start), Pos(pos.line, end)); - }, - - toggleOverwrite: function(value) { - if (value != null && value == this.state.overwrite) return; - if (this.state.overwrite = !this.state.overwrite) - addClass(this.display.cursorDiv, "CodeMirror-overwrite"); - else - rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); - - signal(this, "overwriteToggle", this, this.state.overwrite); - }, - hasFocus: function() { return this.display.input.getField() == activeElt(); }, - - scrollTo: methodOp(function(x, y) { - if (x != null || y != null) resolveScrollToPos(this); - if (x != null) this.curOp.scrollLeft = x; - if (y != null) this.curOp.scrollTop = y; - }), - getScrollInfo: function() { - var scroller = this.display.scroller; - return {left: scroller.scrollLeft, top: scroller.scrollTop, - height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, - width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, - clientHeight: displayHeight(this), clientWidth: displayWidth(this)}; - }, - - scrollIntoView: methodOp(function(range, margin) { - if (range == null) { - range = {from: this.doc.sel.primary().head, to: null}; - if (margin == null) margin = this.options.cursorScrollMargin; - } else if (typeof range == "number") { - range = {from: Pos(range, 0), to: null}; - } else if (range.from == null) { - range = {from: range, to: null}; - } - if (!range.to) range.to = range.from; - range.margin = margin || 0; - - if (range.from.line != null) { - resolveScrollToPos(this); - this.curOp.scrollToPos = range; - } else { - var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left), - Math.min(range.from.top, range.to.top) - range.margin, - Math.max(range.from.right, range.to.right), - Math.max(range.from.bottom, range.to.bottom) + range.margin); - this.scrollTo(sPos.scrollLeft, sPos.scrollTop); - } - }), - - setSize: methodOp(function(width, height) { - var cm = this; - function interpret(val) { - return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; - } - if (width != null) cm.display.wrapper.style.width = interpret(width); - if (height != null) cm.display.wrapper.style.height = interpret(height); - if (cm.options.lineWrapping) clearLineMeasurementCache(this); - var lineNo = cm.display.viewFrom; - cm.doc.iter(lineNo, cm.display.viewTo, function(line) { - if (line.widgets) for (var i = 0; i < line.widgets.length; i++) - if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; } - ++lineNo; - }); - cm.curOp.forceUpdate = true; - signal(cm, "refresh", this); - }), - - operation: function(f){return runInOp(this, f);}, - - refresh: methodOp(function() { - var oldHeight = this.display.cachedTextHeight; - regChange(this); - this.curOp.forceUpdate = true; - clearCaches(this); - this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); - updateGutterSpace(this); - if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) - estimateLineHeights(this); - signal(this, "refresh", this); - }), - - swapDoc: methodOp(function(doc) { - var old = this.doc; - old.cm = null; - attachDoc(this, doc); - clearCaches(this); - this.display.input.reset(); - this.scrollTo(doc.scrollLeft, doc.scrollTop); - this.curOp.forceScroll = true; - signalLater(this, "swapDoc", this, old); - return old; - }), - - getInputField: function(){return this.display.input.getField();}, - getWrapperElement: function(){return this.display.wrapper;}, - getScrollerElement: function(){return this.display.scroller;}, - getGutterElement: function(){return this.display.gutters;} - }; - eventMixin(CodeMirror); - - // OPTION DEFAULTS - - // The default configuration options. - var defaults = CodeMirror.defaults = {}; - // Functions to run when options are changed. - var optionHandlers = CodeMirror.optionHandlers = {}; - - function option(name, deflt, handle, notOnInit) { - CodeMirror.defaults[name] = deflt; - if (handle) optionHandlers[name] = - notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; - } - - // Passed to option handlers when there is no old value. - var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; - - // These two are, on init, called from the constructor because they - // have to be initialized before the editor can start at all. - option("value", "", function(cm, val) { - cm.setValue(val); - }, true); - option("mode", null, function(cm, val) { - cm.doc.modeOption = val; - loadMode(cm); - }, true); - - option("indentUnit", 2, loadMode, true); - option("indentWithTabs", false); - option("smartIndent", true); - option("tabSize", 4, function(cm) { - resetModeState(cm); - clearCaches(cm); - regChange(cm); - }, true); - option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { - cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); - if (old != CodeMirror.Init) cm.refresh(); - }); - option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); - option("electricChars", true); - option("inputStyle", mobile ? "contenteditable" : "textarea", function() { - throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME - }, true); - option("rtlMoveVisually", !windows); - option("wholeLineUpdateBefore", true); - - option("theme", "default", function(cm) { - themeChanged(cm); - guttersChanged(cm); - }, true); - option("keyMap", "default", function(cm, val, old) { - var next = getKeyMap(val); - var prev = old != CodeMirror.Init && getKeyMap(old); - if (prev && prev.detach) prev.detach(cm, next); - if (next.attach) next.attach(cm, prev || null); - }); - option("extraKeys", null); - - option("lineWrapping", false, wrappingChanged, true); - option("gutters", [], function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("fixedGutter", true, function(cm, val) { - cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; - cm.refresh(); - }, true); - option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true); - option("scrollbarStyle", "native", function(cm) { - initScrollbars(cm); - updateScrollbars(cm); - cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); - cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); - }, true); - option("lineNumbers", false, function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("firstLineNumber", 1, guttersChanged, true); - option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); - option("showCursorWhenSelecting", false, updateSelection, true); - - option("resetSelectionOnContextMenu", true); - option("lineWiseCopyCut", true); - - option("readOnly", false, function(cm, val) { - if (val == "nocursor") { - onBlur(cm); - cm.display.input.blur(); - cm.display.disabled = true; - } else { - cm.display.disabled = false; - if (!val) cm.display.input.reset(); - } - }); - option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true); - option("dragDrop", true, dragDropChanged); - - option("cursorBlinkRate", 530); - option("cursorScrollMargin", 0); - option("cursorHeight", 1, updateSelection, true); - option("singleCursorHeightPerLine", true, updateSelection, true); - option("workTime", 100); - option("workDelay", 100); - option("flattenSpans", true, resetModeState, true); - option("addModeClass", false, resetModeState, true); - option("pollInterval", 100); - option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;}); - option("historyEventDelay", 1250); - option("viewportMargin", 10, function(cm){cm.refresh();}, true); - option("maxHighlightLength", 10000, resetModeState, true); - option("moveInputWithCursor", true, function(cm, val) { - if (!val) cm.display.input.resetPosition(); - }); - - option("tabindex", null, function(cm, val) { - cm.display.input.getField().tabIndex = val || ""; - }); - option("autofocus", null); - - // MODE DEFINITION AND QUERYING - - // Known modes, by name and by MIME - var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; - - // Extra arguments are stored as the mode's dependencies, which is - // used by (legacy) mechanisms like loadmode.js to automatically - // load a mode. (Preferred mechanism is the require/define calls.) - CodeMirror.defineMode = function(name, mode) { - if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; - if (arguments.length > 2) - mode.dependencies = Array.prototype.slice.call(arguments, 2); - modes[name] = mode; - }; - - CodeMirror.defineMIME = function(mime, spec) { - mimeModes[mime] = spec; - }; - - // Given a MIME type, a {name, ...options} config object, or a name - // string, return a mode config object. - CodeMirror.resolveMode = function(spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { - spec = mimeModes[spec]; - } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { - var found = mimeModes[spec.name]; - if (typeof found == "string") found = {name: found}; - spec = createObj(found, spec); - spec.name = found.name; - } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { - return CodeMirror.resolveMode("application/xml"); - } - if (typeof spec == "string") return {name: spec}; - else return spec || {name: "null"}; - }; - - // Given a mode spec (anything that resolveMode accepts), find and - // initialize an actual mode object. - CodeMirror.getMode = function(options, spec) { - var spec = CodeMirror.resolveMode(spec); - var mfactory = modes[spec.name]; - if (!mfactory) return CodeMirror.getMode(options, "text/plain"); - var modeObj = mfactory(options, spec); - if (modeExtensions.hasOwnProperty(spec.name)) { - var exts = modeExtensions[spec.name]; - for (var prop in exts) { - if (!exts.hasOwnProperty(prop)) continue; - if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; - modeObj[prop] = exts[prop]; - } - } - modeObj.name = spec.name; - if (spec.helperType) modeObj.helperType = spec.helperType; - if (spec.modeProps) for (var prop in spec.modeProps) - modeObj[prop] = spec.modeProps[prop]; - - return modeObj; - }; - - // Minimal default mode. - CodeMirror.defineMode("null", function() { - return {token: function(stream) {stream.skipToEnd();}}; - }); - CodeMirror.defineMIME("text/plain", "null"); - - // This can be used to attach properties to mode objects from - // outside the actual mode definition. - var modeExtensions = CodeMirror.modeExtensions = {}; - CodeMirror.extendMode = function(mode, properties) { - var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); - copyObj(properties, exts); - }; - - // EXTENSIONS - - CodeMirror.defineExtension = function(name, func) { - CodeMirror.prototype[name] = func; - }; - CodeMirror.defineDocExtension = function(name, func) { - Doc.prototype[name] = func; - }; - CodeMirror.defineOption = option; - - var initHooks = []; - CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; - - var helpers = CodeMirror.helpers = {}; - CodeMirror.registerHelper = function(type, name, value) { - if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []}; - helpers[type][name] = value; - }; - CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { - CodeMirror.registerHelper(type, name, value); - helpers[type]._global.push({pred: predicate, val: value}); - }; - - // MODE STATE HANDLING - - // Utility functions for working with state. Exported because nested - // modes need to do this for their inner modes. - - var copyState = CodeMirror.copyState = function(mode, state) { - if (state === true) return state; - if (mode.copyState) return mode.copyState(state); - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) val = val.concat([]); - nstate[n] = val; - } - return nstate; - }; - - var startState = CodeMirror.startState = function(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; - }; - - // Given a mode and a state (for that mode), find the inner mode and - // state at the position that the state refers to. - CodeMirror.innerMode = function(mode, state) { - while (mode.innerMode) { - var info = mode.innerMode(state); - if (!info || info.mode == mode) break; - state = info.state; - mode = info.mode; - } - return info || {mode: mode, state: state}; - }; - - // STANDARD COMMANDS - - // Commands are parameter-less actions that can be performed on an - // editor, mostly used for keybindings. - var commands = CodeMirror.commands = { - selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);}, - singleSelection: function(cm) { - cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); - }, - killLine: function(cm) { - deleteNearSelection(cm, function(range) { - if (range.empty()) { - var len = getLine(cm.doc, range.head.line).text.length; - if (range.head.ch == len && range.head.line < cm.lastLine()) - return {from: range.head, to: Pos(range.head.line + 1, 0)}; - else - return {from: range.head, to: Pos(range.head.line, len)}; - } else { - return {from: range.from(), to: range.to()}; - } - }); - }, - deleteLine: function(cm) { - deleteNearSelection(cm, function(range) { - return {from: Pos(range.from().line, 0), - to: clipPos(cm.doc, Pos(range.to().line + 1, 0))}; - }); - }, - delLineLeft: function(cm) { - deleteNearSelection(cm, function(range) { - return {from: Pos(range.from().line, 0), to: range.from()}; - }); - }, - delWrappedLineLeft: function(cm) { - deleteNearSelection(cm, function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var leftPos = cm.coordsChar({left: 0, top: top}, "div"); - return {from: leftPos, to: range.from()}; - }); - }, - delWrappedLineRight: function(cm) { - deleteNearSelection(cm, function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); - return {from: range.from(), to: rightPos }; - }); - }, - undo: function(cm) {cm.undo();}, - redo: function(cm) {cm.redo();}, - undoSelection: function(cm) {cm.undoSelection();}, - redoSelection: function(cm) {cm.redoSelection();}, - goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, - goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, - goLineStart: function(cm) { - cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); }, - {origin: "+move", bias: 1}); - }, - goLineStartSmart: function(cm) { - cm.extendSelectionsBy(function(range) { - return lineStartSmart(cm, range.head); - }, {origin: "+move", bias: 1}); - }, - goLineEnd: function(cm) { - cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); }, - {origin: "+move", bias: -1}); - }, - goLineRight: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); - }, sel_move); - }, - goLineLeft: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - return cm.coordsChar({left: 0, top: top}, "div"); - }, sel_move); - }, - goLineLeftSmart: function(cm) { - cm.extendSelectionsBy(function(range) { - var top = cm.charCoords(range.head, "div").top + 5; - var pos = cm.coordsChar({left: 0, top: top}, "div"); - if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head); - return pos; - }, sel_move); - }, - goLineUp: function(cm) {cm.moveV(-1, "line");}, - goLineDown: function(cm) {cm.moveV(1, "line");}, - goPageUp: function(cm) {cm.moveV(-1, "page");}, - goPageDown: function(cm) {cm.moveV(1, "page");}, - goCharLeft: function(cm) {cm.moveH(-1, "char");}, - goCharRight: function(cm) {cm.moveH(1, "char");}, - goColumnLeft: function(cm) {cm.moveH(-1, "column");}, - goColumnRight: function(cm) {cm.moveH(1, "column");}, - goWordLeft: function(cm) {cm.moveH(-1, "word");}, - goGroupRight: function(cm) {cm.moveH(1, "group");}, - goGroupLeft: function(cm) {cm.moveH(-1, "group");}, - goWordRight: function(cm) {cm.moveH(1, "word");}, - delCharBefore: function(cm) {cm.deleteH(-1, "char");}, - delCharAfter: function(cm) {cm.deleteH(1, "char");}, - delWordBefore: function(cm) {cm.deleteH(-1, "word");}, - delWordAfter: function(cm) {cm.deleteH(1, "word");}, - delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, - delGroupAfter: function(cm) {cm.deleteH(1, "group");}, - indentAuto: function(cm) {cm.indentSelection("smart");}, - indentMore: function(cm) {cm.indentSelection("add");}, - indentLess: function(cm) {cm.indentSelection("subtract");}, - insertTab: function(cm) {cm.replaceSelection("\t");}, - insertSoftTab: function(cm) { - var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; - for (var i = 0; i < ranges.length; i++) { - var pos = ranges[i].from(); - var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); - spaces.push(new Array(tabSize - col % tabSize + 1).join(" ")); - } - cm.replaceSelections(spaces); - }, - defaultTab: function(cm) { - if (cm.somethingSelected()) cm.indentSelection("add"); - else cm.execCommand("insertTab"); - }, - transposeChars: function(cm) { - runInOp(cm, function() { - var ranges = cm.listSelections(), newSel = []; - for (var i = 0; i < ranges.length; i++) { - var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; - if (line) { - if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1); - if (cur.ch > 0) { - cur = new Pos(cur.line, cur.ch + 1); - cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), - Pos(cur.line, cur.ch - 2), cur, "+transpose"); - } else if (cur.line > cm.doc.first) { - var prev = getLine(cm.doc, cur.line - 1).text; - if (prev) - cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1), - Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose"); - } - } - newSel.push(new Range(cur, cur)); - } - cm.setSelections(newSel); - }); - }, - newlineAndIndent: function(cm) { - runInOp(cm, function() { - var len = cm.listSelections().length; - for (var i = 0; i < len; i++) { - var range = cm.listSelections()[i]; - cm.replaceRange("\n", range.anchor, range.head, "+input"); - cm.indentLine(range.from().line + 1, null, true); - ensureCursorVisible(cm); - } - }); - }, - toggleOverwrite: function(cm) {cm.toggleOverwrite();} - }; - - - // STANDARD KEYMAPS - - var keyMap = CodeMirror.keyMap = {}; - - keyMap.basic = { - "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", - "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", - "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", - "Tab": "defaultTab", "Shift-Tab": "indentAuto", - "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", - "Esc": "singleSelection" - }; - // Note that the save and find-related commands aren't defined by - // default. User code or addons can define them. Unknown commands - // are simply ignored. - keyMap.pcDefault = { - "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", - "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", - "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", - "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", - "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", - "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", - "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", - fallthrough: "basic" - }; - // Very basic readline/emacs-style bindings, which are standard on Mac. - keyMap.emacsy = { - "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", - "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", - "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", - "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" - }; - keyMap.macDefault = { - "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", - "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", - "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", - "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", - "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", - "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", - fallthrough: ["basic", "emacsy"] - }; - keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; - - // KEYMAP DISPATCH - - function normalizeKeyName(name) { - var parts = name.split(/-(?!$)/), name = parts[parts.length - 1]; - var alt, ctrl, shift, cmd; - for (var i = 0; i < parts.length - 1; i++) { - var mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) cmd = true; - else if (/^a(lt)?$/i.test(mod)) alt = true; - else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true; - else if (/^s(hift)$/i.test(mod)) shift = true; - else throw new Error("Unrecognized modifier name: " + mod); - } - if (alt) name = "Alt-" + name; - if (ctrl) name = "Ctrl-" + name; - if (cmd) name = "Cmd-" + name; - if (shift) name = "Shift-" + name; - return name; - } - - // This is a kludge to keep keymaps mostly working as raw objects - // (backwards compatibility) while at the same time support features - // like normalization and multi-stroke key bindings. It compiles a - // new normalized keymap, and then updates the old object to reflect - // this. - CodeMirror.normalizeKeyMap = function(keymap) { - var copy = {}; - for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) { - var value = keymap[keyname]; - if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue; - if (value == "...") { delete keymap[keyname]; continue; } - - var keys = map(keyname.split(" "), normalizeKeyName); - for (var i = 0; i < keys.length; i++) { - var val, name; - if (i == keys.length - 1) { - name = keys.join(" "); - val = value; - } else { - name = keys.slice(0, i + 1).join(" "); - val = "..."; - } - var prev = copy[name]; - if (!prev) copy[name] = val; - else if (prev != val) throw new Error("Inconsistent bindings for " + name); - } - delete keymap[keyname]; - } - for (var prop in copy) keymap[prop] = copy[prop]; - return keymap; - }; - - var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) { - map = getKeyMap(map); - var found = map.call ? map.call(key, context) : map[key]; - if (found === false) return "nothing"; - if (found === "...") return "multi"; - if (found != null && handle(found)) return "handled"; - - if (map.fallthrough) { - if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") - return lookupKey(key, map.fallthrough, handle, context); - for (var i = 0; i < map.fallthrough.length; i++) { - var result = lookupKey(key, map.fallthrough[i], handle, context); - if (result) return result; - } - } - }; - - // Modifier key presses don't count as 'real' key presses for the - // purpose of keymap fallthrough. - var isModifierKey = CodeMirror.isModifierKey = function(value) { - var name = typeof value == "string" ? value : keyNames[value.keyCode]; - return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; - }; - - // Look up the name of a key as indicated by an event object. - var keyName = CodeMirror.keyName = function(event, noShift) { - if (presto && event.keyCode == 34 && event["char"]) return false; - var base = keyNames[event.keyCode], name = base; - if (name == null || event.altGraphKey) return false; - if (event.altKey && base != "Alt") name = "Alt-" + name; - if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name; - if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name; - if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name; - return name; - }; - - function getKeyMap(val) { - return typeof val == "string" ? keyMap[val] : val; - } - - // FROMTEXTAREA - - CodeMirror.fromTextArea = function(textarea, options) { - options = options ? copyObj(options) : {}; - options.value = textarea.value; - if (!options.tabindex && textarea.tabIndex) - options.tabindex = textarea.tabIndex; - if (!options.placeholder && textarea.placeholder) - options.placeholder = textarea.placeholder; - // Set autofocus to true if this textarea is focused, or if it has - // autofocus and no other element is focused. - if (options.autofocus == null) { - var hasFocus = activeElt(); - options.autofocus = hasFocus == textarea || - textarea.getAttribute("autofocus") != null && hasFocus == document.body; - } - - function save() {textarea.value = cm.getValue();} - if (textarea.form) { - on(textarea.form, "submit", save); - // Deplorable hack to make the submit method do the right thing. - if (!options.leaveSubmitMethodAlone) { - var form = textarea.form, realSubmit = form.submit; - try { - var wrappedSubmit = form.submit = function() { - save(); - form.submit = realSubmit; - form.submit(); - form.submit = wrappedSubmit; - }; - } catch(e) {} - } - } - - options.finishInit = function(cm) { - cm.save = save; - cm.getTextArea = function() { return textarea; }; - cm.toTextArea = function() { - cm.toTextArea = isNaN; // Prevent this from being ran twice - save(); - textarea.parentNode.removeChild(cm.getWrapperElement()); - textarea.style.display = ""; - if (textarea.form) { - off(textarea.form, "submit", save); - if (typeof textarea.form.submit == "function") - textarea.form.submit = realSubmit; - } - }; - }; - - textarea.style.display = "none"; - var cm = CodeMirror(function(node) { - textarea.parentNode.insertBefore(node, textarea.nextSibling); - }, options); - return cm; - }; - - // STRING STREAM - - // Fed to the mode parsers, provides helper functions to make - // parsers more succinct. - - var StringStream = CodeMirror.StringStream = function(string, tabSize) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - this.lineStart = 0; - }; - - StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == this.lineStart;}, - peek: function() {return this.string.charAt(this.pos) || undefined;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() { - if (this.lastColumnPos < this.start) { - this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); - this.lastColumnPos = this.start; - } - return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }, - indentation: function() { - return countColumn(this.string, null, this.tabSize) - - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);}, - hideFirstChars: function(n, inner) { - this.lineStart += n; - try { return inner(); } - finally { this.lineStart -= n; } - } - }; - - // TEXTMARKERS - - // Created with markText and setBookmark methods. A TextMarker is a - // handle that can be used to clear or find a marked position in the - // document. Line objects hold arrays (markedSpans) containing - // {from, to, marker} object pointing to such marker objects, and - // indicating that such a marker is present on that line. Multiple - // lines may point to the same marker when it spans across lines. - // The spans will have null for their from/to properties when the - // marker continues beyond the start/end of the line. Markers have - // links back to the lines they currently touch. - - var nextMarkerId = 0; - - var TextMarker = CodeMirror.TextMarker = function(doc, type) { - this.lines = []; - this.type = type; - this.doc = doc; - this.id = ++nextMarkerId; - }; - eventMixin(TextMarker); - - // Clear the marker. - TextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - var cm = this.doc.cm, withOp = cm && !cm.curOp; - if (withOp) startOperation(cm); - if (hasHandler(this, "clear")) { - var found = this.find(); - if (found) signalLater(this, "clear", found.from, found.to); - } - var min = null, max = null; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text"); - else if (cm) { - if (span.to != null) max = lineNo(line); - if (span.from != null) min = lineNo(line); - } - line.markedSpans = removeMarkedSpan(line.markedSpans, span); - if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) - updateLineHeight(line, textHeight(cm.display)); - } - if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { - var visual = visualLine(this.lines[i]), len = lineLength(visual); - if (len > cm.display.maxLineLength) { - cm.display.maxLine = visual; - cm.display.maxLineLength = len; - cm.display.maxLineChanged = true; - } - } - - if (min != null && cm && this.collapsed) regChange(cm, min, max + 1); - this.lines.length = 0; - this.explicitlyCleared = true; - if (this.atomic && this.doc.cantEdit) { - this.doc.cantEdit = false; - if (cm) reCheckSelection(cm.doc); - } - if (cm) signalLater(cm, "markerCleared", cm, this); - if (withOp) endOperation(cm); - if (this.parent) this.parent.clear(); - }; - - // Find the position of the marker in the document. Returns a {from, - // to} object by default. Side can be passed to get a specific side - // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the - // Pos objects returned contain a line object, rather than a line - // number (used to prevent looking up the same line twice). - TextMarker.prototype.find = function(side, lineObj) { - if (side == null && this.type == "bookmark") side = 1; - var from, to; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (span.from != null) { - from = Pos(lineObj ? line : lineNo(line), span.from); - if (side == -1) return from; - } - if (span.to != null) { - to = Pos(lineObj ? line : lineNo(line), span.to); - if (side == 1) return to; - } - } - return from && {from: from, to: to}; - }; - - // Signals that the marker's widget changed, and surrounding layout - // should be recomputed. - TextMarker.prototype.changed = function() { - var pos = this.find(-1, true), widget = this, cm = this.doc.cm; - if (!pos || !cm) return; - runInOp(cm, function() { - var line = pos.line, lineN = lineNo(pos.line); - var view = findViewForLine(cm, lineN); - if (view) { - clearLineMeasurementCacheFor(view); - cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; - } - cm.curOp.updateMaxLine = true; - if (!lineIsHidden(widget.doc, line) && widget.height != null) { - var oldHeight = widget.height; - widget.height = null; - var dHeight = widgetHeight(widget) - oldHeight; - if (dHeight) - updateLineHeight(line, line.height + dHeight); - } - }); - }; - - TextMarker.prototype.attachLine = function(line) { - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) - (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); - } - this.lines.push(line); - }; - TextMarker.prototype.detachLine = function(line) { - this.lines.splice(indexOf(this.lines, line), 1); - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); - } - }; - - // Collapsed markers have unique ids, in order to be able to order - // them, which is needed for uniquely determining an outer marker - // when they overlap (they may nest, but not partially overlap). - var nextMarkerId = 0; - - // Create a marker, wire it up to the right lines, and - function markText(doc, from, to, options, type) { - // Shared markers (across linked documents) are handled separately - // (markTextShared will call out to this again, once per - // document). - if (options && options.shared) return markTextShared(doc, from, to, options, type); - // Ensure we are in an operation. - if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); - - var marker = new TextMarker(doc, type), diff = cmp(from, to); - if (options) copyObj(options, marker, false); - // Don't connect empty markers unless clearWhenEmpty is false - if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) - return marker; - if (marker.replacedWith) { - // Showing up as a widget implies collapsed (widget replaces text) - marker.collapsed = true; - marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget"); - if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true"); - if (options.insertLeft) marker.widgetNode.insertLeft = true; - } - if (marker.collapsed) { - if (conflictingCollapsedRange(doc, from.line, from, to, marker) || - from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) - throw new Error("Inserting collapsed marker partially overlapping an existing one"); - sawCollapsedSpans = true; - } - - if (marker.addToHistory) - addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); - - var curLine = from.line, cm = doc.cm, updateMaxLine; - doc.iter(curLine, to.line + 1, function(line) { - if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) - updateMaxLine = true; - if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); - addMarkedSpan(line, new MarkedSpan(marker, - curLine == from.line ? from.ch : null, - curLine == to.line ? to.ch : null)); - ++curLine; - }); - // lineIsHidden depends on the presence of the spans, so needs a second pass - if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { - if (lineIsHidden(doc, line)) updateLineHeight(line, 0); - }); - - if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); - - if (marker.readOnly) { - sawReadOnlySpans = true; - if (doc.history.done.length || doc.history.undone.length) - doc.clearHistory(); - } - if (marker.collapsed) { - marker.id = ++nextMarkerId; - marker.atomic = true; - } - if (cm) { - // Sync editor state - if (updateMaxLine) cm.curOp.updateMaxLine = true; - if (marker.collapsed) - regChange(cm, from.line, to.line + 1); - else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css) - for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text"); - if (marker.atomic) reCheckSelection(cm.doc); - signalLater(cm, "markerAdded", cm, marker); - } - return marker; - } - - // SHARED TEXTMARKERS - - // A shared marker spans multiple linked documents. It is - // implemented as a meta-marker-object controlling multiple normal - // markers. - var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) { - this.markers = markers; - this.primary = primary; - for (var i = 0; i < markers.length; ++i) - markers[i].parent = this; - }; - eventMixin(SharedTextMarker); - - SharedTextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - this.explicitlyCleared = true; - for (var i = 0; i < this.markers.length; ++i) - this.markers[i].clear(); - signalLater(this, "clear"); - }; - SharedTextMarker.prototype.find = function(side, lineObj) { - return this.primary.find(side, lineObj); - }; - - function markTextShared(doc, from, to, options, type) { - options = copyObj(options); - options.shared = false; - var markers = [markText(doc, from, to, options, type)], primary = markers[0]; - var widget = options.widgetNode; - linkedDocs(doc, function(doc) { - if (widget) options.widgetNode = widget.cloneNode(true); - markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); - for (var i = 0; i < doc.linked.length; ++i) - if (doc.linked[i].isParent) return; - primary = lst(markers); - }); - return new SharedTextMarker(markers, primary); - } - - function findSharedMarkers(doc) { - return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), - function(m) { return m.parent; }); - } - - function copySharedMarkers(doc, markers) { - for (var i = 0; i < markers.length; i++) { - var marker = markers[i], pos = marker.find(); - var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); - if (cmp(mFrom, mTo)) { - var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); - marker.markers.push(subMark); - subMark.parent = marker; - } - } - } - - function detachSharedMarkers(markers) { - for (var i = 0; i < markers.length; i++) { - var marker = markers[i], linked = [marker.primary.doc];; - linkedDocs(marker.primary.doc, function(d) { linked.push(d); }); - for (var j = 0; j < marker.markers.length; j++) { - var subMarker = marker.markers[j]; - if (indexOf(linked, subMarker.doc) == -1) { - subMarker.parent = null; - marker.markers.splice(j--, 1); - } - } - } - } - - // TEXTMARKER SPANS - - function MarkedSpan(marker, from, to) { - this.marker = marker; - this.from = from; this.to = to; - } - - // Search an array of spans for a span matching the given marker. - function getMarkedSpanFor(spans, marker) { - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.marker == marker) return span; - } - } - // Remove a span from an array, returning undefined if no spans are - // left (we don't store arrays for lines without spans). - function removeMarkedSpan(spans, span) { - for (var r, i = 0; i < spans.length; ++i) - if (spans[i] != span) (r || (r = [])).push(spans[i]); - return r; - } - // Add a span to a line. - function addMarkedSpan(line, span) { - line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; - span.marker.attachLine(line); - } - - // Used for the algorithm that adjusts markers for a change in the - // document. These functions cut an array of spans at a given - // character position, returning an array of remaining chunks (or - // undefined if nothing remains). - function markedSpansBefore(old, startCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); - if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); - (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); - } - } - return nw; - } - function markedSpansAfter(old, endCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); - if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); - (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, - span.to == null ? null : span.to - endCh)); - } - } - return nw; - } - - // Given a change object, compute the new set of marker spans that - // cover the line in which the change took place. Removes spans - // entirely within the change, reconnects spans belonging to the - // same marker that appear on both sides of the change, and cuts off - // spans partially within the change. Returns an array of span - // arrays with one element for each line in (after) the change. - function stretchSpansOverChange(doc, change) { - if (change.full) return null; - var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; - var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; - if (!oldFirst && !oldLast) return null; - - var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; - // Get the spans that 'stick out' on both sides - var first = markedSpansBefore(oldFirst, startCh, isInsert); - var last = markedSpansAfter(oldLast, endCh, isInsert); - - // Next, merge those two ends - var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); - if (first) { - // Fix up .to properties of first - for (var i = 0; i < first.length; ++i) { - var span = first[i]; - if (span.to == null) { - var found = getMarkedSpanFor(last, span.marker); - if (!found) span.to = startCh; - else if (sameLine) span.to = found.to == null ? null : found.to + offset; - } - } - } - if (last) { - // Fix up .from in last (or move them into first in case of sameLine) - for (var i = 0; i < last.length; ++i) { - var span = last[i]; - if (span.to != null) span.to += offset; - if (span.from == null) { - var found = getMarkedSpanFor(first, span.marker); - if (!found) { - span.from = offset; - if (sameLine) (first || (first = [])).push(span); - } - } else { - span.from += offset; - if (sameLine) (first || (first = [])).push(span); - } - } - } - // Make sure we didn't create any zero-length spans - if (first) first = clearEmptySpans(first); - if (last && last != first) last = clearEmptySpans(last); - - var newMarkers = [first]; - if (!sameLine) { - // Fill gap with whole-line-spans - var gap = change.text.length - 2, gapMarkers; - if (gap > 0 && first) - for (var i = 0; i < first.length; ++i) - if (first[i].to == null) - (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)); - for (var i = 0; i < gap; ++i) - newMarkers.push(gapMarkers); - newMarkers.push(last); - } - return newMarkers; - } - - // Remove spans that are empty and don't have a clearWhenEmpty - // option of false. - function clearEmptySpans(spans) { - for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) - spans.splice(i--, 1); - } - if (!spans.length) return null; - return spans; - } - - // Used for un/re-doing changes from the history. Combines the - // result of computing the existing spans with the set of spans that - // existed in the history (so that deleting around a span and then - // undoing brings back the span). - function mergeOldSpans(doc, change) { - var old = getOldSpans(doc, change); - var stretched = stretchSpansOverChange(doc, change); - if (!old) return stretched; - if (!stretched) return old; - - for (var i = 0; i < old.length; ++i) { - var oldCur = old[i], stretchCur = stretched[i]; - if (oldCur && stretchCur) { - spans: for (var j = 0; j < stretchCur.length; ++j) { - var span = stretchCur[j]; - for (var k = 0; k < oldCur.length; ++k) - if (oldCur[k].marker == span.marker) continue spans; - oldCur.push(span); - } - } else if (stretchCur) { - old[i] = stretchCur; - } - } - return old; - } - - // Used to 'clip' out readOnly ranges when making a change. - function removeReadOnlyRanges(doc, from, to) { - var markers = null; - doc.iter(from.line, to.line + 1, function(line) { - if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { - var mark = line.markedSpans[i].marker; - if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) - (markers || (markers = [])).push(mark); - } - }); - if (!markers) return null; - var parts = [{from: from, to: to}]; - for (var i = 0; i < markers.length; ++i) { - var mk = markers[i], m = mk.find(0); - for (var j = 0; j < parts.length; ++j) { - var p = parts[j]; - if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue; - var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); - if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) - newParts.push({from: p.from, to: m.from}); - if (dto > 0 || !mk.inclusiveRight && !dto) - newParts.push({from: m.to, to: p.to}); - parts.splice.apply(parts, newParts); - j += newParts.length - 1; - } - } - return parts; - } - - // Connect or disconnect spans from a line. - function detachMarkedSpans(line) { - var spans = line.markedSpans; - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.detachLine(line); - line.markedSpans = null; - } - function attachMarkedSpans(line, spans) { - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.attachLine(line); - line.markedSpans = spans; - } - - // Helpers used when computing which overlapping collapsed span - // counts as the larger one. - function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; } - function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; } - - // Returns a number indicating which of two overlapping collapsed - // spans is larger (and thus includes the other). Falls back to - // comparing ids when the spans cover exactly the same range. - function compareCollapsedMarkers(a, b) { - var lenDiff = a.lines.length - b.lines.length; - if (lenDiff != 0) return lenDiff; - var aPos = a.find(), bPos = b.find(); - var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); - if (fromCmp) return -fromCmp; - var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); - if (toCmp) return toCmp; - return b.id - a.id; - } - - // Find out whether a line ends or starts in a collapsed span. If - // so, return the marker for that span. - function collapsedSpanAtSide(line, start) { - var sps = sawCollapsedSpans && line.markedSpans, found; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && - (!found || compareCollapsedMarkers(found, sp.marker) < 0)) - found = sp.marker; - } - return found; - } - function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); } - function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); } - - // Test whether there exists a collapsed span that partially - // overlaps (covers the start or end, but not both) of a new span. - // Such overlap is not allowed. - function conflictingCollapsedRange(doc, lineNo, from, to, marker) { - var line = getLine(doc, lineNo); - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) for (var i = 0; i < sps.length; ++i) { - var sp = sps[i]; - if (!sp.marker.collapsed) continue; - var found = sp.marker.find(0); - var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); - var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); - if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; - if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) || - fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight))) - return true; - } - } - - // A visual line is a line as drawn on the screen. Folding, for - // example, can cause multiple logical lines to appear on the same - // visual line. This finds the start of the visual line that the - // given line is part of (usually that is the line itself). - function visualLine(line) { - var merged; - while (merged = collapsedSpanAtStart(line)) - line = merged.find(-1, true).line; - return line; - } - - // Returns an array of logical lines that continue the visual line - // started by the argument, or undefined if there are no such lines. - function visualLineContinued(line) { - var merged, lines; - while (merged = collapsedSpanAtEnd(line)) { - line = merged.find(1, true).line; - (lines || (lines = [])).push(line); - } - return lines; - } - - // Get the line number of the start of the visual line that the - // given line number is part of. - function visualLineNo(doc, lineN) { - var line = getLine(doc, lineN), vis = visualLine(line); - if (line == vis) return lineN; - return lineNo(vis); - } - // Get the line number of the start of the next visual line after - // the given line. - function visualLineEndNo(doc, lineN) { - if (lineN > doc.lastLine()) return lineN; - var line = getLine(doc, lineN), merged; - if (!lineIsHidden(doc, line)) return lineN; - while (merged = collapsedSpanAtEnd(line)) - line = merged.find(1, true).line; - return lineNo(line) + 1; - } - - // Compute whether a line is hidden. Lines count as hidden when they - // are part of a visual line that starts with another line, or when - // they are entirely covered by collapsed, non-widget span. - function lineIsHidden(doc, line) { - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (!sp.marker.collapsed) continue; - if (sp.from == null) return true; - if (sp.marker.widgetNode) continue; - if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) - return true; - } - } - function lineIsHiddenInner(doc, line, span) { - if (span.to == null) { - var end = span.marker.find(1, true); - return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); - } - if (span.marker.inclusiveRight && span.to == line.text.length) - return true; - for (var sp, i = 0; i < line.markedSpans.length; ++i) { - sp = line.markedSpans[i]; - if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && - (sp.to == null || sp.to != span.from) && - (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && - lineIsHiddenInner(doc, line, sp)) return true; - } - } - - // LINE WIDGETS - - // Line widgets are block elements displayed above or below a line. - - var LineWidget = CodeMirror.LineWidget = function(doc, node, options) { - if (options) for (var opt in options) if (options.hasOwnProperty(opt)) - this[opt] = options[opt]; - this.doc = doc; - this.node = node; - }; - eventMixin(LineWidget); - - function adjustScrollWhenAboveVisible(cm, line, diff) { - if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) - addToScrollPos(cm, null, diff); - } - - LineWidget.prototype.clear = function() { - var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); - if (no == null || !ws) return; - for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); - if (!ws.length) line.widgets = null; - var height = widgetHeight(this); - updateLineHeight(line, Math.max(0, line.height - height)); - if (cm) runInOp(cm, function() { - adjustScrollWhenAboveVisible(cm, line, -height); - regLineChange(cm, no, "widget"); - }); - }; - LineWidget.prototype.changed = function() { - var oldH = this.height, cm = this.doc.cm, line = this.line; - this.height = null; - var diff = widgetHeight(this) - oldH; - if (!diff) return; - updateLineHeight(line, line.height + diff); - if (cm) runInOp(cm, function() { - cm.curOp.forceUpdate = true; - adjustScrollWhenAboveVisible(cm, line, diff); - }); - }; - - function widgetHeight(widget) { - if (widget.height != null) return widget.height; - var cm = widget.doc.cm; - if (!cm) return 0; - if (!contains(document.body, widget.node)) { - var parentStyle = "position: relative;"; - if (widget.coverGutter) - parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; - if (widget.noHScroll) - parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; - removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); - } - return widget.height = widget.node.offsetHeight; - } - - function addLineWidget(doc, handle, node, options) { - var widget = new LineWidget(doc, node, options); - var cm = doc.cm; - if (cm && widget.noHScroll) cm.display.alignWidgets = true; - changeLine(doc, handle, "widget", function(line) { - var widgets = line.widgets || (line.widgets = []); - if (widget.insertAt == null) widgets.push(widget); - else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); - widget.line = line; - if (cm && !lineIsHidden(doc, line)) { - var aboveVisible = heightAtLine(line) < doc.scrollTop; - updateLineHeight(line, line.height + widgetHeight(widget)); - if (aboveVisible) addToScrollPos(cm, null, widget.height); - cm.curOp.forceUpdate = true; - } - return true; - }); - return widget; - } - - // LINE DATA STRUCTURE - - // Line objects. These hold state related to a line, including - // highlighting info (the styles array). - var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { - this.text = text; - attachMarkedSpans(this, markedSpans); - this.height = estimateHeight ? estimateHeight(this) : 1; - }; - eventMixin(Line); - Line.prototype.lineNo = function() { return lineNo(this); }; - - // Change the content (text, markers) of a line. Automatically - // invalidates cached information and tries to re-estimate the - // line's height. - function updateLine(line, text, markedSpans, estimateHeight) { - line.text = text; - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - if (line.order != null) line.order = null; - detachMarkedSpans(line); - attachMarkedSpans(line, markedSpans); - var estHeight = estimateHeight ? estimateHeight(line) : 1; - if (estHeight != line.height) updateLineHeight(line, estHeight); - } - - // Detach a line from the document tree and its markers. - function cleanUpLine(line) { - line.parent = null; - detachMarkedSpans(line); - } - - function extractLineClasses(type, output) { - if (type) for (;;) { - var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); - if (!lineClass) break; - type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); - var prop = lineClass[1] ? "bgClass" : "textClass"; - if (output[prop] == null) - output[prop] = lineClass[2]; - else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) - output[prop] += " " + lineClass[2]; - } - return type; - } - - function callBlankLine(mode, state) { - if (mode.blankLine) return mode.blankLine(state); - if (!mode.innerMode) return; - var inner = CodeMirror.innerMode(mode, state); - if (inner.mode.blankLine) return inner.mode.blankLine(inner.state); - } - - function readToken(mode, stream, state, inner) { - for (var i = 0; i < 10; i++) { - if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode; - var style = mode.token(stream, state); - if (stream.pos > stream.start) return style; - } - throw new Error("Mode " + mode.name + " failed to advance stream."); - } - - // Utility for getTokenAt and getLineTokens - function takeToken(cm, pos, precise, asArray) { - function getObj(copy) { - return {start: stream.start, end: stream.pos, - string: stream.current(), - type: style || null, - state: copy ? copyState(doc.mode, state) : state}; - } - - var doc = cm.doc, mode = doc.mode, style; - pos = clipPos(doc, pos); - var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise); - var stream = new StringStream(line.text, cm.options.tabSize), tokens; - if (asArray) tokens = []; - while ((asArray || stream.pos < pos.ch) && !stream.eol()) { - stream.start = stream.pos; - style = readToken(mode, stream, state); - if (asArray) tokens.push(getObj(true)); - } - return asArray ? tokens : getObj(); - } - - // Run the given mode's parser over a line, calling f for each token. - function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) { - var flattenSpans = mode.flattenSpans; - if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; - var curStart = 0, curStyle = null; - var stream = new StringStream(text, cm.options.tabSize), style; - var inner = cm.options.addModeClass && [null]; - if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses); - while (!stream.eol()) { - if (stream.pos > cm.options.maxHighlightLength) { - flattenSpans = false; - if (forceToEnd) processLine(cm, text, state, stream.pos); - stream.pos = text.length; - style = null; - } else { - style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses); - } - if (inner) { - var mName = inner[0].name; - if (mName) style = "m-" + (style ? mName + " " + style : mName); - } - if (!flattenSpans || curStyle != style) { - while (curStart < stream.start) { - curStart = Math.min(stream.start, curStart + 50000); - f(curStart, curStyle); - } - curStyle = style; - } - stream.start = stream.pos; - } - while (curStart < stream.pos) { - // Webkit seems to refuse to render text nodes longer than 57444 characters - var pos = Math.min(stream.pos, curStart + 50000); - f(pos, curStyle); - curStart = pos; - } - } - - // Compute a style array (an array starting with a mode generation - // -- for invalidation -- followed by pairs of end positions and - // style strings), which is used to highlight the tokens on the - // line. - function highlightLine(cm, line, state, forceToEnd) { - // A styles array always starts with a number identifying the - // mode/overlays that it is based on (for easy invalidation). - var st = [cm.state.modeGen], lineClasses = {}; - // Compute the base array of styles - runMode(cm, line.text, cm.doc.mode, state, function(end, style) { - st.push(end, style); - }, lineClasses, forceToEnd); - - // Run overlays, adjust style array. - for (var o = 0; o < cm.state.overlays.length; ++o) { - var overlay = cm.state.overlays[o], i = 1, at = 0; - runMode(cm, line.text, overlay.mode, true, function(end, style) { - var start = i; - // Ensure there's a token end at the current position, and that i points at it - while (at < end) { - var i_end = st[i]; - if (i_end > end) - st.splice(i, 1, end, st[i+1], i_end); - i += 2; - at = Math.min(end, i_end); - } - if (!style) return; - if (overlay.opaque) { - st.splice(start, i - start, end, "cm-overlay " + style); - i = start + 2; - } else { - for (; start < i; start += 2) { - var cur = st[start+1]; - st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style; - } - } - }, lineClasses); - } - - return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}; - } - - function getLineStyles(cm, line, updateFrontier) { - if (!line.styles || line.styles[0] != cm.state.modeGen) { - var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); - line.styles = result.styles; - if (result.classes) line.styleClasses = result.classes; - else if (line.styleClasses) line.styleClasses = null; - if (updateFrontier === cm.doc.frontier) cm.doc.frontier++; - } - return line.styles; - } - - // Lightweight form of highlight -- proceed over this line and - // update state, but don't save a style array. Used for lines that - // aren't currently visible. - function processLine(cm, text, state, startAt) { - var mode = cm.doc.mode; - var stream = new StringStream(text, cm.options.tabSize); - stream.start = stream.pos = startAt || 0; - if (text == "") callBlankLine(mode, state); - while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { - readToken(mode, stream, state); - stream.start = stream.pos; - } - } - - // Convert a style as returned by a mode (either null, or a string - // containing one or more styles) to a CSS style. This is cached, - // and also looks for line-wide styles. - var styleToClassCache = {}, styleToClassCacheWithMode = {}; - function interpretTokenStyle(style, options) { - if (!style || /^\s*$/.test(style)) return null; - var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; - return cache[style] || - (cache[style] = style.replace(/\S+/g, "cm-$&")); - } - - // Render the DOM representation of the text of a line. Also builds - // up a 'line map', which points at the DOM nodes that represent - // specific stretches of text, and is used by the measuring code. - // The returned object contains the DOM node, this map, and - // information about line-wide styles that were set by the mode. - function buildLineContent(cm, lineView) { - // The padding-right forces the element to have a 'border', which - // is needed on Webkit to be able to get line-level bounding - // rectangles for it (in measureChar). - var content = elt("span", null, null, webkit ? "padding-right: .1px" : null); - var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content, - col: 0, pos: 0, cm: cm, - splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}; - lineView.measure = {}; - - // Iterate over the logical lines that make up this visual line. - for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { - var line = i ? lineView.rest[i - 1] : lineView.line, order; - builder.pos = 0; - builder.addToken = buildToken; - // Optionally wire in some hacks into the token-rendering - // algorithm, to deal with browser quirks. - if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) - builder.addToken = buildTokenBadBidi(builder.addToken, order); - builder.map = []; - var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); - insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); - if (line.styleClasses) { - if (line.styleClasses.bgClass) - builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); - if (line.styleClasses.textClass) - builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); - } - - // Ensure at least a single node is present, for measuring. - if (builder.map.length == 0) - builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); - - // Store the map and a cache object for the current logical line - if (i == 0) { - lineView.measure.map = builder.map; - lineView.measure.cache = {}; - } else { - (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); - (lineView.measure.caches || (lineView.measure.caches = [])).push({}); - } - } - - // See issue #2901 - if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) - builder.content.className = "cm-tab-wrap-hack"; - - signal(cm, "renderLine", cm, lineView.line, builder.pre); - if (builder.pre.className) - builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); - - return builder; - } - - function defaultSpecialCharPlaceholder(ch) { - var token = elt("span", "\u2022", "cm-invalidchar"); - token.title = "\\u" + ch.charCodeAt(0).toString(16); - token.setAttribute("aria-label", token.title); - return token; - } - - // Build up the DOM representation for a single token, and add it to - // the line map. Takes care to render special characters separately. - function buildToken(builder, text, style, startStyle, endStyle, title, css) { - if (!text) return; - var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text; - var special = builder.cm.state.specialChars, mustWrap = false; - if (!special.test(text)) { - builder.col += text.length; - var content = document.createTextNode(displayText); - builder.map.push(builder.pos, builder.pos + text.length, content); - if (ie && ie_version < 9) mustWrap = true; - builder.pos += text.length; - } else { - var content = document.createDocumentFragment(), pos = 0; - while (true) { - special.lastIndex = pos; - var m = special.exec(text); - var skipped = m ? m.index - pos : text.length - pos; - if (skipped) { - var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); - if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); - else content.appendChild(txt); - builder.map.push(builder.pos, builder.pos + skipped, txt); - builder.col += skipped; - builder.pos += skipped; - } - if (!m) break; - pos += skipped + 1; - if (m[0] == "\t") { - var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; - var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); - txt.setAttribute("role", "presentation"); - txt.setAttribute("cm-text", "\t"); - builder.col += tabWidth; - } else { - var txt = builder.cm.options.specialCharPlaceholder(m[0]); - txt.setAttribute("cm-text", m[0]); - if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); - else content.appendChild(txt); - builder.col += 1; - } - builder.map.push(builder.pos, builder.pos + 1, txt); - builder.pos++; - } - } - if (style || startStyle || endStyle || mustWrap || css) { - var fullStyle = style || ""; - if (startStyle) fullStyle += startStyle; - if (endStyle) fullStyle += endStyle; - var token = elt("span", [content], fullStyle, css); - if (title) token.title = title; - return builder.content.appendChild(token); - } - builder.content.appendChild(content); - } - - function splitSpaces(old) { - var out = " "; - for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; - out += " "; - return out; - } - - // Work around nonsense dimensions being reported for stretches of - // right-to-left text. - function buildTokenBadBidi(inner, order) { - return function(builder, text, style, startStyle, endStyle, title, css) { - style = style ? style + " cm-force-border" : "cm-force-border"; - var start = builder.pos, end = start + text.length; - for (;;) { - // Find the part that overlaps with the start of this text - for (var i = 0; i < order.length; i++) { - var part = order[i]; - if (part.to > start && part.from <= start) break; - } - if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css); - inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css); - startStyle = null; - text = text.slice(part.to - start); - start = part.to; - } - }; - } - - function buildCollapsedSpan(builder, size, marker, ignoreWidget) { - var widget = !ignoreWidget && marker.widgetNode; - if (widget) builder.map.push(builder.pos, builder.pos + size, widget); - if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { - if (!widget) - widget = builder.content.appendChild(document.createElement("span")); - widget.setAttribute("cm-marker", marker.id); - } - if (widget) { - builder.cm.display.input.setUneditable(widget); - builder.content.appendChild(widget); - } - builder.pos += size; - } - - // Outputs a number of spans to make up a line, taking highlighting - // and marked text into account. - function insertLineContent(line, builder, styles) { - var spans = line.markedSpans, allText = line.text, at = 0; - if (!spans) { - for (var i = 1; i < styles.length; i+=2) - builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)); - return; - } - - var len = allText.length, pos = 0, i = 1, text = "", style, css; - var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; - for (;;) { - if (nextChange == pos) { // Update current marker set - spanStyle = spanEndStyle = spanStartStyle = title = css = ""; - collapsed = null; nextChange = Infinity; - var foundBookmarks = []; - for (var j = 0; j < spans.length; ++j) { - var sp = spans[j], m = sp.marker; - if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { - foundBookmarks.push(m); - } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { - if (sp.to != null && sp.to != pos && nextChange > sp.to) { - nextChange = sp.to; - spanEndStyle = ""; - } - if (m.className) spanStyle += " " + m.className; - if (m.css) css = m.css; - if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; - if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; - if (m.title && !title) title = m.title; - if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) - collapsed = sp; - } else if (sp.from > pos && nextChange > sp.from) { - nextChange = sp.from; - } - } - if (collapsed && (collapsed.from || 0) == pos) { - buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, - collapsed.marker, collapsed.from == null); - if (collapsed.to == null) return; - if (collapsed.to == pos) collapsed = false; - } - if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) - buildCollapsedSpan(builder, 0, foundBookmarks[j]); - } - if (pos >= len) break; - - var upto = Math.min(len, nextChange); - while (true) { - if (text) { - var end = pos + text.length; - if (!collapsed) { - var tokenText = end > upto ? text.slice(0, upto - pos) : text; - builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, - spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css); - } - if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} - pos = end; - spanStartStyle = ""; - } - text = allText.slice(at, at = styles[i++]); - style = interpretTokenStyle(styles[i++], builder.cm.options); - } - } - } - - // DOCUMENT DATA STRUCTURE - - // By default, updates that start and end at the beginning of a line - // are treated specially, in order to make the association of line - // widgets and marker elements with the text behave more intuitive. - function isWholeLineUpdate(doc, change) { - return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && - (!doc.cm || doc.cm.options.wholeLineUpdateBefore); - } - - // Perform a change on the document data structure. - function updateDoc(doc, change, markedSpans, estimateHeight) { - function spansFor(n) {return markedSpans ? markedSpans[n] : null;} - function update(line, text, spans) { - updateLine(line, text, spans, estimateHeight); - signalLater(line, "change", line, change); - } - function linesFor(start, end) { - for (var i = start, result = []; i < end; ++i) - result.push(new Line(text[i], spansFor(i), estimateHeight)); - return result; - } - - var from = change.from, to = change.to, text = change.text; - var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); - var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; - - // Adjust the line structure - if (change.full) { - doc.insert(0, linesFor(0, text.length)); - doc.remove(text.length, doc.size - text.length); - } else if (isWholeLineUpdate(doc, change)) { - // This is a whole-line replace. Treated specially to make - // sure line objects move the way they are supposed to. - var added = linesFor(0, text.length - 1); - update(lastLine, lastLine.text, lastSpans); - if (nlines) doc.remove(from.line, nlines); - if (added.length) doc.insert(from.line, added); - } else if (firstLine == lastLine) { - if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); - } else { - var added = linesFor(1, text.length - 1); - added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - doc.insert(from.line + 1, added); - } - } else if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); - doc.remove(from.line + 1, nlines); - } else { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); - var added = linesFor(1, text.length - 1); - if (nlines > 1) doc.remove(from.line + 1, nlines - 1); - doc.insert(from.line + 1, added); - } - - signalLater(doc, "change", doc, change); - } - - // The document is represented as a BTree consisting of leaves, with - // chunk of lines in them, and branches, with up to ten leaves or - // other branch nodes below them. The top node is always a branch - // node, and is the document object itself (meaning it has - // additional methods and properties). - // - // All nodes have parent links. The tree is used both to go from - // line numbers to line objects, and to go from objects to numbers. - // It also indexes by height, and is used to convert between height - // and line object, and to find the total height of the document. - // - // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html - - function LeafChunk(lines) { - this.lines = lines; - this.parent = null; - for (var i = 0, height = 0; i < lines.length; ++i) { - lines[i].parent = this; - height += lines[i].height; - } - this.height = height; - } - - LeafChunk.prototype = { - chunkSize: function() { return this.lines.length; }, - // Remove the n lines at offset 'at'. - removeInner: function(at, n) { - for (var i = at, e = at + n; i < e; ++i) { - var line = this.lines[i]; - this.height -= line.height; - cleanUpLine(line); - signalLater(line, "delete"); - } - this.lines.splice(at, n); - }, - // Helper used to collapse a small branch into a single leaf. - collapse: function(lines) { - lines.push.apply(lines, this.lines); - }, - // Insert the given array of lines at offset 'at', count them as - // having the given height. - insertInner: function(at, lines, height) { - this.height += height; - this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); - for (var i = 0; i < lines.length; ++i) lines[i].parent = this; - }, - // Used to iterate over a part of the tree. - iterN: function(at, n, op) { - for (var e = at + n; at < e; ++at) - if (op(this.lines[at])) return true; - } - }; - - function BranchChunk(children) { - this.children = children; - var size = 0, height = 0; - for (var i = 0; i < children.length; ++i) { - var ch = children[i]; - size += ch.chunkSize(); height += ch.height; - ch.parent = this; - } - this.size = size; - this.height = height; - this.parent = null; - } - - BranchChunk.prototype = { - chunkSize: function() { return this.size; }, - removeInner: function(at, n) { - this.size -= n; - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var rm = Math.min(n, sz - at), oldHeight = child.height; - child.removeInner(at, rm); - this.height -= oldHeight - child.height; - if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } - if ((n -= rm) == 0) break; - at = 0; - } else at -= sz; - } - // If the result is smaller than 25 lines, ensure that it is a - // single leaf node. - if (this.size - n < 25 && - (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { - var lines = []; - this.collapse(lines); - this.children = [new LeafChunk(lines)]; - this.children[0].parent = this; - } - }, - collapse: function(lines) { - for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines); - }, - insertInner: function(at, lines, height) { - this.size += lines.length; - this.height += height; - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at <= sz) { - child.insertInner(at, lines, height); - if (child.lines && child.lines.length > 50) { - while (child.lines.length > 50) { - var spilled = child.lines.splice(child.lines.length - 25, 25); - var newleaf = new LeafChunk(spilled); - child.height -= newleaf.height; - this.children.splice(i + 1, 0, newleaf); - newleaf.parent = this; - } - this.maybeSpill(); - } - break; - } - at -= sz; - } - }, - // When a node has grown, check whether it should be split. - maybeSpill: function() { - if (this.children.length <= 10) return; - var me = this; - do { - var spilled = me.children.splice(me.children.length - 5, 5); - var sibling = new BranchChunk(spilled); - if (!me.parent) { // Become the parent node - var copy = new BranchChunk(me.children); - copy.parent = me; - me.children = [copy, sibling]; - me = copy; - } else { - me.size -= sibling.size; - me.height -= sibling.height; - var myIndex = indexOf(me.parent.children, me); - me.parent.children.splice(myIndex + 1, 0, sibling); - } - sibling.parent = me.parent; - } while (me.children.length > 10); - me.parent.maybeSpill(); - }, - iterN: function(at, n, op) { - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var used = Math.min(n, sz - at); - if (child.iterN(at, used, op)) return true; - if ((n -= used) == 0) break; - at = 0; - } else at -= sz; - } - } - }; - - var nextDocId = 0; - var Doc = CodeMirror.Doc = function(text, mode, firstLine) { - if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); - if (firstLine == null) firstLine = 0; - - BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); - this.first = firstLine; - this.scrollTop = this.scrollLeft = 0; - this.cantEdit = false; - this.cleanGeneration = 1; - this.frontier = firstLine; - var start = Pos(firstLine, 0); - this.sel = simpleSelection(start); - this.history = new History(null); - this.id = ++nextDocId; - this.modeOption = mode; - - if (typeof text == "string") text = splitLines(text); - updateDoc(this, {from: start, to: start, text: text}); - setSelection(this, simpleSelection(start), sel_dontScroll); - }; - - Doc.prototype = createObj(BranchChunk.prototype, { - constructor: Doc, - // Iterate over the document. Supports two forms -- with only one - // argument, it calls that for each line in the document. With - // three, it iterates over the range given by the first two (with - // the second being non-inclusive). - iter: function(from, to, op) { - if (op) this.iterN(from - this.first, to - from, op); - else this.iterN(this.first, this.first + this.size, from); - }, - - // Non-public interface for adding and removing lines. - insert: function(at, lines) { - var height = 0; - for (var i = 0; i < lines.length; ++i) height += lines[i].height; - this.insertInner(at - this.first, lines, height); - }, - remove: function(at, n) { this.removeInner(at - this.first, n); }, - - // From here, the methods are part of the public interface. Most - // are also available from CodeMirror (editor) instances. - - getValue: function(lineSep, lineFilter) { - var lines = getLines(this, this.first, this.first + this.size, lineFilter); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - setValue: docMethodOp(function(code) { - var top = Pos(this.first, 0), last = this.first + this.size - 1; - makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), - text: splitLines(code), origin: "setValue", full: true}, true); - setSelection(this, simpleSelection(top)); - }), - replaceRange: function(code, from, to, origin) { - from = clipPos(this, from); - to = to ? clipPos(this, to) : from; - replaceRange(this, code, from, to, origin); - }, - getRange: function(from, to, lineSep) { - var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - - getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, - - getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, - getLineNumber: function(line) {return lineNo(line);}, - - getLineHandleVisualStart: function(line) { - if (typeof line == "number") line = getLine(this, line); - return visualLine(line); - }, - - lineCount: function() {return this.size;}, - firstLine: function() {return this.first;}, - lastLine: function() {return this.first + this.size - 1;}, - - clipPos: function(pos) {return clipPos(this, pos);}, - - getCursor: function(start) { - var range = this.sel.primary(), pos; - if (start == null || start == "head") pos = range.head; - else if (start == "anchor") pos = range.anchor; - else if (start == "end" || start == "to" || start === false) pos = range.to(); - else pos = range.from(); - return pos; - }, - listSelections: function() { return this.sel.ranges; }, - somethingSelected: function() {return this.sel.somethingSelected();}, - - setCursor: docMethodOp(function(line, ch, options) { - setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); - }), - setSelection: docMethodOp(function(anchor, head, options) { - setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); - }), - extendSelection: docMethodOp(function(head, other, options) { - extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); - }), - extendSelections: docMethodOp(function(heads, options) { - extendSelections(this, clipPosArray(this, heads, options)); - }), - extendSelectionsBy: docMethodOp(function(f, options) { - extendSelections(this, map(this.sel.ranges, f), options); - }), - setSelections: docMethodOp(function(ranges, primary, options) { - if (!ranges.length) return; - for (var i = 0, out = []; i < ranges.length; i++) - out[i] = new Range(clipPos(this, ranges[i].anchor), - clipPos(this, ranges[i].head)); - if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex); - setSelection(this, normalizeSelection(out, primary), options); - }), - addSelection: docMethodOp(function(anchor, head, options) { - var ranges = this.sel.ranges.slice(0); - ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); - setSelection(this, normalizeSelection(ranges, ranges.length - 1), options); - }), - - getSelection: function(lineSep) { - var ranges = this.sel.ranges, lines; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this, ranges[i].from(), ranges[i].to()); - lines = lines ? lines.concat(sel) : sel; - } - if (lineSep === false) return lines; - else return lines.join(lineSep || "\n"); - }, - getSelections: function(lineSep) { - var parts = [], ranges = this.sel.ranges; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this, ranges[i].from(), ranges[i].to()); - if (lineSep !== false) sel = sel.join(lineSep || "\n"); - parts[i] = sel; - } - return parts; - }, - replaceSelection: function(code, collapse, origin) { - var dup = []; - for (var i = 0; i < this.sel.ranges.length; i++) - dup[i] = code; - this.replaceSelections(dup, collapse, origin || "+input"); - }, - replaceSelections: docMethodOp(function(code, collapse, origin) { - var changes = [], sel = this.sel; - for (var i = 0; i < sel.ranges.length; i++) { - var range = sel.ranges[i]; - changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin}; - } - var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); - for (var i = changes.length - 1; i >= 0; i--) - makeChange(this, changes[i]); - if (newSel) setSelectionReplaceHistory(this, newSel); - else if (this.cm) ensureCursorVisible(this.cm); - }), - undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), - redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), - undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), - redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), - - setExtending: function(val) {this.extend = val;}, - getExtending: function() {return this.extend;}, - - historySize: function() { - var hist = this.history, done = 0, undone = 0; - for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done; - for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone; - return {undo: done, redo: undone}; - }, - clearHistory: function() {this.history = new History(this.history.maxGeneration);}, - - markClean: function() { - this.cleanGeneration = this.changeGeneration(true); - }, - changeGeneration: function(forceSplit) { - if (forceSplit) - this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; - return this.history.generation; - }, - isClean: function (gen) { - return this.history.generation == (gen || this.cleanGeneration); - }, - - getHistory: function() { - return {done: copyHistoryArray(this.history.done), - undone: copyHistoryArray(this.history.undone)}; - }, - setHistory: function(histData) { - var hist = this.history = new History(this.history.maxGeneration); - hist.done = copyHistoryArray(histData.done.slice(0), null, true); - hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); - }, - - addLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - if (!line[prop]) line[prop] = cls; - else if (classTest(cls).test(line[prop])) return false; - else line[prop] += " " + cls; - return true; - }); - }), - removeLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - var cur = line[prop]; - if (!cur) return false; - else if (cls == null) line[prop] = null; - else { - var found = cur.match(classTest(cls)); - if (!found) return false; - var end = found.index + found[0].length; - line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; - } - return true; - }); - }), - - addLineWidget: docMethodOp(function(handle, node, options) { - return addLineWidget(this, handle, node, options); - }), - removeLineWidget: function(widget) { widget.clear(); }, - - markText: function(from, to, options) { - return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); - }, - setBookmark: function(pos, options) { - var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), - insertLeft: options && options.insertLeft, - clearWhenEmpty: false, shared: options && options.shared, - handleMouseEvents: options && options.handleMouseEvents}; - pos = clipPos(this, pos); - return markText(this, pos, pos, realOpts, "bookmark"); - }, - findMarksAt: function(pos) { - pos = clipPos(this, pos); - var markers = [], spans = getLine(this, pos.line).markedSpans; - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if ((span.from == null || span.from <= pos.ch) && - (span.to == null || span.to >= pos.ch)) - markers.push(span.marker.parent || span.marker); - } - return markers; - }, - findMarks: function(from, to, filter) { - from = clipPos(this, from); to = clipPos(this, to); - var found = [], lineNo = from.line; - this.iter(from.line, to.line + 1, function(line) { - var spans = line.markedSpans; - if (spans) for (var i = 0; i < spans.length; i++) { - var span = spans[i]; - if (!(lineNo == from.line && from.ch > span.to || - span.from == null && lineNo != from.line|| - lineNo == to.line && span.from > to.ch) && - (!filter || filter(span.marker))) - found.push(span.marker.parent || span.marker); - } - ++lineNo; - }); - return found; - }, - getAllMarks: function() { - var markers = []; - this.iter(function(line) { - var sps = line.markedSpans; - if (sps) for (var i = 0; i < sps.length; ++i) - if (sps[i].from != null) markers.push(sps[i].marker); - }); - return markers; - }, - - posFromIndex: function(off) { - var ch, lineNo = this.first; - this.iter(function(line) { - var sz = line.text.length + 1; - if (sz > off) { ch = off; return true; } - off -= sz; - ++lineNo; - }); - return clipPos(this, Pos(lineNo, ch)); - }, - indexFromPos: function (coords) { - coords = clipPos(this, coords); - var index = coords.ch; - if (coords.line < this.first || coords.ch < 0) return 0; - this.iter(this.first, coords.line, function (line) { - index += line.text.length + 1; - }); - return index; - }, - - copy: function(copyHistory) { - var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); - doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; - doc.sel = this.sel; - doc.extend = false; - if (copyHistory) { - doc.history.undoDepth = this.history.undoDepth; - doc.setHistory(this.getHistory()); - } - return doc; - }, - - linkedDoc: function(options) { - if (!options) options = {}; - var from = this.first, to = this.first + this.size; - if (options.from != null && options.from > from) from = options.from; - if (options.to != null && options.to < to) to = options.to; - var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); - if (options.sharedHist) copy.history = this.history; - (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); - copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; - copySharedMarkers(copy, findSharedMarkers(this)); - return copy; - }, - unlinkDoc: function(other) { - if (other instanceof CodeMirror) other = other.doc; - if (this.linked) for (var i = 0; i < this.linked.length; ++i) { - var link = this.linked[i]; - if (link.doc != other) continue; - this.linked.splice(i, 1); - other.unlinkDoc(this); - detachSharedMarkers(findSharedMarkers(this)); - break; - } - // If the histories were shared, split them again - if (other.history == this.history) { - var splitIds = [other.id]; - linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); - other.history = new History(null); - other.history.done = copyHistoryArray(this.history.done, splitIds); - other.history.undone = copyHistoryArray(this.history.undone, splitIds); - } - }, - iterLinkedDocs: function(f) {linkedDocs(this, f);}, - - getMode: function() {return this.mode;}, - getEditor: function() {return this.cm;} - }); - - // Public alias. - Doc.prototype.eachLine = Doc.prototype.iter; - - // Set up methods on CodeMirror's prototype to redirect to the editor's document. - var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); - for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) - CodeMirror.prototype[prop] = (function(method) { - return function() {return method.apply(this.doc, arguments);}; - })(Doc.prototype[prop]); - - eventMixin(Doc); - - // Call f for all linked documents. - function linkedDocs(doc, f, sharedHistOnly) { - function propagate(doc, skip, sharedHist) { - if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { - var rel = doc.linked[i]; - if (rel.doc == skip) continue; - var shared = sharedHist && rel.sharedHist; - if (sharedHistOnly && !shared) continue; - f(rel.doc, shared); - propagate(rel.doc, doc, shared); - } - } - propagate(doc, null, true); - } - - // Attach a document to an editor. - function attachDoc(cm, doc) { - if (doc.cm) throw new Error("This document is already in use."); - cm.doc = doc; - doc.cm = cm; - estimateLineHeights(cm); - loadMode(cm); - if (!cm.options.lineWrapping) findMaxLine(cm); - cm.options.mode = doc.modeOption; - regChange(cm); - } - - // LINE UTILITIES - - // Find the line object corresponding to the given line number. - function getLine(doc, n) { - n -= doc.first; - if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document."); - for (var chunk = doc; !chunk.lines;) { - for (var i = 0;; ++i) { - var child = chunk.children[i], sz = child.chunkSize(); - if (n < sz) { chunk = child; break; } - n -= sz; - } - } - return chunk.lines[n]; - } - - // Get the part of a document between two positions, as an array of - // strings. - function getBetween(doc, start, end) { - var out = [], n = start.line; - doc.iter(start.line, end.line + 1, function(line) { - var text = line.text; - if (n == end.line) text = text.slice(0, end.ch); - if (n == start.line) text = text.slice(start.ch); - out.push(text); - ++n; - }); - return out; - } - // Get the lines between from and to, as array of strings. - function getLines(doc, from, to, lineFilter) { - var out = []; - doc.iter(from, to, function(line) { - var text = line.text; - if(lineFilter){ - text = lineFilter(line); - } - out.push(text); - }); - return out; - } - - // Update the height of a line, propagating the height change - // upwards to parent nodes. - function updateLineHeight(line, height) { - var diff = height - line.height; - if (diff) for (var n = line; n; n = n.parent) n.height += diff; - } - - // Given a line object, find its line number by walking up through - // its parent links. - function lineNo(line) { - if (line.parent == null) return null; - var cur = line.parent, no = indexOf(cur.lines, line); - for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { - for (var i = 0;; ++i) { - if (chunk.children[i] == cur) break; - no += chunk.children[i].chunkSize(); - } - } - return no + cur.first; - } - - // Find the line at the given vertical position, using the height - // information in the document tree. - function lineAtHeight(chunk, h) { - var n = chunk.first; - outer: do { - for (var i = 0; i < chunk.children.length; ++i) { - var child = chunk.children[i], ch = child.height; - if (h < ch) { chunk = child; continue outer; } - h -= ch; - n += child.chunkSize(); - } - return n; - } while (!chunk.lines); - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i], lh = line.height; - if (h < lh) break; - h -= lh; - } - return n + i; - } - - - // Find the height above the given line. - function heightAtLine(lineObj) { - lineObj = visualLine(lineObj); - - var h = 0, chunk = lineObj.parent; - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i]; - if (line == lineObj) break; - else h += line.height; - } - for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { - for (var i = 0; i < p.children.length; ++i) { - var cur = p.children[i]; - if (cur == chunk) break; - else h += cur.height; - } - } - return h; - } - - // Get the bidi ordering for the given line (and cache it). Returns - // false for lines that are fully left-to-right, and an array of - // BidiSpan objects otherwise. - function getOrder(line) { - var order = line.order; - if (order == null) order = line.order = bidiOrdering(line.text); - return order; - } - - // HISTORY - - function History(startGen) { - // Arrays of change events and selections. Doing something adds an - // event to done and clears undo. Undoing moves events from done - // to undone, redoing moves them in the other direction. - this.done = []; this.undone = []; - this.undoDepth = Infinity; - // Used to track when changes can be merged into a single undo - // event - this.lastModTime = this.lastSelTime = 0; - this.lastOp = this.lastSelOp = null; - this.lastOrigin = this.lastSelOrigin = null; - // Used by the isClean() method - this.generation = this.maxGeneration = startGen || 1; - } - - // Create a history change event from an updateDoc-style change - // object. - function historyChangeFromChange(doc, change) { - var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; - attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); - linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); - return histChange; - } - - // Pop all selection events off the end of a history array. Stop at - // a change event. - function clearSelectionEvents(array) { - while (array.length) { - var last = lst(array); - if (last.ranges) array.pop(); - else break; - } - } - - // Find the top change event in the history. Pop off selection - // events that are in the way. - function lastChangeEvent(hist, force) { - if (force) { - clearSelectionEvents(hist.done); - return lst(hist.done); - } else if (hist.done.length && !lst(hist.done).ranges) { - return lst(hist.done); - } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { - hist.done.pop(); - return lst(hist.done); - } - } - - // Register a change in the history. Merges changes that are within - // a single operation, ore are close together with an origin that - // allows merging (starting with "+") into a single event. - function addChangeToHistory(doc, change, selAfter, opId) { - var hist = doc.history; - hist.undone.length = 0; - var time = +new Date, cur; - - if ((hist.lastOp == opId || - hist.lastOrigin == change.origin && change.origin && - ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) || - change.origin.charAt(0) == "*")) && - (cur = lastChangeEvent(hist, hist.lastOp == opId))) { - // Merge this change into the last event - var last = lst(cur.changes); - if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { - // Optimized case for simple insertion -- don't want to add - // new changesets for every character typed - last.to = changeEnd(change); - } else { - // Add new sub-event - cur.changes.push(historyChangeFromChange(doc, change)); - } - } else { - // Can not be merged, start a new event. - var before = lst(hist.done); - if (!before || !before.ranges) - pushSelectionToHistory(doc.sel, hist.done); - cur = {changes: [historyChangeFromChange(doc, change)], - generation: hist.generation}; - hist.done.push(cur); - while (hist.done.length > hist.undoDepth) { - hist.done.shift(); - if (!hist.done[0].ranges) hist.done.shift(); - } - } - hist.done.push(selAfter); - hist.generation = ++hist.maxGeneration; - hist.lastModTime = hist.lastSelTime = time; - hist.lastOp = hist.lastSelOp = opId; - hist.lastOrigin = hist.lastSelOrigin = change.origin; - - if (!last) signal(doc, "historyAdded"); - } - - function selectionEventCanBeMerged(doc, origin, prev, sel) { - var ch = origin.charAt(0); - return ch == "*" || - ch == "+" && - prev.ranges.length == sel.ranges.length && - prev.somethingSelected() == sel.somethingSelected() && - new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); - } - - // Called whenever the selection changes, sets the new selection as - // the pending selection in the history, and pushes the old pending - // selection into the 'done' array when it was significantly - // different (in number of selected ranges, emptiness, or time). - function addSelectionToHistory(doc, sel, opId, options) { - var hist = doc.history, origin = options && options.origin; - - // A new event is started when the previous origin does not match - // the current, or the origins don't allow matching. Origins - // starting with * are always merged, those starting with + are - // merged when similar and close together in time. - if (opId == hist.lastSelOp || - (origin && hist.lastSelOrigin == origin && - (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || - selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) - hist.done[hist.done.length - 1] = sel; - else - pushSelectionToHistory(sel, hist.done); - - hist.lastSelTime = +new Date; - hist.lastSelOrigin = origin; - hist.lastSelOp = opId; - if (options && options.clearRedo !== false) - clearSelectionEvents(hist.undone); - } - - function pushSelectionToHistory(sel, dest) { - var top = lst(dest); - if (!(top && top.ranges && top.equals(sel))) - dest.push(sel); - } - - // Used to store marked span information in the history. - function attachLocalSpans(doc, change, from, to) { - var existing = change["spans_" + doc.id], n = 0; - doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { - if (line.markedSpans) - (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; - ++n; - }); - } - - // When un/re-doing restores text containing marked spans, those - // that have been explicitly cleared should not be restored. - function removeClearedSpans(spans) { - if (!spans) return null; - for (var i = 0, out; i < spans.length; ++i) { - if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } - else if (out) out.push(spans[i]); - } - return !out ? spans : out.length ? out : null; - } - - // Retrieve and filter the old marked spans stored in a change event. - function getOldSpans(doc, change) { - var found = change["spans_" + doc.id]; - if (!found) return null; - for (var i = 0, nw = []; i < change.text.length; ++i) - nw.push(removeClearedSpans(found[i])); - return nw; - } - - // Used both to provide a JSON-safe object in .getHistory, and, when - // detaching a document, to split the history in two - function copyHistoryArray(events, newGroup, instantiateSel) { - for (var i = 0, copy = []; i < events.length; ++i) { - var event = events[i]; - if (event.ranges) { - copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); - continue; - } - var changes = event.changes, newChanges = []; - copy.push({changes: newChanges}); - for (var j = 0; j < changes.length; ++j) { - var change = changes[j], m; - newChanges.push({from: change.from, to: change.to, text: change.text}); - if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { - if (indexOf(newGroup, Number(m[1])) > -1) { - lst(newChanges)[prop] = change[prop]; - delete change[prop]; - } - } - } - } - return copy; - } - - // Rebasing/resetting history to deal with externally-sourced changes - - function rebaseHistSelSingle(pos, from, to, diff) { - if (to < pos.line) { - pos.line += diff; - } else if (from < pos.line) { - pos.line = from; - pos.ch = 0; - } - } - - // Tries to rebase an array of history events given a change in the - // document. If the change touches the same lines as the event, the - // event, and everything 'behind' it, is discarded. If the change is - // before the event, the event's positions are updated. Uses a - // copy-on-write scheme for the positions, to avoid having to - // reallocate them all on every rebase, but also avoid problems with - // shared position objects being unsafely updated. - function rebaseHistArray(array, from, to, diff) { - for (var i = 0; i < array.length; ++i) { - var sub = array[i], ok = true; - if (sub.ranges) { - if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } - for (var j = 0; j < sub.ranges.length; j++) { - rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); - rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); - } - continue; - } - for (var j = 0; j < sub.changes.length; ++j) { - var cur = sub.changes[j]; - if (to < cur.from.line) { - cur.from = Pos(cur.from.line + diff, cur.from.ch); - cur.to = Pos(cur.to.line + diff, cur.to.ch); - } else if (from <= cur.to.line) { - ok = false; - break; - } - } - if (!ok) { - array.splice(0, i + 1); - i = 0; - } - } - } - - function rebaseHist(hist, change) { - var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; - rebaseHistArray(hist.done, from, to, diff); - rebaseHistArray(hist.undone, from, to, diff); - } - - // EVENT UTILITIES - - // Due to the fact that we still support jurassic IE versions, some - // compatibility wrappers are needed. - - var e_preventDefault = CodeMirror.e_preventDefault = function(e) { - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - }; - var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) { - if (e.stopPropagation) e.stopPropagation(); - else e.cancelBubble = true; - }; - function e_defaultPrevented(e) { - return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; - } - var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);}; - - function e_target(e) {return e.target || e.srcElement;} - function e_button(e) { - var b = e.which; - if (b == null) { - if (e.button & 1) b = 1; - else if (e.button & 2) b = 3; - else if (e.button & 4) b = 2; - } - if (mac && e.ctrlKey && b == 1) b = 3; - return b; - } - - // EVENT HANDLING - - // Lightweight event framework. on/off also work on DOM nodes, - // registering native DOM handlers. - - var on = CodeMirror.on = function(emitter, type, f) { - if (emitter.addEventListener) - emitter.addEventListener(type, f, false); - else if (emitter.attachEvent) - emitter.attachEvent("on" + type, f); - else { - var map = emitter._handlers || (emitter._handlers = {}); - var arr = map[type] || (map[type] = []); - arr.push(f); - } - }; - - var off = CodeMirror.off = function(emitter, type, f) { - if (emitter.removeEventListener) - emitter.removeEventListener(type, f, false); - else if (emitter.detachEvent) - emitter.detachEvent("on" + type, f); - else { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - for (var i = 0; i < arr.length; ++i) - if (arr[i] == f) { arr.splice(i, 1); break; } - } - }; - - var signal = CodeMirror.signal = function(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2); - for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); - }; - - var orphanDelayedCallbacks = null; - - // Often, we want to signal events at a point where we are in the - // middle of some work, but don't want the handler to start calling - // other methods on the editor, which might be in an inconsistent - // state or simply not expect any other events to happen. - // signalLater looks whether there are any handlers, and schedules - // them to be executed when the last operation ends, or, if no - // operation is active, when a timeout fires. - function signalLater(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2), list; - if (operationGroup) { - list = operationGroup.delayedCallbacks; - } else if (orphanDelayedCallbacks) { - list = orphanDelayedCallbacks; - } else { - list = orphanDelayedCallbacks = []; - setTimeout(fireOrphanDelayed, 0); - } - function bnd(f) {return function(){f.apply(null, args);};}; - for (var i = 0; i < arr.length; ++i) - list.push(bnd(arr[i])); - } - - function fireOrphanDelayed() { - var delayed = orphanDelayedCallbacks; - orphanDelayedCallbacks = null; - for (var i = 0; i < delayed.length; ++i) delayed[i](); - } - - // The DOM events that CodeMirror handles can be overridden by - // registering a (non-DOM) handler on the editor for the event name, - // and preventDefault-ing the event in that handler. - function signalDOMEvent(cm, e, override) { - if (typeof e == "string") - e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; - signal(cm, override || e.type, cm, e); - return e_defaultPrevented(e) || e.codemirrorIgnore; - } - - function signalCursorActivity(cm) { - var arr = cm._handlers && cm._handlers.cursorActivity; - if (!arr) return; - var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); - for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) - set.push(arr[i]); - } - - function hasHandler(emitter, type) { - var arr = emitter._handlers && emitter._handlers[type]; - return arr && arr.length > 0; - } - - // Add on and off methods to a constructor's prototype, to make - // registering events on such objects more convenient. - function eventMixin(ctor) { - ctor.prototype.on = function(type, f) {on(this, type, f);}; - ctor.prototype.off = function(type, f) {off(this, type, f);}; - } - - // MISC UTILITIES - - // Number of pixels added to scroller and sizer to hide scrollbar - var scrollerGap = 30; - - // Returned or thrown by various protocols to signal 'I'm not - // handling this'. - var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; - - // Reused option objects for setSelection & friends - var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; - - function Delayed() {this.id = null;} - Delayed.prototype.set = function(ms, f) { - clearTimeout(this.id); - this.id = setTimeout(f, ms); - }; - - // Counts the column offset in a string, taking tabs into account. - // Used mostly to find indentation. - var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) end = string.length; - } - for (var i = startIndex || 0, n = startValue || 0;;) { - var nextTab = string.indexOf("\t", i); - if (nextTab < 0 || nextTab >= end) - return n + (end - i); - n += nextTab - i; - n += tabSize - (n % tabSize); - i = nextTab + 1; - } - }; - - // The inverse of countColumn -- find the offset that corresponds to - // a particular column. - function findColumn(string, goal, tabSize) { - for (var pos = 0, col = 0;;) { - var nextTab = string.indexOf("\t", pos); - if (nextTab == -1) nextTab = string.length; - var skipped = nextTab - pos; - if (nextTab == string.length || col + skipped >= goal) - return pos + Math.min(skipped, goal - col); - col += nextTab - pos; - col += tabSize - (col % tabSize); - pos = nextTab + 1; - if (col >= goal) return pos; - } - } - - var spaceStrs = [""]; - function spaceStr(n) { - while (spaceStrs.length <= n) - spaceStrs.push(lst(spaceStrs) + " "); - return spaceStrs[n]; - } - - function lst(arr) { return arr[arr.length-1]; } - - var selectInput = function(node) { node.select(); }; - if (ios) // Mobile Safari apparently has a bug where select() is broken. - selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; - else if (ie) // Suppress mysterious IE10 errors - selectInput = function(node) { try { node.select(); } catch(_e) {} }; - - function indexOf(array, elt) { - for (var i = 0; i < array.length; ++i) - if (array[i] == elt) return i; - return -1; - } - function map(array, f) { - var out = []; - for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); - return out; - } - - function nothing() {} - - function createObj(base, props) { - var inst; - if (Object.create) { - inst = Object.create(base); - } else { - nothing.prototype = base; - inst = new nothing(); - } - if (props) copyObj(props, inst); - return inst; - }; - - function copyObj(obj, target, overwrite) { - if (!target) target = {}; - for (var prop in obj) - if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) - target[prop] = obj[prop]; - return target; - } - - function bind(f) { - var args = Array.prototype.slice.call(arguments, 1); - return function(){return f.apply(null, args);}; - } - - var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; - var isWordCharBasic = CodeMirror.isWordChar = function(ch) { - return /\w/.test(ch) || ch > "\x80" && - (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); - }; - function isWordChar(ch, helper) { - if (!helper) return isWordCharBasic(ch); - if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; - return helper.test(ch); - } - - function isEmpty(obj) { - for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; - return true; - } - - // Extending unicode characters. A series of a non-extending char + - // any number of extending chars is treated as a single unit as far - // as editing and measuring is concerned. This is not fully correct, - // since some scripts/font/browsers also treat other configurations - // of code points as a group. - var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; - function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } - - // DOM UTILITIES - - function elt(tag, content, className, style) { - var e = document.createElement(tag); - if (className) e.className = className; - if (style) e.style.cssText = style; - if (typeof content == "string") e.appendChild(document.createTextNode(content)); - else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); - return e; - } - - var range; - if (document.createRange) range = function(node, start, end, endNode) { - var r = document.createRange(); - r.setEnd(endNode || node, end); - r.setStart(node, start); - return r; - }; - else range = function(node, start, end) { - var r = document.body.createTextRange(); - try { r.moveToElementText(node.parentNode); } - catch(e) { return r; } - r.collapse(true); - r.moveEnd("character", end); - r.moveStart("character", start); - return r; - }; - - function removeChildren(e) { - for (var count = e.childNodes.length; count > 0; --count) - e.removeChild(e.firstChild); - return e; - } - - function removeChildrenAndAdd(parent, e) { - return removeChildren(parent).appendChild(e); - } - - var contains = CodeMirror.contains = function(parent, child) { - if (child.nodeType == 3) // Android browser always returns false when child is a textnode - child = child.parentNode; - if (parent.contains) - return parent.contains(child); - do { - if (child.nodeType == 11) child = child.host; - if (child == parent) return true; - } while (child = child.parentNode); - }; - - function activeElt() { return document.activeElement; } - // Older versions of IE throws unspecified error when touching - // document.activeElement in some cases (during loading, in iframe) - if (ie && ie_version < 11) activeElt = function() { - try { return document.activeElement; } - catch(e) { return document.body; } - }; - - function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } - var rmClass = CodeMirror.rmClass = function(node, cls) { - var current = node.className; - var match = classTest(cls).exec(current); - if (match) { - var after = current.slice(match.index + match[0].length); - node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); - } - }; - var addClass = CodeMirror.addClass = function(node, cls) { - var current = node.className; - if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls; - }; - function joinClasses(a, b) { - var as = a.split(" "); - for (var i = 0; i < as.length; i++) - if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; - return b; - } - - // WINDOW-WIDE EVENTS - - // These must be handled carefully, because naively registering a - // handler for each editor will cause the editors to never be - // garbage collected. - - function forEachCodeMirror(f) { - if (!document.body.getElementsByClassName) return; - var byClass = document.body.getElementsByClassName("CodeMirror"); - for (var i = 0; i < byClass.length; i++) { - var cm = byClass[i].CodeMirror; - if (cm) f(cm); - } - } - - var globalsRegistered = false; - function ensureGlobalHandlers() { - if (globalsRegistered) return; - registerGlobalHandlers(); - globalsRegistered = true; - } - function registerGlobalHandlers() { - // When the window resizes, we need to refresh active editors. - var resizeTimer; - on(window, "resize", function() { - if (resizeTimer == null) resizeTimer = setTimeout(function() { - resizeTimer = null; - forEachCodeMirror(onResize); - }, 100); - }); - // When the window loses focus, we want to show the editor as blurred - on(window, "blur", function() { - forEachCodeMirror(onBlur); - }); - } - - // FEATURE DETECTION - - // Detect drag-and-drop - var dragAndDrop = function() { - // There is *some* kind of drag-and-drop support in IE6-8, but I - // couldn't get it to work yet. - if (ie && ie_version < 9) return false; - var div = elt('div'); - return "draggable" in div || "dragDrop" in div; - }(); - - var zwspSupported; - function zeroWidthElement(measure) { - if (zwspSupported == null) { - var test = elt("span", "\u200b"); - removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); - if (measure.firstChild.offsetHeight != 0) - zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); - } - var node = zwspSupported ? elt("span", "\u200b") : - elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); - node.setAttribute("cm-text", ""); - return node; - } - - // Feature-detect IE's crummy client rect reporting for bidi text - var badBidiRects; - function hasBadBidiRects(measure) { - if (badBidiRects != null) return badBidiRects; - var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); - var r0 = range(txt, 0, 1).getBoundingClientRect(); - if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) - var r1 = range(txt, 1, 2).getBoundingClientRect(); - return badBidiRects = (r1.right - r0.right < 3); - } - - // See if "".split is the broken IE version, if so, provide an - // alternative way to split lines. - var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { - var pos = 0, result = [], l = string.length; - while (pos <= l) { - var nl = string.indexOf("\n", pos); - if (nl == -1) nl = string.length; - var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); - var rt = line.indexOf("\r"); - if (rt != -1) { - result.push(line.slice(0, rt)); - pos += rt + 1; - } else { - result.push(line); - pos = nl + 1; - } - } - return result; - } : function(string){return string.split(/\r\n?|\n/);}; - - var hasSelection = window.getSelection ? function(te) { - try { return te.selectionStart != te.selectionEnd; } - catch(e) { return false; } - } : function(te) { - try {var range = te.ownerDocument.selection.createRange();} - catch(e) {} - if (!range || range.parentElement() != te) return false; - return range.compareEndPoints("StartToEnd", range) != 0; - }; - - var hasCopyEvent = (function() { - var e = elt("div"); - if ("oncopy" in e) return true; - e.setAttribute("oncopy", "return;"); - return typeof e.oncopy == "function"; - })(); - - var badZoomedRects = null; - function hasBadZoomedRects(measure) { - if (badZoomedRects != null) return badZoomedRects; - var node = removeChildrenAndAdd(measure, elt("span", "x")); - var normal = node.getBoundingClientRect(); - var fromRange = range(node, 0, 1).getBoundingClientRect(); - return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; - } - - // KEY NAMES - - var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", - 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", - 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", - 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 107: "=", 109: "-", 127: "Delete", - 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", - 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", - 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"}; - CodeMirror.keyNames = keyNames; - (function() { - // Number keys - for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i); - // Alphabetic keys - for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); - // Function keys - for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; - })(); - - // BIDI HELPERS - - function iterateBidiSections(order, from, to, f) { - if (!order) return f(from, to, "ltr"); - var found = false; - for (var i = 0; i < order.length; ++i) { - var part = order[i]; - if (part.from < to && part.to > from || from == to && part.to == from) { - f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); - found = true; - } - } - if (!found) f(from, to, "ltr"); - } - - function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } - function bidiRight(part) { return part.level % 2 ? part.from : part.to; } - - function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } - function lineRight(line) { - var order = getOrder(line); - if (!order) return line.text.length; - return bidiRight(lst(order)); - } - - function lineStart(cm, lineN) { - var line = getLine(cm.doc, lineN); - var visual = visualLine(line); - if (visual != line) lineN = lineNo(visual); - var order = getOrder(visual); - var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); - return Pos(lineN, ch); - } - function lineEnd(cm, lineN) { - var merged, line = getLine(cm.doc, lineN); - while (merged = collapsedSpanAtEnd(line)) { - line = merged.find(1, true).line; - lineN = null; - } - var order = getOrder(line); - var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); - return Pos(lineN == null ? lineNo(line) : lineN, ch); - } - function lineStartSmart(cm, pos) { - var start = lineStart(cm, pos.line); - var line = getLine(cm.doc, start.line); - var order = getOrder(line); - if (!order || order[0].level == 0) { - var firstNonWS = Math.max(0, line.text.search(/\S/)); - var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; - return Pos(start.line, inWS ? 0 : firstNonWS); - } - return start; - } - - function compareBidiLevel(order, a, b) { - var linedir = order[0].level; - if (a == linedir) return true; - if (b == linedir) return false; - return a < b; - } - var bidiOther; - function getBidiPartAt(order, pos) { - bidiOther = null; - for (var i = 0, found; i < order.length; ++i) { - var cur = order[i]; - if (cur.from < pos && cur.to > pos) return i; - if ((cur.from == pos || cur.to == pos)) { - if (found == null) { - found = i; - } else if (compareBidiLevel(order, cur.level, order[found].level)) { - if (cur.from != cur.to) bidiOther = found; - return i; - } else { - if (cur.from != cur.to) bidiOther = i; - return found; - } - } - } - return found; - } - - function moveInLine(line, pos, dir, byUnit) { - if (!byUnit) return pos + dir; - do pos += dir; - while (pos > 0 && isExtendingChar(line.text.charAt(pos))); - return pos; - } - - // This is needed in order to move 'visually' through bi-directional - // text -- i.e., pressing left should make the cursor go left, even - // when in RTL text. The tricky part is the 'jumps', where RTL and - // LTR text touch each other. This often requires the cursor offset - // to move more than one unit, in order to visually move one unit. - function moveVisually(line, start, dir, byUnit) { - var bidi = getOrder(line); - if (!bidi) return moveLogically(line, start, dir, byUnit); - var pos = getBidiPartAt(bidi, start), part = bidi[pos]; - var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); - - for (;;) { - if (target > part.from && target < part.to) return target; - if (target == part.from || target == part.to) { - if (getBidiPartAt(bidi, target) == pos) return target; - part = bidi[pos += dir]; - return (dir > 0) == part.level % 2 ? part.to : part.from; - } else { - part = bidi[pos += dir]; - if (!part) return null; - if ((dir > 0) == part.level % 2) - target = moveInLine(line, part.to, -1, byUnit); - else - target = moveInLine(line, part.from, 1, byUnit); - } - } - } - - function moveLogically(line, start, dir, byUnit) { - var target = start + dir; - if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; - return target < 0 || target > line.text.length ? null : target; - } - - // Bidirectional ordering algorithm - // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm - // that this (partially) implements. - - // One-char codes used for character types: - // L (L): Left-to-Right - // R (R): Right-to-Left - // r (AL): Right-to-Left Arabic - // 1 (EN): European Number - // + (ES): European Number Separator - // % (ET): European Number Terminator - // n (AN): Arabic Number - // , (CS): Common Number Separator - // m (NSM): Non-Spacing Mark - // b (BN): Boundary Neutral - // s (B): Paragraph Separator - // t (S): Segment Separator - // w (WS): Whitespace - // N (ON): Other Neutrals - - // Returns null if characters are ordered as they appear - // (left-to-right), or an array of sections ({from, to, level} - // objects) in the order in which they occur visually. - var bidiOrdering = (function() { - // Character types for codepoints 0 to 0xff - var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; - // Character types for codepoints 0x600 to 0x6ff - var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm"; - function charType(code) { - if (code <= 0xf7) return lowTypes.charAt(code); - else if (0x590 <= code && code <= 0x5f4) return "R"; - else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); - else if (0x6ee <= code && code <= 0x8ac) return "r"; - else if (0x2000 <= code && code <= 0x200b) return "w"; - else if (code == 0x200c) return "b"; - else return "L"; - } - - var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; - var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; - // Browsers seem to always treat the boundaries of block elements as being L. - var outerType = "L"; - - function BidiSpan(level, from, to) { - this.level = level; - this.from = from; this.to = to; - } - - return function(str) { - if (!bidiRE.test(str)) return false; - var len = str.length, types = []; - for (var i = 0, type; i < len; ++i) - types.push(type = charType(str.charCodeAt(i))); - - // W1. Examine each non-spacing mark (NSM) in the level run, and - // change the type of the NSM to the type of the previous - // character. If the NSM is at the start of the level run, it will - // get the type of sor. - for (var i = 0, prev = outerType; i < len; ++i) { - var type = types[i]; - if (type == "m") types[i] = prev; - else prev = type; - } - - // W2. Search backwards from each instance of a European number - // until the first strong type (R, L, AL, or sor) is found. If an - // AL is found, change the type of the European number to Arabic - // number. - // W3. Change all ALs to R. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (type == "1" && cur == "r") types[i] = "n"; - else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } - } - - // W4. A single European separator between two European numbers - // changes to a European number. A single common separator between - // two numbers of the same type changes to that type. - for (var i = 1, prev = types[0]; i < len - 1; ++i) { - var type = types[i]; - if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; - else if (type == "," && prev == types[i+1] && - (prev == "1" || prev == "n")) types[i] = prev; - prev = type; - } - - // W5. A sequence of European terminators adjacent to European - // numbers changes to all European numbers. - // W6. Otherwise, separators and terminators change to Other - // Neutral. - for (var i = 0; i < len; ++i) { - var type = types[i]; - if (type == ",") types[i] = "N"; - else if (type == "%") { - for (var end = i + 1; end < len && types[end] == "%"; ++end) {} - var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // W7. Search backwards from each instance of a European number - // until the first strong type (R, L, or sor) is found. If an L is - // found, then change the type of the European number to L. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (cur == "L" && type == "1") types[i] = "L"; - else if (isStrong.test(type)) cur = type; - } - - // N1. A sequence of neutrals takes the direction of the - // surrounding strong text if the text on both sides has the same - // direction. European and Arabic numbers act as if they were R in - // terms of their influence on neutrals. Start-of-level-run (sor) - // and end-of-level-run (eor) are used at level run boundaries. - // N2. Any remaining neutrals take the embedding direction. - for (var i = 0; i < len; ++i) { - if (isNeutral.test(types[i])) { - for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} - var before = (i ? types[i-1] : outerType) == "L"; - var after = (end < len ? types[end] : outerType) == "L"; - var replace = before || after ? "L" : "R"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // Here we depart from the documented algorithm, in order to avoid - // building up an actual levels array. Since there are only three - // levels (0, 1, 2) in an implementation that doesn't take - // explicit embedding into account, we can build up the order on - // the fly, without following the level-based algorithm. - var order = [], m; - for (var i = 0; i < len;) { - if (countsAsLeft.test(types[i])) { - var start = i; - for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} - order.push(new BidiSpan(0, start, i)); - } else { - var pos = i, at = order.length; - for (++i; i < len && types[i] != "L"; ++i) {} - for (var j = pos; j < i;) { - if (countsAsNum.test(types[j])) { - if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j)); - var nstart = j; - for (++j; j < i && countsAsNum.test(types[j]); ++j) {} - order.splice(at, 0, new BidiSpan(2, nstart, j)); - pos = j; - } else ++j; - } - if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)); - } - } - if (order[0].level == 1 && (m = str.match(/^\s+/))) { - order[0].from = m[0].length; - order.unshift(new BidiSpan(0, 0, m[0].length)); - } - if (lst(order).level == 1 && (m = str.match(/\s+$/))) { - lst(order).to -= m[0].length; - order.push(new BidiSpan(0, len - m[0].length, len)); - } - if (order[0].level == 2) - order.unshift(new BidiSpan(1, order[0].to, order[0].to)); - if (order[0].level != lst(order).level) - order.push(new BidiSpan(order[0].level, len, len)); - - return order; - }; - })(); - - // THE END - - CodeMirror.version = "5.4.1"; - - return CodeMirror; -});(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - var Pos = CodeMirror.Pos; - - function forEach(arr, f) { - for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); - } - - function arrayContains(arr, item) { - if (!Array.prototype.indexOf) { - var i = arr.length; - while (i--) { - if (arr[i] === item) { - return true; - } - } - return false; - } - return arr.indexOf(item) != -1; - } - - function scriptHint(editor, keywords, getToken, options) { - // Find the token at the cursor - var cur = editor.getCursor(), token = getToken(editor, cur); - if (/\b(?:string)\b/.test(token.type)) { - return; - } - token.state = CodeMirror.innerMode(editor.getMode(), token.state).state; - - if (!/^[\w$_]*$/.test(token.string)) { - token = { - start: cur.ch, end: cur.ch, string: "", state: token.state, - type: token.string == "." ? "property" : null - }; - } else if (token.end > cur.ch) { - token.end = cur.ch; - token.string = token.string.slice(0, cur.ch - token.start); - } - - var tprop = token; - // If it is a property, find out what it is a property of. - while (tprop.type == "property") { - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (tprop.string != ".") return; - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (!context) var context = []; - context.push(tprop); - } - return { - list: getCompletions(token, context, keywords, options), - from: Pos(cur.line, token.start), - to: Pos(cur.line, token.end) - }; - } - - function getFormulaKeywords() { - return BI.FormulaCollections; - } - - function formulaHint(editor, options) { - return scriptHint(editor, getFormulaKeywords(), - function (e, cur) { - return e.getTokenAt(cur); - }, - options); - }; - CodeMirror.registerHelper("hint", "formula", formulaHint); - - function getCompletions(token, context, keywords, options) { - var found = [], start = token.string; - if (!start) { - return found; - } - function maybeAdd(str) { - if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) { - found.push(str); - } - } - - if (context && context.length) { - context.pop(); - } else { - forEach(keywords, maybeAdd); - } - return found; - } -});(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - "use strict"; - - CodeMirror.defineMode('formula', function () { - function wordObj(words) { - var o = {}; - for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; - return o; - } - - var atoms = wordObj(['false', 'true']); - var keywords = wordObj(BI.FormulaCollections); - - function tokenBase(stream, state) { - if (stream.eatSpace()) { - return null; - } - var ch = stream.next(); - - if (ch === '"' || ch === '\'') { - nextUntilUnescaped(stream, ch); - return "string"; - } - if (/[\[\],\(\)]/.test(ch)) { - return 'bracket'; - } - - // richie:暂时不需要解析操作符号 - //if (/[+\-*\/=<>!&|]/.test(ch)) { - // return 'operator'; - //} - //if (/\d|\d./.test(ch)) { - // stream.eatWhile(/\d|\./); - // if (stream.eol() || !/\w/.test(stream.peek())) { - // return 'number'; - // } - //} - - - - stream.eatWhile(/[\w-]/); - var word = stream.current(); - if (atoms.hasOwnProperty(word)) { - return "atom"; - } - if (keywords.hasOwnProperty(word)) { - return "keyword"; - } - return null; - } - - function nextUntilUnescaped(stream, end) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (next === end && !escaped) { - return false; - } - escaped = !escaped && next === "\\"; - } - return escaped; - } - - function tokenize(stream, state) { - return (state.tokens[0] || tokenBase)(stream, state); - } - - return { - startState: function () { - return {tokens: []}; - }, - token: function (stream, state) { - return tokenize(stream, state); - }, - fold: "brace" - }; - }); - CodeMirror.defineMIME("text/fx-formula", "formula"); -});// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function (mod) { - mod(CodeMirror); -})(function (CodeMirror) { - "use strict"; - - var HINT_ELEMENT_CLASS = "CodeMirror-hint"; - var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; - - // This is the old interface, kept around for now to stay - // backwards-compatible. - CodeMirror.showHint = function (cm, getHints, options) { - if (!getHints) return cm.showHint(options); - if (options && options.async) getHints.async = true; - var newOpts = {hint: getHints}; - if (options) for (var prop in options) newOpts[prop] = options[prop]; - return cm.showHint(newOpts); - }; - - CodeMirror.defineExtension("showHint", function (options) { - // We want a single cursor position. - if (this.listSelections().length > 1 || this.somethingSelected()) return; - - if (this.state.completionActive) this.state.completionActive.close(); - var completion = this.state.completionActive = new Completion(this, options); - if (!completion.options.hint) return; - - CodeMirror.signal(this, "startCompletion", this); - completion.update(true); - }); - - function Completion(cm, options) { - this.cm = cm; - this.options = this.buildOptions(options); - this.widget = null; - this.debounce = 0; - this.tick = 0; - this.startPos = this.cm.getCursor(); - this.startLen = this.cm.getLine(this.startPos.line).length; - - var self = this; - cm.on("cursorActivity", this.activityFunc = function () { - self.cursorActivity(); - }); - } - - var requestAnimationFrame = window.requestAnimationFrame || function (fn) { - return setTimeout(fn, 1000 / 60); - }; - var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; - - Completion.prototype = { - close: function () { - if (!this.active()) return; - this.cm.state.completionActive = null; - this.tick = null; - this.cm.off("cursorActivity", this.activityFunc); - - if (this.widget && this.data) CodeMirror.signal(this.data, "close"); - if (this.widget) this.widget.close(); - CodeMirror.signal(this.cm, "endCompletion", this.cm); - }, - - active: function () { - return this.cm.state.completionActive == this; - }, - - pick: function (data, i) { - var completion = data.list[i]; - if (completion.hint) completion.hint(this.cm, data, completion); - else { - this.cm.replaceRange(getText(completion), completion.from || data.from, - completion.to || data.to, "complete"); - var to = this.cm.getCursor(); - this.cm.markText(completion.from || data.from, to, {className: "#function", atomic: true}); - this.cm.replaceSelection("() "); - to = this.cm.getCursor(); - to.ch = to.ch - 2; - this.cm.setCursor(to); - this.cm.focus(); - } - CodeMirror.signal(data, "pick", completion); - this.close(); - }, - - cursorActivity: function () { - if (this.debounce) { - cancelAnimationFrame(this.debounce); - this.debounce = 0; - } - - var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line); - if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || - pos.ch < this.startPos.ch || this.cm.somethingSelected() || - (pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) { - this.close(); - } else { - var self = this; - this.debounce = requestAnimationFrame(function () { - self.update(); - }); - if (this.widget) this.widget.disable(); - } - }, - - update: function (first) { - if (this.tick == null) return; - if (this.data) CodeMirror.signal(this.data, "update"); - if (!this.options.hint.async) { - this.finishUpdate(this.options.hint(this.cm, this.options), first); - } else { - var myTick = ++this.tick, self = this; - this.options.hint(this.cm, function (data) { - if (self.tick == myTick) self.finishUpdate(data, first); - }, this.options); - } - }, - - finishUpdate: function (data, first) { - this.data = data; - - var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle); - if (this.widget) this.widget.close(); - if (data && data.list.length) { - if (picked && data.list.length == 1) { - this.pick(data, 0); - } else { - this.widget = new Widget(this, data); - CodeMirror.signal(data, "shown"); - } - } - }, - - buildOptions: function (options) { - var editor = this.cm.options.hintOptions; - var out = {}; - for (var prop in defaultOptions) out[prop] = defaultOptions[prop]; - if (editor) for (var prop in editor) - if (editor[prop] !== undefined) out[prop] = editor[prop]; - if (options) for (var prop in options) - if (options[prop] !== undefined) out[prop] = options[prop]; - return out; - } - }; - - function getText(completion) { - if (typeof completion == "string") return completion; - else return completion.text; - } - - function buildKeyMap(completion, handle) { - var baseMap = { - Up: function () { - handle.moveFocus(-1); - }, - Down: function () { - handle.moveFocus(1); - }, - PageUp: function () { - handle.moveFocus(-handle.menuSize() + 1, true); - }, - PageDown: function () { - handle.moveFocus(handle.menuSize() - 1, true); - }, - Home: function () { - handle.setFocus(0); - }, - End: function () { - handle.setFocus(handle.length - 1); - }, - Enter: handle.pick, - Tab: handle.pick, - Esc: handle.close - }; - var custom = completion.options.customKeys; - var ourMap = custom ? {} : baseMap; - - function addBinding(key, val) { - var bound; - if (typeof val != "string") - bound = function (cm) { - return val(cm, handle); - }; - // This mechanism is deprecated - else if (baseMap.hasOwnProperty(val)) - bound = baseMap[val]; - else - bound = val; - ourMap[key] = bound; - } - - if (custom) - for (var key in custom) if (custom.hasOwnProperty(key)) - addBinding(key, custom[key]); - var extra = completion.options.extraKeys; - if (extra) - for (var key in extra) if (extra.hasOwnProperty(key)) - addBinding(key, extra[key]); - return ourMap; - } - - function getHintElement(hintsElement, el) { - while (el && el != hintsElement) { - if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el; - el = el.parentNode; - } - } - - function Widget(completion, data) { - this.completion = completion; - this.data = data; - this.picked = false; - var widget = this, cm = completion.cm; - - var hints = this.hints = document.createElement("ul"); - hints.className = "CodeMirror-hints"; - this.selectedHint = data.selectedHint || 0; - - var completions = data.list; - for (var i = 0; i < completions.length; ++i) { - var elt = hints.appendChild(document.createElement("li")), cur = completions[i]; - var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); - if (cur.className != null) className = cur.className + " " + className; - elt.className = className; - if (cur.render) cur.render(elt, data, cur); - else elt.appendChild(document.createTextNode(cur.displayText || getText(cur))); - elt.hintId = i; - } - - var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null); - var left = pos.left, top = pos.bottom, below = true; - hints.style.left = left + "px"; - hints.style.top = top + "px"; - // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. - var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); - var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); - (completion.options.container || document.body).appendChild(hints); - var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; - if (overlapY > 0) { - var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); - if (curTop - height > 0) { // Fits above cursor - hints.style.top = (top = pos.top - height) + "px"; - below = false; - } else if (height > winH) { - hints.style.height = (winH - 5) + "px"; - hints.style.top = (top = pos.bottom - box.top) + "px"; - var cursor = cm.getCursor(); - if (data.from.ch != cursor.ch) { - pos = cm.cursorCoords(cursor); - hints.style.left = (left = pos.left) + "px"; - box = hints.getBoundingClientRect(); - } - } - } - var overlapX = box.right - winW; - if (overlapX > 0) { - if (box.right - box.left > winW) { - hints.style.width = (winW - 5) + "px"; - overlapX -= (box.right - box.left) - winW; - } - hints.style.left = (left = pos.left - overlapX) + "px"; - } - - cm.addKeyMap(this.keyMap = buildKeyMap(completion, { - moveFocus: function (n, avoidWrap) { - widget.changeActive(widget.selectedHint + n, avoidWrap); - }, - setFocus: function (n) { - widget.changeActive(n); - }, - menuSize: function () { - return widget.screenAmount(); - }, - length: completions.length, - close: function () { - completion.close(); - }, - pick: function () { - widget.pick(); - }, - data: data - })); - - if (completion.options.closeOnUnfocus) { - var closingOnBlur; - cm.on("blur", this.onBlur = function () { - closingOnBlur = setTimeout(function () { - completion.close(); - }, 100); - }); - cm.on("focus", this.onFocus = function () { - clearTimeout(closingOnBlur); - }); - } - - var startScroll = cm.getScrollInfo(); - cm.on("scroll", this.onScroll = function () { - var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect(); - var newTop = top + startScroll.top - curScroll.top; - var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop); - if (!below) point += hints.offsetHeight; - if (point <= editor.top || point >= editor.bottom) return completion.close(); - hints.style.top = newTop + "px"; - hints.style.left = (left + startScroll.left - curScroll.left) + "px"; - }); - - CodeMirror.on(hints, "dblclick", function (e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) { - widget.changeActive(t.hintId); - widget.pick(); - } - }); - - CodeMirror.on(hints, "click", function (e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) { - widget.changeActive(t.hintId); - if (completion.options.completeOnSingleClick) widget.pick(); - } - }); - - CodeMirror.on(hints, "mousedown", function () { - setTimeout(function () { - cm.focus(); - }, 20); - }); - - CodeMirror.signal(data, "select", completions[0], hints.firstChild); - return true; - } - - Widget.prototype = { - close: function () { - if (this.completion.widget != this) return; - this.completion.widget = null; - this.hints.parentNode.removeChild(this.hints); - this.completion.cm.removeKeyMap(this.keyMap); - - var cm = this.completion.cm; - if (this.completion.options.closeOnUnfocus) { - cm.off("blur", this.onBlur); - cm.off("focus", this.onFocus); - } - cm.off("scroll", this.onScroll); - }, - - disable: function () { - this.completion.cm.removeKeyMap(this.keyMap); - var widget = this; - this.keyMap = { - Enter: function () { - widget.picked = true; - } - }; - this.completion.cm.addKeyMap(this.keyMap); - }, - - pick: function () { - this.completion.pick(this.data, this.selectedHint); - }, - - changeActive: function (i, avoidWrap) { - if (i >= this.data.list.length) - i = avoidWrap ? this.data.list.length - 1 : 0; - else if (i < 0) - i = avoidWrap ? 0 : this.data.list.length - 1; - if (this.selectedHint == i) return; - var node = this.hints.childNodes[this.selectedHint]; - node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); - node = this.hints.childNodes[this.selectedHint = i]; - node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; - if (node.offsetTop < this.hints.scrollTop) - this.hints.scrollTop = node.offsetTop - 3; - else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) - this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; - CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); - }, - - screenAmount: function () { - return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; - } - }; - - CodeMirror.registerHelper("hint", "auto", function (cm, options) { - var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; - if (helpers.length) { - for (var i = 0; i < helpers.length; i++) { - var cur = helpers[i](cm, options); - if (cur && cur.list.length) return cur; - } - } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { - if (words) return CodeMirror.hint.fromList(cm, {words: words}); - } else if (CodeMirror.hint.anyword) { - return CodeMirror.hint.anyword(cm, options); - } - }); - - CodeMirror.registerHelper("hint", "fromList", function (cm, options) { - var cur = cm.getCursor(), token = cm.getTokenAt(cur); - var found = []; - for (var i = 0; i < options.words.length; i++) { - var word = options.words[i]; - if (word.slice(0, token.string.length) == token.string) - found.push(word); - } - - if (found.length) return { - list: found, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end) - }; - }); - - CodeMirror.commands.autocomplete = CodeMirror.showHint; - - var defaultOptions = { - hint: CodeMirror.hint.auto, - completeSingle: true, - alignWithWord: true, - closeCharacters: /[\s()\[\]{};:>,]/, - closeOnUnfocus: true, - completeOnSingleClick: true, - container: null, - customKeys: null, - extraKeys: null - }; - - CodeMirror.defineOption("hintOptions", null); -});/** - * Created by User on 2017/3/21. - */ -BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"]; -/** - * 公式编辑控件 - * @class BI.FormulaEditor - * @extends BI.Widget - */ -BI.FormulaEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-formula-editor bi-card', - watermark: '', - value: '', - fieldTextValueMap: {}, - showHint: true, - lineHeight: 2 - }); - }, - _init: function () { - BI.FormulaEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.editor = CodeMirror(this.element[0], { - textWrapping: true, - lineWrapping: true, - lineNumbers: false, - mode: 'formula' - }); - o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); - this.editor.on("change", function (cm, change) { - self._checkWaterMark(); - if (o.showHint) { - CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false}); - } - BI.nextTick(function () { - self.fireEvent(BI.FormulaEditor.EVENT_CHANGE) - }); - }); - - this.editor.on("focus", function () { - self._checkWaterMark(); - self.fireEvent(BI.FormulaEditor.EVENT_FOCUS); - }); - - this.editor.on("blur", function () { - self.fireEvent(BI.FormulaEditor.EVENT_BLUR); - }); - - - if (BI.isKey(o.value)) { - self.setValue(o.value); - } - - if (BI.isKey(this.options.watermark)) { - var self = this; - this.watermark = BI.createWidget({ - type: "bi.label", - cls: "bi-water-mark", - text: this.options.watermark, - whiteSpace: "nowrap", - textAlign: "left" - }); - BI.createWidget({ - type: "bi.absolute", - element: self, - items: [{ - el: self.watermark, - left: 0, - top: 0 - }] - }); - - this.watermark.element.bind( - "mousedown", function (e) { - self.insertString(""); - self.editor.focus(); - e.stopEvent(); - } - ); - this.watermark.element.bind("click", function (e) { - self.editor.focus(); - e.stopEvent(); - }); - this.watermark.element.css({ - position: "absolute", - left: 3, - right: 3, - top: 6, - bottom: 0 - }); - } - }, - - _checkWaterMark: function () { - var o = this.options; - if (!this.disabledWaterMark && BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - disableWaterMark: function () { - this.disabledWaterMark = true; - this._checkWaterMark(); - }, - - focus: function () { - this.editor.focus(); - }, - - /** - * 添加字段 - * @param field - */ - insertField: function (field) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(field); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - insertFunction: function (fn) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(fn); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "#function", atomic: true}); - this.editor.replaceSelection("() "); - to = this.editor.getCursor(); - to.ch = to.ch - 2; - this.editor.setCursor(to); - this.editor.focus(); - }, - insertOperator: function (op) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(op); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "%operator", atomic: true}); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - setFunction: function (v) { - var from = this.editor.getCursor(); - this.editor.replaceSelection(v); - var to = this.editor.getCursor(); - this.editor.markText(from, to, {className: "#function", atomic: true}); - }, - - insertString: function (str) { - this.editor.replaceSelection(str); - this.editor.focus(); - }, - - getFormulaString: function () { - return this.editor.getValue(); - }, - - getUsedFields: function () { - var fieldMap = this.options.fieldTextValueMap; - var fields = []; - this.editor.getValue(true, function (line) { - var value = line.text; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "fieldName": - var dId = fieldMap[value.substr(i.from, i.to - i.from)]; - if (!fields.contains(dId)) { - fields.push(dId); - } - - } - }); - }); - return fields; - }, - - getCheckString: function () { - return this.editor.getValue(true, function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - - switch (i.marker.className) { - case "fieldName": - var fieldNameLength = i.to - i.from; - value = value.substr(0, i.from + num) + "$a" + value.substr(i.to + num, value.length); - num = num + 2 - fieldNameLength; - break; - } - - }); - return value; - }); - }, - - getValue: function () { - var fieldMap = this.options.fieldTextValueMap; - return this.editor.getValue("\n", function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "fieldName": - var fieldNameLength = i.to - i.from; - var fieldId = fieldMap[value.substr(i.from + num, fieldNameLength)]; - value = value.substr(0, i.from + num) + "$\{" + fieldMap[value.substr(i.from + num, fieldNameLength)] + "\}" + value.substr(i.to + num, value.length); - num += fieldId.length - fieldNameLength + 3; - break; - } - }); - return value; - }); - }, - - setValue: function (value) { - this.editor.setValue(value); - }, - - setFieldTextValueMap: function (fieldTextValueMap) { - this.options.fieldTextValueMap = fieldTextValueMap; - }, - - refresh: function () { - var self = this; - BI.nextTick(function () { - self.editor.refresh(); - }); - } - -}); -BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.formula_editor", BI.FormulaEditor); -/** - * z-index在1亿层级 - * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现) - * @class BI.Msg - */ -$.extend(BI, { - Msg: function () { - - var messageShow, $mask, $pop; - - return { - alert: function (title, message, callback) { - this._show(false, title, message, callback); - }, - confirm: function (title, message, callback) { - this._show(true, title, message, callback); - }, - prompt: function (title, message, value, callback, min_width) { - // BI.Msg.prompt(title, message, value, callback, min_width); - }, - toast: function (message, level, context) { - context = context || $("body"); - var toast = BI.createWidget({ - type: "bi.toast", - level: level, - text: message - }); - BI.createWidget({ - type: "bi.absolute", - element: context, - items: [{ - el: toast, - left: "50%", - top: 0 - }] - }); - if (toast.element.outerWidth() > context.outerWidth()) { - toast.setWidth(context.width()); - } - toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); - toast.invisible(); - toast.element.slideDown(500, function () { - BI.delay(function () { - toast.element.slideUp(500, function () { - toast.destroy(); - }) - }, 5000) - }) - }, - _show: function (hasCancel, title, message, callback) { - $mask = $('<div class="bi-z-index-mask">').css({ - position: 'absolute', - 'zIndex': BI.zIndex_tip - 2, - top: 0, - left: 0, - right: 0, - bottom: 0, - opacity: 0.5 - }).appendTo('body'); - $pop = $('<div class="bi-message-depend">').css({ - position: 'absolute', - 'zIndex': BI.zIndex_tip - 1, - top: 0, - left: 0, - right: 0, - bottom: 0 - }).appendTo('body'); - var close = function () { - messageShow.destroy(); - $mask.remove(); - }; - var controlItems = []; - if (hasCancel === true) { - controlItems.push({ - el: { - type: 'bi.button', - text: BI.i18nText("BI-Basic_Cancel"), - height: 30, - level: 'ignore', - handler: function () { - close(); - if (BI.isFunction(callback)) { - callback.apply(null, [false]); - } - } - } - }); - } - controlItems.push({ - el: { - type: 'bi.button', - text: BI.i18nText("BI-Basic_OK"), - height: 30, - handler: function () { - close(); - if (BI.isFunction(callback)) { - callback.apply(null, [true]); - } - } - } - }); - var conf = { - element: $pop, - type: 'bi.center_adapt', - items: [ - { - type: 'bi.border', - cls: 'bi-message-content bi-card', - items: { - 'north': { - el: { - type: 'bi.border', - cls: 'bi-message-title bi-background', - items: { - center: { - el: { - type: 'bi.label', - text: title || BI.i18nText("BI-Basic_Prompt"), - textAlign: 'left', - hgap: 20, - height: 50 - } - }, - east: { - el: { - type: 'bi.icon_button', - cls: 'bi-message-close close-font', -// height: 50, - handler: function () { - close(); - } - }, - width: 60 - } - } - }, - height: 50 - }, - 'center': { - el: { - type: "bi.text", - cls: "bi-message-text", - tgap: 60, - hgap: 20, - lineHeight: 30, - whiteSpace: "normal", - text: message - } - }, - 'south': { - el: { - type: "bi.absolute", - items: [{ - el: { - type: 'bi.right_vertical_adapt', - hgap: 5, - items: controlItems - }, - top: 0, - left: 20, - right: 20, - bottom: 0 - }] - - }, - height: 60 - } - }, - width: 400, - height: 300 - } - ] - }; - - messageShow = BI.createWidget(conf); - } - }; - }() -});/** - * GridView - * - * Created by GUY on 2016/1/11. - * @class BI.GridView - * @extends BI.Widget - */ -BI.GridView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-view", - // width: 400, //必设 - // height: 300, //必设 - overflowX: true, - overflowY: true, - overscanColumnCount: 0, - overscanRowCount: 0, - rowHeightGetter: BI.emptyFn, //number类型或function类型 - columnWidthGetter: BI.emptyFn, //number类型或function类型 - // estimatedColumnSize: 100, //columnWidthGetter为function时必设 - // estimatedRowSize: 30, //rowHeightGetter为function时必设 - scrollLeft: 0, - scrollTop: 0, - items: [] - }); - }, - - _init: function () { - BI.GridView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - this._debounceRelease = BI.debounce(function () { - self._scrollLock = false; - }, 1000 / 60); - this.container = BI.createWidget({ - type: "bi.absolute" - }); - this.element.scroll(function () { - if (self._scrollLock === true) { - return; - } - o.scrollLeft = self.element.scrollLeft(); - o.scrollTop = self.element.scrollTop(); - self._calculateChildrenToRender(); - self.fireEvent(BI.GridView.EVENT_SCROLL, { - scrollLeft: o.scrollLeft, - scrollTop: o.scrollTop - }); - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - scrollable: o.overflowX === true && o.overflowY === true, - scrolly: o.overflowX === false && o.overflowY === true, - scrollx: o.overflowX === true && o.overflowY === false, - items: [this.container] - }); - if (o.items.length > 0) { - this._populate(); - } - if (o.scrollLeft !== 0 || o.scrollTop !== 0) { - BI.nextTick(function () { - self.element.scrollTop(o.scrollTop); - self.element.scrollLeft(o.scrollLeft); - }); - } - }, - - _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) { - return { - overscanStartIndex: Math.max(0, startIndex - overscanCellsCount), - overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount) - } - }, - - _calculateChildrenToRender: function () { - var self = this, o = this.options; - - var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()), - scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()), - overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount; - - if (height > 0 && width > 0) { - var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft); - var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop); - - if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) { - return; - } - var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft); - var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop); - - this._renderedColumnStartIndex = visibleColumnIndices.start; - this._renderedColumnStopIndex = visibleColumnIndices.stop; - this._renderedRowStartIndex = visibleRowIndices.start; - this._renderedRowStopIndex = visibleRowIndices.stop; - - var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex) - - var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex); - - var columnStartIndex = overscanColumnIndices.overscanStartIndex; - var columnStopIndex = overscanColumnIndices.overscanStopIndex; - var rowStartIndex = overscanRowIndices.overscanStartIndex; - var rowStopIndex = overscanRowIndices.overscanStopIndex; - - //算区间size - var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex); - var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex); - var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex); - var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex); - var top = minRowDatum.offset + verticalOffsetAdjustment; - var left = minColumnDatum.offset + horizontalOffsetAdjustment; - var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size; - var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size; - //如果滚动的区间并没有超出渲染的范围 - if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { - return; - } - - var renderedCells = [], renderedKeys = [], renderedWidgets = {}; - var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0; - var count = 0; - for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { - var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); - - for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { - var key = [rowIndex, columnIndex]; - var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); - - var index = BI.deepIndexOf(this.renderedKeys, key); - var child; - if (index > -1) { - if (columnDatum.size !== this.renderedCells[index]._width) { - this.renderedCells[index]._width = columnDatum.size; - this.renderedCells[index].el.setWidth(columnDatum.size); - } - if (rowDatum.size !== this.renderedCells[index]._height) { - this.renderedCells[index]._height = rowDatum.size; - this.renderedCells[index].el.setHeight(rowDatum.size); - } - if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) { - this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) + "px"); - } - if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) { - this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) + "px"); - } - renderedCells.push(child = this.renderedCells[index]); - } else { - child = BI.createWidget(BI.extend({ - type: "bi.label", - width: columnDatum.size, - height: rowDatum.size - }, o.items[rowIndex][columnIndex], { - cls: (o.items[rowIndex][columnIndex].cls || "") + " grid-cell" + (rowIndex === 0 ? " first-row" : "") + (columnIndex === 0 ? " first-col" : ""), - _rowIndex: rowIndex, - _columnIndex: columnIndex, - _left: columnDatum.offset + horizontalOffsetAdjustment, - _top: rowDatum.offset + verticalOffsetAdjustment - })); - renderedCells.push({ - el: child, - left: columnDatum.offset + horizontalOffsetAdjustment, - top: rowDatum.offset + verticalOffsetAdjustment, - _left: columnDatum.offset + horizontalOffsetAdjustment, - _top: rowDatum.offset + verticalOffsetAdjustment, - _width: columnDatum.size, - _height: rowDatum.size - }); - } - minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment); - maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size); - minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment); - maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size); - renderedKeys.push(key); - renderedWidgets[count++] = child; - } - } - //已存在的, 需要添加的和需要删除的 - var existSet = {}, addSet = {}, deleteArray = []; - BI.each(renderedKeys, function (i, key) { - if (BI.deepContains(self.renderedKeys, key)) { - existSet[i] = key; - } else { - addSet[i] = key; - } - }); - BI.each(this.renderedKeys, function (i, key) { - if (BI.deepContains(existSet, key)) { - return; - } - if (BI.deepContains(addSet, key)) { - return; - } - deleteArray.push(i); - }); - BI.each(deleteArray, function (i, index) { - //性能优化,不调用destroy方法防止触发destroy事件 - self.renderedCells[index].el._destroy(); - }); - var addedItems = []; - BI.each(addSet, function (index) { - addedItems.push(renderedCells[index]) - }); - this.container.addItems(addedItems); - //拦截父子级关系 - this.container._children = renderedWidgets; - this.container.attr("items", renderedCells); - this.renderedCells = renderedCells; - this.renderedKeys = renderedKeys; - this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; - } - }, - - _getMaxScrollLeft: function () { - return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); - }, - - _getMaxScrollTop: function () { - return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); - }, - - _populate: function (items) { - var self = this, o = this.options; - this._reRange(); - if (items && items !== this.options.items) { - this.options.items = items; - } - if (o.items.length > 0) { - this.columnCount = o.items[0].length; - this.rowCount = o.items.length; - } else { - this.rowCount = 0; - this.columnCount = 0; - } - this.container.setWidth(this.columnCount * o.estimatedColumnSize); - this.container.setHeight(this.rowCount * o.estimatedRowSize); - - this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize); - this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize); - - this._calculateChildrenToRender(); - this.element.scrollTop(o.scrollTop); - this.element.scrollLeft(o.scrollLeft); - }, - - setScrollLeft: function (scrollLeft) { - if (this.options.scrollLeft === scrollLeft) { - return; - } - this._scrollLock = true; - this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollLeft(this.options.scrollLeft); - }, - - setScrollTop: function (scrollTop) { - if (this.options.scrollTop === scrollTop) { - return; - } - this._scrollLock = true; - this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); - this._debounceRelease(); - this._calculateChildrenToRender(); - this.element.scrollTop(this.options.scrollTop); - }, - - setOverflowX: function (b) { - var self = this; - if (this.options.overflowX !== !!b) { - this.options.overflowX = !!b; - BI.nextTick(function () { - self.element.css({overflowX: !!b ? "auto" : "hidden"}); - }); - } - }, - - setOverflowY: function (b) { - var self = this; - if (this.options.overflowY !== !!b) { - this.options.overflowY = !!b; - BI.nextTick(function () { - self.element.css({overflowY: !!b ? "auto" : "hidden"}); - }); - } - }, - - getScrollLeft: function () { - return this.options.scrollLeft; - }, - - getScrollTop: function () { - return this.options.scrollTop; - }, - - getMaxScrollLeft: function () { - return this._getMaxScrollLeft(); - }, - - getMaxScrollTop: function () { - return this._getMaxScrollTop(); - }, - - setEstimatedColumnSize: function (width) { - this.options.estimatedColumnSize = width; - }, - - setEstimatedRowSize: function (height) { - this.options.estimatedRowSize = height; - }, - - //重新计算children - _reRange: function () { - this.renderRange = {}; - }, - - _clearChildren: function () { - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - BI.each(this.renderedCells, function (i, cell) { - cell.el._destroy(); - }); - this._clearChildren(); - this.renderedCells = []; - this.renderedKeys = []; - this.renderRange = {}; - this._scrollLock = false; - }, - - populate: function (items) { - if (items && items !== this.options.items) { - this.restore(); - } - this._populate(items); - } -}); -BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut('bi.grid_view', BI.GridView);/** - * floatBox弹出层, - * @class BI.FloatBox - * @extends BI.Widget - */ -BI.FloatBox = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-float-box bi-card", - width: 600, - height: 500 - }) - }, - _init: function () { - BI.FloatBox.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.showAction = new BI.ShowAction({ - tar: this - }); - this._center = BI.createWidget(); - this._north = BI.createWidget(); - this.element.draggable && this.element.draggable({ - handle: ".bi-message-title", - drag: function (e, ui) { - var W = $("body").width(), H = $("body").height(); - if (ui.position.left + o.width > W) { - ui.position.left = W - o.width; - } - if (ui.position.top + o.height > H) { - ui.position.top = H - o.height; - } - if (ui.position.left < 0) { - ui.position.left = 0; - } - if (ui.position.top < 0) { - ui.position.top = 0; - } - } - }); - this._south = BI.createWidget(); - BI.createWidget({ - type: 'bi.border', - element: this, - items: { - 'north': { - el: { - type: 'bi.border', - cls: 'bi-message-title bi-background', - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: this._north, - left: 10, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: 'bi.icon_button', - cls: 'bi-message-close close-font', - height: 50, - handler: function () { - self.currentSectionProvider.close(); - } - }, - width: 60 - } - } - }, - height: 50 - }, - 'center': { - el: { - type: "bi.absolute", - items: [{ - el: this._center, - left: 10, - top: 10, - right: 10, - bottom: 10 - }] - } - }, - 'south': { - el: { - type: "bi.absolute", - items: [{ - el: this._south, - left: 10, - top: 0, - right: 10, - bottom: 0 - }] - }, - height: 60 - } - } - }) - }, - - populate: function (sectionProvider) { - var self = this; - if (this.currentSectionProvider && this.currentSectionProvider !== sectionProvider) { - this.currentSectionProvider.destroy(); - } - this.currentSectionProvider = sectionProvider; - sectionProvider.rebuildNorth(this._north); - sectionProvider.rebuildCenter(this._center); - sectionProvider.rebuildSouth(this._south); - sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () { - self.close(); - }) - }, - - show: function () { - this.showAction.actionPerformed(); - }, - - hide: function () { - this.showAction.actionBack(); - }, - - open: function () { - this.show(); - this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN); - }, - - close: function () { - this.hide(); - this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED); - }, - - setZindex: function (zindex) { - this.element.css({"z-index": zindex}); - }, - - destroyed: function () { - this.currentSectionProvider && this.currentSectionProvider.destroy(); - } -}); - -BI.shortcut("bi.float_box", BI.FloatBox); - -BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED"; -BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED"; -/** - * 下拉框弹出层, zIndex在1000w - * @class BI.PopupView - * @extends BI.Widget - */ -BI.PopupView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-popup-view", - maxWidth: 'auto', - minWidth: 100, - //maxHeight: 200, - minHeight: 25, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - direction: BI.Direction.Top, //工具栏的方向 - stopEvent: false,//是否停止mousedown、mouseup事件 - stopPropagation: false, //是否停止mousedown、mouseup向上冒泡 - logic: { - dynamic: true - }, - - tool: false, //自定义工具栏 - tabs: [], //导航栏 - buttons: [], //toolbar栏 - - el: { - type: "bi.button_group", - items: [], - chooseType: 0, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.PopupView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var fn = function (e) { - e.stopPropagation(); - }, stop = function (e) { - e.stopEvent(); - return false; - }; - this.element.css({ - "z-index": BI.zIndex_popup, - "min-width": o.minWidth + "px", - "max-width": o.maxWidth + "px" - }).bind({"click": fn}); - - this.element.bind("mousewheel", fn); - - o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn}); - o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop}); - this.tool = this._createTool(); - this.tab = this._createTab(); - this.view = this._createView(); - this.toolbar = this._createToolBar(); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.PopupView.EVENT_CHANGE); - } - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - scrolly: false, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap, - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, - BI.extend({ - cls: "list-view-outer bi-card bi-border" - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar) - }))) - ) - })))); - }, - - _createView: function () { - var o = this.options; - this.button_group = BI.createWidget(o.el, {type: "bi.button_group"}); - this.button_group.element.css({"min-height": o.minHeight + "px"}); - return this.button_group; - }, - - _createTool: function () { - var o = this.options; - if (false === o.tool) { - return; - } - return BI.createWidget(o.tool) - }, - - _createTab: function () { - var o = this.options; - if (o.tabs.length === 0) { - return; - } - return BI.createWidget({ - type: "bi.center", - cls: "list-view-tab", - height: 25, - items: o.tabs - }) - }, - - _createToolBar: function () { - var o = this.options; - if (o.buttons.length === 0) { - return; - } - - return BI.createWidget({ - type: "bi.center", - cls: "list-view-toolbar bi-high-light bi-border-top", - height: 30, - items: BI.createItems(o.buttons, { - once: false, - shadow: true, - isShadowShowingOnSelected: true - }) - }) - }, - - getView: function () { - return this.button_group; - }, - - populate: function (items) { - this.button_group.populate.apply(this.button_group, arguments); - }, - - resetWidth: function (w) { - this.options.width = w; - this.element.width(w); - }, - - resetHeight: function (h) { - var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 30) : 0, - tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0, - toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) : - this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"}) - }, - - setValue: function (selectedValues) { - this.tab && this.tab.setValue(selectedValues); - this.button_group.setValue(selectedValues); - }, - - getValue: function () { - return this.button_group.getValue(); - } -}); -BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.popup_view", BI.PopupView);/** - * 搜索面板 - * - * Created by GUY on 2015/9/28. - * @class BI.SearcherView - * @extends BI.Pane - */ - -BI.SearcherView = BI.inherit(BI.Pane, { - _defaultConfig: function () { - var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-searcher-view bi-card", - tipText: BI.i18nText("BI-No_Select"), - chooseType: BI.Selection.Single, - - matcher: {//完全匹配的构造器 - type: "bi.button_group", - behaviors: { - redmark: function () { - return true; - } - }, - items: [], - layouts: [{ - type: "bi.vertical" - }] - }, - searcher: { - type: "bi.button_group", - behaviors: { - redmark: function () { - return true; - } - }, - items: [], - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.SearcherView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.matcher = BI.createWidget(o.matcher, { - type: "bi.button_group", - chooseType: o.chooseType, - behaviors: { - redmark: function () { - return true; - } - }, - layouts: [{ - type: "bi.vertical" - }] - }); - this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); - } - }); - this.spliter = BI.createWidget({ - type: "bi.vertical", - height: 1, - hgap: 10, - items: [{ - type: "bi.layout", - height: 1, - cls: "searcher-view-spliter bi-background" - }] - }); - this.searcher = BI.createWidget(o.searcher, { - type: "bi.button_group", - chooseType: o.chooseType, - behaviors: { - redmark: function () { - return true; - } - }, - layouts: [{ - type: "bi.vertical" - }] - }); - this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.matcher, this.spliter, this.searcher] - }); - }, - - startSearch: function () { - - }, - - stopSearch: function () { - - }, - - setValue: function (v) { - this.matcher.setValue(v); - this.searcher.setValue(v); - }, - - getValue: function () { - return this.matcher.getValue().concat(this.searcher.getValue()); - }, - - populate: function (searchResult, matchResult, keyword) { - searchResult || (searchResult = []); - matchResult || (matchResult = []); - this.setTipVisible(searchResult.length + matchResult.length === 0); - this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult)); - this.matcher.populate(matchResult, keyword); - this.searcher.populate(searchResult, keyword); - }, - - empty: function () { - this.searcher.empty(); - this.matcher.empty(); - }, - - hasMatched: function () { - return this.matcher.getAllButtons().length > 0; - } -}); -BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.searcher_view", BI.SearcherView);/** - * 表示当前对象 - * - * Created by GUY on 2017/5/23. - * @class BI.ListView - * @extends BI.Widget - */ -BI.ListView = BI.inherit(BI.Widget, { - props: function () { - return { - baseCls: "bi-list-view", - overscanHeight: 100, - blockSize: 10, - scrollTop: 0, - el: {}, - items: [] - }; - }, - - init: function () { - var self = this; - this.renderedIndex = -1; - this.cache = {}; - }, - - render: function () { - var self = this, o = this.options; - return { - type: "bi.vertical", - items: [BI.extend({ - type: "bi.vertical", - scrolly: false, - ref: function () { - self.container = this; - } - }, o.el)], - element: this - } - }, - - mounted: function () { - var self = this, o = this.options; - this._populate(); - this.element.scroll(function (e) { - o.scrollTop = self.element.scrollTop(); - self._calculateBlocksToRender(); - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._calculateBlocksToRender(); - }); - }, - - _renderMoreIf: function () { - var self = this, o = this.options; - var height = this.element.height(); - var minContentHeight = o.scrollTop + height + o.overscanHeight; - var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, - cnt = this.renderedIndex + 1; - var lastHeight; - var getElementHeight = function () { - return self.container.element.height(); - }; - while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { - var items = o.items.slice(index, index + o.blockSize); - this.container.addItems(items); - var addedHeight = getElementHeight() - lastHeight; - this.cache[cnt] = { - index: index, - scrollTop: lastHeight, - height: addedHeight - }; - this.renderedIndex = cnt; - cnt++; - index += o.blockSize; - } - }, - - _calculateBlocksToRender: function () { - var o = this.options; - this._renderMoreIf(); - }, - - _populate: function (items) { - var o = this.options; - if (items && this.options.items !== items) { - this.options.items = items; - } - this._calculateBlocksToRender(); - this.element.scrollTop(o.scrollTop); - }, - - restore: function () { - this.renderedIndex = -1; - this.container.empty(); - this.cache = {}; - }, - - populate: function (items) { - if (items && this.options.items !== items) { - this.restore(); - } - this._populate(); - }, - - destroyed: function () { - this.restore(); - } -}); -BI.shortcut('bi.list_view', BI.ListView); - -/** - * 表示当前对象 - * - * Created by GUY on 2017/5/22. - * @class BI.VirtualList - * @extends BI.Widget - */ -BI.VirtualList = BI.inherit(BI.Widget, { - props: function () { - return { - baseCls: "bi-virtual-list", - overscanHeight: 100, - blockSize: 10, - scrollTop: 0, - items: [] - }; - }, - - init: function () { - var self = this; - this.renderedIndex = -1; - this.cache = {}; - }, - - render: function () { - var self = this, o = this.options; - return { - type: "bi.vertical", - items: [{ - type: "bi.layout", - ref: function () { - self.topBlank = this; - } - }, { - type: "bi.vertical", - scrolly: false, - ref: function () { - self.container = this; - } - }, { - type: "bi.layout", - ref: function () { - self.bottomBlank = this; - } - }], - element: this - } - }, - - mounted: function () { - var self = this, o = this.options; - this._populate(); - this.element.scroll(function (e) { - o.scrollTop = self.element.scrollTop(); - self._calculateBlocksToRender(); - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._calculateBlocksToRender(); - }); - }, - - _renderMoreIf: function () { - var self = this, o = this.options; - var height = this.element.height(); - var minContentHeight = o.scrollTop + height + o.overscanHeight; - var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, - cnt = this.renderedIndex + 1; - var lastHeight; - var getElementHeight = function () { - return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height(); - }; - while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { - var items = o.items.slice(index, index + o.blockSize); - this.container.addItems(items); - var addedHeight = getElementHeight() - lastHeight; - this.cache[cnt] = { - index: index, - scrollTop: lastHeight, - height: addedHeight - }; - this.tree.set(cnt, addedHeight); - this.renderedIndex = cnt; - cnt++; - index += o.blockSize; - } - }, - - _calculateBlocksToRender: function () { - var o = this.options; - this._renderMoreIf(); - var height = this.element.height(); - var minContentHeightFrom = o.scrollTop - o.overscanHeight; - var minContentHeightTo = o.scrollTop + height + o.overscanHeight; - var start = this.tree.greatestLowerBound(minContentHeightFrom); - var end = this.tree.leastUpperBound(minContentHeightTo); - var needDestroyed = []; - for (var i = 0; i < start; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - needDestroyed.push(this.container._children[j]); - this.container._children[j] = null; - } - this.cache[i].destroyed = true; - } - } - for (var i = end + 1; i <= this.renderedIndex; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - needDestroyed.push(this.container._children[j]); - this.container._children[j] = null; - } - this.cache[i].destroyed = true; - } - } - var firstFragment = document.createDocumentFragment(), lastFragment = document.createDocumentFragment(); - var currentFragment = firstFragment; - for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { - var index = this.cache[i].index; - if (!this.cache[i].destroyed) { - currentFragment = lastFragment; - } - if (this.cache[i].destroyed === true) { - for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { - var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j]))); - currentFragment.appendChild(w.element[0]); - } - this.cache[i].destroyed = false; - } - } - this.container.element.prepend(firstFragment); - this.container.element.append(lastFragment); - this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop); - var lastCache = this.cache[Math.min(end, this.renderedIndex)]; - this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height); - BI.each(needDestroyed, function (i, child) { - child && child._destroy(); - }); - }, - - _populate: function (items) { - var o = this.options; - if (items && this.options.items !== items) { - this.options.items = items; - } - this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize)); - this._calculateBlocksToRender(); - this.element.scrollTop(o.scrollTop); - }, - - _clearChildren: function () { - BI.each(this.container._children, function (i, cell) { - cell && cell.el._destroy(); - }); - this.container._children = {}; - this.container.attr("items", []); - }, - - restore: function () { - this.renderedIndex = -1; - this._clearChildren(); - this.cache = {}; - this.options.scrollTop = 0; - }, - - populate: function (items) { - if (items && this.options.items !== items) { - this.restore(); - } - this._populate(); - }, - - destroyed: function () { - this.restore(); - } -}); -BI.shortcut('bi.virtual_list', BI.VirtualList); - -/** - * 分页控件 - * - * Created by GUY on 2015/8/31. - * @class BI.Pager - * @extends BI.Widget - */ -BI.Pager = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pager", - behaviors: {}, - layouts: [{ - type: "bi.horizontal", - hgap: 10, - vgap: 0 - }], - - dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 - //dynamicShow为false时以下两个有用 - dynamicShowFirstLast: false,//是否动态显示首页、尾页 - dynamicShowPrevNext: false,//是否动态显示上一页、下一页 - pages: false, //总页数 - curr: function () { - return 1; - }, //初始化当前页 - groups: 0, //连续显示分页数 - jump: BI.emptyFn, //分页的回调函数 - - first: false, //是否显示首页 - last: false, //是否显示尾页 - prev: "上一页", - next: "下一页", - - firstPage: 1, - lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 - return 1; - }, - hasPrev: BI.emptyFn, //pages不可用时有效 - hasNext: BI.emptyFn //pages不可用时有效 - }) - }, - _init: function () { - BI.Pager.superclass._init.apply(this, arguments); - var self = this; - this.currPage = BI.result(this.options, "curr"); - //翻页太灵敏 - // this._lock = false; - // this._debouce = BI.debounce(function () { - // self._lock = false; - // }, 300); - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options, view = [], dict = {}; - this.empty(); - var pages = BI.result(o, "pages"); - var curr = BI.result(this, "currPage"); - var groups = BI.result(o, "groups"); - var first = BI.result(o, "first"); - var last = BI.result(o, "last"); - var prev = BI.result(o, "prev"); - var next = BI.result(o, "next"); - - if (pages === false) { - groups = 0; - first = false; - last = false; - } else { - groups > pages && (groups = pages); - } - - //计算当前组 - dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); - - //当前页非首页,则输出上一页 - if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { - if (BI.isKey(prev)) { - view.push({ - text: prev, - value: "prev", - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }) - } else { - view.push(BI.extend({ - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }, prev)); - } - } - - //当前组非首组,则输出首页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { - view.push({ - text: first, - value: "first", - disabled: !(dict.index > 1 && groups !== 0) - }); - if (dict.index > 1 && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - } - - //输出当前页组 - dict.poor = Math.floor((groups - 1) / 2); - dict.start = dict.index > 1 ? curr - dict.poor : 1; - dict.end = dict.index > 1 ? (function () { - var max = curr + (groups - dict.poor - 1); - return max > pages ? pages : max; - }()) : groups; - if (dict.end - dict.start < groups - 1) { //最后一组状态 - dict.start = dict.end - groups + 1; - } - var s = dict.start, e = dict.end; - if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { - s++; - e--; - } - for (; s <= e; s++) { - if (s === curr) { - view.push({ - text: s, - value: s, - selected: true - }) - } else { - view.push({ - text: s, - value: s - }) - } - } - - //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { - if (pages > groups && dict.end < pages && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - view.push({ - text: last, - value: "last", - disabled: !(pages > groups && dict.end < pages && groups !== 0) - }) - } - - //当前页不为尾页时,输出下一页 - dict.flow = !prev && groups === 0; - if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { - view.push((function () { - if (BI.isKey(next)) { - if (pages === false) { - return {text: next, value: "next", disabled: o.hasNext(curr) === false} - } - return (dict.flow && curr === pages) - ? - {text: next, value: "next", disabled: true} - : - {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; - } else { - return BI.extend({ - disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) - }, next); - } - }())); - } - - this.button_group = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(view, { - cls: "bi-list-item-select", - height: 23, - hgap: 10 - }), - behaviors: o.behaviors, - layouts: o.layouts - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - // if (self._lock === true) { - // return; - // } - // self._lock = true; - // self._debouce(); - if (type === BI.Events.CLICK) { - var v = self.button_group.getValue()[0]; - switch (v) { - case "first": - self.currPage = 1; - break; - case "last": - self.currPage = pages; - break; - case "prev": - self.currPage--; - break; - case "next": - self.currPage++; - break; - default: - self.currPage = v; - break; - } - o.jump.apply(self, [{ - pages: pages, - curr: self.currPage - }]); - self._populate(); - self.fireEvent(BI.Pager.EVENT_CHANGE, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE); - }, - - getCurrentPage: function () { - return this.currPage; - }, - - setAllPages: function (pages) { - this.options.pages = pages; - }, - - hasPrev: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasPrev(v) : v > 1; - }, - - hasNext: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasNext(v) : v < pages; - }, - - setValue: function (v) { - var o = this.options; - v = v | 0; - v = v < 1 ? 1 : v; - if (o.pages === false) { - var lastPage = BI.result(o, "lastPage"), firstPage = 1; - this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); - } else { - v = v > o.pages ? o.pages : v; - this.currPage = v; - } - this._populate(); - }, - - getValue: function () { - var val = this.button_group.getValue()[0]; - switch (val) { - case "prev": - return -1; - case "next": - return 1; - case "first": - return BI.MIN; - case "last": - return BI.MAX; - default : - return val; - } - }, - - attr: function (key, value) { - BI.Pager.superclass.attr.apply(this, arguments); - if (key === "curr") { - this.currPage = BI.result(this.options, "curr"); - } - }, - - populate: function () { - this._populate(); - } -}); -BI.Pager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; -BI.shortcut("bi.pager", BI.Pager);/** - * 超链接 - * - * Created by GUY on 2015/9/9. - * @class BI.A - * @extends BI.Text - * @abstract - */ -BI.A = BI.inherit(BI.Text, { - _defaultConfig: function () { - var conf = BI.A.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-a display-block", - href: "", - target: "_blank", - el: null, - element: "<a/>" - }) - }, - _init: function () { - var o = this.options; - BI.A.superclass._init.apply(this, arguments); - this.element.attr({href: o.href, target: o.target}); - if (o.el) { - BI.createWidget(o.el, { - element: this - }); - } - } -}); - -BI.shortcut("bi.a", BI.A);/** - * guy - * 加载条 - * @type {*|void|Object} - */ -BI.LoadingBar = BI.inherit(BI.Single, { - consts: { - loadedText: BI.i18nText("BI-Load_More"), - endText: BI.i18nText("BI-No_More_Data") - }, - _defaultConfig: function() { - var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips', - height: 30, - handler: BI.emptyFn - }) - }, - _init : function() { - BI.LoadingBar.superclass._init.apply(this, arguments); - var self = this; - this.loaded = BI.createWidget({ - type: "bi.text_button", - cls: "loading-text bi-list-item-simple", - text: this.consts.loadedText, - width: 120, - handler: this.options.handler - }) - this.loaded.on(BI.Controller.EVENT_CHANGE, function(type){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - - this.loading = BI.createWidget({ - type: "bi.layout", - width: this.options.height, - height:this.options.height, - cls: "loading-background cursor-default" - }) - var loaded = BI.createWidget({ - type: "bi.center_adapt", - items: [this.loaded] - }) - var loading = BI.createWidget({ - type: "bi.center_adapt", - items: [this.loading] - }) - this.cardLayout = BI.createWidget({ - type: "bi.card", - element: this, - items: [{ - el: loaded, - cardName: "loaded" - }, { - el: loading, - cardName: "loading" - }] - }) - this.invisible(); - }, - - _reset: function(){ - this.visible(); - this.loaded.setText(this.consts.loadedText); - this.loaded.enable(); - }, - - setLoaded: function(){ - this._reset(); - this.cardLayout.showCardByName("loaded"); - }, - - setEnd: function(){ - this.setLoaded(); - this.loaded.setText(this.consts.endText); - this.loaded.disable(); - }, - - setLoading: function(){ - this._reset(); - this.cardLayout.showCardByName("loading"); - } -}); - -BI.shortcut("bi.loading_bar", BI.LoadingBar);/** - * @class BI.IconButton - * @extends BI.BasicButton - * 图标的button - */ -BI.IconButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center", - iconWidth: null, - iconHeight: null - }) - }, - - _init: function () { - BI.IconButton.superclass._init.apply(this, arguments); - var o = this.options; - this.element.css({ - textAlign: 'center' - }); - this.icon = BI.createWidget({ - type: 'bi.icon', - width: o.iconWidth, - height: o.iconHeight - }); - if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", o.height + "px"); - BI.createWidget({ - type: "bi.default", - element: this, - items: [this.icon] - }) - } else { - BI.createWidget({ - element: this, - type: 'bi.center_adapt', - items: [this.icon] - }); - } - }, - - doClick: function () { - BI.IconButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconButton.EVENT_CHANGE, this); - } - } -}); -BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE"; -BI.shortcut("bi.icon_button", BI.IconButton);/** - * 图片的button - * - * Created by GUY on 2016/1/27. - * @class BI.ImageButton - * @extends BI.BasicButton - */ -BI.ImageButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-image-button", - src: "", - iconWidth: "100%", - iconHeight: "100%" - }) - }, - - _init: function () { - BI.ImageButton.superclass._init.apply(this, arguments); - var o = this.options; - this.image = BI.createWidget({ - type: "bi.img", - width: o.iconWidth, - height: o.iconHeight, - src: o.src - }); - if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) { - BI.createWidget({ - type: "bi.center_adapt", - element: this, - items: [this.image] - }) - } else { - BI.createWidget({ - type: "bi.adaptive", - element: this, - items: [this.image], - scrollable: false - }) - } - }, - - setWidth: function (w) { - BI.ImageButton.superclass.setWidth.apply(this, arguments); - this.options.width = w; - }, - - setHeight: function (h) { - BI.ImageButton.superclass.setHeight.apply(this, arguments); - this.options.height = h; - }, - - setImageWidth: function (w) { - this.image.setWidth(w); - }, - - setImageHeight: function (h) { - this.image.setHeight(h); - }, - - getImageWidth: function () { - return this.image.element.width(); - }, - - getImageHeight: function () { - return this.image.element.height(); - }, - - setSrc: function (src) { - this.options.src = src; - this.image.setSrc(src); - }, - - getSrc: function () { - return this.image.getSrc(); - }, - - doClick: function () { - BI.ImageButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.ImageButton.EVENT_CHANGE, this); - } - } -}); -BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; -BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { - - /** - * 文字类型的按钮 - * @class BI.Button - * @extends BI.BasicButton - * - * @cfg {JSON} options 配置属性 - * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 - */ - BI.Button = BI.inherit(BI.BasicButton, { - - _defaultConfig: function (props) { - var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + ' bi-button', - minWidth: (props.block === true || props.clear === true) ? 0 : 90, - shadow: props.clear !== true, - isShadowShowingOnSelected: true, - readonly: true, - iconClass: "", - level: 'common', - block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 - clear: false, //是否去掉边框和背景 - textAlign: "center", - whiteSpace: "nowrap", - forceCenter: false, - textWidth: null, - textHeight: null, - hgap: props.clear ? 0 : 10, - vgap: 0, - tgap: 0, - bgap: 0, - lgap: 0, - rgap: 0 - }) - }, - - _init: function () { - BI.Button.superclass._init.apply(this, arguments); - var o = this.options, self = this; - if (BI.isNumber(o.height) && !o.clear && !o.block) { - this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); - } else { - this.element.css({lineHeight: o.height + "px"}); - } - if (BI.isKey(o.iconClass)) { - this.icon = BI.createWidget({ - type: "bi.icon", - width: 18 - }); - this.text = BI.createWidget({ - type: "bi.label", - text: o.text, - value: o.value - }); - BI.createWidget({ - type: "bi.horizontal_auto", - cls: "button-" + o.level + " " + o.iconClass, - element: this, - hgap: o.hgap, - vgap: o.vgap, - tgap: o.tgap, - bgap: o.bgap, - lgap: o.lgap, - rgap: o.rgap, - items: [{ - type: "bi.horizontal", - items: [this.icon, this.text] - }] - }) - } else { - this.text = BI.createWidget({ - type: "bi.label", - cls: "button-" + o.level, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - forceCenter: o.forceCenter, - textWidth: o.textWidth, - textHeight: o.textHeight, - hgap: o.hgap, - vgap: o.vgap, - tgap: o.tgap, - bgap: o.bgap, - lgap: o.lgap, - rgap: o.rgap, - element: this, - text: o.text, - value: o.value - }); - } - if (o.block === true) { - this.element.addClass("block"); - } - if (o.clear === true) { - this.element.addClass("clear"); - } - if (o.minWidth > 0) { - this.element.css({"min-width": o.minWidth + "px"}); - } - }, - - doClick: function () { - BI.Button.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.Button.EVENT_CHANGE, this); - } - }, - - setText: function (text) { - BI.Button.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - setValue: function (text) { - BI.Button.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.text.setValue(text); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - destroy: function () { - BI.Button.superclass.destroy.apply(this, arguments); - } - }); - BI.shortcut('bi.button', BI.Button); - BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; -})(jQuery);/** - * guy - * 可以点击的一行文字 - * @class BI.TextButton - * @extends BI.BasicButton - * 文字button - */ -BI.TextButton = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-button", - textAlign: "center", - whiteSpace: "nowrap", - forceCenter: false, - textWidth: null, - textHeight: null, - hgap: 0, - lgap: 0, - rgap: 0, - text: "", - py: "" - }) - }, - - _init: function () { - BI.TextButton.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textWidth: o.textWidth, - textHeight: o.textHeight, - forceCenter: o.forceCenter, - width: o.width, - height: o.height, - hgap: o.hgap, - lgap: o.lgap, - rgap: o.rgap, - text: o.text, - value: o.value, - py: o.py - }); - }, - - doClick: function () { - BI.TextButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setText: function (text) { - BI.TextButton.superclass.setText.apply(this, arguments); - text = BI.isArray(text) ? text.join(",") : text; - this.text.setText(text); - }, - - setStyle: function (style) { - this.text.setStyle(style); - }, - - setValue: function (text) { - BI.TextButton.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - text = BI.isArray(text) ? text.join(",") : text; - this.text.setValue(text); - } - } -}); -BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_button", BI.TextButton);/** - * 带有一个占位 - * - * Created by GUY on 2015/9/11. - * @class BI.BlankIconIconTextItem - * @extends BI.BasicButton - */ -BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconIconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - var blank = BI.createWidget({ - type: "bi.layout", - width: o.blankWidth - }) - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon1 = BI.createWidget({ - type: "bi.icon_button", - cls: o.iconCls1, - forceNotSelected: true, - width: c.commonWidth - }); - this.icon2 = BI.createWidget({ - type: "bi.icon_button", - cls: o.iconCls2, - forceNotSelected: true, - width: c.commonWidth - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) - })))); - }, - - doClick: function () { - BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setSelected: function (b) { - BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments); - this.icon1.setSelected(b); - this.icon2.setSelected(b); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/** - * guy - * 一个占位符和两个icon和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/15. - * @class BI.BlankIconTextIconItem - * @extends BI.BasicButton - */ -BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-icon-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconTextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.layout", - width: o.blankWidth - }, icon1, this.text, { - type: "bi.layout", - width: c.commonWidth - }) - })))); - }, - - doClick: function () { - BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/** - * 带有一个占位 - * - * Created by GUY on 2015/9/11. - * @class BI.BlankIconTextItem - * @extends BI.BasicButton - */ -BI.BlankIconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", - logic: { - dynamic: false - }, - cls: "close-ha-font", - blankWidth: 0, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.BlankIconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - var blank = BI.createWidget({ - type: "bi.layout", - width: o.blankWidth - }) - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) - })))); - }, - - doClick: function () { - BI.BlankIconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/** - * guy - * 两个icon和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/9. - * @class BI.IconTextIconItem - * @extends BI.BasicButton - */ -BI.IconTextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-icon-item", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - var blank = BI.createWidget({ - type: "bi.layout", - width: c.commonWidth - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) - })))); - }, - - doClick: function () { - BI.IconTextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/** - * guy - * - * Created by GUY on 2015/9/9. - * @class BI.IconTextItem - * @extends BI.BasicButton - */ -BI.IconTextItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-item", - direction: BI.Direction.Left, - logic: { - dynamic: false - }, - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) - })))); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doClick: function () { - BI.IconTextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_item", BI.IconTextItem);/** - * - * 图标的button - * - * Created by GUY on 2015/9/9. - * @class BI.TextIconItem - * @extends BI.BasicButton - */ -BI.TextIconItem = BI.inherit(BI.BasicButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-icon-item", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextIconItem.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }); - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) - })))); - }, - - doClick: function () { - BI.TextIconItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - } -}); -BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_icon_item", BI.TextIconItem);/** - * guy - * 一个button和一行数 组成的一行listitem - * - * Created by GUY on 2015/9/9. - * @class BI.TextItem - * @extends BI.BasicButton - */ -BI.TextItem = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-item", - textAlign: "left", - whiteSpace: "nowrap", - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextItem.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, - height: o.height, - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py - }); - }, - - doClick: function () { - BI.TextItem.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_item", BI.TextItem);/** - * guy - * Created by GUY on 2015/9/9. - * @class BI.IconTextIconNode - * @extends BI.NodeButton - */ -BI.IconTextIconNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-icon-node", - logic: { - dynamic: false - }, - iconCls1: "close-ha-font", - iconCls2: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextIconNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - - var icon1 = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls1, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - var blank = BI.createWidget({ - type: "bi.layout", - width: c.commonWidth - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.center_adapt", - cls: o.iconCls2, - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }, - top: 0, - bottom: 0, - right: 0 - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) - })))); - }, - - doClick: function () { - BI.IconTextIconNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/** - * guy - * Created by GUY on 2015/9/9. - * @class BI.IconTextNode - * @extends BI.NodeButton - */ -BI.IconTextNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-text-node", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.IconTextNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }) - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) - })))); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doClick: function () { - BI.IconTextNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - } -}); -BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_text_node", BI.IconTextNode);/** - * Created by GUY on 2015/9/9. - * @class BI.TextIconNode - * @extends BI.NodeButton - */ -BI.TextIconNode = BI.inherit(BI.NodeButton, { - _const: { - commonWidth: 25 - }, - - _defaultConfig: function () { - var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-icon-node", - logic: { - dynamic: false - }, - cls: "close-ha-font", - iconHeight: null, - iconWidth: null, - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextIconNode.superclass._init.apply(this, arguments); - var o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - height: o.height - }) - this.icon = BI.createWidget({ - type: "bi.center_adapt", - width: c.commonWidth, - items: [{ - el: { - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - } - }] - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) - })))); - }, - - doClick: function () { - BI.TextIconNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - } -}); -BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_icon_node", BI.TextIconNode);/** - * guy - * - * Created by GUY on 2015/9/9. - * @class BI.TextNode - * @extends BI.NodeButton - */ -BI.TextNode = BI.inherit(BI.NodeButton, { - - _defaultConfig: function () { - var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-node", - textAlign: "left", - whiteSpace: "nowrap", - textHgap: 0, - textVgap: 0, - textLgap: 0, - textRgap: 0 - }) - }, - _init: function () { - BI.TextNode.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, - height: o.height, - hgap: o.textHgap, - vgap: o.textVgap, - lgap: o.textLgap, - rgap: o.textRgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py - }); - }, - - doClick: function () { - BI.TextNode.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this); - } - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - setValue: function () { - if (!this.isReadOnly()) { - this.text.setValue.apply(this.text, arguments); - } - }, - - getValue: function () { - return this.text.getValue(); - }, - - setText: function () { - this.text.setText.apply(this.text, arguments); - }, - - getText: function () { - return this.text.getText(); - } -}); -BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_node", BI.TextNode);/** - * - * Created by GUY on 2016/1/15. - * @class BI.CodeEditor - * @extends BI.Single - */ -BI.CodeEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-code-editor bi-card', - value: '', - watermark: "", - lineHeight: 2, - readOnly: false, - //参数显示值构造函数 - paramFormatter: function (v) { - return v; - } - }); - }, - _init: function () { - BI.CodeEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.editor = CodeMirror(this.element[0], { - textWrapping: true, - lineWrapping: true, - lineNumbers: false, - readOnly: o.readOnly - }); - o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); - this.editor.on("change", function (cm, change) { - BI.nextTick(function () { - self.fireEvent(BI.CodeEditor.EVENT_CHANGE) - }); - }); - - this.editor.on("focus", function () { - self.watermark.setVisible(false); - self.fireEvent(BI.CodeEditor.EVENT_FOCUS); - }); - - this.editor.on("blur", function () { - self.watermark.setVisible(BI.isEmptyString(self.getValue())); - self.fireEvent(BI.CodeEditor.EVENT_BLUR); - }); - - // this.editor.on("blur", function () { - // self.editor.execCommand("goLineEnd"); - // }); - - //水印 - this.watermark = BI.createWidget({ - type: "bi.label", - text: o.watermark, - cls: "bi-water-mark", - whiteSpace: "nowrap", - textAlign: "left" - }); - this.watermark.element.bind( - "mousedown", function (e) { - self.insertString(""); - self.editor.focus(); - e.stopEvent(); - } - ); - this.watermark.element.bind("click", function (e) { - self.editor.focus(); - e.stopEvent(); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.watermark, - top: 0, - left: 5 - }] - }); - - if (BI.isKey(o.value)) { - BI.nextTick(function () { - self.setValue(o.value); - }); - } - }, - - _setEnable: function (b) { - BI.CodeEditor.superclass._setEnable.apply(this, arguments); - this.editor.setOption("readOnly", b === true ? false : "nocursor") - }, - - _checkWaterMark: function () { - var o = this.options; - if (BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - insertParam: function (param) { - var value = param; - param = this.options.paramFormatter(param); - var from = this.editor.getCursor(); - this.editor.replaceSelection(param); - var to = this.editor.getCursor(); - var options = {className: 'param', atomic: true}; - if (BI.isNotNull(param.match(/^<!.*!>$/))) { - options.className = 'error-param'; - } - options.value = value; - this.editor.markText(from, to, options); - this.editor.replaceSelection(" "); - this.editor.focus(); - }, - - insertString: function (str) { - this.editor.replaceSelection(str); - this.editor.focus(); - }, - - getValue: function () { - return this.editor.getValue("\n", function (line) { - var rawText = line.text, value = line.text, num = 0; - value.text = rawText; - _.forEach(line.markedSpans, function (i, ms) { - switch (i.marker.className) { - case "param": - case "error-param": - var fieldNameLength = i.to - i.from; - value = value.substr(0, i.from + num) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length); - //加上${}的偏移 - num += 3; - //加上实际值和显示值的长度差的偏移 - num += (i.marker.value.length - fieldNameLength); - break; - } - }); - return value; - }); - }, - - _analyzeContent: function (v) { - var regx = /\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g; - return v.match(regx); - }, - - setValue: function (v) { - var self = this, result; - this.refresh(); - self.editor.setValue(""); - result = this._analyzeContent(v || ""); - BI.each(result, function (i, item) { - var fieldRegx = /\$[\{][^\}]*[\}]/; - var str = item.match(fieldRegx); - if (BI.isNotEmptyArray(str)) { - self.insertParam(str[0].substring(2, item.length - 1)); - } else { - self.insertString(item); - } - }); - this._checkWaterMark(); - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.getInputField().blur(); - }, - - setStyle: function (style) { - this.style = style; - this.element.css(style); - }, - - getStyle: function () { - return this.style; - }, - - refresh: function () { - var self = this; - BI.nextTick(function () { - self.editor.refresh(); - }); - } -}); -BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.code_editor", BI.CodeEditor);/** - * Created by GUY on 2015/4/15. - * @class BI.Editor - * @extends BI.Single - */ -BI.Editor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - //title,warningTitle这两个属性没用 - tipType: "warning", - inputType: "text", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: false, - watermark: "", - errorText: "" - }) - }, - - _init: function () { - BI.Editor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = this.addWidget(BI.createWidget({ - type: "bi.input", - element: "<input type='" + o.inputType + "'/>", - root: true, - watermark: o.watermark, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank - })); - this.editor.element.css({ - "width": "100%", - "height": "100%", - "border": "none", - "outline": "none", - "padding": "0", - "margin": "0" - }); - if (BI.isKey(this.options.watermark)) { - this.watermark = BI.createWidget({ - type: "bi.label", - cls: "bi-water-mark", - text: this.options.watermark, - forceCenter: true, - height: o.height - 2 * (o.vgap + o.tgap), - whiteSpace: "nowrap", - textAlign: "left" - }); - this.watermark.element.bind({ - mousedown: function (e) { - if (self.isEnabled()) { - self.editor.isEditing() || self.editor.focus(); - } else { - self.editor.isEditing() && self.editor.blur(); - } - e.stopEvent(); - } - }); - this.watermark.element.bind("click", function (e) { - if (self.isEnabled()) { - self.editor.isEditing() || self.editor.focus(); - } else { - self.editor.isEditing() && self.editor.blur(); - } - e.stopEvent(); - }); - this.watermark.element.css({ - position: "absolute", - left: "3px", - right: "3px", - top: "0px", - bottom: "0px" - }); - } - var items = [{ - el: { - type: "bi.default", - items: this.watermark ? [this.editor, this.watermark] : [this.editor] - }, - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }]; - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: items - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Input.EVENT_FOCUS, function () { - self._checkError(); - self.element.addClass("bi-editor-focus"); - self.fireEvent(BI.Editor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Input.EVENT_BLUR, function () { - self.setErrorVisible(false); - self.element.removeClass("bi-editor-focus"); - self.fireEvent(BI.Editor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Input.EVENT_CLICK, function () { - self.fireEvent(BI.Editor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Input.EVENT_CHANGE, function () { - self.fireEvent(BI.Editor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); - }); - this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) { - self.watermark && self.watermark.invisible(); - }); - - this.editor.on(BI.Input.EVENT_VALID, function () { - self._checkWaterMark(); - self.setErrorVisible(false); - self.fireEvent(BI.Editor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Input.EVENT_ERROR, function () { - self._checkWaterMark(); - self.fireEvent(BI.Editor.EVENT_ERROR, arguments); - self.setErrorVisible(self.isEditing()); - }); - this.editor.on(BI.Input.EVENT_RESTRICT, function () { - self._checkWaterMark(); - var tip = self.setErrorVisible(true); - tip && tip.element.fadeOut(100, function () { - tip.element.fadeIn(100); - }); - self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Input.EVENT_EMPTY, function () { - self._checkWaterMark(); - self.fireEvent(BI.Editor.EVENT_EMPTY, arguments); - }); - this.editor.on(BI.Input.EVENT_ENTER, function () { - self.fireEvent(BI.Editor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Input.EVENT_SPACE, function () { - self.fireEvent(BI.Editor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Input.EVENT_BACKSPACE, function () { - self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments); - }); - this.editor.on(BI.Input.EVENT_REMOVE, function () { - self.fireEvent(BI.Editor.EVENT_REMOVE, arguments); - }); - this.editor.on(BI.Input.EVENT_START, function () { - self.fireEvent(BI.Editor.EVENT_START, arguments); - }); - this.editor.on(BI.Input.EVENT_PAUSE, function () { - self.fireEvent(BI.Editor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Input.EVENT_STOP, function () { - self.fireEvent(BI.Editor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Input.EVENT_CONFIRM, function () { - self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments); - }); - this.element.click(function (e) { - e.stopPropagation(); - return false; - }); - if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) { - this.setValue(this.options.value); - } else { - this._checkWaterMark(); - } - }, - - _checkToolTip: function () { - var o = this.options; - var errorText = o.errorText; - if (BI.isFunction(errorText)) { - errorText = errorText(this.editor.getValue()); - } - if (BI.isKey(errorText)) { - if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) { - this.setTitle(""); - } else { - this.setTitle(errorText); - } - } - }, - - _checkError: function () { - this.setErrorVisible(this.isEnabled() && !this.isValid()); - this._checkToolTip(); - }, - - _checkWaterMark: function () { - var o = this.options; - if (!this.disabledWaterMark && this.editor.getValue() === "" && BI.isKey(o.watermark)) { - this.watermark && this.watermark.visible(); - } else { - this.watermark && this.watermark.invisible(); - } - }, - - setErrorText: function (text) { - this.options.errorText = text; - }, - - getErrorText: function () { - return this.options.errorText; - }, - - setErrorVisible: function (b) { - var o = this.options; - var errorText = o.errorText; - if (BI.isFunction(errorText)) { - errorText = errorText(this.editor.getValue()); - } - if (!this.disabledError && BI.isKey(errorText)) { - BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this); - this._checkToolTip(); - return BI.Bubbles.get(this.getName()); - } - }, - - disableError: function () { - this.disabledError = true; - this._checkError(); - }, - - enableError: function () { - this.disabledError = false; - this._checkError(); - }, - - disableWaterMark: function () { - this.disabledWaterMark = true; - this._checkWaterMark(); - }, - - enableWaterMark: function () { - this.disabledWaterMark = false; - this._checkWaterMark(); - }, - - focus: function () { - this.element.addClass("text-editor-focus"); - this.editor.focus(); - }, - - blur: function () { - this.element.removeClass("text-editor-focus"); - this.editor.blur(); - }, - - selectAll: function () { - this.editor.selectAll(); - }, - - onKeyDown: function (k) { - this.editor.onKeyDown(k); - }, - - setValue: function (v) { - BI.Editor.superclass.setValue.apply(this, arguments); - this.editor.setValue(v); - this._checkError(); - this._checkWaterMark(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - resetLastValidValue: function () { - this.editor.resetLastValidValue(); - }, - - getValue: function () { - if (!this.isValid()) { - return BI.trim(this.editor.getLastValidValue()); - } - return BI.trim(this.editor.getValue()); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.Editor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.Editor.EVENT_BLUR = "EVENT_BLUR"; -BI.Editor.EVENT_CLICK = "EVENT_CLICK"; -BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.Editor.EVENT_SPACE = "EVENT_SPACE"; -BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.Editor.EVENT_START = "EVENT_START"; -BI.Editor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Editor.EVENT_STOP = "EVENT_STOP"; -BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.Editor.EVENT_VALID = "EVENT_VALID"; -BI.Editor.EVENT_ERROR = "EVENT_ERROR"; -BI.Editor.EVENT_ENTER = "EVENT_ENTER"; -BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.Editor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.Editor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.editor", BI.Editor);/** - * 多文件 - * - * Created by GUY on 2016/4/13. - * @class BI.MultifileEditor - * @extends BI.Single - * @abstract - */ -BI.MultifileEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-multifile-editor", - multiple: false, - maxSize: -1,//1024 * 1024 - accept: "", - url: "" - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.MultifileEditor.superclass._init.apply(this, arguments); - this.file = BI.createWidget({ - type: "bi.file", - cls: "multifile-editor", - width: "100%", - height: "100%", - name: o.name, - url: o.url, - multiple: o.multiple, - accept: o.accept, - maxSize: o.maxSize - }); - this.file.on(BI.File.EVENT_CHANGE, function () { - self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments); - }); - this.file.on(BI.File.EVENT_UPLOADSTART, function () { - self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments); - }); - this.file.on(BI.File.EVENT_ERROR, function () { - self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments); - }); - this.file.on(BI.File.EVENT_PROGRESS, function () { - self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments); - }); - this.file.on(BI.File.EVENT_UPLOADED, function () { - self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments); - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.adaptive", - scrollable: false, - items: [this.file] - }, - top: 0, - right: 0, - left: 0, - bottom: 0 - }] - }); - }, - - select: function () { - this.file.select(); - }, - - getValue: function () { - return this.file.getValue(); - }, - - upload: function () { - this.file.upload(); - }, - - reset: function () { - this.file.reset(); - } -}); -BI.MultifileEditor.EVENT_CHANGE = "MultifileEditor.EVENT_CHANGE"; -BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART"; -BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR"; -BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS"; -BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED"; -BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/** - * - * Created by GUY on 2016/1/18. - * @class BI.TextAreaEditor - * @extends BI.Single - */ -BI.TextAreaEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), { - baseCls: 'bi-textarea-editor bi-card', - value: '' - }); - }, - _init: function () { - BI.TextAreaEditor.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.content = BI.createWidget({ - type: "bi.layout", - tagName: "textarea", - width: "100%", - height: "100%", - cls: "bi-textarea textarea-editor-content display-block" - }); - this.content.element.css({"resize": "none"}); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: { - type: "bi.adaptive", - items: [this.content] - }, - left: 0, - right: 3, - top: 0, - bottom: 5 - }] - }); - - this.content.element.on("input propertychange", function (e) { - self._checkWaterMark(); - self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE); - }); - - this.content.element.focus(function () { - if (self.isValid()) { - self._focus(); - self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); - } - $(document).bind("mousedown." + self.getName(), function (e) { - if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { - $(document).unbind("mousedown." + self.getName()); - self.content.element.blur(); - } - }); - }); - this.content.element.blur(function () { - if (self.isValid()) { - self._blur(); - self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); - } - $(document).unbind("mousedown." + self.getName()); - }); - if (BI.isKey(o.value)) { - self.setValue(o.value); - } - if (BI.isNotNull(o.style)) { - self.setValue(o.style); - } - this._checkWaterMark(); - }, - - _checkWaterMark: function () { - var self = this, o = this.options; - var val = this.getValue(); - if (BI.isNotEmptyString(val)) { - this.watermark && this.watermark.destroy(); - this.watermark = null; - } else { - if (BI.isNotEmptyString(o.watermark)) { - if (!this.watermark) { - this.watermark = BI.createWidget({ - type: "bi.text_button", - cls: "bi-water-mark", - textAlign: "left", - height: 30, - text: o.watermark, - invalid: o.invalid, - disabled: o.disabled - }); - this.watermark.on(BI.TextButton.EVENT_CHANGE, function () { - self.focus(); - }); - BI.createWidget({ - type: 'bi.absolute', - element: this, - items: [{ - el: this.watermark, - left: 0, - top: 0, - right: 0 - }] - }) - } else { - this.watermark.setText(o.watermark); - this.watermark.setValid(!o.invalid); - this.watermark.setEnable(!o.disabled); - } - } - } - }, - - _focus: function () { - this.content.element.addClass("textarea-editor-focus"); - this._checkWaterMark(); - }, - - _blur: function () { - this.content.element.removeClass("textarea-editor-focus"); - this._checkWaterMark(); - }, - - focus: function () { - this._focus(); - this.content.element.focus(); - }, - - blur: function () { - this._blur(); - this.content.element.blur(); - }, - - getValue: function () { - return this.content.element.val(); - }, - - setValue: function (value) { - this.content.element.val(value); - this._checkWaterMark(); - }, - - setStyle: function (style) { - this.style = style; - this.element.css(style); - this.content.element.css(BI.extend({}, style, { - color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor) - })) - }, - - getStyle: function () { - return this.style; - }, - - _setValid: function (b) { - BI.TextAreaEditor.superclass._setValid.apply(this, arguments); - // this.content.setValid(b); - // this.watermark && this.watermark.setValid(b); - } -}); -BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/** - * guy 图标 - * @class BI.Icon - * @extends BI.Single - */ -BI.Icon = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - tagName: "i", - baseCls: (conf.baseCls || "") + " x-icon b-font horizon-center display-block" - }) - }, - _init: function () { - BI.Icon.superclass._init.apply(this, arguments); - if (BI.isIE9Below()) { - this.element.addClass("hack"); - } - } -}); -BI.shortcut("bi.icon", BI.Icon);/** - * @class BI.Iframe - * @extends BI.Single - * @abstract - * Created by GameJian on 2016/3/2. - */ -BI.Iframe = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-iframe", - src: "", - width: "100%", - height: "100%" - }) - }, - - _init: function () { - var o = this.options; - this.options.element = $("<iframe frameborder='0' src='" + o.src + "'>"); - BI.Iframe.superclass._init.apply(this, arguments); - }, - - setSrc: function (src) { - this.options.src = src; - this.element.attr("src", src); - }, - - getSrc: function () { - return this.options.src; - }, - - setName: function (name) { - this.options.name = name; - this.element.attr("name", name); - }, - - getName: function () { - return this.options.name; - }, - - getWidth: function () { - return this.options.width - }, - - getHeight: function () { - return this.options.height - } -}); - -BI.shortcut("bi.iframe", BI.Iframe);/** - * ͼƬ - * - * Created by GUY on 2016/1/26. - * @class BI.Img - * @extends BI.Single - * @abstract - */ -BI.Img = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Img.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-img display-block", - src: "", - width: "100%", - height: "100%" - }) - }, - - _init: function () { - var o = this.options; - this.options.element = $("<img src='" + o.src + "'>"); - BI.Img.superclass._init.apply(this, arguments); - }, - - setSrc: function (src) { - this.options.src = src; - this.element.attr("src", src); - }, - - getSrc: function () { - return this.options.src; - } -}); - -BI.shortcut("bi.img", BI.Img); -/** - * guy - * @extends BI.Single - * @type {*|void|Object} - */ -BI.Checkbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - var conf = BI.Checkbox.superclass._defaultConfig.apply(this,arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-checkbox check-box-icon", - selected: false, - handler: BI.emptyFn, - width: 16, - height: 16, - iconWidth: 16, - iconHeight: 16 - }) - }, - - _init : function() { - BI.Checkbox.superclass._init.apply(this, arguments); - }, - - doClick: function(){ - BI.Checkbox.superclass.doClick.apply(this, arguments); - if(this.isValid()){ - this.fireEvent(BI.Checkbox.EVENT_CHANGE); - } - } -}); -BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE"; - -BI.shortcut("bi.checkbox", BI.Checkbox);/** - * 文件 - * - * Created by GUY on 2016/1/27. - * @class BI.File - * @extends BI.Single - * @abstract - */ -(function () { - - /** - * @description normalize input.files. create if not present, add item method if not present - * @param Object generated wrap object - * @return Object the wrap object itself - */ - var F = (function (item) { - return function (input) { - var files = input.files || [input]; - if (!files.item) { - files.item = item; - } - return files; - }; - })(function (i) { - return this[i]; - }); - - var event = { - - /** - * @description add an event via addEventListener or attachEvent - * @param DOMElement the element to add event - * @param String event name without "on" (e.g. "mouseover") - * @param Function the callback to associate as event - * @return Object noswfupload.event - */ - add: document.addEventListener ? - function (node, name, callback) { - node.addEventListener(name, callback, false); - return this; - } : - function (node, name, callback) { - node.attachEvent("on" + name, callback); - return this; - }, - - /** - * @description remove an event via removeEventListener or detachEvent - * @param DOMElement the element to remove event - * @param String event name without "on" (e.g. "mouseover") - * @param Function the callback associated as event - * @return Object noswfupload.event - */ - del: document.removeEventListener ? - function (node, name, callback) { - node.removeEventListener(name, callback, false); - return this; - } : - function (node, name, callback) { - node.detachEvent("on" + name, callback); - return this; - }, - - /** - * @description to block event propagation and prevent event default - * @param void generated event or undefined - * @return Boolean false - */ - stop: function (e) { - if (!e) { - if (self.event) { - event.returnValue = !(event.cancelBubble = true); - } - } else { - e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; - e.preventDefault ? e.preventDefault() : e.returnValue = false; - } - ; - return false; - } - }; - - var sendFile = (function (toString) { - var multipart = function (boundary, name, file) { - return "--".concat( - boundary, CRLF, - 'Content-Disposition: form-data; name="', name, '"; filename="', BI.cjkEncode(file.fileName), '"', CRLF, - "Content-Type: application/octet-stream", CRLF, - CRLF, - file.getAsBinary(), CRLF, - "--", boundary, "--", CRLF - ); - }, - isFunction = function (Function) { - return toString.call(Function) === "[object Function]"; - }, - split = "onabort.onerror.onloadstart.onprogress".split("."), - length = split.length, - CRLF = "\r\n", - xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), - sendFile; - - // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work) - if (xhr.upload || xhr.sendAsBinary) { - sendFile = function (handler, maxSize, width, height) { - if (-1 < maxSize && maxSize < handler.file.fileSize) { - if (isFunction(handler.onerror)) { - handler.onerror(); - } - return; - } - for (var - xhr = new XMLHttpRequest, - upload = xhr.upload || { - addEventListener: function (event, callback) { - this["on" + event] = callback - } - }, - i = 0; - i < length; - i++ - ) { - upload.addEventListener( - split[i].substring(2), - (function (event) { - return function (rpe) { - if (isFunction(handler[event])) { - handler[event](rpe, xhr); - } - }; - })(split[i]), - false - ); - } - upload.addEventListener( - "load", - function (rpe) { - if (handler.onreadystatechange === false) { - if (isFunction(handler.onload)) { - handler.onload(rpe, xhr); - } - } else { - setTimeout(function () { - if (xhr.readyState === 4) { - if (isFunction(handler.onload)) { - handler.onload(rpe, xhr); - } - } else { - setTimeout(arguments.callee, 15); - } - }, 15); - } - }, - false - ); - xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true); - if (!xhr.upload) { - var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true}; - rpe.interval = setInterval(function () { - rpe.loaded += 1024 / 4; - if (rpe.total <= rpe.loaded) { - rpe.loaded = rpe.total; - } - upload.onprogress(rpe); - }, 100); - xhr.onabort = function () { - upload.onabort({}); - }; - xhr.onerror = function () { - upload.onerror({}); - }; - xhr.onreadystatechange = function () { - switch (xhr.readyState) { - case 2: - case 3: - if (rpe.total <= rpe.loaded) - rpe.loaded = rpe.total; - upload.onprogress(rpe); - break; - case 4: - clearInterval(rpe.interval); - rpe.interval = 0; - rpe.loaded = rpe.total; - upload.onprogress(rpe); - if (199 < xhr.status && xhr.status < 400) { - upload["onload"]({}); - var attachO = BI.jsonDecode(xhr.responseText); - attachO.filename = handler.file.fileName; - if (handler.file.type.indexOf('image') != -1) { - attachO.attach_type = "image"; - } - handler.attach_array.push(attachO); - } else { - upload["onerror"]({}); - } - break; - } - }; - upload.onloadstart(rpe); - } else { - xhr.onreadystatechange = function () { - switch (xhr.readyState) { - case 4: - var attachO = BI.jsonDecode(xhr.responseText); - if (handler.file.type.indexOf('image') != -1) { - attachO.attach_type = "image"; - } - attachO.filename = handler.file.fileName; - if (handler.maxlength == 1) { - handler.attach_array[0] = attachO; - // handler.attach_array.push(attachO); - } else { - handler.attach_array.push(attachO); - } - break; - } - } - } - var boundary = "AjaxUploadBoundary" + (new Date).getTime(); - xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary); - if (handler.file.getAsBinary) { - xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file)); - } else { - xhr.setRequestHeader("Content-Type", "multipart/form-data"); -// xhr.setRequestHeader("X-Name", handler.name); -// xhr.setRequestHeader("X-File-Name", handler.file.fileName); - var form = new FormData(); - form.append("FileData", handler.file); - xhr.send(form); - } - return handler; - }; - } - // Internet Explorer, Opera, others - else { - sendFile = function (handler, maxSize, width, height) { - var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), - rpe = { - loaded: 1, total: 100, simulation: true, interval: setInterval(function () { - if (rpe.loaded < rpe.total) - ++rpe.loaded; - if (isFunction(handler.onprogress)) - handler.onprogress(rpe, {}); - }, 100) - }, - onload = function () { - iframe.onreadystatechange = iframe.onload = iframe.onerror = null; - form.parentNode.removeChild(form); - form = null; - clearInterval(rpe.interval); - //rpe.loaded = rpe.total; - try { - var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML; - var attachO = BI.jsonDecode(responseText); - if (handler.file.type.indexOf('image') != -1) { - attachO.attach_type = "image"; - } - - //attachO.fileSize = responseText.length; - attachO.filename = BI.cjkDecode(handler.file.fileName); - if (handler.maxlength == 1) { - handler.attach_array[0] = attachO; - } else { - handler.attach_array.push(attachO); - } - } catch (e) { - if (isFunction(handler.onerror)) - handler.onerror(rpe, event || window.event); - } - if (isFunction(handler.onload)) - handler.onload(rpe, {responseText: responseText}); - }, - target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); - try { // IE < 8 does not accept enctype attribute ... - var form = document.createElement('<form enctype="multipart/form-data"></form>'), - iframe = handler.iframe || (handler.iframe = document.createElement('<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>')); - } catch (e) { - var form = document.createElement('form'), - iframe = handler.iframe || (handler.iframe = document.createElement("iframe")); - form.setAttribute("enctype", "multipart/form-data"); - iframe.setAttribute("name", iframe.id = target); - iframe.setAttribute("src", url); - } - iframe.style.position = "absolute"; - iframe.style.left = iframe.style.top = "-10000px"; - iframe.onload = onload; - iframe.onerror = function (event) { - if (isFunction(handler.onerror)) { - handler.onerror(rpe, event || window.event); - } - }; - iframe.onreadystatechange = function () { - if (/loaded|complete/i.test(iframe.readyState)) { - onload(); - - //wei : todo,将附件信息放到handler.attach - } - else if (isFunction(handler.onloadprogress)) { - if (rpe.loaded < rpe.total) { - ++rpe.loaded; - } - handler.onloadprogress(rpe, { - readyState: { - loading: 2, - interactive: 3, - loaded: 4, - complete: 4 - }[iframe.readyState] || 1 - }); - } - }; - form.setAttribute("action", handler.url); - form.setAttribute("target", iframe.id); - form.setAttribute("method", "post"); - form.appendChild(handler.file); - form.style.display = "none"; - if (isFunction(handler.onloadstart)) { - handler.onloadstart(rpe, {}); - } - with (document.body || document.documentElement) { - appendChild(iframe); - appendChild(form); - form.submit(); - } - ; - return handler; - }; - } - xhr = null; - return sendFile; - })(Object.prototype.toString); - - var sendFiles = function (handler, maxSize, width, height) { - - var length = handler.files.length, - i = 0, - onload = handler.onload, - onloadstart = handler.onloadstart; - handler.current = 0; - handler.total = 0; - handler.sent = 0; - while (handler.current < length) { - handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size); - handler.current++; - } - handler.current = 0; - if (length && handler.files[0].fileSize !== -1) { - handler.file = handler.files[handler.current]; - - sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { - handler.onloadstart = null; - handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size); - if (++handler.current < length) { - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = arguments.callee; - } else if (onload) { - handler.onloadstart = onloadstart; - handler.onload = onload; - handler.onload(rpe, xhr); - } - }; - } else if (length) { - handler.total = length * 100; - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { - var callee = arguments.callee; - handler.onloadstart = null; - handler.sent += 100; - if (++handler.current < length) { - if (/\b(chrome|safari)\b/i.test(navigator.userAgent)) { - handler.iframe.parentNode.removeChild(handler.iframe); - handler.iframe = null; - } - setTimeout(function () { - handler.file = handler.files[handler.current]; - sendFile(handler, maxSize, width, height).onload = callee; - }, 15); - } else if (onload) { - setTimeout(function () { - handler.iframe.parentNode.removeChild(handler.iframe); - handler.iframe = null; - handler.onloadstart = onloadstart; - handler.onload = onload; - handler.onload(rpe, xhr); - }, 15); - } - }; - } - return handler; - }; - - BI.File = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.File.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-file display-block", - element: "<input type='file'>", - name: "", - url: "", - multiple: true, - accept: "", /**'*.jpg; *.zip'**/ - maxSize: -1 //1024 * 1024 - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.File.superclass._init.apply(this, arguments); - if (o.multiple === true) { - this.element.attr("multiple", "multiple"); - } - this.element.attr("name", o.name || this.getName()); - - BI.nextTick(function () { - // create the noswfupload.wrap Object - // wrap.maxSize 文件大小限制 - // wrap.maxlength 文件个数限制 - var _wrap = self.wrap = self._wrap(self.element[0], o.maxSize); - // fileType could contain whatever text but filter checks *.{extension} - // if present - - // handlers - - _wrap.onloadstart = function (rpe, xhr) { - //BI.Msg.toast("loadstart"); - self.fireEvent(BI.File.EVENT_UPLOADSTART); - }; - - _wrap.onprogress = function (rpe, xhr) { - //BI.Msg.toast("onprogress"); - // percent for each bar - - // fileSize is -1 only if browser does not support file info access - // this if splits recent browsers from others - if (this.file.fileSize !== -1) { - // simulation property indicates when the progress event is fake - if (rpe.simulation) { - - } else { - - } - } else { - // if fileSIze is -1 browser is using an iframe because it does - // not support - // files sent via Ajax (XMLHttpRequest) - // We can still show some information - } - self.fireEvent(BI.File.EVENT_PROGRESS, { - file: this.file, - total: rpe.total, - loaded: rpe.loaded, - simulation: rpe.simulation - }); - }; - - // generated if there is something wrong during upload - _wrap.onerror = function () { - // just inform the user something was wrong - self.fireEvent(BI.File.EVENT_ERROR); - }; - - // generated when every file has been sent (one or more, it does not - // matter) - _wrap.onload = function (rpe, xhr) { - var self_ = this; - // just show everything is fine ... - // ... and after a second reset the component - setTimeout(function () { - self_.clean(); // remove files from list - self_.hide(); // hide progress bars and enable input file - - //BI.Msg.toast("onload"); - self.fireEvent(BI.File.EVENT_UPLOADED); - // enable again the submit button/element - }, 1000); - }; - _wrap.url = o.url ? o.url : BI.servletURL - + '?op=fr_attach&cmd=ah_upload'; - _wrap.fileType = o.accept; //文件类型限制 - _wrap.attach_array = []; - _wrap.attach_names = []; - _wrap.attachNum = 0; - }); - }, - - _events: function (wrap) { - var self = this; - event.add(wrap.dom.input, "change", function () { - event.del(wrap.dom.input, "change", arguments.callee); - for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) { - var item = files.item(i); - var tempFile = item.value || item.name; - var value = item.fileName || (item.fileName = tempFile.split("\\").pop()), - ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown", - size = item.fileSize || item.size; - if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { - //文件类型不支持 - BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); - self.fireEvent(BI.File.EVENT_ERROR, { - errorType: 0, - file: item - }); - } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { - //文件大小不支持 - BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); - self.fireEvent(BI.File.EVENT_ERROR, { - errorType: 1, - file: item - }); - } else { - wrap.files.unshift(item); - //BI.Msg.toast(value); - self.fireEvent(BI.File.EVENT_CHANGE, { - file: item - }); - } - } - input.value = ""; - wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input); - wrap.dom.input = input; - event.add(wrap.dom.input, "change", arguments.callee); - }); - return wrap; - }, - - _wrap: function () { - var self = this, o = this.options; - // be sure input accept multiple files - var input = this.element[0]; - if (o.multiple === true) { - this.element.attr("multiple", "multiple"); - } - input.value = ""; - - // wrap Object - return this._events({ - - // DOM namespace - dom: { - input: input, // input file - disabled: false // internal use, checks input file state - }, - name: input.name, // name to send for each file ($_FILES[{name}] in the server) - // maxSize is the maximum amount of bytes for each file - maxSize: o.maxSize ? o.maxSize >> 0 : -1, - files: [], // file list - - // remove every file from the noswfupload component - clean: function () { - this.files = []; - }, - - // upload one file a time (which make progress possible rather than all files in one shot) - // the handler is an object injected into the wrap one, could be the wrap itself or - // something like {onload:function(){alert("OK")},onerror:function(){alert("Error")}, etc ...} - upload: function (handler) { - if (handler) { - for (var key in handler) { - this[key] = handler[key]; - } - } - sendFiles(this, this.maxSize); - return this; - }, - - // hide progress bar (total + current) and enable files selection - hide: function () { - if (this.dom.disabled) { - this.dom.disabled = false; - this.dom.input.removeAttribute("disabled"); - } - }, - - // show progress bar and disable file selection (used during upload) - // total and current are pixels used to style bars - // totalProp and currentProp are properties to change, "height" by default - show: function (total, current, totalProp, currentProp) { - if (!this.dom.disabled) { - this.dom.disabled = true; - this.dom.input.setAttribute("disabled", "disabled"); - } - } - }); - }, - - select: function () { - $(this.wrap.dom.input).click(); - }, - - upload: function (handler) { - this.wrap.upload(handler); - }, - - getValue: function () { - return this.wrap.attach_array; - }, - - reset: function () { - this.wrap.attach_array = []; - this.wrap.attach_names = []; - this.wrap.attachNum = 0; - }, - - _setEnable: function (enable) { - BI.File.superclass._setEnable.apply(this, arguments); - if (enable === true) { - this.element.attr("disabled", "disabled"); - } else { - this.element.removeAttr("disabled"); - } - } - }); - BI.File.EVENT_CHANGE = "BI.File.EVENT_CHANGE"; - BI.File.EVENT_UPLOADSTART = "EVENT_UPLOADSTART"; - BI.File.EVENT_ERROR = "EVENT_ERROR"; - BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; - BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; - BI.shortcut("bi.file", BI.File); -})();/** - * guy - * @class BI.Input 一个button和一行数 组成的一行listitem - * @extends BI.Single - * @type {*|void|Object} - */ -BI.Input = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Input.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-input display-block", - element: "<input/>", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn,//按确定键能否退出编辑 - allowBlank: false - }) - }, - - _init: function () { - BI.Input.superclass._init.apply(this, arguments); - var self = this; - var ctrlKey = false; - var inputEventValid = false; - var _keydown = BI.debounce(function (keyCode) { - self.onKeyDown(keyCode, ctrlKey); - self._keydown_ = false; - }, 300); - var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, true); - this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, true); - this.element - .keydown(function (e) { - inputEventValid = false; - ctrlKey = e.ctrlKey; - self.fireEvent(BI.Input.EVENT_QUICK_DOWN); - }) - .keyup(function (e) { - if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { - self._keydown_ = true; - _keydown(e.keyCode); - } - }) - .on("input propertychange", function (e) { - inputEventValid = true; - self._keydown_ = true; - _keydown(e.keyCode); - }) - .click(function (e) { - e.stopPropagation(); - _clk(); - }) - .mousedown(function (e) { - self.element.val(self.element.val()); - }) - .focusout(function (e) { - self._blurDebounce(); - }); - }, - - _focus: function () { - this.element.addClass("bi-input-focus"); - this._checkValidationOnValueChange(); - this._isEditing = true; - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this.fireEvent(BI.Input.EVENT_FOCUS); - }, - - _blur: function () { - var self = this; - if (self._keydown_ === true) { - BI.delay(blur, 300); - } else { - blur(); - } - function blur() { - if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { - self.element.val(self._lastValidValue ? self._lastValidValue : ""); - self._checkValidationOnValueChange(); - self._defaultState(); - } - self.element.removeClass("bi-input-focus"); - self._isEditing = false; - self._start = false; - if (self.isValid()) { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self); - self.fireEvent(BI.Input.EVENT_CONFIRM); - } - self.fireEvent(BI.Input.EVENT_BLUR); - } - }, - - _click: function () { - if (this._isEditing !== true) { - this._focus(); - this.selectAll(); - this.fireEvent(BI.Input.EVENT_CLICK); - } - }, - - onClick: function () { - this._click(); - }, - - onKeyDown: function (keyCode, ctrlKey) { - if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { - this._checkValidationOnValueChange(); - } - if (this.isValid() && BI.trim(this.getValue()) !== "") { - if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") - || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { - this._start = true; - this._pause = false; - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_START); - } - } - if (ctrlKey === true && keyCode === 86) {//ctrlKey+V - this._valueChange(); - } else { - if (keyCode == BI.KeyCode.ENTER) { - if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { - this.blur(); - this.fireEvent(BI.Input.EVENT_ENTER); - } else { - this.fireEvent(BI.Input.EVENT_RESTRICT); - } - } - if (keyCode == BI.KeyCode.SPACE) { - this.fireEvent(BI.Input.EVENT_SPACE); - } - if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == "") { - this.fireEvent(BI.Input.EVENT_REMOVE); - } - if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { - this.fireEvent(BI.Input.EVENT_BACKSPACE); - } - } - this.fireEvent(BI.Input.EVENT_KEY_DOWN); - - if (BI.isEndWithBlank(this.getValue())) { - this._pause = true; - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); - this.fireEvent(BI.Input.EVENT_PAUSE); - this._defaultState(); - } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); - } - }, - - //初始状态 - _defaultState: function () { - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this._lastValue = this.getValue(); - this._lastSubmitValue = null; - }, - - _valueChange: function () { - if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_CHANGE); - this._lastSubmitValue = BI.trim(this.getValue()); - } - if (this.getValue() == "") { - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); - this.fireEvent(BI.Input.EVENT_EMPTY); - } - this._lastValue = this.getValue(); - }, - - _checkValidationOnValueChange: function () { - var o = this.options; - var v = this.getValue(); - this.setValid( - (o.allowBlank === true && BI.trim(v) == "") || - (BI.isNotEmptyString(BI.trim(v)) - && (v === this._lastValidValue || - o.validationChecker.apply(this, [BI.trim(v)]) !== false)) - ); - }, - - focus: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能focus"); - } - if (!this._isEditing === true) { - this.element.focus(); - this._focus(); - this.selectAll(); - } - }, - - blur: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能blur"); - } - if (this._isEditing === true) { - this.element.blur(); - this._blurDebounce(); - } - }, - - selectAll: function () { - if (!this.element.is(":visible")) { - throw new Error("input输入框在不可见下不能select"); - } - this.element.select(); - this._isEditing = true; - }, - - setValue: function (textValue) { - this.element.val(textValue); - BI.nextTick(BI.bind(function () { - this._checkValidationOnValueChange(); - this._defaultState(); - if (this.isValid()) { - this._lastSubmitValue = this.getValue(); - } - }, this)); - }, - - getValue: function () { - return this.element.val() || ""; - }, - - isEditing: function () { - return this._isEditing; - }, - - getLastValidValue: function () { - return this._lastValidValue; - }, - - _setValid: function () { - BI.Input.superclass._setValid.apply(this, arguments); - if (this.isValid()) { - this._lastValidValue = this.getValue(); - this.element.removeClass("bi-input-error"); - this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); - } else { - if (this._lastValidValue === this.getValue()) { - this._lastValidValue = null; - } - this.element.addClass("bi-input-error"); - this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); - } - }, - - _setEnable: function (b) { - BI.Input.superclass._setEnable.apply(this, [b]); - this.element[0].disabled = !b; - } -}); -BI.Input.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.Input.EVENT_FOCUS = "EVENT_FOCUS"; -BI.Input.EVENT_CLICK = "EVENT_CLICK"; -BI.Input.EVENT_BLUR = "EVENT_BLUR"; -BI.Input.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.Input.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN"; -BI.Input.EVENT_SPACE = "EVENT_SPACE"; -BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.Input.EVENT_START = "EVENT_START"; -BI.Input.EVENT_PAUSE = "EVENT_PAUSE"; -BI.Input.EVENT_STOP = "EVENT_STOP"; -BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.Input.EVENT_REMOVE = "EVENT_REMOVE"; -BI.Input.EVENT_EMPTY = "EVENT_EMPTY"; -BI.Input.EVENT_VALID = "EVENT_VALID"; -BI.Input.EVENT_ERROR = "EVENT_ERROR"; -BI.Input.EVENT_ENTER = "EVENT_ENTER"; -BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.shortcut("bi.input", BI.Input);/** - * guy - * @extends BI.Single - * @type {*|void|Object} - */ -BI.Radio = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - var conf = BI.Radio.superclass._defaultConfig.apply(this,arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-radio radio-icon", - selected: false, - handler: BI.emptyFn, - width: 16, - height: 16, - iconWidth: 16, - iconHeight: 16 - }) - }, - - _init : function() { - BI.Radio.superclass._init.apply(this, arguments); - }, - - doClick: function(){ - BI.Radio.superclass.doClick.apply(this, arguments); - if(this.isValid()){ - this.fireEvent(BI.Radio.EVENT_CHANGE); - } - } -}); -BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; - -BI.shortcut("bi.radio", BI.Radio);/** - * Created by GUY on 2015/6/26. - */ - -BI.Label = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.Label.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-label", - textAlign: "center", - whiteSpace: "nowrap", //normal or nowrap - forceCenter: false, //是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 - textWidth: null, - textHeight: null, - hgap: 0, - vgap: 0, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - text: "", - py: "", - keyword: "" - }) - }, - - _createJson: function () { - var o = this.options; - return { - type: "bi.text", - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - lineHeight: o.textHeight, - text: o.text, - value: o.value, - py: o.py, - keyword: o.keyword - }; - }, - - _init: function () { - BI.Label.superclass._init.apply(this, arguments); - - if (this.options.textAlign === "center") { - this._createCenterEl(); - } else { - this._createNotCenterEl(); - } - }, - - _createCenterEl: function () { - var o = this.options; - var json = this._createJson(); - if (BI.isNumber(o.width) && o.width > 0) { - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - if (BI.isNumber(o.height) && o.height > 0) { - var gap = (o.width - o.textWidth) / 2; - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)), - left: gap + o.hgap + o.lgap, - right: gap + o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - } - ] - }); - this.element.css({"line-height": o.height + "px"}); - return; - } - json.width = o.textWidth; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.absolute", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - json.width = o.width - 2 * o.hgap; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)) - }] - }); - return; - } - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; - BI.createWidget({ - type: "bi.center_adapt", - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - scrollable: o.whiteSpace === "normal", - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - if (BI.isNumber(o.textHeight) && o.textHeight > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - this.element.css({ - "line-height": o.height + "px" - }); - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - if (o.forceCenter) { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.center_adapt", - element: this, - items: [this.text] - }); - return; - } - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }) - }, - - _createNotCenterEl: function () { - var o = this.options; - var json = this._createJson(); - if (BI.isNumber(o.width) && o.width > 0) { - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - if (BI.isNumber(o.height) && o.height > 0) { - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - } - ] - }); - this.element.css({"line-height": o.height + "px"}); - return; - } - json.width = o.textWidth; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.absolute", - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [{ - el: (this.text = BI.createWidget(json)) - }] - }); - return; - } - if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [ - { - el: (this.text = BI.createWidget(json)) - } - ] - }); - return; - } - if (o.whiteSpace == "normal") { - this.text = BI.createWidget(json) - BI.createWidget({ - type: "bi.vertical_adapt", - scrollable: o.whiteSpace === "normal", - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - element: this, - items: [this.text] - }); - return; - } - if (BI.isNumber(o.height) && o.height > 0) { - if (BI.isNumber(o.textHeight) && o.textHeight > 0) { - this.element.css({ - "line-height": o.height + "px" - }); - BI.createWidget({ - type: "bi.adaptive", - height: o.height, - scrollable: o.whiteSpace === "normal", - element: this, - items: [{ - el: (this.text = BI.createWidget(json)), - left: o.hgap + o.lgap, - right: o.hgap + o.rgap, - top: o.vgap + o.tgap, - bottom: o.vgap + o.bgap - }] - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - this.element.css({ - "line-height": o.height + "px" - }); - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }); - return; - } - BI.extend(json, { - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap - }); - if (o.forceCenter) { - this.text = BI.createWidget(json); - BI.createWidget({ - type: "bi.vertical_adapt", - element: this, - items: [this.text] - }); - return; - } - this.text = BI.createWidget(BI.extend(json, { - element: this - })); - BI.createWidget({ - type: "bi.layout", - element: this.text, - scrollable: o.whiteSpace === "normal" - }) - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - setText: function (v) { - this.options.text = v; - this.text.setText(v); - }, - - getText: function () { - return this.options.text; - }, - - setStyle: function (css) { - this.text.setStyle(css) - }, - - setValue: function (v) { - BI.Label.superclass.setValue.apply(this, arguments); - if (!this.isReadOnly()) { - this.text.setValue(v); - } - }, - - populate: function () { - BI.Label.superclass.populate.apply(this, arguments); - } -}); - -BI.shortcut("bi.label", BI.Label);/** - * guy a元素 - * @class BI.Link - * @extends BI.Text - */ -BI.Link = BI.inherit(BI.Label, { - _defaultConfig: function() { - var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-link", - href: "", - target: "_blank" - }) - }, - - _createJson: function(){ - var o = this.options; - return { - type:"bi.a", - textAlign: o.textAlign, - whiteSpace: o.whiteSpace, - lineHeight: o.textHeight, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py, - href: o.href, - target: o.target - }; - }, - - _init : function() { - BI.Link.superclass._init.apply(this, arguments); - } -}); - -BI.shortcut("bi.link", BI.Link);/** - * guy - * 气泡提示 - * @class BI.Bubble - * @extends BI.Tip - * @type {*|void|Object} - */ -BI.Bubble = BI.inherit(BI.Tip, { - _defaultConfig: function() { - return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-bubble", - direction: "top", - text: "", - height: 35 - }) - }, - _init : function() { - BI.Bubble.superclass._init.apply(this, arguments); - var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; - }; - this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); - BI.createWidget({ - type: "bi.left", - element: this, - items: [this["_" + this.options.direction]()] - }) - }, - - _createBubbleText: function(){ - return (this.text = BI.createWidget({ - type: "bi.label", - cls: "bubble-text", - text: this.options.text, - hgap: 10, - height: 30 - })); - }, - - _top: function(){ - return BI.createWidget({ - type: "bi.vertical", - items: [{ - el: this._createBubbleText(), - height: 30 - }, { - el: { - type: "bi.layout" - }, - height: 3 - }] - }) - }, - - _bottom: function(){ - return BI.createWidget({ - type: "bi.vertical", - items: [{ - el: { - type: "bi.layout" - }, - height: 3 - }, { - el: this._createBubbleText(), - height: 30 - }] - }) - }, - - _left: function(){ - return BI.createWidget({ - type: "bi.right", - items: [{ - el: { - type: "bi.layout", - width: 3, - height: 30 - } - }, { - el: this._createBubbleText() - }] - }) - }, - - _right: function(){ - return BI.createWidget({ - type: "bi.left", - items: [{ - el: { - type: "bi.layout", - width: 3, - height: 30 - } - }, { - el: this._createBubbleText() - }] - }) - }, - - setText: function(text){ - this.text.setText(text); - } -}); - -BI.shortcut("bi.bubble", BI.Bubble);/** - * toast提示 - * - * Created by GUY on 2015/9/7. - * @class BI.Toast - * @extends BI.Tip - */ -BI.Toast = BI.inherit(BI.Tip, { - _const: { - minWidth: 200, - hgap: 20 - }, - - _defaultConfig: function () { - return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-toast", - text: "", - level: "success",//success或warning - height: 30 - }) - }, - _init: function () { - BI.Toast.superclass._init.apply(this, arguments); - var o = this.options; - this.element.css({ - minWidth: this._const.minWidth + "px" - }) - this.element.addClass("toast-" + o.level); - var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; - }; - this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); - - this.text = BI.createWidget({ - type: "bi.label", - element: this, - text: o.text, - height: 30, - hgap: this._const.hgap - }) - }, - - setWidth: function(width){ - this.element.width(width); - }, - - setText: function (text) { - this.text.setText(text); - } -}); - -BI.shortcut("bi.toast", BI.Toast);/** - * toast提示 - * - * Created by GUY on 2015/9/7. - * @class BI.Tooltip - * @extends BI.Tip - */ -BI.Tooltip = BI.inherit(BI.Tip, { - _const: { - hgap: 10 - }, - - _defaultConfig: function () { - return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-tooltip", - text: "", - level: "success",//success或warning - stopEvent: false, - stopPropagation: false, - height: 20 - }) - }, - _init: function () { - BI.Tooltip.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.element.addClass("tooltip-" + o.level); - var fn = function (e) { - o.stopPropagation && e.stopPropagation(); - o.stopEvent && e.stopEvent(); - }; - this.element.bind({ - "click": fn, - "mousedown": fn, - "mouseup": fn, - "mouseover": fn, - "mouseenter": fn, - "mouseleave": fn, - "mousemove": fn - }); - - var texts = (o.text + "").split("\n"); - if (texts.length > 1) { - BI.createWidget({ - type: "bi.vertical", - element: this, - hgap: this._const.hgap, - items: BI.map(texts, function (i, text) { - return { - type: "bi.label", - textAlign: "left", - whiteSpace: "normal", - text: text, - textHeight: 16 - } - }) - }) - } else { - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - whiteSpace: "normal", - text: o.text, - textHeight: 20, - hgap: this._const.hgap - }); - } - }, - - setWidth: function (width) { - this.element.width(width - 2 * this._const.hgap); - }, - - setText: function (text) { - this.text && this.text.setText(text); - }, - - setLevel: function (level) { - this.element.removeClass("tooltip-success").removeClass("tooltip-warning"); - this.element.addClass("tooltip-" + level); - } -}); - -BI.shortcut("bi.tooltip", BI.Tooltip);/** - * 下拉 - * @class BI.Trigger - * @extends BI.Single - * @abstract - */ -BI.Trigger = BI.inherit(BI.Single, { - _defaultConfig: function() { - var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", - height: 30 - }) - }, - - _init : function() { - BI.Trigger.superclass._init.apply(this, arguments); - }, - - setKey: function(){ - - }, - - getKey: function(){ - - } -});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ┌────────────────────────────────────────────────────────────┐ \\ -// │ Eve 0.4.2 - JavaScript Events Library │ \\ -// ├────────────────────────────────────────────────────────────┤ \\ -// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ -// └────────────────────────────────────────────────────────────┘ \\ -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("eve", function() { - return factory(); - }); - } else if (typeof exports === "object") { - module.exports = factory(); - } else { - glob.eve = factory(); - } -}(this, function(){ - var version = "0.4.2", - has = "hasOwnProperty", - separator = /[\.\/]/, - wildcard = "*", - fun = function () {}, - numsort = function (a, b) { - return a - b; - }, - current_event, - stop, - events = {n: {}}, - /*\ - * eve - [ method ] - - * Fires event with given `name`, given scope and other parameters. - - > Arguments - - - name (string) name of the *event*, dot (`.`) or slash (`/`) separated - - scope (object) context for the event handlers - - varargs (...) the rest of arguments will be sent to event handlers - - = (object) array of returned values from the listeners - \*/ - eve = function (name, scope) { - name = String(name); - var e = events, - oldstop = stop, - args = Array.prototype.slice.call(arguments, 2), - listeners = eve.listeners(name), - z = 0, - f = false, - l, - indexed = [], - queue = {}, - out = [], - ce = current_event, - errors = []; - current_event = name; - stop = 0; - for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { - indexed.push(listeners[i].zIndex); - if (listeners[i].zIndex < 0) { - queue[listeners[i].zIndex] = listeners[i]; - } - } - indexed.sort(numsort); - while (indexed[z] < 0) { - l = queue[indexed[z++]]; - out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - } - for (i = 0; i < ii; i++) { - l = listeners[i]; - if ("zIndex" in l) { - if (l.zIndex == indexed[z]) { - out.push(l.apply(scope, args)); - if (stop) { - break; - } - do { - z++; - l = queue[indexed[z]]; - l && out.push(l.apply(scope, args)); - if (stop) { - break; - } - } while (l) - } else { - queue[l.zIndex] = l; - } - } else { - out.push(l.apply(scope, args)); - if (stop) { - break; - } - } - } - stop = oldstop; - current_event = ce; - return out.length ? out : null; - }; - // Undocumented. Debug only. - eve._events = events; - /*\ - * eve.listeners - [ method ] - - * Internal method which gives you array of all event handlers that will be triggered by the given `name`. - - > Arguments - - - name (string) name of the event, dot (`.`) or slash (`/`) separated - - = (array) array of event handlers - \*/ - eve.listeners = function (name) { - var names = name.split(separator), - e = events, - item, - items, - k, - i, - ii, - j, - jj, - nes, - es = [e], - out = []; - for (i = 0, ii = names.length; i < ii; i++) { - nes = []; - for (j = 0, jj = es.length; j < jj; j++) { - e = es[j].n; - items = [e[names[i]], e[wildcard]]; - k = 2; - while (k--) { - item = items[k]; - if (item) { - nes.push(item); - out = out.concat(item.f || []); - } - } - } - es = nes; - } - return out; - }; - - /*\ - * eve.on - [ method ] - ** - * Binds given event handler with a given name. You can use wildcards “`*`” for the names: - | eve.on("*.under.*", f); - | eve("mouse.under.floor"); // triggers f - * Use @eve to trigger the listener. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - ** - = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment. - > Example: - | eve.on("mouse", eatIt)(2); - | eve.on("mouse", scream); - | eve.on("mouse", catchIt)(1); - * This will ensure that `catchIt()` function will be called before `eatIt()`. - * - * If you want to put your handler before non-indexed handlers, specify a negative value. - * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”. - \*/ - eve.on = function (name, f) { - name = String(name); - if (typeof f != "function") { - return function () {}; - } - var names = name.split(separator), - e = events; - for (var i = 0, ii = names.length; i < ii; i++) { - e = e.n; - e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}}); - } - e.f = e.f || []; - for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { - return fun; - } - e.f.push(f); - return function (zIndex) { - if (+zIndex == +zIndex) { - f.zIndex = +zIndex; - } - }; - }; - /*\ - * eve.f - [ method ] - ** - * Returns function that will fire given event with optional arguments. - * Arguments that will be passed to the result function will be also - * concated to the list of final arguments. - | el.onclick = eve.f("click", 1, 2); - | eve.on("click", function (a, b, c) { - | console.log(a, b, c); // 1, 2, [event object] - | }); - > Arguments - - event (string) event name - - varargs (…) and any other arguments - = (function) possible event handler function - \*/ - eve.f = function (event) { - var attrs = [].slice.call(arguments, 1); - return function () { - eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0))); - }; - }; - /*\ - * eve.stop - [ method ] - ** - * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing. - \*/ - eve.stop = function () { - stop = 1; - }; - /*\ - * eve.nt - [ method ] - ** - * Could be used inside event handler to figure out actual name of the event. - ** - > Arguments - ** - - subname (string) #optional subname of the event - ** - = (string) name of the event, if `subname` is not specified - * or - = (boolean) `true`, if current event’s name contains `subname` - \*/ - eve.nt = function (subname) { - if (subname) { - return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); - } - return current_event; - }; - /*\ - * eve.nts - [ method ] - ** - * Could be used inside event handler to figure out actual name of the event. - ** - ** - = (array) names of the event - \*/ - eve.nts = function () { - return current_event.split(separator); - }; - /*\ - * eve.off - [ method ] - ** - * Removes given function from the list of event listeners assigned to given name. - * If no arguments specified all the events will be cleared. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - \*/ - /*\ - * eve.unbind - [ method ] - ** - * See @eve.off - \*/ - eve.off = eve.unbind = function (name, f) { - if (!name) { - eve._events = events = {n: {}}; - return; - } - var names = name.split(separator), - e, - key, - splice, - i, ii, j, jj, - cur = [events]; - for (i = 0, ii = names.length; i < ii; i++) { - for (j = 0; j < cur.length; j += splice.length - 2) { - splice = [j, 1]; - e = cur[j].n; - if (names[i] != wildcard) { - if (e[names[i]]) { - splice.push(e[names[i]]); - } - } else { - for (key in e) if (e[has](key)) { - splice.push(e[key]); - } - } - cur.splice.apply(cur, splice); - } - } - for (i = 0, ii = cur.length; i < ii; i++) { - e = cur[i]; - while (e.n) { - if (f) { - if (e.f) { - for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { - e.f.splice(j, 1); - break; - } - !e.f.length && delete e.f; - } - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - var funcs = e.n[key].f; - for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { - funcs.splice(j, 1); - break; - } - !funcs.length && delete e.n[key].f; - } - } else { - delete e.f; - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - delete e.n[key].f; - } - } - e = e.n; - } - } - }; - /*\ - * eve.once - [ method ] - ** - * Binds given event handler with a given name to only run once then unbind itself. - | eve.once("login", f); - | eve("login"); // triggers f - | eve("login"); // no listeners - * Use @eve to trigger the listener. - ** - > Arguments - ** - - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards - - f (function) event handler function - ** - = (function) same return function as @eve.on - \*/ - eve.once = function (name, f) { - var f2 = function () { - eve.unbind(name, f2); - return f.apply(this, arguments); - }; - return eve.on(name, f2); - }; - /*\ - * eve.version - [ property (string) ] - ** - * Current version of the library. - \*/ - eve.version = version; - eve.toString = function () { - return "You are running Eve " + version; - }; - - return eve; -})); - -// ┌────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Core Module │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ -// └────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.core", ["eve"], function(eve) { - return factory(eve); - }); - } else if (typeof exports === "object") { - module.exports = factory(require("eve")); - } else { - glob.Raphael = factory(glob.eve); - } -}(this, function (eve) { - /*\ - * Raphael - [ method ] - ** - * Creates a canvas object on which to draw. - * You must do this first, as all future calls to drawing methods - * from this instance will be bound to this canvas. - > Parameters - ** - - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface - - width (number) - - height (number) - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - x (number) - - y (number) - - width (number) - - height (number) - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add. - - callback (function) #optional callback function which is going to be executed in the context of newly created paper - * or - - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`. - = (object) @Paper - > Usage - | // Each of the following examples create a canvas - | // that is 320px wide by 200px high. - | // Canvas is created at the viewport’s 10,50 coordinate. - | var paper = Raphael(10, 50, 320, 200); - | // Canvas is created at the top left corner of the #notepad element - | // (or its top right corner in dir="rtl" elements) - | var paper = Raphael(document.getElementById("notepad"), 320, 200); - | // Same as above - | var paper = Raphael("notepad", 320, 200); - | // Image dump - | var set = Raphael(["notepad", 320, 200, { - | type: "rect", - | x: 10, - | y: 10, - | width: 25, - | height: 25, - | stroke: "#f00" - | }, { - | type: "text", - | x: 30, - | y: 40, - | text: "Dump" - | }]); - \*/ - function R(first) { - if (R.is(first, "function")) { - return loaded ? first() : eve.on("raphael.DOMload", first); - } else if (R.is(first, array)) { - return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); - } else { - var args = Array.prototype.slice.call(arguments, 0); - if (R.is(args[args.length - 1], "function")) { - var f = args.pop(); - return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { - f.call(R._engine.create[apply](R, args)); - }); - } else { - return R._engine.create[apply](R, arguments); - } - } - } - R.version = "2.1.4"; - R.eve = eve; - var loaded, - separator = /[, ]+/, - elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, - formatrg = /\{(\d+)\}/g, - proto = "prototype", - has = "hasOwnProperty", - g = { - doc: document, - win: window - }, - oldRaphael = { - was: Object.prototype[has].call(g.win, "Raphael"), - is: g.win.Raphael - }, - Paper = function () { - /*\ - * Paper.ca - [ property (object) ] - ** - * Shortcut for @Paper.customAttributes - \*/ - /*\ - * Paper.customAttributes - [ property (object) ] - ** - * If you have a set of attributes that you would like to represent - * as a function of some number you can do it easily with custom attributes: - > Usage - | paper.customAttributes.hue = function (num) { - | num = num % 1; - | return {fill: "hsb(" + num + ", 0.75, 1)"}; - | }; - | // Custom attribute “hue” will change fill - | // to be given hue with fixed saturation and brightness. - | // Now you can use it like this: - | var c = paper.circle(10, 10, 10).attr({hue: .45}); - | // or even like this: - | c.animate({hue: 1}, 1e3); - | - | // You could also create custom attribute - | // with multiple parameters: - | paper.customAttributes.hsb = function (h, s, b) { - | return {fill: "hsb(" + [h, s, b].join(",") + ")"}; - | }; - | c.attr({hsb: "0.5 .8 1"}); - | c.animate({hsb: [1, 0, 0.5]}, 1e3); - \*/ - this.ca = this.customAttributes = {}; - }, - paperproto, - appendChild = "appendChild", - apply = "apply", - concat = "concat", - supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test - E = "", - S = " ", - Str = String, - split = "split", - events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), - touchMap = { - mousedown: "touchstart", - mousemove: "touchmove", - mouseup: "touchend" - }, - lowerCase = Str.prototype.toLowerCase, - math = Math, - mmax = math.max, - mmin = math.min, - abs = math.abs, - pow = math.pow, - PI = math.PI, - nu = "number", - string = "string", - array = "array", - toString = "toString", - fillString = "fill", - objectToString = Object.prototype.toString, - paper = {}, - push = "push", - ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i, - colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, - isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, - bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, - round = math.round, - setAttribute = "setAttribute", - toFloat = parseFloat, - toInt = parseInt, - upperCase = Str.prototype.toUpperCase, - availableAttrs = R._availableAttrs = { - "arrow-end": "none", - "arrow-start": "none", - blur: 0, - "clip-rect": "0 0 1e9 1e9", - cursor: "default", - cx: 0, - cy: 0, - fill: "#fff", - "fill-opacity": 1, - font: '10px "Arial"', - "font-family": '"Arial"', - "font-size": "10", - "font-style": "normal", - "font-weight": 400, - gradient: 0, - height: 0, - href: "http://raphaeljs.com/", - "letter-spacing": 0, - opacity: 1, - path: "M0,0", - r: 0, - rx: 0, - ry: 0, - src: "", - stroke: "#000", - "stroke-dasharray": "", - "stroke-linecap": "butt", - "stroke-linejoin": "butt", - "stroke-miterlimit": 0, - "stroke-opacity": 1, - "stroke-width": 1, - target: "_blank", - "text-anchor": "middle", - title: "Raphael", - transform: "", - width: 0, - x: 0, - y: 0 - }, - availableAnimAttrs = R._availableAnimAttrs = { - blur: nu, - "clip-rect": "csv", - cx: nu, - cy: nu, - fill: "colour", - "fill-opacity": nu, - "font-size": nu, - height: nu, - opacity: nu, - path: "path", - r: nu, - rx: nu, - ry: nu, - stroke: "colour", - "stroke-opacity": nu, - "stroke-width": nu, - transform: "transform", - width: nu, - x: nu, - y: nu - }, - whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, - commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, - hsrg = {hs: 1, rg: 1}, - p2s = /,?([achlmqrstvxz]),?/gi, - pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, - tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, - pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, - radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, - eldata = {}, - sortByKey = function (a, b) { - return a.key - b.key; - }, - sortByNumber = function (a, b) { - return toFloat(a) - toFloat(b); - }, - fun = function () {}, - pipe = function (x) { - return x; - }, - rectPath = R._rectPath = function (x, y, w, h, r) { - if (r) { - return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; - } - return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; - }, - ellipsePath = function (x, y, rx, ry) { - if (ry == null) { - ry = rx; - } - return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; - }, - getPath = R._getPath = { - path: function (el) { - return el.attr("path"); - }, - circle: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.r); - }, - ellipse: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.rx, a.ry); - }, - rect: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height, a.r); - }, - image: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height); - }, - text: function (el) { - var bbox = el._getBBox(); - return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); - }, - set : function(el) { - var bbox = el._getBBox(); - return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); - } - }, - /*\ - * Raphael.mapPath - [ method ] - ** - * Transform the path string with given matrix. - > Parameters - - path (string) path string - - matrix (object) see @Matrix - = (string) transformed path string - \*/ - mapPath = R.mapPath = function (path, matrix) { - if (!matrix) { - return path; - } - var x, y, i, j, ii, jj, pathi; - path = path2curve(path); - for (i = 0, ii = path.length; i < ii; i++) { - pathi = path[i]; - for (j = 1, jj = pathi.length; j < jj; j += 2) { - x = matrix.x(pathi[j], pathi[j + 1]); - y = matrix.y(pathi[j], pathi[j + 1]); - pathi[j] = x; - pathi[j + 1] = y; - } - } - return path; - }; - - R._g = g; - /*\ - * Raphael.type - [ property (string) ] - ** - * Can be “SVG”, “VML” or empty, depending on browser support. - \*/ - R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); - if (R.type == "VML") { - var d = g.doc.createElement("div"), - b; - d.innerHTML = '<v:shape adj="1"/>'; - b = d.firstChild; - b.style.behavior = "url(#default#VML)"; - if (!(b && typeof b.adj == "object")) { - return (R.type = E); - } - d = null; - } - /*\ - * Raphael.svg - [ property (boolean) ] - ** - * `true` if browser supports SVG. - \*/ - /*\ - * Raphael.vml - [ property (boolean) ] - ** - * `true` if browser supports VML. - \*/ - R.svg = !(R.vml = R.type == "VML"); - R._Paper = Paper; - /*\ - * Raphael.fn - [ property (object) ] - ** - * You can add your own method to the canvas. For example if you want to draw a pie chart, - * you can create your own pie chart function and ship it as a Raphaël plugin. To do this - * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a - * Raphaël instance is created, otherwise it will take no effect. Please note that the - * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to - * ensure any namespacing ensures proper context. - > Usage - | Raphael.fn.arrow = function (x1, y1, x2, y2, size) { - | return this.path( ... ); - | }; - | // or create namespace - | Raphael.fn.mystuff = { - | arrow: function () {…}, - | star: function () {…}, - | // etc… - | }; - | var paper = Raphael(10, 10, 630, 480); - | // then use it - | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"}); - | paper.mystuff.arrow(); - | paper.mystuff.star(); - \*/ - R.fn = paperproto = Paper.prototype = R.prototype; - R._id = 0; - R._oid = 0; - /*\ - * Raphael.is - [ method ] - ** - * Handful of replacements for `typeof` operator. - > Parameters - - o (…) any object or primitive - - type (string) name of the type, i.e. “string”, “function”, “number”, etc. - = (boolean) is given value is of given type - \*/ - R.is = function (o, type) { - type = lowerCase.call(type); - if (type == "finite") { - return !isnan[has](+o); - } - if (type == "array") { - return o instanceof Array; - } - return (type == "null" && o === null) || - (type == typeof o && o !== null) || - (type == "object" && o === Object(o)) || - (type == "array" && Array.isArray && Array.isArray(o)) || - objectToString.call(o).slice(8, -1).toLowerCase() == type; - }; - - function clone(obj) { - if (typeof obj == "function" || Object(obj) !== obj) { - return obj; - } - var res = new obj.constructor; - for (var key in obj) if (obj[has](key)) { - res[key] = clone(obj[key]); - } - return res; - } - - /*\ - * Raphael.angle - [ method ] - ** - * Returns angle between two or three points - > Parameters - - x1 (number) x coord of first point - - y1 (number) y coord of first point - - x2 (number) x coord of second point - - y2 (number) y coord of second point - - x3 (number) #optional x coord of third point - - y3 (number) #optional y coord of third point - = (number) angle in degrees. - \*/ - R.angle = function (x1, y1, x2, y2, x3, y3) { - if (x3 == null) { - var x = x1 - x2, - y = y1 - y2; - if (!x && !y) { - return 0; - } - return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; - } else { - return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); - } - }; - /*\ - * Raphael.rad - [ method ] - ** - * Transform angle to radians - > Parameters - - deg (number) angle in degrees - = (number) angle in radians. - \*/ - R.rad = function (deg) { - return deg % 360 * PI / 180; - }; - /*\ - * Raphael.deg - [ method ] - ** - * Transform angle to degrees - > Parameters - - rad (number) angle in radians - = (number) angle in degrees. - \*/ - R.deg = function (rad) { - return Math.round ((rad * 180 / PI% 360)* 1000) / 1000; - }; - /*\ - * Raphael.snapTo - [ method ] - ** - * Snaps given value to given grid. - > Parameters - - values (array|number) given array of values or step of the grid - - value (number) value to adjust - - tolerance (number) #optional tolerance for snapping. Default is `10`. - = (number) adjusted value. - \*/ - R.snapTo = function (values, value, tolerance) { - tolerance = R.is(tolerance, "finite") ? tolerance : 10; - if (R.is(values, array)) { - var i = values.length; - while (i--) if (abs(values[i] - value) <= tolerance) { - return values[i]; - } - } else { - values = +values; - var rem = value % values; - if (rem < tolerance) { - return value - rem; - } - if (rem > values - tolerance) { - return value - rem + values; - } - } - return value; - }; - - /*\ - * Raphael.createUUID - [ method ] - ** - * Returns RFC4122, version 4 ID - \*/ - var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { - return function () { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); - }; - })(/[xy]/g, function (c) { - var r = math.random() * 16 | 0, - v = c == "x" ? r : (r & 3 | 8); - return v.toString(16); - }); - - /*\ - * Raphael.setWindow - [ method ] - ** - * Used when you need to draw in `<iframe>`. Switched window to the iframe one. - > Parameters - - newwin (window) new window object - \*/ - R.setWindow = function (newwin) { - eve("raphael.setWindow", R, g.win, newwin); - g.win = newwin; - g.doc = g.win.document; - if (R._engine.initWin) { - R._engine.initWin(g.win); - } - }; - var toHex = function (color) { - if (R.vml) { - // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ - var trim = /^\s+|\s+$/g; - var bod; - try { - var docum = new ActiveXObject("htmlfile"); - docum.write("<body>"); - docum.close(); - bod = docum.body; - } catch(e) { - bod = createPopup().document.body; - } - var range = bod.createTextRange(); - toHex = cacher(function (color) { - try { - bod.style.color = Str(color).replace(trim, E); - var value = range.queryCommandValue("ForeColor"); - value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); - return "#" + ("000000" + value.toString(16)).slice(-6); - } catch(e) { - return "none"; - } - }); - } else { - var i = g.doc.createElement("i"); - i.title = "Rapha\xebl Colour Picker"; - i.style.display = "none"; - g.doc.body.appendChild(i); - toHex = cacher(function (color) { - i.style.color = color; - return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); - }); - } - return toHex(color); - }, - hsbtoString = function () { - return "hsb(" + [this.h, this.s, this.b] + ")"; - }, - hsltoString = function () { - return "hsl(" + [this.h, this.s, this.l] + ")"; - }, - rgbtoString = function () { - return this.hex; - }, - prepareRGB = function (r, g, b) { - if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { - b = r.b; - g = r.g; - r = r.r; - } - if (g == null && R.is(r, string)) { - var clr = R.getRGB(r); - r = clr.r; - g = clr.g; - b = clr.b; - } - if (r > 1 || g > 1 || b > 1) { - r /= 255; - g /= 255; - b /= 255; - } - - return [r, g, b]; - }, - packageRGB = function (r, g, b, o) { - r *= 255; - g *= 255; - b *= 255; - var rgb = { - r: r, - g: g, - b: b, - hex: R.rgb(r, g, b), - toString: rgbtoString - }; - R.is(o, "finite") && (rgb.opacity = o); - return rgb; - }; - - /*\ - * Raphael.color - [ method ] - ** - * Parses the color string and returns object with all values for the given color. - > Parameters - - clr (string) color string in one of the supported formats (see @Raphael.getRGB) - = (object) Combined RGB & HSB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #••••••, - o error (boolean) `true` if string can’t be parsed, - o h (number) hue, - o s (number) saturation, - o v (number) value (brightness), - o l (number) lightness - o } - \*/ - R.color = function (clr) { - var rgb; - if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { - rgb = R.hsb2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { - rgb = R.hsl2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else { - if (R.is(clr, "string")) { - clr = R.getRGB(clr); - } - if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { - rgb = R.rgb2hsl(clr); - clr.h = rgb.h; - clr.s = rgb.s; - clr.l = rgb.l; - rgb = R.rgb2hsb(clr); - clr.v = rgb.b; - } else { - clr = {hex: "none"}; - clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; - } - } - clr.toString = rgbtoString; - return clr; - }; - /*\ - * Raphael.hsb2rgb - [ method ] - ** - * Converts HSB values to RGB object. - > Parameters - - h (number) hue - - s (number) saturation - - v (number) value or brightness - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #•••••• - o } - \*/ - R.hsb2rgb = function (h, s, v, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { - v = h.b; - s = h.s; - o = h.o; - h = h.h; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = v * s; - X = C * (1 - abs(h % 2 - 1)); - R = G = B = v - C; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - /*\ - * Raphael.hsl2rgb - [ method ] - ** - * Converts HSL values to RGB object. - > Parameters - - h (number) hue - - s (number) saturation - - l (number) luminosity - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue, - o hex (string) color in HTML/CSS format: #•••••• - o } - \*/ - R.hsl2rgb = function (h, s, l, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { - l = h.l; - s = h.s; - h = h.h; - } - if (h > 1 || s > 1 || l > 1) { - h /= 360; - s /= 100; - l /= 100; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = 2 * s * (l < .5 ? l : 1 - l); - X = C * (1 - abs(h % 2 - 1)); - R = G = B = l - C / 2; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - /*\ - * Raphael.rgb2hsb - [ method ] - ** - * Converts RGB values to HSB object. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (object) HSB object in format: - o { - o h (number) hue - o s (number) saturation - o b (number) brightness - o } - \*/ - R.rgb2hsb = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, V, C; - V = mmax(r, g, b); - C = V - mmin(r, g, b); - H = (C == 0 ? null : - V == r ? (g - b) / C : - V == g ? (b - r) / C + 2 : - (r - g) / C + 4 - ); - H = ((H + 360) % 6) * 60 / 360; - S = C == 0 ? 0 : C / V; - return {h: H, s: S, b: V, toString: hsbtoString}; - }; - /*\ - * Raphael.rgb2hsl - [ method ] - ** - * Converts RGB values to HSL object. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (object) HSL object in format: - o { - o h (number) hue - o s (number) saturation - o l (number) luminosity - o } - \*/ - R.rgb2hsl = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, L, M, m, C; - M = mmax(r, g, b); - m = mmin(r, g, b); - C = M - m; - H = (C == 0 ? null : - M == r ? (g - b) / C : - M == g ? (b - r) / C + 2 : - (r - g) / C + 4); - H = ((H + 360) % 6) * 60 / 360; - L = (M + m) / 2; - S = (C == 0 ? 0 : - L < .5 ? C / (2 * L) : - C / (2 - 2 * L)); - return {h: H, s: S, l: L, toString: hsltoString}; - }; - R._path2string = function () { - return this.join(",").replace(p2s, "$1"); - }; - function repush(array, item) { - for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { - return array.push(array.splice(i, 1)[0]); - } - } - function cacher(f, scope, postprocessor) { - function newf() { - var arg = Array.prototype.slice.call(arguments, 0), - args = arg.join("\u2400"), - cache = newf.cache = newf.cache || {}, - count = newf.count = newf.count || []; - if (cache[has](args)) { - repush(count, args); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - count.length >= 1e3 && delete cache[count.shift()]; - count.push(args); - cache[args] = f[apply](scope, arg); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - return newf; - } - - var preload = R._preload = function (src, f) { - var img = g.doc.createElement("img"); - img.style.cssText = "position:absolute;left:-9999em;top:-9999em"; - img.onload = function () { - f.call(this); - this.onload = null; - g.doc.body.removeChild(this); - }; - img.onerror = function () { - g.doc.body.removeChild(this); - }; - g.doc.body.appendChild(img); - img.src = src; - }; - - function clrToString() { - return this.hex; - } - - /*\ - * Raphael.getRGB - [ method ] - ** - * Parses colour string as RGB object - > Parameters - - colour (string) colour string in one of formats: - # <ul> - # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> - # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> - # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> - # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> - # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> - # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> - # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> - # <li>hsl(•••, •••, •••) — same as hsb</li> - # <li>hsl(•••%, •••%, •••%) — same as hsb</li> - # </ul> - = (object) RGB object in format: - o { - o r (number) red, - o g (number) green, - o b (number) blue - o hex (string) color in HTML/CSS format: #••••••, - o error (boolean) true if string can’t be parsed - o } - \*/ - R.getRGB = cacher(function (colour) { - if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - } - if (colour == "none") { - return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; - } - !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); - var res, - red, - green, - blue, - opacity, - t, - values, - rgb = colour.match(colourRegExp); - if (rgb) { - if (rgb[2]) { - blue = toInt(rgb[2].substring(5), 16); - green = toInt(rgb[2].substring(3, 5), 16); - red = toInt(rgb[2].substring(1, 3), 16); - } - if (rgb[3]) { - blue = toInt((t = rgb[3].charAt(3)) + t, 16); - green = toInt((t = rgb[3].charAt(2)) + t, 16); - red = toInt((t = rgb[3].charAt(1)) + t, 16); - } - if (rgb[4]) { - values = rgb[4][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - } - if (rgb[5]) { - values = rgb[5][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsb2rgb(red, green, blue, opacity); - } - if (rgb[6]) { - values = rgb[6][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsl2rgb(red, green, blue, opacity); - } - rgb = {r: red, g: green, b: blue, toString: clrToString}; - rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); - R.is(opacity, "finite") && (rgb.opacity = opacity); - return rgb; - } - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - }, R); - /*\ - * Raphael.hsb - [ method ] - ** - * Converts HSB values to hex representation of the colour. - > Parameters - - h (number) hue - - s (number) saturation - - b (number) value or brightness - = (string) hex representation of the colour. - \*/ - R.hsb = cacher(function (h, s, b) { - return R.hsb2rgb(h, s, b).hex; - }); - /*\ - * Raphael.hsl - [ method ] - ** - * Converts HSL values to hex representation of the colour. - > Parameters - - h (number) hue - - s (number) saturation - - l (number) luminosity - = (string) hex representation of the colour. - \*/ - R.hsl = cacher(function (h, s, l) { - return R.hsl2rgb(h, s, l).hex; - }); - /*\ - * Raphael.rgb - [ method ] - ** - * Converts RGB values to hex representation of the colour. - > Parameters - - r (number) red - - g (number) green - - b (number) blue - = (string) hex representation of the colour. - \*/ - R.rgb = cacher(function (r, g, b) { - function round(x) { return (x + 0.5) | 0; } - return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1); - }); - /*\ - * Raphael.getColor - [ method ] - ** - * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset - > Parameters - - value (number) #optional brightness, default is `0.75` - = (string) hex representation of the colour. - \*/ - R.getColor = function (value) { - var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, - rgb = this.hsb2rgb(start.h, start.s, start.b); - start.h += .075; - if (start.h > 1) { - start.h = 0; - start.s -= .2; - start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); - } - return rgb.hex; - }; - /*\ - * Raphael.getColor.reset - [ method ] - ** - * Resets spectrum position for @Raphael.getColor back to red. - \*/ - R.getColor.reset = function () { - delete this.start; - }; - - // http://schepers.cc/getting-to-the-point - function catmullRom2bezier(crp, z) { - var d = []; - for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { - var p = [ - {x: +crp[i - 2], y: +crp[i - 1]}, - {x: +crp[i], y: +crp[i + 1]}, - {x: +crp[i + 2], y: +crp[i + 3]}, - {x: +crp[i + 4], y: +crp[i + 5]} - ]; - if (z) { - if (!i) { - p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]}; - } else if (iLen - 4 == i) { - p[3] = {x: +crp[0], y: +crp[1]}; - } else if (iLen - 2 == i) { - p[2] = {x: +crp[0], y: +crp[1]}; - p[3] = {x: +crp[2], y: +crp[3]}; - } - } else { - if (iLen - 4 == i) { - p[3] = p[2]; - } else if (!i) { - p[0] = {x: +crp[i], y: +crp[i + 1]}; - } - } - d.push(["C", - (-p[0].x + 6 * p[1].x + p[2].x) / 6, - (-p[0].y + 6 * p[1].y + p[2].y) / 6, - (p[1].x + 6 * p[2].x - p[3].x) / 6, - (p[1].y + 6*p[2].y - p[3].y) / 6, - p[2].x, - p[2].y - ]); - } - - return d; - } - /*\ - * Raphael.parsePathString - [ method ] - ** - * Utility method - ** - * Parses given path string into an array of arrays of path segments. - > Parameters - - pathString (string|array) path string or array of segments (in the last case it will be returned straight away) - = (array) array of segments. - \*/ - R.parsePathString = function (pathString) { - if (!pathString) { - return null; - } - var pth = paths(pathString); - if (pth.arr) { - return pathClone(pth.arr); - } - - var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, - data = []; - if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption - data = pathClone(pathString); - } - if (!data.length) { - Str(pathString).replace(pathCommand, function (a, b, c) { - var params = [], - name = b.toLowerCase(); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - if (name == "m" && params.length > 2) { - data.push([b][concat](params.splice(0, 2))); - name = "l"; - b = b == "m" ? "l" : "L"; - } - if (name == "r") { - data.push([b][concat](params)); - } else while (params.length >= paramCounts[name]) { - data.push([b][concat](params.splice(0, paramCounts[name]))); - if (!paramCounts[name]) { - break; - } - } - }); - } - data.toString = R._path2string; - pth.arr = pathClone(data); - return data; - }; - /*\ - * Raphael.parseTransformString - [ method ] - ** - * Utility method - ** - * Parses given path string into an array of transformations. - > Parameters - - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away) - = (array) array of transformations. - \*/ - R.parseTransformString = cacher(function (TString) { - if (!TString) { - return null; - } - var paramCounts = {r: 3, s: 4, t: 2, m: 6}, - data = []; - if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption - data = pathClone(TString); - } - if (!data.length) { - Str(TString).replace(tCommand, function (a, b, c) { - var params = [], - name = lowerCase.call(b); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - data.push([b][concat](params)); - }); - } - data.toString = R._path2string; - return data; - }); - // PATHS - var paths = function (ps) { - var p = paths.ps = paths.ps || {}; - if (p[ps]) { - p[ps].sleep = 100; - } else { - p[ps] = { - sleep: 100 - }; - } - setTimeout(function () { - for (var key in p) if (p[has](key) && key != ps) { - p[key].sleep--; - !p[key].sleep && delete p[key]; - } - }); - return p[ps]; - }; - /*\ - * Raphael.findDotsAtSegment - [ method ] - ** - * Utility method - ** - * Find dot coordinates on the given cubic bezier curve at the given t. - > Parameters - - p1x (number) x of the first point of the curve - - p1y (number) y of the first point of the curve - - c1x (number) x of the first anchor of the curve - - c1y (number) y of the first anchor of the curve - - c2x (number) x of the second anchor of the curve - - c2y (number) y of the second anchor of the curve - - p2x (number) x of the second point of the curve - - p2y (number) y of the second point of the curve - - t (number) position on the curve (0..1) - = (object) point information in format: - o { - o x: (number) x coordinate of the point - o y: (number) y coordinate of the point - o m: { - o x: (number) x coordinate of the left anchor - o y: (number) y coordinate of the left anchor - o } - o n: { - o x: (number) x coordinate of the right anchor - o y: (number) y coordinate of the right anchor - o } - o start: { - o x: (number) x coordinate of the start of the curve - o y: (number) y coordinate of the start of the curve - o } - o end: { - o x: (number) x coordinate of the end of the curve - o y: (number) y coordinate of the end of the curve - o } - o alpha: (number) angle of the curve derivative at the point - o } - \*/ - R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t, - t13 = pow(t1, 3), - t12 = pow(t1, 2), - t2 = t * t, - t3 = t2 * t, - x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, - y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, - mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), - my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), - nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), - ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), - ax = t1 * p1x + t * c1x, - ay = t1 * p1y + t * c1y, - cx = t1 * c2x + t * p2x, - cy = t1 * c2y + t * p2y, - alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); - (mx > nx || my < ny) && (alpha += 180); - return { - x: x, - y: y, - m: {x: mx, y: my}, - n: {x: nx, y: ny}, - start: {x: ax, y: ay}, - end: {x: cx, y: cy}, - alpha: alpha - }; - }; - /*\ - * Raphael.bezierBBox - [ method ] - ** - * Utility method - ** - * Return bounding box of a given cubic bezier curve - > Parameters - - p1x (number) x of the first point of the curve - - p1y (number) y of the first point of the curve - - c1x (number) x of the first anchor of the curve - - c1y (number) y of the first anchor of the curve - - c2x (number) x of the second anchor of the curve - - c2y (number) y of the second anchor of the curve - - p2x (number) x of the second point of the curve - - p2y (number) y of the second point of the curve - * or - - bez (array) array of six points for bezier curve - = (object) point information in format: - o { - o min: { - o x: (number) x coordinate of the left point - o y: (number) y coordinate of the top point - o } - o max: { - o x: (number) x coordinate of the right point - o y: (number) y coordinate of the bottom point - o } - o } - \*/ - R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - if (!R.is(p1x, "array")) { - p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; - } - var bbox = curveDim.apply(null, p1x); - return { - x: bbox.min.x, - y: bbox.min.y, - x2: bbox.max.x, - y2: bbox.max.y, - width: bbox.max.x - bbox.min.x, - height: bbox.max.y - bbox.min.y - }; - }; - /*\ - * Raphael.isPointInsideBBox - [ method ] - ** - * Utility method - ** - * Returns `true` if given point is inside bounding boxes. - > Parameters - - bbox (string) bounding box - - x (string) x coordinate of the point - - y (string) y coordinate of the point - = (boolean) `true` if point inside - \*/ - R.isPointInsideBBox = function (bbox, x, y) { - return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2; - }; - /*\ - * Raphael.isBBoxIntersect - [ method ] - ** - * Utility method - ** - * Returns `true` if two bounding boxes intersect - > Parameters - - bbox1 (string) first bounding box - - bbox2 (string) second bounding box - = (boolean) `true` if they intersect - \*/ - R.isBBoxIntersect = function (bbox1, bbox2) { - var i = R.isPointInsideBBox; - return i(bbox2, bbox1.x, bbox1.y) - || i(bbox2, bbox1.x2, bbox1.y) - || i(bbox2, bbox1.x, bbox1.y2) - || i(bbox2, bbox1.x2, bbox1.y2) - || i(bbox1, bbox2.x, bbox2.y) - || i(bbox1, bbox2.x2, bbox2.y) - || i(bbox1, bbox2.x, bbox2.y2) - || i(bbox1, bbox2.x2, bbox2.y2) - || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) - && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); - }; - function base3(t, p1, p2, p3, p4) { - var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, - t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; - return t * t2 - 3 * p1 + 3 * p2; - } - function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { - if (z == null) { - z = 1; - } - z = z > 1 ? 1 : z < 0 ? 0 : z; - var z2 = z / 2, - n = 12, - Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816], - Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472], - sum = 0; - for (var i = 0; i < n; i++) { - var ct = z2 * Tvalues[i] + z2, - xbase = base3(ct, x1, x2, x3, x4), - ybase = base3(ct, y1, y2, y3, y4), - comb = xbase * xbase + ybase * ybase; - sum += Cvalues[i] * math.sqrt(comb); - } - return z2 * sum; - } - function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) { - if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) { - return; - } - var t = 1, - step = t / 2, - t2 = t - step, - l, - e = .01; - l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); - while (abs(l - ll) > e) { - step /= 2; - t2 += (l < ll ? 1 : -1) * step; - l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); - } - return t2; - } - function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { - if ( - mmax(x1, x2) < mmin(x3, x4) || - mmin(x1, x2) > mmax(x3, x4) || - mmax(y1, y2) < mmin(y3, y4) || - mmin(y1, y2) > mmax(y3, y4) - ) { - return; - } - var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), - ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), - denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); - - if (!denominator) { - return; - } - var px = nx / denominator, - py = ny / denominator, - px2 = +px.toFixed(2), - py2 = +py.toFixed(2); - if ( - px2 < +mmin(x1, x2).toFixed(2) || - px2 > +mmax(x1, x2).toFixed(2) || - px2 < +mmin(x3, x4).toFixed(2) || - px2 > +mmax(x3, x4).toFixed(2) || - py2 < +mmin(y1, y2).toFixed(2) || - py2 > +mmax(y1, y2).toFixed(2) || - py2 < +mmin(y3, y4).toFixed(2) || - py2 > +mmax(y3, y4).toFixed(2) - ) { - return; - } - return {x: px, y: py}; - } - function inter(bez1, bez2) { - return interHelper(bez1, bez2); - } - function interCount(bez1, bez2) { - return interHelper(bez1, bez2, 1); - } - function interHelper(bez1, bez2, justCount) { - var bbox1 = R.bezierBBox(bez1), - bbox2 = R.bezierBBox(bez2); - if (!R.isBBoxIntersect(bbox1, bbox2)) { - return justCount ? 0 : []; - } - var l1 = bezlen.apply(0, bez1), - l2 = bezlen.apply(0, bez2), - n1 = mmax(~~(l1 / 5), 1), - n2 = mmax(~~(l2 / 5), 1), - dots1 = [], - dots2 = [], - xy = {}, - res = justCount ? 0 : []; - for (var i = 0; i < n1 + 1; i++) { - var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1)); - dots1.push({x: p.x, y: p.y, t: i / n1}); - } - for (i = 0; i < n2 + 1; i++) { - p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2)); - dots2.push({x: p.x, y: p.y, t: i / n2}); - } - for (i = 0; i < n1; i++) { - for (var j = 0; j < n2; j++) { - var di = dots1[i], - di1 = dots1[i + 1], - dj = dots2[j], - dj1 = dots2[j + 1], - ci = abs(di1.x - di.x) < .001 ? "y" : "x", - cj = abs(dj1.x - dj.x) < .001 ? "y" : "x", - is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); - if (is) { - if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) { - continue; - } - xy[is.x.toFixed(4)] = is.y.toFixed(4); - var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), - t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); - if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) { - if (justCount) { - res++; - } else { - res.push({ - x: is.x, - y: is.y, - t1: mmin(t1, 1), - t2: mmin(t2, 1) - }); - } - } - } - } - } - return res; - } - /*\ - * Raphael.pathIntersection - [ method ] - ** - * Utility method - ** - * Finds intersections of two paths - > Parameters - - path1 (string) path string - - path2 (string) path string - = (array) dots of intersection - o [ - o { - o x: (number) x coordinate of the point - o y: (number) y coordinate of the point - o t1: (number) t value for segment of path1 - o t2: (number) t value for segment of path2 - o segment1: (number) order number for segment of path1 - o segment2: (number) order number for segment of path2 - o bez1: (array) eight coordinates representing beziér curve for the segment of path1 - o bez2: (array) eight coordinates representing beziér curve for the segment of path2 - o } - o ] - \*/ - R.pathIntersection = function (path1, path2) { - return interPathHelper(path1, path2); - }; - R.pathIntersectionNumber = function (path1, path2) { - return interPathHelper(path1, path2, 1); - }; - function interPathHelper(path1, path2, justCount) { - path1 = R._path2curve(path1); - path2 = R._path2curve(path2); - var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2, - res = justCount ? 0 : []; - for (var i = 0, ii = path1.length; i < ii; i++) { - var pi = path1[i]; - if (pi[0] == "M") { - x1 = x1m = pi[1]; - y1 = y1m = pi[2]; - } else { - if (pi[0] == "C") { - bez1 = [x1, y1].concat(pi.slice(1)); - x1 = bez1[6]; - y1 = bez1[7]; - } else { - bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; - x1 = x1m; - y1 = y1m; - } - for (var j = 0, jj = path2.length; j < jj; j++) { - var pj = path2[j]; - if (pj[0] == "M") { - x2 = x2m = pj[1]; - y2 = y2m = pj[2]; - } else { - if (pj[0] == "C") { - bez2 = [x2, y2].concat(pj.slice(1)); - x2 = bez2[6]; - y2 = bez2[7]; - } else { - bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; - x2 = x2m; - y2 = y2m; - } - var intr = interHelper(bez1, bez2, justCount); - if (justCount) { - res += intr; - } else { - for (var k = 0, kk = intr.length; k < kk; k++) { - intr[k].segment1 = i; - intr[k].segment2 = j; - intr[k].bez1 = bez1; - intr[k].bez2 = bez2; - } - res = res.concat(intr); - } - } - } - } - } - return res; - } - /*\ - * Raphael.isPointInsidePath - [ method ] - ** - * Utility method - ** - * Returns `true` if given point is inside a given closed path. - > Parameters - - path (string) path string - - x (number) x of the point - - y (number) y of the point - = (boolean) true, if point is inside the path - \*/ - R.isPointInsidePath = function (path, x, y) { - var bbox = R.pathBBox(path); - return R.isPointInsideBBox(bbox, x, y) && - interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1; - }; - R._removedFactory = function (methodname) { - return function () { - eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname); - }; - }; - /*\ - * Raphael.pathBBox - [ method ] - ** - * Utility method - ** - * Return bounding box of a given path - > Parameters - - path (string) path string - = (object) bounding box - o { - o x: (number) x coordinate of the left top point of the box - o y: (number) y coordinate of the left top point of the box - o x2: (number) x coordinate of the right bottom point of the box - o y2: (number) y coordinate of the right bottom point of the box - o width: (number) width of the box - o height: (number) height of the box - o cx: (number) x coordinate of the center of the box - o cy: (number) y coordinate of the center of the box - o } - \*/ - var pathDimensions = R.pathBBox = function (path) { - var pth = paths(path); - if (pth.bbox) { - return clone(pth.bbox); - } - if (!path) { - return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; - } - path = path2curve(path); - var x = 0, - y = 0, - X = [], - Y = [], - p; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = p[1]; - y = p[2]; - X.push(x); - Y.push(y); - } else { - var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - X = X[concat](dim.min.x, dim.max.x); - Y = Y[concat](dim.min.y, dim.max.y); - x = p[5]; - y = p[6]; - } - } - var xmin = mmin[apply](0, X), - ymin = mmin[apply](0, Y), - xmax = mmax[apply](0, X), - ymax = mmax[apply](0, Y), - width = xmax - xmin, - height = ymax - ymin, - bb = { - x: xmin, - y: ymin, - x2: xmax, - y2: ymax, - width: width, - height: height, - cx: xmin + width / 2, - cy: ymin + height / 2 - }; - pth.bbox = clone(bb); - return bb; - }, - pathClone = function (pathArray) { - var res = clone(pathArray); - res.toString = R._path2string; - return res; - }, - pathToRelative = R._pathToRelative = function (pathArray) { - var pth = paths(pathArray); - if (pth.rel) { - return pathClone(pth.rel); - } - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = pathArray[0][1]; - y = pathArray[0][2]; - mx = x; - my = y; - start++; - res.push(["M", x, y]); - } - for (var i = start, ii = pathArray.length; i < ii; i++) { - var r = res[i] = [], - pa = pathArray[i]; - if (pa[0] != lowerCase.call(pa[0])) { - r[0] = lowerCase.call(pa[0]); - switch (r[0]) { - case "a": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] - x).toFixed(3); - r[7] = +(pa[7] - y).toFixed(3); - break; - case "v": - r[1] = +(pa[1] - y).toFixed(3); - break; - case "m": - mx = pa[1]; - my = pa[2]; - default: - for (var j = 1, jj = pa.length; j < jj; j++) { - r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); - } - } - } else { - r = res[i] = []; - if (pa[0] == "m") { - mx = pa[1] + x; - my = pa[2] + y; - } - for (var k = 0, kk = pa.length; k < kk; k++) { - res[i][k] = pa[k]; - } - } - var len = res[i].length; - switch (res[i][0]) { - case "z": - x = mx; - y = my; - break; - case "h": - x += +res[i][len - 1]; - break; - case "v": - y += +res[i][len - 1]; - break; - default: - x += +res[i][len - 2]; - y += +res[i][len - 1]; - } - } - res.toString = R._path2string; - pth.rel = pathClone(res); - return res; - }, - pathToAbsolute = R._pathToAbsolute = function (pathArray) { - var pth = paths(pathArray); - if (pth.abs) { - return pathClone(pth.abs); - } - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - if (!pathArray || !pathArray.length) { - return [["M", 0, 0]]; - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = +pathArray[0][1]; - y = +pathArray[0][2]; - mx = x; - my = y; - start++; - res[0] = ["M", x, y]; - } - var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z"; - for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { - res.push(r = []); - pa = pathArray[i]; - if (pa[0] != upperCase.call(pa[0])) { - r[0] = upperCase.call(pa[0]); - switch (r[0]) { - case "A": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] + x); - r[7] = +(pa[7] + y); - break; - case "V": - r[1] = +pa[1] + y; - break; - case "H": - r[1] = +pa[1] + x; - break; - case "R": - var dots = [x, y][concat](pa.slice(1)); - for (var j = 2, jj = dots.length; j < jj; j++) { - dots[j] = +dots[j] + x; - dots[++j] = +dots[j] + y; - } - res.pop(); - res = res[concat](catmullRom2bezier(dots, crz)); - break; - case "M": - mx = +pa[1] + x; - my = +pa[2] + y; - default: - for (j = 1, jj = pa.length; j < jj; j++) { - r[j] = +pa[j] + ((j % 2) ? x : y); - } - } - } else if (pa[0] == "R") { - dots = [x, y][concat](pa.slice(1)); - res.pop(); - res = res[concat](catmullRom2bezier(dots, crz)); - r = ["R"][concat](pa.slice(-2)); - } else { - for (var k = 0, kk = pa.length; k < kk; k++) { - r[k] = pa[k]; - } - } - switch (r[0]) { - case "Z": - x = mx; - y = my; - break; - case "H": - x = r[1]; - break; - case "V": - y = r[1]; - break; - case "M": - mx = r[r.length - 2]; - my = r[r.length - 1]; - default: - x = r[r.length - 2]; - y = r[r.length - 1]; - } - } - res.toString = R._path2string; - pth.abs = pathClone(res); - return res; - }, - l2c = function (x1, y1, x2, y2) { - return [x1, y1, x2, y2, x2, y2]; - }, - q2c = function (x1, y1, ax, ay, x2, y2) { - var _13 = 1 / 3, - _23 = 2 / 3; - return [ - _13 * x1 + _23 * ax, - _13 * y1 + _23 * ay, - _13 * x2 + _23 * ax, - _13 * y2 + _23 * ay, - x2, - y2 - ]; - }, - a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { - // for more information of where this math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - var _120 = PI * 120 / 180, - rad = PI / 180 * (+angle || 0), - res = [], - xy, - rotate = cacher(function (x, y, rad) { - var X = x * math.cos(rad) - y * math.sin(rad), - Y = x * math.sin(rad) + y * math.cos(rad); - return {x: X, y: Y}; - }); - if (!recursive) { - xy = rotate(x1, y1, -rad); - x1 = xy.x; - y1 = xy.y; - xy = rotate(x2, y2, -rad); - x2 = xy.x; - y2 = xy.y; - var cos = math.cos(PI / 180 * angle), - sin = math.sin(PI / 180 * angle), - x = (x1 - x2) / 2, - y = (y1 - y2) / 2; - var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); - if (h > 1) { - h = math.sqrt(h); - rx = h * rx; - ry = h * ry; - } - var rx2 = rx * rx, - ry2 = ry * ry, - k = (large_arc_flag == sweep_flag ? -1 : 1) * - math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), - cx = k * rx * y / ry + (x1 + x2) / 2, - cy = k * -ry * x / rx + (y1 + y2) / 2, - f1 = math.asin(((y1 - cy) / ry).toFixed(9)), - f2 = math.asin(((y2 - cy) / ry).toFixed(9)); - - f1 = x1 < cx ? PI - f1 : f1; - f2 = x2 < cx ? PI - f2 : f2; - f1 < 0 && (f1 = PI * 2 + f1); - f2 < 0 && (f2 = PI * 2 + f2); - if (sweep_flag && f1 > f2) { - f1 = f1 - PI * 2; - } - if (!sweep_flag && f2 > f1) { - f2 = f2 - PI * 2; - } - } else { - f1 = recursive[0]; - f2 = recursive[1]; - cx = recursive[2]; - cy = recursive[3]; - } - var df = f2 - f1; - if (abs(df) > _120) { - var f2old = f2, - x2old = x2, - y2old = y2; - f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); - x2 = cx + rx * math.cos(f2); - y2 = cy + ry * math.sin(f2); - res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); - } - df = f2 - f1; - var c1 = math.cos(f1), - s1 = math.sin(f1), - c2 = math.cos(f2), - s2 = math.sin(f2), - t = math.tan(df / 4), - hx = 4 / 3 * rx * t, - hy = 4 / 3 * ry * t, - m1 = [x1, y1], - m2 = [x1 + hx * s1, y1 - hy * c1], - m3 = [x2 + hx * s2, y2 - hy * c2], - m4 = [x2, y2]; - m2[0] = 2 * m1[0] - m2[0]; - m2[1] = 2 * m1[1] - m2[1]; - if (recursive) { - return [m2, m3, m4][concat](res); - } else { - res = [m2, m3, m4][concat](res).join()[split](","); - var newres = []; - for (var i = 0, ii = res.length; i < ii; i++) { - newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; - } - return newres; - } - }, - findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t; - return { - x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, - y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y - }; - }, - curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), - b = 2 * (c1x - p1x) - 2 * (c2x - c1x), - c = p1x - c1x, - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, - y = [p1y, p2y], - x = [p1x, p2x], - dot; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); - b = 2 * (c1y - p1y) - 2 * (c2y - c1y); - c = p1y - c1y; - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - return { - min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, - max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} - }; - }), - path2curve = R._path2curve = cacher(function (path, path2) { - var pth = !path2 && paths(path); - if (!path2 && pth.curve) { - return pathClone(pth.curve); - } - var p = pathToAbsolute(path), - p2 = path2 && pathToAbsolute(path2), - attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - processPath = function (path, d, pcom) { - var nx, ny, tq = {T:1, Q:1}; - if (!path) { - return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; - } - !(path[0] in tq) && (d.qx = d.qy = null); - switch (path[0]) { - case "M": - d.X = path[1]; - d.Y = path[2]; - break; - case "A": - path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); - break; - case "S": - if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S. - nx = d.x * 2 - d.bx; // And reflect the previous - ny = d.y * 2 - d.by; // command's control point relative to the current point. - } - else { // or some else or nothing - nx = d.x; - ny = d.y; - } - path = ["C", nx, ny][concat](path.slice(1)); - break; - case "T": - if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T. - d.qx = d.x * 2 - d.qx; // And make a reflection similar - d.qy = d.y * 2 - d.qy; // to case "S". - } - else { // or something else or nothing - d.qx = d.x; - d.qy = d.y; - } - path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); - break; - case "Q": - d.qx = path[1]; - d.qy = path[2]; - path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); - break; - case "L": - path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); - break; - case "H": - path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); - break; - case "V": - path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); - break; - case "Z": - path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); - break; - } - return path; - }, - fixArc = function (pp, i) { - if (pp[i].length > 7) { - pp[i].shift(); - var pi = pp[i]; - while (pi.length) { - pcoms1[i]="A"; // if created multiple C:s, their original seg is saved - p2 && (pcoms2[i]="A"); // the same as above - pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); - } - pp.splice(i, 1); - ii = mmax(p.length, p2 && p2.length || 0); - } - }, - fixM = function (path1, path2, a1, a2, i) { - if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { - path2.splice(i, 0, ["M", a2.x, a2.y]); - a1.bx = 0; - a1.by = 0; - a1.x = path1[i][1]; - a1.y = path1[i][2]; - ii = mmax(p.length, p2 && p2.length || 0); - } - }, - pcoms1 = [], // path commands of original path p - pcoms2 = [], // path commands of original path p2 - pfirst = "", // temporary holder for original path command - pcom = ""; // holder for previous path command of original path - for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { - p[i] && (pfirst = p[i][0]); // save current path command - - if (pfirst != "C") // C is not saved yet, because it may be result of conversion - { - pcoms1[i] = pfirst; // Save current path command - i && ( pcom = pcoms1[i-1]); // Get previous path command pcom - } - p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath - - if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command - // which may produce multiple C:s - // so we have to make sure that C is also C in original path - - fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 - - if (p2) { // the same procedures is done to p2 - p2[i] && (pfirst = p2[i][0]); - if (pfirst != "C") - { - pcoms2[i] = pfirst; - i && (pcom = pcoms2[i-1]); - } - p2[i] = processPath(p2[i], attrs2, pcom); - - if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C"; - - fixArc(p2, i); - } - fixM(p, p2, attrs, attrs2, i); - fixM(p2, p, attrs2, attrs, i); - var seg = p[i], - seg2 = p2 && p2[i], - seglen = seg.length, - seg2len = p2 && seg2.length; - attrs.x = seg[seglen - 2]; - attrs.y = seg[seglen - 1]; - attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; - attrs.by = toFloat(seg[seglen - 3]) || attrs.y; - attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); - attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); - attrs2.x = p2 && seg2[seg2len - 2]; - attrs2.y = p2 && seg2[seg2len - 1]; - } - if (!p2) { - pth.curve = pathClone(p); - } - return p2 ? [p, p2] : p; - }, null, pathClone), - parseDots = R._parseDots = cacher(function (gradient) { - var dots = []; - for (var i = 0, ii = gradient.length; i < ii; i++) { - var dot = {}, - par = gradient[i].match(/^([^:]*):?([\d\.]*)/); - dot.color = R.getRGB(par[1]); - if (dot.color.error) { - return null; - } - dot.opacity = dot.color.opacity; - dot.color = dot.color.hex; - par[2] && (dot.offset = par[2] + "%"); - dots.push(dot); - } - for (i = 1, ii = dots.length - 1; i < ii; i++) { - if (!dots[i].offset) { - var start = toFloat(dots[i - 1].offset || 0), - end = 0; - for (var j = i + 1; j < ii; j++) { - if (dots[j].offset) { - end = dots[j].offset; - break; - } - } - if (!end) { - end = 100; - j = ii; - } - end = toFloat(end); - var d = (end - start) / (j - i + 1); - for (; i < j; i++) { - start += d; - dots[i].offset = start + "%"; - } - } - } - return dots; - }), - tear = R._tear = function (el, paper) { - el == paper.top && (paper.top = el.prev); - el == paper.bottom && (paper.bottom = el.next); - el.next && (el.next.prev = el.prev); - el.prev && (el.prev.next = el.next); - }, - tofront = R._tofront = function (el, paper) { - if (paper.top === el) { - return; - } - tear(el, paper); - el.next = null; - el.prev = paper.top; - paper.top.next = el; - paper.top = el; - }, - toback = R._toback = function (el, paper) { - if (paper.bottom === el) { - return; - } - tear(el, paper); - el.next = paper.bottom; - el.prev = null; - paper.bottom.prev = el; - paper.bottom = el; - }, - insertafter = R._insertafter = function (el, el2, paper) { - tear(el, paper); - el2 == paper.top && (paper.top = el); - el2.next && (el2.next.prev = el); - el.next = el2.next; - el.prev = el2; - el2.next = el; - }, - insertbefore = R._insertbefore = function (el, el2, paper) { - tear(el, paper); - el2 == paper.bottom && (paper.bottom = el); - el2.prev && (el2.prev.next = el); - el.prev = el2.prev; - el2.prev = el; - el.next = el2; - }, - /*\ - * Raphael.toMatrix - [ method ] - ** - * Utility method - ** - * Returns matrix of transformations applied to a given path - > Parameters - - path (string) path string - - transform (string|array) transformation string - = (object) @Matrix - \*/ - toMatrix = R.toMatrix = function (path, transform) { - var bb = pathDimensions(path), - el = { - _: { - transform: E - }, - getBBox: function () { - return bb; - } - }; - extractTransform(el, transform); - return el.matrix; - }, - /*\ - * Raphael.transformPath - [ method ] - ** - * Utility method - ** - * Returns path transformed by a given transformation - > Parameters - - path (string) path string - - transform (string|array) transformation string - = (string) path - \*/ - transformPath = R.transformPath = function (path, transform) { - return mapPath(path, toMatrix(path, transform)); - }, - extractTransform = R._extractTransform = function (el, tstr) { - if (tstr == null) { - return el._.transform; - } - tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); - var tdata = R.parseTransformString(tstr), - deg = 0, - dx = 0, - dy = 0, - sx = 1, - sy = 1, - _ = el._, - m = new Matrix; - _.transform = tdata || []; - if (tdata) { - for (var i = 0, ii = tdata.length; i < ii; i++) { - var t = tdata[i], - tlen = t.length, - command = Str(t[0]).toLowerCase(), - absolute = t[0] != command, - inver = absolute ? m.invert() : 0, - x1, - y1, - x2, - y2, - bb; - if (command == "t" && tlen == 3) { - if (absolute) { - x1 = inver.x(0, 0); - y1 = inver.y(0, 0); - x2 = inver.x(t[1], t[2]); - y2 = inver.y(t[1], t[2]); - m.translate(x2 - x1, y2 - y1); - } else { - m.translate(t[1], t[2]); - } - } else if (command == "r") { - if (tlen == 2) { - bb = bb || el.getBBox(1); - m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); - deg += t[1]; - } else if (tlen == 4) { - if (absolute) { - x2 = inver.x(t[2], t[3]); - y2 = inver.y(t[2], t[3]); - m.rotate(t[1], x2, y2); - } else { - m.rotate(t[1], t[2], t[3]); - } - deg += t[1]; - } - } else if (command == "s") { - if (tlen == 2 || tlen == 3) { - bb = bb || el.getBBox(1); - m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); - sx *= t[1]; - sy *= t[tlen - 1]; - } else if (tlen == 5) { - if (absolute) { - x2 = inver.x(t[3], t[4]); - y2 = inver.y(t[3], t[4]); - m.scale(t[1], t[2], x2, y2); - } else { - m.scale(t[1], t[2], t[3], t[4]); - } - sx *= t[1]; - sy *= t[2]; - } - } else if (command == "m" && tlen == 7) { - m.add(t[1], t[2], t[3], t[4], t[5], t[6]); - } - _.dirtyT = 1; - el.matrix = m; - } - } - - /*\ - * Element.matrix - [ property (object) ] - ** - * Keeps @Matrix object, which represents element transformation - \*/ - el.matrix = m; - - _.sx = sx; - _.sy = sy; - _.deg = deg; - _.dx = dx = m.e; - _.dy = dy = m.f; - - if (sx == 1 && sy == 1 && !deg && _.bbox) { - _.bbox.x += +dx; - _.bbox.y += +dy; - } else { - _.dirtyT = 1; - } - }, - getEmpty = function (item) { - var l = item[0]; - switch (l.toLowerCase()) { - case "t": return [l, 0, 0]; - case "m": return [l, 1, 0, 0, 1, 0, 0]; - case "r": if (item.length == 4) { - return [l, 0, item[2], item[3]]; - } else { - return [l, 0]; - } - case "s": if (item.length == 5) { - return [l, 1, 1, item[3], item[4]]; - } else if (item.length == 3) { - return [l, 1, 1]; - } else { - return [l, 1]; - } - } - }, - equaliseTransform = R._equaliseTransform = function (t1, t2) { - t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); - t1 = R.parseTransformString(t1) || []; - t2 = R.parseTransformString(t2) || []; - var maxlength = mmax(t1.length, t2.length), - from = [], - to = [], - i = 0, j, jj, - tt1, tt2; - for (; i < maxlength; i++) { - tt1 = t1[i] || getEmpty(t2[i]); - tt2 = t2[i] || getEmpty(tt1); - if ((tt1[0] != tt2[0]) || - (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || - (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) - ) { - return; - } - from[i] = []; - to[i] = []; - for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { - j in tt1 && (from[i][j] = tt1[j]); - j in tt2 && (to[i][j] = tt2[j]); - } - } - return { - from: from, - to: to - }; - }; - R._getContainer = function (x, y, w, h) { - var container; - container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; - if (container == null) { - return; - } - if (container.tagName) { - if (y == null) { - return { - container: container, - width: container.style.pixelWidth || container.offsetWidth, - height: container.style.pixelHeight || container.offsetHeight - }; - } else { - return { - container: container, - width: y, - height: w - }; - } - } - return { - container: 1, - x: x, - y: y, - width: w, - height: h - }; - }; - /*\ - * Raphael.pathToRelative - [ method ] - ** - * Utility method - ** - * Converts path to relative form - > Parameters - - pathString (string|array) path string or array of segments - = (array) array of segments. - \*/ - R.pathToRelative = pathToRelative; - R._engine = {}; - /*\ - * Raphael.path2curve - [ method ] - ** - * Utility method - ** - * Converts path to a new path where all segments are cubic bezier curves. - > Parameters - - pathString (string|array) path string or array of segments - = (array) array of segments. - \*/ - R.path2curve = path2curve; - /*\ - * Raphael.matrix - [ method ] - ** - * Utility method - ** - * Returns matrix based on given parameters. - > Parameters - - a (number) - - b (number) - - c (number) - - d (number) - - e (number) - - f (number) - = (object) @Matrix - \*/ - R.matrix = function (a, b, c, d, e, f) { - return new Matrix(a, b, c, d, e, f); - }; - function Matrix(a, b, c, d, e, f) { - if (a != null) { - this.a = +a; - this.b = +b; - this.c = +c; - this.d = +d; - this.e = +e; - this.f = +f; - } else { - this.a = 1; - this.b = 0; - this.c = 0; - this.d = 1; - this.e = 0; - this.f = 0; - } - } - (function (matrixproto) { - /*\ - * Matrix.add - [ method ] - ** - * Adds given matrix to existing one. - > Parameters - - a (number) - - b (number) - - c (number) - - d (number) - - e (number) - - f (number) - or - - matrix (object) @Matrix - \*/ - matrixproto.add = function (a, b, c, d, e, f) { - var out = [[], [], []], - m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], - matrix = [[a, c, e], [b, d, f], [0, 0, 1]], - x, y, z, res; - - if (a && a instanceof Matrix) { - matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; - } - - for (x = 0; x < 3; x++) { - for (y = 0; y < 3; y++) { - res = 0; - for (z = 0; z < 3; z++) { - res += m[x][z] * matrix[z][y]; - } - out[x][y] = res; - } - } - this.a = out[0][0]; - this.b = out[1][0]; - this.c = out[0][1]; - this.d = out[1][1]; - this.e = out[0][2]; - this.f = out[1][2]; - }; - /*\ - * Matrix.invert - [ method ] - ** - * Returns inverted version of the matrix - = (object) @Matrix - \*/ - matrixproto.invert = function () { - var me = this, - x = me.a * me.d - me.b * me.c; - return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); - }; - /*\ - * Matrix.clone - [ method ] - ** - * Returns copy of the matrix - = (object) @Matrix - \*/ - matrixproto.clone = function () { - return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); - }; - /*\ - * Matrix.translate - [ method ] - ** - * Translate the matrix - > Parameters - - x (number) - - y (number) - \*/ - matrixproto.translate = function (x, y) { - this.add(1, 0, 0, 1, x, y); - }; - /*\ - * Matrix.scale - [ method ] - ** - * Scales the matrix - > Parameters - - x (number) - - y (number) #optional - - cx (number) #optional - - cy (number) #optional - \*/ - matrixproto.scale = function (x, y, cx, cy) { - y == null && (y = x); - (cx || cy) && this.add(1, 0, 0, 1, cx, cy); - this.add(x, 0, 0, y, 0, 0); - (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); - }; - /*\ - * Matrix.rotate - [ method ] - ** - * Rotates the matrix - > Parameters - - a (number) - - x (number) - - y (number) - \*/ - matrixproto.rotate = function (a, x, y) { - a = R.rad(a); - x = x || 0; - y = y || 0; - var cos = +math.cos(a).toFixed(9), - sin = +math.sin(a).toFixed(9); - this.add(cos, sin, -sin, cos, x, y); - this.add(1, 0, 0, 1, -x, -y); - }; - /*\ - * Matrix.x - [ method ] - ** - * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y - > Parameters - - x (number) - - y (number) - = (number) x - \*/ - matrixproto.x = function (x, y) { - return x * this.a + y * this.c + this.e; - }; - /*\ - * Matrix.y - [ method ] - ** - * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x - > Parameters - - x (number) - - y (number) - = (number) y - \*/ - matrixproto.y = function (x, y) { - return x * this.b + y * this.d + this.f; - }; - matrixproto.get = function (i) { - return +this[Str.fromCharCode(97 + i)].toFixed(4); - }; - matrixproto.toString = function () { - return R.svg ? - "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : - [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); - }; - matrixproto.toFilter = function () { - return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + - ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + - ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; - }; - matrixproto.offset = function () { - return [this.e.toFixed(4), this.f.toFixed(4)]; - }; - function norm(a) { - return a[0] * a[0] + a[1] * a[1]; - } - function normalize(a) { - var mag = math.sqrt(norm(a)); - a[0] && (a[0] /= mag); - a[1] && (a[1] /= mag); - } - /*\ - * Matrix.split - [ method ] - ** - * Splits matrix into primitive transformations - = (object) in format: - o dx (number) translation by x - o dy (number) translation by y - o scalex (number) scale by x - o scaley (number) scale by y - o shear (number) shear - o rotate (number) rotation in deg - o isSimple (boolean) could it be represented via simple transformations - \*/ - matrixproto.split = function () { - var out = {}; - // translation - out.dx = this.e; - out.dy = this.f; - - // scale and shear - var row = [[this.a, this.c], [this.b, this.d]]; - out.scalex = math.sqrt(norm(row[0])); - normalize(row[0]); - - out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; - row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; - - out.scaley = math.sqrt(norm(row[1])); - normalize(row[1]); - out.shear /= out.scaley; - - // rotation - var sin = -row[0][1], - cos = row[1][1]; - if (cos < 0) { - out.rotate = R.deg(math.acos(cos)); - if (sin < 0) { - out.rotate = 360 - out.rotate; - } - } else { - out.rotate = R.deg(math.asin(sin)); - } - - out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); - out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; - out.noRotation = !+out.shear.toFixed(9) && !out.rotate; - return out; - }; - /*\ - * Matrix.toTransformString - [ method ] - ** - * Return transform string that represents given matrix - = (string) transform string - \*/ - matrixproto.toTransformString = function (shorter) { - var s = shorter || this[split](); - if (s.isSimple) { - s.scalex = +s.scalex.toFixed(4); - s.scaley = +s.scaley.toFixed(4); - s.rotate = +s.rotate.toFixed(4); - return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + - (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + - (s.rotate ? "r" + [s.rotate, 0, 0] : E); - } else { - return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; - } - }; - })(Matrix.prototype); - - var preventDefault = function () { - this.returnValue = false; - }, - preventTouch = function () { - return this.originalEvent.preventDefault(); - }, - stopPropagation = function () { - this.cancelBubble = true; - }, - stopTouch = function () { - return this.originalEvent.stopPropagation(); - }, - getEventPosition = function (e) { - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - - return { - x: e.clientX + scrollX, - y: e.clientY + scrollY - }; - }, - addEvent = (function () { - if (g.doc.addEventListener) { - return function (obj, type, fn, element) { - var f = function (e) { - var pos = getEventPosition(e); - return fn.call(element, e, pos.x, pos.y); - }; - obj.addEventListener(type, f, false); - - if (supportsTouch && touchMap[type]) { - var _f = function (e) { - var pos = getEventPosition(e), - olde = e; - - for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { - if (e.targetTouches[i].target == obj) { - e = e.targetTouches[i]; - e.originalEvent = olde; - e.preventDefault = preventTouch; - e.stopPropagation = stopTouch; - break; - } - } - - return fn.call(element, e, pos.x, pos.y); - }; - obj.addEventListener(touchMap[type], _f, false); - } - - return function () { - obj.removeEventListener(type, f, false); - - if (supportsTouch && touchMap[type]) - obj.removeEventListener(touchMap[type], _f, false); - - return true; - }; - }; - } else if (g.doc.attachEvent) { - return function (obj, type, fn, element) { - var f = function (e) { - e = e || g.win.event; - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - x = e.clientX + scrollX, - y = e.clientY + scrollY; - e.preventDefault = e.preventDefault || preventDefault; - e.stopPropagation = e.stopPropagation || stopPropagation; - return fn.call(element, e, x, y); - }; - obj.attachEvent("on" + type, f); - var detacher = function () { - obj.detachEvent("on" + type, f); - return true; - }; - return detacher; - }; - } - })(), - drag = [], - dragMove = function (e) { - var x = e.clientX, - y = e.clientY, - scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - dragi, - j = drag.length; - while (j--) { - dragi = drag[j]; - if (supportsTouch && e.touches) { - var i = e.touches.length, - touch; - while (i--) { - touch = e.touches[i]; - if (touch.identifier == dragi.el._drag.id) { - x = touch.clientX; - y = touch.clientY; - (e.originalEvent ? e.originalEvent : e).preventDefault(); - break; - } - } - } else { - e.preventDefault(); - } - var node = dragi.el.node, - o, - next = node.nextSibling, - parent = node.parentNode, - display = node.style.display; - g.win.opera && parent.removeChild(node); - node.style.display = "none"; - o = dragi.el.paper.getElementByPoint(x, y); - node.style.display = display; - g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); - o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o); - x += scrollX; - y += scrollY; - eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); - } - }, - dragUp = function (e) { - R.unmousemove(dragMove).unmouseup(dragUp); - var i = drag.length, - dragi; - while (i--) { - dragi = drag[i]; - dragi.el._drag = {}; - eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); - } - drag = []; - }, - /*\ - * Raphael.el - [ property (object) ] - ** - * You can add your own method to elements. This is usefull when you want to hack default functionality or - * want to wrap some common transformation or attributes in one method. In difference to canvas methods, - * you can redefine element method at any time. Expending element methods wouldn’t affect set. - > Usage - | Raphael.el.red = function () { - | this.attr({fill: "#f00"}); - | }; - | // then use it - | paper.circle(100, 100, 20).red(); - \*/ - elproto = R.el = {}; - /*\ - * Element.click - [ method ] - ** - * Adds event handler for click for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unclick - [ method ] - ** - * Removes event handler for click for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.dblclick - [ method ] - ** - * Adds event handler for double click for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.undblclick - [ method ] - ** - * Removes event handler for double click for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mousedown - [ method ] - ** - * Adds event handler for mousedown for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmousedown - [ method ] - ** - * Removes event handler for mousedown for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mousemove - [ method ] - ** - * Adds event handler for mousemove for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmousemove - [ method ] - ** - * Removes event handler for mousemove for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseout - [ method ] - ** - * Adds event handler for mouseout for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseout - [ method ] - ** - * Removes event handler for mouseout for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseover - [ method ] - ** - * Adds event handler for mouseover for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseover - [ method ] - ** - * Removes event handler for mouseover for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.mouseup - [ method ] - ** - * Adds event handler for mouseup for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.unmouseup - [ method ] - ** - * Removes event handler for mouseup for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchstart - [ method ] - ** - * Adds event handler for touchstart for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchstart - [ method ] - ** - * Removes event handler for touchstart for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchmove - [ method ] - ** - * Adds event handler for touchmove for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchmove - [ method ] - ** - * Removes event handler for touchmove for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchend - [ method ] - ** - * Adds event handler for touchend for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchend - [ method ] - ** - * Removes event handler for touchend for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - - /*\ - * Element.touchcancel - [ method ] - ** - * Adds event handler for touchcancel for the element. - > Parameters - - handler (function) handler for the event - = (object) @Element - \*/ - /*\ - * Element.untouchcancel - [ method ] - ** - * Removes event handler for touchcancel for the element. - > Parameters - - handler (function) #optional handler for the event - = (object) @Element - \*/ - for (var i = events.length; i--;) { - (function (eventName) { - R[eventName] = elproto[eventName] = function (fn, scope) { - if (R.is(fn, "function")) { - this.events = this.events || []; - this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); - } - return this; - }; - R["un" + eventName] = elproto["un" + eventName] = function (fn) { - var events = this.events || [], - l = events.length; - while (l--){ - if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) { - events[l].unbind(); - events.splice(l, 1); - !events.length && delete this.events; - } - } - return this; - }; - })(events[i]); - } - - /*\ - * Element.data - [ method ] - ** - * Adds or retrieves given value asociated with given key. - ** - * See also @Element.removeData - > Parameters - - key (string) key to store data - - value (any) #optional value to store - = (object) @Element - * or, if value is not specified: - = (any) value - * or, if key and value are not specified: - = (object) Key/value pairs for all the data associated with the element. - > Usage - | for (var i = 0, i < 5, i++) { - | paper.circle(10 + 15 * i, 10, 10) - | .attr({fill: "#000"}) - | .data("i", i) - | .click(function () { - | alert(this.data("i")); - | }); - | } - \*/ - elproto.data = function (key, value) { - var data = eldata[this.id] = eldata[this.id] || {}; - if (arguments.length == 0) { - return data; - } - if (arguments.length == 1) { - if (R.is(key, "object")) { - for (var i in key) if (key[has](i)) { - this.data(i, key[i]); - } - return this; - } - eve("raphael.data.get." + this.id, this, data[key], key); - return data[key]; - } - data[key] = value; - eve("raphael.data.set." + this.id, this, value, key); - return this; - }; - - elproto.datum = function(){ - return arguments.length == 0 ? this._bindData : ((this._bindData = arguments[0]), this); - }; - - /*\ - * Element.removeData - [ method ] - ** - * Removes value associated with an element by given key. - * If key is not provided, removes all the data of the element. - > Parameters - - key (string) #optional key - = (object) @Element - \*/ - elproto.removeData = function (key) { - if (key == null) { - eldata[this.id] = {}; - } else { - eldata[this.id] && delete eldata[this.id][key]; - } - return this; - }; - /*\ - * Element.getData - [ method ] - ** - * Retrieves the element data - = (object) data - \*/ - elproto.getData = function () { - return clone(eldata[this.id] || {}); - }; - /*\ - * Element.hover - [ method ] - ** - * Adds event handlers for hover for the element. - > Parameters - - f_in (function) handler for hover in - - f_out (function) handler for hover out - - icontext (object) #optional context for hover in handler - - ocontext (object) #optional context for hover out handler - = (object) @Element - \*/ - elproto.hover = function (f_in, f_out, scope_in, scope_out) { - return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); - }; - /*\ - * Element.unhover - [ method ] - ** - * Removes event handlers for hover for the element. - > Parameters - - f_in (function) handler for hover in - - f_out (function) handler for hover out - = (object) @Element - \*/ - elproto.unhover = function (f_in, f_out) { - return this.unmouseover(f_in).unmouseout(f_out); - }; - var draggable = []; - /*\ - * Element.drag - [ method ] - ** - * Adds event handlers for drag of the element. - > Parameters - - onmove (function) handler for moving - - onstart (function) handler for drag start - - onend (function) handler for drag end - - mcontext (object) #optional context for moving handler - - scontext (object) #optional context for drag start handler - - econtext (object) #optional context for drag end handler - * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start, - * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element - * `drag.over.<id>` will be fired as well. - * - * Start event and start handler will be called in specified context or in context of the element with following parameters: - o x (number) x position of the mouse - o y (number) y position of the mouse - o event (object) DOM event object - * Move event and move handler will be called in specified context or in context of the element with following parameters: - o dx (number) shift by x from the start point - o dy (number) shift by y from the start point - o x (number) x position of the mouse - o y (number) y position of the mouse - o event (object) DOM event object - * End event and end handler will be called in specified context or in context of the element with following parameters: - o event (object) DOM event object - = (object) @Element - \*/ - elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { - function start(e) { - (e.originalEvent || e).preventDefault(); - var x = e.clientX, - y = e.clientY, - scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - this._drag.id = e.identifier; - if (supportsTouch && e.touches) { - var i = e.touches.length, touch; - while (i--) { - touch = e.touches[i]; - this._drag.id = touch.identifier; - if (touch.identifier == this._drag.id) { - x = touch.clientX; - y = touch.clientY; - break; - } - } - } - this._drag.x = x + scrollX; - this._drag.y = y + scrollY; - !drag.length && R.mousemove(dragMove).mouseup(dragUp); - drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); - onstart && eve.on("raphael.drag.start." + this.id, onstart); - onmove && eve.on("raphael.drag.move." + this.id, onmove); - onend && eve.on("raphael.drag.end." + this.id, onend); - eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); - } - this._drag = {}; - draggable.push({el: this, start: start}); - this.mousedown(start); - return this; - }; - /*\ - * Element.onDragOver - [ method ] - ** - * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id). - > Parameters - - f (function) handler for event, first argument would be the element you are dragging over - \*/ - elproto.onDragOver = function (f) { - f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id); - }; - /*\ - * Element.undrag - [ method ] - ** - * Removes all drag event handlers from given element. - \*/ - elproto.undrag = function () { - var i = draggable.length; - while (i--) if (draggable[i].el == this) { - this.unmousedown(draggable[i].start); - draggable.splice(i, 1); - eve.unbind("raphael.drag.*." + this.id); - } - !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); - drag = []; - }; - /*\ - * Paper.circle - [ method ] - ** - * Draws a circle. - ** - > Parameters - ** - - x (number) x coordinate of the centre - - y (number) y coordinate of the centre - - r (number) radius - = (object) Raphaël element object with type “circle” - ** - > Usage - | var c = paper.circle(50, 50, 40); - \*/ - paperproto.circle = function (x, y, r) { - var out = R._engine.circle(this, x || 0, y || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.rect - [ method ] - * - * Draws a rectangle. - ** - > Parameters - ** - - x (number) x coordinate of the top left corner - - y (number) y coordinate of the top left corner - - width (number) width - - height (number) height - - r (number) #optional radius for rounded corners, default is 0 - = (object) Raphaël element object with type “rect” - ** - > Usage - | // regular rectangle - | var c = paper.rect(10, 10, 50, 50); - | // rectangle with rounded corners - | var c = paper.rect(40, 40, 50, 50, 10); - \*/ - paperproto.rect = function (x, y, w, h, r) { - var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.ellipse - [ method ] - ** - * Draws an ellipse. - ** - > Parameters - ** - - x (number) x coordinate of the centre - - y (number) y coordinate of the centre - - rx (number) horizontal radius - - ry (number) vertical radius - = (object) Raphaël element object with type “ellipse” - ** - > Usage - | var c = paper.ellipse(50, 50, 40, 20); - \*/ - paperproto.ellipse = function (x, y, rx, ry) { - var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.path - [ method ] - ** - * Creates a path element by given path data string. - > Parameters - - pathString (string) #optional path string in SVG format. - * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example: - | "M10,20L30,40" - * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative. - * - # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p> - # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody> - # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr> - # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr> - # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr> - # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr> - # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr> - # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr> - # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr> - # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr> - # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr> - # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr> - # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table> - * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier. - * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning. - > Usage - | var c = paper.path("M10 10L90 90"); - | // draw a diagonal line: - | // move to 10,10, line to 90,90 - * For example of path strings, check out these icons: http://raphaeljs.com/icons/ - \*/ - paperproto.path = function (pathString) { - pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); - var out = R._engine.path(R.format[apply](R, arguments), this); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.image - [ method ] - ** - * Embeds an image into the surface. - ** - > Parameters - ** - - src (string) URI of the source image - - x (number) x coordinate position - - y (number) y coordinate position - - width (number) width of the image - - height (number) height of the image - = (object) Raphaël element object with type “image” - ** - > Usage - | var c = paper.image("apple.png", 10, 10, 80, 80); - \*/ - paperproto.image = function (src, x, y, w, h) { - var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.text - [ method ] - ** - * Draws a text string. If you need line breaks, put “\n” in the string. - ** - > Parameters - ** - - x (number) x coordinate position - - y (number) y coordinate position - - text (string) The text string to draw - = (object) Raphaël element object with type “text” - ** - > Usage - | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); - \*/ - paperproto.text = function (x, y, text) { - var out = R._engine.text(this, x || 0, y || 0, Str(text)); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Paper.set - [ method ] - ** - * Creates array-like object to keep and operate several elements at once. - * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements. - * Sets act as pseudo elements — all methods available to an element can be used on a set. - = (object) array-like object that represents set of elements - ** - > Usage - | var st = paper.set(); - | st.push( - | paper.circle(10, 10, 5), - | paper.circle(30, 10, 5) - | ); - | st.attr({fill: "red"}); // changes the fill of both circles - \*/ - paperproto.set = function (itemsArray) { - !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); - var out = new Set(itemsArray); - this.__set__ && this.__set__.push(out); - out["paper"] = this; - out["type"] = "set"; - return out; - }; - /*\ - * Paper.setStart - [ method ] - ** - * Creates @Paper.set. All elements that will be created after calling this method and before calling - * @Paper.setFinish will be added to the set. - ** - > Usage - | paper.setStart(); - | paper.circle(10, 10, 5), - | paper.circle(30, 10, 5) - | var st = paper.setFinish(); - | st.attr({fill: "red"}); // changes the fill of both circles - \*/ - paperproto.setStart = function (set) { - this.__set__ = set || this.set(); - }; - /*\ - * Paper.setFinish - [ method ] - ** - * See @Paper.setStart. This method finishes catching and returns resulting set. - ** - = (object) set - \*/ - paperproto.setFinish = function (set) { - var out = this.__set__; - delete this.__set__; - return out; - }; - /*\ - * Paper.getSize - [ method ] - ** - * Obtains current paper actual size. - ** - = (object) - \*/ - paperproto.getSize = function () { - var container = this.canvas.parentNode; - return { - width: container.offsetWidth, - height: container.offsetHeight - }; - }; - /*\ - * Paper.setSize - [ method ] - ** - * If you need to change dimensions of the canvas call this method - ** - > Parameters - ** - - width (number) new width of the canvas - - height (number) new height of the canvas - \*/ - paperproto.setSize = function (width, height) { - return R._engine.setSize.call(this, width, height); - }; - /*\ - * Paper.setViewBox - [ method ] - ** - * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by - * specifying new boundaries. - ** - > Parameters - ** - - x (number) new x position, default is `0` - - y (number) new y position, default is `0` - - w (number) new width of the canvas - - h (number) new height of the canvas - - fit (boolean) `true` if you want graphics to fit into new boundary box - \*/ - paperproto.setViewBox = function (x, y, w, h, fit) { - return R._engine.setViewBox.call(this, x, y, w, h, fit); - }; - /*\ - * Paper.top - [ property ] - ** - * Points to the topmost element on the paper - \*/ - /*\ - * Paper.bottom - [ property ] - ** - * Points to the bottom element on the paper - \*/ - paperproto.top = paperproto.bottom = null; - /*\ - * Paper.raphael - [ property ] - ** - * Points to the @Raphael object/function - \*/ - paperproto.raphael = R; - var getOffset = function (elem) { - var box = elem.getBoundingClientRect(), - doc = elem.ownerDocument, - body = doc.body, - docElem = doc.documentElement, - clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, - top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, - left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; - return { - y: top, - x: left - }; - }; - /*\ - * Paper.getElementByPoint - [ method ] - ** - * Returns you topmost element under given point. - ** - = (object) Raphaël element object - > Parameters - ** - - x (number) x coordinate from the top left corner of the window - - y (number) y coordinate from the top left corner of the window - > Usage - | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"}); - \*/ - paperproto.getElementByPoint = function (x, y) { - var paper = this, - svg = paper.canvas, - target = g.doc.elementFromPoint(x, y); - if (g.win.opera && target.tagName == "svg") { - var so = getOffset(svg), - sr = svg.createSVGRect(); - sr.x = x - so.x; - sr.y = y - so.y; - sr.width = sr.height = 1; - var hits = svg.getIntersectionList(sr, null); - if (hits.length) { - target = hits[hits.length - 1]; - } - } - if (!target) { - return null; - } - while (target.parentNode && target != svg.parentNode && !target.raphael) { - target = target.parentNode; - } - target == paper.canvas.parentNode && (target = svg); - target = target && target.raphael ? paper.getById(target.raphaelid) : null; - return target; - }; - - /*\ - * Paper.getElementsByBBox - [ method ] - ** - * Returns set of elements that have an intersecting bounding box - ** - > Parameters - ** - - bbox (object) bbox to check with - = (object) @Set - \*/ - paperproto.getElementsByBBox = function (bbox) { - var set = this.set(); - this.forEach(function (el) { - if (R.isBBoxIntersect(el.getBBox(), bbox)) { - set.push(el); - } - }); - return set; - }; - - /*\ - * Paper.getById - [ method ] - ** - * Returns you element by its internal ID. - ** - > Parameters - ** - - id (number) id - = (object) Raphaël element object - \*/ - paperproto.getById = function (id) { - var bot = this.bottom; - while (bot) { - if (bot.id == id) { - return bot; - } - bot = bot.next; - } - return null; - }; - /*\ - * Paper.forEach - [ method ] - ** - * Executes given function for each element on the paper - * - * If callback function returns `false` it will stop loop running. - ** - > Parameters - ** - - callback (function) function to run - - thisArg (object) context object for the callback - = (object) Paper object - > Usage - | paper.forEach(function (el) { - | el.attr({ stroke: "blue" }); - | }); - \*/ - paperproto.forEach = function (callback, thisArg) { - var bot = this.bottom; - while (bot) { - if (callback.call(thisArg, bot) === false) { - return this; - } - bot = bot.next; - } - return this; - }; - /*\ - * Paper.getElementsByPoint - [ method ] - ** - * Returns set of elements that have common point inside - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (object) @Set - \*/ - paperproto.getElementsByPoint = function (x, y) { - var set = this.set(); - this.forEach(function (el) { - if (el.isPointInside(x, y)) { - set.push(el); - } - }); - return set; - }; - function x_y() { - return this.x + S + this.y; - } - function x_y_w_h() { - return this.x + S + this.y + S + this.width + " \xd7 " + this.height; - } - /*\ - * Element.isPointInside - [ method ] - ** - * Determine if given point is inside this element’s shape - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (boolean) `true` if point inside the shape - \*/ - elproto.isPointInside = function (x, y) { - var rp = this.realPath = getPath[this.type](this); - if (this.attr('transform') && this.attr('transform').length) { - rp = R.transformPath(rp, this.attr('transform')); - } - return R.isPointInsidePath(rp, x, y); - }; - /*\ - * Element.getBBox - [ method ] - ** - * Return bounding box for a given element - ** - > Parameters - ** - - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`. - = (object) Bounding box object: - o { - o x: (number) top left corner x - o y: (number) top left corner y - o x2: (number) bottom right corner x - o y2: (number) bottom right corner y - o width: (number) width - o height: (number) height - o } - \*/ - elproto.getBBox = function (isWithoutTransform) { - if (this.removed) { - return {}; - } - var _ = this._; - if (isWithoutTransform) { - if (_.dirty || !_.bboxwt) { - this.realPath = getPath[this.type](this); - _.bboxwt = pathDimensions(this.realPath); - _.bboxwt.toString = x_y_w_h; - _.dirty = 0; - } - return _.bboxwt; - } - if (_.dirty || _.dirtyT || !_.bbox) { - if (_.dirty || !this.realPath) { - _.bboxwt = 0; - this.realPath = getPath[this.type](this); - } - _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); - _.bbox.toString = x_y_w_h; - _.dirty = _.dirtyT = 0; - } - return _.bbox; - }; - /*\ - * Element.clone - [ method ] - ** - = (object) clone of a given element - ** - \*/ - elproto.clone = function () { - if (this.removed) { - return null; - } - var out = this.paper[this.type]().attr(this.attr()); - this.__set__ && this.__set__.push(out); - return out; - }; - /*\ - * Element.glow - [ method ] - ** - * Return set of elements that create glow-like effect around given element. See @Paper.set. - * - * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself. - ** - > Parameters - ** - - glow (object) #optional parameters object with all properties optional: - o { - o width (number) size of the glow, default is `10` - o fill (boolean) will it be filled, default is `false` - o opacity (number) opacity, default is `0.5` - o offsetx (number) horizontal offset, default is `0` - o offsety (number) vertical offset, default is `0` - o color (string) glow colour, default is `black` - o } - = (object) @Paper.set of elements that represents glow - \*/ - elproto.glow = function (glow) { - if (this.type == "text") { - return null; - } - glow = glow || {}; - var s = { - width: (glow.width || 10) + (+this.attr("stroke-width") || 1), - fill: glow.fill || false, - opacity: glow.opacity == null ? .5 : glow.opacity, - offsetx: glow.offsetx || 0, - offsety: glow.offsety || 0, - color: glow.color || "#000" - }, - c = s.width / 2, - r = this.paper, - out = r.set(), - path = this.realPath || getPath[this.type](this); - path = this.matrix ? mapPath(path, this.matrix) : path; - for (var i = 1; i < c + 1; i++) { - out.push(r.path(path).attr({ - stroke: s.color, - fill: s.fill ? s.color : "none", - "stroke-linejoin": "round", - "stroke-linecap": "round", - "stroke-width": +(s.width / c * i).toFixed(3), - opacity: +(s.opacity / c).toFixed(3) - })); - } - return out.insertBefore(this).translate(s.offsetx, s.offsety); - }; - var curveslengths = {}, - getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { - if (length == null) { - return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); - } else { - return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); - } - }, - getLengthFactory = function (istotal, subpath) { - return function (path, length, onlystart) { - path = path2curve(path); - var x, y, p, l, sp = "", subpaths = {}, point, - len = 0; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = +p[1]; - y = +p[2]; - } else { - l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - if (len + l > length) { - if (subpath && !subpaths.start) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; - if (onlystart) {return sp;} - subpaths.start = sp; - sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); - len += l; - x = +p[5]; - y = +p[6]; - continue; - } - if (!istotal && !subpath) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - return {x: point.x, y: point.y, alpha: point.alpha}; - } - } - len += l; - x = +p[5]; - y = +p[6]; - } - sp += p.shift() + p; - } - subpaths.end = sp; - point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); - point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); - return point; - }; - }; - var getTotalLength = getLengthFactory(1), - getPointAtLength = getLengthFactory(), - getSubpathsAtLength = getLengthFactory(0, 1); - /*\ - * Raphael.getTotalLength - [ method ] - ** - * Returns length of the given path in pixels. - ** - > Parameters - ** - - path (string) SVG path string. - ** - = (number) length. - \*/ - R.getTotalLength = getTotalLength; - /*\ - * Raphael.getPointAtLength - [ method ] - ** - * Return coordinates of the point located at the given length on the given path. - ** - > Parameters - ** - - path (string) SVG path string - - length (number) - ** - = (object) representation of the point: - o { - o x: (number) x coordinate - o y: (number) y coordinate - o alpha: (number) angle of derivative - o } - \*/ - R.getPointAtLength = getPointAtLength; - /*\ - * Raphael.getSubpath - [ method ] - ** - * Return subpath of a given path from given length to given length. - ** - > Parameters - ** - - path (string) SVG path string - - from (number) position of the start of the segment - - to (number) position of the end of the segment - ** - = (string) pathstring for the segment - \*/ - R.getSubpath = function (path, from, to) { - if (this.getTotalLength(path) - to < 1e-6) { - return getSubpathsAtLength(path, from).end; - } - var a = getSubpathsAtLength(path, to, 1); - return from ? getSubpathsAtLength(a, from).end : a; - }; - /*\ - * Element.getTotalLength - [ method ] - ** - * Returns length of the path in pixels. Only works for element of “path” type. - = (number) length. - \*/ - elproto.getTotalLength = function () { - var path = this.getPath(); - if (!path) { - return; - } - - if (this.node.getTotalLength) { - return this.node.getTotalLength(); - } - - return getTotalLength(path); - }; - /*\ - * Element.getPointAtLength - [ method ] - ** - * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type. - ** - > Parameters - ** - - length (number) - ** - = (object) representation of the point: - o { - o x: (number) x coordinate - o y: (number) y coordinate - o alpha: (number) angle of derivative - o } - \*/ - elproto.getPointAtLength = function (length) { - var path = this.getPath(); - if (!path) { - return; - } - - return getPointAtLength(path, length); - }; - /*\ - * Element.getPath - [ method ] - ** - * Returns path of the element. Only works for elements of “path” type and simple elements like circle. - = (object) path - ** - \*/ - elproto.getPath = function () { - var path, - getPath = R._getPath[this.type]; - - if (this.type == "text" || this.type == "set") { - return; - } - - if (getPath) { - path = getPath(this); - } - - return path; - }; - /*\ - * Element.getSubpath - [ method ] - ** - * Return subpath of a given element from given length to given length. Only works for element of “path” type. - ** - > Parameters - ** - - from (number) position of the start of the segment - - to (number) position of the end of the segment - ** - = (string) pathstring for the segment - \*/ - elproto.getSubpath = function (from, to) { - var path = this.getPath(); - if (!path) { - return; - } - - return R.getSubpath(path, from, to); - }; - /*\ - * Raphael.easing_formulas - [ property ] - ** - * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing: - # <ul> - # <li>“linear”</li> - # <li>“<” or “easeIn” or “ease-in”</li> - # <li>“>” or “easeOut” or “ease-out”</li> - # <li>“<>” or “easeInOut” or “ease-in-out”</li> - # <li>“backIn” or “back-in”</li> - # <li>“backOut” or “back-out”</li> - # <li>“elastic”</li> - # <li>“bounce”</li> - # </ul> - # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p> - \*/ - var ef = R.easing_formulas = { - linear: function (n) { - return n; - }, - "<": function (n) { - return pow(n, 1.7); - }, - ">": function (n) { - return pow(n, .48); - }, - "<>": function (n) { - var q = .48 - n / 1.04, - Q = math.sqrt(.1734 + q * q), - x = Q - q, - X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), - y = -Q - q, - Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), - t = X + Y + .5; - return (1 - t) * 3 * t * t + t * t * t; - }, - backIn: function (n) { - var s = 1.70158; - return n * n * ((s + 1) * n - s); - }, - backOut: function (n) { - n = n - 1; - var s = 1.70158; - return n * n * ((s + 1) * n + s) + 1; - }, - elastic: function (n) { - if (n == !!n) { - return n; - } - return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; - }, - bounce: function (n) { - var s = 7.5625, - p = 2.75, - l; - if (n < (1 / p)) { - l = s * n * n; - } else { - if (n < (2 / p)) { - n -= (1.5 / p); - l = s * n * n + .75; - } else { - if (n < (2.5 / p)) { - n -= (2.25 / p); - l = s * n * n + .9375; - } else { - n -= (2.625 / p); - l = s * n * n + .984375; - } - } - } - return l; - } - }; - ef.easeIn = ef["ease-in"] = ef["<"]; - ef.easeOut = ef["ease-out"] = ef[">"]; - ef.easeInOut = ef["ease-in-out"] = ef["<>"]; - ef["back-in"] = ef.backIn; - ef["back-out"] = ef.backOut; - - var animationElements = [], - requestAnimFrame = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function (callback) { - setTimeout(callback, 16); - }, - animation = function () { - var Now = +new Date, - l = 0; - for (; l < animationElements.length; l++) { - var e = animationElements[l]; - if (e.el.removed || e.paused) { - continue; - } - var time = Now - e.start, - ms = e.ms, - easing = e.easing, - from = e.from, - diff = e.diff, - to = e.to, - t = e.t, - that = e.el, - set = {}, - now, - init = {}, - key; - if (e.initstatus) { - time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; - e.status = e.initstatus; - delete e.initstatus; - e.stop && animationElements.splice(l--, 1); - } else { - e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; - } - if (time < 0) { - continue; - } - if (time < ms) { - var pos = easing(time / ms); - for (var attr in from) if (from[has](attr)) { - switch (availableAnimAttrs[attr]) { - case nu: - now = +from[attr] + pos * ms * diff[attr]; - break; - case "colour": - now = "rgb(" + [ - upto255(round(from[attr].r + pos * ms * diff[attr].r)), - upto255(round(from[attr].g + pos * ms * diff[attr].g)), - upto255(round(from[attr].b + pos * ms * diff[attr].b)) - ].join(",") + ")"; - break; - case "path": - now = []; - for (var i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - now[i] = now[i].join(S); - } - now = now.join(S); - break; - case "transform": - if (diff[attr].real) { - now = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - } - } else { - var get = function (i) { - return +from[attr][i] + pos * ms * diff[attr][i]; - }; - // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; - now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; - } - break; - case "csv": - if (attr == "clip-rect") { - now = []; - i = 4; - while (i--) { - now[i] = +from[attr][i] + pos * ms * diff[attr][i]; - } - } - break; - default: - var from2 = [][concat](from[attr]); - now = []; - i = that.paper.customAttributes[attr].length; - while (i--) { - now[i] = +from2[i] + pos * ms * diff[attr][i]; - } - break; - } - set[attr] = now; - } - that.attr(set); - (function (id, that, anim) { - setTimeout(function () { - eve("raphael.anim.frame." + id, that, anim); - }); - })(that.id, that, e.anim); - } else { - (function(f, el, a) { - setTimeout(function() { - eve("raphael.anim.frame." + el.id, el, a); - eve("raphael.anim.finish." + el.id, el, a); - R.is(f, "function") && f.call(el); - }); - })(e.callback, that, e.anim); - that.attr(to); - animationElements.splice(l--, 1); - if (e.repeat > 1 && !e.next) { - for (key in to) if (to[has](key)) { - init[key] = e.totalOrigin[key]; - } - e.el.attr(init); - runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); - } - if (e.next && !e.stop) { - runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); - } - } - } - animationElements.length && requestAnimFrame(animation); - }, - upto255 = function (color) { - return color > 255 ? 255 : color < 0 ? 0 : color; - }; - /*\ - * Element.animateWith - [ method ] - ** - * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element. - ** - > Parameters - ** - - el (object) element to sync with - - anim (object) animation to sync with - - params (object) #optional final attributes for the element, see also @Element.attr - - ms (number) #optional number of milliseconds for animation to run - - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - * or - - element (object) element to sync with - - anim (object) animation to sync with - - animation (object) #optional animation object, see @Raphael.animation - ** - = (object) original element - \*/ - elproto.animateWith = function (el, anim, params, ms, easing, callback) { - var element = this; - if (element.removed) { - callback && callback.call(element); - return element; - } - var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback), - x, y; - runAnimation(a, element, a.percents[0], null, element.attr()); - for (var i = 0, ii = animationElements.length; i < ii; i++) { - if (animationElements[i].anim == anim && animationElements[i].el == el) { - animationElements[ii - 1].start = animationElements[i].start; - break; - } - } - return element; - // - // - // var a = params ? R.animation(params, ms, easing, callback) : anim, - // status = element.status(anim); - // return this.animate(a).status(a, status * anim.ms / a.ms); - }; - function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { - var cx = 3 * p1x, - bx = 3 * (p2x - p1x) - cx, - ax = 1 - cx - bx, - cy = 3 * p1y, - by = 3 * (p2y - p1y) - cy, - ay = 1 - cy - by; - function sampleCurveX(t) { - return ((ax * t + bx) * t + cx) * t; - } - function solve(x, epsilon) { - var t = solveCurveX(x, epsilon); - return ((ay * t + by) * t + cy) * t; - } - function solveCurveX(x, epsilon) { - var t0, t1, t2, x2, d2, i; - for(t2 = x, i = 0; i < 8; i++) { - x2 = sampleCurveX(t2) - x; - if (abs(x2) < epsilon) { - return t2; - } - d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; - if (abs(d2) < 1e-6) { - break; - } - t2 = t2 - x2 / d2; - } - t0 = 0; - t1 = 1; - t2 = x; - if (t2 < t0) { - return t0; - } - if (t2 > t1) { - return t1; - } - while (t0 < t1) { - x2 = sampleCurveX(t2); - if (abs(x2 - x) < epsilon) { - return t2; - } - if (x > x2) { - t0 = t2; - } else { - t1 = t2; - } - t2 = (t1 - t0) / 2 + t0; - } - return t2; - } - return solve(t, 1 / (200 * duration)); - } - elproto.onAnimation = function (f) { - f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id); - return this; - }; - function Animation(anim, ms) { - var percents = [], - newAnim = {}; - this.ms = ms; - this.times = 1; - if (anim) { - for (var attr in anim) if (anim[has](attr)) { - newAnim[toFloat(attr)] = anim[attr]; - percents.push(toFloat(attr)); - } - percents.sort(sortByNumber); - } - this.anim = newAnim; - this.top = percents[percents.length - 1]; - this.percents = percents; - } - /*\ - * Animation.delay - [ method ] - ** - * Creates a copy of existing animation object with given delay. - ** - > Parameters - ** - - delay (number) number of ms to pass between animation start and actual animation - ** - = (object) new altered Animation object - | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3); - | circle1.animate(anim); // run the given animation immediately - | circle2.animate(anim.delay(500)); // run the given animation after 500 ms - \*/ - Animation.prototype.delay = function (delay) { - var a = new Animation(this.anim, this.ms); - a.times = this.times; - a.del = +delay || 0; - return a; - }; - /*\ - * Animation.repeat - [ method ] - ** - * Creates a copy of existing animation object with given repetition. - ** - > Parameters - ** - - repeat (number) number iterations of animation. For infinite animation pass `Infinity` - ** - = (object) new altered Animation object - \*/ - Animation.prototype.repeat = function (times) { - var a = new Animation(this.anim, this.ms); - a.del = this.del; - a.times = math.floor(mmax(times, 0)) || 1; - return a; - }; - function runAnimation(anim, element, percent, status, totalOrigin, times) { - percent = toFloat(percent); - var params, - isInAnim, - isInAnimSet, - percents = [], - next, - prev, - timestamp, - ms = anim.ms, - from = {}, - to = {}, - diff = {}; - if (status) { - for (i = 0, ii = animationElements.length; i < ii; i++) { - var e = animationElements[i]; - if (e.el.id == element.id && e.anim == anim) { - if (e.percent != percent) { - animationElements.splice(i, 1); - isInAnimSet = 1; - } else { - isInAnim = e; - } - element.attr(e.totalOrigin); - break; - } - } - } else { - status = +to; // NaN - } - for (var i = 0, ii = anim.percents.length; i < ii; i++) { - if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { - percent = anim.percents[i]; - prev = anim.percents[i - 1] || 0; - ms = ms / anim.top * (percent - prev); - next = anim.percents[i + 1]; - params = anim.anim[percent]; - break; - } else if (status) { - element.attr(anim.anim[anim.percents[i]]); - } - } - if (!params) { - return; - } - if (!isInAnim) { - for (var attr in params) if (params[has](attr)) { - if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { - from[attr] = element.attr(attr); - (from[attr] == null) && (from[attr] = availableAttrs[attr]); - to[attr] = params[attr]; - switch (availableAnimAttrs[attr]) { - case nu: - diff[attr] = (to[attr] - from[attr]) / ms; - break; - case "colour": - from[attr] = R.getRGB(from[attr]); - var toColour = R.getRGB(to[attr]); - diff[attr] = { - r: (toColour.r - from[attr].r) / ms, - g: (toColour.g - from[attr].g) / ms, - b: (toColour.b - from[attr].b) / ms - }; - break; - case "path": - var pathes = path2curve(from[attr], to[attr]), - toPath = pathes[1]; - from[attr] = pathes[0]; - diff[attr] = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [0]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; - } - } - break; - case "transform": - var _ = element._, - eq = equaliseTransform(_[attr], to[attr]); - if (eq) { - from[attr] = eq.from; - to[attr] = eq.to; - diff[attr] = []; - diff[attr].real = true; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; - } - } - } else { - var m = (element.matrix || new Matrix), - to2 = { - _: {transform: _.transform}, - getBBox: function () { - return element.getBBox(1); - } - }; - from[attr] = [ - m.a, - m.b, - m.c, - m.d, - m.e, - m.f - ]; - extractTransform(to2, to[attr]); - to[attr] = to2._.transform; - diff[attr] = [ - (to2.matrix.a - m.a) / ms, - (to2.matrix.b - m.b) / ms, - (to2.matrix.c - m.c) / ms, - (to2.matrix.d - m.d) / ms, - (to2.matrix.e - m.e) / ms, - (to2.matrix.f - m.f) / ms - ]; - // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; - // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; - // extractTransform(to2, to[attr]); - // diff[attr] = [ - // (to2._.sx - _.sx) / ms, - // (to2._.sy - _.sy) / ms, - // (to2._.deg - _.deg) / ms, - // (to2._.dx - _.dx) / ms, - // (to2._.dy - _.dy) / ms - // ]; - } - break; - case "csv": - var values = Str(params[attr])[split](separator), - from2 = Str(from[attr])[split](separator); - if (attr == "clip-rect") { - from[attr] = from2; - diff[attr] = []; - i = from2.length; - while (i--) { - diff[attr][i] = (values[i] - from[attr][i]) / ms; - } - } - to[attr] = values; - break; - default: - values = [][concat](params[attr]); - from2 = [][concat](from[attr]); - diff[attr] = []; - i = element.paper.customAttributes[attr].length; - while (i--) { - diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; - } - break; - } - } - } - var easing = params.easing, - easyeasy = R.easing_formulas[easing]; - if (!easyeasy) { - easyeasy = Str(easing).match(bezierrg); - if (easyeasy && easyeasy.length == 5) { - var curve = easyeasy; - easyeasy = function (t) { - return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); - }; - } else { - easyeasy = pipe; - } - } - timestamp = params.start || anim.start || +new Date; - e = { - anim: anim, - percent: percent, - timestamp: timestamp, - start: timestamp + (anim.del || 0), - status: 0, - initstatus: status || 0, - stop: false, - ms: ms, - easing: easyeasy, - from: from, - diff: diff, - to: to, - el: element, - callback: params.callback, - prev: prev, - next: next, - repeat: times || anim.times, - origin: element.attr(), - totalOrigin: totalOrigin - }; - animationElements.push(e); - if (status && !isInAnim && !isInAnimSet) { - e.stop = true; - e.start = new Date - ms * status; - if (animationElements.length == 1) { - return animation(); - } - } - if (isInAnimSet) { - e.start = new Date - e.ms * status; - } - animationElements.length == 1 && requestAnimFrame(animation); - } else { - isInAnim.initstatus = status; - isInAnim.start = new Date - isInAnim.ms * status; - } - eve("raphael.anim.start." + element.id, element, anim); - } - /*\ - * Raphael.animation - [ method ] - ** - * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods. - * See also @Animation.delay and @Animation.repeat methods. - ** - > Parameters - ** - - params (object) final attributes for the element, see also @Element.attr - - ms (number) number of milliseconds for animation to run - - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - ** - = (object) @Animation - \*/ - R.animation = function (params, ms, easing, callback) { - if (params instanceof Animation) { - return params; - } - if (R.is(easing, "function") || !easing) { - callback = callback || easing || null; - easing = null; - } - params = Object(params); - ms = +ms || 0; - var p = {}, - json, - attr; - for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { - json = true; - p[attr] = params[attr]; - } - if (!json) { - // if percent-like syntax is used and end-of-all animation callback used - if(callback){ - // find the last one - var lastKey = 0; - for(var i in params){ - var percent = toInt(i); - if(params[has](i) && percent > lastKey){ - lastKey = percent; - } - } - lastKey += '%'; - // if already defined callback in the last keyframe, skip - !params[lastKey].callback && (params[lastKey].callback = callback); - } - return new Animation(params, ms); - } else { - easing && (p.easing = easing); - callback && (p.callback = callback); - return new Animation({100: p}, ms); - } - }; - /*\ - * Element.animate - [ method ] - ** - * Creates and starts animation for given element. - ** - > Parameters - ** - - params (object) final attributes for the element, see also @Element.attr - - ms (number) number of milliseconds for animation to run - - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` - - callback (function) #optional callback function. Will be called at the end of animation. - * or - - animation (object) animation object, see @Raphael.animation - ** - = (object) original element - \*/ - elproto.animate = function (params, ms, easing, callback) { - var element = this; - if (element.removed) { - callback && callback.call(element); - return element; - } - var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); - runAnimation(anim, element, anim.percents[0], null, element.attr()); - return element; - }; - /*\ - * Element.setTime - [ method ] - ** - * Sets the status of animation of the element in milliseconds. Similar to @Element.status method. - ** - > Parameters - ** - - anim (object) animation object - - value (number) number of milliseconds from the beginning of the animation - ** - = (object) original element if `value` is specified - * Note, that during animation following events are triggered: - * - * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`. - \*/ - elproto.setTime = function (anim, value) { - if (anim && value != null) { - this.status(anim, mmin(value, anim.ms) / anim.ms); - } - return this; - }; - /*\ - * Element.status - [ method ] - ** - * Gets or sets the status of animation of the element. - ** - > Parameters - ** - - anim (object) #optional animation object - - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position. - ** - = (number) status - * or - = (array) status if `anim` is not specified. Array of objects in format: - o { - o anim: (object) animation object - o status: (number) status - o } - * or - = (object) original element if `value` is specified - \*/ - elproto.status = function (anim, value) { - var out = [], - i = 0, - len, - e; - if (value != null) { - runAnimation(anim, this, -1, mmin(value, 1)); - return this; - } else { - len = animationElements.length; - for (; i < len; i++) { - e = animationElements[i]; - if (e.el.id == this.id && (!anim || e.anim == anim)) { - if (anim) { - return e.status; - } - out.push({ - anim: e.anim, - status: e.status - }); - } - } - if (anim) { - return 0; - } - return out; - } - }; - /*\ - * Element.pause - [ method ] - ** - * Stops animation of the element with ability to resume it later on. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.pause = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { - animationElements[i].paused = true; - } - } - return this; - }; - /*\ - * Element.resume - [ method ] - ** - * Resumes animation if it was paused with @Element.pause method. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.resume = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - var e = animationElements[i]; - if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { - delete e.paused; - this.status(e.anim, e.status); - } - } - return this; - }; - /*\ - * Element.stop - [ method ] - ** - * Stops animation of the element. - ** - > Parameters - ** - - anim (object) #optional animation object - ** - = (object) original element - \*/ - elproto.stop = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { - animationElements.splice(i--, 1); - } - } - return this; - }; - function stopAnimation(paper) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { - animationElements.splice(i--, 1); - } - } - eve.on("raphael.remove", stopAnimation); - eve.on("raphael.clear", stopAnimation); - elproto.toString = function () { - return "Rapha\xebl\u2019s object"; - }; - - // Set - var Set = function (items) { - this.items = []; - this.length = 0; - this.type = "set"; - if (items) { - for (var i = 0, ii = items.length; i < ii; i++) { - if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { - this[this.items.length] = this.items[this.items.length] = items[i]; - this.length++; - } - } - } - }, - setproto = Set.prototype; - /*\ - * Set.push - [ method ] - ** - * Adds each argument to the current set. - = (object) original element - \*/ - setproto.push = function () { - var item, - len; - for (var i = 0, ii = arguments.length; i < ii; i++) { - item = arguments[i]; - if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { - len = this.items.length; - this[len] = this.items[len] = item; - this.length++; - } - } - return this; - }; - /*\ - * Set.pop - [ method ] - ** - * Removes last element and returns it. - = (object) element - \*/ - setproto.pop = function () { - this.length && delete this[this.length--]; - return this.items.pop(); - }; - /*\ - * Set.forEach - [ method ] - ** - * Executes given function for each element in the set. - * - * If function returns `false` it will stop loop running. - ** - > Parameters - ** - - callback (function) function to run - - thisArg (object) context object for the callback - = (object) Set object - \*/ - setproto.forEach = function (callback, thisArg) { - for (var i = 0, ii = this.items.length; i < ii; i++) { - if (callback.call(thisArg, this.items[i], i) === false) { - return this; - } - } - return this; - }; - for (var method in elproto) if (elproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname][apply](el, arg); - }); - }; - })(method); - } - setproto.attr = function (name, value) { - if (name && R.is(name, array) && R.is(name[0], "object")) { - for (var j = 0, jj = name.length; j < jj; j++) { - this.items[j].attr(name[j]); - } - } else { - for (var i = 0, ii = this.items.length; i < ii; i++) { - this.items[i].attr(name, value); - } - } - return this; - }; - /*\ - * Set.clear - [ method ] - ** - * Removes all elements from the set - \*/ - setproto.clear = function () { - while (this.length) { - this.pop(); - } - }; - /*\ - * Set.splice - [ method ] - ** - * Removes given element from the set - ** - > Parameters - ** - - index (number) position of the deletion - - count (number) number of element to remove - - insertion… (object) #optional elements to insert - = (object) set elements that were deleted - \*/ - setproto.splice = function (index, count, insertion) { - index = index < 0 ? mmax(this.length + index, 0) : index; - count = mmax(0, mmin(this.length - index, count)); - var tail = [], - todel = [], - args = [], - i; - for (i = 2; i < arguments.length; i++) { - args.push(arguments[i]); - } - for (i = 0; i < count; i++) { - todel.push(this[index + i]); - } - for (; i < this.length - index; i++) { - tail.push(this[index + i]); - } - var arglen = args.length; - for (i = 0; i < arglen + tail.length; i++) { - this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; - } - i = this.items.length = this.length -= count - arglen; - while (this[i]) { - delete this[i++]; - } - return new Set(todel); - }; - /*\ - * Set.exclude - [ method ] - ** - * Removes given element from the set - ** - > Parameters - ** - - element (object) element to remove - = (boolean) `true` if object was found & removed from the set - \*/ - setproto.exclude = function (el) { - for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { - this.splice(i, 1); - return true; - } - }; - setproto.animate = function (params, ms, easing, callback) { - (R.is(easing, "function") || !easing) && (callback = easing || null); - var len = this.items.length, - i = len, - item, - set = this, - collector; - if (!len) { - return this; - } - callback && (collector = function () { - !--len && callback.call(set); - }); - easing = R.is(easing, string) ? easing : collector; - var anim = R.animation(params, ms, easing, collector); - item = this.items[--i].animate(anim); - while (i--) { - this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim); - (this.items[i] && !this.items[i].removed) || len--; - } - return this; - }; - setproto.insertAfter = function (el) { - var i = this.items.length; - while (i--) { - this.items[i].insertAfter(el); - } - return this; - }; - setproto.getBBox = function () { - var x = [], - y = [], - x2 = [], - y2 = []; - for (var i = this.items.length; i--;) if (!this.items[i].removed) { - var box = this.items[i].getBBox(); - x.push(box.x); - y.push(box.y); - x2.push(box.x + box.width); - y2.push(box.y + box.height); - } - x = mmin[apply](0, x); - y = mmin[apply](0, y); - x2 = mmax[apply](0, x2); - y2 = mmax[apply](0, y2); - return { - x: x, - y: y, - x2: x2, - y2: y2, - width: x2 - x, - height: y2 - y - }; - }; - setproto.clone = function (s) { - s = this.paper.set(); - for (var i = 0, ii = this.items.length; i < ii; i++) { - s.push(this.items[i].clone()); - } - return s; - }; - setproto.toString = function () { - return "Rapha\xebl\u2018s set"; - }; - - setproto.glow = function(glowConfig) { - var ret = this.paper.set(); - this.forEach(function(shape, index){ - var g = shape.glow(glowConfig); - if(g != null){ - g.forEach(function(shape2, index2){ - ret.push(shape2); - }); - } - }); - return ret; - }; - - - /*\ - * Set.isPointInside - [ method ] - ** - * Determine if given point is inside this set’s elements - ** - > Parameters - ** - - x (number) x coordinate of the point - - y (number) y coordinate of the point - = (boolean) `true` if point is inside any of the set's elements - \*/ - setproto.isPointInside = function (x, y) { - var isPointInside = false; - this.forEach(function (el) { - if (el.isPointInside(x, y)) { - isPointInside = true; - return false; // stop loop - } - }); - return isPointInside; - }; - - /*\ - * Raphael.registerFont - [ method ] - ** - * Adds given font to the registered set of font for Raphaël. Should be used as an internal call from within Cufón’s font file. - * Returns original parameter, so it could be used with chaining. - # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a> - ** - > Parameters - ** - - font (object) the font to register - = (object) the font you passed in - > Usage - | Cufon.registerFont(Raphael.registerFont({…})); - \*/ - R.registerFont = function (font) { - if (!font.face) { - return font; - } - this.fonts = this.fonts || {}; - var fontcopy = { - w: font.w, - face: {}, - glyphs: {} - }, - family = font.face["font-family"]; - for (var prop in font.face) if (font.face[has](prop)) { - fontcopy.face[prop] = font.face[prop]; - } - if (this.fonts[family]) { - this.fonts[family].push(fontcopy); - } else { - this.fonts[family] = [fontcopy]; - } - if (!font.svg) { - fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); - for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { - var path = font.glyphs[glyph]; - fontcopy.glyphs[glyph] = { - w: path.w, - k: {}, - d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { - return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; - }) + "z" - }; - if (path.k) { - for (var k in path.k) if (path[has](k)) { - fontcopy.glyphs[glyph].k[k] = path.k[k]; - } - } - } - } - return font; - }; - /*\ - * Paper.getFont - [ method ] - ** - * Finds font object in the registered font by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”. - ** - > Parameters - ** - - family (string) font family name or any word from it - - weight (string) #optional font weight - - style (string) #optional font style - - stretch (string) #optional font stretch - = (object) the font object - > Usage - | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30); - \*/ - paperproto.getFont = function (family, weight, style, stretch) { - stretch = stretch || "normal"; - style = style || "normal"; - weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; - if (!R.fonts) { - return; - } - var font = R.fonts[family]; - if (!font) { - var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); - for (var fontName in R.fonts) if (R.fonts[has](fontName)) { - if (name.test(fontName)) { - font = R.fonts[fontName]; - break; - } - } - } - var thefont; - if (font) { - for (var i = 0, ii = font.length; i < ii; i++) { - thefont = font[i]; - if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { - break; - } - } - } - return thefont; - }; - /*\ - * Paper.print - [ method ] - ** - * Creates path that represent given text written using given font at given position with given size. - * Result of the method is path element that contains whole text as a separate path. - ** - > Parameters - ** - - x (number) x position of the text - - y (number) y position of the text - - string (string) text to print - - font (object) font object, see @Paper.getFont - - size (number) #optional size of the font, default is `16` - - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"` - - letter_spacing (number) #optional number in range `-1..1`, default is `0` - - line_spacing (number) #optional number in range `1..3`, default is `1` - = (object) resulting path element, which consist of all letters - > Usage - | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"}); - \*/ - paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) { - origin = origin || "middle"; // baseline|middle - letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); - line_spacing = mmax(mmin(line_spacing || 1, 3), 1); - var letters = Str(string)[split](E), - shift = 0, - notfirst = 0, - path = E, - scale; - R.is(font, "string") && (font = this.getFont(font)); - if (font) { - scale = (size || 16) / font.face["units-per-em"]; - var bb = font.face.bbox[split](separator), - top = +bb[0], - lineHeight = bb[3] - bb[1], - shifty = 0, - height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2); - for (var i = 0, ii = letters.length; i < ii; i++) { - if (letters[i] == "\n") { - shift = 0; - curr = 0; - notfirst = 0; - shifty += lineHeight * line_spacing; - } else { - var prev = notfirst && font.glyphs[letters[i - 1]] || {}, - curr = font.glyphs[letters[i]]; - shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; - notfirst = 1; - } - if (curr && curr.d) { - path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); - } - } - } - return this.path(path).attr({ - fill: "#000", - stroke: "none" - }); - }; - - /*\ - * Paper.add - [ method ] - ** - * Imports elements in JSON array in format `{type: type, <attributes>}` - ** - > Parameters - ** - - json (array) - = (object) resulting set of imported elements - > Usage - | paper.add([ - | { - | type: "circle", - | cx: 10, - | cy: 10, - | r: 5 - | }, - | { - | type: "rect", - | x: 10, - | y: 10, - | width: 10, - | height: 10, - | fill: "#fc0" - | } - | ]); - \*/ - paperproto.add = function (json) { - if (R.is(json, "array")) { - var res = this.set(), - i = 0, - ii = json.length, - j; - for (; i < ii; i++) { - j = json[i] || {}; - elements[has](j.type) && res.push(this[j.type]().attr(j)); - } - } - return res; - }; - - /*\ - * Raphael.format - [ method ] - ** - * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument. - ** - > Parameters - ** - - token (string) string to format - - … (string) rest of arguments will be treated as parameters for replacement - = (string) formated string - > Usage - | var x = 10, - | y = 20, - | width = 40, - | height = 50; - | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" - | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width)); - \*/ - R.format = function (token, params) { - var args = R.is(params, array) ? [0][concat](params) : arguments; - token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { - return args[++i] == null ? E : args[i]; - })); - return token || E; - }; - /*\ - * Raphael.fullfill - [ method ] - ** - * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument. - ** - > Parameters - ** - - token (string) string to format - - json (object) object which properties will be used as a replacement - = (string) formated string - > Usage - | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" - | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", { - | x: 10, - | y: 20, - | dim: { - | width: 40, - | height: 50, - | "negative width": -40 - | } - | })); - \*/ - R.fullfill = (function () { - var tokenRegex = /\{([^\}]+)\}/g, - objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties - replacer = function (all, key, obj) { - var res = obj; - key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { - name = name || quotedName; - if (res) { - if (name in res) { - res = res[name]; - } - typeof res == "function" && isFunc && (res = res()); - } - }); - res = (res == null || res == obj ? all : res) + ""; - return res; - }; - return function (str, obj) { - return String(str).replace(tokenRegex, function (all, key) { - return replacer(all, key, obj); - }); - }; - })(); - /*\ - * Raphael.ninja - [ method ] - ** - * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method. - * Beware, that in this case plugins could stop working, because they are depending on global variable existence. - ** - = (object) Raphael object - > Usage - | (function (local_raphael) { - | var paper = local_raphael(10, 10, 320, 200); - | … - | })(Raphael.ninja()); - \*/ - R.ninja = function () { - oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; - return R; - }; - /*\ - * Raphael.st - [ property (object) ] - ** - * You can add your own method to elements and sets. It is wise to add a set method for each element method - * you added, so you will be able to call the same method on sets too. - ** - * See also @Raphael.el. - > Usage - | Raphael.el.red = function () { - | this.attr({fill: "#f00"}); - | }; - | Raphael.st.red = function () { - | this.forEach(function (el) { - | el.red(); - | }); - | }; - | // then use it - | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red(); - \*/ - R.st = setproto; - - eve.on("raphael.DOMload", function () { - loaded = true; - }); - - // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html - (function (doc, loaded, f) { - if (doc.readyState == null && doc.addEventListener){ - doc.addEventListener(loaded, f = function () { - doc.removeEventListener(loaded, f, false); - doc.readyState = "complete"; - }, false); - doc.readyState = "loading"; - } - function isLoaded() { - (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload"); - } - isLoaded(); - })(document, "DOMContentLoaded"); - - return R; -})); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ SVG Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.svg", ["raphael.core"], function(raphael) { - return factory(raphael); - }); - } else if (typeof exports === "object") { - factory(require("raphael.core")); - } else { - factory(glob.Raphael); - } -}(this, function(R) { - if (R && !R.svg) { - return; - } - - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - toInt = parseInt, - math = Math, - mmax = math.max, - abs = math.abs, - pow = math.pow, - separator = /[, ]+/, - eve = R.eve, - E = "", - S = " "; - var xlink = "http://www.w3.org/1999/xlink", - markers = { - block: "M5,0 0,2.5 5,5z", - classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", - diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", - open: "M6,1 1,3.5 6,6", - oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" - }, - markerCounter = {}; - R.toString = function () { - return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; - }; - var $ = function (el, attr) { - if (attr) { - if (typeof el == "string") { - el = $(el); - } - for (var key in attr) if (attr[has](key)) { - if (key.substring(0, 6) == "xlink:") { - el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); - } else { - el.setAttribute(key, Str(attr[key])); - } - } - } else { - el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); - el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); - } - return el; - }, - addGradientFill = function (element, gradient) { - var type = "linear", - id = element.id + gradient, - fx = .5, fy = .5, - o = element.node, - SVG = element.paper, - s = o.style, - el = R._g.doc.getElementById(id); - if (!el) { - gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { - type = "radial"; - if (_fx && _fy) { - fx = toFloat(_fx); - fy = toFloat(_fy); - var dir = ((fy > .5) * 2 - 1); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && - (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && - fy != .5 && - (fy = fy.toFixed(5) - 1e-5 * dir); - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], - max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); - vector[2] *= max; - vector[3] *= max; - if (vector[2] < 0) { - vector[0] = -vector[2]; - vector[2] = 0; - } - if (vector[3] < 0) { - vector[1] = -vector[3]; - vector[3] = 0; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - id = id.replace(/[\(\)\s,\xb0#]/g, "_"); - - if (element.gradient && id != element.gradient.id) { - SVG.defs.removeChild(element.gradient); - delete element.gradient; - } - - if (!element.gradient) { - el = $(type + "Gradient", {id: id}); - element.gradient = el; - $(el, type == "radial" ? { - fx: fx, - fy: fy - } : { - x1: vector[0], - y1: vector[1], - x2: vector[2], - y2: vector[3], - gradientTransform: element.matrix.invert() - }); - SVG.defs.appendChild(el); - for (var i = 0, ii = dots.length; i < ii; i++) { - el.appendChild($("stop", { - offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", - "stop-color": dots[i].color || "#fff", - "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1 - })); - } - } - } - $(o, { - fill: "url('" + document.location.origin + document.location.pathname + "#" + id + "')", - opacity: 1, - "fill-opacity": 1 - }); - s.fill = E; - s.opacity = 1; - s.fillOpacity = 1; - return 1; - }, - updatePosition = function (o) { - var bbox = o.getBBox(1); - $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); - }, - addArrow = function (o, value, isEnd) { - if (o.type == "path") { - var values = Str(value).toLowerCase().split("-"), - p = o.paper, - se = isEnd ? "end" : "start", - node = o.node, - attrs = o.attrs, - stroke = attrs["stroke-width"], - i = values.length, - type = "classic", - from, - to, - dx, - refX, - attr, - w = 3, - h = 3, - t = 5; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": h = 5; break; - case "narrow": h = 2; break; - case "long": w = 5; break; - case "short": w = 2; break; - } - } - if (type == "open") { - w += 2; - h += 2; - t += 2; - dx = 1; - refX = isEnd ? 4 : 1; - attr = { - fill: "none", - stroke: attrs.stroke - }; - } else { - refX = dx = w / 2; - attr = { - fill: attrs.stroke, - stroke: "none" - }; - } - if (o._.arrows) { - if (isEnd) { - o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; - o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; - } else { - o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; - o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; - } - } else { - o._.arrows = {}; - } - if (type != "none") { - var pathId = "raphael-marker-" + type, - markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id; - if (!R._g.doc.getElementById(pathId)) { - p.defs.appendChild($($("path"), { - "stroke-linecap": "round", - d: markers[type], - id: pathId - })); - markerCounter[pathId] = 1; - } else { - markerCounter[pathId]++; - } - var marker = R._g.doc.getElementById(markerId), - use; - if (!marker) { - marker = $($("marker"), { - id: markerId, - markerHeight: h, - markerWidth: w, - orient: "auto", - refX: refX, - refY: h / 2 - }); - use = $($("use"), { - "xlink:href": "#" + pathId, - transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")", - "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4) - }); - marker.appendChild(use); - p.defs.appendChild(marker); - markerCounter[markerId] = 1; - } else { - markerCounter[markerId]++; - use = marker.getElementsByTagName("use")[0]; - } - $(use, attr); - var delta = dx * (type != "diamond" && type != "oval"); - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - delta * stroke; - } else { - from = delta * stroke; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - attr = {}; - attr["marker-" + se] = "url(#" + markerId + ")"; - if (to || from) { - attr.d = R.getSubpath(attrs.path, from, to); - } - $(node, attr); - o._.arrows[se + "Path"] = pathId; - o._.arrows[se + "Marker"] = markerId; - o._.arrows[se + "dx"] = delta; - o._.arrows[se + "Type"] = type; - o._.arrows[se + "String"] = value; - } else { - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - from; - } else { - from = 0; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)}); - delete o._.arrows[se + "Path"]; - delete o._.arrows[se + "Marker"]; - delete o._.arrows[se + "dx"]; - delete o._.arrows[se + "Type"]; - delete o._.arrows[se + "String"]; - } - for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { - var item = R._g.doc.getElementById(attr); - item && item.parentNode.removeChild(item); - } - } - }, - dasharray = { - "-": [3, 1], - ".": [1, 1], - "-.": [3, 1, 1, 1], - "-..": [3, 1, 1, 1, 1, 1], - ". ": [1, 3], - "- ": [4, 3], - "--": [8, 3], - "- .": [4, 3, 1, 3], - "--.": [8, 3, 1, 3], - "--..": [8, 3, 1, 3, 1, 3] - }, - addDashes = function (o, value, params) { - value = dasharray[Str(value).toLowerCase()]; - if (value) { - var width = o.attrs["stroke-width"] || "1", - butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, - dashes = [], - i = value.length; - while (i--) { - dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; - } - $(o.node, {"stroke-dasharray": dashes.join(",")}); - } - else { - $(o.node, {"stroke-dasharray": "none"}); - } - }, - setFillAndStroke = function (o, params) { - var node = o.node, - attrs = o.attrs, - vis = node.style.visibility; - node.style.visibility = "hidden"; - for (var att in params) { - if (params[has](att)) { - if (!R._availableAttrs[has](att)) { - continue; - } - var value = params[att]; - attrs[att] = value; - switch (att) { - case "blur": - o.blur(value); - break; - case "title": - var title = node.getElementsByTagName("title"); - - // Use the existing <title>. - if (title.length && (title = title[0])) { - title.firstChild.nodeValue = value; - } else { - title = $("title"); - var val = R._g.doc.createTextNode(value); - title.appendChild(val); - node.appendChild(title); - } - break; - case "href": - case "target": - var pn = node.parentNode; - if (pn.tagName.toLowerCase() != "a") { - var hl = $("a"); - pn.insertBefore(hl, node); - hl.appendChild(node); - pn = hl; - } - if (att == "target") { - pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value); - } else { - pn.setAttributeNS(xlink, att, value); - } - break; - case "cursor": - node.style.cursor = value; - break; - case "transform": - o.transform(value); - break; - case "arrow-start": - addArrow(o, value); - break; - case "arrow-end": - addArrow(o, value, 1); - break; - case "clip-rect": - var rect = Str(value).split(separator); - if (rect.length == 4) { - o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); - var el = $("clipPath"), - rc = $("rect"); - el.id = R.createUUID(); - $(rc, { - x: rect[0], - y: rect[1], - width: rect[2], - height: rect[3] - }); - el.appendChild(rc); - o.paper.defs.appendChild(el); - $(node, {"clip-path": "url(#" + el.id + ")"}); - o.clip = rc; - } - if (!value) { - var path = node.getAttribute("clip-path"); - if (path) { - var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E)); - clip && clip.parentNode.removeChild(clip); - $(node, {"clip-path": E}); - delete o.clip; - } - } - break; - case "path": - if (o.type == "path") { - $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); - o._.dirty = 1; - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - } - break; - case "width": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fx) { - att = "x"; - value = attrs.x; - } else { - break; - } - case "x": - if (attrs.fx) { - value = -attrs.x - (attrs.width || 0); - } - case "rx": - if (att == "rx" && o.type == "rect") { - break; - } - case "cx": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "height": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fy) { - att = "y"; - value = attrs.y; - } else { - break; - } - case "y": - if (attrs.fy) { - value = -attrs.y - (attrs.height || 0); - } - case "ry": - if (att == "ry" && o.type == "rect") { - break; - } - case "cy": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "r": - if (o.type == "rect") { - $(node, {rx: value, ry: value}); - } else { - node.setAttribute(att, value); - } - o._.dirty = 1; - break; - case "src": - if (o.type == "image") { - node.setAttributeNS(xlink, "href", value); - } - break; - case "stroke-width": - if (o._.sx != 1 || o._.sy != 1) { - value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; - } - node.setAttribute(att, value); - if (attrs["stroke-dasharray"]) { - addDashes(o, attrs["stroke-dasharray"], params); - } - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "stroke-dasharray": - addDashes(o, value, params); - break; - case "fill": - var isURL = Str(value).match(R._ISURL); - if (isURL) { - el = $("pattern"); - var ig = $("image"); - el.id = R.createUUID(); - $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); - $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); - el.appendChild(ig); - - (function (el) { - R._preload(isURL[1], function () { - var w = this.offsetWidth, - h = this.offsetHeight; - $(el, {width: w, height: h}); - $(ig, {width: w, height: h}); - }); - })(el); - o.paper.defs.appendChild(el); - $(node, {fill: "url(#" + el.id + ")"}); - o.pattern = el; - o.pattern && updatePosition(o); - break; - } - var clr = R.getRGB(value); - if (!clr.error) { - delete params.gradient; - delete attrs.gradient; - !R.is(attrs.opacity, "undefined") && - R.is(params.opacity, "undefined") && - $(node, {opacity: attrs.opacity}); - !R.is(attrs["fill-opacity"], "undefined") && - R.is(params["fill-opacity"], "undefined") && - $(node, {"fill-opacity": attrs["fill-opacity"]}); - } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { - if ("opacity" in attrs || "fill-opacity" in attrs) { - var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - var stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); - } - } - attrs.gradient = value; - attrs.fill = "none"; - break; - } - clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - case "stroke": - clr = R.getRGB(value); - node.setAttribute(att, clr.hex); - att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - if (att == "stroke" && o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "gradient": - (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); - break; - case "opacity": - if (attrs.gradient && !attrs[has]("stroke-opacity")) { - $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); - } - // fall - case "fill-opacity": - if (attrs.gradient) { - gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": value}); - } - break; - } - default: - att == "font-size" && (value = toInt(value, 10) + "px"); - var cssrule = att.replace(/(\-.)/g, function (w) { - return w.substring(1).toUpperCase(); - }); - node.style[cssrule] = value; - o._.dirty = 1; - node.setAttribute(att, value); - break; - } - } - } - - tuneText(o, params); - node.style.visibility = vis; - }, - leading = 1.2, - tuneText = function (el, params) { - if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { - return; - } - var a = el.attrs, - node = el.node, - fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; - - if (params[has]("text")) { - a.text = params.text; - while (node.firstChild) { - node.removeChild(node.firstChild); - } - var texts = Str(params.text).split("\n"), - tspans = [], - tspan; - for (var i = 0, ii = texts.length; i < ii; i++) { - tspan = $("tspan"); - i && $(tspan, {dy: fontSize * leading, x: a.x}); - tspan.appendChild(R._g.doc.createTextNode(texts[i])); - node.appendChild(tspan); - tspans[i] = tspan; - } - } else { - tspans = node.getElementsByTagName("tspan"); - for (i = 0, ii = tspans.length; i < ii; i++) if (i) { - $(tspans[i], {dy: fontSize * leading, x: a.x}); - } else { - $(tspans[0], {dy: 0}); - } - } - $(node, {x: a.x, y: a.y}); - el._.dirty = 1; - var bb = el._getBBox(), - dif = a.y - (bb.y + bb.height / 2); - dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); - }, - getRealNode = function (node) { - if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") { - return node.parentNode; - } else { - return node; - } - }, - Element = function (node, svg) { - var X = 0, - Y = 0; - /*\ - * Element.node - [ property (object) ] - ** - * Gives you a reference to the DOM object, so you can assign event handlers or just mess around. - ** - * Note: Don’t mess with it. - > Usage - | // draw a circle at coordinate 10,10 with radius of 10 - | var c = paper.circle(10, 10, 10); - | c.node.onclick = function () { - | c.attr("fill", "red"); - | }; - \*/ - this[0] = this.node = node; - /*\ - * Element.raphael - [ property (object) ] - ** - * Internal reference to @Raphael object. In case it is not available. - > Usage - | Raphael.el.red = function () { - | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill")); - | hsb.h = 1; - | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex}); - | } - \*/ - node.raphael = true; - /*\ - * Element.id - [ property (number) ] - ** - * Unique id of the element. Especially useful when you want to listen to events of the element, - * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method. - \*/ - this.id = R._oid++; - node.raphaelid = this.id; - this.matrix = R.matrix(); - this.realPath = null; - /*\ - * Element.paper - [ property (object) ] - ** - * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions. - > Usage - | Raphael.el.cross = function () { - | this.attr({fill: "red"}); - | this.paper.path("M10,10L50,50M50,10L10,50") - | .attr({stroke: "red"}); - | } - \*/ - this.paper = svg; - this.attrs = this.attrs || {}; - this._ = { - transform: [], - sx: 1, - sy: 1, - deg: 0, - dx: 0, - dy: 0, - dirty: 1 - }; - !svg.bottom && (svg.bottom = this); - /*\ - * Element.prev - [ property (object) ] - ** - * Reference to the previous element in the hierarchy. - \*/ - this.prev = svg.top; - svg.top && (svg.top.next = this); - svg.top = this; - /*\ - * Element.next - [ property (object) ] - ** - * Reference to the next element in the hierarchy. - \*/ - this.next = null; - }, - elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - - R._engine.path = function (pathString, SVG) { - var el = $("path"); - SVG.canvas && SVG.canvas.appendChild(el); - var p = new Element(el, SVG); - p.type = "path"; - setFillAndStroke(p, { - fill: "none", - stroke: "#000", - path: pathString - }); - return p; - }; - /*\ - * Element.rotate - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds rotation by given angle around given point to the list of - * transformations of the element. - > Parameters - - deg (number) angle in degrees - - cx (number) #optional x coordinate of the centre of rotation - - cy (number) #optional y coordinate of the centre of rotation - * If cx & cy aren’t specified centre of the shape is used as a point of rotation. - = (object) @Element - \*/ - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - /*\ - * Element.scale - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds scale by given amount relative to given point to the list of - * transformations of the element. - > Parameters - - sx (number) horisontal scale amount - - sy (number) vertical scale amount - - cx (number) #optional x coordinate of the centre of scale - - cy (number) #optional y coordinate of the centre of scale - * If cx & cy aren’t specified centre of the shape is used instead. - = (object) @Element - \*/ - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - return this; - }; - /*\ - * Element.translate - [ method ] - ** - * Deprecated! Use @Element.transform instead. - * Adds translation by given amount to the list of transformations of the element. - > Parameters - - dx (number) horisontal shift - - dy (number) vertical shift - = (object) @Element - \*/ - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - /*\ - * Element.transform - [ method ] - ** - * Adds transformation to the element which is separate to other attributes, - * i.e. translation doesn’t change `x` or `y` of the rectange. The format - * of transformation string is similar to the path string syntax: - | "t100,100r30,100,100s2,2,100,100r45s1.5" - * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for - * scale and `m` is for matrix. - * - * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`. - * - * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100; - * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin - * coordinates as optional parameters, the default is the centre point of the element. - * Matrix accepts six parameters. - > Usage - | var el = paper.rect(10, 20, 300, 200); - | // translate 100, 100, rotate 45°, translate -100, 0 - | el.transform("t100,100r45t-100,0"); - | // if you want you can append or prepend transformations - | el.transform("...t50,50"); - | el.transform("s2..."); - | // or even wrap - | el.transform("t50,50...t-50-50"); - | // to reset transformation call method with empty string - | el.transform(""); - | // to get current value call it without parameters - | console.log(el.transform()); - > Parameters - - tstr (string) #optional transformation string - * If tstr isn’t specified - = (string) current transformation string - * else - = (object) @Element - \*/ - elproto.transform = function (tstr) { - var _ = this._; - if (tstr == null) { - return _.transform; - } - R._extractTransform(this, tstr); - - this.clip && $(this.clip, {transform: this.matrix.invert()}); - this.pattern && updatePosition(this); - this.node && $(this.node, {transform: this.matrix}); - - if (_.sx != 1 || _.sy != 1) { - var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; - this.attr({"stroke-width": sw}); - } - - return this; - }; - /*\ - * Element.hide - [ method ] - ** - * Makes element invisible. See @Element.show. - = (object) @Element - \*/ - elproto.hide = function () { - if(!this.removed) this.node.style.display = "none"; - return this; - }; - /*\ - * Element.show - [ method ] - ** - * Makes element visible. See @Element.hide. - = (object) @Element - \*/ - elproto.show = function () { - if(!this.removed) this.node.style.display = ""; - return this; - }; - /*\ - * Element.remove - [ method ] - ** - * Removes element from the paper. - \*/ - elproto.remove = function () { - var node = getRealNode(this.node); - if (this.removed || !node.parentNode) { - return; - } - var paper = this.paper; - paper.__set__ && paper.__set__.exclude(this); - eve.unbind("raphael.*.*." + this.id); - if (this.gradient) { - paper.defs.removeChild(this.gradient); - } - R._tear(this, paper); - - node.parentNode.removeChild(node); - - // Remove custom data for element - this.removeData(); - - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - this.removed = true; - }; - elproto._getBBox = function () { - if (this.node.style.display == "none") { - this.show(); - var hide = true; - } - var canvasHidden = false, - containerStyle; - if (this.paper.canvas.parentElement) { - containerStyle = this.paper.canvas.parentElement.style; - } //IE10+ can't find parentElement - else if (this.paper.canvas.parentNode) { - containerStyle = this.paper.canvas.parentNode.style; - } - - if(containerStyle && containerStyle.display == "none") { - canvasHidden = true; - containerStyle.display = ""; - } - var bbox = {}; - try { - bbox = this.node.getBBox(); - } catch(e) { - // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix - bbox = { - x: this.node.clientLeft, - y: this.node.clientTop, - width: this.node.clientWidth, - height: this.node.clientHeight - } - } finally { - bbox = bbox || {}; - if(canvasHidden){ - containerStyle.display = "none"; - } - } - hide && this.hide(); - return bbox; - }; - /*\ - * Element.attr - [ method ] - ** - * Sets the attributes of the element. - > Parameters - - attrName (string) attribute’s name - - value (string) value - * or - - params (object) object of name/value pairs - * or - - attrName (string) attribute’s name - * or - - attrNames (array) in this case method returns array of current values for given attribute names - = (object) @Element if attrsName & value or params are passed in. - = (...) value of the attribute if only attrsName is passed in. - = (array) array of values of the attribute if attrsNames is passed in. - = (object) object of attributes if nothing is passed in. - > Possible parameters - # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p> - o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`. - o clip-rect (string) comma or space separated values: x, y, width and height - o cursor (string) CSS type of the cursor - o cx (number) the x-axis coordinate of the center of the circle, or ellipse - o cy (number) the y-axis coordinate of the center of the circle, or ellipse - o fill (string) colour, gradient or image - o fill-opacity (number) - o font (string) - o font-family (string) - o font-size (number) font size in pixels - o font-weight (string) - o height (number) - o href (string) URL, if specified element behaves as hyperlink - o opacity (number) - o path (string) SVG path string format - o r (number) radius of the circle, ellipse or rounded corner on the rect - o rx (number) horisontal radius of the ellipse - o ry (number) vertical radius of the ellipse - o src (string) image URL, only works for @Element.image element - o stroke (string) stroke colour - o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”] - o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”] - o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”] - o stroke-miterlimit (number) - o stroke-opacity (number) - o stroke-width (number) stroke width in pixels, default is '1' - o target (string) used with href - o text (string) contents of the text element. Use `\n` for multiline text - o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`” - o title (string) will create tooltip with a given text - o transform (string) see @Element.transform - o width (number) - o x (number) - o y (number) - > Gradients - * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90° - * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black. - * - * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” – - * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point - * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses. - > Path String - # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p> - > Colour Parsing - # <ul> - # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> - # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> - # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> - # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> - # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> - # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li> - # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li> - # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> - # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> - # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li> - # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li> - # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li> - # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li> - # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li> - # </ul> - \*/ - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - if (name == "transform") { - return this._.transform; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - if (value != null) { - var params = {}; - params[name] = value; - } else if (name != null && R.is(name, "object")) { - params = name; - } - for (var key in params) { - eve("raphael.attr." + key + "." + this.id, this, params[key]); - } - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - setFillAndStroke(this, params); - return this; - }; - /*\ - * Element.toFront - [ method ] - ** - * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. - = (object) @Element - \*/ - elproto.toFront = function () { - if (this.removed) { - return this; - } - var node = getRealNode(this.node); - node.parentNode.appendChild(node); - var svg = this.paper; - svg.top != this && R._tofront(this, svg); - return this; - }; - /*\ - * Element.toBack - [ method ] - ** - * Moves the element so it is the furthest from the viewer’s eyes, behind other elements. - = (object) @Element - \*/ - elproto.toBack = function () { - if (this.removed) { - return this; - } - var node = getRealNode(this.node); - var parentNode = node.parentNode; - parentNode.insertBefore(node, parentNode.firstChild); - R._toback(this, this.paper); - var svg = this.paper; - return this; - }; - /*\ - * Element.insertAfter - [ method ] - ** - * Inserts current object after the given one. - = (object) @Element - \*/ - elproto.insertAfter = function (element) { - if (this.removed || !element) { - return this; - } - - var node = getRealNode(this.node); - var afterNode = getRealNode(element.node || element[element.length - 1].node); - if (afterNode.nextSibling) { - afterNode.parentNode.insertBefore(node, afterNode.nextSibling); - } else { - afterNode.parentNode.appendChild(node); - } - R._insertafter(this, element, this.paper); - return this; - }; - /*\ - * Element.insertBefore - [ method ] - ** - * Inserts current object before the given one. - = (object) @Element - \*/ - elproto.insertBefore = function (element) { - if (this.removed || !element) { - return this; - } - - var node = getRealNode(this.node); - var beforeNode = getRealNode(element.node || element[0].node); - beforeNode.parentNode.insertBefore(node, beforeNode); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - // Experimental. No Safari support. Use it on your own risk. - var t = this; - if (+size !== 0) { - var fltr = $("filter"), - blur = $("feGaussianBlur"); - t.attrs.blur = size; - fltr.id = R.createUUID(); - $(blur, {stdDeviation: +size || 1.5}); - fltr.appendChild(blur); - t.paper.defs.appendChild(fltr); - t._blur = fltr; - $(t.node, {filter: "url(#" + fltr.id + ")"}); - } else { - if (t._blur) { - t._blur.parentNode.removeChild(t._blur); - delete t._blur; - delete t.attrs.blur; - } - t.node.removeAttribute("filter"); - } - return t; - }; - R._engine.circle = function (svg, x, y, r) { - var el = $("circle"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; - res.type = "circle"; - $(el, res.attrs); - return res; - }; - R._engine.rect = function (svg, x, y, w, h, r) { - var el = $("rect"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; - res.type = "rect"; - $(el, res.attrs); - return res; - }; - R._engine.ellipse = function (svg, x, y, rx, ry) { - var el = $("ellipse"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; - res.type = "ellipse"; - $(el, res.attrs); - return res; - }; - R._engine.image = function (svg, src, x, y, w, h) { - var el = $("image"); - $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); - el.setAttributeNS(xlink, "href", src); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, src: src}; - res.type = "image"; - return res; - }; - R._engine.text = function (svg, x, y, text) { - var el = $("text"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = { - x: x, - y: y, - "text-anchor": "middle", - text: text, - "font-family": R._availableAttrs["font-family"], - "font-size": R._availableAttrs["font-size"], - stroke: "none", - fill: "#000" - }; - res.type = "text"; - setFillAndStroke(res, res.attrs); - return res; - }; - R._engine.setSize = function (width, height) { - this.width = width || this.width; - this.height = height || this.height; - this.canvas.setAttribute("width", this.width); - this.canvas.setAttribute("height", this.height); - if (this._viewBox) { - this.setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con && con.container, - x = con.x, - y = con.y, - width = con.width, - height = con.height; - if (!container) { - throw new Error("SVG container not found."); - } - var cnvs = $("svg"), - css = "overflow:hidden;", - isFloating; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - $(cnvs, { - height: height, - version: 1.1, - width: width, - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink" - }); - if (container == 1) { - cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; - R._g.doc.body.appendChild(cnvs); - isFloating = 1; - } else { - cnvs.style.cssText = css + "position:relative"; - if (container.firstChild) { - container.insertBefore(cnvs, container.firstChild); - } else { - container.appendChild(cnvs); - } - } - container = new R._Paper; - container.width = width; - container.height = height; - container.canvas = cnvs; - container.clear(); - container._left = container._top = 0; - isFloating && (container.renderfix = function () {}); - container.renderfix(); - return container; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var paperSize = this.getSize(), - size = mmax(w / paperSize.width, h / paperSize.height), - top = this.top, - aspectRatio = fit ? "xMidYMid meet" : "xMinYMin", - vb, - sw; - if (x == null) { - if (this._vbSize) { - size = 1; - } - delete this._vbSize; - vb = "0 0 " + this.width + S + this.height; - } else { - this._vbSize = size; - vb = x + S + y + S + w + S + h; - } - $(this.canvas, { - viewBox: vb, - preserveAspectRatio: aspectRatio - }); - while (size && top) { - sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; - top.attr({"stroke-width": sw}); - top._.dirty = 1; - top._.dirtyT = 1; - top = top.prev; - } - this._viewBox = [x, y, w, h, !!fit]; - return this; - }; - /*\ - * Paper.renderfix - [ method ] - ** - * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant - * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness. - * This method fixes the issue. - ** - Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method. - \*/ - R.prototype.renderfix = function () { - var cnvs = this.canvas, - s = cnvs.style, - pos; - try { - pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(); - } catch (e) { - pos = cnvs.createSVGMatrix(); - } - var left = -pos.e % 1, - top = -pos.f % 1; - if (left || top) { - if (left) { - this._left = (this._left + left) % 1; - s.left = this._left + "px"; - } - if (top) { - this._top = (this._top + top) % 1; - s.top = this._top + "px"; - } - } - }; - /*\ - * Paper.clear - [ method ] - ** - * Clears the paper, i.e. removes all the elements. - \*/ - R.prototype.clear = function () { - R.eve("raphael.clear", this); - var c = this.canvas; - while (c.firstChild) { - c.removeChild(c.firstChild); - } - this.bottom = this.top = null; - (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); - c.appendChild(this.desc); - c.appendChild(this.defs = $("defs")); - }; - /*\ - * Paper.remove - [ method ] - ** - * Removes the paper from the DOM. - \*/ - R.prototype.remove = function () { - eve("raphael.remove", this); - this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - }; - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -})); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ VML Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael.vml", ["raphael.core"], function(raphael) { - return factory(raphael); - }); - } else if (typeof exports === "object") { - factory(require("raphael")); - } else { - factory(glob.Raphael); - } -}(this, function(R) { - if (R && !R.vml) { - return; - } - - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - math = Math, - round = math.round, - mmax = math.max, - mmin = math.min, - abs = math.abs, - fillString = "fill", - separator = /[, ]+/, - eve = R.eve, - ms = " progid:DXImageTransform.Microsoft", - S = " ", - E = "", - map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, - bites = /([clmz]),?([^clmz]*)/gi, - blurregexp = / progid:\S+Blur\([^\)]+\)/g, - val = /-?[^,\s-]+/g, - cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)", - zoom = 21600, - pathTypes = {path: 1, rect: 1, image: 1}, - ovalTypes = {circle: 1, ellipse: 1}, - path2vml = function (path) { - var total = /[ahqstv]/ig, - command = R._pathToAbsolute; - Str(path).match(total) && (command = R._path2curve); - total = /[clmz]/g; - if (command == R._pathToAbsolute && !Str(path).match(total)) { - var res = Str(path).replace(bites, function (all, command, args) { - var vals = [], - isMove = command.toLowerCase() == "m", - res = map[command]; - args.replace(val, function (value) { - if (isMove && vals.length == 2) { - res += vals + map[command == "m" ? "l" : "L"]; - vals = []; - } - vals.push(round(value * zoom)); - }); - return res + vals; - }); - return res; - } - var pa = command(path), p, r; - res = []; - for (var i = 0, ii = pa.length; i < ii; i++) { - p = pa[i]; - r = pa[i][0].toLowerCase(); - r == "z" && (r = "x"); - for (var j = 1, jj = p.length; j < jj; j++) { - r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); - } - res.push(r); - } - return res.join(S); - }, - compensation = function (deg, dx, dy) { - var m = R.matrix(); - m.rotate(-deg, .5, .5); - return { - dx: m.x(dx, dy), - dy: m.y(dx, dy) - }; - }, - setCoords = function (p, sx, sy, dx, dy, deg) { - var _ = p._, - m = p.matrix, - fillpos = _.fillpos, - o = p.node, - s = o.style, - y = 1, - flip = "", - dxdy, - kx = zoom / sx, - ky = zoom / sy; - s.visibility = "hidden"; - if (!sx || !sy) { - return; - } - o.coordsize = abs(kx) + S + abs(ky); - s.rotation = deg * (sx * sy < 0 ? -1 : 1); - if (deg) { - var c = compensation(deg, dx, dy); - dx = c.dx; - dy = c.dy; - } - sx < 0 && (flip += "x"); - sy < 0 && (flip += " y") && (y = -1); - s.flip = flip; - o.coordorigin = (dx * -kx) + S + (dy * -ky); - if (fillpos || _.fillsize) { - var fill = o.getElementsByTagName(fillString); - fill = fill && fill[0]; - o.removeChild(fill); - if (fillpos) { - c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); - fill.position = c.dx * y + S + c.dy * y; - } - if (_.fillsize) { - fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); - } - o.appendChild(fill); - } - s.visibility = "visible"; - }; - R.toString = function () { - return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; - }; - var addArrow = function (o, value, isEnd) { - var values = Str(value).toLowerCase().split("-"), - se = isEnd ? "end" : "start", - i = values.length, - type = "classic", - w = "medium", - h = "medium"; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": - case "narrow": h = values[i]; break; - case "long": - case "short": w = values[i]; break; - } - } - var stroke = o.node.getElementsByTagName("stroke")[0]; - stroke[se + "arrow"] = type; - stroke[se + "arrowlength"] = w; - stroke[se + "arrowwidth"] = h; - }, - setFillAndStroke = function (o, params) { - // o.paper.canvas.style.display = "none"; - o.attrs = o.attrs || {}; - var node = o.node, - a = o.attrs, - s = node.style, - xy, - newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), - isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), - res = o; - - - for (var par in params) if (params[has](par)) { - a[par] = params[par]; - } - if (newpath) { - a.path = R._getPath[o.type](o); - o._.dirty = 1; - } - params.href && (node.href = params.href); - params.title && (node.title = params.title); - params.target && (node.target = params.target); - params.cursor && (s.cursor = params.cursor); - "blur" in params && o.blur(params.blur); - if (params.path && o.type == "path" || newpath) { - node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); - o._.dirty = 1; - if (o.type == "image") { - o._.fillpos = [a.x, a.y]; - o._.fillsize = [a.width, a.height]; - setCoords(o, 1, 1, 0, 0, 0); - } - } - "transform" in params && o.transform(params.transform); - if (isOval) { - var cx = +a.cx, - cy = +a.cy, - rx = +a.rx || +a.r || 0, - ry = +a.ry || +a.r || 0; - node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); - o._.dirty = 1; - } - if ("clip-rect" in params) { - var rect = Str(params["clip-rect"]).split(separator); - if (rect.length == 4) { - rect[2] = +rect[2] + (+rect[0]); - rect[3] = +rect[3] + (+rect[1]); - var div = node.clipRect || R._g.doc.createElement("div"), - dstyle = div.style; - dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); - if (!node.clipRect) { - dstyle.position = "absolute"; - dstyle.top = 0; - dstyle.left = 0; - dstyle.width = o.paper.width + "px"; - dstyle.height = o.paper.height + "px"; - node.parentNode.insertBefore(div, node); - div.appendChild(node); - node.clipRect = div; - } - } - if (!params["clip-rect"]) { - node.clipRect && (node.clipRect.style.clip = "auto"); - } - } - if (o.textpath) { - var textpathStyle = o.textpath.style; - params.font && (textpathStyle.font = params.font); - params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); - params["font-size"] && (textpathStyle.fontSize = params["font-size"]); - params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); - params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); - } - if ("arrow-start" in params) { - addArrow(res, params["arrow-start"]); - } - if ("arrow-end" in params) { - addArrow(res, params["arrow-end"], 1); - } - if (params.opacity != null || - params["stroke-width"] != null || - params.fill != null || - params.src != null || - params.stroke != null || - params["stroke-width"] != null || - params["stroke-opacity"] != null || - params["fill-opacity"] != null || - params["stroke-dasharray"] != null || - params["stroke-miterlimit"] != null || - params["stroke-linejoin"] != null || - params["stroke-linecap"] != null) { - var fill = node.getElementsByTagName(fillString), - newfill = false; - fill = fill && fill[0]; - !fill && (newfill = fill = createNode(fillString)); - if (o.type == "image" && params.src) { - fill.src = params.src; - } - params.fill && (fill.on = true); - if (fill.on == null || params.fill == "none" || params.fill === null) { - fill.on = false; - } - if (fill.on && params.fill) { - var isURL = Str(params.fill).match(R._ISURL); - if (isURL) { - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = isURL[1]; - fill.type = "tile"; - var bbox = o.getBBox(1); - fill.position = bbox.x + S + bbox.y; - o._.fillpos = [bbox.x, bbox.y]; - - R._preload(isURL[1], function () { - o._.fillsize = [this.offsetWidth, this.offsetHeight]; - }); - } else { - fill.color = R.getRGB(params.fill).hex; - fill.src = E; - fill.type = "solid"; - if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { - a.fill = "none"; - a.gradient = params.fill; - fill.rotate = false; - } - } - } - if ("fill-opacity" in params || "opacity" in params) { - var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); - opacity = mmin(mmax(opacity, 0), 1); - fill.opacity = opacity; - if (fill.src) { - fill.color = "none"; - } - } - node.appendChild(fill); - var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), - newstroke = false; - !stroke && (newstroke = stroke = createNode("stroke")); - if ((params.stroke && params.stroke != "none") || - params["stroke-width"] || - params["stroke-opacity"] != null || - params["stroke-dasharray"] || - params["stroke-miterlimit"] || - params["stroke-linejoin"] || - params["stroke-linecap"]) { - stroke.on = true; - } - (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); - var strokeColor = R.getRGB(params.stroke); - stroke.on && params.stroke && (stroke.color = strokeColor.hex); - opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); - var width = (toFloat(params["stroke-width"]) || 1) * .75; - opacity = mmin(mmax(opacity, 0), 1); - params["stroke-width"] == null && (width = a["stroke-width"]); - params["stroke-width"] && (stroke.weight = width); - width && width < 1 && (opacity *= width) && (stroke.weight = 1); - stroke.opacity = opacity; - - params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); - stroke.miterlimit = params["stroke-miterlimit"] || 8; - params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); - if ("stroke-dasharray" in params) { - var dasharray = { - "-": "shortdash", - ".": "shortdot", - "-.": "shortdashdot", - "-..": "shortdashdotdot", - ". ": "dot", - "- ": "dash", - "--": "longdash", - "- .": "dashdot", - "--.": "longdashdot", - "--..": "longdashdotdot" - }; - stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; - } - newstroke && node.appendChild(stroke); - } - if (res.type == "text") { - res.paper.canvas.style.display = E; - var span = res.paper.span, - m = 100, - fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); - s = span.style; - a.font && (s.font = a.font); - a["font-family"] && (s.fontFamily = a["font-family"]); - a["font-weight"] && (s.fontWeight = a["font-weight"]); - a["font-style"] && (s.fontStyle = a["font-style"]); - fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10; - s.fontSize = fontSize * m + "px"; - res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); - var brect = span.getBoundingClientRect(); - res.W = a.w = (brect.right - brect.left) / m; - res.H = a.h = (brect.bottom - brect.top) / m; - // res.paper.canvas.style.display = "none"; - res.X = a.x; - res.Y = a.y + res.H / 2; - - ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); - var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; - for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { - res._.dirty = 1; - break; - } - - // text-anchor emulation - switch (a["text-anchor"]) { - case "start": - res.textpath.style["v-text-align"] = "left"; - res.bbx = res.W / 2; - break; - case "end": - res.textpath.style["v-text-align"] = "right"; - res.bbx = -res.W / 2; - break; - default: - res.textpath.style["v-text-align"] = "center"; - res.bbx = 0; - break; - } - res.textpath.style["v-text-kern"] = true; - } - // res.paper.canvas.style.display = E; - }, - addGradientFill = function (o, gradient, fill) { - o.attrs = o.attrs || {}; - var attrs = o.attrs, - pow = Math.pow, - opacity, - oindex, - type = "linear", - fxfy = ".5 .5"; - o.attrs.gradient = gradient; - gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { - type = "radial"; - if (fx && fy) { - fx = toFloat(fx); - fy = toFloat(fy); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); - fxfy = fx + S + fy; - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - o = o.shape || o.node; - if (dots.length) { - o.removeChild(fill); - fill.on = true; - fill.method = "none"; - fill.color = dots[0].color; - fill.color2 = dots[dots.length - 1].color; - var clrs = []; - for (var i = 0, ii = dots.length; i < ii; i++) { - dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); - } - fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; - if (type == "radial") { - fill.type = "gradientTitle"; - fill.focus = "100%"; - fill.focussize = "0 0"; - fill.focusposition = fxfy; - fill.angle = 0; - } else { - // fill.rotate= true; - fill.type = "gradient"; - fill.angle = (270 - angle) % 360; - } - o.appendChild(fill); - } - return 1; - }, - Element = function (node, vml) { - this[0] = this.node = node; - node.raphael = true; - this.id = R._oid++; - node.raphaelid = this.id; - this.X = 0; - this.Y = 0; - this.attrs = {}; - this.paper = vml; - this.matrix = R.matrix(); - this._ = { - transform: [], - sx: 1, - sy: 1, - dx: 0, - dy: 0, - deg: 0, - dirty: 1, - dirtyT: 1 - }; - !vml.bottom && (vml.bottom = this); - this.prev = vml.top; - vml.top && (vml.top.next = this); - vml.top = this; - this.next = null; - }; - var elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - elproto.transform = function (tstr) { - if (tstr == null) { - return this._.transform; - } - var vbs = this.paper._viewBoxShift, - vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, - oldt; - if (vbs) { - oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); - } - R._extractTransform(this, vbt + tstr); - var matrix = this.matrix.clone(), - skew = this.skew, - o = this.node, - split, - isGrad = ~Str(this.attrs.fill).indexOf("-"), - isPatt = !Str(this.attrs.fill).indexOf("url("); - matrix.translate(1, 1); - if (isPatt || isGrad || this.type == "image") { - skew.matrix = "1 0 0 1"; - skew.offset = "0 0"; - split = matrix.split(); - if ((isGrad && split.noRotation) || !split.isSimple) { - o.style.filter = matrix.toFilter(); - var bb = this.getBBox(), - bbt = this.getBBox(1), - dx = bb.x - bbt.x, - dy = bb.y - bbt.y; - o.coordorigin = (dx * -zoom) + S + (dy * -zoom); - setCoords(this, 1, 1, dx, dy, 0); - } else { - o.style.filter = E; - setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); - } - } else { - o.style.filter = E; - skew.matrix = Str(matrix); - skew.offset = matrix.offset(); - } - if (oldt !== null) { // empty string value is true as well - this._.transform = oldt; - R._extractTransform(this, oldt); - } - return this; - }; - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - if (deg == null) { - return; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this._.dirtyT = 1; - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - if (this._.bbox) { - this._.bbox.x += dx; - this._.bbox.y += dy; - } - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - isNaN(cx) && (cx = null); - isNaN(cy) && (cy = null); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - this._.dirtyT = 1; - return this; - }; - elproto.hide = function () { - !this.removed && (this.node.style.display = "none"); - return this; - }; - elproto.show = function () { - !this.removed && (this.node.style.display = E); - return this; - }; - // Needed to fix the vml setViewBox issues - elproto.auxGetBBox = R.el.getBBox; - elproto.getBBox = function(){ - var b = this.auxGetBBox(); - if (this.paper && this.paper._viewBoxShift) - { - var c = {}; - var z = 1/this.paper._viewBoxShift.scale; - c.x = b.x - this.paper._viewBoxShift.dx; - c.x *= z; - c.y = b.y - this.paper._viewBoxShift.dy; - c.y *= z; - c.width = b.width * z; - c.height = b.height * z; - c.x2 = c.x + c.width; - c.y2 = c.y + c.height; - return c; - } - return b; - }; - elproto._getBBox = function () { - if (this.removed) { - return {}; - } - return { - x: this.X + (this.bbx || 0) - this.W / 2, - y: this.Y - this.H, - width: this.W, - height: this.H - }; - }; - elproto.remove = function () { - if (this.removed || !this.node.parentNode) { - return; - } - this.paper.__set__ && this.paper.__set__.exclude(this); - R.eve.unbind("raphael.*.*." + this.id); - R._tear(this, this.paper); - this.node.parentNode.removeChild(this.node); - this.shape && this.shape.parentNode.removeChild(this.shape); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - this.removed = true; - }; - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (this.attrs && value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - var params; - if (value != null) { - params = {}; - params[name] = value; - } - value == null && R.is(name, "object") && (params = name); - for (var key in params) { - eve("raphael.attr." + key + "." + this.id, this, params[key]); - } - if (params) { - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - // this.paper.canvas.style.display = "none"; - if (params.text && this.type == "text") { - this.textpath.string = params.text; - } - setFillAndStroke(this, params); - // this.paper.canvas.style.display = E; - } - return this; - }; - elproto.toFront = function () { - !this.removed && this.node.parentNode.appendChild(this.node); - this.paper && this.paper.top != this && R._tofront(this, this.paper); - return this; - }; - elproto.toBack = function () { - if (this.removed) { - return this; - } - if (this.node.parentNode.firstChild != this.node) { - this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); - R._toback(this, this.paper); - } - return this; - }; - elproto.insertAfter = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[element.length - 1]; - } - if (element.node.nextSibling) { - element.node.parentNode.insertBefore(this.node, element.node.nextSibling); - } else { - element.node.parentNode.appendChild(this.node); - } - R._insertafter(this, element, this.paper); - return this; - }; - elproto.insertBefore = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[0]; - } - element.node.parentNode.insertBefore(this.node, element.node); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - var s = this.node.runtimeStyle, - f = s.filter; - f = f.replace(blurregexp, E); - if (+size !== 0) { - this.attrs.blur = size; - s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; - s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); - } else { - s.filter = f; - s.margin = 0; - delete this.attrs.blur; - } - return this; - }; - - R._engine.path = function (pathString, vml) { - var el = createNode("shape"); - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = vml.coordorigin; - var p = new Element(el, vml), - attr = {fill: "none", stroke: "#000"}; - pathString && (attr.path = pathString); - p.type = "path"; - p.path = []; - p.Path = E; - setFillAndStroke(p, attr); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.rect = function (vml, x, y, w, h, r) { - var path = R._rectPath(x, y, w, h, r), - res = vml.path(path), - a = res.attrs; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.r = r; - a.path = path; - res.type = "rect"; - return res; - }; - R._engine.ellipse = function (vml, x, y, rx, ry) { - var res = vml.path(), - a = res.attrs; - res.X = x - rx; - res.Y = y - ry; - res.W = rx * 2; - res.H = ry * 2; - res.type = "ellipse"; - setFillAndStroke(res, { - cx: x, - cy: y, - rx: rx, - ry: ry - }); - return res; - }; - R._engine.circle = function (vml, x, y, r) { - var res = vml.path(), - a = res.attrs; - res.X = x - r; - res.Y = y - r; - res.W = res.H = r * 2; - res.type = "circle"; - setFillAndStroke(res, { - cx: x, - cy: y, - r: r - }); - return res; - }; - R._engine.image = function (vml, src, x, y, w, h) { - var path = R._rectPath(x, y, w, h), - res = vml.path(path).attr({stroke: "none"}), - a = res.attrs, - node = res.node, - fill = node.getElementsByTagName(fillString)[0]; - a.src = src; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.path = path; - res.type = "image"; - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = src; - fill.type = "tile"; - res._.fillpos = [x, y]; - res._.fillsize = [w, h]; - node.appendChild(fill); - setCoords(res, 1, 1, 0, 0, 0); - return res; - }; - R._engine.text = function (vml, x, y, text) { - var el = createNode("shape"), - path = createNode("path"), - o = createNode("textpath"); - x = x || 0; - y = y || 0; - text = text || ""; - path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); - path.textpathok = true; - o.string = Str(text); - o.on = true; - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = "0 0"; - var p = new Element(el, vml), - attr = { - fill: "#000", - stroke: "none", - font: R._availableAttrs.font, - text: text - }; - p.shape = el; - p.path = path; - p.textpath = o; - p.type = "text"; - p.attrs.text = Str(text); - p.attrs.x = x; - p.attrs.y = y; - p.attrs.w = 1; - p.attrs.h = 1; - setFillAndStroke(p, attr); - el.appendChild(o); - el.appendChild(path); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.setSize = function (width, height) { - var cs = this.canvas.style; - this.width = width; - this.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - cs.width = width; - cs.height = height; - cs.clip = "rect(0 " + width + " " + height + " 0)"; - if (this._viewBox) { - R._engine.setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var paperSize = this.getSize(), - width = paperSize.width, - height = paperSize.height, - H, W; - if (fit) { - H = height / h; - W = width / w; - if (w * H < width) { - x -= (width - w * H) / 2 / H; - } - if (h * W < height) { - y -= (height - h * W) / 2 / W; - } - } - this._viewBox = [x, y, w, h, !!fit]; - this._viewBoxShift = { - dx: -x, - dy: -y, - scale: paperSize - }; - this.forEach(function (el) { - el.transform("..."); - }); - return this; - }; - var createNode; - R._engine.initWin = function (win) { - var doc = win.document; - if (doc.styleSheets.length < 31) { - doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); - } else { - // no more room, add to the existing one - // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx - doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)"); - } - try { - !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); - createNode = function (tagName) { - return doc.createElement('<rvml:' + tagName + ' class="rvml">'); - }; - } catch (e) { - createNode = function (tagName) { - return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); - }; - } - }; - R._engine.initWin(R._g.win); - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con.container, - height = con.height, - s, - width = con.width, - x = con.x, - y = con.y; - if (!container) { - throw new Error("VML container not found."); - } - var res = new R._Paper, - c = res.canvas = R._g.doc.createElement("div"), - cs = c.style; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - res.width = width; - res.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - res.coordsize = zoom * 1e3 + S + zoom * 1e3; - res.coordorigin = "0 0"; - res.span = R._g.doc.createElement("span"); - res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; - c.appendChild(res.span); - cs.cssText = R.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);", width, height); - if (container == 1) { - R._g.doc.body.appendChild(c); - cs.left = x + "px"; - cs.top = y + "px"; - cs.position = "absolute"; - } else { - if (container.firstChild) { - container.insertBefore(c, container.firstChild); - } else { - container.appendChild(c); - } - } - res.renderfix = function () {}; - return res; - }; - R.prototype.clear = function () { - R.eve("raphael.clear", this); - this.canvas.innerHTML = E; - this.span = R._g.doc.createElement("span"); - this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; - this.canvas.appendChild(this.span); - this.bottom = this.top = null; - }; - R.prototype.remove = function () { - R.eve("raphael.remove", this); - this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; - } - return true; - }; - - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -})); - -// ┌────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ -// ├────────────────────────────────────────────────────────────────────┤ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ -// └────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob, factory) { - if (typeof define === "function" && define.amd) { - define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) { - return factory(Raphael); - }); - } else if (typeof exports === "object") { - var raphael = require("raphael.core"); - - require("raphael.svg"); - require("raphael.vml"); - - module.exports = factory(raphael); - } else { - //glob.Raphael = factory(glob.Raphael); - } -}(this, function (Raphael) { - return Raphael.ninja(); -}));/** - * svg绘图 - * - * Created by GUY on 2015/12/3. - * @class BI.Svg - * @extends BI.Widget - */ -BI.Svg = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Svg.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-svg" - }) - }, - - _init: function () { - BI.Svg.superclass._init.apply(this, arguments); - this.paper = Raphael(this.element[0]); - - this.element.css("overflow", "hidden"); - $(this.paper.canvas).width("100%").height("100%").css({"left": "0", "top": "0"}).appendTo(this.element); - - this.top = this.paper.top; - this.bottom = this.paper.bottom; - this.customAttributes = this.paper.customAttributes; - this.ca = this.paper.ca; - this.raphael = this.paper.raphael; - }, - - add: function () { - return this.paper.add.apply(this.paper, arguments); - }, - - path: function () { - return this.paper.path.apply(this.paper, arguments); - }, - - image: function () { - return this.paper.image.apply(this.paper, arguments); - }, - - rect: function () { - return this.paper.rect.apply(this.paper, arguments); - }, - - circle: function () { - return this.paper.circle.apply(this.paper, arguments); - }, - - ellipse: function () { - return this.paper.ellipse.apply(this.paper, arguments); - }, - - text: function () { - return this.paper.text.apply(this.paper, arguments); - }, - - print: function () { - return this.paper.print.apply(this.paper, arguments); - }, - - - setStart: function () { - return this.paper.setStart.apply(this.paper, arguments); - }, - - setFinish: function () { - return this.paper.setFinish.apply(this.paper, arguments); - }, - - setSize: function () { - return this.paper.setSize.apply(this.paper, arguments); - }, - - setViewBox: function () { - return this.paper.setViewBox.apply(this.paper, arguments); - }, - - - getById: function () { - return this.paper.getById.apply(this.paper, arguments); - }, - - getElementByPoint: function () { - return this.paper.getElementByPoint.apply(this.paper, arguments); - }, - - getElementsByPoint: function () { - return this.paper.getElementsByPoint.apply(this.paper, arguments); - }, - - getFont: function () { - return this.paper.getFont.apply(this.paper, arguments); - }, - - - set: function () { - return this.paper.set.apply(this.paper, arguments); - }, - remove: function () { - return this.paper.remove.apply(this.paper, arguments); - }, - clear: function () { - return this.paper.clear.apply(this.paper, arguments); - } -}); -BI.shortcut("bi.svg", BI.Svg);/** - * - * 原生表格滚动条,为了IE8的兼容 - * - * Created by GUY on 2016/1/12. - * @class BI.NativeTableScrollbar - * @extends BI.Widget - */ -BI.NativeTableScrollbar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - defaultPosition: 0, - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - //把滚动台size改掉 - this.element.width(36); - - var throttle = BI.throttle(function () { - self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollTop()); - }, 150, {leading: false}); - this.element.scroll(function () { - throttle(); - }); - return { - type: "bi.default", - scrolly: true, - items: [{ - type: "bi.layout", - width: 1, - ref: function (_ref) { - self.inner = _ref; - } - }] - } - }, - - mounted: function () { - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - try { - this.element.scrollTop(o.position); - } catch (e) { - - } - this.inner.element.height(o.contentSize); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.setHeight(size); - this.options.size = size; - }, - - populate: function () { - this._populate(); - } -}); -BI.NativeTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.native_table_scrollbar", BI.NativeTableScrollbar); - - -BI.NativeTableHorizontalScrollbar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - //把滚动台size改掉 - this.element.height(36); - - var throttle = BI.throttle(function () { - self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollLeft()); - }, 150, {leading: false}); - this.element.scroll(function () { - throttle(); - }); - return { - type: "bi.default", - scrollx: true, - items: [{ - type: "bi.layout", - height: 1, - ref: function (_ref) { - self.inner = _ref; - } - }] - } - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.setWidth(size); - this.options.size = size; - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - try { - this.element.scrollLeft(o.position); - } catch (e) { - - } - this.inner.element.width(o.contentSize); - }, - - populate: function () { - this._populate(); - } -}); -BI.NativeTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.native_table_horizontal_scrollbar", BI.NativeTableHorizontalScrollbar);/** - * - * 表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableCell - * @extends BI.Single - */ -BI.TableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-cell", - textAlign: "left", - text: "" - }) - }, - - _init: function () { - BI.TableCell.superclass._init.apply(this, arguments); - BI.createWidget({ - type: "bi.label", - element: this, - whiteSpace: "nowrap", - textAlign: this.options.textAlign, - height: this.options.height, - text: this.options.text, - value: this.options.value, - lgap: 5 - }) - } -}); - -BI.shortcut("bi.table_cell", BI.TableCell);/** - * - * 表格单元格 - * - * Created by GUY on 2016/1/12. - * @class BI.CollectionTableCell - * @extends BI.Widget - */ -BI.CollectionTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection-table-cell bi-border-right bi-border-bottom", - width: 0, - height: 0, - _left: 0, - _top: 0, - cell: {} - }) - }, - - _init: function () { - BI.CollectionTableCell.superclass._init.apply(this, arguments); - var o = this.options; - this.cell = BI.createWidget(BI.extend({ - type: "bi.label" - }, o.cell, { - cls: (o.cell.cls || "") + " collection-table-cell-wrapper", - width: o.width - (o._left === 0 ? 1 : 0) - 1, - height: o.height - (o._top === 0 ? 1 : 0) - 1 - })); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.cell, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - }, - - setWidth: function (width) { - BI.CollectionTableCell.superclass.setWidth.apply(this, arguments); - var o = this.options; - this.cell.setWidth(o.width - (o._left === 0 ? 1 : 0) - 1); - }, - - setHeight: function (height) { - BI.CollectionTableCell.superclass.setHeight.apply(this, arguments); - var o = this.options; - this.cell.setHeight(o.height - (o._top === 0 ? 1 : 0) - 1); - } -}); - -BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/** - * CollectionTable - * - * Created by GUY on 2016/1/12. - * @class BI.CollectionTable - * @extends BI.Widget - */ -BI.CollectionTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-collection-table", - headerRowSize: 25, - rowSize: 25, - columnSize: [], - isNeedFreeze: false, - freezeCols: [], - isNeedMerge: false, - mergeCols: [], - mergeRule: BI.emptyFn, - header: [], - items: [], - regionColumnSize: [] - }); - }, - - render: function () { - var self = this, o = this.options; - this._width = 0; - this._height = 0; - this._scrollBarSize = BI.DOM.getScrollWidth(); - this.topLeftCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.topLeftItems[index]; - } - }); - this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomLeftCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topRightCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.topRightItems[index]; - } - }); - this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomRightCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomLeftCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.bottomLeftItems[index]; - } - }); - this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomRightCollection.setScrollTop(scroll.scrollTop); - self.topLeftCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomRightCollection = BI.createWidget({ - type: "bi.collection_view", - cellSizeAndPositionGetter: function (index) { - return self.bottomRightItems[index]; - } - }); - this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { - self.bottomLeftCollection.setScrollTop(scroll.scrollTop); - self.topRightCollection.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topLeftCollection] - }); - this.topRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topRightCollection] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomLeftCollection] - }); - this.bottomRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomRightCollection] - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topLeft, - top: 0, - left: 0 - }, { - el: this.topRight, - top: 0 - }, { - el: this.bottomLeft, - left: 0 - }, { - el: this.bottomRight - }] - }); - - this.topScrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - width: BI.GridTableScrollbar.SIZE - }); - this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { - self.bottomLeftCollection.setScrollTop(scrollTop); - self.bottomRightCollection.setScrollTop(scrollTop); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.leftScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topLeftCollection.setScrollLeft(scrollLeft); - self.bottomLeftCollection.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.rightScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topRightCollection.setScrollLeft(scrollLeft); - self.bottomRightCollection.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.scrollBarLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topScrollbar, - right: 0, - top: 0 - }, { - el: this.leftScrollbar, - left: 0 - }, { - el: this.rightScrollbar, - }] - }); - this._width = o.width - BI.GridTableScrollbar.SIZE; - this._height = o.height - BI.GridTableScrollbar.SIZE; - }, - - mounted: function () { - var o = this.options; - if (o.items.length > 0 || o.header.length > 0) { - this._digest(); - this._populate(); - } - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; - }, - - _getFreezeHeaderHeight: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return 0; - } - return o.header.length * o.headerRowSize; - }, - - _getActualItems: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return o.header.concat(o.items); - } - return o.items; - }, - - _populateScrollbar: function () { - var o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); - this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); - this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()); - this.topScrollbar.populate(); - - this.leftScrollbar.setContentSize(totalLeftColumnSize); - this.leftScrollbar.setSize(regionSize); - this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()); - this.leftScrollbar.populate(); - - this.rightScrollbar.setContentSize(totalRightColumnSize); - this.rightScrollbar.setSize(this._width - regionSize); - this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()); - this.rightScrollbar.populate(); - - var items = this.scrollBarLayout.attr("items"); - items[0].top = this._getFreezeHeaderHeight(); - items[1].top = this._height; - items[2].top = this._height; - items[2].left = regionSize; - this.scrollBarLayout.attr("items", items); - this.scrollBarLayout.resize(); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - var tlw = otlw + this._scrollBarSize; - var tlh = otlh + this._scrollBarSize; - var trw = otrw + this._scrollBarSize; - var trh = otrh + this._scrollBarSize; - var blw = oblw + this._scrollBarSize; - var blh = oblh + this._scrollBarSize; - var brw = obrw + this._scrollBarSize; - var brh = obrh + this._scrollBarSize; - - var digest = function (el) { - el.element.css({ - overflow: "scroll", - overflowX: "scroll", - overflowY: "scroll" - }) - }; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftCollection.setWidth(tlw); - this.topLeftCollection.setHeight(tlh); - this.topRightCollection.setWidth(trw); - this.topRightCollection.setHeight(trh); - this.bottomLeftCollection.setWidth(blw); - this.bottomLeftCollection.setHeight(blh); - this.bottomRightCollection.setWidth(brw); - this.bottomRightCollection.setHeight(brh); - - digest(this.topLeftCollection); - digest(this.topRightCollection); - digest(this.bottomLeftCollection); - digest(this.bottomRightCollection); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - var run = function (positions, items, rendered) { - BI.each(positions, function (i, item) { - var cell = { - type: "bi.collection_table_cell", - cell: items[item.row][item.col] - }; - rendered.push(cell); - }); - }; - run(this.topLeftItems, o.header, leftHeader); - run(this.topRightItems, o.header, rightHeader); - run(this.bottomLeftItems, this._getActualItems(), leftItems); - run(this.bottomRightItems, this._getActualItems(), rightItems); - - this.topLeftCollection._populate(leftHeader); - this.topRightCollection._populate(rightHeader); - this.bottomLeftCollection._populate(leftItems); - this.bottomRightCollection._populate(rightItems); - }, - - _digest: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - //如果表头位置不够,取消表头冻结 - if (this._getFreezeHeaderHeight() <= 0) { - this.topLeftItems = []; - this.topRightItems = []; - this.bottomLeftItems = this._serialize(this._getActualItems(), 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); - this.bottomRightItems = this._serialize(this._getActualItems(), freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); - } else { - this.topLeftItems = this._serialize(o.header, 0, freezeColLength, o.headerRowSize, o.columnSize, o.mergeCols); - this.topRightItems = this._serialize(o.header, freezeColLength, o.columnSize.length, o.headerRowSize, o.columnSize, true); - this.bottomLeftItems = this._serialize(o.items, 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols); - this.bottomRightItems = this._serialize(o.items, freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols); - } - }, - - _serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols, mergeRows) { - mergeCols = mergeCols || []; - mergeRows = mergeRows || []; - var self = this, o = this.options; - var result = [], cache = {}, preCol = {}, preRow = {}, map = {}; - var summaryColumnSize = []; - for (var i = startCol; i < endCol; i++) { - if (i === startCol) { - summaryColumnSize[i] = columnSize[i]; - } else { - summaryColumnSize[i] = summaryColumnSize[i - 1] + columnSize[i]; - } - } - var mergeRow = function (i, j) { - preCol[j]._height += rowHeight; - preCol[j].__mergeRows.push(i); - }; - - var mergeCol = function (i, j) { - preRow[i]._width += columnSize[j]; - preRow[i].__mergeCols.push(j); - }; - - var createOneEl = function (r, c) { - var width = columnSize[c]; - var height = rowHeight; - map[r][c]._row = r; - map[r][c]._col = c; - map[r][c]._width = width; - map[r][c]._height = height; - preCol[c] = map[r][c]; - preCol[c].__mergeRows = [r]; - preRow[r] = map[r][c]; - preRow[r].__mergeCols = [c]; - - result.push({ - x: summaryColumnSize[c] - columnSize[c], - y: +r * rowHeight, - item: map[r][c] - }); - }; - - BI.each(items, function (i, cols) { - for (var j = startCol; j < endCol; j++) { - if (!cache[i]) { - cache[i] = {}; - } - if (!map[i]) { - map[i] = {}; - } - cache[i][j] = cols[j]; - map[i][j] = {}; - if (mergeCols === true || mergeCols.indexOf(j) > -1 || mergeRows === true || mergeRows.indexOf(i) > -1) { - if (i === 0 && j === startCol) { - createOneEl(0, startCol); - } else if (j === startCol && i > 0) { - var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); - if (isNeedMergeRow === true) { - mergeRow(i, j); - preRow[i] = preCol[j]; - } else { - createOneEl(i, j); - } - } else if (i === 0 && j > startCol) { - var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); - if (isNeedMergeCol === true) { - mergeCol(i, j); - preCol[j] = preRow[i]; - } else { - createOneEl(i, j); - } - } else { - var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); - var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); - if (isNeedMergeCol && isNeedMergeRow) { - continue; - //mergeRow(i, j);//优先合并列 - } - if (isNeedMergeCol) { - mergeCol(i, j); - } - if (isNeedMergeRow) { - mergeRow(i, j); - } - if (!isNeedMergeCol && !isNeedMergeRow) { - createOneEl(i, j); - } - } - } else { - createOneEl(i, j); - } - } - }); - return BI.map(result, function (i, item) { - return { - x: item.x, - y: item.y, - row: item.item._row, - col: item.item._col, - width: item.item._width, - height: item.item._height - } - }); - }, - - _populate: function () { - if (this._width <= 0 || this._height <= 0) { - return; - } - if (this._isNeedDigest === true) { - this._digest(); - } - this._isNeedDigest = false; - this._populateTable(); - this._populateScrollbar(); - }, - - getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - setVerticalScroll: function (scrollTop) { - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.topLeftCollection.setScrollLeft(scrollLeft); - this.bottomLeftCollection.setScrollLeft(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.topRightCollection.setScrollLeft(scrollLeft); - this.bottomRightCollection.setScrollLeft(scrollLeft); - }, - - getVerticalScroll: function () { - return this.bottomRightCollection.getScrollTop(); - }, - - getLeftHorizontalScroll: function () { - return this.bottomLeftCollection.getScrollLeft(); - }, - - getRightHorizontalScroll: function () { - return this.bottomRightCollection.getScrollLeft(); - }, - - setWidth: function (width) { - BI.CollectionTable.superclass.setWidth.apply(this, arguments); - this._width = this.options.width - BI.GridTableScrollbar.SIZE; - }, - - setHeight: function (height) { - BI.CollectionTable.superclass.setHeight.apply(this, arguments); - this._height = this.options.height - BI.GridTableScrollbar.SIZE; - }, - - setColumnSize: function (columnSize) { - this._isNeedDigest = true; - this.options.columnSize = columnSize; - }, - - setRegionColumnSize: function (regionColumnSize) { - this._isNeedDigest = true; - this.options.regionColumnSize = regionColumnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - populate: function (items, header) { - if (items && items !== this.options.items) { - this._isNeedDigest = true; - this.options.items = items; - this._restore(); - } - if (header && header !== this.options.header) { - this._isNeedDigest = true; - this.options.header = header; - this._restore(); - } - this._populate(); - }, - - _restore: function () { - this.topLeftCollection.restore(); - this.topRightCollection.restore(); - this.bottomLeftCollection.restore(); - this.bottomRightCollection.restore(); - }, - - restore: function () { - this._restore(); - } -}); -BI.shortcut('bi.collection_table', BI.CollectionTable);/** - * QuickCollectionTable - * - * Created by GUY on 2016/1/12. - * @class BI.QuickCollectionTable - * @extends BI.CollectionTable - */ -BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, { - _defaultConfig: function () { - return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-quick-collection-table" - }); - }, - - render: function () { - BI.QuickCollectionTable.superclass.render.apply(this, arguments); - var self = this, o = this.options; - this.topLeftCollection.setOverflowX(false); - this.topLeftCollection.setOverflowY(false); - this.topRightCollection.setOverflowX(false); - this.topRightCollection.setOverflowY(false); - this.bottomLeftCollection.setOverflowX(false); - this.bottomLeftCollection.setOverflowY(false); - this.bottomRightCollection.setOverflowX(false); - this.bottomRightCollection.setOverflowY(false); - }, - - mounted: function () { - BI.QuickCollectionTable.superclass.mounted.apply(this, arguments); - var self = this; - this._topLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._topRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this.topLeftCollection.element.mousewheel(function (e) { - self._topLeftWheelHandler.onWheel(e.originalEvent); - }); - this.topRightCollection.element.mousewheel(function (e) { - self._topRightWheelHandler.onWheel(e.originalEvent); - }); - this.bottomLeftCollection.element.mousewheel(function (e) { - self._bottomLeftWheelHandler.onWheel(e.originalEvent); - }); - this.bottomRightCollection.element.mousewheel(function (e) { - self._bottomRightWheelHandler.onWheel(e.originalEvent); - }); - }, - - _shouldHandleLeftX: function (delta) { - if (delta > 0) { - return this.bottomLeftCollection.getScrollLeft() < this.bottomLeftCollection.getMaxScrollLeft(); - } else { - return this.bottomLeftCollection.getScrollLeft() > 0; - } - }, - - _shouldHandleRightX: function (delta) { - if (delta > 0) { - return this.bottomRightCollection.getScrollLeft() < this.bottomRightCollection.getMaxScrollLeft(); - } else { - return this.bottomRightCollection.getScrollLeft() > 0; - } - }, - - _shouldHandleY: function (delta) { - if (delta > 0) { - return this.bottomRightCollection.getScrollTop() < this.bottomRightCollection.getMaxScrollTop(); - } else { - return this.bottomRightCollection.getScrollTop() > 0; - } - }, - - _onWheelLeft: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomLeftCollection.getScrollTop(); - var scrollLeft = this.bottomLeftCollection.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - this.topLeftCollection.setScrollLeft(scrollLeft); - this.bottomLeftCollection.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _onWheelRight: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomRightCollection.getScrollTop(); - var scrollLeft = this.bottomRightCollection.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftCollection.setScrollTop(scrollTop); - this.bottomRightCollection.setScrollTop(scrollTop); - this.topRightCollection.setScrollLeft(scrollLeft); - this.bottomRightCollection.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = [] - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftCollection.setWidth(otlw); - this.topLeftCollection.setHeight(otlh); - this.topRightCollection.setWidth(otrw); - this.topRightCollection.setHeight(otrh); - this.bottomLeftCollection.setWidth(oblw); - this.bottomLeftCollection.setHeight(oblh); - this.bottomRightCollection.setWidth(obrw); - this.bottomRightCollection.setHeight(obrh); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - var run = function (positions, items, rendered) { - BI.each(positions, function (i, item) { - var cell = { - type: "bi.collection_table_cell", - cell: items[item.row][item.col] - }; - rendered.push(cell); - }); - }; - run(this.topLeftItems, o.header, leftHeader); - run(this.topRightItems, o.header, rightHeader); - run(this.bottomLeftItems, this._getActualItems(), leftItems); - run(this.bottomRightItems, this._getActualItems(), rightItems); - - this.topLeftCollection.populate(leftHeader); - this.topRightCollection.populate(rightHeader); - this.bottomLeftCollection.populate(leftItems); - this.bottomRightCollection.populate(rightItems); - } -}); -BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/** - * - * 表格单元格 - * - * Created by GUY on 2016/1/12. - * @class BI.GridTableCell - * @extends BI.Widget - */ -BI.GridTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-table-cell bi-border-right bi-border-bottom", - width: 0, - height: 0, - _rowIndex: 0, - _columnIndex: 0, - _left: 0, - _top: 0, - cell: {} - }) - }, - - _init: function () { - BI.GridTableCell.superclass._init.apply(this, arguments); - var o = this.options; - this.cell = BI.createWidget(BI.extend({ - type: "bi.label" - }, o.cell, { - cls: (o.cell.cls || "") + "grid-table-cell-wrapper", - width: o.width - (o._columnIndex === 0 ? 1 : 0) - 1, - height: o.height - (o._rowIndex === 0 ? 1 : 0) - 1 - })); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.cell, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - }, - - setWidth: function (width) { - BI.GridTableCell.superclass.setWidth.apply(this, arguments); - var o = this.options; - this.cell.setWidth(o.width - (o._columnIndex === 0 ? 1 : 0) - 1); - }, - - setHeight: function (height) { - BI.GridTableCell.superclass.setHeight.apply(this, arguments); - var o = this.options; - this.cell.setHeight(o.height - (o._rowIndex === 0 ? 1 : 0) - 1); - } -}); - -BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/** - * GridTable - * - * Created by GUY on 2016/1/12. - * @class BI.GridTable - * @extends BI.Widget - */ -BI.GridTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-grid-table", - headerRowSize: 25, - rowSize: 25, - columnSize: [], - isNeedFreeze: false, - freezeCols: [], - header: [], - items: [], - regionColumnSize: [] - }); - }, - - render: function () { - var self = this, o = this.options; - this._width = 0; - this._height = 0; - this._scrollBarSize = BI.DOM.getScrollWidth(); - var rowHeightGetter = function () { - return o.rowSize; - }; - var columnLeftWidthGetter = function (index) { - return o.columnSize[index]; - }; - var columnRightWidthGetter = function (index) { - return o.columnSize[index + self._getFreezeColLength()]; - }; - this.topLeftGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnLeftWidthGetter - }); - this.topLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomLeftGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topRightGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnRightWidthGetter - }); - this.topRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomRightGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomLeftGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnLeftWidthGetter - }); - this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomRightGrid.setScrollTop(scroll.scrollTop); - self.topLeftGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.bottomRightGrid = BI.createWidget({ - type: "bi.grid_view", - rowHeightGetter: rowHeightGetter, - columnWidthGetter: columnRightWidthGetter - }); - this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { - self.bottomLeftGrid.setScrollTop(scroll.scrollTop); - self.topRightGrid.setScrollLeft(scroll.scrollLeft); - self._populateScrollbar(); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.topLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topLeftGrid] - }); - this.topRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.topRightGrid] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomLeftGrid] - }); - this.bottomRight = BI.createWidget({ - type: "bi.vertical", - scrollable: false, - scrolly: false, - items: [this.bottomRightGrid] - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topLeft, - top: 0, - left: 0 - }, { - el: this.topRight, - top: 0 - }, { - el: this.bottomLeft, - left: 0 - }, { - el: this.bottomRight - }] - }); - - this.topScrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - width: BI.GridTableScrollbar.SIZE - }); - this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { - self.bottomLeftGrid.setScrollTop(scrollTop); - self.bottomRightGrid.setScrollTop(scrollTop); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.leftScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topLeftGrid.setScrollLeft(scrollLeft); - self.bottomLeftGrid.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.rightScrollbar = BI.createWidget({ - type: "bi.grid_table_horizontal_scrollbar", - height: BI.GridTableScrollbar.SIZE - }); - this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { - self.topRightGrid.setScrollLeft(scrollLeft); - self.bottomRightGrid.setScrollLeft(scrollLeft); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.scrollBarLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.topScrollbar, - right: 0, - top: 0 - }, { - el: this.leftScrollbar, - left: 0 - }, { - el: this.rightScrollbar - }] - }); - this._width = o.width - BI.GridTableScrollbar.SIZE; - this._height = o.height - BI.GridTableScrollbar.SIZE; - this.header = this._getHeader(); - this.items = this._getItems(); - }, - - mounted: function () { - var o = this.options; - if (o.items.length > 0 || o.header.length > 0) { - this._populate(); - } - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; - }, - - _getFreezeHeaderHeight: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return 0; - } - return o.header.length * o.headerRowSize; - }, - - _getActualItems: function () { - var o = this.options; - if (o.header.length * o.headerRowSize >= this._height) { - return o.header.concat(o.items); - } - return o.items; - }, - - _populateScrollbar: function () { - var o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); - this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); - this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(), this.bottomRightGrid.getScrollTop())); - this.topScrollbar.populate(); - - this.leftScrollbar.setContentSize(totalLeftColumnSize); - this.leftScrollbar.setSize(regionSize); - this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()); - this.leftScrollbar.populate(); - - this.rightScrollbar.setContentSize(totalRightColumnSize); - this.rightScrollbar.setSize(this._width - regionSize); - this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()); - this.rightScrollbar.populate(); - - var items = this.scrollBarLayout.attr("items"); - items[0].top = this._getFreezeHeaderHeight(); - items[1].top = this._height; - items[2].top = this._height; - items[2].left = regionSize; - this.scrollBarLayout.attr("items", items); - this.scrollBarLayout.resize(); - }, - - _getHeader: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - var leftHeader = [], rightHeader = []; - BI.each(o.header, function (i, cols) { - leftHeader[i] = []; - rightHeader[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftHeader[i].push(cell); - } else { - rightHeader[i].push(cell); - } - }); - }); - return [leftHeader, rightHeader]; - }, - - _getItems: function () { - var o = this.options; - var freezeColLength = this._getFreezeColLength(); - var leftItems = [], rightItems = []; - BI.each(this._getActualItems(), function (i, cols) { - leftItems[i] = []; - rightItems[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftItems[i].push(cell); - } else { - rightItems[i].push(cell); - } - }); - }); - return [leftItems, rightItems]; - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - var freezeColLength = this._getFreezeColLength(); - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - var tlw = otlw + this._scrollBarSize; - var tlh = otlh + this._scrollBarSize; - var trw = otrw + this._scrollBarSize; - var trh = otrh + this._scrollBarSize; - var blw = oblw + this._scrollBarSize; - var blh = oblh + this._scrollBarSize; - var brw = obrw + this._scrollBarSize; - var brh = obrh + this._scrollBarSize; - - var digest = function (el) { - el.element.css({ - overflow: "scroll", - overflowX: "scroll", - overflowY: "scroll" - }) - }; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftGrid.setWidth(tlw); - this.topLeftGrid.setHeight(tlh); - this.topRightGrid.setWidth(trw); - this.topRightGrid.setHeight(trh); - this.bottomLeftGrid.setWidth(blw); - this.bottomLeftGrid.setHeight(blh); - this.bottomRightGrid.setWidth(brw); - this.bottomRightGrid.setHeight(brh); - - digest(this.topLeftGrid); - digest(this.topRightGrid); - digest(this.bottomLeftGrid); - digest(this.bottomRightGrid); - - this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); - this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.topRightGrid.setEstimatedRowSize(o.headerRowSize); - this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); - this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.bottomRightGrid.setEstimatedRowSize(o.rowSize); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - this.topLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.topRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - - function overscan(grid, w, h, rSize, cSize) { - var rCount = h / rSize; - var cCount = w / cSize; - if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { - grid.attr("overscanRowCount", 100); - grid.attr("overscanColumnCount", 100); - } - } - - if (freezeColLength > 0) { - overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); - overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength); - } - if (o.columnSize.length - freezeColLength > 0) { - overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - } - - this.topLeftGrid._populate(this.header[0]); - this.topRightGrid._populate(this.header[1]); - this.bottomLeftGrid._populate(this.items[0]); - this.bottomRightGrid._populate(this.items[1]); - }, - - _populate: function () { - if (this._width <= 0 || this._height <= 0) { - return; - } - this._populateTable(); - this._populateScrollbar(); - }, - - getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - setVerticalScroll: function (scrollTop) { - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.topLeftGrid.setScrollLeft(scrollLeft); - this.bottomLeftGrid.setScrollLeft(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.topRightGrid.setScrollLeft(scrollLeft); - this.bottomRightGrid.setScrollLeft(scrollLeft); - }, - - getVerticalScroll: function () { - return this.bottomRightGrid.getScrollTop(); - }, - - getLeftHorizontalScroll: function () { - return this.bottomLeftGrid.getScrollLeft(); - }, - - getRightHorizontalScroll: function () { - return this.bottomRightGrid.getScrollLeft(); - }, - - setWidth: function (width) { - BI.GridTable.superclass.setWidth.apply(this, arguments); - this._width = this.options.width - BI.GridTableScrollbar.SIZE; - }, - - setHeight: function (height) { - BI.GridTable.superclass.setHeight.apply(this, arguments); - this._height = this.options.height - BI.GridTableScrollbar.SIZE; - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this._isNeedDigest = true; - }, - - setRegionColumnSize: function (regionColumnSize) { - this.options.regionColumnSize = regionColumnSize; - this._isNeedDigest = true; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - populate: function (items, header) { - if (items && this.options.items !== items) { - this.options.items = items; - this.items = this._getItems(); - this._restore(); - } - if (header && this.options.header !== header) { - this.options.header = header; - this.header = this._getHeader(); - this._restore(); - } - this._populate(); - }, - - _restore: function () { - this.topLeftGrid.restore(); - this.topRightGrid.restore(); - this.bottomLeftGrid.restore(); - this.bottomRightGrid.restore(); - }, - - restore: function () { - this._restore(); - } -}); -BI.shortcut('bi.grid_table', BI.GridTable);/** - * QuickGridTable - * - * Created by GUY on 2016/1/12. - * @class BI.QuickGridTable - * @extends BI.GridTable - */ -BI.QuickGridTable = BI.inherit(BI.GridTable, { - _defaultConfig: function () { - return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-quick-grid-table" - }); - }, - - render: function () { - BI.QuickGridTable.superclass.render.apply(this, arguments); - var self = this, o = this.options; - this.topLeftGrid.setOverflowX(false); - this.topLeftGrid.setOverflowY(false); - this.topRightGrid.setOverflowX(false); - this.topRightGrid.setOverflowY(false); - this.bottomLeftGrid.setOverflowX(false); - this.bottomLeftGrid.setOverflowY(false); - this.bottomRightGrid.setOverflowX(false); - this.bottomRightGrid.setOverflowY(false); - }, - - mounted: function () { - BI.QuickGridTable.superclass.mounted.apply(this, arguments); - var self = this; - this._topLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._topRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomLeftWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelLeft, this), - BI.bind(this._shouldHandleLeftX, this), - BI.bind(this._shouldHandleY, this) - ); - this._bottomRightWheelHandler = new BI.WheelHandler( - BI.bind(this._onWheelRight, this), - BI.bind(this._shouldHandleRightX, this), - BI.bind(this._shouldHandleY, this) - ); - this.topLeftGrid.element.mousewheel(function (e) { - self._topLeftWheelHandler.onWheel(e.originalEvent); - }); - this.topRightGrid.element.mousewheel(function (e) { - self._topRightWheelHandler.onWheel(e.originalEvent); - }); - this.bottomLeftGrid.element.mousewheel(function (e) { - self._bottomLeftWheelHandler.onWheel(e.originalEvent); - }); - this.bottomRightGrid.element.mousewheel(function (e) { - self._bottomRightWheelHandler.onWheel(e.originalEvent); - }); - }, - - _shouldHandleLeftX: function (delta) { - if (delta > 0) { - return this.bottomLeftGrid.getScrollLeft() < this.bottomLeftGrid.getMaxScrollLeft(); - } else { - return this.bottomLeftGrid.getScrollLeft() > 0; - } - }, - - _shouldHandleRightX: function (delta) { - if (delta > 0) { - return this.bottomRightGrid.getScrollLeft() < this.bottomRightGrid.getMaxScrollLeft(); - } else { - return this.bottomRightGrid.getScrollLeft() > 0; - } - }, - - _shouldHandleY: function (delta) { - if (delta > 0) { - return this.bottomRightGrid.getScrollTop() < this.bottomRightGrid.getMaxScrollTop(); - } else { - return this.bottomRightGrid.getScrollTop() > 0; - } - }, - - _onWheelLeft: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomLeftGrid.getScrollTop(); - var scrollLeft = this.bottomLeftGrid.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - this.topLeftGrid.setScrollLeft(scrollLeft); - this.bottomLeftGrid.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _onWheelRight: function (deltaX, deltaY) { - var self = this; - var scrollTop = this.bottomRightGrid.getScrollTop(); - var scrollLeft = this.bottomRightGrid.getScrollLeft(); - scrollTop += deltaY; - scrollLeft += deltaX; - this.bottomLeftGrid.setScrollTop(scrollTop); - this.bottomRightGrid.setScrollTop(scrollTop); - this.topRightGrid.setScrollLeft(scrollLeft); - this.bottomRightGrid.setScrollLeft(scrollLeft); - self._populateScrollbar(); - this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }, - - _populateTable: function () { - var self = this, o = this.options; - var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, - summaryColumnSizeArray = []; - var freezeColLength = this._getFreezeColLength(); - BI.each(o.columnSize, function (i, size) { - if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { - totalLeftColumnSize += size; - } else { - totalRightColumnSize += size; - } - totalColumnSize += size; - if (i === 0) { - summaryColumnSizeArray[i] = size; - } else { - summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; - } - }); - - var otlw = regionSize; - var otlh = this._getFreezeHeaderHeight(); - var otrw = this._width - regionSize; - var otrh = this._getFreezeHeaderHeight(); - var oblw = regionSize; - var oblh = this._height - otlh; - var obrw = this._width - regionSize; - var obrh = this._height - otrh; - - this.topLeft.setWidth(otlw); - this.topLeft.setHeight(otlh); - this.topRight.setWidth(otrw); - this.topRight.setHeight(otrh); - this.bottomLeft.setWidth(oblw); - this.bottomLeft.setHeight(oblh); - this.bottomRight.setWidth(obrw); - this.bottomRight.setHeight(obrh); - - this.topLeftGrid.setWidth(otlw); - this.topLeftGrid.setHeight(otlh); - this.topRightGrid.setWidth(otrw); - this.topRightGrid.setHeight(otrh); - this.bottomLeftGrid.setWidth(oblw); - this.bottomLeftGrid.setHeight(oblh); - this.bottomRightGrid.setWidth(obrw); - this.bottomRightGrid.setHeight(obrh); - - this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); - this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.topRightGrid.setEstimatedRowSize(o.headerRowSize); - this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); - this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); - this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); - this.bottomRightGrid.setEstimatedRowSize(o.rowSize); - - var items = this.contextLayout.attr("items"); - items[1].left = regionSize; - items[2].top = this._getFreezeHeaderHeight(); - items[3].left = regionSize; - items[3].top = this._getFreezeHeaderHeight(); - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - - var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; - BI.each(o.header, function (i, cols) { - leftHeader[i] = []; - rightHeader[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftHeader[i].push(cell); - } else { - rightHeader[i].push(cell); - } - }); - }); - BI.each(this._getActualItems(), function (i, cols) { - leftItems[i] = []; - rightItems[i] = []; - BI.each(cols, function (j, col) { - var cell = { - type: "bi.grid_table_cell", - cell: col - }; - if (j < freezeColLength) { - leftItems[i].push(cell); - } else { - rightItems[i].push(cell); - } - }); - }); - - this.topLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.topRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomLeftGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - this.bottomRightGrid.attr({ - overscanColumnCount: 0, - overscanRowCount: 0 - }); - - function overscan(grid, w, h, rSize, cSize) { - var rCount = h / rSize; - var cCount = w / cSize; - if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { - grid.attr("overscanRowCount", 100); - grid.attr("overscanColumnCount", 100); - } - } - - if (freezeColLength > 0) { - overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); - overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength); - } - if (o.columnSize.length - freezeColLength > 0) { - overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); - } - - this.topLeftGrid.populate(leftHeader); - this.topRightGrid.populate(rightHeader); - this.bottomLeftGrid.populate(leftItems); - this.bottomRightGrid.populate(rightItems); - } -}); -BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/** - * - * 表格滚动条 - * - * Created by GUY on 2016/1/12. - * @class BI.GridTableScrollbar - * @extends BI.Widget - */ -BI.GridTableScrollbar = BI.inherit(BI.Widget, { - _const: { - FACE_MARGIN: 4, - FACE_MARGIN_2: 4 * 2, - FACE_SIZE_MIN: 30, - KEYBOARD_SCROLL_AMOUNT: 40 - }, - _defaultConfig: function () { - return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this, arguments), { - baseCls: "scrollbar-layout-main public-scrollbar-main", - attributes: { - tabIndex: 0 - }, - contentSize: 0, - defaultPosition: 0, - isOpaque: false, - orientation: "vertical", - position: 0, - size: 0 - }) - }, - - render: function () { - var self = this, o = this.options; - this.focused = false; - this.isDragging = false; - this.face = BI.createWidget({ - type: "bi.layout", - cls: "scrollbar-layout-face public-scrollbar-face " - + (this._isHorizontal() ? "scrollbar-layout-face-horizontal" : "scrollbar-layout-face-vertical") - }); - this.contextLayout = BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.face, - left: 0, - top: 0 - }] - }); - }, - - mounted: function () { - var self = this, o = this.options; - var onWheel = o.orientation === 'horizontal' ? this._onWheelX : this._onWheelY; - this._wheelHandler = new BI.WheelHandler( - BI.bind(onWheel, this), - BI.bind(this._shouldHandleX, this), - BI.bind(this._shouldHandleY, this) - ); - this._mouseMoveTracker = new BI.MouseMoveTracker( - BI.bind(this._onMouseMove, this), - BI.bind(this._onMouseMoveEnd, this), - document - ); - this.element.on("mousedown", BI.bind(this._onMouseDown, this)); - this.element.on("mousewheel", function (e) { - self._wheelHandler.onWheel(e.originalEvent); - }); - this.element.on("keydown", BI.bind(this._onKeyDown, this)); - this.element.on("focus", function () { - self.focused = true; - self._populate(); - }); - this.element.on("blur", function () { - self.focused = false; - self._populate(); - }); - if (this._isHorizontal()) { - this.element.addClass("scrollbar-layout-main-horizontal"); - } else { - this.element.addClass("scrollbar-layout-main-vertical"); - } - this._populate(); - }, - - _isHorizontal: function () { - return this.options.orientation === 'horizontal' - }, - - _getScale: function () { - var o = this.options; - var scale = o.size / o.contentSize; - var faceSize = o.size * scale; - - if (faceSize < this._const.FACE_SIZE_MIN) { - scale = (o.size - this._const.FACE_SIZE_MIN) / (o.contentSize - o.size); - } - return scale; - }, - - _getFaceSize: function () { - var o = this.options; - var scale = o.size / o.contentSize; - var faceSize = o.size * scale; - - if (faceSize < this._const.FACE_SIZE_MIN) { - faceSize = this._const.FACE_SIZE_MIN; - } - return faceSize; - }, - - _shouldHandleX: function (delta) { - return this.options.orientation === 'horizontal' ? - this._shouldHandleChange(delta) : - false; - }, - - _shouldHandleY: function (delta) { - return this.options.orientation !== 'horizontal' ? - this._shouldHandleChange(delta) : - false; - }, - - _shouldHandleChange: function (delta) { - return this.options.position + delta !== this.options.position; - }, - - _onWheelY: function (deltaX, deltaY) { - this._onWheel(deltaY); - }, - - _onWheelX: function (deltaX, deltaY) { - this._onWheel(deltaX); - }, - - _onWheel: function (delta) { - var maxPosition = this.options.contentSize - this.options.size; - this.options.position += delta; - if (this.options.position < 0) { - this.options.position = 0; - } else if (this.options.position > maxPosition) { - this.options.position = maxPosition; - } - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _onMouseDown: function (e) { - if (e.target !== this.face.element[0]) { - var position = this._isHorizontal() ? e.offsetX : e.offsetY; - position /= this._getScale(); - this.options.position = BI.clamp(position - (this._getFaceSize() * 0.5 / this._getScale()), 0, this.options.contentSize - this.options.size); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - } else { - this._mouseMoveTracker.captureMouseMoves(e); - } - try { - this.element[0].focus(); - } catch (e) { - - } - }, - - _onMouseMove: function (deltaX, deltaY) { - var delta = this._isHorizontal() ? deltaX : deltaY; - delta /= this._getScale(); - this.options.position = BI.clamp(this.options.position + delta, 0, this.options.contentSize - this.options.size); - this.isDragging = this._mouseMoveTracker.isDragging(); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _onMouseMoveEnd: function (event) { - this._mouseMoveTracker.releaseMouseMoves(); - if (this.isDragging === true) { - this.isDragging = false; - this._populate(); - } - }, - - _onKeyDown: function (event) { - var Keys = { - BACKSPACE: 8, - TAB: 9, - RETURN: 13, - ALT: 18, - ESC: 27, - SPACE: 32, - PAGE_UP: 33, - PAGE_DOWN: 34, - END: 35, - HOME: 36, - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - DELETE: 46, - COMMA: 188, - PERIOD: 190, - A: 65, - Z: 90, - ZERO: 48, - NUMPAD_0: 96, - NUMPAD_9: 105 - }; - var keyCode = event.keyCode; - - if (keyCode === Keys.TAB) { - return; - } - - var distance = 40; - var direction = 0; - - if (this._isHorizontal()) { - switch (keyCode) { - case Keys.HOME: - direction = -1; - distance = this.options.contentSize; - break; - - case Keys.LEFT: - direction = -1; - break; - - case Keys.RIGHT: - direction = 1; - break; - - default: - return; - } - } - - if (!this._isHorizontal()) { - switch (keyCode) { - case Keys.SPACE: - if (event.shiftKey) { - direction = -1; - } else { - direction = 1; - } - break; - - case Keys.HOME: - direction = -1; - distance = this.options.contentSize; - break; - - case Keys.UP: - direction = -1; - break; - - case Keys.DOWN: - direction = 1; - break; - - case Keys.PAGE_UP: - direction = -1; - distance = this.options.size; - break; - - case Keys.PAGE_DOWN: - direction = 1; - distance = this.options.size; - break; - - default: - return; - } - } - - this.options.position = BI.clamp(this.options.position + (distance * direction), 0, this.options.contentSize - this.options.size); - event.preventDefault(); - this._populate(); - this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); - }, - - _populate: function () { - var self = this, o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - - var size = o.size; - var isHorizontal = this._isHorizontal(); - var isActive = this.focused || this.isDragging; - - var faceSize = this._getFaceSize(); - var isOpaque = o.isOpaque; - this.element[isOpaque === true ? "addClass" : "removeClass"]("public-scrollbar-main-opaque"); - this.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-main-active"); - - this.face.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-face-active"); - - var position = o.position * this._getScale() + this._const.FACE_MARGIN; - - var items = this.contextLayout.attr("items"); - if (isHorizontal) { - this.setWidth(size); - this.face.setWidth(faceSize - this._const.FACE_MARGIN_2); - items[0].left = position; - items[0].top = 0; - } else { - this.setHeight(size); - this.face.setHeight(faceSize - this._const.FACE_MARGIN_2); - items[0].left = 0; - items[0].top = position; - } - this.contextLayout.attr("items", items); - this.contextLayout.resize(); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - }, - - setPosition: function (position) { - this.options.position = position; - }, - - setSize: function (size) { - this.options.size = size; - }, - - populate: function () { - this._populate(); - } -}); -BI.GridTableScrollbar.SIZE = 10; -BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar); - - -BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, { - _const: { - FACE_MARGIN: 4, - FACE_MARGIN_2: 4 * 2, - FACE_SIZE_MIN: 30, - KEYBOARD_SCROLL_AMOUNT: 40 - }, - _defaultConfig: function () { - return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { - attributes: { - tabIndex: 0 - }, - contentSize: 0, - position: 0, - size: 0 - }) - }, - - _init: function () { - BI.GridTableHorizontalScrollbar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.scrollbar = BI.createWidget({ - type: "bi.grid_table_scrollbar", - orientation: "horizontal", - isOpaque: true, - position: o.position, - contentSize: o.contentSize, - size: o.size - }); - this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function () { - self.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, arguments); - }); - BI.createWidget({ - type: "bi.absolute", - cls: "horizontal-scrollbar", - element: this, - width: o.size, - height: BI.GridTableScrollbar.SIZE, - items: [{ - el: { - type: "bi.absolute", - scrollable: false, - height: BI.GridTableScrollbar.SIZE, - items: [{ - el: this.scrollbar, - left: 0, - top: 0 - }] - }, - top: 0, - left: 0, - right: 0 - }] - }); - }, - - setContentSize: function (contentSize) { - this.options.contentSize = contentSize; - this.scrollbar.setContentSize(contentSize); - }, - - setPosition: function (position) { - this.options.position = position; - this.scrollbar.setPosition(position); - }, - - setSize: function (size) { - this.setWidth(size); - this.options.size = size; - this.scrollbar.setSize(size); - }, - - populate: function () { - this.scrollbar.populate(); - var o = this.options; - if (o.size < 1 || o.contentSize <= o.size) { - this.setVisible(false); - return; - } - this.setVisible(true); - } -}); -BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; -BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/** - * - * 表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableHeaderCell - * @extends BI.Single - */ -BI.TableHeaderCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-header-cell", - text: "" - }) - }, - - _init: function () { - BI.TableHeaderCell.superclass._init.apply(this, arguments); - BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "center", - height: this.options.height, - text: this.options.text, - value: this.options.value - }) - } -}); - -BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/** - * - * 表格 - * - * 能处理静态宽度以及动态宽度的表, 百分比宽度的表请使用PreviewTable - * - * Created by GUY on 2015/9/22. - * @class BI.Table - * @extends BI.Widget - */ -BI.Table = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Table.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table", - logic: { //冻结的页面布局逻辑 - dynamic: false - }, - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 - - isNeedMerge: false,//是否需要合并单元格 - mergeCols: [], //合并的单元格列号 - mergeRule: function (row1, row2) { //合并规则, 默认相等时合并 - return BI.isEqual(row1, row2); - }, - - columnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: false, - - header: [], - footer: false, - items: [] //二维数组 - }) - }, - - _calculateWidth: function (width) { - if (!width || width === "0") { - return ""; - } - width = BI.parseFloat(width); - if (width < 0) { - width = 0; - } - return width > 1.01 ? width : (width * 100 + "%"); - }, - - _calculateHeight: function (height) { - return height ? height : ""; - }, - - _isRightFreeze: function () { - return BI.isNotEmptyArray(this.options.freezeCols) && BI.first(this.options.freezeCols) !== 0; - }, - - _createTopLeft: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.topLeftColGroupTds = {}; - this.topLeftBodyTds = {}; - this.topLeftBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnLeft, this.topLeftColGroupTds); - var body = this.topLeftBody = this._body(); - body.element.append(this._createHeaderCells(this.topLeftItems, this.columnLeft, this.mergeLeft, this.topLeftBodyTds, this.topLeftBodyItems)); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.topLeftContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createTopRight: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.topRightColGroupTds = {}; - this.topRightBodyTds = {}; - this.topRightBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnRight, this.topRightColGroupTds); - var body = this.topRightBody = this._body(); - body.element.append(this._createHeaderCells(this.topRightItems, this.columnRight, this.mergeRight, this.topRightBodyTds, this.topRightBodyItems, this.columnLeft.length)); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (!isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w)) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.topRightContainer = BI.createWidget({ - type: "bi.adaptive", - width: w || undefined, - items: [table] - })); - }, - - _createBottomLeft: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.bottomLeftColGroupTds = {}; - this.bottomLeftBodyTds = {}; - this.bottomLeftBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnLeft, this.bottomLeftColGroupTds); - var body = this._createBottomLeftBody(); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.bottomLeftContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createBottomLeftBody: function () { - var body = this.bottomLeftBody = this._body(); - body.element.append(this._createCells(this.bottomLeftItems, this.columnLeft, this.mergeLeft, this.bottomLeftBodyTds, this.bottomLeftBodyItems)); - return body; - }, - - _createBottomRight: function () { - var o = this.options, isRight = this._isRightFreeze(); - this.bottomRightColGroupTds = {}; - this.bottomRightBodyTds = {}; - this.bottomRightBodyItems = {}; - var table = this._table(); - var colgroup = this._createColGroup(this.columnRight, this.bottomRightColGroupTds); - var body = this._createBottomRightBody(); - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, body] - }); - if (!isRight) { - var w = 0; - BI.each(o.columnSize, function (i, col) { - if (!o.freezeCols.contains(i)) { - w += col; - } - }); - if (BI.isNumeric(w) && w > 1) { - w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; - } - } - return (this.bottomRightContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - })); - }, - - _createBottomRightBody: function () { - var body = this.bottomRightBody = this._body(); - body.element.append(this._createCells(this.bottomRightItems, this.columnRight, this.mergeRight, this.bottomRightBodyTds, this.bottomRightBodyItems, this.columnLeft.length)); - return body; - }, - - _createFreezeTable: function () { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - var split = this._split(o.header); - this.topLeftItems = split.left; - this.topRightItems = split.right; - split = this._split(o.items); - this.bottomLeftItems = split.left; - this.bottomRightItems = split.right; - - this.columnLeft = []; - this.columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - self[isRight ? "columnRight" : "columnLeft"].push(size); - } else { - self[isRight ? "columnLeft" : "columnRight"].push(size); - } - }); - this.mergeLeft = []; - this.mergeRight = []; - BI.each(o.mergeCols, function (i, col) { - if (o.freezeCols.contains(col)) { - self[isRight ? "mergeRight" : "mergeLeft"].push(col); - } else { - self[isRight ? "mergeLeft" : "mergeRight"].push(col); - } - }); - - var topLeft = this._createTopLeft(); - var topRight = this._createTopRight(); - var bottomLeft = this._createBottomLeft(); - var bottomRight = this._createBottomRight(); - - this.scrollTopLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-top-left", - width: "100%", - height: "100%", - scrollable: false, - items: [topLeft] - }); - this.scrollTopRight = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-top-right", - width: "100%", - height: "100%", - scrollable: false, - items: [topRight] - }); - this.scrollBottomLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-bottom-left", - width: "100%", - height: "100%", - scrollable: isRight || null, - scrollx: !isRight, - items: [bottomLeft] - }); - this.scrollBottomRight = BI.createWidget({ - type: "bi.adaptive", - cls: "scroll-bottom-right", - width: "100%", - height: "100%", - scrollable: !isRight || null, - scrollx: isRight, - items: [bottomRight] - }); - this.topLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "top-left", - scrollable: false, - items: [this.scrollTopLeft] - }); - this.topRight = BI.createWidget({ - type: "bi.adaptive", - cls: "top-right", - scrollable: false, - items: [this.scrollTopRight] - }); - this.bottomLeft = BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-left", - // scrollable: false, - items: [this.scrollBottomLeft] - }); - this.bottomRight = BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-right", - scrollable: false, - items: [this.scrollBottomRight] - }); - - var headerHeight = o.header.length * ((o.headerRowSize || o.rowSize) + 1) + 1; - var leftWidth = BI.sum(o.freezeCols, function (i, col) { - return o.columnSize[col] > 1 ? o.columnSize[col] + 1 : o.columnSize[col]; - }); - - this._resize = function () { - if (self.scrollBottomLeft.element.is(":visible")) { - self.scrollBottomLeft.element.css({"overflow-x": "auto"}); - self.scrollBottomRight.element.css({"overflow-x": "auto"}); - self.setColumnSize(o.columnSize); - if (isRight) { - self.scrollBottomLeft.element.css({"overflow-y": "auto"}); - } else { - self.scrollBottomRight.element.css({"overflow-y": "auto"}); - } - if (self.scrollBottomLeft.element.hasHorizonScroll() || self.scrollBottomRight.element.hasHorizonScroll()) { - self.scrollBottomLeft.element.css("overflow-x", "scroll"); - self.scrollBottomRight.element.css("overflow-x", "scroll"); - } - if (self.scrollBottomRight.element.hasVerticalScroll()) { - self.scrollTopRight.element.css("overflow-y", "scroll"); - } else { - self.scrollTopRight.element.css("overflow-y", "hidden"); - } - if (self.scrollBottomLeft.element.hasVerticalScroll()) { - self.scrollTopLeft.element.css("overflow-y", "scroll"); - } else { - self.scrollTopLeft.element.css("overflow-y", "hidden"); - } - self.scrollTopLeft.element[0].scrollLeft = self.scrollBottomLeft.element[0].scrollLeft; - self.scrollTopRight.element[0].scrollLeft = self.scrollBottomRight.element[0].scrollLeft; - self.scrollBottomLeft.element[0].scrollTop = self.scrollBottomRight.element[0].scrollTop; - } - }; - - var regionColumnSize = o.regionColumnSize; - if (o.freezeCols.length === 0) { - regionColumnSize = isRight ? ['fill', 0] : [0, 'fill']; - } else if (o.freezeCols.length >= o.columnSize.length) { - regionColumnSize = isRight ? [0, 'fill'] : ['fill', 0]; - } - this.partitions = BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - rows: 2, - columns: 2, - columnSize: regionColumnSize || (isRight ? ['fill', leftWidth] : [leftWidth, 'fill']), - rowSize: [headerHeight, 'fill'], - items: [[{ - el: this.topLeft - }, { - el: this.topRight - }], [{ - el: this.bottomLeft - }, { - el: this.bottomRight - }]] - })))); - - this._initFreezeScroll(); - BI.nextTick(function () { - if (self.element.is(":visible")) { - self._resize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); - } - }); - BI.ResizeDetector.addResizeListener(this, function () { - self._resize(); - self.fireEvent(BI.Table.EVENT_TABLE_RESIZE); - }); - }, - - _initFreezeScroll: function () { - var self = this, o = this.options; - scroll(this.scrollBottomRight.element, this.scrollTopRight.element, this.scrollBottomLeft.element); - // scroll(this.scrollBottomLeft.element, this.scrollTopLeft.element, this.scrollBottomRight.element); - - function scroll(scrollElement, scrollTopElement, otherElement) { - scrollElement.scroll(function (e) { - otherElement.scrollTop(scrollElement.scrollTop()); - scrollTopElement.scrollLeft(scrollElement.scrollLeft()); - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); - }); - } - }, - - resize: function () { - this._resize && this._resize(); - }, - - _createCells: function (items, columnSize, mergeCols, TDs, Ws, start, rowSize) { - var self = this, o = this.options, preCol = {}, preRow = {}, preRW = {}, preCW = {}, map = {}; - columnSize = columnSize || o.columnSize; - mergeCols = mergeCols || o.mergeCols; - TDs = TDs || {}; - Ws = Ws || {}; - start = start || 0; - rowSize || (rowSize = o.rowSize); - var frag = document.createDocumentFragment(); - BI.each(items, function (i, rows) { - var tr = $("<tr>").addClass((i & 1) === 0 ? "odd" : "even"); - BI.each(rows, function (j, row) { - if (!map[i]) { - map[i] = {}; - } - if (!TDs[i]) { - TDs[i] = {}; - } - if (!Ws[i]) { - Ws[i] = {}; - } - map[i][j] = row; - - if (o.isNeedMerge && mergeCols.contains(j)) { - if (i === 0 && j === 0) { - createOneEl(0, 0); - } else if (j === 0 && i > 0) { - var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); - if (isNeedMergeRow === true) { - mergeRow(i, j); - preRow[i] = preCol[j]; - preRW[i] = preCW[j]; - } else { - createOneEl(i, j); - } - } else if (i === 0 && j > 0) { - var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); - if (isNeedMergeCol === true) { - mergeCol(i, j); - preCol[j] = preRow[i]; - preCW[j] = preRW[i]; - } else { - createOneEl(i, j); - } - } else { - var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); - var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); - if (isNeedMergeCol && isNeedMergeRow) { - return; - } - if (isNeedMergeCol) { - mergeCol(i, j); - } - if (isNeedMergeRow) { - mergeRow(i, j); - } - if (!isNeedMergeCol && !isNeedMergeRow) { - createOneEl(i, j); - } - } - } else { - createOneEl(i, j); - } - }); - function mergeRow(i, j) { - var height = (preCol[j].attr("height") | 0) + rowSize + 1; - preCol[j].attr("height", height).css("height", height); - //preCW[j].element.css("height", height); - var rowspan = ((preCol[j].attr("rowspan") || 1) | 0) + 1; - preCol[j].attr("rowspan", rowspan); - preCol[j].__mergeRows.pushDistinct(i); - TDs[i][j] = preCol[j]; - Ws[i][j] = preCW[j]; - } - - function mergeCol(i, j) { - if (columnSize[j]) { - var width = preRow[i].attr("width") | 0; - if (width > 1.05 && columnSize[j]) { - width = width + columnSize[j] + 1; - if (j === columnSize.length - 1) { - width--; - } - } else { - width = width + columnSize[j] - } - width = self._calculateWidth(width); - preRow[i].attr("width", width).css("width", width); - preRW[i].element.width(width); - } - var colspan = ((preRow[i].attr("colspan") || 1) | 0) + 1; - preRow[i].attr("colspan", colspan); - preRow[i].__mergeCols.pushDistinct(j); - TDs[i][j] = preRow[i]; - Ws[i][j] = preRW[i]; - } - - function createOneEl(r, c) { - var width = self._calculateWidth(columnSize[c]); - if (width > 1.05 && c === columnSize.length - 1) { - width--; - } - var height = self._calculateHeight(rowSize); - var td = $("<td>").attr("height", height) - .attr("width", width).css({"width": width, "height": height, "position": "relative"}) - .addClass((c & 1) === 0 ? "odd-col" : "even-col") - .addClass(r === 0 ? "first-row" : "") - .addClass(c === 0 ? "first-col" : "") - .addClass(c === rows.length - 1 ? "last-col" : ""); - var w = BI.createWidget(map[r][c], { - type: "bi.table_cell", - textAlign: "left", - width: BI.isNumeric(width) ? width : "", - height: BI.isNumeric(height) ? height : "", - _row: r, - _col: c + start - }); - self.addWidget(w.getName(), w); - w._mount(); - w.element.css("position", "relative"); - td.append(w.element); - tr.append(td); - preCol[c] = td; - preCol[c].__mergeRows = [r]; - preCW[c] = w; - preRow[r] = td; - preRow[r].__mergeCols = [c]; - preRW[r] = w; - TDs[r][c] = td; - Ws[r][c] = w; - } - - frag.appendChild(tr[0]); - }); - return frag; - }, - - _createColGroupCells: function (columnSize, store) { - var self = this, o = this.options; - columnSize = columnSize || o.columnSize; - store = store || {}; - var frag = document.createDocumentFragment(); - BI.each(columnSize, function (i, size) { - var width = self._calculateWidth(size); - var col = $("<col>").attr("width", width).css("width", width); - store[i] = col; - frag.appendChild(col[0]); - }); - return frag; - }, - - _createHeaderCells: function (items, columnSize, mergeCols, TDs, Ws, start) { - var self = this, o = this.options; - start || (start = 0); - var frag = this._createCells(items, columnSize, BI.range(o.columnSize.length), TDs, Ws, start, o.headerRowSize || o.rowSize); - - return frag; - }, - - _createFooterCells: function (items, columnSize, TDs, Ws) { - var o = this.options; - var frag = this._createCells(items, columnSize, [], TDs, Ws, 0); - return frag; - }, - - _createColGroup: function (columnSize, store, widgets) { - var self = this, o = this.options; - this.colgroup = this._colgroup(); - this.colgroup.element.append(this._createColGroupCells(columnSize, store, widgets)); - return this.colgroup; - }, - - _createHeader: function () { - var self = this, o = this.options; - if (o.header === false) { - return; - } - this.header = this._header(); - this.header.element.append(this._createHeaderCells(o.header, null, null, this.headerTds, this.headerItems)); - return this.header; - }, - - _createFooter: function (columnSize, store, widgets) { - var self = this, o = this.options; - if (o.footer === false) { - return; - } - this.footer = this._footer(); - this.footer.element.append(this._createFooterCells(o.footer, null, this.footerTds, this.footerItems)); - return this.footer; - }, - - - _createBody: function () { - var self = this, o = this.options; - this.body = this._body(); - this.body.element.append(this._createCells(o.items, null, null, this.bodyTds, this.bodyItems)); - return this.body; - }, - - _createNormalTable: function () { - var self = this, o = this.options, table = this._table(); - this.colgroupTds = {}; - this.headerTds = {}; - this.footerTds = {}; - this.bodyTds = {}; - - this.headerItems = {}; - this.footerItems = {}; - this.bodyItems = {}; - var colgroup = this._createColGroup(null, this.colgroupTds); - var header = this._createHeader(); - var footer = this._createFooter(); - var body = this._createBody(); - - BI.createWidget({ - type: "bi.adaptive", - element: table, - items: [colgroup, header, footer, body] - }); - - var w = BI.sum(this.options.columnSize) || undefined; - w = this._calculateWidth(w); - if (BI.isNumeric(w) && w > 1) { - w += o.columnSize.length; - } - this.tableContainer = BI.createWidget({ - type: "bi.adaptive", - width: this._calculateWidth(w), - items: [table] - }); - - this.scrollBottomRight = BI.createWidget({ - type: "bi.adaptive", - width: "100%", - height: "100%", - cls: "scroll-bottom-right", - scrollable: true, - items: [this.tableContainer] - }); - - BI.createWidget({ - type: "bi.adaptive", - cls: "bottom-right", - element: this, - scrollable: false, - items: [this.scrollBottomRight] - }); - - this._initNormalScroll(); - BI.nextTick(function () { - if (self.element.is(":visible")) { - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); - } - }); - }, - - _initNormalScroll: function () { - var self = this; - this.scrollBottomRight.element.scroll(function (e) { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); - }); - }, - - _split: function (items) { - var o = this.options, left = [], right = [], isRight = this._isRightFreeze(); - BI.each(items, function (i, rows) { - left.push([]); - right.push([]); - BI.each(rows, function (j, cell) { - if (o.freezeCols.contains(j)) { - (isRight ? right : left)[i].push(cell); - } else { - (isRight ? left : right)[i].push(cell); - } - }) - }); - return { - left: left, - right: right - } - }, - - _table: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "table", - cls: "table", - attribute: {"cellspacing": 0, "cellpadding": 0} - }); - }, - - _header: function () { - return BI.createWidget({ - type: "bi.layout", - cls: "header", - tagName: "thead" - }); - }, - - _footer: function () { - return BI.createWidget({ - type: "bi.layout", - cls: "footer", - tagName: "tfoot" - }); - }, - - _body: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "tbody", - cls: "body" - }); - }, - - _colgroup: function () { - return BI.createWidget({ - type: "bi.layout", - tagName: "colgroup" - }); - }, - - _init: function () { - BI.Table.superclass._init.apply(this, arguments); - - this.populate(this.options.items); - }, - - setColumnSize: function (columnSize) { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - o.columnSize = columnSize || []; - if (o.isNeedFreeze) { - var columnLeft = []; - var columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - isRight ? columnRight.push(size) : columnLeft.push(size); - } else { - isRight ? columnLeft.push(size) : columnRight.push(size); - } - }); - var topleft = 0, topright = 1, bottomleft = 2, bottomright = 3; - var run = function (direction) { - var colgroupTds, bodyTds, bodyItems, sizes; - switch (direction) { - case topleft: - colgroupTds = self.topLeftColGroupTds; - bodyTds = self.topLeftBodyTds; - bodyItems = self.topLeftBodyItems; - sizes = columnLeft; - break; - case topright: - colgroupTds = self.topRightColGroupTds; - bodyTds = self.topRightBodyTds; - bodyItems = self.topRightBodyItems; - sizes = columnRight; - break; - case bottomleft: - colgroupTds = self.bottomLeftColGroupTds; - bodyTds = self.bottomLeftBodyTds; - bodyItems = self.bottomLeftBodyItems; - sizes = columnLeft; - break; - case bottomright: - colgroupTds = self.bottomRightColGroupTds; - bodyTds = self.bottomRightBodyTds; - bodyItems = self.bottomRightBodyItems; - sizes = columnRight; - break; - } - BI.each(colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (sizes[i] !== "" && width !== sizes[i]) { - var w = self._calculateWidth(sizes[i]); - colgroup.attr("width", w).css("width", w); - BI.each(bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(bodyItems, function (j, items) { - if (items[i]) { - if (bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }) - }; - run(topleft); - run(topright); - run(bottomleft); - run(bottomright); - - var lw = 0, rw = 0; - this.columnLeft = []; - this.columnRight = []; - BI.each(o.columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - lw += size; - self[isRight ? "columnRight" : "columnLeft"].push(size); - } else { - rw += size; - self[isRight ? "columnLeft" : "columnRight"].push(size); - } - }); - lw = this._calculateWidth(lw); - rw = this._calculateWidth(rw); - - if (BI.isNumeric(lw)) { - lw = BI.parseFloat(lw) + o.freezeCols.length; - } - if (BI.isNumeric(rw)) { - rw = BI.parseFloat(rw) + o.columnSize.length - o.freezeCols.length; - } - this.topLeftContainer.element.width(isRight ? rw : lw); - this.bottomLeftContainer.element.width(isRight ? rw : lw); - this.topRightContainer.element.width(isRight ? lw : rw); - this.bottomRightContainer.element.width(isRight ? lw : rw); - this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; - this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; - } else { - BI.each(this.colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (o.columnSize[i] !== "" && width !== o.columnSize[i]) { - var w = self._calculateWidth(o.columnSize[i]); - colgroup.attr("width", w).css("width", w); - BI.each(self.bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.headerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.footerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.bodyItems, function (j, items) { - if (items[i]) { - if (self.bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - BI.each(self.headerItems, function (j, items) { - if (items[i]) { - if (self.headerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.headerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.headerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - BI.each(self.footerItems, function (j, items) { - if (items[i]) { - if (self.footerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(o.columnSize, function (t, s) { - if (self.footerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.footerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }); - var w = this._calculateWidth(BI.sum(o.columnSize)); - if (w > 1.05) { - w += o.columnSize.length; - } - if (w > 1.05) { - this.tableContainer.element.width(w); - } - } - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - getCalculateColumnSize: function () { - var self = this, o = this.options; - var columnSize = []; - if (o.isNeedFreeze === true) { - if (BI.size(this.bottomLeftBodyTds) > 0 || BI.size(this.bottomRightBodyTds) > 0) { - if (!BI.any(this.bottomLeftBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.bottomLeftBodyTds[0], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.bottomLeftBodyTds[0]) - 1) { - width++; - } - columnSize.push(width); - }); - } - if (!BI.any(this.bottomRightBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.bottomRightBodyTds[0], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.bottomRightBodyTds[0]) - 1) { - width++; - } - columnSize.push(width); - }); - } - return columnSize; - } - if (!BI.any(this.topLeftBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.topLeftBodyTds[BI.size(self.topLeftBodyTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - if (!BI.any(this.topRightBodyTds, function (i, tds) { - if (!BI.any(tds, function (i, item) { - if (item.__mergeCols.length > 1) { - return true; - } - })) { - BI.each(tds, function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(tds) - 1) { - width++; - } - columnSize.push(width); - }); - return true; - } - })) { - BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.topRightBodyTds[BI.size(self.topRightBodyTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - } else { - BI.each(this.headerTds[BI.size(this.headerTds) - 1], function (i, item) { - var width = item.width() / item.__mergeCols.length; - if (i == BI.size(self.headerTds[BI.size(self.headerTds) - 1]) - 1) { - width++; - } - columnSize.push(width); - }); - } - return columnSize; - }, - - setHeaderColumnSize: function (columnSize) { - var self = this, o = this.options; - var isRight = this._isRightFreeze(); - if (o.isNeedFreeze) { - var columnLeft = []; - var columnRight = []; - BI.each(columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - isRight ? columnRight.push(size) : columnLeft.push(size); - } else { - isRight ? columnLeft.push(size) : columnRight.push(size); - } - }); - var topleft = 0, topright = 1; - var run = function (direction) { - var colgroupTds, bodyTds, bodyItems, sizes; - switch (direction) { - case topleft: - colgroupTds = self.topLeftColGroupTds; - bodyTds = self.topLeftBodyTds; - bodyItems = self.topLeftBodyItems; - sizes = columnLeft; - break; - case topright: - colgroupTds = self.topRightColGroupTds; - bodyTds = self.topRightBodyTds; - bodyItems = self.topRightBodyItems; - sizes = columnRight; - break; - } - BI.each(colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (width !== sizes[i]) { - var w = self._calculateWidth(sizes[i]); - colgroup.attr("width", w).css("width", w); - BI.each(bodyTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(bodyItems, function (j, items) { - if (items[i]) { - if (bodyTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(sizes, function (t, s) { - if (bodyTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += bodyTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }) - }; - run(topleft); - run(topright); - - var lw = 0, rw = 0; - BI.each(columnSize, function (i, size) { - if (o.freezeCols.contains(i)) { - lw += size; - } else { - rw += size; - } - }); - lw = this._calculateWidth(lw); - rw = this._calculateWidth(rw); - - if (BI.isNumeric(lw)) { - lw = BI.parseFloat(lw) + o.freezeCols.length; - } - if (BI.isNumeric(rw)) { - rw = BI.parseFloat(rw) + columnSize.length - o.freezeCols.length; - } - this.topLeftContainer.element.width(isRight ? rw : lw); - this.topRightContainer.element.width(isRight ? lw : rw); - this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; - this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; - } else { - BI.each(this.colgroupTds, function (i, colgroup) { - var width = colgroup.attr("width") | 0; - if (width !== columnSize[i]) { - var w = self._calculateWidth(columnSize[i]); - colgroup.attr("width", w).css("width", w); - BI.each(self.headerTds, function (j, items) { - if (items[i]) { - if (items[i].__mergeCols.length > 1) { - var wid = 0; - BI.each(columnSize, function (t, s) { - if (items[i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += items[i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].attr("width", "").css("width", ""); - } - } else { - if (i == BI.size(items) - 1) { - items[i].attr("width", w - 1).css("width", w - 1); - } else { - items[i].attr("width", w).css("width", w); - } - } - } - }); - BI.each(self.headerItems, function (j, items) { - if (items[i]) { - if (self.headerTds[j][i].__mergeCols.length > 1) { - var wid = 0; - BI.each(columnSize, function (t, s) { - if (self.headerTds[j][i].__mergeCols.contains(t)) { - wid += s; - } - }); - wid = self._calculateWidth(wid); - if (wid > 1) { - wid += self.headerTds[j][i].__mergeCols.length - 1; - } - if (BI.isNumeric(wid)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", wid - 1).css("width", wid - 1); - } else { - items[i].element.attr("width", wid).css("width", wid); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } else { - if (BI.isNumeric(w)) { - if (i == BI.size(items) - 1) { - items[i].element.attr("width", w - 1).css("width", w - 1); - } else { - items[i].element.attr("width", w).css("width", w); - } - } else { - items[i].element.attr("width", "").css("width", ""); - } - } - } - }); - } - }); - var cW = this._calculateWidth(BI.sum(columnSize)); - if (cW > 1.05) { - cW = cW + columnSize.length; - } - this.tableContainer.element.width(cW); - } - }, - - setRegionColumnSize: function (columnSize) { - var self = this, o = this.options; - o.regionColumnSize = columnSize; - if (o.freezeCols.length === 0) { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", this._isRightFreeze() ? ['fill', 0] : [0, 'fill']); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } else if (o.freezeCols.length > 0 && o.freezeCols.length < o.columnSize.length) { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", columnSize); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } else { - if (o.isNeedFreeze) { - this.partitions.attr("columnSize", this._isRightFreeze() ? [0, 'fill'] : ['fill', 0]); - this.partitions.resize(); - } else { - this.tableContainer.element.width(columnSize[0]); - } - } - }, - - getRegionColumnSize: function () { - return this.options.regionColumnSize; - }, - - getCalculateRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element.width(), this.scrollBottomRight.element.width()]; - } - return [this.scrollBottomRight.element.width()]; - }, - - getCalculateRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollTopRight.element.height(), this.scrollBottomRight.element.height()]; - } - return [this.scrollBottomRight.element.height()]; - }, - - getClientRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].clientWidth, this.scrollBottomRight.element[0].clientWidth]; - } - return [this.scrollBottomRight.element[0].clientWidth]; - }, - - getClientRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].clientHeight, this.scrollBottomRight.element[0].clientHeight]; - } - return [this.scrollBottomRight.element[0].clientHeight]; - }, - - getScrollRegionColumnSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - return [this.scrollBottomLeft.element[0].scrollWidth, this.scrollBottomRight.element[0].scrollWidth]; - } - return [this.scrollBottomRight.element[0].scrollWidth]; - }, - - getScrollRegionRowSize: function () { - var o = this.options; - if (o.isNeedFreeze) { - if (o.freezeCols.length < o.columnSize.length) { - return [this.scrollTopRight.element[0].scrollHeight, this.scrollBottomRight.element[0].scrollHeight]; - } else { - return [this.scrollTopLeft.element[0].scrollHeight, this.scrollBottomLeft.element[0].scrollHeight]; - } - } - return [this.scrollBottomRight.element[0].scrollHeight]; - }, - - hasVerticalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element.hasVerticalScroll() || this.scrollBottomLeft.element.hasVerticalScroll(); - } - return this.scrollBottomRight.element.hasVerticalScroll(); - }, - - setVerticalScroll: function (scrollTop) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { - this.scrollBottomRight.element[0].scrollTop = scrollTop; - } - if (this.scrollBottomLeft.element[0].scrollTop !== scrollTop) { - this.scrollBottomLeft.element[0].scrollTop = scrollTop; - } - } else { - if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { - this.scrollBottomRight.element[0].scrollTop = scrollTop; - } - } - }, - - setLeftHorizontalScroll: function (scrollLeft) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomLeft.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomLeft.element[0].scrollLeft = scrollLeft; - } - if (this.scrollTopLeft.element[0].scrollLeft !== scrollLeft) { - this.scrollTopLeft.element[0].scrollLeft = scrollLeft; - } - } else { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - } - }, - - setRightHorizontalScroll: function (scrollLeft) { - var o = this.options; - if (o.isNeedFreeze) { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - if (this.scrollTopRight.element[0].scrollLeft !== scrollLeft) { - this.scrollTopRight.element[0].scrollLeft = scrollLeft; - } - } else { - if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { - this.scrollBottomRight.element[0].scrollLeft = scrollLeft; - } - } - }, - - getVerticalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element[0].scrollTop || this.scrollBottomLeft.element[0].scrollTop; - } - return this.scrollBottomRight.element[0].scrollTop; - }, - - getLeftHorizontalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomLeft.element[0].scrollLeft; - } - return this.scrollBottomRight.element[0].scrollLeft; - }, - - getRightHorizontalScroll: function () { - var o = this.options; - if (o.isNeedFreeze) { - return this.scrollBottomRight.element[0].scrollLeft; - } - return this.scrollBottomRight.element[0].scrollLeft; - }, - - getColumns: function () { - var o = this.options; - if (o.isNeedFreeze) { - return { - topLeft: this.topLeftBodyItems, - topRight: this.topRightBodyItems, - bottomLeft: this.bottomLeftBodyItems, - bottomRight: this.bottomRightBodyItems - } - } else { - return { - header: this.headerItems, - body: this.bodyItems, - footer: this.footerItems - } - } - }, - - populate: function (items, header) { - this.options.items = items || []; - if (header) { - this.options.header = header; - } - this.empty(); - if (this.options.isNeedFreeze) { - this._createFreezeTable(); - } else { - this._createNormalTable(); - } - } -}) -; -BI.Table.EVENT_TABLE_AFTER_INIT = "EVENT_TABLE_AFTER_INIT"; -BI.Table.EVENT_TABLE_RESIZE = "EVENT_TABLE_RESIZE"; -BI.Table.EVENT_TABLE_SCROLL = "EVENT_TABLE_SCROLL"; -BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE = "EVENT_TABLE_BEFORE_COLUMN_RESIZE"; -BI.Table.EVENT_TABLE_COLUMN_RESIZE = "EVENT_TABLE_COLUMN_RESIZE"; -BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE"; - -BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE"; -BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE"; -BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE"; -BI.shortcut("bi.table_view", BI.Table); +/*! + * jQuery Mousewheel 3.1.13 + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + */ + +(function (factory) { + if ( typeof define === 'function' && define.amd ) { + // AMD. Register as an anonymous module. + define(['../core/jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS style for Browserify + module.exports = factory; + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + + var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], + toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? + ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], + slice = Array.prototype.slice, + nullLowestDeltaTimeout, lowestDelta; + + if ( $.event.fixHooks ) { + for ( var i = toFix.length; i; ) { + $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; + } + } + + var special = $.event.special.mousewheel = { + version: '3.1.12', + + setup: function() { + if ( this.addEventListener ) { + for ( var i = toBind.length; i; ) { + this.addEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i = toBind.length; i; ) { + this.removeEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + }, + + settings: { + adjustOldDeltas: true, // see shouldAdjustOldDeltas() below + normalizeOffset: true // calls getBoundingClientRect for each event + } + }; + + $.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); + }, + + unmousewheel: function(fn) { + return this.unbind('mousewheel', fn); + } + }); + + + function handler(event) { + var orgEvent = event || window.event, + args = slice.call(arguments, 1), + delta = 0, + deltaX = 0, + deltaY = 0, + absDelta = 0, + offsetX = 0, + offsetY = 0; + event = $.event.fix(orgEvent); + event.type = 'mousewheel'; + + // Old school scrollwheel delta + if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } + if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } + if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } + if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } + + // Firefox < 17 horizontal scrolling related to DOMMouseScroll event + if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaX = deltaY * -1; + deltaY = 0; + } + + // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy + delta = deltaY === 0 ? deltaX : deltaY; + + // New school wheel delta (wheel event) + if ( 'deltaY' in orgEvent ) { + deltaY = orgEvent.deltaY * -1; + delta = deltaY; + } + if ( 'deltaX' in orgEvent ) { + deltaX = orgEvent.deltaX; + if ( deltaY === 0 ) { delta = deltaX * -1; } + } + + // No change actually happened, no reason to go any further + if ( deltaY === 0 && deltaX === 0 ) { return; } + + // Need to convert lines and pages to pixels if we aren't already in pixels + // There are three delta modes: + // * deltaMode 0 is by pixels, nothing to do + // * deltaMode 1 is by lines + // * deltaMode 2 is by pages + if ( orgEvent.deltaMode === 1 ) { + var lineHeight = 40; + delta *= lineHeight; + deltaY *= lineHeight; + deltaX *= lineHeight; + } else if ( orgEvent.deltaMode === 2 ) { + var pageHeight = 800; + delta *= pageHeight; + deltaY *= pageHeight; + deltaX *= pageHeight; + } + + // Store lowest absolute delta to normalize the delta values + absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); + + if ( !lowestDelta || absDelta < lowestDelta ) { + lowestDelta = absDelta; + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + lowestDelta /= 40; + } + } + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + // Divide all the things by 40! + delta /= 40; + deltaX /= 40; + deltaY /= 40; + } + + // Get a whole, normalized value for the deltas + delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); + deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); + deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); + + // Normalise offsetX and offsetY properties + if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { + var boundingRect = this.getBoundingClientRect(); + offsetX = event.clientX - boundingRect.left; + offsetY = event.clientY - boundingRect.top; + } + + // Add information to the event object + event.deltaX = deltaX; + event.deltaY = deltaY; + event.deltaFactor = lowestDelta; + event.offsetX = offsetX; + event.offsetY = offsetY; + // Go ahead and set deltaMode to 0 since we converted to pixels + // Although this is a little odd since we overwrite the deltaX/Y + // properties with normalized deltas. + event.deltaMode = 0; + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + // Clearout lowestDelta after sometime to better + // handle multiple device types that give different + // a different lowestDelta + // Ex: trackpad = 3 and mouse wheel = 120 + if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } + nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); + + return ($.event.dispatch || $.event.handle).apply(this, args); + } + + function nullLowestDelta() { + lowestDelta = null; + } + + function shouldAdjustOldDeltas(orgEvent, absDelta) { + // If this is an older event and the delta is divisable by 120, + // then we are assuming that the browser is treating this as an + // older mouse wheel event and that we should divide the deltas + // by 40 to try and get a more usable deltaFactor. + // Side note, this actually impacts the reported scroll distance + // in older browsers and can cause scrolling to be slower than native. + // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. + return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; + } + +}));/** + * 当没有元素时有提示信息的view + * + * Created by GUY on 2015/9/8. + * @class BI.Pane + * @extends BI.Widget + * @abstract + */ +BI.Pane = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-pane", + tipText: BI.i18nText("BI-No_Selected_Item"), + overlap: true, + onLoaded: BI.emptyFn + }) + }, + + _init: function () { + BI.Pane.superclass._init.apply(this, arguments); + }, + + _assertTip: function () { + var o = this.options; + if (!this._tipText) { + this._tipText = BI.createWidget({ + type: "bi.label", + cls: "bi-tips", + text: o.tipText, + height: 25 + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this._tipText], + bgap: 25 + }); + } + }, + + loading: function () { + var self = this, o = this.options; + if (o.overlap === true) { + if (!BI.Layers.has(this.getName())) { + BI.createWidget({ + type: 'bi.vtape', + items: [{ + el: { + type: "bi.layout", + cls: "loading-background" + }, + height: 30 + }], + element: BI.Layers.make(this.getName(), this) + }); + } + BI.Layers.show(self.getName()); + } else if (BI.isNull(this._loading)) { + this._loading = BI.createWidget({ + type: "bi.layout", + cls: "loading-background", + height: 30 + }); + this._loading.element.css("zIndex", 1); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this._loading, + left: 0, + right: 0, + top: 0 + }] + }) + } + }, + + loaded: function () { + var self = this, o = this.options; + BI.Layers.remove(self.getName()); + this._loading && this._loading.destroy(); + this._loading && (this._loading = null); + o.onLoaded(); + self.fireEvent(BI.Pane.EVENT_LOADED); + }, + + check: function () { + this.setTipVisible(BI.isEmpty(this.options.items)); + }, + + setTipVisible: function (b) { + if (b === true) { + this._assertTip(); + this._tipText.setVisible(true); + } else { + this._tipText && this._tipText.setVisible(false); + } + }, + + populate: function (items) { + this.options.items = items || []; + this.check(); + }, + + empty: function () { + + } +}); +BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** + * guy + * 这仅仅只是一个超类, 所有简单控件的基类 + * 1、类的控制, + * 2、title的控制 + * 3、文字超过边界显示3个点 + * 4、cursor默认pointor + * @class BI.Single + * @extends BI.Widget + * @abstract + */ +BI.Single = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-single", + readonly: false, + title: null, + warningTitle: null, + tipType: null, // success或warning + value: null + }) + }, + + _showToolTip: function (e, opt) { + opt || (opt = {}); + var self = this; + var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); + var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); + if (BI.isKey(title)) { + BI.Tooltips.show(e, this.getName(), title, type, this, opt); + } + }, + + _hideTooltip: function () { + var self = this; + var tooltip = BI.Tooltips.get(this.getName()); + if (BI.isNotNull(tooltip)) { + tooltip.element.fadeOut(200, function () { + BI.Tooltips.remove(self.getName()); + }); + } + }, + + _init: function () { + BI.Single.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isKey(o.title) || BI.isKey(o.warningTitle) + || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { + this.enableHover(); + } + }, + + enableHover: function (opt) { + opt || (opt = {}); + var self = this; + if (!this._hoverBinded) { + this.element.on("mouseenter.title" + this.getName(), function (e) { + self._e = e; + if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { + self.timeout = BI.delay(function () { + self._showToolTip(self._e || e, opt); + }, 200); + } else if (self.getTipType() === "success" || self.isEnabled()) { + self.timeout = BI.delay(function () { + self._showToolTip(self._e || e, opt); + }, 500); + } + }); + this.element.on("mousemove.title" + this.getName(), function (e) { + self._e = e; + if (!self.element.__isMouseInBounds__(e)) { + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + } + }); + this.element.on("mouseleave.title" + this.getName(), function () { + self._e = null; + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + }); + this._hoverBinded = true; + } + }, + + disabledHover: function () { + //取消hover事件 + if (BI.isNotNull(this.timeout)) { + clearTimeout(this.timeout); + } + this._hideTooltip(); + $(this.element).unbind("mouseenter.title" + this.getName()) + .unbind("mousemove.title" + this.getName()) + .unbind("mouseleave.title" + this.getName()); + this._hoverBinded = false; + }, + + populate: function (items) { + this.items = items || []; + }, + + //opt: {container: '', belowMouse: false} + setTitle: function (title, opt) { + this.options.title = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + setWarningTitle: function (title, opt) { + this.options.warningTitle = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + getTipType: function () { + return this.options.tipType; + }, + + isReadOnly: function () { + return !!this.options.readonly; + }, + + getTitle: function () { + var title = this.options.title; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + getWarningTitle: function () { + var title = this.options.warningTitle; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + setValue: function (val) { + if (!this.options.readonly) { + this.options.value = val; + } + }, + + getValue: function () { + return this.options.value; + } +});/** + * guy 表示一行数据,通过position来定位位置的数据 + * @class BI.Text + * @extends BI.Single + */ +BI.Text = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Text.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text", + textAlign: "left", + whiteSpace: "normal", + lineHeight: null, + handler: null,//如果传入handler,表示处理文字的点击事件,不是区域的 + hgap: 0, + vgap: 0, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + text: "", + py: "" + }) + }, + + _init: function () { + BI.Text.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.hgap + o.lgap > 0) { + this.element.css({ + "padding-left": o.hgap + o.lgap + "px" + }) + } + if (o.hgap + o.rgap > 0) { + this.element.css({ + "padding-right": o.hgap + o.rgap + "px" + }) + } + if (o.vgap + o.tgap > 0) { + this.element.css({ + "padding-top": o.vgap + o.tgap + "px" + }) + } + if (o.vgap + o.bgap > 0) { + this.element.css({ + "padding-bottom": o.vgap + o.bgap + "px" + }) + } + if (BI.isNumber(o.height)) { + this.element.css({"lineHeight": o.height + "px"}); + } + if (BI.isNumber(o.lineHeight)) { + this.element.css({"lineHeight": o.lineHeight + "px"}); + } + this.element.css({ + "textAlign": o.textAlign, + "whiteSpace": o.whiteSpace + }); + if (o.handler) { + this.text = BI.createWidget({ + type: "bi.layout", + tagName: 'span' + }); + this.text.element.click(function () { + o.handler(self.getValue()); + }); + BI.createWidget({ + type: "bi.default", + element: this, + items: [this.text] + }); + } else { + this.text = this; + } + if (BI.isKey(o.text)) { + this.setText(o.text); + } else if (BI.isKey(o.value)) { + this.setText(o.value); + } + if (BI.isKey(o.keyword)) { + this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); + } + }, + + doRedMark: function (keyword) { + var o = this.options; + this.text.element.__textKeywordMarked__(o.text || o.value, keyword, o.py); + }, + + unRedMark: function () { + var o = this.options; + this.text.element.__textKeywordMarked__(o.text || o.value, "", o.py); + }, + + doHighLight: function () { + this.text.element.addClass("bi-high-light"); + }, + + unHighLight: function () { + this.text.element.removeClass("bi-high-light"); + }, + + setValue: function (text) { + BI.Text.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.setText(text); + } + }, + + setStyle: function (css) { + this.text.element.css(css) + }, + + setText: function (text) { + BI.Text.superclass.setText.apply(this, arguments); + this.options.text = text; + this.text.element.text((text + "").replaceAll(" ", " ")); + } +}); + +BI.shortcut("bi.text", BI.Text);/** + * guy + * @class BI.BasicButton + * @extends BI.Single + * + * 一般的button父级 + */ +BI.BasicButton = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), + value: "", + text: "", + stopEvent: false, + stopPropagation: false, + selected: false, + once: false, //点击一次选中有效,再点无效 + forceSelected: false, //点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发 + forceNotSelected: false, //无论怎么点击都不会被选中 + disableSelected: false, //使能选中 + + shadow: false, + isShadowShowingOnSelected: false, //选中状态下是否显示阴影 + trigger: null, + handler: BI.emptyFn + }) + }, + _init: function () { + BI.BasicButton.superclass._init.apply(this, arguments); + var opts = this.options; + if (opts.selected === true) { + BI.nextTick(BI.bind(function () { + this.setSelected(opts.selected); + }, this)); + } + BI.nextTick(BI.bind(this.bindEvent, this)); + + if (opts.shadow) { + this._createShadow(); + } + }, + + _createShadow: function () { + var self = this, o = this.options; + + var assertMask = function () { + if (!self.$mask) { + self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, { + type: "bi.layout", + cls: "bi-button-mask" + }); + self.$mask.invisible(); + BI.createWidget({ + type: "bi.absolute", + element: self, + items: [{ + el: self.$mask, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + } + }; + + this.element.mouseup(function () { + if (!self._hover && !o.isShadowShowingOnSelected) { + assertMask(); + self.$mask.invisible(); + } + }); + this.element.on("mouseenter." + this.getName(), function (e) { + if (self.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) { + assertMask(); + self.$mask.visible(); + } + } + }); + this.element.on("mousemove." + this.getName(), function (e) { + if (!self.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && !self._hover) { + assertMask(); + self.$mask.invisible(); + } + } + }); + this.element.on("mouseleave." + this.getName(), function () { + if (self.isEnabled() && !self._hover) { + assertMask(); + self.$mask.invisible(); + } + }); + }, + + bindEvent: function () { + var self = this; + var o = this.options, hand = this.handle(); + if (!hand) { + return; + } + hand = hand.element; + var triggerArr = (o.trigger || "").split(","); + BI.each(triggerArr, function (idx, trigger) { + switch (trigger) { + case "mouseup": + var mouseDown = false; + hand.mousedown(function () { + mouseDown = true; + ev(e); + }); + hand.mouseup(function (e) { + if (mouseDown === true) { + clk(e); + } + mouseDown = false; + ev(e); + }); + break; + case "mousedown": + var mouseDown = false; + var selected = false; + hand.mousedown(function (e) { + // if (e.button === 0) { + $(document).bind("mouseup." + self.getName(), function (e) { + // if (e.button === 0) { + if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { + // self.setSelected(!self.isSelected()); + self._trigger(); + } + mouseDown = false; + $(document).unbind("mouseup." + self.getName()); + // } + }); + if (mouseDown === true) { + return; + } + if (self.isSelected()) { + selected = true; + } else { + clk(e); + } + mouseDown = true; + ev(e); + // } + }); + hand.mouseup(function (e) { + // if (e.button === 0) { + if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { + clk(e); + } + mouseDown = false; + selected = false; + $(document).unbind("mouseup." + self.getName()); + // } + }); + break; + case "dblclick": + hand.dblclick(clk); + break; + case "lclick": + var mouseDown = false; + var interval; + hand.mousedown(function (e) { + $(document).bind("mouseup." + self.getName(), function (e) { + interval && clearInterval(interval); + interval = null; + mouseDown = false; + $(document).unbind("mouseup." + self.getName()); + }); + if (mouseDown === true) { + return; + } + if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + return; + } + interval = setInterval(function () { + self.doClick(); + }, 100); + mouseDown = true; + ev(e); + }); + break; + default: + if (o.stopEvent || o.stopPropagation) { + hand.mousedown(function (e) { + ev(e); + }); + hand.mouseup(function (e) { + ev(e); + }); + } + hand.click(clk); + break; + } + }); + + //之后的300ms点击无效 + var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true); + + function ev(e) { + if (o.stopEvent) { + e.stopEvent(); + } + if (o.stopPropagation) { + e.stopPropagation(); + } + } + + function clk(e) { + ev(e); + if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + return; + } + onClick.apply(self, arguments); + } + }, + + _trigger: function () { + var o = this.options; + if(!this.isEnabled()){ + return; + } + if (!this.isDisableSelected()) { + this.isForceSelected() ? this.setSelected(true) : + (this.isForceNotSelected() ? this.setSelected(false) : + this.setSelected(!this.isSelected())); + } + if (this.isValid()) { + o.handler.call(this, this.getValue(), this); + var v = this.getValue(); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this); + this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this); + } + }, + + _doClick: function (e) { + if (this.isValid()) { + this.beforeClick(e); + } + this._trigger(); + if (this.isValid()) { + this.doClick(e); + } + }, + + beforeClick: function () { + + }, + + doClick: function () { + + }, + + handle: function () { + return this; + }, + + hover: function () { + this._hover = true; + this.handle().element.addClass("hover"); + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(true); + } + }, + + dishover: function () { + this._hover = false; + this.handle().element.removeClass("hover"); + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(false); + } + }, + + setSelected: function (b) { + var o = this.options; + o.selected = b; + if (b) { + this.handle().element.addClass("active"); + } else { + this.handle().element.removeClass("active"); + } + if (o.shadow && !o.isShadowShowingOnSelected) { + this.$mask && this.$mask.setVisible(false); + } + }, + + isSelected: function () { + return this.options.selected; + }, + + isOnce: function () { + return this.options.once; + }, + + isForceSelected: function () { + return this.options.forceSelected; + }, + + isForceNotSelected: function () { + return this.options.forceNotSelected; + }, + + isDisableSelected: function () { + return this.options.disableSelected; + }, + + setText: function (text) { + this.options.text = text; + }, + + getText: function () { + return this.options.text; + }, + + _setEnable: function (enable) { + BI.BasicButton.superclass._setEnable.apply(this, arguments); + if (enable === true) { + this.element.removeClass("base-disabled disabled"); + } else if (enable === false) { + this.element.addClass("base-disabled disabled"); + } + if (!enable) { + if (this.options.shadow) { + this.$mask && this.$mask.setVisible(false); + } + } + }, + + empty: function () { + $(document).unbind("mouseup." + this.getName()); + BI.BasicButton.superclass.empty.apply(this, arguments); + }, + + destroy: function () { + BI.BasicButton.superclass.destroy.apply(this, arguments); + } +}); +BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** + * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 + * + * Created by GUY on 2015/9/9. + * @class BI.NodeButton + * @extends BI.BasicButton + * @abstract + */ +BI.NodeButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function() { + var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend( conf, { + baseCls: (conf.baseCls || "") + " bi-node", + open: false + }) + }, + + _init:function() { + BI.NodeButton.superclass._init.apply(this, arguments); + var self = this; + BI.nextTick(function(){ + self.setOpened(self.isOpened()); + }) + }, + + doClick: function(){ + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.setOpened(!this.isOpened()); + }, + + isOnce: function(){ + return false; + }, + + isOpened: function(){ + return !!this.options.open; + }, + + setOpened: function(b){ + this.options.open = !!b; + }, + + triggerCollapse: function(){ + if(this.isOpened()) { + this.setOpened(false); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); + } + }, + + triggerExpand: function(){ + if(!this.isOpened()) { + this.setOpened(true); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); + } + } +});/** + * guy + * tip提示 + * zIndex在10亿级别 + * @class BI.Tip + * @extends BI.Single + * @abstract + */ +BI.Tip = BI.inherit(BI.Single, { + _defaultConfig: function() { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-tip", + zIndex: BI.zIndex_tip + }) + }, + + _init : function() { + BI.Tip.superclass._init.apply(this, arguments); + this.element.css({"zIndex": this.options.zIndex}); + } +});/** + * Created by GUY on 2015/6/26. + * @class BI.ButtonGroup + * @extends BI.Widget + */ + +BI.ButtonGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-button-group", + behaviors: {}, + items: [], + chooseType: BI.Selection.Single, + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }) + }, + + _init: function () { + BI.ButtonGroup.superclass._init.apply(this, arguments); + var behaviors = {}; + BI.each(this.options.behaviors, function (key, rule) { + behaviors[key] = BI.BehaviorFactory.createBehavior(key, { + rule: rule + }) + }); + this.behaviors = behaviors; + this.populate(this.options.items); + }, + + _createBtns: function (items) { + var o = this.options; + return BI.createWidgets(BI.createItems(items, { + type: "bi.text_button" + })); + }, + + _btnsCreator: function (items) { + var self = this, args = Array.prototype.slice.call(arguments), o = this.options; + var buttons = this._createBtns(items); + args[0] = buttons; + + BI.each(this.behaviors, function (i, behavior) { + behavior.doBehavior.apply(behavior, args); + }); + BI.each(buttons, function (i, btn) { + btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + switch (o.chooseType) { + case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: + self.setValue(btn.getValue()); + break; + case BI.ButtonGroup.CHOOSE_TYPE_NONE: + self.setValue([]); + break; + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }); + btn.on(BI.Events.DESTROY, function () { + BI.remove(self.buttons, btn); + }) + }); + + return buttons; + }, + + _packageBtns: function (btns) { + var o = this.options; + for (var i = o.layouts.length - 1; i > 0; i--) { + btns = BI.map(btns, function (k, it) { + return BI.extend({}, o.layouts[i], { + items: [ + BI.extend({}, o.layouts[i].el, { + el: it + }) + ] + }) + }) + } + return btns; + }, + + _packageSimpleItems: function (btns) { + var o = this.options; + return BI.map(o.items, function (i, item) { + if (BI.stripEL(item) === item) { + return btns[i]; + } + return BI.extend({}, item, { + el: btns[i] + }) + }) + }, + + _packageItems: function (items, packBtns) { + return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); + }, + + _packageLayout: function (items) { + var o = this.options, layout = BI.deepClone(o.layouts[0]); + + var lay = BI.formatEL(layout).el; + while (lay && lay.items && !BI.isEmpty(lay.items)) { + lay = BI.formatEL(lay.items[0]).el; + } + lay.items = items; + return layout; + }, + + //如果是一个简单的layout + _isSimpleLayout: function () { + var o = this.options; + return o.layouts.length === 1 && !BI.isArray(o.items[0]) + }, + + doBehavior: function () { + var args = Array.prototype.slice.call(arguments); + args.unshift(this.buttons); + BI.each(this.behaviors, function (i, behavior) { + behavior.doBehavior.apply(behavior, args); + }) + }, + + prependItems: function (items) { + var o = this.options; + var btns = this._btnsCreator.apply(this, arguments); + this.buttons = BI.concat(btns, this.buttons); + + if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) { + this.layouts.prependItems(btns); + return; + } + + items = this._packageItems(items, this._packageBtns(btns)); + this.layouts.prependItems(this._packageLayout(items).items); + }, + + addItems: function (items) { + var o = this.options; + var btns = this._btnsCreator.apply(this, arguments); + this.buttons = BI.concat(this.buttons, btns); + + //如果是一个简单的layout + if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) { + this.layouts.addItems(btns); + return; + } + + items = this._packageItems(items, this._packageBtns(btns)); + this.layouts.addItems(this._packageLayout(items).items); + }, + + removeItemAt: function (indexes) { + BI.removeAt(this.buttons, indexes); + this.layouts.removeItemAt(indexes); + }, + + removeItems: function (values) { + values = BI.isArray(values) ? values : [values]; + var deleted = []; + BI.each(this.buttons, function (i, button) { + if (BI.deepContains(values, button.getValue())) { + deleted.push(i); + } + }); + BI.removeAt(this.buttons, deleted); + this.layouts.removeItemAt(deleted); + }, + + populate: function (items) { + items = items || []; + this.empty(); + this.options.items = items; + + this.buttons = this._btnsCreator.apply(this, arguments); + if (this._isSimpleLayout()) { + items = this._packageSimpleItems(this.buttons); + } else { + items = this._packageItems(items, this._packageBtns(this.buttons)); + } + + this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setSelected && item.setSelected(false); + } else { + item.setSelected && item.setSelected(true); + } + }); + }, + + setEnabledValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setEnable(true); + } else { + item.setEnable(false); + } + }); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.deepContains(v, item.getValue())) { + item.setSelected && item.setSelected(true); + } else { + item.setSelected && item.setSelected(false); + } + }); + }, + + getNotSelectedValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !(item.isSelected && item.isSelected())) { + v.push(item.getValue()); + } + }); + return v; + }, + + getValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && item.isSelected && item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getAllButtons: function () { + return this.buttons; + }, + + getAllLeaves: function () { + return this.buttons; + }, + + getSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isSelected && item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getNotSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isSelected && !item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getIndexByValue: function (value) { + var index = -1; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.getValue() === value) { + index = i; + return true; + } + }); + return index; + }, + + getNodeById: function (id) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.options.id === id) { + node = item; + return true; + } + }); + return node; + }, + + getNodeByValue: function (value) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled() && item.getValue() === value) { + node = item; + return true; + } + }); + return node; + }, + + empty: function () { + BI.ButtonGroup.superclass.empty.apply(this, arguments); + this.options.items = []; + }, + + destroy: function () { + BI.ButtonGroup.superclass.destroy.apply(this, arguments); + this.options.items = []; + } +}); +BI.extend(BI.ButtonGroup, { + CHOOSE_TYPE_SINGLE: BI.Selection.Single, + CHOOSE_TYPE_MULTI: BI.Selection.Multi, + CHOOSE_TYPE_ALL: BI.Selection.All, + CHOOSE_TYPE_NONE: BI.Selection.None, + CHOOSE_TYPE_DEFAULT: BI.Selection.Default +}); +BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.button_group", BI.ButtonGroup);/** + * Created by GUY on 2015/8/10. + * @class BI.ButtonTree + * @extends BI.ButtonGroup + */ + +BI.ButtonTree = BI.inherit(BI.ButtonGroup, { + _defaultConfig: function () { + return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-button-tree" + }) + }, + + _init: function () { + BI.ButtonTree.superclass._init.apply(this, arguments); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (!BI.isFunction(item.setSelected)) { + item.setNotSelectedValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setSelected(false); + } else { + item.setSelected(true); + } + }); + }, + + setEnabledValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (BI.isFunction(item.setEnabledValue)) { + item.setEnabledValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setEnable(true); + } else { + item.setEnable(false); + } + }); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (i, item) { + if (!BI.isFunction(item.setSelected)) { + item.setValue(v); + return; + } + if (BI.deepContains(v, item.getValue())) { + item.setSelected(true); + } else { + item.setSelected(false); + } + }); + }, + + getNotSelectedValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + v = BI.concat(v, item.getNotSelectedValue()); + return; + } + if (item.isEnabled() && item.isSelected && !item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getValue: function () { + var v = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + v = BI.concat(v, item.getValue()); + return; + } + if (item.isEnabled() && item.isSelected && item.isSelected()) { + v.push(item.getValue()); + } + }); + return v; + }, + + getSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + btns = btns.concat(item.getSelectedButtons()); + return; + } + if (item.isSelected && item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + getNotSelectedButtons: function () { + var btns = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + btns = btns.concat(item.getNotSelectedButtons()); + return; + } + if (item.isSelected && !item.isSelected()) { + btns.push(item); + } + }); + return btns; + }, + + //获取所有的叶子节点 + getAllLeaves: function () { + var leaves = []; + BI.each(this.buttons, function (i, item) { + if (item.isEnabled() && !BI.isFunction(item.setSelected)) { + leaves = leaves.concat(item.getAllLeaves()); + return; + } + if (item.isEnabled()) { + leaves.push(item); + } + }); + return leaves; + }, + + getIndexByValue: function (value) { + var index = -1; + BI.any(this.buttons, function (i, item) { + var vs = item.getValue(); + if (item.isEnabled() && (vs === value || BI.contains(vs, value))) { + index = i; + return true; + } + }); + return index; + }, + + getNodeById: function (id) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled()) { + if (item.attr("id") === id) { + node = item; + return true; + } else if (BI.isFunction(item.getNodeById)) { + if (node = item.getNodeById(id)) { + return true; + } + } + } + }); + return node; + }, + + getNodeByValue: function (value) { + var node; + BI.any(this.buttons, function (i, item) { + if (item.isEnabled()) { + if (BI.isFunction(item.getNodeByValue)) { + if (node = item.getNodeByValue(value)) { + return true; + } + } else if (item.attr("value") === value) { + node = item; + return true; + } + } + }); + return node; + } +}); +BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.button_tree", BI.ButtonTree);/** + * guy + * 异步树 + * @class BI.TreeView + * @extends BI.Pane + */ +BI.TreeView = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tree", + paras: {}, + itemsCreator: BI.emptyFn + }) + }, + _init: function () { + BI.TreeView.superclass._init.apply(this, arguments); + this._stop = false; + + this._createTree(); + this.tip = BI.createWidget({ + type: "bi.loading_bar", + invisible: true, + handler: BI.bind(this._loadMore, this) + }); + BI.createWidget({ + type: "bi.vertical", + scrollable: true, + scrolly: false, + element: this, + items: [this.tip] + }); + + }, + + _createTree: function () { + this.id = "bi-tree" + BI.UUID(); + if (this.nodes) { + this.nodes.destroy(); + } + if (this.tree) { + this.tree.destroy(); + } + this.tree = BI.createWidget({ + type: "bi.layout", + element: "<ul id='" + this.id + "' class='ztree'></ul>" + }); + BI.createWidget({ + type: "bi.default", + element: this.element, + items: [this.tree] + }); + }, + + //选择节点触发方法 + _selectTreeNode: function (treeId, treeNode) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this); + this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this); + }, + + //配置属性 + _configSetting: function () { + var paras = this.options.paras; + var self = this; + var setting = { + async: { + enable: true, + url: getUrl, + autoParam: ["id", "name"], + otherParam: BI.cjkEncodeDO(paras) + }, + check: { + enable: true + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true, + dblClickExpand: false + }, + callback: { + beforeExpand: beforeExpand, + onAsyncSuccess: onAsyncSuccess, + onAsyncError: onAsyncError, + beforeCheck: beforeCheck, + onCheck: onCheck, + onExpand: onExpand, + onCollapse: onCollapse, + onClick: onClick + } + }; + var className = "dark", perTime = 100; + + function onClick(event, treeId, treeNode) { + self.nodes.checkNode(treeNode, !treeNode.checked, true, true); + } + + function getUrl(treeId, treeNode) { + var parentNode = self._getParentValues(treeNode); + treeNode.times = treeNode.times || 1; + var param = "id=" + treeNode.id + + "×=" + (treeNode.times++) + + "&parentValues= " + window.encodeURIComponent(BI.jsonEncode(parentNode)) + + "&checkState=" + window.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); + + return BI.servletURL + '?op=' + self.options.op + '&cmd=' + self.options.cmd + "&" + param; + } + + function beforeExpand(treeId, treeNode) { + if (!treeNode.isAjaxing) { + if (!treeNode.children) { + treeNode.times = 1; + ajaxGetNodes(treeNode, "refresh"); + } + return true; + } else { + BI.Msg.toast("Please Wait。", "warning"); + return false; + } + } + + function onAsyncSuccess(event, treeId, treeNode, msg) { + treeNode.halfCheck = false; + if (!msg || msg.length === 0 || /^<html>[\s,\S]*<\/html>$/gi.test(msg) || self._stop) { + return; + } + var zTree = self.nodes; + var totalCount = treeNode.count || 0; + + //尝试去获取下一组节点,若获取值为空数组,表示获取完成 + // TODO by GUY + if (treeNode.children.length > totalCount) { + treeNode.count = treeNode.children.length; + BI.delay(function () { + ajaxGetNodes(treeNode); + }, perTime); + } else { + //treeNode.icon = ""; + zTree.updateNode(treeNode); + zTree.selectNode(treeNode.children[0]); + //className = (className === "dark" ? "":"dark"); + } + } + + function onAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) { + var zTree = self.nodes; + BI.Msg.toast("Error!", "warning"); + //treeNode.icon = ""; + //zTree.updateNode(treeNode); + } + + function ajaxGetNodes(treeNode, reloadType) { + var zTree = self.nodes; + if (reloadType == "refresh") { + //treeNode.icon = BI.servletURL +"?op=resource&resource=/com/fr/bi/web/css/base/third/ztree/img/loading.gif"; + zTree.updateNode(treeNode); + } + zTree.reAsyncChildNodes(treeNode, reloadType, true); + } + + function beforeCheck(treeId, treeNode) { + treeNode.halfCheck = false; + if (treeNode.checked === true) { + //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy + //所有的半选状态都需要取消halfCheck=true的情况 + function track(children) { + BI.each(children, function (i, ch) { + if (ch.halfCheck === true) { + ch.halfCheck = false; + track(ch.children); + } + }) + } + + track(treeNode.children); + var treeObj = self.nodes; + var nodes = treeObj.getSelectedNodes(); + $.each(nodes, function (index, node) { + node.halfCheck = false; + }) + } + } + + function onCheck(event, treeId, treeNode) { + self._selectTreeNode(treeId, treeNode); + } + + function onExpand(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + function onCollapse(event, treeId, treeNode) { + } + + return setting; + }, + + _getParentValues: function (treeNode) { + if (!treeNode.getParentNode()) { + return []; + } + var parentNode = treeNode.getParentNode(); + var result = this._getParentValues(parentNode); + result = result.concat([this._getNodeValue(parentNode)]); + return result; + }, + + _getNodeValue: function (node) { + //去除标红 + return node.value == null ? node.text.replace(/<[^>]+>/g, "").replaceAll(" ", " ") : node.value; + }, + + //获取半选框值 + _getHalfSelectedValues: function (map, node) { + var self = this; + var checkState = node.getCheckStatus(); + //将未选的去掉 + if (checkState.checked === false && checkState.half === false) { + return; + } + //如果节点已展开,并且是半选 + if (BI.isNotEmptyArray(node.children) && checkState.half === true) { + var children = node.children; + BI.each(children, function (i, ch) { + self._getHalfSelectedValues(map, ch); + }); + return; + } + var parent = node.parentValues || self._getParentValues(node); + var path = parent.concat(this._getNodeValue(node)); + if (BI.isNotEmptyArray(node.children) || checkState.half === false) { + this._buildTree(map, path); + return; + } + var storeValues = BI.deepClone(this.options.paras.selectedValues); + var treeNode = this._getTree(storeValues, path); + this._addTreeNode(map, parent, this._getNodeValue(node), treeNode); + }, + + _getTree: function (map, values) { + var cur = map; + BI.any(values, function (i, value) { + if (cur[value] == null) { + return true; + } + cur = cur[value]; + }); + return cur; + }, + + _addTreeNode: function (map, values, key, value) { + var cur = map; + BI.each(values, function (i, value) { + if (cur[value] == null) { + cur[value] = {}; + } + cur = cur[value]; + }); + cur[key] = value; + }, + + //构造树节点 + _buildTree: function (map, values) { + var cur = map; + BI.each(values, function (i, value) { + if (cur[value] == null) { + cur[value] = {}; + } + cur = cur[value]; + }) + }, + + //获取选中的值 + _getSelectedValues: function () { + var self = this; + var hashMap = {}; + var rootNoots = this.nodes.getNodes(); + track(rootNoots); + function track(nodes) { + BI.each(nodes, function (i, node) { + var checkState = node.getCheckStatus(); + if (checkState.checked === true || checkState.half === true) { + if (checkState.half === true) { + self._getHalfSelectedValues(hashMap, node); + } else { + var parentValues = node.parentValues || self._getParentValues(node); + var values = parentValues.concat([self._getNodeValue(node)]); + self._buildTree(hashMap, values); + } + } + }) + } + + return hashMap; + }, + + //处理节点 + _dealWidthNodes: function (nodes) { + var self = this, o = this.options; + var ns = BI.Tree.arrayFormat(nodes); + BI.each(ns, function (i, n) { + n.title = n.title || n.text || n.value; + //处理标红 + if (BI.isKey(o.paras.keyword)) { + n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html(); + } else { + n.text = (n.text + "").replaceAll(" ", " "); + } + }); + return nodes; + }, + + _loadMore: function () { + var self = this, o = this.options; + this.tip.setLoading(); + var op = BI.extend({}, o.paras, { + times: ++this.times + }); + o.itemsCreator(op, function (res) { + if (self._stop === true) { + return; + } + var hasNext = !!res.hasNext, nodes = res.items || []; + + if (!hasNext) { + self.tip.setEnd(); + } else { + self.tip.setLoaded(); + } + if (nodes.length > 0) { + self.nodes.addNodes(null, self._dealWidthNodes(nodes)); + } + }); + }, + + //生成树内部方法 + _initTree: function (setting) { + var self = this, o = this.options; + self.fireEvent(BI.Events.INIT); + this.times = 1; + var tree = this.tree; + tree.empty(); + this.loading(); + this.tip.setVisible(false); + var callback = function (nodes) { + if (self._stop === true) { + return; + } + self.nodes = $.fn.zTree.init(tree.element, setting, nodes); + }; + var op = BI.extend({}, o.paras, { + times: 1 + }); + + o.itemsCreator(op, function (res) { + if (self._stop === true) { + return; + } + var hasNext = !!res.hasNext, nodes = res.items || []; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes)); + } + self.setTipVisible(nodes.length <= 0); + self.loaded(); + if (!hasNext) { + self.tip.invisible(); + } else { + self.tip.setLoaded(); + } + op.times === 1 && self.fireEvent(BI.Events.AFTERINIT); + }); + }, + + //构造树结构, + initTree: function (nodes, setting) { + var setting = setting || { + async: { + enable: false + }, + check: { + enable: false + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true + }, + callback: {} + }; + this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); + }, + + start: function () { + this._stop = false; + }, + + stop: function () { + this._stop = true; + }, + + //生成树方法 + stroke: function (config) { + delete this.options.keyword; + BI.extend(this.options.paras, config); + var setting = this._configSetting(); + this._createTree(); + this.start(); + this._initTree(setting); + }, + + populate: function () { + this.stroke.apply(this, arguments); + }, + + hasChecked: function () { + var treeObj = this.nodes; + return treeObj.getCheckedNodes(true).length > 0; + }, + + checkAll: function (checked) { + function setNode(children) { + BI.each(children, function (i, child) { + child.halfCheck = false; + setNode(child.children); + }); + } + + BI.each(this.nodes.getNodes(), function (i, node) { + node.halfCheck = false; + setNode(node.children); + }); + this.nodes && this.nodes.checkAllNodes(checked); + }, + + expandAll: function (flag) { + this.nodes && this.nodes.expandAll(flag); + }, + + //设置树节点的状态 + setValue: function (value, param) { + this.checkAll(false); + this.updateValue(value, param); + this.refresh(); + }, + + setSelectedValue: function (value) { + this.options.paras.selectedValues = BI.deepClone(value || {}); + }, + + updateValue: function (values, param) { + if (!this.nodes) { + return; + } + param || (param = "value"); + var treeObj = this.nodes; + BI.each(values, function (v, op) { + var nodes = treeObj.getNodesByParam(param, v, null); + BI.each(nodes, function (j, node) { + BI.extend(node, {checked: true}, op); + treeObj.updateNode(node); + }) + }); + }, + + refresh: function () { + this.nodes && this.nodes.refresh(); + }, + + getValue: function () { + if (!this.nodes) { + return null; + } + return this._getSelectedValues(); + }, + + destroyed: function () { + this.stop(); + this.nodes && this.nodes.destroy(); + } +}); +BI.extend(BI.TreeView, { + REQ_TYPE_INIT_DATA: 1, + REQ_TYPE_ADJUST_DATA: 2, + REQ_TYPE_SELECT_DATA: 3, + REQ_TYPE_GET_SELECTED_DATA: 4 +}); + +BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TreeView.EVENT_INIT = BI.Events.INIT; +BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT; + +BI.shortcut("bi.tree_view", BI.TreeView);/** + * guy + * 同步树 + * @class BI.AsyncTree + * @extends BI.TreeView + */ +BI.AsyncTree = BI.inherit(BI.TreeView, { + _defaultConfig: function () { + return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {}) + }, + _init: function () { + BI.AsyncTree.superclass._init.apply(this, arguments); + }, + + //配置属性 + _configSetting: function () { + var paras = this.options.paras; + var self = this; + var setting = { + async: { + enable: false, + otherParam: BI.cjkEncodeDO(paras) + }, + check: { + enable: true + }, + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } + }, + view: { + showIcon: false, + expandSpeed: "", + nameIsHTML: true, + dblClickExpand: false + }, + callback: { + beforeCheck: beforeCheck, + onCheck: onCheck, + beforeExpand: beforeExpand, + onExpand: onExpand, + onCollapse: onCollapse, + onClick: onClick + } + }; + + function onClick(event, treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj(treeId); + zTree.checkNode(treeNode, !treeNode.checked, true, true); + } + + function beforeCheck(treeId, treeNode) { + treeNode.halfCheck = false; + if (treeNode.checked === true) { + //将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy + //所有的半选状态都需要取消halfCheck=true的情况 + function track(children) { + BI.each(children, function (i, ch) { + if (ch.halfCheck === true) { + ch.halfCheck = false; + track(ch.children); + } + }) + } + + track(treeNode.children); + + var treeObj = $.fn.zTree.getZTreeObj(treeId); + var nodes = treeObj.getSelectedNodes(); + BI.each(nodes, function (index, node) { + node.halfCheck = false; + }) + } + } + + function beforeExpand(treeId, treeNode) { + self._beforeExpandNode(treeId, treeNode); + } + + function onCheck(event, treeId, treeNode) { + self._selectTreeNode(treeId, treeNode); + } + + function onExpand(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + function onCollapse(event, treeId, treeNode) { + treeNode.halfCheck = false; + } + + return setting; + }, + + _selectTreeNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); + var name = this._getNodeValue(treeNode); +// var values = parentValues.concat([name]); + if (treeNode.checked === true) { + } else { + var tNode = treeNode; + var pNode = this._getTree(this.options.paras.selectedValues, parentValues); + if (BI.isNotNull(pNode[name])) { + delete pNode[name]; + } + while (tNode != null && BI.isEmpty(pNode)) { + parentValues = parentValues.slice(0, parentValues.length - 1); + tNode = tNode.getParentNode(); + if (tNode != null) { + pNode = this._getTree(this.options.paras.selectedValues, parentValues); + name = this._getNodeValue(tNode); + delete pNode[name]; + } + } + } + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + }, + + //展开节点 + _beforeExpandNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = treeNode.parentValues || self._getParentValues(treeNode); + var op = BI.extend({}, o.paras, { + id: treeNode.id, + times: 1, + parentValues: parentValues.concat(this._getNodeValue(treeNode)), + checkState: treeNode.getCheckStatus() + }); + var complete = function (d) { + var nodes = d.items || []; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes), !!d.hasNext); + } + }; + var times = 1; + + function callback(nodes, hasNext) { + self.nodes.addNodes(treeNode, nodes); + + if (hasNext === true) { + BI.delay(function () { + times++; + op.times = times; + o.itemsCreator(op, complete); + }, 100); + } + } + + if (!treeNode.children) { + o.itemsCreator(op, complete) + } + }, + + _join: function (valueA, valueB) { + var self = this; + var map = {}; + track([], valueA, valueB); + track([], valueB, valueA); + function track(parent, node, compare) { + BI.each(node, function (n, item) { + if (BI.isNull(compare[n])) { + self._addTreeNode(map, parent, n, item); + } else if (BI.isEmpty(compare[n])) { + self._addTreeNode(map, parent, n, {}); + } else { + track(parent.concat([n]), node[n], compare[n]); + } + }) + } + + return map; + }, + + hasChecked: function () { + return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments); + }, + + getValue: function () { + if (!this.nodes) { + return {}; + } + var checkedValues = this._getSelectedValues(); + if (BI.isEmpty(checkedValues)) { + return BI.deepClone(this.options.paras.selectedValues); + } + if (BI.isEmpty(this.options.paras.selectedValues)) { + return checkedValues; + } + return this._join(checkedValues, this.options.paras.selectedValues); + }, + + //生成树方法 + stroke: function (config) { + delete this.options.keyword; + BI.extend(this.options.paras, config); + var setting = this._configSetting(); + this._initTree(setting); + } +}); + +BI.shortcut("bi.async_tree", BI.AsyncTree);/** + * guy + * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点 + * @class BI.PartTree + * @extends BI.AsyncTree + */ +BI.PartTree = BI.inherit(BI.AsyncTree, { + _defaultConfig: function () { + return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {}) + }, + + _init: function () { + BI.PartTree.superclass._init.apply(this, arguments); + }, + + _loadMore: function () { + var self = this, o = this.options; + var op = BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_INIT_DATA, + times: ++this.times + }); + this.tip.setLoading(); + o.itemsCreator(op, function (d) { + var hasNext = !!d.hasNext, nodes = d.items || []; + o.paras.lastSearchValue = d.lastSearchValue; + if (self._stop === true) { + return; + } + if (!hasNext) { + self.tip.setEnd(); + } else { + self.tip.setLoaded(); + } + if (nodes.length > 0) { + self.nodes.addNodes(null, self._dealWidthNodes(nodes)); + } + }); + }, + + _selectTreeNode: function (treeId, treeNode) { + var self = this, o = this.options; + var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode)); + var name = this._getNodeValue(treeNode); + if (treeNode.checked === true) { + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + } else { + //如果选中的值中不存在该值不处理 + var t = this.options.paras.selectedValues; + var p = parentValues.concat(name); + for (var i = 0, len = p.length; i < len; i++) { + t = t[p[i]]; + if (t == null) { + return; + } + if (BI.isEmpty(t)) { + break; + } + } + o.itemsCreator(BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_SELECT_DATA, + notSelectedValue: name, + parentValues: parentValues + }), function (new_values) { + self.options.paras.selectedValues = new_values; + BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments); + }); + } + }, + + _getSelectedValues: function () { + var self = this; + var hashMap = {}; + var rootNoots = this.nodes.getNodes(); + track(rootNoots); + function track(nodes) { + BI.each(nodes, function (i, node) { + var checkState = node.getCheckStatus(); + if (checkState.checked === false) { + return true; + } + var parentValues = node.parentValues || self._getParentValues(node); + //把文字中的html去掉,其实就是把文字颜色去掉 + var values = parentValues.concat([self._getNodeValue(node)]); + self._buildTree(hashMap, values); +// if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){ +// continue; +// } + if (BI.isNotEmptyArray(node.children)) { + track(node.children); + return true; + } + if (checkState.half === true) { + self._getHalfSelectedValues(hashMap, node); + } + }) + } + + return hashMap; + }, + + _initTree: function (setting, keyword) { + var self = this, o = this.options; + this.times = 1; + var tree = this.tree; + tree.empty(); + self.tip.setVisible(false); + this.loading(); + var op = BI.extend({}, o.paras, { + type: BI.TreeView.REQ_TYPE_INIT_DATA, + times: this.times + }); + var complete = function (d) { + if (self._stop === true || keyword != o.paras.keyword) { + return; + } + var hasNext = !!d.hasNext, nodes = d.items || []; + o.paras.lastSearchValue = d.lastSearchValue; + if (nodes.length > 0) { + callback(self._dealWidthNodes(nodes)); + } + self.setTipVisible(nodes.length <= 0); + self.loaded(); + if (!hasNext) { + self.tip.invisible(); + } else { + self.tip.setLoaded(); + } + self.fireEvent(BI.Events.AFTERINIT); + }; + + function callback(nodes) { + if (self._stop === true) { + return; + } + self.nodes = $.fn.zTree.init(tree.element, setting, nodes); + } + + BI.delay(function () { + o.itemsCreator(op, complete); + }, 100); + }, + + getValue: function () { + var o = this.options; + var result = BI.PartTree.superclass.getValue.apply(this, arguments); + o.itemsCreator({ + type: BI.TreeView.REQ_TYPE_ADJUST_DATA, + selectedValues: result + }, function (res) { + result = res; + }); + return result; + }, + + //生成树方法 + stroke: function (config) { + var o = this.options; + delete o.paras.keyword; + BI.extend(o.paras, config); + delete o.paras.lastSearchValue; + var setting = this._configSetting(); + this._initTree(setting, o.paras.keyword); + } +}); + +BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController(); +BI.Layers = new BI.LayerController(); +BI.Maskers = new BI.MaskersController(); +BI.Bubbles = new BI.BubblesController(); +BI.Tooltips = new BI.TooltipsController(); +BI.Popovers = new BI.FloatBoxController(); +BI.Broadcasts = new BI.BroadcastController(); +BI.StyleLoaders = new BI.StyleLoaderManager();/** + * canvas绘图 + * + * Created by GUY on 2015/11/18. + * @class BI.Canvas + * @extends BI.Widget + */ +BI.Canvas = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-canvas" + }) + }, + + _init: function () { + BI.Canvas.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var canvas = document.createElement("canvas"); + if (!document.createElement('canvas').getContext) { + canvas = window.G_vmlCanvasManager.initElement(canvas); + } + this.element.append(canvas); + canvas.width = o.width; + canvas.height = o.height; + $(canvas).width("100%"); + $(canvas).height("100%"); + this.canvas = canvas; + this._queue = []; + }, + + _getContext: function () { + if (!this.ctx) { + this.ctx = this.canvas.getContext('2d'); + } + return this.ctx; + }, + + _attr: function (key, value) { + var self = this; + if (BI.isNull(key)) { + return; + } + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self._queue.push({k: k, v: v}); + }); + return; + } + this._queue.push({k: key, v: value}); + }, + + _line: function (x0, y0) { + var self = this; + var args = [].slice.call(arguments, 2); + if (BI.isOdd(args.length)) { + this._attr(BI.last(args)); + args = BI.initial(args); + } + this._attr("moveTo", [x0, y0]); + var odd = BI.filter(args, function (i) { + return i % 2 === 0; + }); + var even = BI.filter(args, function (i) { + return i % 2 !== 0; + }); + args = BI.zip(odd, even); + BI.each(args, function (i, point) { + self._attr("lineTo", point); + }); + }, + + line: function (x0, y0, x1, y1) { + this._line.apply(this, arguments); + this._attr("stroke", []); + }, + + rect: function (x, y, w, h, color) { + this._attr("fillStyle", color); + this._attr("fillRect", [x, y, w, h]); + }, + + circle: function (x, y, radius, color) { + this._attr({ + fillStyle: color, + beginPath: [], + arc: [x, y, radius, 0, Math.PI * 2, true], + closePath: [], + fill: [] + }); + }, + + hollow: function () { + this._attr("beginPath", []); + this._line.apply(this, arguments); + this._attr("closePath", []); + this._attr("stroke", []); + }, + + solid: function () { + this.hollow.apply(this, arguments); + this._attr("fill", []); + }, + + gradient: function (x0, y0, x1, y1, start, end) { + var grd = this._getContext().createLinearGradient(x0, y0, x1, y1); + grd.addColorStop(0, start); + grd.addColorStop(1, end); + return grd; + }, + + reset: function () { + this._getContext().clearRect(0, 0, this.canvas.width, this.canvas.height); + }, + + stroke: function (callback) { + var self = this; + BI.nextTick(function () { + var ctx = self._getContext(); + BI.each(self._queue, function (i, q) { + if (BI.isFunction(ctx[q.k])) { + ctx[q.k].apply(ctx, q.v); + } else { + ctx[q.k] = q.v; + } + }); + self._queue = []; + callback && callback(); + }); + } +}); +BI.shortcut("bi.canvas", BI.Canvas);/** + * CollectionView + * + * Created by GUY on 2016/1/15. + * @class BI.CollectionView + * @extends BI.Widget + */ +BI.CollectionView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection", + // width: 400, //必设 + // height: 300, //必设 + overflowX: true, + overflowY: true, + cellSizeAndPositionGetter: BI.emptyFn, + horizontalOverscanSize: 0, + verticalOverscanSize: 0, + scrollLeft: 0, + scrollTop: 0, + items: [] + }); + }, + + _init: function () { + BI.CollectionView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + this._debounceRelease = BI.debounce(function () { + self._scrollLock = false; + }, 1000 / 60); + this.container = BI.createWidget({ + type: "bi.absolute" + }); + this.element.scroll(function () { + if (self._scrollLock === true) { + return; + } + o.scrollLeft = self.element.scrollLeft(); + o.scrollTop = self.element.scrollTop(); + self._calculateChildrenToRender(); + self.fireEvent(BI.CollectionView.EVENT_SCROLL, { + scrollLeft: o.scrollLeft, + scrollTop: o.scrollTop + }); + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + scrollable: o.overflowX === true && o.overflowY === true, + scrolly: o.overflowX === false && o.overflowY === true, + scrollx: o.overflowX === true && o.overflowY === false, + items: [this.container] + }); + if (o.items.length > 0) { + this._calculateSizeAndPositionData(); + this._populate(); + } + if (o.scrollLeft !== 0 || o.scrollTop !== 0) { + BI.nextTick(function () { + self.element.scrollTop(o.scrollTop); + self.element.scrollLeft(o.scrollLeft); + }); + } + }, + + _calculateSizeAndPositionData: function () { + var o = this.options; + var cellMetadata = []; + var sectionManager = new BI.SectionManager(); + var height = 0; + var width = 0; + + for (var index = 0, len = o.items.length; index < len; index++) { + var cellMetadatum = o.cellSizeAndPositionGetter(index); + + if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || + cellMetadatum.width == null || isNaN(cellMetadatum.width) || + cellMetadatum.x == null || isNaN(cellMetadatum.x) || + cellMetadatum.y == null || isNaN(cellMetadatum.y)) { + throw Error(); + } + + height = Math.max(height, cellMetadatum.y + cellMetadatum.height); + width = Math.max(width, cellMetadatum.x + cellMetadatum.width); + + cellMetadatum.index = index; + cellMetadata[index] = cellMetadatum; + sectionManager.registerCell(cellMetadatum, index); + } + + this._cellMetadata = cellMetadata; + this._sectionManager = sectionManager; + this._height = height; + this._width = width; + }, + + _cellRenderers: function (height, width, x, y) { + this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y); + return this._cellGroupRenderer() + }, + + _cellGroupRenderer: function () { + var self = this, o = this.options; + var rendered = []; + BI.each(this._lastRenderedCellIndices, function (i, index) { + var cellMetadata = self._sectionManager.getCellMetadata(index); + rendered.push(cellMetadata); + }); + return rendered; + }, + + _calculateChildrenToRender: function () { + var self = this, o = this.options; + var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()); + var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()); + var left = Math.max(0, scrollLeft - o.horizontalOverscanSize); + var top = Math.max(0, scrollTop - o.verticalOverscanSize); + var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize); + var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize); + if (right > 0 && bottom > 0) { + //如果滚动的区间并没有超出渲染的范围 + if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { + return; + } + var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top); + var renderedCells = [], renderedKeys = [], renderedWidgets = {}; + //存储所有的left和top + var lefts = {}, tops = {}; + for (var i = 0, len = childrenToDisplay.length; i < len; i++) { + var datum = childrenToDisplay[i]; + lefts[datum.x] = datum.x; + lefts[datum.x + datum.width] = datum.x + datum.width; + tops[datum.y] = datum.y; + tops[datum.y + datum.height] = datum.y + datum.height; + } + lefts = BI.toArray(lefts); + tops = BI.toArray(tops); + var leftMap = BI.invert(lefts); + var topMap = BI.invert(tops); + //存储上下左右四个边界 + var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {}; + var assertMinBorder = function (border, offset) { + if (border[offset] == null) { + border[offset] = Number.MAX_VALUE; + } + }; + var assertMaxBorder = function (border, offset) { + if (border[offset] == null) { + border[offset] = 0; + } + }; + for (var i = 0, len = childrenToDisplay.length; i < len; i++) { + var datum = childrenToDisplay[i]; + var index = BI.deepIndexOf(this.renderedKeys, datum.index); + var child; + if (index > -1) { + if (datum.width !== this.renderedCells[index]._width) { + this.renderedCells[index]._width = datum.width; + this.renderedCells[index].el.setWidth(datum.width); + } + if (datum.height !== this.renderedCells[index]._height) { + this.renderedCells[index]._height = datum.height; + this.renderedCells[index].el.setHeight(datum.height); + } + if (this.renderedCells[index]._left !== datum.x) { + this.renderedCells[index].el.element.css("left", datum.x + "px"); + } + if (this.renderedCells[index]._top !== datum.y) { + this.renderedCells[index].el.element.css("top", datum.y + "px"); + } + renderedCells.push(child = this.renderedCells[index]); + } else { + child = BI.createWidget(BI.extend({ + type: "bi.label", + width: datum.width, + height: datum.height + }, o.items[datum.index], { + cls: (o.items[datum.index].cls || "") + " container-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), + _left: datum.x, + _top: datum.y + })); + renderedCells.push({ + el: child, + left: datum.x, + top: datum.y, + _left: datum.x, + _top: datum.y, + _width: datum.width, + _height: datum.height + }); + } + var startTopIndex = topMap[datum.y] | 0; + var endTopIndex = topMap[datum.y + datum.height] | 0; + for (var k = startTopIndex; k <= endTopIndex; k++) { + var t = tops[k]; + assertMinBorder(leftBorder, t); + assertMaxBorder(rightBorder, t); + leftBorder[t] = Math.min(leftBorder[t], datum.x); + rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width); + } + var startLeftIndex = leftMap[datum.x] | 0; + var endLeftIndex = leftMap[datum.x + datum.width] | 0; + for (var k = startLeftIndex; k <= endLeftIndex; k++) { + var l = lefts[k]; + assertMinBorder(topBorder, l); + assertMaxBorder(bottomBorder, l); + topBorder[l] = Math.min(topBorder[l], datum.y); + bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height); + } + + renderedKeys.push(datum.index); + renderedWidgets[i] = child; + } + //已存在的, 需要添加的和需要删除的 + var existSet = {}, addSet = {}, deleteArray = []; + BI.each(renderedKeys, function (i, key) { + if (BI.deepContains(self.renderedKeys, key)) { + existSet[i] = key; + } else { + addSet[i] = key; + } + }); + BI.each(this.renderedKeys, function (i, key) { + if (BI.deepContains(existSet, key)) { + return; + } + if (BI.deepContains(addSet, key)) { + return; + } + deleteArray.push(i); + }); + BI.each(deleteArray, function (i, index) { + //性能优化,不调用destroy方法防止触发destroy事件 + self.renderedCells[index].el._destroy(); + }); + var addedItems = []; + BI.each(addSet, function (index) { + addedItems.push(renderedCells[index]) + }); + this.container.addItems(addedItems); + //拦截父子级关系 + this.container._children = renderedWidgets; + this.container.attr("items", renderedCells); + this.renderedCells = renderedCells; + this.renderedKeys = renderedKeys; + + //Todo 左右比较特殊 + var minX = BI.min(leftBorder); + var maxX = BI.max(rightBorder); + + var minY = BI.max(topBorder); + var maxY = BI.min(bottomBorder); + + this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; + } + }, + + _getMaxScrollLeft: function () { + return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + }, + + _getMaxScrollTop: function () { + return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + }, + + _populate: function (items) { + var o = this.options; + this._reRange(); + if (items && items !== this.options.items) { + this.options.items = items; + this._calculateSizeAndPositionData(); + } + if (o.items.length > 0) { + this.container.setWidth(this._width); + this.container.setHeight(this._height); + + this._calculateChildrenToRender(); + this.element.scrollTop(o.scrollTop); + this.element.scrollLeft(o.scrollLeft); + } + }, + + setScrollLeft: function (scrollLeft) { + if (this.options.scrollLeft === scrollLeft) { + return; + } + this._scrollLock = true; + this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollLeft(this.options.scrollLeft); + }, + + setScrollTop: function (scrollTop) { + if (this.options.scrollTop === scrollTop) { + return; + } + this._scrollLock = true; + this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollTop(this.options.scrollTop); + }, + + setOverflowX: function (b) { + var self = this; + if (this.options.overflowX !== !!b) { + this.options.overflowX = !!b; + BI.nextTick(function () { + self.element.css({overflowX: !!b ? "auto" : "hidden"}); + }); + } + }, + + setOverflowY: function (b) { + var self = this; + if (this.options.overflowY !== !!b) { + this.options.overflowY = !!b; + BI.nextTick(function () { + self.element.css({overflowY: !!b ? "auto" : "hidden"}); + }); + } + }, + + getScrollLeft: function () { + return this.options.scrollLeft; + }, + + getScrollTop: function () { + return this.options.scrollTop; + }, + + getMaxScrollLeft: function () { + return this._getMaxScrollLeft(); + }, + + getMaxScrollTop: function () { + return this._getMaxScrollTop(); + }, + + //重新计算children + _reRange: function () { + this.renderRange = {}; + }, + + _clearChildren: function () { + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + BI.each(this.renderedCells, function (i, cell) { + cell.el._destroy(); + }); + this._clearChildren(); + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + }, + + populate: function (items) { + if (items && items !== this.options.items) { + this.restore(); + } + this._populate(items); + } +}); +BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut('bi.collection_view', BI.CollectionView);/** + * @class BI.Combo + * @extends BI.Widget + */ +BI.Combo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-combo", + trigger: "click", + toggle: true, + direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right + isDefaultInit: false, + destroyWhenHide: false, + isNeedAdjustHeight: true,//是否需要高度调整 + isNeedAdjustWidth: true, + stopEvent: false, + stopPropagation: false, + adjustLength: 0,//调整的距离 + adjustXOffset: 0, + adjustYOffset: 0, + hideChecker: BI.emptyFn, + offsetStyle: "left", //left,right,center + el: {}, + popup: {}, + comboClass: "bi-combo-popup", + hoverClass: "bi-combo-hover" + }) + }, + + _init: function () { + BI.Combo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._initCombo(); + this._initPullDownAction(); + this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); + } + } + }); + + self.element.on("mouseenter." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self.element.addClass(o.hoverClass); + } + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self.element.removeClass(o.hoverClass); + } + }); + + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.combo} + ] + }); + o.isDefaultInit && (this._assertPopupView()); + BI.Resizers.add(this.getName(), BI.bind(function () { + if (this.isViewVisible()) { + this._hideView(); + } + }, this)); + }, + + _toggle: function () { + this._assertPopupViewRender(); + if (this.popupView.isVisible()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + var st = function (e) { + if (o.stopEvent) { + e.stopEvent(); + } + if (o.stopPropagation) { + e.stopPropagation(); + } + }; + BI.each(evs, function (i, ev) { + switch (ev) { + case "hover": + self.element.on("mouseenter." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; + case "click": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + break; + } + }); + }, + + _initCombo: function () { + this.combo = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this; + if (this.popupView == null) { + this.popupView = BI.createWidget(this.options.popup, { + type: "bi.popup_view" + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + self.combo.setValue(self.getValue()); + self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.popupView.setVisible(false); + BI.nextTick(function () { + self.fireEvent(BI.Combo.EVENT_AFTER_INIT); + }); + } + }, + + _assertPopupViewRender: function () { + this._assertPopupView(); + if (!this._rendered) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + this._rendered = true; + } + }, + + _hideIf: function (e) { + // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) { + // return; + // } + if (this.element.find(e.target).length > 0) { + return; + } + var isHide = this.options.hideChecker.apply(this, [e]); + if (isHide === false) { + return; + } + this._hideView(); + }, + + _hideView: function () { + this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); + if (this.options.destroyWhenHide === true) { + this.popupView && this.popupView.destroy(); + this.popupView = null; + this._rendered = false; + } else { + this.popupView && this.popupView.invisible(); + } + this.element.removeClass(this.options.comboClass); + + $(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); + this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); + }, + + _popupView: function () { + this._assertPopupViewRender(); + this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); + + this.popupView.visible(); + this.adjustWidth(); + this.adjustHeight(); + + this.element.addClass(this.options.comboClass); + $(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); + this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); + }, + + adjustWidth: function () { + var o = this.options; + if (!this.popupView) { + return; + } + if (o.isNeedAdjustWidth === true) { + this.resetListWidth(""); + var width = this.popupView.element.outerWidth(); + var maxW = this.element.outerWidth() || o.width; + if (width > maxW + 80) { + maxW = maxW + 80; + } else if (width > maxW) { + maxW = width; + } + this.resetListWidth(maxW < 100 ? 100 : maxW); + } + }, + + adjustHeight: function () { + var o = this.options, p = {}; + if (!this.popupView) { + return; + } + var isVisible = this.popupView.isVisible(); + this.popupView.visible(); + switch (o.direction) { + case "bottom": + case "bottom,right": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle); + break; + case "top": + case "top,right": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); + break; + case "left": + case "left,bottom": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle); + break; + case "right": + case "right,bottom": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle); + break; + case "top,left": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle); + break; + case "bottom,left": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle); + break; + case "left,top": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle); + break; + case "right,top": + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle); + break; + case "top,custom": + case "custom,top": + p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); + break; + case "custom,bottom": + case "bottom,custom": + p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); + break; + case "left,custom": + case "custom,left": + p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); + delete p.top; + delete p.adaptHeight; + break; + case "custom,right": + case "right,custom": + p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength); + delete p.top; + delete p.adaptHeight; + break; + } + + if ("adaptHeight" in p) { + this.resetListHeight(p['adaptHeight']); + } + if ("left" in p) { + this.popupView.element.css({ + left: p.left + }); + } + if ("top" in p) { + this.popupView.element.css({ + top: p.top + }); + } + this.position = p; + this.popupView.setVisible(isVisible); + }, + + resetListHeight: function (h) { + this._assertPopupView(); + this.popupView.resetHeight && this.popupView.resetHeight(h); + }, + + resetListWidth: function (w) { + this._assertPopupView(); + this.popupView.resetWidth && this.popupView.resetWidth(w); + }, + + populate: function (items) { + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + this.combo.populate.apply(this.combo, arguments); + }, + + _setEnable: function (arg) { + BI.Combo.superclass._setEnable.apply(this, arguments); + !arg && this.element.removeClass(this.options.hoverClass); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + this._assertPopupView(); + this.combo.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + this._assertPopupView(); + return this.popupView && this.popupView.getValue(); + }, + + isViewVisible: function () { + return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible(); + }, + + showView: function () { + if (this.isEnabled() && this.combo.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + getPopupPosition: function () { + return this.position; + }, + + toggle: function () { + this._toggle(); + }, + + destroy: function () { + $(document).unbind("mousedown." + this.getName()) + .unbind("mousewheel." + this.getName()) + .unbind("mouseenter." + this.getName()) + .unbind("mousemove." + this.getName()) + .unbind("mouseleave." + this.getName()); + BI.Resizers.remove(this.getName()); + BI.Combo.superclass.destroy.apply(this, arguments); + } +}); +BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Combo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Combo.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Combo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Combo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Combo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.combo", BI.Combo);/** + * + * 某个可以展开的节点 + * + * Created by GUY on 2015/9/10. + * @class BI.Expander + * @extends BI.Widget + */ +BI.Expander = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-expander", + trigger: "click", + toggle: true, + //direction: "bottom", //top,bottom四个方向 + isDefaultInit: false, //是否默认初始化子节点 + el: {}, + popup: {}, + expanderClass: "bi-expander-popup", + hoverClass: "bi-expander-hover" + }) + }, + + _init: function () { + BI.Expander.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._expanded = !!o.el.open; + this._initExpander(); + this._initPullDownAction(); + this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); + } + } + }); + + this.element.hover(function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self.element.addClass(o.hoverClass); + } + }, function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self.element.removeClass(o.hoverClass); + } + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.expander} + ] + }); + o.isDefaultInit && this._assertPopupView(); + if (this.expander.isOpened() === true) { + this._popupView(); + } + }, + + _toggle: function () { + this._assertPopupViewRender(); + if (this.popupView.isVisible()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + BI.each(evs, function (i, e) { + switch (e) { + case "hover": + self.element[e](function (e) { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } + }, function () { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); + self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + }); + break; + default : + if (e) { + self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { + if (self.expander.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isExpanded()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander); + self.fireEvent(BI.Expander.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander); + self.fireEvent(BI.Expander.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true)); + } + break; + } + }) + }, + + _initExpander: function () { + this.expander = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this; + if (this.popupView == null) { + this.popupView = BI.createWidget(this.options.popup, { + type: "bi.button_group", + cls: "expander-popup", + layouts: [{ + type: "bi.vertical", + hgap: 0, + vgap: 0 + }] + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + //self.setValue(self.getValue()); + self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj); + } + }); + this.popupView.setVisible(this.isExpanded()); + BI.nextTick(function () { + self.fireEvent(BI.Expander.EVENT_AFTER_INIT); + }); + } + }, + + _assertPopupViewRender: function () { + this._assertPopupView(); + if (!this._rendered) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + this._rendered = true; + } + }, + + _hideView: function () { + this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW); + this._expanded = false; + this.expander.setOpened(false); + this.popupView && this.popupView.invisible(); + this.element.removeClass(this.options.expanderClass); + + this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW); + }, + + _popupView: function () { + this._assertPopupViewRender(); + this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW); + this._expanded = true; + this.expander.setOpened(true); + this.popupView.visible(); + this.element.addClass(this.options.expanderClass); + this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW); + }, + + populate: function (items) { + //this._assertPopupView(); + this.popupView && this.popupView.populate.apply(this.popupView, arguments); + this.expander.populate.apply(this.expander, arguments); + }, + + _setEnable: function (arg) { + BI.Expander.superclass._setEnable.apply(this, arguments); + !arg && this.element.removeClass(this.options.hoverClass); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + //this._assertPopupView(); + this.expander.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + //this._assertPopupView(); + return this.popupView ? this.popupView.getValue() : []; + }, + + isViewVisible: function () { + return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible(); + }, + + isExpanded: function () { + return this._expanded; + }, + + showView: function () { + if (this.isEnabled() && this.expander.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + getAllLeaves: function () { + return this.popupView && this.popupView.getAllLeaves(); + }, + + getNodeById: function (id) { + if (this.expander.options.id === id) { + return this.expander; + } + return this.popupView && this.popupView.getNodeById(id); + }, + + getNodeByValue: function (value) { + if (this.expander.getValue() === value) { + return this.expander; + } + return this.popupView && this.popupView.getNodeByValue(value); + }, + + destroy: function () { + BI.Expander.superclass.destroy.apply(this, arguments); + } +}); +BI.Expander.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Expander.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Expander.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Expander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Expander.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Expander.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.expander", BI.Expander);/** + * Created by GUY on 2015/8/10. + */ + +BI.ComboGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-combo-group bi-list-item", + + //以下这些属性对每一个combo都是公用的 + trigger: "click,hover", + direction: "right", + adjustLength: 0, + isDefaultInit: false, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + + el: {type: "bi.text_button", text: "", value: ""}, + children: [], + + popup: { + el: { + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + } + } + }) + }, + + _init: function () { + BI.ComboGroup.superclass._init.apply(this, arguments); + this.populate(this.options.el); + }, + + populate: function (item) { + var self = this, o = this.options; + var children = o.children; + if (BI.isEmpty(children)) { + throw new Error("ComboGroup构造错误"); + } + BI.each(children, function (i, ch) { + var son = BI.formatEL(ch).el.children; + ch = BI.formatEL(ch).el; + if (!BI.isEmpty(son)) { + ch.el = BI.clone(ch); + ch.children = son; + ch.type = "bi.combo_group"; + ch.action = o.action; + ch.height = o.height; + ch.direction = o.direction; + ch.isDefaultInit = o.isDefaultInit; + ch.isNeedAdjustHeight = o.isNeedAdjustHeight; + ch.isNeedAdjustWidth = o.isNeedAdjustWidth; + ch.adjustLength = o.adjustLength; + ch.popup = o.popup; + } + }) + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + height: o.height, + trigger: o.trigger, + direction: o.direction, + isDefaultInit: o.isDefaultInit, + isNeedAdjustWidth: o.isNeedAdjustWidth, + isNeedAdjustHeight: o.isNeedAdjustHeight, + adjustLength: o.adjustLength, + el: item, + popup: BI.extend({}, o.popup, { + el: BI.extend({ + items: children + }, o.popup.el) + }) + }) + this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj); + } + }) + }, + + getValue: function () { + return this.combo.getValue(); + }, + + setValue: function (v) { + this.combo.setValue(v); + } +}); +BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-virtual-group", + items: [], + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }) + }, + + render: function () { + this.populate(this.options.items); + }, + + _packageBtns: function (items) { + var o = this.options; + + for (var i = o.layouts.length - 1; i > 0; i--) { + items = BI.map(items, function (k, it) { + return BI.extend({}, o.layouts[i], { + items: [ + BI.extend({}, o.layouts[i].el, { + el: BI.stripEL(it) + }) + ] + }) + }) + } + return items; + }, + + _packageItems: function (items, packBtns) { + return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns)); + }, + + _packageLayout: function (items) { + var o = this.options, layout = BI.deepClone(o.layouts[0]); + + var lay = BI.formatEL(layout).el; + while (lay && lay.items && !BI.isEmpty(lay.items)) { + lay = BI.formatEL(lay.items[0]).el; + } + lay.items = items; + return layout; + }, + + addItems: function (items) { + this.layouts.addItems(items); + }, + + prependItems: function (items) { + this.layouts.prependItems(items); + }, + + setValue: function (v) { + this.layouts.setValue(v); + }, + + getValue: function () { + return this.layouts.getValue(); + }, + + empty: function () { + this.layouts.empty(); + }, + + populate: function (items) { + var self = this; + items = items || []; + this.options.items = items; + items = this._packageBtns(items); + if (!this.layouts) { + this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); + } else { + this.layouts.populate(items); + } + } +}); +BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.virtual_group", BI.VirtualGroup);/** + * 加载控件 + * + * Created by GUY on 2015/8/31. + * @class BI.Loader + * @extends BI.Widget + */ +BI.Loader = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-loader", + + direction: "top", + isDefaultInit: true,//是否默认初始化数据 + logic: { + dynamic: true, + scrolly: true + }, + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + prev: false, + next: {}, + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn + }) + }, + + _prevLoad: function () { + var self = this, o = this.options; + this.prev.setLoading(); + o.itemsCreator.apply(this, [{times: --this.times}, function () { + self.prev.setLoaded(); + self.prependItems.apply(self, arguments); + }]); + }, + + _nextLoad: function () { + var self = this, o = this.options; + this.next.setLoading(); + o.itemsCreator.apply(this, [{times: ++this.times}, function () { + self.next.setLoaded(); + self.addItems.apply(self, arguments); + }]); + }, + + _init: function () { + BI.Loader.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.itemsCreator === false) { + o.prev = false; + o.next = false; + } + if (o.prev !== false) { + this.prev = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.prev)); + this.prev.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._prevLoad(); + } + }); + } + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + chooseType: 0, + items: o.items, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Loader.EVENT_CHANGE, obj); + } + }); + + if (o.next !== false) { + this.next = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.next)); + this.next.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._nextLoad(); + } + }) + } + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ + scrolly: true + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next) + })))); + + o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { + o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); + }, this)); + if (BI.isNotEmptyArray(o.items)) { + this.populate(o.items); + } + }, + + hasPrev: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasPrev.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + hasNext: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasNext.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + prependItems: function (items) { + this.count += items.length; + if (this.next !== false) { + if (this.hasPrev()) { + this.options.items = this.options.items.concat(items); + this.prev.setLoaded(); + } else { + this.prev.setEnd(); + } + } + this.button_group.prependItems.apply(this.button_group, arguments); + }, + + addItems: function (items) { + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.options.items = this.options.items.concat(items); + this.next.setLoaded(); + } else { + this.next.setEnd(); + } + } + this.button_group.addItems.apply(this.button_group, arguments); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { + o.itemsCreator.apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("arguments can not be null!!!"); + } + self.populate.apply(self, arguments); + o.onLoaded(); + }]); + return; + } + this.options.items = items; + this.times = 1; + this.count = 0; + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.next.setLoaded(); + } else { + this.next.invisible(); + } + } + if (BI.isObject(this.prev)) { + if (this.hasPrev()) { + this.prev.setLoaded(); + } else { + this.prev.invisible(); + } + } + this.button_group.populate.apply(this.button_group, arguments); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + }, + + empty: function () { + this.button_group.empty(); + BI.each([this.prev, this.next], function (i, ob) { + ob && ob.setVisible(false); + }); + }, + + destroy: function () { + BI.Loader.superclass.destroy.apply(this, arguments); + } +}); +BI.Loader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.loader", BI.Loader);/** + * Created by GUY on 2015/6/26. + */ + +BI.Navigation = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), { + direction: "bottom",//top, bottom, left, right, custom + logic: { + dynamic: false + }, + single: false, + defaultShowIndex: false, + tab: false, + cardCreator: function (v) { + return BI.createWidget(); + }, + + afterCardCreated: BI.emptyFn, + afterCardShow: BI.emptyFn + }) + }, + + render: function () { + var self = this, o = this.options; + this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); + this.cardMap = {}; + this.showIndex = 0; + this.layout = BI.createWidget({ + type: "bi.card" + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) + })))); + + + new BI.ShowListener({ + eventObj: this.tab, + cardLayout: this.layout, + cardNameCreator: function (v) { + return self.showIndex + v; + }, + cardCreator: function (v) { + var card = o.cardCreator(v); + self.cardMap[v] = card; + return card; + }, + afterCardCreated: BI.bind(this.afterCardCreated, this), + afterCardShow: BI.bind(this.afterCardShow, this) + }); + }, + + mounted: function () { + var o = this.options; + if (o.defaultShowIndex !== false) { + this.setSelect(o.defaultShowIndex); + } + }, + + _deleteOtherCards: function (currCardName) { + var self = this, o = this.options; + if (o.single === true) { + BI.each(this.cardMap, function (name, card) { + if (name !== (currCardName + "")) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + } + }); + } + }, + + afterCardCreated: function (v) { + var self = this; + this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Navigation.EVENT_CHANGE, obj); + } + }); + this.options.afterCardCreated.apply(this, arguments); + }, + + afterCardShow: function (v) { + this.showIndex = v; + this._deleteOtherCards(v); + this.options.afterCardShow.apply(this, arguments); + }, + + populate: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.populate.apply(card, arguments); + } + }, + + _assertCard: function (v) { + if (!this.layout.isCardExisted(v)) { + var card = this.options.cardCreator(v); + this.cardMap[v] = card; + this.layout.addCardByName(v, card); + this.afterCardCreated(v); + } + }, + + setSelect: function (v) { + this._assertCard(v); + this.layout.showCardByName(v); + this._deleteOtherCards(v); + if (this.showIndex !== v) { + this.showIndex = v; + BI.nextTick(BI.bind(this.afterCardShow, this, v)); + } + }, + + getSelect: function () { + return this.showIndex; + }, + + getSelectedCard: function () { + if (BI.isKey(this.showIndex)) { + return this.cardMap[this.showIndex]; + } + }, + + /** + * @override + */ + setValue: function (v) { + var card = this.layout.getShowingCard(); + if (card) { + card.setValue(v); + } + }, + + /** + * @override + */ + getValue: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.getValue(); + } + }, + + empty: function () { + this.layout.deleteAllCard(); + this.cardMap = {}; + }, + + destroy: function () { + BI.Navigation.superclass.destroy.apply(this, arguments); + } +}); +BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.navigation", BI.Navigation);/** + * 搜索逻辑控件 + * + * Created by GUY on 2015/9/28. + * @class BI.Searcher + * @extends BI.Widget + */ + +BI.Searcher = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-searcher", + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + + isDefaultInit: false, + isAutoSearch: true, //是否自动搜索 + isAutoSync: true, //是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一 + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + + //isAutoSearch为false时启用 + onSearch: function (op, callback) { + callback([]) + }, + + el: { + type: "bi.search_editor" + }, + + popup: { + type: "bi.searcher_view" + }, + + adapter: null, + masker: { //masker层 + offset: {} + } + }) + }, + + _init: function () { + BI.Searcher.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.editor = BI.createWidget(o.el, { + type: "bi.search_editor" + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap, + items: [this.editor] + }); + o.isDefaultInit && (this._assertPopupView()); + + var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, true); + this.editor.on(BI.Controller.EVENT_CHANGE, function (type) { + switch (type) { + case BI.Events.STARTEDIT: + self._startSearch(); + break; + case BI.Events.EMPTY: + self._stopSearch(); + break; + case BI.Events.CHANGE: + search(); + break; + case BI.Events.PAUSE: + self._pauseSearch(); + break; + } + }) + }, + + _assertPopupView: function () { + var self = this, o = this.options; + if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) { + this.popupView = BI.createWidget(o.popup, { + type: "bi.searcher_view", + chooseType: o.chooseType + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + if (o.isAutoSync) { + var values = o.adapter && o.adapter.getValue(); + if (!obj.isSelected()) { + o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); + } else { + switch (o.chooseType) { + case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: + o.adapter && o.adapter.setValue([obj.getValue()]); + break; + case BI.ButtonGroup.CHOOSE_TYPE_MULTI: + values.push(obj.getValue()); + o.adapter && o.adapter.setValue(values); + break; + } + } + } + self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); + } + }); + BI.nextTick(function () { + self.fireEvent(BI.Searcher.EVENT_AFTER_INIT); + }); + } + if (o.masker && !BI.Maskers.has(this.getName())) { + BI.Maskers.create(this.getName(), o.adapter, BI.extend({ + container: this, + render: this.popupView + }, o.masker)); + } + }, + + _startSearch: function () { + this._assertPopupView(); + this._stop = false; + this._isSearching = true; + this.fireEvent(BI.Searcher.EVENT_START); + this.popupView.startSearch && this.popupView.startSearch(); + //搜索前先清空dom + // BI.Maskers.get(this.getName()).empty(); + BI.nextTick(function (name) { + BI.Maskers.show(name); + }, this.getName()); + }, + + _pauseSearch: function () { + var o = this.options, name = this.getName(); + this._stop = true; + BI.nextTick(function (name) { + BI.Maskers.hide(name); + }, this.getName()); + if (this._isSearching === true) { + this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch(); + this.fireEvent(BI.Searcher.EVENT_PAUSE); + } + this._isSearching = false; + }, + + _stopSearch: function () { + var o = this.options, name = this.getName(); + this._stop = true; + BI.Maskers.hide(name); + if (this._isSearching === true) { + this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); + this.fireEvent(BI.Searcher.EVENT_STOP); + } + this._isSearching = false; + }, + + _search: function () { + var self = this, o = this.options, keyword = this.editor.getValue(); + if (keyword === "" || this._stop) { + return; + } + if (o.isAutoSearch) { + var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr("items"))) || []; + var finding = BI.Func.getSearchResult(items, keyword); + var matched = finding.matched, finded = finding.finded; + this.popupView.populate(finded, matched, keyword); + o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue()); + self.fireEvent(BI.Searcher.EVENT_SEARCHING); + return; + } + this.popupView.loading && this.popupView.loading(); + o.onSearch({ + times: 1, + keyword: keyword, + selectedValues: o.adapter && o.adapter.getValue() + }, function (searchResult, matchResult) { + if (!self._stop) { + var args = [].slice.call(arguments); + if (args.length > 0) { + args.push(keyword); + } + BI.Maskers.show(self.getName()); + self.popupView.populate.apply(self.popupView, args); + o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue()); + self.popupView.loaded && self.popupView.loaded(); + self.fireEvent(BI.Searcher.EVENT_SEARCHING); + } + }); + }, + + setAdapter: function (adapter) { + this.options.adapter = adapter; + BI.Maskers.remove(this.getName()); + }, + + doSearch: function () { + if (this.isSearching()) { + this._search(); + } + }, + + stopSearch: function () { + this._stopSearch();//先停止搜索,然后再去设置editor为空 + //important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常) + try { + this.editor.blur(); + } catch (e) { + if (!this.editor.blur) { + throw new Error("editor没有实现blur方法"); + } + } finally { + this.editor.setValue(""); + } + }, + + isSearching: function () { + return this._isSearching; + }, + + isViewVisible: function () { + return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName()); + }, + + getView: function () { + return this.popupView; + }, + + hasMatched: function () { + this._assertPopupView(); + return this.popupView.hasMatched(); + }, + + adjustHeight: function () { + if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) { + BI.Maskers.show(this.getName()); + } + }, + + adjustView: function () { + this.isViewVisible() && BI.Maskers.show(this.getName()); + }, + + setValue: function (v) { + this._assertPopupView(); + this.popupView && this.popupView.setValue(v); + }, + + getKeyword: function () { + return this.editor.getValue(); + }, + + getKeywords: function () { + return this.editor.getKeywords(); + }, + + getValue: function () { + var o = this.options; + if (o.isAutoSync && o.adapter && o.adapter.getValue) { + return o.adapter.getValue(); + } + if (this.isSearching()) { + return this.popupView.getValue(); + } else if (o.adapter && o.adapter.getValue) { + return o.adapter.getValue(); + } else { + return this.popupView.getValue(); + } + }, + + populate: function (result, searchResult, keyword) { + var o = this.options; + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + if (o.isAutoSync && o.adapter && o.adapter.getValue) { + this.popupView.setValue(o.adapter.getValue()); + } + }, + + empty: function () { + this.popupView && this.popupView.empty(); + }, + + destroy: function () { + BI.Maskers.remove(this.getName()); + BI.Searcher.superclass.destroy.apply(this, arguments); + } +}); +BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Searcher.EVENT_START = "EVENT_START"; +BI.Searcher.EVENT_STOP = "EVENT_STOP"; +BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + +BI.shortcut("bi.searcher", BI.Searcher);/** + * + * 切换显示或隐藏面板 + * + * Created by GUY on 2015/11/2. + * @class BI.Switcher + * @extends BI.Widget + */ +BI.Switcher = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-switcher", + direction: BI.Direction.Top, + trigger: "click", + toggle: true, + el: {}, + popup: {}, + adapter: null, + masker: {}, + switcherClass: "bi-switcher-popup", + hoverClass: "bi-switcher-hover" + }) + }, + + _init: function () { + BI.Switcher.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._initSwitcher(); + this._initPullDownAction(); + this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self.isEnabled() && self.isValid()) { + if (type === BI.Events.EXPAND) { + self._popupView(); + } + if (type === BI.Events.COLLAPSE) { + self._hideView(); + } + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); + } + } + }); + + this.element.hover(function () { + if (self.isEnabled() && self.switcher.isEnabled()) { + self.element.addClass(o.hoverClass); + } + }, function () { + if (self.isEnabled() && self.switcher.isEnabled()) { + self.element.removeClass(o.hoverClass); + } + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.switcher} + ] + }); + o.isDefaultInit && (this._assertPopupView()); + }, + + _toggle: function () { + this._assertPopupView(); + if (this.isExpanded()) { + this._hideView(); + } else { + if (this.isEnabled()) { + this._popupView(); + } + } + }, + + _initPullDownAction: function () { + var self = this, o = this.options; + var evs = this.options.trigger.split(","); + BI.each(evs, function (i, e) { + switch (e) { + case "hover": + self.element[e](function (e) { + if (self.isEnabled() && self.switcher.isEnabled()) { + self._popupView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + }, function () { + if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + }); + break; + default : + if (e) { + self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { + if (self.switcher.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.switcher.isEnabled()) { + o.toggle ? self._toggle() : self._popupView(); + if (self.isExpanded()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } else { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher); + self.fireEvent(BI.Switcher.EVENT_COLLAPSE); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true)); + } + break; + } + }) + }, + + _initSwitcher: function () { + this.switcher = BI.createWidget(this.options.el); + }, + + _assertPopupView: function () { + var self = this, o = this.options; + if (!this._created) { + this.popupView = BI.createWidget(o.popup, { + type: "bi.button_group", + element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)), + cls: "switcher-popup", + layouts: [{ + type: "bi.vertical", + hgap: 0, + vgap: 0 + }] + }); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj); + } + }); + if (o.direction !== BI.Direction.Custom && !o.adapter) { + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [ + {el: this.popupView} + ] + }); + } + this._created = true; + BI.nextTick(function () { + self.fireEvent(BI.Switcher.EVENT_AFTER_INIT); + }); + } + }, + + _hideView: function () { + this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW); + var self = this, o = this.options; + o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); + BI.nextTick(function () { + o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false)); + self.element.removeClass(o.switcherClass); + self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW); + }); + }, + + _popupView: function () { + var self = this, o = this.options; + this._assertPopupView(); + this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW); + o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true); + BI.nextTick(function (name) { + o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true); + self.element.addClass(o.switcherClass); + self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW); + }, this.getName()); + }, + + populate: function (items) { + this._assertPopupView(); + this.popupView.populate.apply(this.popupView, arguments); + this.switcher.populate.apply(this.switcher, arguments); + }, + + _setEnable: function (arg) { + BI.Switcher.superclass._setEnable.apply(this, arguments); + !arg && this.isViewVisible() && this._hideView(); + }, + + setValue: function (v) { + this._assertPopupView(); + this.switcher.setValue(v); + this.popupView && this.popupView.setValue(v); + }, + + getValue: function () { + this._assertPopupView(); + return this.popupView ? this.popupView.getValue() : []; + }, + + setAdapter: function (adapter) { + this.options.adapter = adapter; + BI.Maskers.remove(this.getName()); + }, + + isViewVisible: function () { + return this.isEnabled() && this.switcher.isEnabled() && + (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible())); + }, + + isExpanded: function () { + return this.isViewVisible(); + }, + + showView: function () { + if (this.isEnabled() && this.switcher.isEnabled()) { + this._popupView(); + } + }, + + hideView: function () { + this._hideView(); + }, + + getView: function () { + return this.popupView; + }, + + adjustView: function () { + this.isViewVisible() && BI.Maskers.show(this.getName()); + }, + + getAllLeaves: function () { + return this.popupView && this.popupView.getAllLeaves(); + }, + + getNodeById: function (id) { + if (this.switcher.attr("id") === id) { + return this.switcher; + } + return this.popupView && this.popupView.getNodeById(id); + }, + + getNodeByValue: function (value) { + if (this.switcher.getValue() === value) { + return this.switcher; + } + return this.popupView && this.popupView.getNodeByValue(value); + }, + + empty: function () { + this.popupView && this.popupView.empty(); + }, + + destroy: function () { + BI.Switcher.superclass.destroy.apply(this, arguments); + } +}); +BI.Switcher.EVENT_EXPAND = "EVENT_EXPAND"; +BI.Switcher.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.Switcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.Switcher.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Switcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.Switcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + +BI.shortcut("bi.switcher", BI.Switcher);/** + * Created by GUY on 2015/6/26. + */ + +BI.Tab = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tab", + direction: "top",//top, bottom, left, right, custom + single: false, //是不是单页面 + logic: { + dynamic: false + }, + defaultShowIndex: false, + tab: false, + cardCreator: function (v) { + return BI.createWidget(); + } + }) + }, + + render: function () { + var self = this, o = this.options; + if (BI.isObject(o.tab)) { + this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"}); + this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + } + this.cardMap = {}; + this.layout = BI.createWidget({ + type: "bi.card" + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout) + })))); + + var listener = new BI.ShowListener({ + eventObj: this.tab, + cardLayout: this.layout, + cardCreator: function (v) { + var card = o.cardCreator.apply(self, arguments); + self.cardMap[v] = card; + return card; + }, + afterCardShow: function (v) { + self._deleteOtherCards(v); + self.curr = v; + } + }); + listener.on(BI.ShowListener.EVENT_CHANGE, function (value) { + self.fireEvent(BI.Tab.EVENT_CHANGE, value, self); + }); + }, + + _deleteOtherCards: function (currCardName) { + var self = this, o = this.options; + if (o.single === true) { + BI.each(this.cardMap, function (name, card) { + if (name !== (currCardName + "")) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + } + }); + } + }, + + _assertCard: function (v) { + if (!this.layout.isCardExisted(v)) { + var card = this.options.cardCreator(v); + this.cardMap[v] = card; + this.layout.addCardByName(v, card); + } + }, + + mounted: function () { + var o = this.options; + if (o.defaultShowIndex !== false) { + this.setSelect(o.defaultShowIndex); + } + }, + + setSelect: function (v) { + this.tab && this.tab.setValue(v); + this._assertCard(v); + this.layout.showCardByName(v); + this._deleteOtherCards(v); + if (this.curr !== v) { + this.curr = v; + } + }, + + removeTab: function (cardname) { + var self = this, o = this.options; + BI.any(this.cardMap, function (name, card) { + if (BI.isEqual(name, (cardname + ""))) { + self.layout.deleteCardByName(name); + delete self.cardMap[name]; + return true; + } + }); + }, + + getSelect: function () { + return this.curr; + }, + + getSelectedTab: function () { + return this.layout.getShowingCard(); + }, + + getTab: function (v) { + this._assertCard(v); + return this.layout.getCardByName(v); + }, + + setValue: function (v) { + var card = this.layout.getShowingCard(); + if (card) { + card.setValue(v); + } + }, + + getValue: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.getValue(); + } + }, + + populate: function () { + var card = this.layout.getShowingCard(); + if (card) { + return card.populate && card.populate.apply(card, arguments); + } + }, + + empty: function () { + this.layout.deleteAllCard(); + this.cardMap = {}; + }, + + destroy: function () { + this.cardMap = {}; + BI.Tab.superclass.destroy.apply(this, arguments); + } +}); +BI.Tab.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.tab", BI.Tab);/** + * 表示当前对象 + * + * Created by GUY on 2015/9/7. + * @class BI.EL + * @extends BI.Widget + */ +BI.EL = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-el", + el: {}, + layout: {} + }); + }, + _init: function () { + BI.EL.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.ele = BI.createWidget(o.el); + BI.createWidget(o.layout, { + type: "bi.adaptive", + element: this, + items: [this.ele] + }); + this.ele.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + }, + + setValue: function (v) { + this.ele.setValue(v); + }, + + getValue: function () { + return this.ele.getValue(); + }, + + populate: function () { + this.ele.populate.apply(this, arguments); + } +}); +BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// This is CodeMirror (http://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function(mod) { + this.CodeMirror = mod(); +})(function() { + "use strict"; + + // BROWSER SNIFFING + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + + var gecko = /gecko\/\d/i.test(navigator.userAgent); + var ie_upto10 = /MSIE \d/.test(navigator.userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); + var ie = ie_upto10 || ie_11up; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]); + var webkit = /WebKit\//.test(navigator.userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); + var chrome = /Chrome\//.test(navigator.userAgent); + var presto = /Opera\//.test(navigator.userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); + var phantom = /PhantomJS/.test(navigator.userAgent); + + var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); + var mac = ios || /Mac/.test(navigator.platform); + var windows = /win/i.test(navigator.platform); + + var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) presto_version = Number(presto_version[1]); + if (presto_version && presto_version >= 15) { presto = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || (ie && ie_version >= 9); + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + // EDITOR CONSTRUCTOR + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); + + this.options = options = options ? copyObj(options) : {}; + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false); + setGuttersForLineNumbers(options); + + var doc = options.value; + if (typeof doc == "string") doc = new Doc(doc, options.mode); + this.doc = doc; + + var input = new CodeMirror.inputStyles[options.inputStyle](this); + var display = this.display = new Display(place, doc, input); + display.wrapper.CodeMirror = this; + updateGutters(this); + themeChanged(this); + if (options.lineWrapping) + this.display.wrapper.className += " CodeMirror-wrap"; + if (options.autofocus && !mobile) display.input.focus(); + initScrollbars(this); + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + }; + + var cm = this; + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20); + + registerEventHandlers(this); + ensureGlobalHandlers(); + + startOperation(this); + this.curOp.forceUpdate = true; + attachDoc(this, doc); + + if ((options.autofocus && !mobile) || cm.hasFocus()) + setTimeout(bind(onFocus, this), 20); + else + onBlur(this); + + for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) + optionHandlers[opt](this, options[opt], Init); + maybeUpdateLineNumberWidth(this); + if (options.finishInit) options.finishInit(this); + for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); + endOperation(this); + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + display.lineDiv.style.textRendering = "auto"; + } + + // DISPLAY CONSTRUCTOR + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input) { + var d = this; + this.input = input; + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.scrollbarFiller.setAttribute("cm-not-content", "true"); + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + d.gutterFiller.setAttribute("cm-not-content", "true"); + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = elt("div", null, "CodeMirror-code"); + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + d.cursorDiv = elt("div", null, "CodeMirror-cursors"); + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure"); + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none"); + // Moved around its parent to cover visible view. + d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + d.sizerWidth = null; + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (!webkit && !(gecko && mobile)) d.scroller.draggable = true; + + if (place) { + if (place.appendChild) place.appendChild(d.wrapper); + else place(d.wrapper); + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first; + d.reportedViewFrom = d.reportedViewTo = doc.first; + // Information about the rendered lines. + d.view = []; + d.renderedView = null; + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null; + // Empty space (in pixels) above the view + d.viewOffset = 0; + d.lastWrapHeight = d.lastWrapWidth = 0; + d.updateLineNumbers = null; + + d.nativeBarWidth = d.barHeight = d.barWidth = 0; + d.scrollbarsClipped = false; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false; + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + // True when shift is held down. + d.shift = false; + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null; + + d.activeTouch = null; + + input.init(d); + } + + // STATE UPDATES + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); + resetModeState(cm); + } + + function resetModeState(cm) { + cm.doc.iter(function(line) { + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + }); + cm.doc.frontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) regChange(cm); + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap"); + cm.display.sizer.style.minWidth = ""; + cm.display.sizerWidth = null; + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap"); + findMaxLine(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function(){updateScrollbars(cm);}, 100); + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function(line) { + if (lineIsHidden(cm.doc, line)) return 0; + + var widgetsHeight = 0; + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) widgetsHeight += line.widgets[i].height; + } + + if (wrapping) + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; + else + return widgetsHeight + th; + }; + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function(line) { + var estHeight = est(line); + if (estHeight != line.height) updateLineHeight(line, estHeight); + }); + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + function guttersChanged(cm) { + updateGutters(cm); + regChange(cm); + setTimeout(function(){alignHorizontally(cm);}, 20); + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function updateGutters(cm) { + var gutters = cm.display.gutters, specs = cm.options.gutters; + removeChildren(gutters); + for (var i = 0; i < specs.length; ++i) { + var gutterClass = specs[i]; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); + if (gutterClass == "CodeMirror-linenumbers") { + cm.display.lineGutter = gElt; + gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = i ? "" : "none"; + updateGutterSpace(cm); + } + + function updateGutterSpace(cm) { + var width = cm.display.gutters.offsetWidth; + cm.display.sizer.style.marginLeft = width + "px"; + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) return 0; + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found = merged.find(0, true); + len -= cur.text.length - found.from.ch; + cur = found.to.line; + len += cur.text.length - found.to.ch; + } + return len; + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function(line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // Make sure the gutters options contains the element + // "CodeMirror-linenumbers" when the lineNumbers option is true. + function setGuttersForLineNumbers(options) { + var found = indexOf(options.gutters, "CodeMirror-linenumbers"); + if (found == -1 && options.lineNumbers) { + options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); + } else if (found > -1 && !options.lineNumbers) { + options.gutters = options.gutters.slice(0); + options.gutters.splice(found, 1); + } + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + }; + } + + function NativeScrollbars(place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + place(vert); place(horiz); + + on(vert, "scroll", function() { + if (vert.clientHeight) scroll(vert.scrollTop, "vertical"); + }); + on(horiz, "scroll", function() { + if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal"); + }); + + this.checkedOverlay = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; + } + + NativeScrollbars.prototype = copyObj({ + update: function(measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = + (measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; + } + + if (!this.checkedOverlay && measure.clientHeight > 0) { + if (sWidth == 0) this.overlayHack(); + this.checkedOverlay = true; + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}; + }, + setScrollLeft: function(pos) { + if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos; + }, + setScrollTop: function(pos) { + if (this.vert.scrollTop != pos) this.vert.scrollTop = pos; + }, + overlayHack: function() { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.minHeight = this.vert.style.minWidth = w; + var self = this; + var barMouseDown = function(e) { + if (e_target(e) != self.vert && e_target(e) != self.horiz) + operation(self.cm, onMouseDown)(e); + }; + on(this.vert, "mousedown", barMouseDown); + on(this.horiz, "mousedown", barMouseDown); + }, + clear: function() { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + } + }, NativeScrollbars.prototype); + + function NullScrollbars() {} + + NullScrollbars.prototype = copyObj({ + update: function() { return {bottom: 0, right: 0}; }, + setScrollLeft: function() {}, + setScrollTop: function() {}, + clear: function() {} + }, NullScrollbars.prototype); + + CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function() { + if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0); + }); + node.setAttribute("cm-not-content", "true"); + }, function(pos, axis) { + if (axis == "horizontal") setScrollLeft(cm, pos); + else setScrollTop(cm, pos); + }, cm); + if (cm.display.scrollbars.addClass) + addClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + function updateScrollbars(cm, measure) { + if (!measure) measure = measureForScrollbars(cm); + var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + updateHeightsInViewport(cm); + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else d.scrollbarFiller.style.display = ""; + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else d.gutterFiller.style.display = ""; + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + + var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; + } + } + return {from: from, to: Math.max(to, from + 1)}; + } + + // LINE NUMBERS + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) if (!view[i].hidden) { + if (cm.options.fixedGutter && view[i].gutter) + view[i].gutter.style.left = left; + var align = view[i].alignable; + if (align) for (var j = 0; j < align.length; j++) + align[j].style.left = left; + } + if (cm.options.fixedGutter) + display.gutters.style.left = (comp + gutterW) + "px"; + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false; + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm); + return true; + } + return false; + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; + } + + // DISPLAY DRAWING + + function DisplayUpdate(cm, viewport, force) { + var display = cm.display; + + this.viewport = viewport; + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport); + this.editorIsHidden = !display.wrapper.offsetWidth; + this.wrapperHeight = display.wrapper.clientHeight; + this.wrapperWidth = display.wrapper.clientWidth; + this.oldDisplayWidth = displayWidth(cm); + this.force = force; + this.dims = getDimensions(cm); + this.events = []; + } + + DisplayUpdate.prototype.signal = function(emitter, type) { + if (hasHandler(emitter, type)) + this.events.push(arguments); + }; + DisplayUpdate.prototype.finish = function() { + for (var i = 0; i < this.events.length; i++) + signal.apply(null, this.events[i]); + }; + + function maybeClipScrollbars(cm) { + var display = cm.display; + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; + display.heightForcer.style.height = scrollGap(cm) + "px"; + display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; + display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; + display.scrollbarsClipped = true; + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, doc = cm.doc; + + if (update.editorIsHidden) { + resetView(cm); + return false; + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + return false; + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm); + update.dims = getDimensions(cm); + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size; + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, update.visible.to + cm.options.viewportMargin); + if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom); + if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo); + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from); + to = visualLineEndNo(cm.doc, to); + } + + var different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; + adjustView(cm, from, to); + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px"; + + var toUpdate = countDirtyView(cm); + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + return false; + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var focused = activeElt(); + if (toUpdate > 4) display.lineDiv.style.display = "none"; + patchDisplay(cm, display.updateLineNumbers, update.dims); + if (toUpdate > 4) display.lineDiv.style.display = ""; + display.renderedView = display.view; + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + if (focused && activeElt() != focused && focused.offsetHeight) focused.focus(); + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv); + removeChildren(display.selectionDiv); + display.gutters.style.height = 0; + + if (different) { + display.lastWrapHeight = update.wrapperHeight; + display.lastWrapWidth = update.wrapperWidth; + startWorker(cm, 400); + } + + display.updateLineNumbers = null; + + return true; + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport; + for (var first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport); + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + break; + } + if (!updateDisplayIfNeeded(cm, update)) break; + updateHeightsInViewport(cm); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + setDocumentHeight(cm, barMeasure); + updateScrollbars(cm, barMeasure); + } + + update.signal(cm, "update", cm); + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport); + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm); + postUpdateDisplay(cm, update); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + setDocumentHeight(cm, barMeasure); + updateScrollbars(cm, barMeasure); + update.finish(); + } + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px"; + var total = measure.docHeight + cm.display.barHeight; + cm.display.heightForcer.style.top = total + "px"; + cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + "px"; + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], height; + if (cur.hidden) continue; + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + } + var diff = cur.line.height - height; + if (height < 2) height = textHeight(display); + if (diff > .001 || diff < -.001) { + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) for (var j = 0; j < cur.rest.length; j++) + updateWidgetHeight(cur.rest[j]); + } + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; ++i) + line.widgets[i].height = line.widgets[i].node.offsetHeight; + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; + width[cm.options.gutters[i]] = n.clientWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth}; + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, lineNumbers = cm.options.lineNumbers; + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + node.style.display = "none"; + else + node.parentNode.removeChild(node); + return next; + } + + var view = display.view, lineN = display.viewFrom; + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (lineView.hidden) { + } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims); + container.insertBefore(node, cur); + } else { // Already drawn + while (cur != lineView.node) cur = rm(cur); + var updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber; + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false; + updateLineForChanges(cm, lineView, lineN, dims); + } + if (updateNumber) { + removeChildren(lineView.lineNumber); + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); + } + cur = lineView.node.nextSibling; + } + lineN += lineView.size; + } + while (cur) cur = rm(cur); + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") updateLineText(cm, lineView); + else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims); + else if (type == "class") updateLineClasses(lineView); + else if (type == "widget") updateLineWidgets(cm, lineView, dims); + } + lineView.changes = null; + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) + lineView.text.parentNode.replaceChild(lineView.node, lineView.text); + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) lineView.node.style.zIndex = 2; + } + return lineView.node; + } + + function updateLineBackground(lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) cls += " CodeMirror-linebackground"; + if (lineView.background) { + if (cls) lineView.background.className = cls; + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built; + } + return buildLineContent(cm, lineView); + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) lineView.node = built.pre; + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + + function updateLineClasses(lineView) { + updateLineBackground(lineView); + if (lineView.line.wrapClass) + ensureLineWrapped(lineView).className = lineView.line.wrapClass; + else if (lineView.node != lineView.text) + lineView.node.className = ""; + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + + "px; width: " + dims.gutterTotalWidth + "px"); + cm.display.input.setUneditable(gutterWrap); + wrap.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) + gutterWrap.className += " " + lineView.line.gutterClass; + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + + cm.display.lineNumInnerWidth + "px")); + if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { + var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; + if (found) + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); + } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) lineView.alignable = null; + for (var node = lineView.node.firstChild, next; node; node = next) { + var next = node.nextSibling; + if (node.className == "CodeMirror-linewidget") + lineView.node.removeChild(node); + } + insertLineWidgets(cm, lineView, dims); + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) lineView.bgClass = built.bgClass; + if (built.textClass) lineView.textClass = built.textClass; + + updateLineClasses(lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node; + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) return; + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); + if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true"); + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) + wrap.insertBefore(node, lineView.gutter || lineView.text); + else + wrap.appendChild(node); + signalLater(widget, "redraw"); + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; + } + } + + // POSITION OBJECT + + // A Pos instance represents a position within the text. + var Pos = CodeMirror.Pos = function(line, ch) { + if (!(this instanceof Pos)) return new Pos(line, ch); + this.line = line; this.ch = ch; + }; + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; }; + + function copyPos(x) {return Pos(x.line, x.ch);} + function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; } + function minPos(a, b) { return cmp(a, b) < 0 ? a : b; } + + // INPUT HANDLING + + function ensureFocus(cm) { + if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } + } + + function isReadOnly(cm) { + return cm.options.readOnly || cm.doc.cantEdit; + } + + // This will be set to an array of strings when copying, so that, + // when pasting, we know what kind of selections the copied text + // was made out of. + var lastCopied = null; + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc; + cm.display.shift = false; + if (!sel) sel = doc.sel; + + var paste = cm.state.pasteIncoming || origin == "paste"; + var textLines = splitLines(inserted), multiPaste = null; + // When pasing N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.join("\n") == inserted) + multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines); + else if (textLines.length == sel.ranges.length) + multiPaste = map(textLines, function(l) { return [l]; }); + } + + // Normal behavior is to insert the new text into every selection + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + var from = range.from(), to = range.to(); + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + from = Pos(from.line, from.ch - deleted); + else if (cm.state.overwrite && !paste) // Handle overwrite + to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); + } + var updateInput = cm.curOp.updateInput; + var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}; + makeChange(cm.doc, changeEvent); + signalLater(cm, "inputRead", cm, changeEvent); + } + if (inserted && !paste) + triggerElectric(cm, inserted); + + ensureCursorVisible(cm); + cm.curOp.updateInput = updateInput; + cm.curOp.typing = true; + cm.state.pasteIncoming = cm.state.cutIncoming = false; + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("text/plain"); + if (pasted) { + e.preventDefault(); + runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, "paste"); }); + return true; + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) return; + var sel = cm.doc.sel; + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue; + var mode = cm.getModeAt(range.head); + var indented = false; + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) + if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart"); + break; + } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + indented = indentLine(cm, range.head.line, "smart"); + } + if (indented) signalLater(cm, "electricInput", cm, range.head.line); + } + } + + function copyableRanges(cm) { + var text = [], ranges = []; + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line; + var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; + ranges.push(lineRange); + text.push(cm.getRange(lineRange.anchor, lineRange.head)); + } + return {text: text, ranges: ranges}; + } + + function disableBrowserMagic(field) { + field.setAttribute("autocorrect", "off"); + field.setAttribute("autocapitalize", "off"); + field.setAttribute("spellcheck", "false"); + } + + // TEXTAREA INPUT STYLE + + function TextareaInput(cm) { + this.cm = cm; + // See input.poll and input.reset + this.prevInput = ""; + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false; + // Self-resetting timeout for the poller + this.polling = new Delayed(); + // Tracks when input.reset has punted to just putting a short + // string into the textarea instead of the full selection. + this.inaccurateSelection = false; + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false; + this.composing = null; + }; + + function hiddenTextarea() { + var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none"); + var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) te.style.width = "1000px"; + else te.setAttribute("wrap", "off"); + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) te.style.border = "1px solid black"; + disableBrowserMagic(te); + return div; + } + + TextareaInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = this.cm; + + // Wraps and hides input textarea + var div = this.wrapper = hiddenTextarea(); + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + var te = this.textarea = div.firstChild; + display.wrapper.insertBefore(div, display.wrapper.firstChild); + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) te.style.width = "0px"; + + on(te, "input", function() { + if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null; + input.poll(); + }); + + on(te, "paste", function(e) { + if (handlePaste(e, cm)) return true; + + cm.state.pasteIncoming = true; + input.fastPoll(); + }); + + function prepareCopyCut(e) { + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (input.inaccurateSelection) { + input.prevInput = ""; + input.inaccurateSelection = false; + te.value = lastCopied.join("\n"); + selectInput(te); + } + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll); + } else { + input.prevInput = ""; + te.value = ranges.text.join("\n"); + selectInput(te); + } + } + if (e.type == "cut") cm.state.cutIncoming = true; + } + on(te, "cut", prepareCopyCut); + on(te, "copy", prepareCopyCut); + + on(display.scroller, "paste", function(e) { + if (eventInWidget(display, e)) return; + cm.state.pasteIncoming = true; + input.focus(); + }); + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function(e) { + if (!eventInWidget(display, e)) e_preventDefault(e); + }); + + on(te, "compositionstart", function() { + var start = cm.getCursor("from"); + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + }; + }); + on(te, "compositionend", function() { + if (input.composing) { + input.poll(); + input.composing.range.clear(); + input.composing = null; + } + }); + }, + + prepareSelection: function() { + // Redraw the selection and/or cursor + var cm = this.cm, display = cm.display, doc = cm.doc; + var result = prepareSelection(cm); + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); + var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)); + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)); + } + + return result; + }, + + showSelection: function(drawn) { + var cm = this.cm, display = cm.display; + removeChildrenAndAdd(display.cursorDiv, drawn.cursors); + removeChildrenAndAdd(display.selectionDiv, drawn.selection); + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px"; + this.wrapper.style.left = drawn.teLeft + "px"; + } + }, + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + reset: function(typing) { + if (this.contextMenuPending) return; + var minimal, selected, cm = this.cm, doc = cm.doc; + if (cm.somethingSelected()) { + this.prevInput = ""; + var range = doc.sel.primary(); + minimal = hasCopyEvent && + (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); + var content = minimal ? "-" : selected || cm.getSelection(); + this.textarea.value = content; + if (cm.state.focused) selectInput(this.textarea); + if (ie && ie_version >= 9) this.hasSelection = content; + } else if (!typing) { + this.prevInput = this.textarea.value = ""; + if (ie && ie_version >= 9) this.hasSelection = null; + } + this.inaccurateSelection = minimal; + }, + + getField: function() { return this.textarea; }, + + supportsTouch: function() { return false; }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { + try { this.textarea.focus(); } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + }, + + blur: function() { this.textarea.blur(); }, + + resetPosition: function() { + this.wrapper.style.top = this.wrapper.style.left = 0; + }, + + receivedFocus: function() { this.slowPoll(); }, + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + slowPoll: function() { + var input = this; + if (input.pollingFast) return; + input.polling.set(this.cm.options.pollInterval, function() { + input.poll(); + if (input.cm.state.focused) input.slowPoll(); + }); + }, + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + fastPoll: function() { + var missed = false, input = this; + input.pollingFast = true; + function p() { + var changed = input.poll(); + if (!changed && !missed) {missed = true; input.polling.set(60, p);} + else {input.pollingFast = false; input.slowPoll();} + } + input.polling.set(20, p); + }, + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + poll: function() { + var cm = this.cm, input = this.textarea, prevInput = this.prevInput; + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || !cm.state.focused || + (hasSelection(input) && !prevInput) || + isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq) + return false; + + var text = input.value; + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) return false; + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset(); + return false; + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0); + if (first == 0x200b && !prevInput) prevInput = "\u200b"; + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); } + } + // Find the part of the input that is actually new + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; + + var self = this; + runInOp(cm, function() { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, self.composing ? "*compose" : null); + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = ""; + else self.prevInput = text; + + if (self.composing) { + self.composing.range.clear(); + self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}); + } + }); + return true; + }, + + ensurePolled: function() { + if (this.pollingFast && this.poll()) this.pollingFast = false; + }, + + onKeyPress: function() { + if (ie && ie_version >= 9) this.hasSelection = null; + this.fastPoll(); + }, + + onContextMenu: function(e) { + var input = this, cm = input.cm, display = cm.display, te = input.textarea; + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || presto) return; // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && cm.doc.sel.contains(pos) == -1) + operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); + + var oldCSS = te.style.cssText; + input.wrapper.style.position = "absolute"; + te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + + "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " + + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + + "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712) + display.input.focus(); + if (webkit) window.scrollTo(null, oldScrollY); + display.input.reset(); + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) te.value = input.prevInput = " "; + input.contextMenuPending = true; + display.selForContextMenu = cm.doc.sel; + clearTimeout(display.detectingSelectAll); + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected(); + var extval = "\u200b" + (selected ? te.value : ""); + te.value = "\u21da"; // Used to catch context-menu undo + te.value = extval; + input.prevInput = selected ? "" : "\u200b"; + te.selectionStart = 1; te.selectionEnd = extval.length; + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel; + } + } + function rehide() { + input.contextMenuPending = false; + input.wrapper.style.position = "relative"; + te.style.cssText = oldCSS; + if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); + var i = 0, poll = function() { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") + operation(cm, commands.selectAll)(cm); + else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); + else display.input.reset(); + }; + display.detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && ie_version >= 9) prepareSelectAllHack(); + if (captureRightClick) { + e_stop(e); + var mouseup = function() { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + }, + + setUneditable: nothing, + + needsContentAttribute: false + }, TextareaInput.prototype); + + // CONTENTEDITABLE INPUT STYLE + + function ContentEditableInput(cm) { + this.cm = cm; + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; + this.polling = new Delayed(); + this.gracePeriod = false; + } + + ContentEditableInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = input.cm; + var div = input.div = display.lineDiv; + div.contentEditable = "true"; + disableBrowserMagic(div); + + on(div, "paste", function(e) { handlePaste(e, cm); }) + + on(div, "compositionstart", function(e) { + var data = e.data; + input.composing = {sel: cm.doc.sel, data: data, startData: data}; + if (!data) return; + var prim = cm.doc.sel.primary(); + var line = cm.getLine(prim.head.line); + var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length)); + if (found > -1 && found <= prim.head.ch) + input.composing.sel = simpleSelection(Pos(prim.head.line, found), + Pos(prim.head.line, found + data.length)); + }); + on(div, "compositionupdate", function(e) { + input.composing.data = e.data; + }); + on(div, "compositionend", function(e) { + var ours = input.composing; + if (!ours) return; + if (e.data != ours.startData && !/\u200b/.test(e.data)) + ours.data = e.data; + // Need a small delay to prevent other code (input event, + // selection polling) from doing damage when fired right after + // compositionend. + setTimeout(function() { + if (!ours.handled) + input.applyComposition(ours); + if (input.composing == ours) + input.composing = null; + }, 50); + }); + + on(div, "touchstart", function() { + input.forceCompositionEnd(); + }); + + on(div, "input", function() { + if (input.composing) return; + if (!input.pollContent()) + runInOp(input.cm, function() {regChange(cm);}); + }); + + function onCopyCut(e) { + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (e.type == "cut") cm.replaceSelection("", null, "cut"); + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.operation(function() { + cm.setSelections(ranges.ranges, 0, sel_dontScroll); + cm.replaceSelection("", null, "cut"); + }); + } + } + // iOS exposes the clipboard API, but seems to discard content inserted into it + if (e.clipboardData && !ios) { + e.preventDefault(); + e.clipboardData.clearData(); + e.clipboardData.setData("text/plain", lastCopied.join("\n")); + } else { + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), te = kludge.firstChild; + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); + te.value = lastCopied.join("\n"); + var hadFocus = document.activeElement; + selectInput(te); + setTimeout(function() { + cm.display.lineSpace.removeChild(kludge); + hadFocus.focus(); + }, 50); + } + } + on(div, "copy", onCopyCut); + on(div, "cut", onCopyCut); + }, + + prepareSelection: function() { + var result = prepareSelection(this.cm, false); + result.focus = this.cm.state.focused; + return result; + }, + + showSelection: function(info) { + if (!info || !this.cm.display.view.length) return; + if (info.focus) this.showPrimarySelection(); + this.showMultipleSelections(info); + }, + + showPrimarySelection: function() { + var sel = window.getSelection(), prim = this.cm.doc.sel.primary(); + var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset); + var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset); + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), prim.from()) == 0 && + cmp(maxPos(curAnchor, curFocus), prim.to()) == 0) + return; + + var start = posToDOM(this.cm, prim.from()); + var end = posToDOM(this.cm, prim.to()); + if (!start && !end) return; + + var view = this.cm.display.view; + var old = sel.rangeCount && sel.getRangeAt(0); + if (!start) { + start = {node: view[0].measure.map[2], offset: 0}; + } else if (!end) { // FIXME dangerously hacky + var measure = view[view.length - 1].measure; + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; + } + + try { var rng = range(start.node, start.offset, end.offset, end.node); } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + sel.removeAllRanges(); + sel.addRange(rng); + if (old && sel.anchorNode == null) sel.addRange(old); + else if (gecko) this.startGracePeriod(); + } + this.rememberSelection(); + }, + + startGracePeriod: function() { + var input = this; + clearTimeout(this.gracePeriod); + this.gracePeriod = setTimeout(function() { + input.gracePeriod = false; + if (input.selectionChanged()) + input.cm.operation(function() { input.cm.curOp.selectionChanged = true; }); + }, 20); + }, + + showMultipleSelections: function(info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); + }, + + rememberSelection: function() { + var sel = window.getSelection(); + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; + }, + + selectionInEditor: function() { + var sel = window.getSelection(); + if (!sel.rangeCount) return false; + var node = sel.getRangeAt(0).commonAncestorContainer; + return contains(this.div, node); + }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor") this.div.focus(); + }, + blur: function() { this.div.blur(); }, + getField: function() { return this.div; }, + + supportsTouch: function() { return true; }, + + receivedFocus: function() { + var input = this; + if (this.selectionInEditor()) + this.pollSelection(); + else + runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; }); + + function poll() { + if (input.cm.state.focused) { + input.pollSelection(); + input.polling.set(input.cm.options.pollInterval, poll); + } + } + this.polling.set(this.cm.options.pollInterval, poll); + }, + + selectionChanged: function() { + var sel = window.getSelection(); + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset; + }, + + pollSelection: function() { + if (!this.composing && !this.gracePeriod && this.selectionChanged()) { + var sel = window.getSelection(), cm = this.cm; + this.rememberSelection(); + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var head = domToPos(cm, sel.focusNode, sel.focusOffset); + if (anchor && head) runInOp(cm, function() { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); + if (anchor.bad || head.bad) cm.curOp.selectionChanged = true; + }); + } + }, + + pollContent: function() { + var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); + var from = sel.from(), to = sel.to(); + if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false; + + var fromIndex; + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + var fromLine = lineNo(display.view[0].line); + var fromNode = display.view[0].node; + } else { + var fromLine = lineNo(display.view[fromIndex].line); + var fromNode = display.view[fromIndex - 1].node.nextSibling; + } + var toIndex = findViewIndex(cm, to.line); + if (toIndex == display.view.length - 1) { + var toLine = display.viewTo - 1; + var toNode = display.lineDiv.lastChild; + } else { + var toLine = lineNo(display.view[toIndex + 1].line) - 1; + var toNode = display.view[toIndex + 1].node.previousSibling; + } + + var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); + var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } + else break; + } + + var cutFront = 0, cutEnd = 0; + var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + ++cutFront; + var newBot = lst(newText), oldBot = lst(oldText); + var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)); + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + ++cutEnd; + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd); + newText[0] = newText[0].slice(cutFront); + + var chFrom = Pos(fromLine, cutFront); + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input"); + return true; + } + }, + + ensurePolled: function() { + this.forceCompositionEnd(); + }, + reset: function() { + this.forceCompositionEnd(); + }, + forceCompositionEnd: function() { + if (!this.composing || this.composing.handled) return; + this.applyComposition(this.composing); + this.composing.handled = true; + this.div.blur(); + this.div.focus(); + }, + applyComposition: function(composing) { + if (composing.data && composing.data != composing.startData) + operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel); + }, + + setUneditable: function(node) { + node.setAttribute("contenteditable", "false"); + }, + + onKeyPress: function(e) { + e.preventDefault(); + operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); + }, + + onContextMenu: nothing, + resetPosition: nothing, + + needsContentAttribute: true + }, ContentEditableInput.prototype); + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line); + if (!view || view.hidden) return null; + var line = getLine(cm.doc, pos.line); + var info = mapFromLineView(view, line, pos.line); + + var order = getOrder(line), side = "left"; + if (order) { + var partPos = getBidiPartAt(order, pos.ch); + side = partPos % 2 ? "right" : "left"; + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); + result.offset = result.collapse == "right" ? result.end : result.start; + return result; + } + + function badPos(pos, bad) { if (bad) pos.bad = true; return pos; } + + function domToPos(cm, node, offset) { + var lineNode; + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset]; + if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true); + node = null; offset = 0; + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) return null; + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break; + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i]; + if (lineView.node == lineNode) + return locateNodeInLineView(lineView, node, offset); + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, bad = false; + if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true); + if (node == wrapper) { + bad = true; + node = wrapper.childNodes[offset]; + offset = 0; + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line; + return badPos(Pos(lineNo(line), line.text.length), bad); + } + } + + var textNode = node.nodeType == 3 ? node : null, topNode = node; + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild; + if (offset) offset = textNode.nodeValue.length; + } + while (topNode.parentNode != wrapper) topNode = topNode.parentNode; + var measure = lineView.measure, maps = measure.maps; + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i]; + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2]; + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); + var ch = map[j] + offset; + if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)]; + return Pos(line, ch); + } + } + } + } + var found = find(textNode, topNode, offset); + if (found) return badPos(found, bad); + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0); + if (found) + return badPos(Pos(found.line, found.ch - dist), bad); + else + dist += after.textContent.length; + } + for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1); + if (found) + return badPos(Pos(found.line, found.ch + dist), bad); + else + dist += after.textContent.length; + } + } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", closing = false; + function recognizeMarker(id) { return function(marker) { return marker.id == id; }; } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text"); + if (cmText != null) { + if (cmText == "") cmText = node.textContent.replace(/\u200b/g, ""); + text += cmText; + return; + } + var markerID = node.getAttribute("cm-marker"), range; + if (markerID) { + var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); + if (found.length && (range = found[0].find())) + text += getBetween(cm.doc, range.from, range.to).join("\n"); + return; + } + if (node.getAttribute("contenteditable") == "false") return; + for (var i = 0; i < node.childNodes.length; i++) + walk(node.childNodes[i]); + if (/^(pre|div|p)$/i.test(node.nodeName)) + closing = true; + } else if (node.nodeType == 3) { + var val = node.nodeValue; + if (!val) return; + if (closing) { + text += "\n"; + closing = false; + } + text += val; + } + } + for (;;) { + walk(from); + if (from == to) break; + from = from.nextSibling; + } + return text; + } + + CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; + + // SELECTION / CURSOR + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + function Selection(ranges, primIndex) { + this.ranges = ranges; + this.primIndex = primIndex; + } + + Selection.prototype = { + primary: function() { return this.ranges[this.primIndex]; }, + equals: function(other) { + if (other == this) return true; + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false; + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], there = other.ranges[i]; + if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false; + } + return true; + }, + deepCopy: function() { + for (var out = [], i = 0; i < this.ranges.length; i++) + out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); + return new Selection(out, this.primIndex); + }, + somethingSelected: function() { + for (var i = 0; i < this.ranges.length; i++) + if (!this.ranges[i].empty()) return true; + return false; + }, + contains: function(pos, end) { + if (!end) end = pos; + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i]; + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + return i; + } + return -1; + } + }; + + function Range(anchor, head) { + this.anchor = anchor; this.head = head; + } + + Range.prototype = { + from: function() { return minPos(this.anchor, this.head); }, + to: function() { return maxPos(this.anchor, this.head); }, + empty: function() { + return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; + } + }; + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(ranges, primIndex) { + var prim = ranges[primIndex]; + ranges.sort(function(a, b) { return cmp(a.from(), b.from()); }); + primIndex = indexOf(ranges, prim); + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], prev = ranges[i - 1]; + if (cmp(prev.to(), cur.from()) >= 0) { + var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; + if (i <= primIndex) --primIndex; + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); + } + } + return new Selection(ranges, primIndex); + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0); + } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} + function clipPos(doc, pos) { + if (pos.line < doc.first) return Pos(doc.first, 0); + var last = doc.first + doc.size - 1; + if (pos.line > last) return Pos(last, getLine(doc, last).text.length); + return clipToLen(pos, getLine(doc, pos.line).text.length); + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) return Pos(pos.line, linelen); + else if (ch < 0) return Pos(pos.line, 0); + else return pos; + } + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} + function clipPosArray(doc, array) { + for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]); + return out; + } + + // SELECTION UPDATES + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(doc, range, head, other) { + if (doc.cm && doc.cm.display.shift || doc.extend) { + var anchor = range.anchor; + if (other) { + var posBefore = cmp(head, anchor) < 0; + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head; + head = other; + } else if (posBefore != (cmp(head, other) < 0)) { + head = other; + } + } + return new Range(anchor, head); + } else { + return new Range(other || head, head); + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options) { + setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options); + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + for (var out = [], i = 0; i < doc.sel.ranges.length; i++) + out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); + var newSel = normalizeSelection(out, doc.sel.primIndex); + setSelection(doc, newSel, options); + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0); + ranges[i] = range; + setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options); + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options); + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = []; + for (var i = 0; i < ranges.length; i++) + this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)); + } + }; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); + if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1); + else return sel; + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, last = lst(done); + if (last && last.ranges) { + done[done.length - 1] = sel; + setSelectionNoUndo(doc, sel, options); + } else { + setSelection(doc, sel, options); + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options); + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); + } + + function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + sel = filterSelectionChange(doc, sel); + + var bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); + + if (!(options && options.scroll === false) && doc.cm) + ensureCursorVisible(doc.cm); + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) return; + + doc.sel = sel; + + if (doc.cm) { + doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true; + signalCursorActivity(doc.cm); + } + signalLater(doc, "cursorActivity", doc); + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear); + var newHead = skipAtomic(doc, range.head, bias, mayClear); + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) out = sel.ranges.slice(0, i); + out[i] = new Range(newAnchor, newHead); + } + } + return out ? normalizeSelection(out, sel.primIndex) : sel; + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, bias, mayClear) { + var flipped = false, curPos = pos; + var dir = bias || 1; + doc.cantEdit = false; + search: for (;;) { + var line = getLine(doc, curPos.line); + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && + (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) break; + else {--i; continue;} + } + } + if (!m.atomic) continue; + var newPos = m.find(dir < 0 ? -1 : 1); + if (cmp(newPos, curPos) == 0) { + newPos.ch += dir; + if (newPos.ch < 0) { + if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); + else newPos = null; + } else if (newPos.ch > line.text.length) { + if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); + else newPos = null; + } + if (!newPos) { + if (flipped) { + // Driven in a corner -- no valid cursor position found at all + // -- try again *with* clearing, if we didn't already + if (!mayClear) return skipAtomic(doc, pos, bias, true); + // Otherwise, turn off editing until further notice, and return the start of the doc + doc.cantEdit = true; + return Pos(doc.first, 0); + } + flipped = true; newPos = pos; dir = -dir; + } + } + curPos = newPos; + continue search; + } + } + } + return curPos; + } + } + + // SELECTION DRAWING + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); + } + + function prepareSelection(cm, primary) { + var doc = cm.doc, result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (primary === false && i == doc.sel.primIndex) continue; + var range = doc.sel.ranges[i]; + var collapsed = range.empty(); + if (collapsed || cm.options.showCursorWhenSelecting) + drawSelectionCursor(cm, range, curFragment); + if (!collapsed) + drawSelectionRange(cm, range, selFragment); + } + return result; + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, range, output) { + var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine); + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + + function add(left, top, width, bottom) { + if (top < 0) top = 0; + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + + "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + + "px; height: " + (bottom - top) + "px")); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias); + } + + iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { + var leftPos = coords(from, "left"), rightPos, left, right; + if (from == to) { + rightPos = leftPos; + left = right = leftPos.left; + } else { + rightPos = coords(to - 1, "right"); + if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } + left = leftPos.left; + right = rightPos.right; + } + if (fromArg == null && from == 0) left = leftSide; + if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part + add(left, leftPos.top, null, leftPos.bottom); + left = leftSide; + if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); + } + if (toArg == null && to == lineLen) right = rightSide; + if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) + start = leftPos; + if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) + end = rightPos; + if (left < leftSide + 1) left = leftSide; + add(left, rightPos.top, right - left, rightPos.bottom); + }); + return {start: start, end: end}; + } + + var sFrom = range.from(), sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + add(leftSide, leftEnd.bottom, null, rightStart.top); + } + + output.appendChild(fragment); + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) return; + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + display.blinker = setInterval(function() { + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); + else if (cm.options.cursorBlinkRate < 0) + display.cursorDiv.style.visibility = "hidden"; + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo) + cm.state.highlight.set(time, bind(highlightWorker, cm)); + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.frontier < doc.first) doc.frontier = doc.first; + if (doc.frontier >= cm.display.viewTo) return; + var end = +new Date + cm.options.workTime; + var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); + var changedLines = []; + + doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) { + if (doc.frontier >= cm.display.viewFrom) { // Visible + var oldStyles = line.styles; + var highlighted = highlightLine(cm, line, state, true); + line.styles = highlighted.styles; + var oldCls = line.styleClasses, newCls = highlighted.classes; + if (newCls) line.styleClasses = newCls; + else if (oldCls) line.styleClasses = null; + var ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); + for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; + if (ischange) changedLines.push(doc.frontier); + line.stateAfter = copyState(doc.mode, state); + } else { + processLine(cm, line.text, state); + line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; + } + ++doc.frontier; + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true; + } + }); + if (changedLines.length) runInOp(cm, function() { + for (var i = 0; i < changedLines.length; i++) + regLineChange(cm, changedLines[i], "text"); + }); + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) return doc.first; + var line = getLine(doc, search - 1); + if (line.stateAfter && (!precise || search <= doc.frontier)) return search; + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + + function getStateBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) return true; + var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; + if (!state) state = startState(doc.mode); + else state = copyState(doc.mode, state); + doc.iter(pos, n, function(line) { + processLine(cm, line.text, state); + var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo; + line.stateAfter = save ? copyState(doc.mode, state) : null; + ++pos; + }); + if (precise) doc.frontier = pos; + return state; + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop;} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} + function paddingH(display) { + if (display.cachedPaddingH) return display.cachedPaddingH; + var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; + if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data; + return data; + } + + function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) + heights.push((cur.bottom + next.top) / 2 - rect.top); + } + } + heights.push(rect.bottom - rect.top); + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + return {map: lineView.measure.map, cache: lineView.measure.cache}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineView.rest[i] == line) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineNo(lineView.rest[i]) > lineN) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true}; + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view; + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + return cm.display.view[findViewIndex(cm, lineN)]; + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + return ext; + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) + view = null; + else if (view && view.changes) + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + if (!view) + view = updateExternalMeasurement(cm, line); + + var info = mapFromLineView(view, line, lineN); + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + }; + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) ch = -1; + var key = ch + (bias || ""), found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; + } else { + if (!prepared.rect) + prepared.rect = prepared.view.text.getBoundingClientRect(); + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) prepared.cache[key] = found; + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom}; + } + + var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + var mStart = map[i], mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) collapse = "right"; + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + collapse = bias; + if (bias == "left" && start == 0) + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } + if (bias == "right" && start == mEnd - mStart) + while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } + break; + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}; + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, start = place.start, end = place.end, collapse = place.collapse; + + var rect; + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start; + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end; + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { + rect = node.parentNode.getBoundingClientRect(); + } else if (ie && cm.options.lineWrapping) { + var rects = range(node, start, end).getClientRects(); + if (rects.length) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = nullRect; + } else { + rect = range(node, start, end).getBoundingClientRect() || nullRect; + } + if (rect.left || rect.right || start == 0) break; + end = start; + start = start - 1; + collapse = "right"; + } + if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect); + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) collapse = bias = "right"; + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = node.getBoundingClientRect(); + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) + rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; + else + rect = nullRect; + } + + var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + for (var i = 0; i < heights.length - 1; i++) + if (mid < heights[i]) break; + var top = i ? heights[i - 1] : 0, bot = heights[i]; + var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot}; + if (!rect.left && !rect.right) result.bogus = true; + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } + + return result; + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + return rect; + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY}; + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + lineView.measure.caches[i] = {}; + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) + clearLineMeasurementCacheFor(cm.display.view[i]); + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; + cm.display.lineNumChars = null; + } + + function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } + function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"/null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context) { + if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { + var size = widgetHeight(lineObj.widgets[i]); + rect.top += size; rect.bottom += size; + } + if (context == "line") return rect; + if (!context) context = "local"; + var yOff = heightAtLine(lineObj); + if (context == "local") yOff += paddingTop(cm.display); + else yOff -= cm.display.viewOffset; + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect; + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"/null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") return coords; + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) lineObj = getLine(cm.doc, pos.line); + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj); + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) m.left = m.right; else m.right = m.left; + return intoCoordSystem(cm, lineObj, m, context); + } + function getBidi(ch, partPos) { + var part = order[partPos], right = part.level % 2; + if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { + part = order[--partPos]; + ch = bidiRight(part) - (part.level % 2 ? 0 : 1); + right = true; + } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { + part = order[++partPos]; + ch = bidiLeft(part) - part.level % 2; + right = false; + } + if (right && ch == part.to && ch > part.from) return get(ch - 1); + return get(ch, right); + } + var order = getOrder(lineObj), ch = pos.ch; + if (!order) return get(ch); + var partPos = getBidiPartAt(order, ch); + var val = getBidi(ch, partPos); + if (bidiOther != null) val.other = getBidi(ch, bidiOther); + return val; + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0, pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch; + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return {left: left, right: left, top: top, bottom: top + lineObj.height}; + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, outside, xRel) { + var pos = Pos(line, ch); + pos.xRel = xRel; + if (outside) pos.outside = true; + return pos; + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) return PosWithInfo(doc.first, 0, true, -1); + var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineN > last) + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); + if (x < 0) x = 0; + + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var merged = collapsedSpanAtEnd(lineObj); + var mergedPos = merged && merged.find(0, true); + if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) + lineN = lineNo(lineObj = mergedPos.to.line); + else + return found; + } + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + var innerOff = y - heightAtLine(lineObj); + var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + + function getX(ch) { + var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure); + wrongLine = true; + if (innerOff > sp.bottom) return sp.left - adjust; + else if (innerOff < sp.top) return sp.left + adjust; + else wrongLine = false; + return sp.left; + } + + var bidi = getOrder(lineObj), dist = lineObj.text.length; + var from = lineLeft(lineObj), to = lineRight(lineObj); + var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; + + if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); + // Do a binary search between these bounds. + for (;;) { + if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { + var ch = x < fromX || x - fromX <= toX - x ? from : to; + var xDiff = x - (ch == from ? fromX : toX); + while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; + var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, + xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); + return pos; + } + var step = Math.ceil(dist / 2), middle = from + step; + if (bidi) { + middle = from; + for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); + } + var middleX = getX(middle); + if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} + else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} + } + } + + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight; + if (measureText == null) { + measureText = elt("pre"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) display.cachedTextHeight = height; + removeChildren(display.measure); + return height || 1; + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth; + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor]); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; + if (width > 2) display.cachedCharWidth = width; + return width || 10; + } + + // OPERATIONS + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var operationGroup = null; + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: null, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId // Unique ID + }; + if (operationGroup) { + operationGroup.ops.push(cm.curOp); + } else { + cm.curOp.ownsGroup = operationGroup = { + ops: [cm.curOp], + delayedCallbacks: [] + }; + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, i = 0; + do { + for (; i < callbacks.length; i++) + callbacks[i](); + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm); + } + } while (i < callbacks.length); + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp, group = op.ownsGroup; + if (!group) return; + + try { fireCallbacksForOps(group); } + finally { + operationGroup = null; + for (var i = 0; i < group.ops.length; i++) + group.ops[i].cm.curOp = null; + endOperations(group); + } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R1(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W1(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R2(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W2(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_finish(ops[i]); + } + + function endOperation_R1(op) { + var cm = op.cm, display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) findMaxLine(cm); + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + + function endOperation_R2(op) { + var cm = op.cm, display = cm.display; + if (op.updatedDisplay) updateHeightsInViewport(cm); + + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + + if (op.updatedDisplay || op.selectionChanged) + op.preparedSelection = display.input.prepareSelection(); + } + + function endOperation_W2(op) { + var cm = op.cm; + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); + cm.display.maxLineChanged = false; + } + + if (op.preparedSelection) + cm.display.input.showSelection(op.preparedSelection); + if (op.updatedDisplay) + setDocumentHeight(cm, op.barMeasure); + if (op.updatedDisplay || op.startHeight != cm.doc.height) + updateScrollbars(cm, op.barMeasure); + + if (op.selectionChanged) restartBlink(cm); + + if (cm.state.focused && op.updateInput) + cm.display.input.reset(op.typing); + if (op.focus && op.focus == activeElt()) ensureFocus(op.cm); + } + + function endOperation_finish(op) { + var cm = op.cm, display = cm.display, doc = cm.doc; + + if (op.updatedDisplay) postUpdateDisplay(cm, op.update); + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + display.wheelStartX = display.wheelStartY = null; + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { + doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); + display.scrollbars.setScrollTop(doc.scrollTop); + display.scroller.scrollTop = doc.scrollTop; + } + if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { + doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft)); + display.scrollbars.setScrollLeft(doc.scrollLeft); + display.scroller.scrollLeft = doc.scrollLeft; + alignHorizontally(cm); + } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) for (var i = 0; i < hidden.length; ++i) + if (!hidden[i].lines.length) signal(hidden[i], "hide"); + if (unhidden) for (var i = 0; i < unhidden.length; ++i) + if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); + + if (display.wrapper.offsetHeight) + doc.scrollTop = cm.display.scroller.scrollTop; + + // Fire change events, and delayed event handlers + if (op.changeObjs) + signal(cm, "changes", cm, op.changeObjs); + if (op.update) + op.update.finish(); + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) return f(); + startOperation(cm); + try { return f(); } + finally { endOperation(cm); } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) return f.apply(cm, arguments); + startOperation(cm); + try { return f.apply(cm, arguments); } + finally { endOperation(cm); } + }; + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) return f.apply(this, arguments); + startOperation(this); + try { return f.apply(this, arguments); } + finally { endOperation(this); } + }; + } + function docMethodOp(f) { + return function() { + var cm = this.cm; + if (!cm || cm.curOp) return f.apply(this, arguments); + startOperation(cm); + try { return f.apply(this, arguments); } + finally { endOperation(cm); } + }; + } + + // VIEW TRACKING + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array; + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) from = cm.doc.first; + if (to == null) to = cm.doc.first + cm.doc.size; + if (!lendiff) lendiff = 0; + + var display = cm.display; + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + display.updateLineNumbers = from; + + cm.curOp.viewChanged = true; + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + resetView(cm); + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { // Bottom overlap + var cut = viewCuttingPoint(cm, from, from, -1); + if (cut) { + display.view = display.view.slice(0, cut.index); + display.viewTo = cut.lineN; + } else { + resetView(cm); + } + } else { // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) + ext.lineN += lendiff; + else if (from < ext.lineN + ext.size) + display.externalMeasured = null; + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + display.externalMeasured = null; + + if (line < display.viewFrom || line >= display.viewTo) return; + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) return; + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) arr.push(type); + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) return null; + n -= cm.display.viewFrom; + if (n < 0) return null; + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) return i; + } + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), diff, view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + return {index: index, lineN: newN}; + for (var i = 0, n = cm.display.viewFrom; i < index; i++) + n += view[i].size; + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) return null; + diff = (n + view[index].size) - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; newN += diff; + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) return null; + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return {index: index, lineN: newN}; + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); + else if (display.viewFrom < from) + display.view = display.view.slice(findViewIndex(cm, from)); + display.viewFrom = from; + if (display.viewTo < to) + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); + else if (display.viewTo > to) + display.view = display.view.slice(0, findViewIndex(cm, to)); + } + display.viewTo = to; + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty; + } + return dirty; + } + + // EVENT HANDLERS + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + on(d.scroller, "dblclick", operation(cm, function(e) { + if (signalDOMEvent(cm, e)) return; + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; + e_preventDefault(e); + var word = cm.findWordAt(pos); + extendSelection(cm.doc, word.anchor, word.head); + })); + else + on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); + + // Used to suppress mouse event handling when a touch happens + var touchFinished, prevTouch = {end: 0}; + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000); + prevTouch = d.activeTouch; + prevTouch.end = +new Date; + } + }; + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) return false; + var touch = e.touches[0]; + return touch.radiusX <= 1 && touch.radiusY <= 1; + } + function farAway(touch, other) { + if (other.left == null) return true; + var dx = other.left - touch.left, dy = other.top - touch.top; + return dx * dx + dy * dy > 20 * 20; + } + on(d.scroller, "touchstart", function(e) { + if (!isMouseLikeTouchEvent(e)) { + clearTimeout(touchFinished); + var now = +new Date; + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null}; + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX; + d.activeTouch.top = e.touches[0].pageY; + } + } + }); + on(d.scroller, "touchmove", function() { + if (d.activeTouch) d.activeTouch.moved = true; + }); + on(d.scroller, "touchend", function(e) { + var touch = d.activeTouch; + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + var pos = cm.coordsChar(d.activeTouch, "page"), range; + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + range = new Range(pos, pos); + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + range = cm.findWordAt(pos); + else // Triple tap + range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); + cm.setSelection(range.anchor, range.head); + cm.focus(); + e_preventDefault(e); + } + finishTouch(); + }); + on(d.scroller, "touchcancel", finishTouch); + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function() { + if (d.scroller.clientHeight) { + setScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); + on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + d.dragFunctions = { + simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);}, + start: function(e){onDragStart(cm, e);}, + drop: operation(cm, onDrop) + }; + + var inp = d.input.getField(); + on(inp, "keyup", function(e) { onKeyUp.call(cm, e); }); + on(inp, "keydown", operation(cm, onKeyDown)); + on(inp, "keypress", operation(cm, onKeyPress)); + on(inp, "focus", bind(onFocus, cm)); + on(inp, "blur", bind(onBlur, cm)); + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != CodeMirror.Init; + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions; + var toggle = value ? on : off; + toggle(cm.display.scroller, "dragstart", funcs.start); + toggle(cm.display.scroller, "dragenter", funcs.simple); + toggle(cm.display.scroller, "dragover", funcs.simple); + toggle(cm.display.scroller, "drop", funcs.drop); + } + } + + // Called when the window resizes + function onResize(cm) { + var d = cm.display; + if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth) + return; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + d.scrollbarsClipped = false; + cm.setSize(); + } + + // MOUSE EVENTS + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + return true; + } + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null; + + var x, y, space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top; } + catch (e) { return null; } + var coords = coordsChar(cm, x, y), line; + if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords; + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, display = cm.display; + if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return; + display.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false; + setTimeout(function(){display.scroller.draggable = true;}, 100); + } + return; + } + if (clickInGutter(cm, e)) return; + var start = posFromMouse(cm, e); + window.focus(); + + switch (e_button(e)) { + case 1: + if (start) + leftButtonDown(cm, e, start); + else if (e_target(e) == display.scroller) + e_preventDefault(e); + break; + case 2: + if (webkit) cm.state.lastMiddleDown = +new Date; + if (start) extendSelection(cm.doc, start); + setTimeout(function() {display.input.focus();}, 20); + e_preventDefault(e); + break; + case 3: + if (captureRightClick) onContextMenu(cm, e); + else delayBlurEvent(cm); + break; + } + } + + var lastClick, lastDoubleClick; + function leftButtonDown(cm, e, start) { + if (ie) setTimeout(bind(ensureFocus, cm), 0); + else cm.curOp.focus = activeElt(); + + var now = +new Date, type; + if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) { + type = "triple"; + } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) { + type = "double"; + lastDoubleClick = {time: now, pos: start}; + } else { + type = "single"; + lastClick = {time: now, pos: start}; + } + + var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; + if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && + type == "single" && (contained = sel.contains(start)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) && + (cmp(contained.to(), start) > 0 || start.xRel < 0)) + leftButtonStartDrag(cm, e, start, modifier); + else + leftButtonSelect(cm, e, start, type, modifier); + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, e, start, modifier) { + var display = cm.display, startTime = +new Date; + var dragEnd = operation(cm, function(e2) { + if (webkit) display.scroller.draggable = false; + cm.state.draggingText = false; + off(document, "mouseup", dragEnd); + off(display.scroller, "drop", dragEnd); + if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { + e_preventDefault(e2); + if (!modifier && +new Date - 200 < startTime) + extendSelection(cm.doc, start); + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if (webkit || ie && ie_version == 9) + setTimeout(function() {document.body.focus(); display.input.focus();}, 20); + else + display.input.focus(); + } + }); + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true; + cm.state.draggingText = dragEnd; + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop(); + on(document, "mouseup", dragEnd); + on(display.scroller, "drop", dragEnd); + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, e, start, type, addNew) { + var display = cm.display, doc = cm.doc; + e_preventDefault(e); + + var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; + if (addNew && !e.shiftKey) { + ourIndex = doc.sel.contains(start); + if (ourIndex > -1) + ourRange = ranges[ourIndex]; + else + ourRange = new Range(start, start); + } else { + ourRange = doc.sel.primary(); + ourIndex = doc.sel.primIndex; + } + + if (e.altKey) { + type = "rect"; + if (!addNew) ourRange = new Range(start, start); + start = posFromMouse(cm, e, true, true); + ourIndex = -1; + } else if (type == "double") { + var word = cm.findWordAt(start); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, word.anchor, word.head); + else + ourRange = word; + } else if (type == "triple") { + var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0))); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, line.anchor, line.head); + else + ourRange = line; + } else { + ourRange = extendRange(doc, ourRange, start); + } + + if (!addNew) { + ourIndex = 0; + setSelection(doc, new Selection([ourRange], 0), sel_mouse); + startSel = doc.sel; + } else if (ourIndex == -1) { + ourIndex = ranges.length; + setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}); + } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) { + setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0)); + startSel = doc.sel; + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); + } + + var lastPos = start; + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) return; + lastPos = pos; + + if (type == "rect") { + var ranges = [], tabSize = cm.options.tabSize; + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); + var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); + for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); + if (left == right) + ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); + else if (text.length > leftPos) + ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); + } + if (!ranges.length) ranges.push(new Range(start, start)); + setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}); + cm.scrollIntoView(pos); + } else { + var oldRange = ourRange; + var anchor = oldRange.anchor, head = pos; + if (type != "single") { + if (type == "double") + var range = cm.findWordAt(pos); + else + var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); + if (cmp(range.anchor, anchor) > 0) { + head = range.head; + anchor = minPos(oldRange.from(), range.anchor); + } else { + head = range.anchor; + anchor = maxPos(oldRange.to(), range.head); + } + } + var ranges = startSel.ranges.slice(0); + ranges[ourIndex] = new Range(clipPos(doc, anchor), head); + setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse); + } + } + + var editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true, type == "rect"); + if (!cur) return; + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(); + extendTo(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) setTimeout(operation(cm, function() { + if (counter != curCount) return; + display.scroller.scrollTop += outside; + extend(e); + }), 50); + } + } + + function done(e) { + counter = Infinity; + e_preventDefault(e); + display.input.focus(); + off(document, "mousemove", move); + off(document, "mouseup", up); + doc.history.lastSelOrigin = null; + } + + var move = operation(cm, function(e) { + if (!e_button(e)) done(e); + else extend(e); + }); + var up = operation(cm, done); + on(document, "mousemove", move); + on(document, "mouseup", up); + } + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent, signalfn) { + try { var mX = e.clientX, mY = e.clientY; } + catch(e) { return false; } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false; + if (prevent) e_preventDefault(e); + + var display = cm.display; + var lineBox = display.lineDiv.getBoundingClientRect(); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.options.gutters.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.options.gutters[i]; + signalfn(cm, type, cm, line, gutter, e); + return e_defaultPrevented(e); + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true, signalLater); + } + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + return; + e_preventDefault(e); + if (ie) lastDrop = +new Date; + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || isReadOnly(cm)) return; + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var loadFile = function(file, i) { + var reader = new FileReader; + reader.onload = operation(cm, function() { + text[i] = reader.result; + if (++read == n) { + pos = clipPos(cm.doc, pos); + var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}; + makeChange(cm.doc, change); + setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); + } + }); + reader.readAsText(file); + }; + for (var i = 0; i < n; ++i) loadFile(files[i], i); + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(function() {cm.display.input.focus();}, 20); + return; + } + try { + var text = e.dataTransfer.getData("Text"); + if (text) { + if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) + var selected = cm.listSelections(); + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); + if (selected) for (var i = 0; i < selected.length; ++i) + replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); + cm.replaceSelection(text, "around", "paste"); + cm.display.input.focus(); + } + } + catch(e){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; + + e.dataTransfer.setData("Text", cm.getSelection()); + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (presto) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (presto) img.parentNode.removeChild(img); + } + } + + // SCROLL EVENTS + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function setScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) return; + cm.doc.scrollTop = val; + if (!gecko) updateDisplaySimple(cm, {top: val}); + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (gecko) updateDisplaySimple(cm); + startWorker(cm, 100); + } + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller) { + if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; + val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; + cm.display.scrollbars.setScrollLeft(val); + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) wheelPixelsPerUnit = -.53; + else if (gecko) wheelPixelsPerUnit = 15; + else if (chrome) wheelPixelsPerUnit = -.7; + else if (safari) wheelPixelsPerUnit = -1/3; + + var wheelEventDelta = function(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; + else if (dy == null) dy = e.wheelDelta; + return {x: dx, y: dy}; + }; + CodeMirror.wheelEventPixels = function(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta; + }; + + function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + if (!(dx && scroll.scrollWidth > scroll.clientWidth || + dy && scroll.scrollHeight > scroll.clientHeight)) return; + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer; + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy) + setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); + setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); + e_preventDefault(e); + display.wheelStartX = null; // Abort measurement, if in progress + return; + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) top = Math.max(0, top + pixels - 50); + else bot = Math.min(cm.doc.height, bot + pixels + 50); + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function() { + if (display.wheelStartX == null) return; + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) return; + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + // KEY EVENTS + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) return false; + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled(); + var prevShift = cm.display.shift, done = false; + try { + if (isReadOnly(cm)) cm.state.suppressEdits = true; + if (dropShift) cm.display.shift = false; + done = bound(cm) != Pass; + } finally { + cm.display.shift = prevShift; + cm.state.suppressEdits = false; + } + return done; + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); + if (result) return result; + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm); + } + + var stopSeq = new Delayed; + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq; + if (seq) { + if (isModifierKey(name)) return "handled"; + stopSeq.set(50, function() { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null; + cm.display.input.reset(); + } + }); + name = seq + " " + name; + } + var result = lookupKeyForEditor(cm, name, handle); + + if (result == "multi") + cm.state.keySeq = name; + if (result == "handled") + signalLater(cm, "keyHandled", cm, name, e); + + if (result == "handled" || result == "multi") { + e_preventDefault(e); + restartBlink(cm); + } + + if (seq && !result && /\'$/.test(name)) { + e_preventDefault(e); + return true; + } + return !!result; + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true); + if (!name) return false; + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);}) + || dispatchKey(cm, name, e, function(b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + return doHandleBinding(cm, b); + }); + } else { + return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); }); + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, + function(b) { return doHandleBinding(cm, b, true); }); + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + cm.curOp.focus = activeElt(); + if (signalDOMEvent(cm, e)) return; + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; + var code = e.keyCode; + cm.display.shift = code == 16 || e.shiftKey; + var handled = handleKeyBinding(cm, e); + if (presto) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + cm.replaceSelection("", null, "cut"); + } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + showCrossHair(cm); + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv; + addClass(lineDiv, "CodeMirror-crosshair"); + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair"); + off(document, "keyup", up); + off(document, "mouseover", up); + } + } + on(document, "keyup", up); + on(document, "mouseover", up); + } + + function onKeyUp(e) { + if (e.keyCode == 16) this.doc.sel.shift = false; + signalDOMEvent(this, e); + } + + function onKeyPress(e) { + var cm = this; + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return; + var keyCode = e.keyCode, charCode = e.charCode; + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return; + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + if (handleCharBinding(cm, e, ch)) return; + cm.display.input.onKeyPress(e); + } + + // FOCUS/BLUR EVENTS + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function() { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + onBlur(cm); + } + }, 100); + } + + function onFocus(cm) { + if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false; + + if (cm.options.readOnly == "nocursor") return; + if (!cm.state.focused) { + signal(cm, "focus", cm); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm) { + if (cm.state.delayingBlurEvent) return; + + if (cm.state.focused) { + signal(cm, "blur", cm); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150); + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return; + cm.display.input.onContextMenu(e); + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) return false; + return gutterEvent(cm, e, "gutterContextMenu", false, signal); + } + + // UPDATING + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + var changeEnd = CodeMirror.changeEnd = function(change) { + if (!change.text) return change.to; + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); + }; + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) return pos; + if (cmp(pos, change.to) <= 0) return changeEnd(change); + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; + return Pos(line, ch); + } + + function computeSelAfterChange(doc, change) { + var out = []; + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))); + } + return normalizeSelection(out, doc.sel.primIndex); + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) + return Pos(nw.line, pos.ch - old.ch + nw.ch); + else + return Pos(nw.line + (pos.line - old.line), pos.ch); + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = []; + var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + var from = offsetPos(change.from, oldPrev, newPrev); + var to = offsetPos(changeEnd(change), oldPrev, newPrev); + oldPrev = change.to; + newPrev = to; + if (hint == "around") { + var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; + out[i] = new Range(inv ? to : from, inv ? from : to); + } else { + out[i] = new Range(from, from); + } + } + return new Selection(out, doc.sel.primIndex); + } + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function() { this.canceled = true; } + }; + if (update) obj.update = function(from, to, text, origin) { + if (from) this.from = clipPos(doc, from); + if (to) this.to = clipPos(doc, to); + if (text) this.text = text; + if (origin !== undefined) this.origin = origin; + }; + signal(doc, "beforeChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); + + if (obj.canceled) return null; + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly); + if (doc.cm.state.suppressEdits) return; + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) return; + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 0; --i) + makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); + } else { + makeChangeInner(doc, change); + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return; + var selAfter = computeSelAfterChange(doc, change); + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + if (doc.cm && doc.cm.state.suppressEdits) return; + + var hist = doc.history, event, selAfter = doc.sel; + var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + for (var i = 0; i < source.length; i++) { + event = source[i]; + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + break; + } + if (i == source.length) return; + hist.lastOrigin = hist.lastSelOrigin = null; + + for (;;) { + event = source.pop(); + if (event.ranges) { + pushSelectionToHistory(event, dest); + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}); + return; + } + selAfter = event; + } + else break; + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = []; + pushSelectionToHistory(selAfter, dest); + dest.push({changes: antiChanges, generation: hist.generation}); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + for (var i = event.changes.length - 1; i >= 0; --i) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + source.length = 0; + return; + } + + antiChanges.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change) : lst(source); + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); + var rebased = []; + + // Propagate to the linked documents + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) return; + doc.first += distance; + doc.sel = new Selection(map(doc.sel.ranges, function(range) { + return new Range(Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch)); + }), doc.sel.primIndex); + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance); + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + regLineChange(doc.cm, l, "gutter"); + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return; + } + if (change.from.line > doc.lastLine()) return; + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) selAfter = computeSelAfterChange(doc, change); + if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans); + else updateDoc(doc, change, spans); + setSelectionNoUndo(doc, selAfter, sel_dontScroll); + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function(line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true; + } + }); + } + + if (doc.sel.contains(change.from, change.to) > -1) + signalCursorActivity(cm); + + updateDoc(doc, change, spans, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function(line) { + var len = lineLength(line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) cm.curOp.updateMaxLine = true; + } + + // Adjust frontier, schedule worker + doc.frontier = Math.min(doc.frontier, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + if (change.full) + regChange(cm); + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + regLineChange(cm, from.line, "text"); + else + regChange(cm, from.line, to.line + 1, lendiff); + + var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); + if (changeHandler || changesHandler) { + var obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + }; + if (changeHandler) signalLater(cm, "change", cm, obj); + if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); + } + cm.display.selForContextMenu = null; + } + + function replaceRange(doc, code, from, to, origin) { + if (!to) to = from; + if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; } + if (typeof code == "string") code = splitLines(code); + makeChange(doc, {from: from, to: to, text: code, origin: origin}); + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, coords) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) return; + + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + if (coords.top + box.top < 0) doScroll = true; + else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " + + (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " + + (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " + + coords.left + "px; width: 2px;"); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) margin = 0; + for (var limit = 0; limit < 5; limit++) { + var changed = false, coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), + Math.min(coords.top, endCoords.top) - margin, + Math.max(coords.left, endCoords.left), + Math.max(coords.bottom, endCoords.bottom) + margin); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + setScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; + } + if (!changed) break; + } + return coords; + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, x1, y1, x2, y2) { + var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); + if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, x1, y1, x2, y2) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (y1 < 0) y1 = 0; + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (y2 - y1 > screen) y2 = y1 + screen; + var docBottom = cm.doc.height + paddingVert(display); + var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; + if (y1 < screentop) { + result.scrollTop = atTop ? 0 : y1; + } else if (y2 > screentop + screen) { + var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); + if (newTop != screentop) result.scrollTop = newTop; + } + + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); + var tooWide = x2 - x1 > screenw; + if (tooWide) x2 = x1 + screenw; + if (x1 < 10) + result.scrollLeft = 0; + else if (x1 < screenleft) + result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)); + else if (x2 > screenw + screenleft - 3) + result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw; + return result; + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollPos(cm, left, top) { + if (left != null || top != null) resolveScrollToPos(cm); + if (left != null) + cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; + if (top != null) + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(), from = cur, to = cur; + if (!cm.options.lineWrapping) { + from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; + to = Pos(cur.line, cur.ch + 1); + } + cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); + var sPos = calculateScrollPos(cm, Math.min(from.left, to.left), + Math.min(from.top, to.top) - range.margin, + Math.max(from.right, to.right), + Math.max(from.bottom, to.bottom) + range.margin); + cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + } + + // API UTILITIES + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, state; + if (how == null) how = "add"; + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) how = "prev"; + else state = getStateBefore(cm, n); + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + if (line.stateAfter) line.stateAfter = null; + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0; + how = "not"; + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass || indentation > 150) { + if (!aggressive) return; + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); + else indentation = 0; + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} + if (pos < indentation) indentString += spaceStr(indentation - pos); + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + line.stateAfter = null; + return true; + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos = Pos(n, curSpaceString.length); + replaceOneSelection(doc, i, new Range(pos, pos)); + break; + } + } + } + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, line = handle; + if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); + else no = lineNo(handle); + if (no == null) return null; + if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); + return line; + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, kill = []; + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]); + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop(); + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from; + break; + } + } + kill.push(toKill); + } + // Next, remove those actual ranges. + runInOp(cm, function() { + for (var i = kill.length - 1; i >= 0; i--) + replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); + ensureCursorVisible(cm); + }); + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "char", "column" (like char, but doesn't + // cross line boundaries), "word" (across next word), or "group" (to + // the start of next group of word or non-word-non-whitespace + // chars). The visually param controls whether, in right-to-left + // text, direction 1 means to move towards the next index in the + // string, or towards the character to the right of the current + // position. The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var line = pos.line, ch = pos.ch, origDir = dir; + var lineObj = getLine(doc, line); + var possible = true; + function findNextLine() { + var l = line + dir; + if (l < doc.first || l >= doc.first + doc.size) return (possible = false); + line = l; + return lineObj = getLine(doc, l); + } + function moveOnce(boundToLine) { + var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); + if (next == null) { + if (!boundToLine && findNextLine()) { + if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); + else ch = dir < 0 ? lineObj.text.length : 0; + } else return (possible = false); + } else ch = next; + return true; + } + + if (unit == "char") moveOnce(); + else if (unit == "column") moveOnce(true); + else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) break; + var cur = lineObj.text.charAt(ch) || "\n"; + var type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p"; + if (group && !first && !type) type = "s"; + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce();} + break; + } + + if (type) sawType = type; + if (dir > 0 && !moveOnce(!first)) break; + } + } + var result = skipAtomic(doc, Pos(line, ch), origDir, true); + if (!possible) result.hitSide = true; + return result; + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + for (;;) { + var target = coordsChar(cm, x, y); + if (!target.outside) break; + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } + y += dir * 5; + } + return target; + } + + // EDITOR METHODS + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){window.focus(); this.display.input.focus();}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") return; + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + operation(this, optionHandlers[option])(this, value, old); + }, + + getOption: function(option) {return this.options[option];}, + getDoc: function() {return this.doc;}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1); + return true; + } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) throw new Error("Overlays may not be stateful."); + this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return; + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; + else dir = dir ? "add" : "subtract"; + } + if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, end = -1; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (!range.empty()) { + var from = range.from(), to = range.to(); + var start = Math.max(end, from.line); + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; + for (var j = start; j < end; ++j) + indentLine(this, j, how); + var newRanges = this.doc.sel.ranges; + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true); + end = range.head.line; + if (i == this.doc.sel.primIndex) ensureCursorVisible(this); + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise); + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true); + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + var type; + if (ch == 0) type = styles[2]; + else for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; + else if (styles[mid * 2 + 1] < ch) before = mid + 1; + else { type = styles[mid * 2 + 2]; break; } + } + var cut = type ? type.indexOf("cm-overlay ") : -1; + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1); + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) return mode; + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0]; + }, + + getHelpers: function(pos, type) { + var found = []; + if (!helpers.hasOwnProperty(type)) return found; + var help = helpers[type], mode = this.getModeAt(pos); + if (typeof mode[type] == "string") { + if (help[mode[type]]) found.push(help[mode[type]]); + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]]; + if (val) found.push(val); + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]); + } else if (help[mode.name]) { + found.push(help[mode.name]); + } + for (var i = 0; i < help._global.length; i++) { + var cur = help._global[i]; + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + found.push(cur.val); + } + return found; + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getStateBefore(this, line + 1, precise); + }, + + cursorCoords: function(start, mode) { + var pos, range = this.doc.sel.primary(); + if (start == null) pos = range.head; + else if (typeof start == "object") pos = clipPos(this.doc, start); + else pos = start ? range.from() : range.to(); + return cursorCoords(this, pos, mode || "page"); + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page"); + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top); + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset); + }, + heightAtLine: function(line, mode) { + var end = false, lineObj; + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) line = this.doc.first; + else if (line > last) { line = last; end = true; } + lineObj = getLine(this.doc, line); + } else { + lineObj = line; + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top + + (end ? this.doc.height - heightAtLine(lineObj) : 0); + }, + + defaultTextHeight: function() { return textHeight(this.display); }, + defaultCharWidth: function() { return charWidth(this.display); }, + + setGutterMarker: methodOp(function(line, gutterID, value) { + return changeLine(this.doc, line, "gutter", function(line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) line.gutterMarkers = null; + return true; + }); + }), + + clearGutter: methodOp(function(gutterID) { + var cm = this, doc = cm.doc, i = doc.first; + doc.iter(function(line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + line.gutterMarkers[gutterID] = null; + regLineChange(cm, i, "gutter"); + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; + } + ++i; + }); + }), + + lineInfo: function(line) { + if (typeof line == "number") { + if (!isLine(this.doc, line)) return null; + var n = line; + line = getLine(this.doc, line); + if (!line) return null; + } else { + var n = lineNo(line); + if (n == null) return null; + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets}; + }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + node.setAttribute("cm-ignore-events", "true"); + this.display.input.setUneditable(node); + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + top = pos.top - node.offsetHeight; + else if (pos.bottom + node.offsetHeight <= vspace) + top = pos.bottom; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") left = 0; + else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; + node.style.left = left + "px"; + } + if (scroll) + scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + return commands[cmd](this); + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) break; + } + return cur; + }, + + moveH: methodOp(function(dir, unit) { + var cm = this; + cm.extendSelectionsBy(function(range) { + if (cm.display.shift || cm.doc.extend || range.empty()) + return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually); + else + return dir < 0 ? range.from() : range.to(); + }, sel_move); + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, doc = this.doc; + if (sel.somethingSelected()) + doc.replaceSelection("", null, "+delete"); + else + deleteNearSelection(this, function(range) { + var other = findPosH(doc, range.head, dir, unit, false); + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}; + }); + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) x = coords.left; + else coords.left = x; + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) break; + } + return cur; + }, + + moveV: methodOp(function(dir, unit) { + var cm = this, doc = this.doc, goals = []; + var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected(); + doc.extendSelectionsBy(function(range) { + if (collapse) + return dir < 0 ? range.from() : range.to(); + var headPos = cursorCoords(cm, range.head, "div"); + if (range.goalColumn != null) headPos.left = range.goalColumn; + goals.push(headPos.left); + var pos = findPosV(cm, headPos, dir, unit); + if (unit == "page" && range == doc.sel.primary()) + addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top); + return pos; + }, sel_move); + if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++) + doc.sel.ranges[i].goalColumn = goals[i]; + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, line = getLine(doc, pos.line).text; + var start = pos.ch, end = pos.ch; + if (line) { + var helper = this.getHelper(pos, "wordChars"); + if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; + var startChar = line.charAt(start); + var check = isWordChar(startChar, helper) + ? function(ch) { return isWordChar(ch, helper); } + : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} + : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; + while (start > 0 && check(line.charAt(start - 1))) --start; + while (end < line.length && check(line.charAt(end))) ++end; + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)); + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) return; + if (this.state.overwrite = !this.state.overwrite) + addClass(this.display.cursorDiv, "CodeMirror-overwrite"); + else + rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); + + signal(this, "overwriteToggle", this, this.state.overwrite); + }, + hasFocus: function() { return this.display.input.getField() == activeElt(); }, + + scrollTo: methodOp(function(x, y) { + if (x != null || y != null) resolveScrollToPos(this); + if (x != null) this.curOp.scrollLeft = x; + if (y != null) this.curOp.scrollTop = y; + }), + getScrollInfo: function() { + var scroller = this.display.scroller; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)}; + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null}; + if (margin == null) margin = this.options.cursorScrollMargin; + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null}; + } else if (range.from == null) { + range = {from: range, to: null}; + } + if (!range.to) range.to = range.from; + range.margin = margin || 0; + + if (range.from.line != null) { + resolveScrollToPos(this); + this.curOp.scrollToPos = range; + } else { + var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left), + Math.min(range.from.top, range.to.top) - range.margin, + Math.max(range.from.right, range.to.right), + Math.max(range.from.bottom, range.to.bottom) + range.margin); + this.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + }), + + setSize: methodOp(function(width, height) { + var cm = this; + function interpret(val) { + return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; + } + if (width != null) cm.display.wrapper.style.width = interpret(width); + if (height != null) cm.display.wrapper.style.height = interpret(height); + if (cm.options.lineWrapping) clearLineMeasurementCache(this); + var lineNo = cm.display.viewFrom; + cm.doc.iter(lineNo, cm.display.viewTo, function(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) + if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; } + ++lineNo; + }); + cm.curOp.forceUpdate = true; + signal(cm, "refresh", this); + }), + + operation: function(f){return runInOp(this, f);}, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight; + regChange(this); + this.curOp.forceUpdate = true; + clearCaches(this); + this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); + updateGutterSpace(this); + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) + estimateLineHeights(this); + signal(this, "refresh", this); + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc; + old.cm = null; + attachDoc(this, doc); + clearCaches(this); + this.display.input.reset(); + this.scrollTo(doc.scrollLeft, doc.scrollTop); + this.curOp.forceScroll = true; + signalLater(this, "swapDoc", this, old); + return old; + }), + + getInputField: function(){return this.display.input.getField();}, + getWrapperElement: function(){return this.display.wrapper;}, + getScrollerElement: function(){return this.display.scroller;}, + getGutterElement: function(){return this.display.gutters;} + }; + eventMixin(CodeMirror); + + // OPTION DEFAULTS + + // The default configuration options. + var defaults = CodeMirror.defaults = {}; + // Functions to run when options are changed. + var optionHandlers = CodeMirror.optionHandlers = {}; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) optionHandlers[name] = + notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; + } + + // Passed to option handlers when there is no old value. + var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function(cm, val) { + cm.setValue(val); + }, true); + option("mode", null, function(cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function(cm) { + resetModeState(cm); + clearCaches(cm); + regChange(cm); + }, true); + option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + if (old != CodeMirror.Init) cm.refresh(); + }); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); + option("electricChars", true); + option("inputStyle", mobile ? "contenteditable" : "textarea", function() { + throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME + }, true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function(cm) { + themeChanged(cm); + guttersChanged(cm); + }, true); + option("keyMap", "default", function(cm, val, old) { + var next = getKeyMap(val); + var prev = old != CodeMirror.Init && getKeyMap(old); + if (prev && prev.detach) prev.detach(cm, next); + if (next.attach) next.attach(cm, prev || null); + }); + option("extraKeys", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("fixedGutter", true, function(cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true); + option("scrollbarStyle", "native", function(cm) { + initScrollbars(cm); + updateScrollbars(cm); + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); + }, true); + option("lineNumbers", false, function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("firstLineNumber", 1, guttersChanged, true); + option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + option("lineWiseCopyCut", true); + + option("readOnly", false, function(cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + cm.display.disabled = true; + } else { + cm.display.disabled = false; + if (!val) cm.display.input.reset(); + } + }); + option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true); + option("dragDrop", true, dragDropChanged); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1, updateSelection, true); + option("singleCursorHeightPerLine", true, updateSelection, true); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true, resetModeState, true); + option("addModeClass", false, resetModeState, true); + option("pollInterval", 100); + option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;}); + option("historyEventDelay", 1250); + option("viewportMargin", 10, function(cm){cm.refresh();}, true); + option("maxHighlightLength", 10000, resetModeState, true); + option("moveInputWithCursor", true, function(cm, val) { + if (!val) cm.display.input.resetPosition(); + }); + + option("tabindex", null, function(cm, val) { + cm.display.input.getField().tabIndex = val || ""; + }); + option("autofocus", null); + + // MODE DEFINITION AND QUERYING + + // Known modes, by name and by MIME + var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name, mode) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; + if (arguments.length > 2) + mode.dependencies = Array.prototype.slice.call(arguments, 2); + modes[name] = mode; + }; + + CodeMirror.defineMIME = function(mime, spec) { + mimeModes[mime] = spec; + }; + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + CodeMirror.resolveMode = function(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") found = {name: found}; + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return CodeMirror.resolveMode("application/xml"); + } + if (typeof spec == "string") return {name: spec}; + else return spec || {name: "null"}; + }; + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + CodeMirror.getMode = function(options, spec) { + var spec = CodeMirror.resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) return CodeMirror.getMode(options, "text/plain"); + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) continue; + if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) modeObj.helperType = spec.helperType; + if (spec.modeProps) for (var prop in spec.modeProps) + modeObj[prop] = spec.modeProps[prop]; + + return modeObj; + }; + + // Minimal default mode. + CodeMirror.defineMode("null", function() { + return {token: function(stream) {stream.skipToEnd();}}; + }); + CodeMirror.defineMIME("text/plain", "null"); + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = CodeMirror.modeExtensions = {}; + CodeMirror.extendMode = function(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + }; + + // EXTENSIONS + + CodeMirror.defineExtension = function(name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function(name, func) { + Doc.prototype[name] = func; + }; + CodeMirror.defineOption = option; + + var initHooks = []; + CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; + + var helpers = CodeMirror.helpers = {}; + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []}; + helpers[type][name] = value; + }; + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value); + helpers[type]._global.push({pred: predicate, val: value}); + }; + + // MODE STATE HANDLING + + // Utility functions for working with state. Exported because nested + // modes need to do this for their inner modes. + + var copyState = CodeMirror.copyState = function(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + }; + + var startState = CodeMirror.startState = function(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + }; + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + CodeMirror.innerMode = function(mode, state) { + while (mode.innerMode) { + var info = mode.innerMode(state); + if (!info || info.mode == mode) break; + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state}; + }; + + // STANDARD COMMANDS + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = CodeMirror.commands = { + selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);}, + singleSelection: function(cm) { + cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); + }, + killLine: function(cm) { + deleteNearSelection(cm, function(range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length; + if (range.head.ch == len && range.head.line < cm.lastLine()) + return {from: range.head, to: Pos(range.head.line + 1, 0)}; + else + return {from: range.head, to: Pos(range.head.line, len)}; + } else { + return {from: range.from(), to: range.to()}; + } + }); + }, + deleteLine: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0))}; + }); + }, + delLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), to: range.from()}; + }); + }, + delWrappedLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var leftPos = cm.coordsChar({left: 0, top: top}, "div"); + return {from: leftPos, to: range.from()}; + }); + }, + delWrappedLineRight: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + return {from: range.from(), to: rightPos }; + }); + }, + undo: function(cm) {cm.undo();}, + redo: function(cm) {cm.redo();}, + undoSelection: function(cm) {cm.undoSelection();}, + redoSelection: function(cm) {cm.redoSelection();}, + goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, + goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, + goLineStart: function(cm) { + cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); }, + {origin: "+move", bias: 1}); + }, + goLineStartSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + return lineStartSmart(cm, range.head); + }, {origin: "+move", bias: 1}); + }, + goLineEnd: function(cm) { + cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); }, + {origin: "+move", bias: -1}); + }, + goLineRight: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + }, sel_move); + }, + goLineLeft: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: 0, top: top}, "div"); + }, sel_move); + }, + goLineLeftSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var pos = cm.coordsChar({left: 0, top: top}, "div"); + if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head); + return pos; + }, sel_move); + }, + goLineUp: function(cm) {cm.moveV(-1, "line");}, + goLineDown: function(cm) {cm.moveV(1, "line");}, + goPageUp: function(cm) {cm.moveV(-1, "page");}, + goPageDown: function(cm) {cm.moveV(1, "page");}, + goCharLeft: function(cm) {cm.moveH(-1, "char");}, + goCharRight: function(cm) {cm.moveH(1, "char");}, + goColumnLeft: function(cm) {cm.moveH(-1, "column");}, + goColumnRight: function(cm) {cm.moveH(1, "column");}, + goWordLeft: function(cm) {cm.moveH(-1, "word");}, + goGroupRight: function(cm) {cm.moveH(1, "group");}, + goGroupLeft: function(cm) {cm.moveH(-1, "group");}, + goWordRight: function(cm) {cm.moveH(1, "word");}, + delCharBefore: function(cm) {cm.deleteH(-1, "char");}, + delCharAfter: function(cm) {cm.deleteH(1, "char");}, + delWordBefore: function(cm) {cm.deleteH(-1, "word");}, + delWordAfter: function(cm) {cm.deleteH(1, "word");}, + delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, + delGroupAfter: function(cm) {cm.deleteH(1, "group");}, + indentAuto: function(cm) {cm.indentSelection("smart");}, + indentMore: function(cm) {cm.indentSelection("add");}, + indentLess: function(cm) {cm.indentSelection("subtract");}, + insertTab: function(cm) {cm.replaceSelection("\t");}, + insertSoftTab: function(cm) { + var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from(); + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); + spaces.push(new Array(tabSize - col % tabSize + 1).join(" ")); + } + cm.replaceSelections(spaces); + }, + defaultTab: function(cm) { + if (cm.somethingSelected()) cm.indentSelection("add"); + else cm.execCommand("insertTab"); + }, + transposeChars: function(cm) { + runInOp(cm, function() { + var ranges = cm.listSelections(), newSel = []; + for (var i = 0; i < ranges.length; i++) { + var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; + if (line) { + if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1); + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1); + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose"); + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text; + if (prev) + cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose"); + } + } + newSel.push(new Range(cur, cur)); + } + cm.setSelections(newSel); + }); + }, + newlineAndIndent: function(cm) { + runInOp(cm, function() { + var len = cm.listSelections().length; + for (var i = 0; i < len; i++) { + var range = cm.listSelections()[i]; + cm.replaceRange("\n", range.anchor, range.head, "+input"); + cm.indentLine(range.from().line + 1, null, true); + ensureCursorVisible(cm); + } + }); + }, + toggleOverwrite: function(cm) {cm.toggleOverwrite();} + }; + + + // STANDARD KEYMAPS + + var keyMap = CodeMirror.keyMap = {}; + + keyMap.basic = { + "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", + "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", + "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", + "Tab": "defaultTab", "Shift-Tab": "indentAuto", + "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", + "Esc": "singleSelection" + }; + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", + "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", + fallthrough: "basic" + }; + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" + }; + keyMap.macDefault = { + "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", + "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", + fallthrough: ["basic", "emacsy"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/), name = parts[parts.length - 1]; + var alt, ctrl, shift, cmd; + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i]; + if (/^(cmd|meta|m)$/i.test(mod)) cmd = true; + else if (/^a(lt)?$/i.test(mod)) alt = true; + else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true; + else if (/^s(hift)$/i.test(mod)) shift = true; + else throw new Error("Unrecognized modifier name: " + mod); + } + if (alt) name = "Alt-" + name; + if (ctrl) name = "Ctrl-" + name; + if (cmd) name = "Cmd-" + name; + if (shift) name = "Shift-" + name; + return name; + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + CodeMirror.normalizeKeyMap = function(keymap) { + var copy = {}; + for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname]; + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue; + if (value == "...") { delete keymap[keyname]; continue; } + + var keys = map(keyname.split(" "), normalizeKeyName); + for (var i = 0; i < keys.length; i++) { + var val, name; + if (i == keys.length - 1) { + name = keys.join(" "); + val = value; + } else { + name = keys.slice(0, i + 1).join(" "); + val = "..."; + } + var prev = copy[name]; + if (!prev) copy[name] = val; + else if (prev != val) throw new Error("Inconsistent bindings for " + name); + } + delete keymap[keyname]; + } + for (var prop in copy) keymap[prop] = copy[prop]; + return keymap; + }; + + var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) { + map = getKeyMap(map); + var found = map.call ? map.call(key, context) : map[key]; + if (found === false) return "nothing"; + if (found === "...") return "multi"; + if (found != null && handle(found)) return "handled"; + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + return lookupKey(key, map.fallthrough, handle, context); + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context); + if (result) return result; + } + } + }; + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + var isModifierKey = CodeMirror.isModifierKey = function(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; + }; + + // Look up the name of a key as indicated by an event object. + var keyName = CodeMirror.keyName = function(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) return false; + var base = keyNames[event.keyCode], name = base; + if (name == null || event.altGraphKey) return false; + if (event.altKey && base != "Alt") name = "Alt-" + name; + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name; + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name; + if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name; + return name; + }; + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val; + } + + // FROMTEXTAREA + + CodeMirror.fromTextArea = function(textarea, options) { + options = options ? copyObj(options) : {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabIndex) + options.tabindex = textarea.tabIndex; + if (!options.placeholder && textarea.placeholder) + options.placeholder = textarea.placeholder; + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt(); + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form, realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function() { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + options.finishInit = function(cm) { + cm.save = save; + cm.getTextArea = function() { return textarea; }; + cm.toTextArea = function() { + cm.toTextArea = isNaN; // Prevent this from being ran twice + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit; + } + }; + }; + + textarea.style.display = "none"; + var cm = CodeMirror(function(node) { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + return cm; + }; + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = CodeMirror.StringStream = function(string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + }; + + StringStream.prototype = { + eol: function() {return this.pos >= this.string.length;}, + sol: function() {return this.pos == this.lineStart;}, + peek: function() {return this.string.charAt(this.pos) || undefined;}, + next: function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function(match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) {++this.pos; return ch;} + }, + eatWhile: function(match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start; + }, + eatSpace: function() { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function() {this.pos = this.string.length;}, + skipTo: function(ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true;} + }, + backUp: function(n) {this.pos -= n;}, + column: function() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + indentation: function() { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + match: function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) return null; + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function(){return this.string.slice(this.start, this.pos);}, + hideFirstChars: function(n, inner) { + this.lineStart += n; + try { return inner(); } + finally { this.lineStart -= n; } + } + }; + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + var nextMarkerId = 0; + + var TextMarker = CodeMirror.TextMarker = function(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + this.id = ++nextMarkerId; + }; + eventMixin(TextMarker); + + // Clear the marker. + TextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) startOperation(cm); + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) signalLater(this, "clear", found.from, found.to); + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text"); + else if (cm) { + if (span.to != null) max = lineNo(line); + if (span.from != null) min = lineNo(line); + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + updateLineHeight(line, textHeight(cm.display)); + } + if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { + var visual = visualLine(this.lines[i]), len = lineLength(visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } + + if (min != null && cm && this.collapsed) regChange(cm, min, max + 1); + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) reCheckSelection(cm.doc); + } + if (cm) signalLater(cm, "markerCleared", cm, this); + if (withOp) endOperation(cm); + if (this.parent) this.parent.clear(); + }; + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function(side, lineObj) { + if (side == null && this.type == "bookmark") side = 1; + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from); + if (side == -1) return from; + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to); + if (side == 1) return to; + } + } + return from && {from: from, to: to}; + }; + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function() { + var pos = this.find(-1, true), widget = this, cm = this.doc.cm; + if (!pos || !cm) return; + runInOp(cm, function() { + var line = pos.line, lineN = lineNo(pos.line); + var view = findViewForLine(cm, lineN); + if (view) { + clearLineMeasurementCacheFor(view); + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; + } + cm.curOp.updateMaxLine = true; + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height; + widget.height = null; + var dHeight = widgetHeight(widget) - oldHeight; + if (dHeight) + updateLineHeight(line, line.height + dHeight); + } + }); + }; + + TextMarker.prototype.attachLine = function(line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); + } + this.lines.push(line); + }; + TextMarker.prototype.detachLine = function(line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0; + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) return markTextShared(doc, from, to, options, type); + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); + + var marker = new TextMarker(doc, type), diff = cmp(from, to); + if (options) copyObj(options, marker, false); + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + return marker; + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true; + marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true"); + if (options.insertLeft) marker.widgetNode.insertLeft = true; + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + throw new Error("Inserting collapsed marker partially overlapping an existing one"); + sawCollapsedSpans = true; + } + + if (marker.addToHistory) + addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); + + var curLine = from.line, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function(line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + updateMaxLine = true; + if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null)); + ++curLine; + }); + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { + if (lineIsHidden(doc, line)) updateLineHeight(line, 0); + }); + + if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); + + if (marker.readOnly) { + sawReadOnlySpans = true; + if (doc.history.done.length || doc.history.undone.length) + doc.clearHistory(); + } + if (marker.collapsed) { + marker.id = ++nextMarkerId; + marker.atomic = true; + } + if (cm) { + // Sync editor state + if (updateMaxLine) cm.curOp.updateMaxLine = true; + if (marker.collapsed) + regChange(cm, from.line, to.line + 1); + else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css) + for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text"); + if (marker.atomic) reCheckSelection(cm.doc); + signalLater(cm, "markerAdded", cm, marker); + } + return marker; + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0; i < markers.length; ++i) + markers[i].parent = this; + }; + eventMixin(SharedTextMarker); + + SharedTextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + this.markers[i].clear(); + signalLater(this, "clear"); + }; + SharedTextMarker.prototype.find = function(side, lineObj) { + return this.primary.find(side, lineObj); + }; + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.widgetNode; + linkedDocs(doc, function(doc) { + if (widget) options.widgetNode = widget.cloneNode(true); + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + if (doc.linked[i].isParent) return; + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary); + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), + function(m) { return m.parent; }); + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], pos = marker.find(); + var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); + marker.markers.push(subMark); + subMark.parent = marker; + } + } + } + + function detachSharedMarkers(markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], linked = [marker.primary.doc];; + linkedDocs(marker.primary.doc, function(d) { linked.push(d); }); + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j]; + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null; + marker.markers.splice(j--, 1); + } + } + } + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; this.to = to; + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) return span; + } + } + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + for (var r, i = 0; i < spans.length; ++i) + if (spans[i] != span) (r || (r = [])).push(spans[i]); + return r; + } + // Add a span to a line. + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.attachLine(line); + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } + return nw; + } + function markedSpansAfter(old, endCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)); + } + } + return nw; + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) return null; + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) return null; + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) span.to = startCh; + else if (sameLine) span.to = found.to == null ? null : found.to + offset; + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i = 0; i < last.length; ++i) { + var span = last[i]; + if (span.to != null) span.to += offset; + if (span.from == null) { + var found = getMarkedSpanFor(first, span.marker); + if (!found) { + span.from = offset; + if (sameLine) (first || (first = [])).push(span); + } + } else { + span.from += offset; + if (sameLine) (first || (first = [])).push(span); + } + } + } + // Make sure we didn't create any zero-length spans + if (first) first = clearEmptySpans(first); + if (last && last != first) last = clearEmptySpans(last); + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + for (var i = 0; i < first.length; ++i) + if (first[i].to == null) + (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)); + for (var i = 0; i < gap; ++i) + newMarkers.push(gapMarkers); + newMarkers.push(last); + } + return newMarkers; + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + spans.splice(i--, 1); + } + if (!spans.length) return null; + return spans; + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) return stretched; + if (!stretched) return old; + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + if (oldCur[k].marker == span.marker) continue spans; + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old; + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function(line) { + if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + (markers || (markers = [])).push(mark); + } + }); + if (!markers) return null; + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue; + var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + newParts.push({from: p.from, to: m.from}); + if (dto > 0 || !mk.inclusiveRight && !dto) + newParts.push({from: m.to, to: p.to}); + parts.splice.apply(parts, newParts); + j += newParts.length - 1; + } + } + return parts; + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.detachLine(line); + line.markedSpans = null; + } + function attachMarkedSpans(line, spans) { + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.attachLine(line); + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; } + function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) return lenDiff; + var aPos = a.find(), bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) return -fromCmp; + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) return toCmp; + return b.id - a.id; + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + found = sp.marker; + } + return found; + } + function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); } + function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) continue; + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; + if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) || + fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight))) + return true; + } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + line = merged.find(-1, true).line; + return line; + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + (lines || (lines = [])).push(line); + } + return lines; + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), vis = visualLine(line); + if (line == vis) return lineN; + return lineNo(vis); + } + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) return lineN; + var line = getLine(doc, lineN), merged; + if (!lineIsHidden(doc, line)) return lineN; + while (merged = collapsedSpanAtEnd(line)) + line = merged.find(1, true).line; + return lineNo(line) + 1; + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if (sp.from == null) return true; + if (sp.marker.widgetNode) continue; + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + return true; + } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); + } + if (span.marker.inclusiveRight && span.to == line.text.length) + return true; + for (var sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) return true; + } + } + + // LINE WIDGETS + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = CodeMirror.LineWidget = function(doc, node, options) { + if (options) for (var opt in options) if (options.hasOwnProperty(opt)) + this[opt] = options[opt]; + this.doc = doc; + this.node = node; + }; + eventMixin(LineWidget); + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + addToScrollPos(cm, null, diff); + } + + LineWidget.prototype.clear = function() { + var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); + if (no == null || !ws) return; + for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); + if (!ws.length) line.widgets = null; + var height = widgetHeight(this); + updateLineHeight(line, Math.max(0, line.height - height)); + if (cm) runInOp(cm, function() { + adjustScrollWhenAboveVisible(cm, line, -height); + regLineChange(cm, no, "widget"); + }); + }; + LineWidget.prototype.changed = function() { + var oldH = this.height, cm = this.doc.cm, line = this.line; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) return; + updateLineHeight(line, line.height + diff); + if (cm) runInOp(cm, function() { + cm.curOp.forceUpdate = true; + adjustScrollWhenAboveVisible(cm, line, diff); + }); + }; + + function widgetHeight(widget) { + if (widget.height != null) return widget.height; + var cm = widget.doc.cm; + if (!cm) return 0; + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; + if (widget.noHScroll) + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.offsetHeight; + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options); + var cm = doc.cm; + if (cm && widget.noHScroll) cm.display.alignWidgets = true; + changeLine(doc, handle, "widget", function(line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) widgets.push(widget); + else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); + widget.line = line; + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) addToScrollPos(cm, null, widget.height); + cm.curOp.forceUpdate = true; + } + return true; + }); + return widget; + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + eventMixin(Line); + Line.prototype.lineNo = function() { return lineNo(this); }; + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + if (line.order != null) line.order = null; + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) updateLineHeight(line, estHeight); + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + function extractLineClasses(type, output) { + if (type) for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) break; + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) + output[prop] = lineClass[2]; + else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) + output[prop] += " " + lineClass[2]; + } + return type; + } + + function callBlankLine(mode, state) { + if (mode.blankLine) return mode.blankLine(state); + if (!mode.innerMode) return; + var inner = CodeMirror.innerMode(mode, state); + if (inner.mode.blankLine) return inner.mode.blankLine(inner.state); + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode; + var style = mode.token(stream, state); + if (stream.pos > stream.start) return style; + } + throw new Error("Mode " + mode.name + " failed to advance stream."); + } + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + function getObj(copy) { + return {start: stream.start, end: stream.pos, + string: stream.current(), + type: style || null, + state: copy ? copyState(doc.mode, state) : state}; + } + + var doc = cm.doc, mode = doc.mode, style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize), tokens; + if (asArray) tokens = []; + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, state); + if (asArray) tokens.push(getObj(true)); + } + return asArray ? tokens : getObj(); + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize), style; + var inner = cm.options.addModeClass && [null]; + if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses); + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) processLine(cm, text, state, stream.pos); + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) style = "m-" + (style ? mName + " " + style : mName); + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 50000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 characters + var pos = Math.min(stream.pos, curStart + 50000); + f(pos, curStyle); + curStart = pos; + } + } + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, state, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, state, function(end, style) { + st.push(end, style); + }, lineClasses, forceToEnd); + + // Run overlays, adjust style array. + for (var o = 0; o < cm.state.overlays.length; ++o) { + var overlay = cm.state.overlays[o], i = 1, at = 0; + runMode(cm, line.text, overlay.mode, true, function(end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + st.splice(i, 1, end, st[i+1], i_end); + i += 2; + at = Math.min(end, i_end); + } + if (!style) return; + if (overlay.opaque) { + st.splice(start, i - start, end, "cm-overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style; + } + } + }, lineClasses); + } + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}; + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); + line.styles = result.styles; + if (result.classes) line.styleClasses = result.classes; + else if (line.styleClasses) line.styleClasses = null; + if (updateFrontier === cm.doc.frontier) cm.doc.frontier++; + } + return line.styles; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, state, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize); + stream.start = stream.pos = startAt || 0; + if (text == "") callBlankLine(mode, state); + while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { + readToken(mode, stream, state); + stream.start = stream.pos; + } + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) return null; + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")); + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = elt("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}; + lineView.measure = {}; + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, order; + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) + builder.addToken = buildTokenBadBidi(builder.addToken, order); + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); + if (line.styleClasses.textClass) + builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); + (lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) + builder.content.className = "cm-tab-wrap-hack"; + + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) + builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); + + return builder; + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token; + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, title, css) { + if (!text) return; + var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text; + var special = builder.cm.state.specialChars, mustWrap = false; + if (!special.test(text)) { + builder.col += text.length; + var content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) mustWrap = true; + builder.pos += text.length; + } else { + var content = document.createDocumentFragment(), pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) break; + pos += skipped + 1; + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt.setAttribute("role", "presentation"); + txt.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else { + var txt = builder.cm.options.specialCharPlaceholder(m[0]); + txt.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt); + builder.pos++; + } + } + if (style || startStyle || endStyle || mustWrap || css) { + var fullStyle = style || ""; + if (startStyle) fullStyle += startStyle; + if (endStyle) fullStyle += endStyle; + var token = elt("span", [content], fullStyle, css); + if (title) token.title = title; + return builder.content.appendChild(token); + } + builder.content.appendChild(content); + } + + function splitSpaces(old) { + var out = " "; + for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; + out += " "; + return out; + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function(builder, text, style, startStyle, endStyle, title, css) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + for (var i = 0; i < order.length; i++) { + var part = order[i]; + if (part.to > start && part.from <= start) break; + } + if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css); + inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + }; + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) builder.map.push(builder.pos, builder.pos + size, widget); + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + widget = builder.content.appendChild(document.createElement("span")); + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i = 1; i < styles.length; i+=2) + builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)); + return; + } + + var len = allText.length, pos = 0, i = 1, text = "", style, css; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = title = css = ""; + collapsed = null; nextChange = Infinity; + var foundBookmarks = []; + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) spanStyle += " " + m.className; + if (m.css) css = m.css; + if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; + if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; + if (m.title && !title) title = m.title; + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + collapsed = sp; + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) return; + if (collapsed.to == pos) collapsed = false; + } + if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) + buildCollapsedSpan(builder, 0, foundBookmarks[j]); + } + if (pos >= len) break; + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore); + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null;} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + function linesFor(start, end) { + for (var i = start, result = []; i < end; ++i) + result.push(new Line(text[i], spansFor(i), estimateHeight)); + return result; + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)); + doc.remove(text.length, doc.size - text.length); + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1); + update(lastLine, lastLine.text, lastSpans); + if (nlines) doc.remove(from.line, nlines); + if (added.length) doc.insert(from.line, added); + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + var added = linesFor(1, text.length - 1); + added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + var added = linesFor(1, text.length - 1); + if (nlines > 1) doc.remove(from.line + 1, nlines - 1); + doc.insert(from.line + 1, added); + } + + signalLater(doc, "change", doc, change); + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + for (var i = 0, height = 0; i < lines.length; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length; }, + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines); + }, + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0; i < lines.length; ++i) lines[i].parent = this; + }, + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + if (op(this.lines[at])) return true; + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0; i < children.length; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size; }, + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) break; + at = 0; + } else at -= sz; + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines); + }, + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + while (child.lines.length > 50) { + var spilled = child.lines.splice(child.lines.length - 25, 25); + var newleaf = new LeafChunk(spilled); + child.height -= newleaf.height; + this.children.splice(i + 1, 0, newleaf); + newleaf.parent = this; + } + this.maybeSpill(); + } + break; + } + at -= sz; + } + }, + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) return; + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10); + me.parent.maybeSpill(); + }, + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) return true; + if ((n -= used) == 0) break; + at = 0; + } else at -= sz; + } + } + }; + + var nextDocId = 0; + var Doc = CodeMirror.Doc = function(text, mode, firstLine) { + if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); + if (firstLine == null) firstLine = 0; + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.cleanGeneration = 1; + this.frontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = simpleSelection(start); + this.history = new History(null); + this.id = ++nextDocId; + this.modeOption = mode; + + if (typeof text == "string") text = splitLines(text); + updateDoc(this, {from: start, to: start, text: text}); + setSelection(this, simpleSelection(start), sel_dontScroll); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) this.iterN(from - this.first, to - from, op); + else this.iterN(this.first, this.first + this.size, from); + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0; + for (var i = 0; i < lines.length; ++i) height += lines[i].height; + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep, lineFilter) { + var lines = getLines(this, this.first, this.first + this.size, lineFilter); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: splitLines(code), origin: "setValue", full: true}, true); + setSelection(this, simpleSelection(top)); + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, + + getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, + getLineNumber: function(line) {return lineNo(line);}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") line = getLine(this, line); + return visualLine(line); + }, + + lineCount: function() {return this.size;}, + firstLine: function() {return this.first;}, + lastLine: function() {return this.first + this.size - 1;}, + + clipPos: function(pos) {return clipPos(this, pos);}, + + getCursor: function(start) { + var range = this.sel.primary(), pos; + if (start == null || start == "head") pos = range.head; + else if (start == "anchor") pos = range.anchor; + else if (start == "end" || start == "to" || start === false) pos = range.to(); + else pos = range.from(); + return pos; + }, + listSelections: function() { return this.sel.ranges; }, + somethingSelected: function() {return this.sel.somethingSelected();}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads, options)); + }), + extendSelectionsBy: docMethodOp(function(f, options) { + extendSelections(this, map(this.sel.ranges, f), options); + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) return; + for (var i = 0, out = []; i < ranges.length; i++) + out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head)); + if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex); + setSelection(this, normalizeSelection(out, primary), options); + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0); + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); + setSelection(this, normalizeSelection(ranges, ranges.length - 1), options); + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, lines; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + lines = lines ? lines.concat(sel) : sel; + } + if (lineSep === false) return lines; + else return lines.join(lineSep || "\n"); + }, + getSelections: function(lineSep) { + var parts = [], ranges = this.sel.ranges; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + if (lineSep !== false) sel = sel.join(lineSep || "\n"); + parts[i] = sel; + } + return parts; + }, + replaceSelection: function(code, collapse, origin) { + var dup = []; + for (var i = 0; i < this.sel.ranges.length; i++) + dup[i] = code; + this.replaceSelections(dup, collapse, origin || "+input"); + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], sel = this.sel; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin}; + } + var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); + for (var i = changes.length - 1; i >= 0; i--) + makeChange(this, changes[i]); + if (newSel) setSelectionReplaceHistory(this, newSel); + else if (this.cm) ensureCursorVisible(this.cm); + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), + + setExtending: function(val) {this.extend = val;}, + getExtending: function() {return this.extend;}, + + historySize: function() { + var hist = this.history, done = 0, undone = 0; + for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done; + for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone; + return {undo: done, redo: undone}; + }, + clearHistory: function() {this.history = new History(this.history.maxGeneration);}, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true); + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; + return this.history.generation; + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration); + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)}; + }, + setHistory: function(histData) { + var hist = this.history = new History(this.history.maxGeneration); + hist.done = copyHistoryArray(histData.done.slice(0), null, true); + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + if (!line[prop]) line[prop] = cls; + else if (classTest(cls).test(line[prop])) return false; + else line[prop] += " " + cls; + return true; + }); + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) return false; + else if (cls == null) line[prop] = null; + else { + var found = cur.match(classTest(cls)); + if (!found) return false; + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true; + }); + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options); + }), + removeLineWidget: function(widget) { widget.clear(); }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark"); + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + markers.push(span.marker.parent || span.marker); + } + return markers; + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to); + var found = [], lineNo = from.line; + this.iter(from.line, to.line + 1, function(line) { + var spans = line.markedSpans; + if (spans) for (var i = 0; i < spans.length; i++) { + var span = spans[i]; + if (!(lineNo == from.line && from.ch > span.to || + span.from == null && lineNo != from.line|| + lineNo == to.line && span.from > to.ch) && + (!filter || filter(span.marker))) + found.push(span.marker.parent || span.marker); + } + ++lineNo; + }); + return found; + }, + getAllMarks: function() { + var markers = []; + this.iter(function(line) { + var sps = line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) + if (sps[i].from != null) markers.push(sps[i].marker); + }); + return markers; + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first; + this.iter(function(line) { + var sz = line.text.length + 1; + if (sz > off) { ch = off; return true; } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)); + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) return 0; + this.iter(this.first, coords.line, function (line) { + index += line.text.length + 1; + }); + return index; + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = this.sel; + doc.extend = false; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc; + }, + + linkedDoc: function(options) { + if (!options) options = {}; + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) from = options.from; + if (options.to != null && options.to < to) to = options.to; + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); + if (options.sharedHist) copy.history = this.history; + (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + copySharedMarkers(copy, findSharedMarkers(this)); + return copy; + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) other = other.doc; + if (this.linked) for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) continue; + this.linked.splice(i, 1); + other.unlinkDoc(this); + detachSharedMarkers(findSharedMarkers(this)); + break; + } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); + other.history = new History(null); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode;}, + getEditor: function() {return this.cm;} + }); + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter; + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); + for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments);}; + })(Doc.prototype[prop]); + + eventMixin(Doc); + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) continue; + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) continue; + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } + } + propagate(doc, null, true); + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) throw new Error("This document is already in use."); + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + if (!cm.options.lineWrapping) findMaxLine(cm); + cm.options.mode = doc.modeOption; + regChange(cm); + } + + // LINE UTILITIES + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document."); + for (var chunk = doc; !chunk.lines;) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break; } + n -= sz; + } + } + return chunk.lines[n]; + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function(line) { + var text = line.text; + if (n == end.line) text = text.slice(0, end.ch); + if (n == start.line) text = text.slice(start.ch); + out.push(text); + ++n; + }); + return out; + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to, lineFilter) { + var out = []; + doc.iter(from, to, function(line) { + var text = line.text; + if(lineFilter){ + text = lineFilter(line); + } + out.push(text); + }); + return out; + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) for (var n = line; n; n = n.parent) n.height += diff; + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) return null; + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) break; + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first; + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i = 0; i < chunk.children.length; ++i) { + var child = chunk.children[i], ch = child.height; + if (h < ch) { chunk = child; continue outer; } + h -= ch; + n += child.chunkSize(); + } + return n; + } while (!chunk.lines); + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) break; + h -= lh; + } + return n + i; + } + + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) break; + else h += line.height; + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i = 0; i < p.children.length; ++i) { + var cur = p.children[i]; + if (cur == chunk) break; + else h += cur.height; + } + } + return h; + } + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line) { + var order = line.order; + if (order == null) order = line.order = bidiOrdering(line.text); + return order; + } + + // HISTORY + + function History(startGen) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = []; + this.undoDepth = Infinity; + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0; + this.lastOp = this.lastSelOp = null; + this.lastOrigin = this.lastSelOrigin = null; + // Used by the isClean() method + this.generation = this.maxGeneration = startGen || 1; + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); + return histChange; + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array); + if (last.ranges) array.pop(); + else break; + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done); + return lst(hist.done); + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done); + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop(); + return lst(hist.done); + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, ore are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur; + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + var last = lst(cur.changes); + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done); + if (!before || !before.ranges) + pushSelectionToHistory(doc.sel, hist.done); + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation}; + hist.done.push(cur); + while (hist.done.length > hist.undoDepth) { + hist.done.shift(); + if (!hist.done[0].ranges) hist.done.shift(); + } + } + hist.done.push(selAfter); + hist.generation = ++hist.maxGeneration; + hist.lastModTime = hist.lastSelTime = time; + hist.lastOp = hist.lastSelOp = opId; + hist.lastOrigin = hist.lastSelOrigin = change.origin; + + if (!last) signal(doc, "historyAdded"); + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0); + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, origin = options && options.origin; + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + hist.done[hist.done.length - 1] = sel; + else + pushSelectionToHistory(sel, hist.done); + + hist.lastSelTime = +new Date; + hist.lastSelOrigin = origin; + hist.lastSelOp = opId; + if (options && options.clearRedo !== false) + clearSelectionEvents(hist.undone); + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest); + if (!(top && top.ranges && top.equals(sel))) + dest.push(sel); + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { + if (line.markedSpans) + (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; + ++n; + }); + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) return null; + for (var i = 0, out; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } + else if (out) out.push(spans[i]); + } + return !out ? spans : out.length ? out : null; + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) return null; + for (var i = 0, nw = []; i < change.text.length; ++i) + nw.push(removeClearedSpans(found[i])); + return nw; + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + for (var i = 0, copy = []; i < events.length; ++i) { + var event = events[i]; + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); + continue; + } + var changes = event.changes, newChanges = []; + copy.push({changes: newChanges}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m; + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } + } + } + return copy; + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); + } + continue; + } + for (var j = 0; j < sub.changes.length; ++j) { + var cur = sub.changes[j]; + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch); + cur.to = Pos(cur.to.line + diff, cur.to.ch); + } else if (from <= cur.to.line) { + ok = false; + break; + } + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // EVENT UTILITIES + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + var e_preventDefault = CodeMirror.e_preventDefault = function(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + }; + var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + }; + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; + } + var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);}; + + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) b = 1; + else if (e.button & 2) b = 3; + else if (e.button & 4) b = 2; + } + if (mac && e.ctrlKey && b == 1) b = 3; + return b; + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var on = CodeMirror.on = function(emitter, type, f) { + if (emitter.addEventListener) + emitter.addEventListener(type, f, false); + else if (emitter.attachEvent) + emitter.attachEvent("on" + type, f); + else { + var map = emitter._handlers || (emitter._handlers = {}); + var arr = map[type] || (map[type] = []); + arr.push(f); + } + }; + + var off = CodeMirror.off = function(emitter, type, f) { + if (emitter.removeEventListener) + emitter.removeEventListener(type, f, false); + else if (emitter.detachEvent) + emitter.detachEvent("on" + type, f); + else { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + for (var i = 0; i < arr.length; ++i) + if (arr[i] == f) { arr.splice(i, 1); break; } + } + }; + + var signal = CodeMirror.signal = function(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); + }; + + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2), list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + function bnd(f) {return function(){f.apply(null, args);};}; + for (var i = 0; i < arr.length; ++i) + list.push(bnd(arr[i])); + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) delayed[i](); + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore; + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) return; + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) + set.push(arr[i]); + } + + function hasHandler(emitter, type) { + var arr = emitter._handlers && emitter._handlers[type]; + return arr && arr.length > 0; + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // MISC UTILITIES + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; + + // Reused option objects for setSelection & friends + var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; + + function Delayed() {this.id = null;} + Delayed.prototype.set = function(ms, f) { + clearTimeout(this.id); + this.id = setTimeout(f, ms); + }; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) + return n + (end - i); + n += nextTab - i; + n += tabSize - (n % tabSize); + i = nextTab + 1; + } + }; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) nextTab = string.length; + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) + return pos + Math.min(skipped, goal - col); + col += nextTab - pos; + col += tabSize - (col % tabSize); + pos = nextTab + 1; + if (col >= goal) return pos; + } + } + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + spaceStrs.push(lst(spaceStrs) + " "); + return spaceStrs[n]; + } + + function lst(arr) { return arr[arr.length-1]; } + + var selectInput = function(node) { node.select(); }; + if (ios) // Mobile Safari apparently has a bug where select() is broken. + selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; + else if (ie) // Suppress mysterious IE10 errors + selectInput = function(node) { try { node.select(); } catch(_e) {} }; + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) + if (array[i] == elt) return i; + return -1; + } + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); + return out; + } + + function nothing() {} + + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) copyObj(props, inst); + return inst; + }; + + function copyObj(obj, target, overwrite) { + if (!target) target = {}; + for (var prop in obj) + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + target[prop] = obj[prop]; + return target; + } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args);}; + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + var isWordCharBasic = CodeMirror.isWordChar = function(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); + }; + function isWordChar(ch, helper) { + if (!helper) return isWordCharBasic(ch); + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; + return helper.test(ch); + } + + function isEmpty(obj) { + for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; + return true; + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/font/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } + + // DOM UTILITIES + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) e.className = className; + if (style) e.style.cssText = style; + if (typeof content == "string") e.appendChild(document.createTextNode(content)); + else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); + return e; + } + + var range; + if (document.createRange) range = function(node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r; + }; + else range = function(node, start, end) { + var r = document.body.createTextRange(); + try { r.moveToElementText(node.parentNode); } + catch(e) { return r; } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r; + }; + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + e.removeChild(e.firstChild); + return e; + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); + } + + var contains = CodeMirror.contains = function(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + child = child.parentNode; + if (parent.contains) + return parent.contains(child); + do { + if (child.nodeType == 11) child = child.host; + if (child == parent) return true; + } while (child = child.parentNode); + }; + + function activeElt() { return document.activeElement; } + // Older versions of IE throws unspecified error when touching + // document.activeElement in some cases (during loading, in iframe) + if (ie && ie_version < 11) activeElt = function() { + try { return document.activeElement; } + catch(e) { return document.body; } + }; + + function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } + var rmClass = CodeMirror.rmClass = function(node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + var addClass = CodeMirror.addClass = function(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls; + }; + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) + if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; + return b; + } + + // WINDOW-WIDE EVENTS + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.body.getElementsByClassName) return; + var byClass = document.body.getElementsByClassName("CodeMirror"); + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror; + if (cm) f(cm); + } + } + + var globalsRegistered = false; + function ensureGlobalHandlers() { + if (globalsRegistered) return; + registerGlobalHandlers(); + globalsRegistered = true; + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer; + on(window, "resize", function() { + if (resizeTimer == null) resizeTimer = setTimeout(function() { + resizeTimer = null; + forEachCodeMirror(onResize); + }, 100); + }); + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function() { + forEachCodeMirror(onBlur); + }); + } + + // FEATURE DETECTION + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) return false; + var div = elt('div'); + return "draggable" in div || "dragDrop" in div; + }(); + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); + } + var node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node; + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) return badBidiRects; + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) + var r1 = range(txt, 1, 2).getBoundingClientRect(); + return badBidiRects = (r1.right - r0.right < 3); + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) nl = string.length; + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function(string){return string.split(/\r\n?|\n/);}; + + var hasSelection = window.getSelection ? function(te) { + try { return te.selectionStart != te.selectionEnd; } + catch(e) { return false; } + } : function(te) { + try {var range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) return false; + return range.compareEndPoints("StartToEnd", range) != 0; + }; + + var hasCopyEvent = (function() { + var e = elt("div"); + if ("oncopy" in e) return true; + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function"; + })(); + + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) return badZoomedRects; + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; + } + + // KEY NAMES + + var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 107: "=", 109: "-", 127: "Delete", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"}; + CodeMirror.keyNames = keyNames; + (function() { + // Number keys + for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i); + // Alphabetic keys + for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); + // Function keys + for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; + })(); + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, "ltr"); + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); + found = true; + } + } + if (!found) f(from, to, "ltr"); + } + + function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } + function bidiRight(part) { return part.level % 2 ? part.from : part.to; } + + function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } + function lineRight(line) { + var order = getOrder(line); + if (!order) return line.text.length; + return bidiRight(lst(order)); + } + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(line); + if (visual != line) lineN = lineNo(visual); + var order = getOrder(visual); + var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); + return Pos(lineN, ch); + } + function lineEnd(cm, lineN) { + var merged, line = getLine(cm.doc, lineN); + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + lineN = null; + } + var order = getOrder(line); + var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); + return Pos(lineN == null ? lineNo(line) : lineN, ch); + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line); + var line = getLine(cm.doc, start.line); + var order = getOrder(line); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(0, line.text.search(/\S/)); + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; + return Pos(start.line, inWS ? 0 : firstNonWS); + } + return start; + } + + function compareBidiLevel(order, a, b) { + var linedir = order[0].level; + if (a == linedir) return true; + if (b == linedir) return false; + return a < b; + } + var bidiOther; + function getBidiPartAt(order, pos) { + bidiOther = null; + for (var i = 0, found; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < pos && cur.to > pos) return i; + if ((cur.from == pos || cur.to == pos)) { + if (found == null) { + found = i; + } else if (compareBidiLevel(order, cur.level, order[found].level)) { + if (cur.from != cur.to) bidiOther = found; + return i; + } else { + if (cur.from != cur.to) bidiOther = i; + return found; + } + } + } + return found; + } + + function moveInLine(line, pos, dir, byUnit) { + if (!byUnit) return pos + dir; + do pos += dir; + while (pos > 0 && isExtendingChar(line.text.charAt(pos))); + return pos; + } + + // This is needed in order to move 'visually' through bi-directional + // text -- i.e., pressing left should make the cursor go left, even + // when in RTL text. The tricky part is the 'jumps', where RTL and + // LTR text touch each other. This often requires the cursor offset + // to move more than one unit, in order to visually move one unit. + function moveVisually(line, start, dir, byUnit) { + var bidi = getOrder(line); + if (!bidi) return moveLogically(line, start, dir, byUnit); + var pos = getBidiPartAt(bidi, start), part = bidi[pos]; + var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); + + for (;;) { + if (target > part.from && target < part.to) return target; + if (target == part.from || target == part.to) { + if (getBidiPartAt(bidi, target) == pos) return target; + part = bidi[pos += dir]; + return (dir > 0) == part.level % 2 ? part.to : part.from; + } else { + part = bidi[pos += dir]; + if (!part) return null; + if ((dir > 0) == part.level % 2) + target = moveInLine(line, part.to, -1, byUnit); + else + target = moveInLine(line, part.from, 1, byUnit); + } + } + } + + function moveLogically(line, start, dir, byUnit) { + var target = start + dir; + if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; + return target < 0 || target > line.text.length ? null : target; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6ff + var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm"; + function charType(code) { + if (code <= 0xf7) return lowTypes.charAt(code); + else if (0x590 <= code && code <= 0x5f4) return "R"; + else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); + else if (0x6ee <= code && code <= 0x8ac) return "r"; + else if (0x2000 <= code && code <= 0x200b) return "w"; + else if (code == 0x200c) return "b"; + else return "L"; + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + // Browsers seem to always treat the boundaries of block elements as being L. + var outerType = "L"; + + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; this.to = to; + } + + return function(str) { + if (!bidiRE.test(str)) return false; + var len = str.length, types = []; + for (var i = 0, type; i < len; ++i) + types.push(type = charType(str.charCodeAt(i))); + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i = 0, prev = outerType; i < len; ++i) { + var type = types[i]; + if (type == "m") types[i] = prev; + else prev = type; + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (type == "1" && cur == "r") types[i] = "n"; + else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i = 1, prev = types[0]; i < len - 1; ++i) { + var type = types[i]; + if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; + else if (type == "," && prev == types[i+1] && + (prev == "1" || prev == "n")) types[i] = prev; + prev = type; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i = 0; i < len; ++i) { + var type = types[i]; + if (type == ",") types[i] = "N"; + else if (type == "%") { + for (var end = i + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (cur == "L" && type == "1") types[i] = "L"; + else if (isStrong.test(type)) cur = type; + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + var before = (i ? types[i-1] : outerType) == "L"; + var after = (end < len ? types[end] : outerType) == "L"; + var replace = before || after ? "L" : "R"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + var start = i; + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push(new BidiSpan(0, start, i)); + } else { + var pos = i, at = order.length; + for (++i; i < len && types[i] != "L"; ++i) {} + for (var j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j)); + var nstart = j; + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, new BidiSpan(2, nstart, j)); + pos = j; + } else ++j; + } + if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)); + } + } + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + if (order[0].level == 2) + order.unshift(new BidiSpan(1, order[0].to, order[0].to)); + if (order[0].level != lst(order).level) + order.push(new BidiSpan(order[0].level, len, len)); + + return order; + }; + })(); + + // THE END + + CodeMirror.version = "5.4.1"; + + return CodeMirror; +});(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + var Pos = CodeMirror.Pos; + + function forEach(arr, f) { + for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); + } + + function arrayContains(arr, item) { + if (!Array.prototype.indexOf) { + var i = arr.length; + while (i--) { + if (arr[i] === item) { + return true; + } + } + return false; + } + return arr.indexOf(item) != -1; + } + + function scriptHint(editor, keywords, getToken, options) { + // Find the token at the cursor + var cur = editor.getCursor(), token = getToken(editor, cur); + if (/\b(?:string)\b/.test(token.type)) { + return; + } + token.state = CodeMirror.innerMode(editor.getMode(), token.state).state; + + if (!/^[\w$_]*$/.test(token.string)) { + token = { + start: cur.ch, end: cur.ch, string: "", state: token.state, + type: token.string == "." ? "property" : null + }; + } else if (token.end > cur.ch) { + token.end = cur.ch; + token.string = token.string.slice(0, cur.ch - token.start); + } + + var tprop = token; + // If it is a property, find out what it is a property of. + while (tprop.type == "property") { + tprop = getToken(editor, Pos(cur.line, tprop.start)); + if (tprop.string != ".") return; + tprop = getToken(editor, Pos(cur.line, tprop.start)); + if (!context) var context = []; + context.push(tprop); + } + return { + list: getCompletions(token, context, keywords, options), + from: Pos(cur.line, token.start), + to: Pos(cur.line, token.end) + }; + } + + function getFormulaKeywords() { + return BI.FormulaCollections; + } + + function formulaHint(editor, options) { + return scriptHint(editor, getFormulaKeywords(), + function (e, cur) { + return e.getTokenAt(cur); + }, + options); + }; + CodeMirror.registerHelper("hint", "formula", formulaHint); + + function getCompletions(token, context, keywords, options) { + var found = [], start = token.string; + if (!start) { + return found; + } + function maybeAdd(str) { + if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) { + found.push(str); + } + } + + if (context && context.length) { + context.pop(); + } else { + forEach(keywords, maybeAdd); + } + return found; + } +});(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + "use strict"; + + CodeMirror.defineMode('formula', function () { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + + var atoms = wordObj(['false', 'true']); + var keywords = wordObj(BI.FormulaCollections); + + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + var ch = stream.next(); + + if (ch === '"' || ch === '\'') { + nextUntilUnescaped(stream, ch); + return "string"; + } + if (/[\[\],\(\)]/.test(ch)) { + return 'bracket'; + } + + // richie:暂时不需要解析操作符号 + //if (/[+\-*\/=<>!&|]/.test(ch)) { + // return 'operator'; + //} + //if (/\d|\d./.test(ch)) { + // stream.eatWhile(/\d|\./); + // if (stream.eol() || !/\w/.test(stream.peek())) { + // return 'number'; + // } + //} + + + + stream.eatWhile(/[\w-]/); + var word = stream.current(); + if (atoms.hasOwnProperty(word)) { + return "atom"; + } + if (keywords.hasOwnProperty(word)) { + return "keyword"; + } + return null; + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next === end && !escaped) { + return false; + } + escaped = !escaped && next === "\\"; + } + return escaped; + } + + function tokenize(stream, state) { + return (state.tokens[0] || tokenBase)(stream, state); + } + + return { + startState: function () { + return {tokens: []}; + }, + token: function (stream, state) { + return tokenize(stream, state); + }, + fold: "brace" + }; + }); + CodeMirror.defineMIME("text/fx-formula", "formula"); +});// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function (mod) { + mod(CodeMirror); +})(function (CodeMirror) { + "use strict"; + + var HINT_ELEMENT_CLASS = "CodeMirror-hint"; + var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; + + // This is the old interface, kept around for now to stay + // backwards-compatible. + CodeMirror.showHint = function (cm, getHints, options) { + if (!getHints) return cm.showHint(options); + if (options && options.async) getHints.async = true; + var newOpts = {hint: getHints}; + if (options) for (var prop in options) newOpts[prop] = options[prop]; + return cm.showHint(newOpts); + }; + + CodeMirror.defineExtension("showHint", function (options) { + // We want a single cursor position. + if (this.listSelections().length > 1 || this.somethingSelected()) return; + + if (this.state.completionActive) this.state.completionActive.close(); + var completion = this.state.completionActive = new Completion(this, options); + if (!completion.options.hint) return; + + CodeMirror.signal(this, "startCompletion", this); + completion.update(true); + }); + + function Completion(cm, options) { + this.cm = cm; + this.options = this.buildOptions(options); + this.widget = null; + this.debounce = 0; + this.tick = 0; + this.startPos = this.cm.getCursor(); + this.startLen = this.cm.getLine(this.startPos.line).length; + + var self = this; + cm.on("cursorActivity", this.activityFunc = function () { + self.cursorActivity(); + }); + } + + var requestAnimationFrame = window.requestAnimationFrame || function (fn) { + return setTimeout(fn, 1000 / 60); + }; + var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; + + Completion.prototype = { + close: function () { + if (!this.active()) return; + this.cm.state.completionActive = null; + this.tick = null; + this.cm.off("cursorActivity", this.activityFunc); + + if (this.widget && this.data) CodeMirror.signal(this.data, "close"); + if (this.widget) this.widget.close(); + CodeMirror.signal(this.cm, "endCompletion", this.cm); + }, + + active: function () { + return this.cm.state.completionActive == this; + }, + + pick: function (data, i) { + var completion = data.list[i]; + if (completion.hint) completion.hint(this.cm, data, completion); + else { + this.cm.replaceRange(getText(completion), completion.from || data.from, + completion.to || data.to, "complete"); + var to = this.cm.getCursor(); + this.cm.markText(completion.from || data.from, to, {className: "#function", atomic: true}); + this.cm.replaceSelection("() "); + to = this.cm.getCursor(); + to.ch = to.ch - 2; + this.cm.setCursor(to); + this.cm.focus(); + } + CodeMirror.signal(data, "pick", completion); + this.close(); + }, + + cursorActivity: function () { + if (this.debounce) { + cancelAnimationFrame(this.debounce); + this.debounce = 0; + } + + var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line); + if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || + pos.ch < this.startPos.ch || this.cm.somethingSelected() || + (pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) { + this.close(); + } else { + var self = this; + this.debounce = requestAnimationFrame(function () { + self.update(); + }); + if (this.widget) this.widget.disable(); + } + }, + + update: function (first) { + if (this.tick == null) return; + if (this.data) CodeMirror.signal(this.data, "update"); + if (!this.options.hint.async) { + this.finishUpdate(this.options.hint(this.cm, this.options), first); + } else { + var myTick = ++this.tick, self = this; + this.options.hint(this.cm, function (data) { + if (self.tick == myTick) self.finishUpdate(data, first); + }, this.options); + } + }, + + finishUpdate: function (data, first) { + this.data = data; + + var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle); + if (this.widget) this.widget.close(); + if (data && data.list.length) { + if (picked && data.list.length == 1) { + this.pick(data, 0); + } else { + this.widget = new Widget(this, data); + CodeMirror.signal(data, "shown"); + } + } + }, + + buildOptions: function (options) { + var editor = this.cm.options.hintOptions; + var out = {}; + for (var prop in defaultOptions) out[prop] = defaultOptions[prop]; + if (editor) for (var prop in editor) + if (editor[prop] !== undefined) out[prop] = editor[prop]; + if (options) for (var prop in options) + if (options[prop] !== undefined) out[prop] = options[prop]; + return out; + } + }; + + function getText(completion) { + if (typeof completion == "string") return completion; + else return completion.text; + } + + function buildKeyMap(completion, handle) { + var baseMap = { + Up: function () { + handle.moveFocus(-1); + }, + Down: function () { + handle.moveFocus(1); + }, + PageUp: function () { + handle.moveFocus(-handle.menuSize() + 1, true); + }, + PageDown: function () { + handle.moveFocus(handle.menuSize() - 1, true); + }, + Home: function () { + handle.setFocus(0); + }, + End: function () { + handle.setFocus(handle.length - 1); + }, + Enter: handle.pick, + Tab: handle.pick, + Esc: handle.close + }; + var custom = completion.options.customKeys; + var ourMap = custom ? {} : baseMap; + + function addBinding(key, val) { + var bound; + if (typeof val != "string") + bound = function (cm) { + return val(cm, handle); + }; + // This mechanism is deprecated + else if (baseMap.hasOwnProperty(val)) + bound = baseMap[val]; + else + bound = val; + ourMap[key] = bound; + } + + if (custom) + for (var key in custom) if (custom.hasOwnProperty(key)) + addBinding(key, custom[key]); + var extra = completion.options.extraKeys; + if (extra) + for (var key in extra) if (extra.hasOwnProperty(key)) + addBinding(key, extra[key]); + return ourMap; + } + + function getHintElement(hintsElement, el) { + while (el && el != hintsElement) { + if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el; + el = el.parentNode; + } + } + + function Widget(completion, data) { + this.completion = completion; + this.data = data; + this.picked = false; + var widget = this, cm = completion.cm; + + var hints = this.hints = document.createElement("ul"); + hints.className = "CodeMirror-hints"; + this.selectedHint = data.selectedHint || 0; + + var completions = data.list; + for (var i = 0; i < completions.length; ++i) { + var elt = hints.appendChild(document.createElement("li")), cur = completions[i]; + var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); + if (cur.className != null) className = cur.className + " " + className; + elt.className = className; + if (cur.render) cur.render(elt, data, cur); + else elt.appendChild(document.createTextNode(cur.displayText || getText(cur))); + elt.hintId = i; + } + + var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null); + var left = pos.left, top = pos.bottom, below = true; + hints.style.left = left + "px"; + hints.style.top = top + "px"; + // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. + var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); + var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); + (completion.options.container || document.body).appendChild(hints); + var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; + if (overlapY > 0) { + var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); + if (curTop - height > 0) { // Fits above cursor + hints.style.top = (top = pos.top - height) + "px"; + below = false; + } else if (height > winH) { + hints.style.height = (winH - 5) + "px"; + hints.style.top = (top = pos.bottom - box.top) + "px"; + var cursor = cm.getCursor(); + if (data.from.ch != cursor.ch) { + pos = cm.cursorCoords(cursor); + hints.style.left = (left = pos.left) + "px"; + box = hints.getBoundingClientRect(); + } + } + } + var overlapX = box.right - winW; + if (overlapX > 0) { + if (box.right - box.left > winW) { + hints.style.width = (winW - 5) + "px"; + overlapX -= (box.right - box.left) - winW; + } + hints.style.left = (left = pos.left - overlapX) + "px"; + } + + cm.addKeyMap(this.keyMap = buildKeyMap(completion, { + moveFocus: function (n, avoidWrap) { + widget.changeActive(widget.selectedHint + n, avoidWrap); + }, + setFocus: function (n) { + widget.changeActive(n); + }, + menuSize: function () { + return widget.screenAmount(); + }, + length: completions.length, + close: function () { + completion.close(); + }, + pick: function () { + widget.pick(); + }, + data: data + })); + + if (completion.options.closeOnUnfocus) { + var closingOnBlur; + cm.on("blur", this.onBlur = function () { + closingOnBlur = setTimeout(function () { + completion.close(); + }, 100); + }); + cm.on("focus", this.onFocus = function () { + clearTimeout(closingOnBlur); + }); + } + + var startScroll = cm.getScrollInfo(); + cm.on("scroll", this.onScroll = function () { + var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect(); + var newTop = top + startScroll.top - curScroll.top; + var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop); + if (!below) point += hints.offsetHeight; + if (point <= editor.top || point >= editor.bottom) return completion.close(); + hints.style.top = newTop + "px"; + hints.style.left = (left + startScroll.left - curScroll.left) + "px"; + }); + + CodeMirror.on(hints, "dblclick", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + widget.pick(); + } + }); + + CodeMirror.on(hints, "click", function (e) { + var t = getHintElement(hints, e.target || e.srcElement); + if (t && t.hintId != null) { + widget.changeActive(t.hintId); + if (completion.options.completeOnSingleClick) widget.pick(); + } + }); + + CodeMirror.on(hints, "mousedown", function () { + setTimeout(function () { + cm.focus(); + }, 20); + }); + + CodeMirror.signal(data, "select", completions[0], hints.firstChild); + return true; + } + + Widget.prototype = { + close: function () { + if (this.completion.widget != this) return; + this.completion.widget = null; + this.hints.parentNode.removeChild(this.hints); + this.completion.cm.removeKeyMap(this.keyMap); + + var cm = this.completion.cm; + if (this.completion.options.closeOnUnfocus) { + cm.off("blur", this.onBlur); + cm.off("focus", this.onFocus); + } + cm.off("scroll", this.onScroll); + }, + + disable: function () { + this.completion.cm.removeKeyMap(this.keyMap); + var widget = this; + this.keyMap = { + Enter: function () { + widget.picked = true; + } + }; + this.completion.cm.addKeyMap(this.keyMap); + }, + + pick: function () { + this.completion.pick(this.data, this.selectedHint); + }, + + changeActive: function (i, avoidWrap) { + if (i >= this.data.list.length) + i = avoidWrap ? this.data.list.length - 1 : 0; + else if (i < 0) + i = avoidWrap ? 0 : this.data.list.length - 1; + if (this.selectedHint == i) return; + var node = this.hints.childNodes[this.selectedHint]; + node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); + node = this.hints.childNodes[this.selectedHint = i]; + node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; + if (node.offsetTop < this.hints.scrollTop) + this.hints.scrollTop = node.offsetTop - 3; + else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) + this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; + CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); + }, + + screenAmount: function () { + return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; + } + }; + + CodeMirror.registerHelper("hint", "auto", function (cm, options) { + var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; + if (helpers.length) { + for (var i = 0; i < helpers.length; i++) { + var cur = helpers[i](cm, options); + if (cur && cur.list.length) return cur; + } + } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { + if (words) return CodeMirror.hint.fromList(cm, {words: words}); + } else if (CodeMirror.hint.anyword) { + return CodeMirror.hint.anyword(cm, options); + } + }); + + CodeMirror.registerHelper("hint", "fromList", function (cm, options) { + var cur = cm.getCursor(), token = cm.getTokenAt(cur); + var found = []; + for (var i = 0; i < options.words.length; i++) { + var word = options.words[i]; + if (word.slice(0, token.string.length) == token.string) + found.push(word); + } + + if (found.length) return { + list: found, + from: CodeMirror.Pos(cur.line, token.start), + to: CodeMirror.Pos(cur.line, token.end) + }; + }); + + CodeMirror.commands.autocomplete = CodeMirror.showHint; + + var defaultOptions = { + hint: CodeMirror.hint.auto, + completeSingle: true, + alignWithWord: true, + closeCharacters: /[\s()\[\]{};:>,]/, + closeOnUnfocus: true, + completeOnSingleClick: true, + container: null, + customKeys: null, + extraKeys: null + }; + + CodeMirror.defineOption("hintOptions", null); +});/** + * Created by User on 2017/3/21. + */ +BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"]; +/** + * 公式编辑控件 + * @class BI.FormulaEditor + * @extends BI.Widget + */ +BI.FormulaEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-formula-editor bi-card', + watermark: '', + value: '', + fieldTextValueMap: {}, + showHint: true, + lineHeight: 2 + }); + }, + _init: function () { + BI.FormulaEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.editor = CodeMirror(this.element[0], { + textWrapping: true, + lineWrapping: true, + lineNumbers: false, + mode: 'formula' + }); + o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); + this.editor.on("change", function (cm, change) { + self._checkWaterMark(); + if (o.showHint) { + CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false}); + } + BI.nextTick(function () { + self.fireEvent(BI.FormulaEditor.EVENT_CHANGE) + }); + }); + + this.editor.on("focus", function () { + self._checkWaterMark(); + self.fireEvent(BI.FormulaEditor.EVENT_FOCUS); + }); + + this.editor.on("blur", function () { + self.fireEvent(BI.FormulaEditor.EVENT_BLUR); + }); + + + if (BI.isKey(o.value)) { + self.setValue(o.value); + } + + if (BI.isKey(this.options.watermark)) { + var self = this; + this.watermark = BI.createWidget({ + type: "bi.label", + cls: "bi-water-mark", + text: this.options.watermark, + whiteSpace: "nowrap", + textAlign: "left" + }); + BI.createWidget({ + type: "bi.absolute", + element: self, + items: [{ + el: self.watermark, + left: 0, + top: 0 + }] + }); + + this.watermark.element.bind( + "mousedown", function (e) { + self.insertString(""); + self.editor.focus(); + e.stopEvent(); + } + ); + this.watermark.element.bind("click", function (e) { + self.editor.focus(); + e.stopEvent(); + }); + this.watermark.element.css({ + position: "absolute", + left: 3, + right: 3, + top: 6, + bottom: 0 + }); + } + }, + + _checkWaterMark: function () { + var o = this.options; + if (!this.disabledWaterMark && BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + disableWaterMark: function () { + this.disabledWaterMark = true; + this._checkWaterMark(); + }, + + focus: function () { + this.editor.focus(); + }, + + /** + * 添加字段 + * @param field + */ + insertField: function (field) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(field); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"}); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + insertFunction: function (fn) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(fn); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "#function", atomic: true}); + this.editor.replaceSelection("() "); + to = this.editor.getCursor(); + to.ch = to.ch - 2; + this.editor.setCursor(to); + this.editor.focus(); + }, + insertOperator: function (op) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(op); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "%operator", atomic: true}); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + setFunction: function (v) { + var from = this.editor.getCursor(); + this.editor.replaceSelection(v); + var to = this.editor.getCursor(); + this.editor.markText(from, to, {className: "#function", atomic: true}); + }, + + insertString: function (str) { + this.editor.replaceSelection(str); + this.editor.focus(); + }, + + getFormulaString: function () { + return this.editor.getValue(); + }, + + getUsedFields: function () { + var fieldMap = this.options.fieldTextValueMap; + var fields = []; + this.editor.getValue(true, function (line) { + var value = line.text; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "fieldName": + var dId = fieldMap[value.substr(i.from, i.to - i.from)]; + if (!fields.contains(dId)) { + fields.push(dId); + } + + } + }); + }); + return fields; + }, + + getCheckString: function () { + return this.editor.getValue(true, function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + + switch (i.marker.className) { + case "fieldName": + var fieldNameLength = i.to - i.from; + value = value.substr(0, i.from + num) + "$a" + value.substr(i.to + num, value.length); + num = num + 2 - fieldNameLength; + break; + } + + }); + return value; + }); + }, + + getValue: function () { + var fieldMap = this.options.fieldTextValueMap; + return this.editor.getValue("\n", function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "fieldName": + var fieldNameLength = i.to - i.from; + var fieldId = fieldMap[value.substr(i.from + num, fieldNameLength)]; + value = value.substr(0, i.from + num) + "$\{" + fieldMap[value.substr(i.from + num, fieldNameLength)] + "\}" + value.substr(i.to + num, value.length); + num += fieldId.length - fieldNameLength + 3; + break; + } + }); + return value; + }); + }, + + setValue: function (value) { + this.editor.setValue(value); + }, + + setFieldTextValueMap: function (fieldTextValueMap) { + this.options.fieldTextValueMap = fieldTextValueMap; + }, + + refresh: function () { + var self = this; + BI.nextTick(function () { + self.editor.refresh(); + }); + } + +}); +BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.formula_editor", BI.FormulaEditor); +/** + * z-index在1亿层级 + * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现) + * @class BI.Msg + */ +$.extend(BI, { + Msg: function () { + + var messageShow, $mask, $pop; + + return { + alert: function (title, message, callback) { + this._show(false, title, message, callback); + }, + confirm: function (title, message, callback) { + this._show(true, title, message, callback); + }, + prompt: function (title, message, value, callback, min_width) { + // BI.Msg.prompt(title, message, value, callback, min_width); + }, + toast: function (message, level, context) { + context = context || $("body"); + var toast = BI.createWidget({ + type: "bi.toast", + level: level, + text: message + }); + BI.createWidget({ + type: "bi.absolute", + element: context, + items: [{ + el: toast, + left: "50%", + top: 0 + }] + }); + if (toast.element.outerWidth() > context.outerWidth()) { + toast.setWidth(context.width()); + } + toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); + toast.invisible(); + toast.element.slideDown(500, function () { + BI.delay(function () { + toast.element.slideUp(500, function () { + toast.destroy(); + }) + }, 5000) + }) + }, + _show: function (hasCancel, title, message, callback) { + $mask = $('<div class="bi-z-index-mask">').css({ + position: 'absolute', + 'zIndex': BI.zIndex_tip - 2, + top: 0, + left: 0, + right: 0, + bottom: 0, + opacity: 0.5 + }).appendTo('body'); + $pop = $('<div class="bi-message-depend">').css({ + position: 'absolute', + 'zIndex': BI.zIndex_tip - 1, + top: 0, + left: 0, + right: 0, + bottom: 0 + }).appendTo('body'); + var close = function () { + messageShow.destroy(); + $mask.remove(); + }; + var controlItems = []; + if (hasCancel === true) { + controlItems.push({ + el: { + type: 'bi.button', + text: BI.i18nText("BI-Basic_Cancel"), + height: 30, + level: 'ignore', + handler: function () { + close(); + if (BI.isFunction(callback)) { + callback.apply(null, [false]); + } + } + } + }); + } + controlItems.push({ + el: { + type: 'bi.button', + text: BI.i18nText("BI-Basic_OK"), + height: 30, + handler: function () { + close(); + if (BI.isFunction(callback)) { + callback.apply(null, [true]); + } + } + } + }); + var conf = { + element: $pop, + type: 'bi.center_adapt', + items: [ + { + type: 'bi.border', + cls: 'bi-message-content bi-card', + items: { + 'north': { + el: { + type: 'bi.border', + cls: 'bi-message-title bi-background', + items: { + center: { + el: { + type: 'bi.label', + text: title || BI.i18nText("BI-Basic_Prompt"), + textAlign: 'left', + hgap: 20, + height: 50 + } + }, + east: { + el: { + type: 'bi.icon_button', + cls: 'bi-message-close close-font', +// height: 50, + handler: function () { + close(); + } + }, + width: 60 + } + } + }, + height: 50 + }, + 'center': { + el: { + type: "bi.text", + cls: "bi-message-text", + tgap: 60, + hgap: 20, + lineHeight: 30, + whiteSpace: "normal", + text: message + } + }, + 'south': { + el: { + type: "bi.absolute", + items: [{ + el: { + type: 'bi.right_vertical_adapt', + hgap: 5, + items: controlItems + }, + top: 0, + left: 20, + right: 20, + bottom: 0 + }] + + }, + height: 60 + } + }, + width: 400, + height: 300 + } + ] + }; + + messageShow = BI.createWidget(conf); + } + }; + }() +});/** + * GridView + * + * Created by GUY on 2016/1/11. + * @class BI.GridView + * @extends BI.Widget + */ +BI.GridView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-view", + // width: 400, //必设 + // height: 300, //必设 + overflowX: true, + overflowY: true, + overscanColumnCount: 0, + overscanRowCount: 0, + rowHeightGetter: BI.emptyFn, //number类型或function类型 + columnWidthGetter: BI.emptyFn, //number类型或function类型 + // estimatedColumnSize: 100, //columnWidthGetter为function时必设 + // estimatedRowSize: 30, //rowHeightGetter为function时必设 + scrollLeft: 0, + scrollTop: 0, + items: [] + }); + }, + + _init: function () { + BI.GridView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + this._debounceRelease = BI.debounce(function () { + self._scrollLock = false; + }, 1000 / 60); + this.container = BI.createWidget({ + type: "bi.absolute" + }); + this.element.scroll(function () { + if (self._scrollLock === true) { + return; + } + o.scrollLeft = self.element.scrollLeft(); + o.scrollTop = self.element.scrollTop(); + self._calculateChildrenToRender(); + self.fireEvent(BI.GridView.EVENT_SCROLL, { + scrollLeft: o.scrollLeft, + scrollTop: o.scrollTop + }); + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + scrollable: o.overflowX === true && o.overflowY === true, + scrolly: o.overflowX === false && o.overflowY === true, + scrollx: o.overflowX === true && o.overflowY === false, + items: [this.container] + }); + if (o.items.length > 0) { + this._populate(); + } + if (o.scrollLeft !== 0 || o.scrollTop !== 0) { + BI.nextTick(function () { + self.element.scrollTop(o.scrollTop); + self.element.scrollLeft(o.scrollLeft); + }); + } + }, + + _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) { + return { + overscanStartIndex: Math.max(0, startIndex - overscanCellsCount), + overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount) + } + }, + + _calculateChildrenToRender: function () { + var self = this, o = this.options; + + var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()), + scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()), + overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount; + + if (height > 0 && width > 0) { + var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft); + var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop); + + if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) { + return; + } + var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft); + var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop); + + this._renderedColumnStartIndex = visibleColumnIndices.start; + this._renderedColumnStopIndex = visibleColumnIndices.stop; + this._renderedRowStartIndex = visibleRowIndices.start; + this._renderedRowStopIndex = visibleRowIndices.stop; + + var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex) + + var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex); + + var columnStartIndex = overscanColumnIndices.overscanStartIndex; + var columnStopIndex = overscanColumnIndices.overscanStopIndex; + var rowStartIndex = overscanRowIndices.overscanStartIndex; + var rowStopIndex = overscanRowIndices.overscanStopIndex; + + //算区间size + var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex); + var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex); + var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex); + var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex); + var top = minRowDatum.offset + verticalOffsetAdjustment; + var left = minColumnDatum.offset + horizontalOffsetAdjustment; + var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size; + var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size; + //如果滚动的区间并没有超出渲染的范围 + if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) { + return; + } + + var renderedCells = [], renderedKeys = [], renderedWidgets = {}; + var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0; + var count = 0; + for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { + var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); + + for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { + var key = [rowIndex, columnIndex]; + var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); + + var index = BI.deepIndexOf(this.renderedKeys, key); + var child; + if (index > -1) { + if (columnDatum.size !== this.renderedCells[index]._width) { + this.renderedCells[index]._width = columnDatum.size; + this.renderedCells[index].el.setWidth(columnDatum.size); + } + if (rowDatum.size !== this.renderedCells[index]._height) { + this.renderedCells[index]._height = rowDatum.size; + this.renderedCells[index].el.setHeight(rowDatum.size); + } + if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) { + this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) + "px"); + } + if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) { + this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) + "px"); + } + renderedCells.push(child = this.renderedCells[index]); + } else { + child = BI.createWidget(BI.extend({ + type: "bi.label", + width: columnDatum.size, + height: rowDatum.size + }, o.items[rowIndex][columnIndex], { + cls: (o.items[rowIndex][columnIndex].cls || "") + " grid-cell" + (rowIndex === 0 ? " first-row" : "") + (columnIndex === 0 ? " first-col" : ""), + _rowIndex: rowIndex, + _columnIndex: columnIndex, + _left: columnDatum.offset + horizontalOffsetAdjustment, + _top: rowDatum.offset + verticalOffsetAdjustment + })); + renderedCells.push({ + el: child, + left: columnDatum.offset + horizontalOffsetAdjustment, + top: rowDatum.offset + verticalOffsetAdjustment, + _left: columnDatum.offset + horizontalOffsetAdjustment, + _top: rowDatum.offset + verticalOffsetAdjustment, + _width: columnDatum.size, + _height: rowDatum.size + }); + } + minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment); + maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size); + minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment); + maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size); + renderedKeys.push(key); + renderedWidgets[count++] = child; + } + } + //已存在的, 需要添加的和需要删除的 + var existSet = {}, addSet = {}, deleteArray = []; + BI.each(renderedKeys, function (i, key) { + if (BI.deepContains(self.renderedKeys, key)) { + existSet[i] = key; + } else { + addSet[i] = key; + } + }); + BI.each(this.renderedKeys, function (i, key) { + if (BI.deepContains(existSet, key)) { + return; + } + if (BI.deepContains(addSet, key)) { + return; + } + deleteArray.push(i); + }); + BI.each(deleteArray, function (i, index) { + //性能优化,不调用destroy方法防止触发destroy事件 + self.renderedCells[index].el._destroy(); + }); + var addedItems = []; + BI.each(addSet, function (index) { + addedItems.push(renderedCells[index]) + }); + this.container.addItems(addedItems); + //拦截父子级关系 + this.container._children = renderedWidgets; + this.container.attr("items", renderedCells); + this.renderedCells = renderedCells; + this.renderedKeys = renderedKeys; + this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY}; + } + }, + + _getMaxScrollLeft: function () { + return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + }, + + _getMaxScrollTop: function () { + return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + }, + + _populate: function (items) { + var self = this, o = this.options; + this._reRange(); + if (items && items !== this.options.items) { + this.options.items = items; + } + if (o.items.length > 0) { + this.columnCount = o.items[0].length; + this.rowCount = o.items.length; + } else { + this.rowCount = 0; + this.columnCount = 0; + } + this.container.setWidth(this.columnCount * o.estimatedColumnSize); + this.container.setHeight(this.rowCount * o.estimatedRowSize); + + this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize); + this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize); + + this._calculateChildrenToRender(); + this.element.scrollTop(o.scrollTop); + this.element.scrollLeft(o.scrollLeft); + }, + + setScrollLeft: function (scrollLeft) { + if (this.options.scrollLeft === scrollLeft) { + return; + } + this._scrollLock = true; + this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollLeft(this.options.scrollLeft); + }, + + setScrollTop: function (scrollTop) { + if (this.options.scrollTop === scrollTop) { + return; + } + this._scrollLock = true; + this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop()); + this._debounceRelease(); + this._calculateChildrenToRender(); + this.element.scrollTop(this.options.scrollTop); + }, + + setOverflowX: function (b) { + var self = this; + if (this.options.overflowX !== !!b) { + this.options.overflowX = !!b; + BI.nextTick(function () { + self.element.css({overflowX: !!b ? "auto" : "hidden"}); + }); + } + }, + + setOverflowY: function (b) { + var self = this; + if (this.options.overflowY !== !!b) { + this.options.overflowY = !!b; + BI.nextTick(function () { + self.element.css({overflowY: !!b ? "auto" : "hidden"}); + }); + } + }, + + getScrollLeft: function () { + return this.options.scrollLeft; + }, + + getScrollTop: function () { + return this.options.scrollTop; + }, + + getMaxScrollLeft: function () { + return this._getMaxScrollLeft(); + }, + + getMaxScrollTop: function () { + return this._getMaxScrollTop(); + }, + + setEstimatedColumnSize: function (width) { + this.options.estimatedColumnSize = width; + }, + + setEstimatedRowSize: function (height) { + this.options.estimatedRowSize = height; + }, + + //重新计算children + _reRange: function () { + this.renderRange = {}; + }, + + _clearChildren: function () { + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + BI.each(this.renderedCells, function (i, cell) { + cell.el._destroy(); + }); + this._clearChildren(); + this.renderedCells = []; + this.renderedKeys = []; + this.renderRange = {}; + this._scrollLock = false; + }, + + populate: function (items) { + if (items && items !== this.options.items) { + this.restore(); + } + this._populate(items); + } +}); +BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut('bi.grid_view', BI.GridView);/** + * floatBox弹出层, + * @class BI.FloatBox + * @extends BI.Widget + */ +BI.FloatBox = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-float-box bi-card", + width: 600, + height: 500 + }) + }, + _init: function () { + BI.FloatBox.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.showAction = new BI.ShowAction({ + tar: this + }); + this._center = BI.createWidget(); + this._north = BI.createWidget(); + this.element.draggable && this.element.draggable({ + handle: ".bi-message-title", + drag: function (e, ui) { + var W = $("body").width(), H = $("body").height(); + if (ui.position.left + o.width > W) { + ui.position.left = W - o.width; + } + if (ui.position.top + o.height > H) { + ui.position.top = H - o.height; + } + if (ui.position.left < 0) { + ui.position.left = 0; + } + if (ui.position.top < 0) { + ui.position.top = 0; + } + } + }); + this._south = BI.createWidget(); + BI.createWidget({ + type: 'bi.border', + element: this, + items: { + 'north': { + el: { + type: 'bi.border', + cls: 'bi-message-title bi-background', + items: { + center: { + el: { + type: "bi.absolute", + items: [{ + el: this._north, + left: 10, + top: 0, + right: 0, + bottom: 0 + }] + } + }, + east: { + el: { + type: 'bi.icon_button', + cls: 'bi-message-close close-font', + height: 50, + handler: function () { + self.currentSectionProvider.close(); + } + }, + width: 60 + } + } + }, + height: 50 + }, + 'center': { + el: { + type: "bi.absolute", + items: [{ + el: this._center, + left: 10, + top: 10, + right: 10, + bottom: 10 + }] + } + }, + 'south': { + el: { + type: "bi.absolute", + items: [{ + el: this._south, + left: 10, + top: 0, + right: 10, + bottom: 0 + }] + }, + height: 60 + } + } + }) + }, + + populate: function (sectionProvider) { + var self = this; + if (this.currentSectionProvider && this.currentSectionProvider !== sectionProvider) { + this.currentSectionProvider.destroy(); + } + this.currentSectionProvider = sectionProvider; + sectionProvider.rebuildNorth(this._north); + sectionProvider.rebuildCenter(this._center); + sectionProvider.rebuildSouth(this._south); + sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () { + self.close(); + }) + }, + + show: function () { + this.showAction.actionPerformed(); + }, + + hide: function () { + this.showAction.actionBack(); + }, + + open: function () { + this.show(); + this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN); + }, + + close: function () { + this.hide(); + this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED); + }, + + setZindex: function (zindex) { + this.element.css({"z-index": zindex}); + }, + + destroyed: function () { + this.currentSectionProvider && this.currentSectionProvider.destroy(); + } +}); + +BI.shortcut("bi.float_box", BI.FloatBox); + +BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED"; +BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED"; +/** + * 下拉框弹出层, zIndex在1000w + * @class BI.PopupView + * @extends BI.Widget + */ +BI.PopupView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-popup-view", + maxWidth: 'auto', + minWidth: 100, + //maxHeight: 200, + minHeight: 25, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + direction: BI.Direction.Top, //工具栏的方向 + stopEvent: false,//是否停止mousedown、mouseup事件 + stopPropagation: false, //是否停止mousedown、mouseup向上冒泡 + logic: { + dynamic: true + }, + + tool: false, //自定义工具栏 + tabs: [], //导航栏 + buttons: [], //toolbar栏 + + el: { + type: "bi.button_group", + items: [], + chooseType: 0, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.PopupView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var fn = function (e) { + e.stopPropagation(); + }, stop = function (e) { + e.stopEvent(); + return false; + }; + this.element.css({ + "z-index": BI.zIndex_popup, + "min-width": o.minWidth + "px", + "max-width": o.maxWidth + "px" + }).bind({"click": fn}); + + this.element.bind("mousewheel", fn); + + o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn}); + o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop}); + this.tool = this._createTool(); + this.tab = this._createTab(); + this.view = this._createView(); + this.toolbar = this._createToolBar(); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.PopupView.EVENT_CHANGE); + } + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + scrolly: false, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap, + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, + BI.extend({ + cls: "list-view-outer bi-card bi-border" + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar) + }))) + ) + })))); + }, + + _createView: function () { + var o = this.options; + this.button_group = BI.createWidget(o.el, {type: "bi.button_group"}); + this.button_group.element.css({"min-height": o.minHeight + "px"}); + return this.button_group; + }, + + _createTool: function () { + var o = this.options; + if (false === o.tool) { + return; + } + return BI.createWidget(o.tool) + }, + + _createTab: function () { + var o = this.options; + if (o.tabs.length === 0) { + return; + } + return BI.createWidget({ + type: "bi.center", + cls: "list-view-tab", + height: 25, + items: o.tabs + }) + }, + + _createToolBar: function () { + var o = this.options; + if (o.buttons.length === 0) { + return; + } + + return BI.createWidget({ + type: "bi.center", + cls: "list-view-toolbar bi-high-light bi-border-top", + height: 30, + items: BI.createItems(o.buttons, { + once: false, + shadow: true, + isShadowShowingOnSelected: true + }) + }) + }, + + getView: function () { + return this.button_group; + }, + + populate: function (items) { + this.button_group.populate.apply(this.button_group, arguments); + }, + + resetWidth: function (w) { + this.options.width = w; + this.element.width(w); + }, + + resetHeight: function (h) { + var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 30) : 0, + tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0, + toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0); + this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) : + this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"}) + }, + + setValue: function (selectedValues) { + this.tab && this.tab.setValue(selectedValues); + this.button_group.setValue(selectedValues); + }, + + getValue: function () { + return this.button_group.getValue(); + } +}); +BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.popup_view", BI.PopupView);/** + * 搜索面板 + * + * Created by GUY on 2015/9/28. + * @class BI.SearcherView + * @extends BI.Pane + */ + +BI.SearcherView = BI.inherit(BI.Pane, { + _defaultConfig: function () { + var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-searcher-view bi-card", + tipText: BI.i18nText("BI-No_Select"), + chooseType: BI.Selection.Single, + + matcher: {//完全匹配的构造器 + type: "bi.button_group", + behaviors: { + redmark: function () { + return true; + } + }, + items: [], + layouts: [{ + type: "bi.vertical" + }] + }, + searcher: { + type: "bi.button_group", + behaviors: { + redmark: function () { + return true; + } + }, + items: [], + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.SearcherView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.matcher = BI.createWidget(o.matcher, { + type: "bi.button_group", + chooseType: o.chooseType, + behaviors: { + redmark: function () { + return true; + } + }, + layouts: [{ + type: "bi.vertical" + }] + }); + this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); + } + }); + this.spliter = BI.createWidget({ + type: "bi.vertical", + height: 1, + hgap: 10, + items: [{ + type: "bi.layout", + height: 1, + cls: "searcher-view-spliter bi-background" + }] + }); + this.searcher = BI.createWidget(o.searcher, { + type: "bi.button_group", + chooseType: o.chooseType, + behaviors: { + redmark: function () { + return true; + } + }, + layouts: [{ + type: "bi.vertical" + }] + }); + this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.matcher, this.spliter, this.searcher] + }); + }, + + startSearch: function () { + + }, + + stopSearch: function () { + + }, + + setValue: function (v) { + this.matcher.setValue(v); + this.searcher.setValue(v); + }, + + getValue: function () { + return this.matcher.getValue().concat(this.searcher.getValue()); + }, + + populate: function (searchResult, matchResult, keyword) { + searchResult || (searchResult = []); + matchResult || (matchResult = []); + this.setTipVisible(searchResult.length + matchResult.length === 0); + this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult)); + this.matcher.populate(matchResult, keyword); + this.searcher.populate(searchResult, keyword); + }, + + empty: function () { + this.searcher.empty(); + this.matcher.empty(); + }, + + hasMatched: function () { + return this.matcher.getAllButtons().length > 0; + } +}); +BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.searcher_view", BI.SearcherView);/** + * 表示当前对象 + * + * Created by GUY on 2017/5/23. + * @class BI.ListView + * @extends BI.Widget + */ +BI.ListView = BI.inherit(BI.Widget, { + props: function () { + return { + baseCls: "bi-list-view", + overscanHeight: 100, + blockSize: 10, + scrollTop: 0, + el: {}, + items: [] + }; + }, + + init: function () { + var self = this; + this.renderedIndex = -1; + this.cache = {}; + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.vertical", + items: [BI.extend({ + type: "bi.vertical", + scrolly: false, + ref: function () { + self.container = this; + } + }, o.el)], + element: this + } + }, + + mounted: function () { + var self = this, o = this.options; + this._populate(); + this.element.scroll(function (e) { + o.scrollTop = self.element.scrollTop(); + self._calculateBlocksToRender(); + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._calculateBlocksToRender(); + }); + }, + + _renderMoreIf: function () { + var self = this, o = this.options; + var height = this.element.height(); + var minContentHeight = o.scrollTop + height + o.overscanHeight; + var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, + cnt = this.renderedIndex + 1; + var lastHeight; + var getElementHeight = function () { + return self.container.element.height(); + }; + while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { + var items = o.items.slice(index, index + o.blockSize); + this.container.addItems(items); + var addedHeight = getElementHeight() - lastHeight; + this.cache[cnt] = { + index: index, + scrollTop: lastHeight, + height: addedHeight + }; + this.renderedIndex = cnt; + cnt++; + index += o.blockSize; + } + }, + + _calculateBlocksToRender: function () { + var o = this.options; + this._renderMoreIf(); + }, + + _populate: function (items) { + var o = this.options; + if (items && this.options.items !== items) { + this.options.items = items; + } + this._calculateBlocksToRender(); + this.element.scrollTop(o.scrollTop); + }, + + restore: function () { + this.renderedIndex = -1; + this.container.empty(); + this.cache = {}; + }, + + populate: function (items) { + if (items && this.options.items !== items) { + this.restore(); + } + this._populate(); + }, + + destroyed: function () { + this.restore(); + } +}); +BI.shortcut('bi.list_view', BI.ListView); + +/** + * 表示当前对象 + * + * Created by GUY on 2017/5/22. + * @class BI.VirtualList + * @extends BI.Widget + */ +BI.VirtualList = BI.inherit(BI.Widget, { + props: function () { + return { + baseCls: "bi-virtual-list", + overscanHeight: 100, + blockSize: 10, + scrollTop: 0, + items: [] + }; + }, + + init: function () { + var self = this; + this.renderedIndex = -1; + this.cache = {}; + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.vertical", + items: [{ + type: "bi.layout", + ref: function () { + self.topBlank = this; + } + }, { + type: "bi.vertical", + scrolly: false, + ref: function () { + self.container = this; + } + }, { + type: "bi.layout", + ref: function () { + self.bottomBlank = this; + } + }], + element: this + } + }, + + mounted: function () { + var self = this, o = this.options; + this._populate(); + this.element.scroll(function (e) { + o.scrollTop = self.element.scrollTop(); + self._calculateBlocksToRender(); + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._calculateBlocksToRender(); + }); + }, + + _renderMoreIf: function () { + var self = this, o = this.options; + var height = this.element.height(); + var minContentHeight = o.scrollTop + height + o.overscanHeight; + var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0, + cnt = this.renderedIndex + 1; + var lastHeight; + var getElementHeight = function () { + return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height(); + }; + while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { + var items = o.items.slice(index, index + o.blockSize); + this.container.addItems(items); + var addedHeight = getElementHeight() - lastHeight; + this.cache[cnt] = { + index: index, + scrollTop: lastHeight, + height: addedHeight + }; + this.tree.set(cnt, addedHeight); + this.renderedIndex = cnt; + cnt++; + index += o.blockSize; + } + }, + + _calculateBlocksToRender: function () { + var o = this.options; + this._renderMoreIf(); + var height = this.element.height(); + var minContentHeightFrom = o.scrollTop - o.overscanHeight; + var minContentHeightTo = o.scrollTop + height + o.overscanHeight; + var start = this.tree.greatestLowerBound(minContentHeightFrom); + var end = this.tree.leastUpperBound(minContentHeightTo); + var needDestroyed = []; + for (var i = 0; i < start; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + needDestroyed.push(this.container._children[j]); + this.container._children[j] = null; + } + this.cache[i].destroyed = true; + } + } + for (var i = end + 1; i <= this.renderedIndex; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + needDestroyed.push(this.container._children[j]); + this.container._children[j] = null; + } + this.cache[i].destroyed = true; + } + } + var firstFragment = document.createDocumentFragment(), lastFragment = document.createDocumentFragment(); + var currentFragment = firstFragment; + for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { + var index = this.cache[i].index; + if (!this.cache[i].destroyed) { + currentFragment = lastFragment; + } + if (this.cache[i].destroyed === true) { + for (var j = index; j < index + o.blockSize && j < o.items.length; j++) { + var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j]))); + currentFragment.appendChild(w.element[0]); + } + this.cache[i].destroyed = false; + } + } + this.container.element.prepend(firstFragment); + this.container.element.append(lastFragment); + this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop); + var lastCache = this.cache[Math.min(end, this.renderedIndex)]; + this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height); + BI.each(needDestroyed, function (i, child) { + child && child._destroy(); + }); + }, + + _populate: function (items) { + var o = this.options; + if (items && this.options.items !== items) { + this.options.items = items; + } + this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize)); + this._calculateBlocksToRender(); + this.element.scrollTop(o.scrollTop); + }, + + _clearChildren: function () { + BI.each(this.container._children, function (i, cell) { + cell && cell.el._destroy(); + }); + this.container._children = {}; + this.container.attr("items", []); + }, + + restore: function () { + this.renderedIndex = -1; + this._clearChildren(); + this.cache = {}; + this.options.scrollTop = 0; + }, + + populate: function (items) { + if (items && this.options.items !== items) { + this.restore(); + } + this._populate(); + }, + + destroyed: function () { + this.restore(); + } +}); +BI.shortcut('bi.virtual_list', BI.VirtualList); + +/** + * 分页控件 + * + * Created by GUY on 2015/8/31. + * @class BI.Pager + * @extends BI.Widget + */ +BI.Pager = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-pager", + behaviors: {}, + layouts: [{ + type: "bi.horizontal", + hgap: 10, + vgap: 0 + }], + + dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 + //dynamicShow为false时以下两个有用 + dynamicShowFirstLast: false,//是否动态显示首页、尾页 + dynamicShowPrevNext: false,//是否动态显示上一页、下一页 + pages: false, //总页数 + curr: function () { + return 1; + }, //初始化当前页 + groups: 0, //连续显示分页数 + jump: BI.emptyFn, //分页的回调函数 + + first: false, //是否显示首页 + last: false, //是否显示尾页 + prev: "上一页", + next: "下一页", + + firstPage: 1, + lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 + return 1; + }, + hasPrev: BI.emptyFn, //pages不可用时有效 + hasNext: BI.emptyFn //pages不可用时有效 + }) + }, + _init: function () { + BI.Pager.superclass._init.apply(this, arguments); + var self = this; + this.currPage = BI.result(this.options, "curr"); + //翻页太灵敏 + // this._lock = false; + // this._debouce = BI.debounce(function () { + // self._lock = false; + // }, 300); + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options, view = [], dict = {}; + this.empty(); + var pages = BI.result(o, "pages"); + var curr = BI.result(this, "currPage"); + var groups = BI.result(o, "groups"); + var first = BI.result(o, "first"); + var last = BI.result(o, "last"); + var prev = BI.result(o, "prev"); + var next = BI.result(o, "next"); + + if (pages === false) { + groups = 0; + first = false; + last = false; + } else { + groups > pages && (groups = pages); + } + + //计算当前组 + dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); + + //当前页非首页,则输出上一页 + if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { + if (BI.isKey(prev)) { + view.push({ + text: prev, + value: "prev", + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }) + } else { + view.push(BI.extend({ + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }, prev)); + } + } + + //当前组非首组,则输出首页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { + view.push({ + text: first, + value: "first", + disabled: !(dict.index > 1 && groups !== 0) + }); + if (dict.index > 1 && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + } + + //输出当前页组 + dict.poor = Math.floor((groups - 1) / 2); + dict.start = dict.index > 1 ? curr - dict.poor : 1; + dict.end = dict.index > 1 ? (function () { + var max = curr + (groups - dict.poor - 1); + return max > pages ? pages : max; + }()) : groups; + if (dict.end - dict.start < groups - 1) { //最后一组状态 + dict.start = dict.end - groups + 1; + } + var s = dict.start, e = dict.end; + if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { + s++; + e--; + } + for (; s <= e; s++) { + if (s === curr) { + view.push({ + text: s, + value: s, + selected: true + }) + } else { + view.push({ + text: s, + value: s + }) + } + } + + //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { + if (pages > groups && dict.end < pages && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + view.push({ + text: last, + value: "last", + disabled: !(pages > groups && dict.end < pages && groups !== 0) + }) + } + + //当前页不为尾页时,输出下一页 + dict.flow = !prev && groups === 0; + if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { + view.push((function () { + if (BI.isKey(next)) { + if (pages === false) { + return {text: next, value: "next", disabled: o.hasNext(curr) === false} + } + return (dict.flow && curr === pages) + ? + {text: next, value: "next", disabled: true} + : + {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; + } else { + return BI.extend({ + disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) + }, next); + } + }())); + } + + this.button_group = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(view, { + cls: "bi-list-item-select", + height: 23, + hgap: 10 + }), + behaviors: o.behaviors, + layouts: o.layouts + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + // if (self._lock === true) { + // return; + // } + // self._lock = true; + // self._debouce(); + if (type === BI.Events.CLICK) { + var v = self.button_group.getValue()[0]; + switch (v) { + case "first": + self.currPage = 1; + break; + case "last": + self.currPage = pages; + break; + case "prev": + self.currPage--; + break; + case "next": + self.currPage++; + break; + default: + self.currPage = v; + break; + } + o.jump.apply(self, [{ + pages: pages, + curr: self.currPage + }]); + self._populate(); + self.fireEvent(BI.Pager.EVENT_CHANGE, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE); + }, + + getCurrentPage: function () { + return this.currPage; + }, + + setAllPages: function (pages) { + this.options.pages = pages; + }, + + hasPrev: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasPrev(v) : v > 1; + }, + + hasNext: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasNext(v) : v < pages; + }, + + setValue: function (v) { + var o = this.options; + v = v | 0; + v = v < 1 ? 1 : v; + if (o.pages === false) { + var lastPage = BI.result(o, "lastPage"), firstPage = 1; + this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); + } else { + v = v > o.pages ? o.pages : v; + this.currPage = v; + } + this._populate(); + }, + + getValue: function () { + var val = this.button_group.getValue()[0]; + switch (val) { + case "prev": + return -1; + case "next": + return 1; + case "first": + return BI.MIN; + case "last": + return BI.MAX; + default : + return val; + } + }, + + attr: function (key, value) { + BI.Pager.superclass.attr.apply(this, arguments); + if (key === "curr") { + this.currPage = BI.result(this.options, "curr"); + } + }, + + populate: function () { + this._populate(); + } +}); +BI.Pager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; +BI.shortcut("bi.pager", BI.Pager);/** + * 超链接 + * + * Created by GUY on 2015/9/9. + * @class BI.A + * @extends BI.Text + * @abstract + */ +BI.A = BI.inherit(BI.Text, { + _defaultConfig: function () { + var conf = BI.A.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-a display-block", + href: "", + target: "_blank", + el: null, + element: "<a/>" + }) + }, + _init: function () { + var o = this.options; + BI.A.superclass._init.apply(this, arguments); + this.element.attr({href: o.href, target: o.target}); + if (o.el) { + BI.createWidget(o.el, { + element: this + }); + } + } +}); + +BI.shortcut("bi.a", BI.A);/** + * guy + * 加载条 + * @type {*|void|Object} + */ +BI.LoadingBar = BI.inherit(BI.Single, { + consts: { + loadedText: BI.i18nText("BI-Load_More"), + endText: BI.i18nText("BI-No_More_Data") + }, + _defaultConfig: function() { + var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments); + return BI.extend( conf, { + baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips', + height: 30, + handler: BI.emptyFn + }) + }, + _init : function() { + BI.LoadingBar.superclass._init.apply(this, arguments); + var self = this; + this.loaded = BI.createWidget({ + type: "bi.text_button", + cls: "loading-text bi-list-item-simple", + text: this.consts.loadedText, + width: 120, + handler: this.options.handler + }) + this.loaded.on(BI.Controller.EVENT_CHANGE, function(type){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + + this.loading = BI.createWidget({ + type: "bi.layout", + width: this.options.height, + height:this.options.height, + cls: "loading-background cursor-default" + }) + var loaded = BI.createWidget({ + type: "bi.center_adapt", + items: [this.loaded] + }) + var loading = BI.createWidget({ + type: "bi.center_adapt", + items: [this.loading] + }) + this.cardLayout = BI.createWidget({ + type: "bi.card", + element: this, + items: [{ + el: loaded, + cardName: "loaded" + }, { + el: loading, + cardName: "loading" + }] + }) + this.invisible(); + }, + + _reset: function(){ + this.visible(); + this.loaded.setText(this.consts.loadedText); + this.loaded.enable(); + }, + + setLoaded: function(){ + this._reset(); + this.cardLayout.showCardByName("loaded"); + }, + + setEnd: function(){ + this.setLoaded(); + this.loaded.setText(this.consts.endText); + this.loaded.disable(); + }, + + setLoading: function(){ + this._reset(); + this.cardLayout.showCardByName("loading"); + } +}); + +BI.shortcut("bi.loading_bar", BI.LoadingBar);/** + * @class BI.IconButton + * @extends BI.BasicButton + * 图标的button + */ +BI.IconButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center", + iconWidth: null, + iconHeight: null + }) + }, + + _init: function () { + BI.IconButton.superclass._init.apply(this, arguments); + var o = this.options; + this.element.css({ + textAlign: 'center' + }); + this.icon = BI.createWidget({ + type: 'bi.icon', + width: o.iconWidth, + height: o.iconHeight + }); + if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { + this.element.css("lineHeight", o.height + "px"); + BI.createWidget({ + type: "bi.default", + element: this, + items: [this.icon] + }) + } else { + BI.createWidget({ + element: this, + type: 'bi.center_adapt', + items: [this.icon] + }); + } + }, + + doClick: function () { + BI.IconButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconButton.EVENT_CHANGE, this); + } + } +}); +BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE"; +BI.shortcut("bi.icon_button", BI.IconButton);/** + * 图片的button + * + * Created by GUY on 2016/1/27. + * @class BI.ImageButton + * @extends BI.BasicButton + */ +BI.ImageButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-image-button", + src: "", + iconWidth: "100%", + iconHeight: "100%" + }) + }, + + _init: function () { + BI.ImageButton.superclass._init.apply(this, arguments); + var o = this.options; + this.image = BI.createWidget({ + type: "bi.img", + width: o.iconWidth, + height: o.iconHeight, + src: o.src + }); + if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) { + BI.createWidget({ + type: "bi.center_adapt", + element: this, + items: [this.image] + }) + } else { + BI.createWidget({ + type: "bi.adaptive", + element: this, + items: [this.image], + scrollable: false + }) + } + }, + + setWidth: function (w) { + BI.ImageButton.superclass.setWidth.apply(this, arguments); + this.options.width = w; + }, + + setHeight: function (h) { + BI.ImageButton.superclass.setHeight.apply(this, arguments); + this.options.height = h; + }, + + setImageWidth: function (w) { + this.image.setWidth(w); + }, + + setImageHeight: function (h) { + this.image.setHeight(h); + }, + + getImageWidth: function () { + return this.image.element.width(); + }, + + getImageHeight: function () { + return this.image.element.height(); + }, + + setSrc: function (src) { + this.options.src = src; + this.image.setSrc(src); + }, + + getSrc: function () { + return this.image.getSrc(); + }, + + doClick: function () { + BI.ImageButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.ImageButton.EVENT_CHANGE, this); + } + } +}); +BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; +BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { + + /** + * 文字类型的按钮 + * @class BI.Button + * @extends BI.BasicButton + * + * @cfg {JSON} options 配置属性 + * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 + */ + BI.Button = BI.inherit(BI.BasicButton, { + + _defaultConfig: function (props) { + var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + ' bi-button', + minWidth: (props.block === true || props.clear === true) ? 0 : 90, + shadow: props.clear !== true, + isShadowShowingOnSelected: true, + readonly: true, + iconClass: "", + level: 'common', + block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 + clear: false, //是否去掉边框和背景 + textAlign: "center", + whiteSpace: "nowrap", + forceCenter: false, + textWidth: null, + textHeight: null, + hgap: props.clear ? 0 : 10, + vgap: 0, + tgap: 0, + bgap: 0, + lgap: 0, + rgap: 0 + }) + }, + + _init: function () { + BI.Button.superclass._init.apply(this, arguments); + var o = this.options, self = this; + if (BI.isNumber(o.height) && !o.clear && !o.block) { + this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); + } else { + this.element.css({lineHeight: o.height + "px"}); + } + if (BI.isKey(o.iconClass)) { + this.icon = BI.createWidget({ + type: "bi.icon", + width: 18 + }); + this.text = BI.createWidget({ + type: "bi.label", + text: o.text, + value: o.value + }); + BI.createWidget({ + type: "bi.horizontal_auto", + cls: "button-" + o.level + " " + o.iconClass, + element: this, + hgap: o.hgap, + vgap: o.vgap, + tgap: o.tgap, + bgap: o.bgap, + lgap: o.lgap, + rgap: o.rgap, + items: [{ + type: "bi.horizontal", + items: [this.icon, this.text] + }] + }) + } else { + this.text = BI.createWidget({ + type: "bi.label", + cls: "button-" + o.level, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + forceCenter: o.forceCenter, + textWidth: o.textWidth, + textHeight: o.textHeight, + hgap: o.hgap, + vgap: o.vgap, + tgap: o.tgap, + bgap: o.bgap, + lgap: o.lgap, + rgap: o.rgap, + element: this, + text: o.text, + value: o.value + }); + } + if (o.block === true) { + this.element.addClass("block"); + } + if (o.clear === true) { + this.element.addClass("clear"); + } + if (o.minWidth > 0) { + this.element.css({"min-width": o.minWidth + "px"}); + } + }, + + doClick: function () { + BI.Button.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.Button.EVENT_CHANGE, this); + } + }, + + setText: function (text) { + BI.Button.superclass.setText.apply(this, arguments); + this.text.setText(text); + }, + + setValue: function (text) { + BI.Button.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.text.setValue(text); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + destroy: function () { + BI.Button.superclass.destroy.apply(this, arguments); + } + }); + BI.shortcut('bi.button', BI.Button); + BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; +})(jQuery);/** + * guy + * 可以点击的一行文字 + * @class BI.TextButton + * @extends BI.BasicButton + * 文字button + */ +BI.TextButton = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-button", + textAlign: "center", + whiteSpace: "nowrap", + forceCenter: false, + textWidth: null, + textHeight: null, + hgap: 0, + lgap: 0, + rgap: 0, + text: "", + py: "" + }) + }, + + _init: function () { + BI.TextButton.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textWidth: o.textWidth, + textHeight: o.textHeight, + forceCenter: o.forceCenter, + width: o.width, + height: o.height, + hgap: o.hgap, + lgap: o.lgap, + rgap: o.rgap, + text: o.text, + value: o.value, + py: o.py + }); + }, + + doClick: function () { + BI.TextButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (text) { + BI.TextButton.superclass.setText.apply(this, arguments); + text = BI.isArray(text) ? text.join(",") : text; + this.text.setText(text); + }, + + setStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (text) { + BI.TextButton.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + text = BI.isArray(text) ? text.join(",") : text; + this.text.setValue(text); + } + } +}); +BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_button", BI.TextButton);/** + * 带有一个占位 + * + * Created by GUY on 2015/9/11. + * @class BI.BlankIconIconTextItem + * @extends BI.BasicButton + */ +BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconIconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + var blank = BI.createWidget({ + type: "bi.layout", + width: o.blankWidth + }) + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon1 = BI.createWidget({ + type: "bi.icon_button", + cls: o.iconCls1, + forceNotSelected: true, + width: c.commonWidth + }); + this.icon2 = BI.createWidget({ + type: "bi.icon_button", + cls: o.iconCls2, + forceNotSelected: true, + width: c.commonWidth + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) + })))); + }, + + doClick: function () { + BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setSelected: function (b) { + BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments); + this.icon1.setSelected(b); + this.icon2.setSelected(b); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/** + * guy + * 一个占位符和两个icon和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/15. + * @class BI.BlankIconTextIconItem + * @extends BI.BasicButton + */ +BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-icon-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconTextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.layout", + width: o.blankWidth + }, icon1, this.text, { + type: "bi.layout", + width: c.commonWidth + }) + })))); + }, + + doClick: function () { + BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/** + * 带有一个占位 + * + * Created by GUY on 2015/9/11. + * @class BI.BlankIconTextItem + * @extends BI.BasicButton + */ +BI.BlankIconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-blank-icon-text-item", + logic: { + dynamic: false + }, + cls: "close-ha-font", + blankWidth: 0, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.BlankIconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + var blank = BI.createWidget({ + type: "bi.layout", + width: o.blankWidth + }) + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) + })))); + }, + + doClick: function () { + BI.BlankIconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/** + * guy + * 两个icon和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/9. + * @class BI.IconTextIconItem + * @extends BI.BasicButton + */ +BI.IconTextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-icon-item", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + var blank = BI.createWidget({ + type: "bi.layout", + width: c.commonWidth + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) + })))); + }, + + doClick: function () { + BI.IconTextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/** + * guy + * + * Created by GUY on 2015/9/9. + * @class BI.IconTextItem + * @extends BI.BasicButton + */ +BI.IconTextItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-item", + direction: BI.Direction.Left, + logic: { + dynamic: false + }, + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) + })))); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doClick: function () { + BI.IconTextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_item", BI.IconTextItem);/** + * + * 图标的button + * + * Created by GUY on 2015/9/9. + * @class BI.TextIconItem + * @extends BI.BasicButton + */ +BI.TextIconItem = BI.inherit(BI.BasicButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-icon-item", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextIconItem.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }); + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) + })))); + }, + + doClick: function () { + BI.TextIconItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + } +}); +BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_icon_item", BI.TextIconItem);/** + * guy + * 一个button和一行数 组成的一行listitem + * + * Created by GUY on 2015/9/9. + * @class BI.TextItem + * @extends BI.BasicButton + */ +BI.TextItem = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-item", + textAlign: "left", + whiteSpace: "nowrap", + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextItem.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, + height: o.height, + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + py: o.py + }); + }, + + doClick: function () { + BI.TextItem.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_item", BI.TextItem);/** + * guy + * Created by GUY on 2015/9/9. + * @class BI.IconTextIconNode + * @extends BI.NodeButton + */ +BI.IconTextIconNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-icon-node", + logic: { + dynamic: false + }, + iconCls1: "close-ha-font", + iconCls2: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextIconNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + + var icon1 = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls1, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + var blank = BI.createWidget({ + type: "bi.layout", + width: c.commonWidth + }) + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.center_adapt", + cls: o.iconCls2, + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }, + top: 0, + bottom: 0, + right: 0 + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) + })))); + }, + + doClick: function () { + BI.IconTextIconNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/** + * guy + * Created by GUY on 2015/9/9. + * @class BI.IconTextNode + * @extends BI.NodeButton + */ +BI.IconTextNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-text-node", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.IconTextNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }) + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) + })))); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doClick: function () { + BI.IconTextNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + } +}); +BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_text_node", BI.IconTextNode);/** + * Created by GUY on 2015/9/9. + * @class BI.TextIconNode + * @extends BI.NodeButton + */ +BI.TextIconNode = BI.inherit(BI.NodeButton, { + _const: { + commonWidth: 25 + }, + + _defaultConfig: function () { + var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-icon-node", + logic: { + dynamic: false + }, + cls: "close-ha-font", + iconHeight: null, + iconWidth: null, + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextIconNode.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + height: o.height + }) + this.icon = BI.createWidget({ + type: "bi.center_adapt", + width: c.commonWidth, + items: [{ + el: { + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + } + }] + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) + })))); + }, + + doClick: function () { + BI.TextIconNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + } +}); +BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_icon_node", BI.TextIconNode);/** + * guy + * + * Created by GUY on 2015/9/9. + * @class BI.TextNode + * @extends BI.NodeButton + */ +BI.TextNode = BI.inherit(BI.NodeButton, { + + _defaultConfig: function () { + var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-node", + textAlign: "left", + whiteSpace: "nowrap", + textHgap: 0, + textVgap: 0, + textLgap: 0, + textRgap: 0 + }) + }, + _init: function () { + BI.TextNode.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.whiteSpace == "nowrap" ? o.height : o.textHeight, + height: o.height, + hgap: o.textHgap, + vgap: o.textVgap, + lgap: o.textLgap, + rgap: o.textRgap, + text: o.text, + value: o.value, + keyword: o.keyword, + py: o.py + }); + }, + + doClick: function () { + BI.TextNode.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this); + } + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + setValue: function () { + if (!this.isReadOnly()) { + this.text.setValue.apply(this.text, arguments); + } + }, + + getValue: function () { + return this.text.getValue(); + }, + + setText: function () { + this.text.setText.apply(this.text, arguments); + }, + + getText: function () { + return this.text.getText(); + } +}); +BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_node", BI.TextNode);/** + * + * Created by GUY on 2016/1/15. + * @class BI.CodeEditor + * @extends BI.Single + */ +BI.CodeEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-code-editor bi-card', + value: '', + watermark: "", + lineHeight: 2, + readOnly: false, + //参数显示值构造函数 + paramFormatter: function (v) { + return v; + } + }); + }, + _init: function () { + BI.CodeEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.editor = CodeMirror(this.element[0], { + textWrapping: true, + lineWrapping: true, + lineNumbers: false, + readOnly: o.readOnly + }); + o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); + this.editor.on("change", function (cm, change) { + BI.nextTick(function () { + self.fireEvent(BI.CodeEditor.EVENT_CHANGE) + }); + }); + + this.editor.on("focus", function () { + self.watermark.setVisible(false); + self.fireEvent(BI.CodeEditor.EVENT_FOCUS); + }); + + this.editor.on("blur", function () { + self.watermark.setVisible(BI.isEmptyString(self.getValue())); + self.fireEvent(BI.CodeEditor.EVENT_BLUR); + }); + + // this.editor.on("blur", function () { + // self.editor.execCommand("goLineEnd"); + // }); + + //水印 + this.watermark = BI.createWidget({ + type: "bi.label", + text: o.watermark, + cls: "bi-water-mark", + whiteSpace: "nowrap", + textAlign: "left" + }); + this.watermark.element.bind( + "mousedown", function (e) { + self.insertString(""); + self.editor.focus(); + e.stopEvent(); + } + ); + this.watermark.element.bind("click", function (e) { + self.editor.focus(); + e.stopEvent(); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.watermark, + top: 0, + left: 5 + }] + }); + + if (BI.isKey(o.value)) { + BI.nextTick(function () { + self.setValue(o.value); + }); + } + }, + + _setEnable: function (b) { + BI.CodeEditor.superclass._setEnable.apply(this, arguments); + this.editor.setOption("readOnly", b === true ? false : "nocursor") + }, + + _checkWaterMark: function () { + var o = this.options; + if (BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + insertParam: function (param) { + var value = param; + param = this.options.paramFormatter(param); + var from = this.editor.getCursor(); + this.editor.replaceSelection(param); + var to = this.editor.getCursor(); + var options = {className: 'param', atomic: true}; + if (BI.isNotNull(param.match(/^<!.*!>$/))) { + options.className = 'error-param'; + } + options.value = value; + this.editor.markText(from, to, options); + this.editor.replaceSelection(" "); + this.editor.focus(); + }, + + insertString: function (str) { + this.editor.replaceSelection(str); + this.editor.focus(); + }, + + getValue: function () { + return this.editor.getValue("\n", function (line) { + var rawText = line.text, value = line.text, num = 0; + value.text = rawText; + _.forEach(line.markedSpans, function (i, ms) { + switch (i.marker.className) { + case "param": + case "error-param": + var fieldNameLength = i.to - i.from; + value = value.substr(0, i.from + num) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length); + //加上${}的偏移 + num += 3; + //加上实际值和显示值的长度差的偏移 + num += (i.marker.value.length - fieldNameLength); + break; + } + }); + return value; + }); + }, + + _analyzeContent: function (v) { + var regx = /\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g; + return v.match(regx); + }, + + setValue: function (v) { + var self = this, result; + this.refresh(); + self.editor.setValue(""); + result = this._analyzeContent(v || ""); + BI.each(result, function (i, item) { + var fieldRegx = /\$[\{][^\}]*[\}]/; + var str = item.match(fieldRegx); + if (BI.isNotEmptyArray(str)) { + self.insertParam(str[0].substring(2, item.length - 1)); + } else { + self.insertString(item); + } + }); + this._checkWaterMark(); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.getInputField().blur(); + }, + + setStyle: function (style) { + this.style = style; + this.element.css(style); + }, + + getStyle: function () { + return this.style; + }, + + refresh: function () { + var self = this; + BI.nextTick(function () { + self.editor.refresh(); + }); + } +}); +BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.code_editor", BI.CodeEditor);/** + * Created by GUY on 2015/4/15. + * @class BI.Editor + * @extends BI.Single + */ +BI.Editor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + //title,warningTitle这两个属性没用 + tipType: "warning", + inputType: "text", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: false, + watermark: "", + errorText: "" + }) + }, + + _init: function () { + BI.Editor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = this.addWidget(BI.createWidget({ + type: "bi.input", + element: "<input type='" + o.inputType + "'/>", + root: true, + watermark: o.watermark, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank + })); + this.editor.element.css({ + "width": "100%", + "height": "100%", + "border": "none", + "outline": "none", + "padding": "0", + "margin": "0" + }); + if (BI.isKey(this.options.watermark)) { + this.watermark = BI.createWidget({ + type: "bi.label", + cls: "bi-water-mark", + text: this.options.watermark, + forceCenter: true, + height: o.height - 2 * (o.vgap + o.tgap), + whiteSpace: "nowrap", + textAlign: "left" + }); + this.watermark.element.bind({ + mousedown: function (e) { + if (self.isEnabled()) { + self.editor.isEditing() || self.editor.focus(); + } else { + self.editor.isEditing() && self.editor.blur(); + } + e.stopEvent(); + } + }); + this.watermark.element.bind("click", function (e) { + if (self.isEnabled()) { + self.editor.isEditing() || self.editor.focus(); + } else { + self.editor.isEditing() && self.editor.blur(); + } + e.stopEvent(); + }); + this.watermark.element.css({ + position: "absolute", + left: "3px", + right: "3px", + top: "0px", + bottom: "0px" + }); + } + var items = [{ + el: { + type: "bi.default", + items: this.watermark ? [this.editor, this.watermark] : [this.editor] + }, + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }]; + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: items + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Input.EVENT_FOCUS, function () { + self._checkError(); + self.element.addClass("bi-editor-focus"); + self.fireEvent(BI.Editor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Input.EVENT_BLUR, function () { + self.setErrorVisible(false); + self.element.removeClass("bi-editor-focus"); + self.fireEvent(BI.Editor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Input.EVENT_CLICK, function () { + self.fireEvent(BI.Editor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Input.EVENT_CHANGE, function () { + self.fireEvent(BI.Editor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); + }); + this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) { + self.watermark && self.watermark.invisible(); + }); + + this.editor.on(BI.Input.EVENT_VALID, function () { + self._checkWaterMark(); + self.setErrorVisible(false); + self.fireEvent(BI.Editor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Input.EVENT_ERROR, function () { + self._checkWaterMark(); + self.fireEvent(BI.Editor.EVENT_ERROR, arguments); + self.setErrorVisible(self.isEditing()); + }); + this.editor.on(BI.Input.EVENT_RESTRICT, function () { + self._checkWaterMark(); + var tip = self.setErrorVisible(true); + tip && tip.element.fadeOut(100, function () { + tip.element.fadeIn(100); + }); + self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Input.EVENT_EMPTY, function () { + self._checkWaterMark(); + self.fireEvent(BI.Editor.EVENT_EMPTY, arguments); + }); + this.editor.on(BI.Input.EVENT_ENTER, function () { + self.fireEvent(BI.Editor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Input.EVENT_SPACE, function () { + self.fireEvent(BI.Editor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Input.EVENT_BACKSPACE, function () { + self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments); + }); + this.editor.on(BI.Input.EVENT_REMOVE, function () { + self.fireEvent(BI.Editor.EVENT_REMOVE, arguments); + }); + this.editor.on(BI.Input.EVENT_START, function () { + self.fireEvent(BI.Editor.EVENT_START, arguments); + }); + this.editor.on(BI.Input.EVENT_PAUSE, function () { + self.fireEvent(BI.Editor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Input.EVENT_STOP, function () { + self.fireEvent(BI.Editor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Input.EVENT_CONFIRM, function () { + self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments); + }); + this.element.click(function (e) { + e.stopPropagation(); + return false; + }); + if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) { + this.setValue(this.options.value); + } else { + this._checkWaterMark(); + } + }, + + _checkToolTip: function () { + var o = this.options; + var errorText = o.errorText; + if (BI.isFunction(errorText)) { + errorText = errorText(this.editor.getValue()); + } + if (BI.isKey(errorText)) { + if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) { + this.setTitle(""); + } else { + this.setTitle(errorText); + } + } + }, + + _checkError: function () { + this.setErrorVisible(this.isEnabled() && !this.isValid()); + this._checkToolTip(); + }, + + _checkWaterMark: function () { + var o = this.options; + if (!this.disabledWaterMark && this.editor.getValue() === "" && BI.isKey(o.watermark)) { + this.watermark && this.watermark.visible(); + } else { + this.watermark && this.watermark.invisible(); + } + }, + + setErrorText: function (text) { + this.options.errorText = text; + }, + + getErrorText: function () { + return this.options.errorText; + }, + + setErrorVisible: function (b) { + var o = this.options; + var errorText = o.errorText; + if (BI.isFunction(errorText)) { + errorText = errorText(this.editor.getValue()); + } + if (!this.disabledError && BI.isKey(errorText)) { + BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this); + this._checkToolTip(); + return BI.Bubbles.get(this.getName()); + } + }, + + disableError: function () { + this.disabledError = true; + this._checkError(); + }, + + enableError: function () { + this.disabledError = false; + this._checkError(); + }, + + disableWaterMark: function () { + this.disabledWaterMark = true; + this._checkWaterMark(); + }, + + enableWaterMark: function () { + this.disabledWaterMark = false; + this._checkWaterMark(); + }, + + focus: function () { + this.element.addClass("text-editor-focus"); + this.editor.focus(); + }, + + blur: function () { + this.element.removeClass("text-editor-focus"); + this.editor.blur(); + }, + + selectAll: function () { + this.editor.selectAll(); + }, + + onKeyDown: function (k) { + this.editor.onKeyDown(k); + }, + + setValue: function (v) { + BI.Editor.superclass.setValue.apply(this, arguments); + this.editor.setValue(v); + this._checkError(); + this._checkWaterMark(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + resetLastValidValue: function () { + this.editor.resetLastValidValue(); + }, + + getValue: function () { + if (!this.isValid()) { + return BI.trim(this.editor.getLastValidValue()); + } + return BI.trim(this.editor.getValue()); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.Editor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.Editor.EVENT_BLUR = "EVENT_BLUR"; +BI.Editor.EVENT_CLICK = "EVENT_CLICK"; +BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.Editor.EVENT_SPACE = "EVENT_SPACE"; +BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.Editor.EVENT_START = "EVENT_START"; +BI.Editor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Editor.EVENT_STOP = "EVENT_STOP"; +BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.Editor.EVENT_VALID = "EVENT_VALID"; +BI.Editor.EVENT_ERROR = "EVENT_ERROR"; +BI.Editor.EVENT_ENTER = "EVENT_ENTER"; +BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.Editor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.Editor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.editor", BI.Editor);/** + * 多文件 + * + * Created by GUY on 2016/4/13. + * @class BI.MultifileEditor + * @extends BI.Single + * @abstract + */ +BI.MultifileEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-multifile-editor", + multiple: false, + maxSize: -1,//1024 * 1024 + accept: "", + url: "" + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.MultifileEditor.superclass._init.apply(this, arguments); + this.file = BI.createWidget({ + type: "bi.file", + cls: "multifile-editor", + width: "100%", + height: "100%", + name: o.name, + url: o.url, + multiple: o.multiple, + accept: o.accept, + maxSize: o.maxSize + }); + this.file.on(BI.File.EVENT_CHANGE, function () { + self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments); + }); + this.file.on(BI.File.EVENT_UPLOADSTART, function () { + self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments); + }); + this.file.on(BI.File.EVENT_ERROR, function () { + self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments); + }); + this.file.on(BI.File.EVENT_PROGRESS, function () { + self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments); + }); + this.file.on(BI.File.EVENT_UPLOADED, function () { + self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments); + }); + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.adaptive", + scrollable: false, + items: [this.file] + }, + top: 0, + right: 0, + left: 0, + bottom: 0 + }] + }); + }, + + select: function () { + this.file.select(); + }, + + getValue: function () { + return this.file.getValue(); + }, + + upload: function () { + this.file.upload(); + }, + + reset: function () { + this.file.reset(); + } +}); +BI.MultifileEditor.EVENT_CHANGE = "MultifileEditor.EVENT_CHANGE"; +BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART"; +BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR"; +BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS"; +BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED"; +BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/** + * + * Created by GUY on 2016/1/18. + * @class BI.TextAreaEditor + * @extends BI.Single + */ +BI.TextAreaEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), { + baseCls: 'bi-textarea-editor bi-card', + value: '' + }); + }, + _init: function () { + BI.TextAreaEditor.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.content = BI.createWidget({ + type: "bi.layout", + tagName: "textarea", + width: "100%", + height: "100%", + cls: "bi-textarea textarea-editor-content display-block" + }); + this.content.element.css({"resize": "none"}); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.adaptive", + items: [this.content] + }, + left: 0, + right: 3, + top: 0, + bottom: 5 + }] + }); + + this.content.element.on("input propertychange", function (e) { + self._checkWaterMark(); + self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE); + }); + + this.content.element.focus(function () { + if (self.isValid()) { + self._focus(); + self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); + } + $(document).bind("mousedown." + self.getName(), function (e) { + if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { + $(document).unbind("mousedown." + self.getName()); + self.content.element.blur(); + } + }); + }); + this.content.element.blur(function () { + if (self.isValid()) { + self._blur(); + self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); + } + $(document).unbind("mousedown." + self.getName()); + }); + if (BI.isKey(o.value)) { + self.setValue(o.value); + } + if (BI.isNotNull(o.style)) { + self.setValue(o.style); + } + this._checkWaterMark(); + }, + + _checkWaterMark: function () { + var self = this, o = this.options; + var val = this.getValue(); + if (BI.isNotEmptyString(val)) { + this.watermark && this.watermark.destroy(); + this.watermark = null; + } else { + if (BI.isNotEmptyString(o.watermark)) { + if (!this.watermark) { + this.watermark = BI.createWidget({ + type: "bi.text_button", + cls: "bi-water-mark", + textAlign: "left", + height: 30, + text: o.watermark, + invalid: o.invalid, + disabled: o.disabled + }); + this.watermark.on(BI.TextButton.EVENT_CHANGE, function () { + self.focus(); + }); + BI.createWidget({ + type: 'bi.absolute', + element: this, + items: [{ + el: this.watermark, + left: 0, + top: 0, + right: 0 + }] + }) + } else { + this.watermark.setText(o.watermark); + this.watermark.setValid(!o.invalid); + this.watermark.setEnable(!o.disabled); + } + } + } + }, + + _focus: function () { + this.content.element.addClass("textarea-editor-focus"); + this._checkWaterMark(); + }, + + _blur: function () { + this.content.element.removeClass("textarea-editor-focus"); + this._checkWaterMark(); + }, + + focus: function () { + this._focus(); + this.content.element.focus(); + }, + + blur: function () { + this._blur(); + this.content.element.blur(); + }, + + getValue: function () { + return this.content.element.val(); + }, + + setValue: function (value) { + this.content.element.val(value); + this._checkWaterMark(); + }, + + setStyle: function (style) { + this.style = style; + this.element.css(style); + this.content.element.css(BI.extend({}, style, { + color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor) + })) + }, + + getStyle: function () { + return this.style; + }, + + _setValid: function (b) { + BI.TextAreaEditor.superclass._setValid.apply(this, arguments); + // this.content.setValid(b); + // this.watermark && this.watermark.setValid(b); + } +}); +BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/** + * guy 图标 + * @class BI.Icon + * @extends BI.Single + */ +BI.Icon = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + tagName: "i", + baseCls: (conf.baseCls || "") + " x-icon b-font horizon-center display-block" + }) + }, + _init: function () { + BI.Icon.superclass._init.apply(this, arguments); + if (BI.isIE9Below()) { + this.element.addClass("hack"); + } + } +}); +BI.shortcut("bi.icon", BI.Icon);/** + * @class BI.Iframe + * @extends BI.Single + * @abstract + * Created by GameJian on 2016/3/2. + */ +BI.Iframe = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-iframe", + src: "", + width: "100%", + height: "100%" + }) + }, + + _init: function () { + var o = this.options; + this.options.element = $("<iframe frameborder='0' src='" + o.src + "'>"); + BI.Iframe.superclass._init.apply(this, arguments); + }, + + setSrc: function (src) { + this.options.src = src; + this.element.attr("src", src); + }, + + getSrc: function () { + return this.options.src; + }, + + setName: function (name) { + this.options.name = name; + this.element.attr("name", name); + }, + + getName: function () { + return this.options.name; + }, + + getWidth: function () { + return this.options.width + }, + + getHeight: function () { + return this.options.height + } +}); + +BI.shortcut("bi.iframe", BI.Iframe);/** + * ͼƬ + * + * Created by GUY on 2016/1/26. + * @class BI.Img + * @extends BI.Single + * @abstract + */ +BI.Img = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Img.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-img display-block", + src: "", + width: "100%", + height: "100%" + }) + }, + + _init: function () { + var o = this.options; + this.options.element = $("<img src='" + o.src + "'>"); + BI.Img.superclass._init.apply(this, arguments); + }, + + setSrc: function (src) { + this.options.src = src; + this.element.attr("src", src); + }, + + getSrc: function () { + return this.options.src; + } +}); + +BI.shortcut("bi.img", BI.Img); +/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Checkbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.Checkbox.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-checkbox check-box-icon", + selected: false, + handler: BI.emptyFn, + width: 16, + height: 16, + iconWidth: 16, + iconHeight: 16 + }) + }, + + _init : function() { + BI.Checkbox.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.Checkbox.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.Checkbox.EVENT_CHANGE); + } + } +}); +BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE"; + +BI.shortcut("bi.checkbox", BI.Checkbox);/** + * 文件 + * + * Created by GUY on 2016/1/27. + * @class BI.File + * @extends BI.Single + * @abstract + */ +(function () { + + /** + * @description normalize input.files. create if not present, add item method if not present + * @param Object generated wrap object + * @return Object the wrap object itself + */ + var F = (function (item) { + return function (input) { + var files = input.files || [input]; + if (!files.item) { + files.item = item; + } + return files; + }; + })(function (i) { + return this[i]; + }); + + var event = { + + /** + * @description add an event via addEventListener or attachEvent + * @param DOMElement the element to add event + * @param String event name without "on" (e.g. "mouseover") + * @param Function the callback to associate as event + * @return Object noswfupload.event + */ + add: document.addEventListener ? + function (node, name, callback) { + node.addEventListener(name, callback, false); + return this; + } : + function (node, name, callback) { + node.attachEvent("on" + name, callback); + return this; + }, + + /** + * @description remove an event via removeEventListener or detachEvent + * @param DOMElement the element to remove event + * @param String event name without "on" (e.g. "mouseover") + * @param Function the callback associated as event + * @return Object noswfupload.event + */ + del: document.removeEventListener ? + function (node, name, callback) { + node.removeEventListener(name, callback, false); + return this; + } : + function (node, name, callback) { + node.detachEvent("on" + name, callback); + return this; + }, + + /** + * @description to block event propagation and prevent event default + * @param void generated event or undefined + * @return Boolean false + */ + stop: function (e) { + if (!e) { + if (self.event) { + event.returnValue = !(event.cancelBubble = true); + } + } else { + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; + e.preventDefault ? e.preventDefault() : e.returnValue = false; + } + ; + return false; + } + }; + + var sendFile = (function (toString) { + var multipart = function (boundary, name, file) { + return "--".concat( + boundary, CRLF, + 'Content-Disposition: form-data; name="', name, '"; filename="', BI.cjkEncode(file.fileName), '"', CRLF, + "Content-Type: application/octet-stream", CRLF, + CRLF, + file.getAsBinary(), CRLF, + "--", boundary, "--", CRLF + ); + }, + isFunction = function (Function) { + return toString.call(Function) === "[object Function]"; + }, + split = "onabort.onerror.onloadstart.onprogress".split("."), + length = split.length, + CRLF = "\r\n", + xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), + sendFile; + + // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work) + if (xhr.upload || xhr.sendAsBinary) { + sendFile = function (handler, maxSize, width, height) { + if (-1 < maxSize && maxSize < handler.file.fileSize) { + if (isFunction(handler.onerror)) { + handler.onerror(); + } + return; + } + for (var + xhr = new XMLHttpRequest, + upload = xhr.upload || { + addEventListener: function (event, callback) { + this["on" + event] = callback + } + }, + i = 0; + i < length; + i++ + ) { + upload.addEventListener( + split[i].substring(2), + (function (event) { + return function (rpe) { + if (isFunction(handler[event])) { + handler[event](rpe, xhr); + } + }; + })(split[i]), + false + ); + } + upload.addEventListener( + "load", + function (rpe) { + if (handler.onreadystatechange === false) { + if (isFunction(handler.onload)) { + handler.onload(rpe, xhr); + } + } else { + setTimeout(function () { + if (xhr.readyState === 4) { + if (isFunction(handler.onload)) { + handler.onload(rpe, xhr); + } + } else { + setTimeout(arguments.callee, 15); + } + }, 15); + } + }, + false + ); + xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true); + if (!xhr.upload) { + var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true}; + rpe.interval = setInterval(function () { + rpe.loaded += 1024 / 4; + if (rpe.total <= rpe.loaded) { + rpe.loaded = rpe.total; + } + upload.onprogress(rpe); + }, 100); + xhr.onabort = function () { + upload.onabort({}); + }; + xhr.onerror = function () { + upload.onerror({}); + }; + xhr.onreadystatechange = function () { + switch (xhr.readyState) { + case 2: + case 3: + if (rpe.total <= rpe.loaded) + rpe.loaded = rpe.total; + upload.onprogress(rpe); + break; + case 4: + clearInterval(rpe.interval); + rpe.interval = 0; + rpe.loaded = rpe.total; + upload.onprogress(rpe); + if (199 < xhr.status && xhr.status < 400) { + upload["onload"]({}); + var attachO = BI.jsonDecode(xhr.responseText); + attachO.filename = handler.file.fileName; + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + handler.attach_array.push(attachO); + } else { + upload["onerror"]({}); + } + break; + } + }; + upload.onloadstart(rpe); + } else { + xhr.onreadystatechange = function () { + switch (xhr.readyState) { + case 4: + var attachO = BI.jsonDecode(xhr.responseText); + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + attachO.filename = handler.file.fileName; + if (handler.maxlength == 1) { + handler.attach_array[0] = attachO; + // handler.attach_array.push(attachO); + } else { + handler.attach_array.push(attachO); + } + break; + } + } + } + var boundary = "AjaxUploadBoundary" + (new Date).getTime(); + xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary); + if (handler.file.getAsBinary) { + xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file)); + } else { + xhr.setRequestHeader("Content-Type", "multipart/form-data"); +// xhr.setRequestHeader("X-Name", handler.name); +// xhr.setRequestHeader("X-File-Name", handler.file.fileName); + var form = new FormData(); + form.append("FileData", handler.file); + xhr.send(form); + } + return handler; + }; + } + // Internet Explorer, Opera, others + else { + sendFile = function (handler, maxSize, width, height) { + var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), + rpe = { + loaded: 1, total: 100, simulation: true, interval: setInterval(function () { + if (rpe.loaded < rpe.total) + ++rpe.loaded; + if (isFunction(handler.onprogress)) + handler.onprogress(rpe, {}); + }, 100) + }, + onload = function () { + iframe.onreadystatechange = iframe.onload = iframe.onerror = null; + form.parentNode.removeChild(form); + form = null; + clearInterval(rpe.interval); + //rpe.loaded = rpe.total; + try { + var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML; + var attachO = BI.jsonDecode(responseText); + if (handler.file.type.indexOf('image') != -1) { + attachO.attach_type = "image"; + } + + //attachO.fileSize = responseText.length; + attachO.filename = BI.cjkDecode(handler.file.fileName); + if (handler.maxlength == 1) { + handler.attach_array[0] = attachO; + } else { + handler.attach_array.push(attachO); + } + } catch (e) { + if (isFunction(handler.onerror)) + handler.onerror(rpe, event || window.event); + } + if (isFunction(handler.onload)) + handler.onload(rpe, {responseText: responseText}); + }, + target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); + try { // IE < 8 does not accept enctype attribute ... + var form = document.createElement('<form enctype="multipart/form-data"></form>'), + iframe = handler.iframe || (handler.iframe = document.createElement('<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>')); + } catch (e) { + var form = document.createElement('form'), + iframe = handler.iframe || (handler.iframe = document.createElement("iframe")); + form.setAttribute("enctype", "multipart/form-data"); + iframe.setAttribute("name", iframe.id = target); + iframe.setAttribute("src", url); + } + iframe.style.position = "absolute"; + iframe.style.left = iframe.style.top = "-10000px"; + iframe.onload = onload; + iframe.onerror = function (event) { + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || window.event); + } + }; + iframe.onreadystatechange = function () { + if (/loaded|complete/i.test(iframe.readyState)) { + onload(); + + //wei : todo,将附件信息放到handler.attach + } + else if (isFunction(handler.onloadprogress)) { + if (rpe.loaded < rpe.total) { + ++rpe.loaded; + } + handler.onloadprogress(rpe, { + readyState: { + loading: 2, + interactive: 3, + loaded: 4, + complete: 4 + }[iframe.readyState] || 1 + }); + } + }; + form.setAttribute("action", handler.url); + form.setAttribute("target", iframe.id); + form.setAttribute("method", "post"); + form.appendChild(handler.file); + form.style.display = "none"; + if (isFunction(handler.onloadstart)) { + handler.onloadstart(rpe, {}); + } + with (document.body || document.documentElement) { + appendChild(iframe); + appendChild(form); + form.submit(); + } + ; + return handler; + }; + } + xhr = null; + return sendFile; + })(Object.prototype.toString); + + var sendFiles = function (handler, maxSize, width, height) { + + var length = handler.files.length, + i = 0, + onload = handler.onload, + onloadstart = handler.onloadstart; + handler.current = 0; + handler.total = 0; + handler.sent = 0; + while (handler.current < length) { + handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size); + handler.current++; + } + handler.current = 0; + if (length && handler.files[0].fileSize !== -1) { + handler.file = handler.files[handler.current]; + + sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { + handler.onloadstart = null; + handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size); + if (++handler.current < length) { + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = arguments.callee; + } else if (onload) { + handler.onloadstart = onloadstart; + handler.onload = onload; + handler.onload(rpe, xhr); + } + }; + } else if (length) { + handler.total = length * 100; + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) { + var callee = arguments.callee; + handler.onloadstart = null; + handler.sent += 100; + if (++handler.current < length) { + if (/\b(chrome|safari)\b/i.test(navigator.userAgent)) { + handler.iframe.parentNode.removeChild(handler.iframe); + handler.iframe = null; + } + setTimeout(function () { + handler.file = handler.files[handler.current]; + sendFile(handler, maxSize, width, height).onload = callee; + }, 15); + } else if (onload) { + setTimeout(function () { + handler.iframe.parentNode.removeChild(handler.iframe); + handler.iframe = null; + handler.onloadstart = onloadstart; + handler.onload = onload; + handler.onload(rpe, xhr); + }, 15); + } + }; + } + return handler; + }; + + BI.File = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.File.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-file display-block", + element: "<input type='file'>", + name: "", + url: "", + multiple: true, + accept: "", /**'*.jpg; *.zip'**/ + maxSize: -1 //1024 * 1024 + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.File.superclass._init.apply(this, arguments); + if (o.multiple === true) { + this.element.attr("multiple", "multiple"); + } + this.element.attr("name", o.name || this.getName()); + + BI.nextTick(function () { + // create the noswfupload.wrap Object + // wrap.maxSize 文件大小限制 + // wrap.maxlength 文件个数限制 + var _wrap = self.wrap = self._wrap(self.element[0], o.maxSize); + // fileType could contain whatever text but filter checks *.{extension} + // if present + + // handlers + + _wrap.onloadstart = function (rpe, xhr) { + //BI.Msg.toast("loadstart"); + self.fireEvent(BI.File.EVENT_UPLOADSTART); + }; + + _wrap.onprogress = function (rpe, xhr) { + //BI.Msg.toast("onprogress"); + // percent for each bar + + // fileSize is -1 only if browser does not support file info access + // this if splits recent browsers from others + if (this.file.fileSize !== -1) { + // simulation property indicates when the progress event is fake + if (rpe.simulation) { + + } else { + + } + } else { + // if fileSIze is -1 browser is using an iframe because it does + // not support + // files sent via Ajax (XMLHttpRequest) + // We can still show some information + } + self.fireEvent(BI.File.EVENT_PROGRESS, { + file: this.file, + total: rpe.total, + loaded: rpe.loaded, + simulation: rpe.simulation + }); + }; + + // generated if there is something wrong during upload + _wrap.onerror = function () { + // just inform the user something was wrong + self.fireEvent(BI.File.EVENT_ERROR); + }; + + // generated when every file has been sent (one or more, it does not + // matter) + _wrap.onload = function (rpe, xhr) { + var self_ = this; + // just show everything is fine ... + // ... and after a second reset the component + setTimeout(function () { + self_.clean(); // remove files from list + self_.hide(); // hide progress bars and enable input file + + //BI.Msg.toast("onload"); + self.fireEvent(BI.File.EVENT_UPLOADED); + // enable again the submit button/element + }, 1000); + }; + _wrap.url = o.url ? o.url : BI.servletURL + + '?op=fr_attach&cmd=ah_upload'; + _wrap.fileType = o.accept; //文件类型限制 + _wrap.attach_array = []; + _wrap.attach_names = []; + _wrap.attachNum = 0; + }); + }, + + _events: function (wrap) { + var self = this; + event.add(wrap.dom.input, "change", function () { + event.del(wrap.dom.input, "change", arguments.callee); + for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) { + var item = files.item(i); + var tempFile = item.value || item.name; + var value = item.fileName || (item.fileName = tempFile.split("\\").pop()), + ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown", + size = item.fileSize || item.size; + if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { + //文件类型不支持 + BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); + self.fireEvent(BI.File.EVENT_ERROR, { + errorType: 0, + file: item + }); + } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { + //文件大小不支持 + BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); + self.fireEvent(BI.File.EVENT_ERROR, { + errorType: 1, + file: item + }); + } else { + wrap.files.unshift(item); + //BI.Msg.toast(value); + self.fireEvent(BI.File.EVENT_CHANGE, { + file: item + }); + } + } + input.value = ""; + wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input); + wrap.dom.input = input; + event.add(wrap.dom.input, "change", arguments.callee); + }); + return wrap; + }, + + _wrap: function () { + var self = this, o = this.options; + // be sure input accept multiple files + var input = this.element[0]; + if (o.multiple === true) { + this.element.attr("multiple", "multiple"); + } + input.value = ""; + + // wrap Object + return this._events({ + + // DOM namespace + dom: { + input: input, // input file + disabled: false // internal use, checks input file state + }, + name: input.name, // name to send for each file ($_FILES[{name}] in the server) + // maxSize is the maximum amount of bytes for each file + maxSize: o.maxSize ? o.maxSize >> 0 : -1, + files: [], // file list + + // remove every file from the noswfupload component + clean: function () { + this.files = []; + }, + + // upload one file a time (which make progress possible rather than all files in one shot) + // the handler is an object injected into the wrap one, could be the wrap itself or + // something like {onload:function(){alert("OK")},onerror:function(){alert("Error")}, etc ...} + upload: function (handler) { + if (handler) { + for (var key in handler) { + this[key] = handler[key]; + } + } + sendFiles(this, this.maxSize); + return this; + }, + + // hide progress bar (total + current) and enable files selection + hide: function () { + if (this.dom.disabled) { + this.dom.disabled = false; + this.dom.input.removeAttribute("disabled"); + } + }, + + // show progress bar and disable file selection (used during upload) + // total and current are pixels used to style bars + // totalProp and currentProp are properties to change, "height" by default + show: function (total, current, totalProp, currentProp) { + if (!this.dom.disabled) { + this.dom.disabled = true; + this.dom.input.setAttribute("disabled", "disabled"); + } + } + }); + }, + + select: function () { + $(this.wrap.dom.input).click(); + }, + + upload: function (handler) { + this.wrap.upload(handler); + }, + + getValue: function () { + return this.wrap.attach_array; + }, + + reset: function () { + this.wrap.attach_array = []; + this.wrap.attach_names = []; + this.wrap.attachNum = 0; + }, + + _setEnable: function (enable) { + BI.File.superclass._setEnable.apply(this, arguments); + if (enable === true) { + this.element.attr("disabled", "disabled"); + } else { + this.element.removeAttr("disabled"); + } + } + }); + BI.File.EVENT_CHANGE = "BI.File.EVENT_CHANGE"; + BI.File.EVENT_UPLOADSTART = "EVENT_UPLOADSTART"; + BI.File.EVENT_ERROR = "EVENT_ERROR"; + BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; + BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; + BI.shortcut("bi.file", BI.File); +})();/** + * guy + * @class BI.Input 一个button和一行数 组成的一行listitem + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Input = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Input.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-input display-block", + element: "<input/>", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn,//按确定键能否退出编辑 + allowBlank: false + }) + }, + + _init: function () { + BI.Input.superclass._init.apply(this, arguments); + var self = this; + var ctrlKey = false; + var inputEventValid = false; + var _keydown = BI.debounce(function (keyCode) { + self.onKeyDown(keyCode, ctrlKey); + self._keydown_ = false; + }, 300); + var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, true); + this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, true); + this.element + .keydown(function (e) { + inputEventValid = false; + ctrlKey = e.ctrlKey; + self.fireEvent(BI.Input.EVENT_QUICK_DOWN); + }) + .keyup(function (e) { + if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { + self._keydown_ = true; + _keydown(e.keyCode); + } + }) + .on("input propertychange", function (e) { + inputEventValid = true; + self._keydown_ = true; + _keydown(e.keyCode); + }) + .click(function (e) { + e.stopPropagation(); + _clk(); + }) + .mousedown(function (e) { + self.element.val(self.element.val()); + }) + .focusout(function (e) { + self._blurDebounce(); + }); + }, + + _focus: function () { + this.element.addClass("bi-input-focus"); + this._checkValidationOnValueChange(); + this._isEditing = true; + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this.fireEvent(BI.Input.EVENT_FOCUS); + }, + + _blur: function () { + var self = this; + if (self._keydown_ === true) { + BI.delay(blur, 300); + } else { + blur(); + } + function blur() { + if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { + self.element.val(self._lastValidValue ? self._lastValidValue : ""); + self._checkValidationOnValueChange(); + self._defaultState(); + } + self.element.removeClass("bi-input-focus"); + self._isEditing = false; + self._start = false; + if (self.isValid()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self); + self.fireEvent(BI.Input.EVENT_CONFIRM); + } + self.fireEvent(BI.Input.EVENT_BLUR); + } + }, + + _click: function () { + if (this._isEditing !== true) { + this._focus(); + this.selectAll(); + this.fireEvent(BI.Input.EVENT_CLICK); + } + }, + + onClick: function () { + this._click(); + }, + + onKeyDown: function (keyCode, ctrlKey) { + if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { + this._checkValidationOnValueChange(); + } + if (this.isValid() && BI.trim(this.getValue()) !== "") { + if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") + || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { + this._start = true; + this._pause = false; + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_START); + } + } + if (ctrlKey === true && keyCode === 86) {//ctrlKey+V + this._valueChange(); + } else { + if (keyCode == BI.KeyCode.ENTER) { + if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { + this.blur(); + this.fireEvent(BI.Input.EVENT_ENTER); + } else { + this.fireEvent(BI.Input.EVENT_RESTRICT); + } + } + if (keyCode == BI.KeyCode.SPACE) { + this.fireEvent(BI.Input.EVENT_SPACE); + } + if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == "") { + this.fireEvent(BI.Input.EVENT_REMOVE); + } + if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { + this.fireEvent(BI.Input.EVENT_BACKSPACE); + } + } + this.fireEvent(BI.Input.EVENT_KEY_DOWN); + + if (BI.isEndWithBlank(this.getValue())) { + this._pause = true; + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); + this.fireEvent(BI.Input.EVENT_PAUSE); + this._defaultState(); + } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && + BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_STOP); + this._valueChange(); + } else { + this._valueChange(); + } + }, + + //初始状态 + _defaultState: function () { + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this._lastValue = this.getValue(); + this._lastSubmitValue = null; + }, + + _valueChange: function () { + if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_CHANGE); + this._lastSubmitValue = BI.trim(this.getValue()); + } + if (this.getValue() == "") { + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); + this.fireEvent(BI.Input.EVENT_EMPTY); + } + this._lastValue = this.getValue(); + }, + + _checkValidationOnValueChange: function () { + var o = this.options; + var v = this.getValue(); + this.setValid( + (o.allowBlank === true && BI.trim(v) == "") || + (BI.isNotEmptyString(BI.trim(v)) + && (v === this._lastValidValue || + o.validationChecker.apply(this, [BI.trim(v)]) !== false)) + ); + }, + + focus: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能focus"); + } + if (!this._isEditing === true) { + this.element.focus(); + this._focus(); + this.selectAll(); + } + }, + + blur: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能blur"); + } + if (this._isEditing === true) { + this.element.blur(); + this._blurDebounce(); + } + }, + + selectAll: function () { + if (!this.element.is(":visible")) { + throw new Error("input输入框在不可见下不能select"); + } + this.element.select(); + this._isEditing = true; + }, + + setValue: function (textValue) { + this.element.val(textValue); + BI.nextTick(BI.bind(function () { + this._checkValidationOnValueChange(); + this._defaultState(); + if (this.isValid()) { + this._lastSubmitValue = this.getValue(); + } + }, this)); + }, + + getValue: function () { + return this.element.val() || ""; + }, + + isEditing: function () { + return this._isEditing; + }, + + getLastValidValue: function () { + return this._lastValidValue; + }, + + _setValid: function () { + BI.Input.superclass._setValid.apply(this, arguments); + if (this.isValid()) { + this._lastValidValue = this.getValue(); + this.element.removeClass("bi-input-error"); + this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); + } else { + if (this._lastValidValue === this.getValue()) { + this._lastValidValue = null; + } + this.element.addClass("bi-input-error"); + this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); + } + }, + + _setEnable: function (b) { + BI.Input.superclass._setEnable.apply(this, [b]); + this.element[0].disabled = !b; + } +}); +BI.Input.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.Input.EVENT_FOCUS = "EVENT_FOCUS"; +BI.Input.EVENT_CLICK = "EVENT_CLICK"; +BI.Input.EVENT_BLUR = "EVENT_BLUR"; +BI.Input.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.Input.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN"; +BI.Input.EVENT_SPACE = "EVENT_SPACE"; +BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.Input.EVENT_START = "EVENT_START"; +BI.Input.EVENT_PAUSE = "EVENT_PAUSE"; +BI.Input.EVENT_STOP = "EVENT_STOP"; +BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.Input.EVENT_REMOVE = "EVENT_REMOVE"; +BI.Input.EVENT_EMPTY = "EVENT_EMPTY"; +BI.Input.EVENT_VALID = "EVENT_VALID"; +BI.Input.EVENT_ERROR = "EVENT_ERROR"; +BI.Input.EVENT_ENTER = "EVENT_ENTER"; +BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.shortcut("bi.input", BI.Input);/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.Radio = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.Radio.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-radio radio-icon", + selected: false, + handler: BI.emptyFn, + width: 16, + height: 16, + iconWidth: 16, + iconHeight: 16 + }) + }, + + _init : function() { + BI.Radio.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.Radio.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.Radio.EVENT_CHANGE); + } + } +}); +BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; + +BI.shortcut("bi.radio", BI.Radio);/** + * Created by GUY on 2015/6/26. + */ + +BI.Label = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.Label.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-label", + textAlign: "center", + whiteSpace: "nowrap", //normal or nowrap + forceCenter: false, //是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 + textWidth: null, + textHeight: null, + hgap: 0, + vgap: 0, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + text: "", + py: "", + keyword: "" + }) + }, + + _createJson: function () { + var o = this.options; + return { + type: "bi.text", + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + lineHeight: o.textHeight, + text: o.text, + value: o.value, + py: o.py, + keyword: o.keyword + }; + }, + + _init: function () { + BI.Label.superclass._init.apply(this, arguments); + + if (this.options.textAlign === "center") { + this._createCenterEl(); + } else { + this._createNotCenterEl(); + } + }, + + _createCenterEl: function () { + var o = this.options; + var json = this._createJson(); + if (BI.isNumber(o.width) && o.width > 0) { + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + if (BI.isNumber(o.height) && o.height > 0) { + var gap = (o.width - o.textWidth) / 2; + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)), + left: gap + o.hgap + o.lgap, + right: gap + o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + } + ] + }); + this.element.css({"line-height": o.height + "px"}); + return; + } + json.width = o.textWidth; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.absolute", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + json.width = o.width - 2 * o.hgap; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)) + }] + }); + return; + } + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + json.width = o.textWidth; + BI.createWidget({ + type: "bi.center_adapt", + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + scrollable: o.whiteSpace === "normal", + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + if (BI.isNumber(o.textHeight) && o.textHeight > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + this.element.css({ + "line-height": o.height + "px" + }); + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + if (o.forceCenter) { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.center_adapt", + element: this, + items: [this.text] + }); + return; + } + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }) + }, + + _createNotCenterEl: function () { + var o = this.options; + var json = this._createJson(); + if (BI.isNumber(o.width) && o.width > 0) { + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + if (BI.isNumber(o.height) && o.height > 0) { + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + } + ] + }); + this.element.css({"line-height": o.height + "px"}); + return; + } + json.width = o.textWidth; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.absolute", + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [{ + el: (this.text = BI.createWidget(json)) + }] + }); + return; + } + if (BI.isNumber(o.textWidth) && o.textWidth > 0) { + json.width = o.textWidth; + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [ + { + el: (this.text = BI.createWidget(json)) + } + ] + }); + return; + } + if (o.whiteSpace == "normal") { + this.text = BI.createWidget(json) + BI.createWidget({ + type: "bi.vertical_adapt", + scrollable: o.whiteSpace === "normal", + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + element: this, + items: [this.text] + }); + return; + } + if (BI.isNumber(o.height) && o.height > 0) { + if (BI.isNumber(o.textHeight) && o.textHeight > 0) { + this.element.css({ + "line-height": o.height + "px" + }); + BI.createWidget({ + type: "bi.adaptive", + height: o.height, + scrollable: o.whiteSpace === "normal", + element: this, + items: [{ + el: (this.text = BI.createWidget(json)), + left: o.hgap + o.lgap, + right: o.hgap + o.rgap, + top: o.vgap + o.tgap, + bottom: o.vgap + o.bgap + }] + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + this.element.css({ + "line-height": o.height + "px" + }); + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }); + return; + } + BI.extend(json, { + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap + }); + if (o.forceCenter) { + this.text = BI.createWidget(json); + BI.createWidget({ + type: "bi.vertical_adapt", + element: this, + items: [this.text] + }); + return; + } + this.text = BI.createWidget(BI.extend(json, { + element: this + })); + BI.createWidget({ + type: "bi.layout", + element: this.text, + scrollable: o.whiteSpace === "normal" + }) + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (v) { + this.options.text = v; + this.text.setText(v); + }, + + getText: function () { + return this.options.text; + }, + + setStyle: function (css) { + this.text.setStyle(css) + }, + + setValue: function (v) { + BI.Label.superclass.setValue.apply(this, arguments); + if (!this.isReadOnly()) { + this.text.setValue(v); + } + }, + + populate: function () { + BI.Label.superclass.populate.apply(this, arguments); + } +}); + +BI.shortcut("bi.label", BI.Label);/** + * guy a元素 + * @class BI.Link + * @extends BI.Text + */ +BI.Link = BI.inherit(BI.Label, { + _defaultConfig: function() { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-link", + href: "", + target: "_blank" + }) + }, + + _createJson: function(){ + var o = this.options; + return { + type:"bi.a", + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + lineHeight: o.textHeight, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py, + href: o.href, + target: o.target + }; + }, + + _init : function() { + BI.Link.superclass._init.apply(this, arguments); + } +}); + +BI.shortcut("bi.link", BI.Link);/** + * guy + * 气泡提示 + * @class BI.Bubble + * @extends BI.Tip + * @type {*|void|Object} + */ +BI.Bubble = BI.inherit(BI.Tip, { + _defaultConfig: function() { + return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-bubble", + direction: "top", + text: "", + height: 35 + }) + }, + _init : function() { + BI.Bubble.superclass._init.apply(this, arguments); + var fn = function (e) { + e.stopPropagation(); + e.stopEvent(); + return false; + }; + this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); + BI.createWidget({ + type: "bi.left", + element: this, + items: [this["_" + this.options.direction]()] + }) + }, + + _createBubbleText: function(){ + return (this.text = BI.createWidget({ + type: "bi.label", + cls: "bubble-text", + text: this.options.text, + hgap: 10, + height: 30 + })); + }, + + _top: function(){ + return BI.createWidget({ + type: "bi.vertical", + items: [{ + el: this._createBubbleText(), + height: 30 + }, { + el: { + type: "bi.layout" + }, + height: 3 + }] + }) + }, + + _bottom: function(){ + return BI.createWidget({ + type: "bi.vertical", + items: [{ + el: { + type: "bi.layout" + }, + height: 3 + }, { + el: this._createBubbleText(), + height: 30 + }] + }) + }, + + _left: function(){ + return BI.createWidget({ + type: "bi.right", + items: [{ + el: { + type: "bi.layout", + width: 3, + height: 30 + } + }, { + el: this._createBubbleText() + }] + }) + }, + + _right: function(){ + return BI.createWidget({ + type: "bi.left", + items: [{ + el: { + type: "bi.layout", + width: 3, + height: 30 + } + }, { + el: this._createBubbleText() + }] + }) + }, + + setText: function(text){ + this.text.setText(text); + } +}); + +BI.shortcut("bi.bubble", BI.Bubble);/** + * toast提示 + * + * Created by GUY on 2015/9/7. + * @class BI.Toast + * @extends BI.Tip + */ +BI.Toast = BI.inherit(BI.Tip, { + _const: { + minWidth: 200, + hgap: 20 + }, + + _defaultConfig: function () { + return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-toast", + text: "", + level: "success",//success或warning + height: 30 + }) + }, + _init: function () { + BI.Toast.superclass._init.apply(this, arguments); + var o = this.options; + this.element.css({ + minWidth: this._const.minWidth + "px" + }) + this.element.addClass("toast-" + o.level); + var fn = function (e) { + e.stopPropagation(); + e.stopEvent(); + return false; + }; + this.element.bind({"click": fn, "mousedown": fn, "mouseup": fn, "mouseover": fn, "mouseenter": fn, "mouseleave": fn, "mousemove": fn}); + + this.text = BI.createWidget({ + type: "bi.label", + element: this, + text: o.text, + height: 30, + hgap: this._const.hgap + }) + }, + + setWidth: function(width){ + this.element.width(width); + }, + + setText: function (text) { + this.text.setText(text); + } +}); + +BI.shortcut("bi.toast", BI.Toast);/** + * toast提示 + * + * Created by GUY on 2015/9/7. + * @class BI.Tooltip + * @extends BI.Tip + */ +BI.Tooltip = BI.inherit(BI.Tip, { + _const: { + hgap: 10 + }, + + _defaultConfig: function () { + return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-tooltip", + text: "", + level: "success",//success或warning + stopEvent: false, + stopPropagation: false, + height: 20 + }) + }, + _init: function () { + BI.Tooltip.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.element.addClass("tooltip-" + o.level); + var fn = function (e) { + o.stopPropagation && e.stopPropagation(); + o.stopEvent && e.stopEvent(); + }; + this.element.bind({ + "click": fn, + "mousedown": fn, + "mouseup": fn, + "mouseover": fn, + "mouseenter": fn, + "mouseleave": fn, + "mousemove": fn + }); + + var texts = (o.text + "").split("\n"); + if (texts.length > 1) { + BI.createWidget({ + type: "bi.vertical", + element: this, + hgap: this._const.hgap, + items: BI.map(texts, function (i, text) { + return { + type: "bi.label", + textAlign: "left", + whiteSpace: "normal", + text: text, + textHeight: 16 + } + }) + }) + } else { + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + whiteSpace: "normal", + text: o.text, + textHeight: 20, + hgap: this._const.hgap + }); + } + }, + + setWidth: function (width) { + this.element.width(width - 2 * this._const.hgap); + }, + + setText: function (text) { + this.text && this.text.setText(text); + }, + + setLevel: function (level) { + this.element.removeClass("tooltip-success").removeClass("tooltip-warning"); + this.element.addClass("tooltip-" + level); + } +}); + +BI.shortcut("bi.tooltip", BI.Tooltip);/** + * 下拉 + * @class BI.Trigger + * @extends BI.Single + * @abstract + */ +BI.Trigger = BI.inherit(BI.Single, { + _defaultConfig: function() { + var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", + height: 30 + }) + }, + + _init : function() { + BI.Trigger.superclass._init.apply(this, arguments); + }, + + setKey: function(){ + + }, + + getKey: function(){ + + } +});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ┌────────────────────────────────────────────────────────────┐ \\ +// │ Eve 0.4.2 - JavaScript Events Library │ \\ +// ├────────────────────────────────────────────────────────────┤ \\ +// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ +// └────────────────────────────────────────────────────────────┘ \\ +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("eve", function() { + return factory(); + }); + } else if (typeof exports === "object") { + module.exports = factory(); + } else { + glob.eve = factory(); + } +}(this, function(){ + var version = "0.4.2", + has = "hasOwnProperty", + separator = /[\.\/]/, + wildcard = "*", + fun = function () {}, + numsort = function (a, b) { + return a - b; + }, + current_event, + stop, + events = {n: {}}, + /*\ + * eve + [ method ] + + * Fires event with given `name`, given scope and other parameters. + + > Arguments + + - name (string) name of the *event*, dot (`.`) or slash (`/`) separated + - scope (object) context for the event handlers + - varargs (...) the rest of arguments will be sent to event handlers + + = (object) array of returned values from the listeners + \*/ + eve = function (name, scope) { + name = String(name); + var e = events, + oldstop = stop, + args = Array.prototype.slice.call(arguments, 2), + listeners = eve.listeners(name), + z = 0, + f = false, + l, + indexed = [], + queue = {}, + out = [], + ce = current_event, + errors = []; + current_event = name; + stop = 0; + for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { + indexed.push(listeners[i].zIndex); + if (listeners[i].zIndex < 0) { + queue[listeners[i].zIndex] = listeners[i]; + } + } + indexed.sort(numsort); + while (indexed[z] < 0) { + l = queue[indexed[z++]]; + out.push(l.apply(scope, args)); + if (stop) { + stop = oldstop; + return out; + } + } + for (i = 0; i < ii; i++) { + l = listeners[i]; + if ("zIndex" in l) { + if (l.zIndex == indexed[z]) { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + do { + z++; + l = queue[indexed[z]]; + l && out.push(l.apply(scope, args)); + if (stop) { + break; + } + } while (l) + } else { + queue[l.zIndex] = l; + } + } else { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + } + } + stop = oldstop; + current_event = ce; + return out.length ? out : null; + }; + // Undocumented. Debug only. + eve._events = events; + /*\ + * eve.listeners + [ method ] + + * Internal method which gives you array of all event handlers that will be triggered by the given `name`. + + > Arguments + + - name (string) name of the event, dot (`.`) or slash (`/`) separated + + = (array) array of event handlers + \*/ + eve.listeners = function (name) { + var names = name.split(separator), + e = events, + item, + items, + k, + i, + ii, + j, + jj, + nes, + es = [e], + out = []; + for (i = 0, ii = names.length; i < ii; i++) { + nes = []; + for (j = 0, jj = es.length; j < jj; j++) { + e = es[j].n; + items = [e[names[i]], e[wildcard]]; + k = 2; + while (k--) { + item = items[k]; + if (item) { + nes.push(item); + out = out.concat(item.f || []); + } + } + } + es = nes; + } + return out; + }; + + /*\ + * eve.on + [ method ] + ** + * Binds given event handler with a given name. You can use wildcards “`*`” for the names: + | eve.on("*.under.*", f); + | eve("mouse.under.floor"); // triggers f + * Use @eve to trigger the listener. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + ** + = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment. + > Example: + | eve.on("mouse", eatIt)(2); + | eve.on("mouse", scream); + | eve.on("mouse", catchIt)(1); + * This will ensure that `catchIt()` function will be called before `eatIt()`. + * + * If you want to put your handler before non-indexed handlers, specify a negative value. + * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”. + \*/ + eve.on = function (name, f) { + name = String(name); + if (typeof f != "function") { + return function () {}; + } + var names = name.split(separator), + e = events; + for (var i = 0, ii = names.length; i < ii; i++) { + e = e.n; + e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}}); + } + e.f = e.f || []; + for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { + return fun; + } + e.f.push(f); + return function (zIndex) { + if (+zIndex == +zIndex) { + f.zIndex = +zIndex; + } + }; + }; + /*\ + * eve.f + [ method ] + ** + * Returns function that will fire given event with optional arguments. + * Arguments that will be passed to the result function will be also + * concated to the list of final arguments. + | el.onclick = eve.f("click", 1, 2); + | eve.on("click", function (a, b, c) { + | console.log(a, b, c); // 1, 2, [event object] + | }); + > Arguments + - event (string) event name + - varargs (…) and any other arguments + = (function) possible event handler function + \*/ + eve.f = function (event) { + var attrs = [].slice.call(arguments, 1); + return function () { + eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0))); + }; + }; + /*\ + * eve.stop + [ method ] + ** + * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing. + \*/ + eve.stop = function () { + stop = 1; + }; + /*\ + * eve.nt + [ method ] + ** + * Could be used inside event handler to figure out actual name of the event. + ** + > Arguments + ** + - subname (string) #optional subname of the event + ** + = (string) name of the event, if `subname` is not specified + * or + = (boolean) `true`, if current event’s name contains `subname` + \*/ + eve.nt = function (subname) { + if (subname) { + return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); + } + return current_event; + }; + /*\ + * eve.nts + [ method ] + ** + * Could be used inside event handler to figure out actual name of the event. + ** + ** + = (array) names of the event + \*/ + eve.nts = function () { + return current_event.split(separator); + }; + /*\ + * eve.off + [ method ] + ** + * Removes given function from the list of event listeners assigned to given name. + * If no arguments specified all the events will be cleared. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + \*/ + /*\ + * eve.unbind + [ method ] + ** + * See @eve.off + \*/ + eve.off = eve.unbind = function (name, f) { + if (!name) { + eve._events = events = {n: {}}; + return; + } + var names = name.split(separator), + e, + key, + splice, + i, ii, j, jj, + cur = [events]; + for (i = 0, ii = names.length; i < ii; i++) { + for (j = 0; j < cur.length; j += splice.length - 2) { + splice = [j, 1]; + e = cur[j].n; + if (names[i] != wildcard) { + if (e[names[i]]) { + splice.push(e[names[i]]); + } + } else { + for (key in e) if (e[has](key)) { + splice.push(e[key]); + } + } + cur.splice.apply(cur, splice); + } + } + for (i = 0, ii = cur.length; i < ii; i++) { + e = cur[i]; + while (e.n) { + if (f) { + if (e.f) { + for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { + e.f.splice(j, 1); + break; + } + !e.f.length && delete e.f; + } + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + var funcs = e.n[key].f; + for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { + funcs.splice(j, 1); + break; + } + !funcs.length && delete e.n[key].f; + } + } else { + delete e.f; + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + delete e.n[key].f; + } + } + e = e.n; + } + } + }; + /*\ + * eve.once + [ method ] + ** + * Binds given event handler with a given name to only run once then unbind itself. + | eve.once("login", f); + | eve("login"); // triggers f + | eve("login"); // no listeners + * Use @eve to trigger the listener. + ** + > Arguments + ** + - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards + - f (function) event handler function + ** + = (function) same return function as @eve.on + \*/ + eve.once = function (name, f) { + var f2 = function () { + eve.unbind(name, f2); + return f.apply(this, arguments); + }; + return eve.on(name, f2); + }; + /*\ + * eve.version + [ property (string) ] + ** + * Current version of the library. + \*/ + eve.version = version; + eve.toString = function () { + return "You are running Eve " + version; + }; + + return eve; +})); + +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Core Module │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.core", ["eve"], function(eve) { + return factory(eve); + }); + } else if (typeof exports === "object") { + module.exports = factory(require("eve")); + } else { + glob.Raphael = factory(glob.eve); + } +}(this, function (eve) { + /*\ + * Raphael + [ method ] + ** + * Creates a canvas object on which to draw. + * You must do this first, as all future calls to drawing methods + * from this instance will be bound to this canvas. + > Parameters + ** + - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface + - width (number) + - height (number) + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - x (number) + - y (number) + - width (number) + - height (number) + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add. + - callback (function) #optional callback function which is going to be executed in the context of newly created paper + * or + - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`. + = (object) @Paper + > Usage + | // Each of the following examples create a canvas + | // that is 320px wide by 200px high. + | // Canvas is created at the viewport’s 10,50 coordinate. + | var paper = Raphael(10, 50, 320, 200); + | // Canvas is created at the top left corner of the #notepad element + | // (or its top right corner in dir="rtl" elements) + | var paper = Raphael(document.getElementById("notepad"), 320, 200); + | // Same as above + | var paper = Raphael("notepad", 320, 200); + | // Image dump + | var set = Raphael(["notepad", 320, 200, { + | type: "rect", + | x: 10, + | y: 10, + | width: 25, + | height: 25, + | stroke: "#f00" + | }, { + | type: "text", + | x: 30, + | y: 40, + | text: "Dump" + | }]); + \*/ + function R(first) { + if (R.is(first, "function")) { + return loaded ? first() : eve.on("raphael.DOMload", first); + } else if (R.is(first, array)) { + return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); + } else { + var args = Array.prototype.slice.call(arguments, 0); + if (R.is(args[args.length - 1], "function")) { + var f = args.pop(); + return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { + f.call(R._engine.create[apply](R, args)); + }); + } else { + return R._engine.create[apply](R, arguments); + } + } + } + R.version = "2.1.4"; + R.eve = eve; + var loaded, + separator = /[, ]+/, + elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, + formatrg = /\{(\d+)\}/g, + proto = "prototype", + has = "hasOwnProperty", + g = { + doc: document, + win: window + }, + oldRaphael = { + was: Object.prototype[has].call(g.win, "Raphael"), + is: g.win.Raphael + }, + Paper = function () { + /*\ + * Paper.ca + [ property (object) ] + ** + * Shortcut for @Paper.customAttributes + \*/ + /*\ + * Paper.customAttributes + [ property (object) ] + ** + * If you have a set of attributes that you would like to represent + * as a function of some number you can do it easily with custom attributes: + > Usage + | paper.customAttributes.hue = function (num) { + | num = num % 1; + | return {fill: "hsb(" + num + ", 0.75, 1)"}; + | }; + | // Custom attribute “hue” will change fill + | // to be given hue with fixed saturation and brightness. + | // Now you can use it like this: + | var c = paper.circle(10, 10, 10).attr({hue: .45}); + | // or even like this: + | c.animate({hue: 1}, 1e3); + | + | // You could also create custom attribute + | // with multiple parameters: + | paper.customAttributes.hsb = function (h, s, b) { + | return {fill: "hsb(" + [h, s, b].join(",") + ")"}; + | }; + | c.attr({hsb: "0.5 .8 1"}); + | c.animate({hsb: [1, 0, 0.5]}, 1e3); + \*/ + this.ca = this.customAttributes = {}; + }, + paperproto, + appendChild = "appendChild", + apply = "apply", + concat = "concat", + supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test + E = "", + S = " ", + Str = String, + split = "split", + events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), + touchMap = { + mousedown: "touchstart", + mousemove: "touchmove", + mouseup: "touchend" + }, + lowerCase = Str.prototype.toLowerCase, + math = Math, + mmax = math.max, + mmin = math.min, + abs = math.abs, + pow = math.pow, + PI = math.PI, + nu = "number", + string = "string", + array = "array", + toString = "toString", + fillString = "fill", + objectToString = Object.prototype.toString, + paper = {}, + push = "push", + ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i, + colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, + isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, + bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, + round = math.round, + setAttribute = "setAttribute", + toFloat = parseFloat, + toInt = parseInt, + upperCase = Str.prototype.toUpperCase, + availableAttrs = R._availableAttrs = { + "arrow-end": "none", + "arrow-start": "none", + blur: 0, + "clip-rect": "0 0 1e9 1e9", + cursor: "default", + cx: 0, + cy: 0, + fill: "#fff", + "fill-opacity": 1, + font: '10px "Arial"', + "font-family": '"Arial"', + "font-size": "10", + "font-style": "normal", + "font-weight": 400, + gradient: 0, + height: 0, + href: "http://raphaeljs.com/", + "letter-spacing": 0, + opacity: 1, + path: "M0,0", + r: 0, + rx: 0, + ry: 0, + src: "", + stroke: "#000", + "stroke-dasharray": "", + "stroke-linecap": "butt", + "stroke-linejoin": "butt", + "stroke-miterlimit": 0, + "stroke-opacity": 1, + "stroke-width": 1, + target: "_blank", + "text-anchor": "middle", + title: "Raphael", + transform: "", + width: 0, + x: 0, + y: 0 + }, + availableAnimAttrs = R._availableAnimAttrs = { + blur: nu, + "clip-rect": "csv", + cx: nu, + cy: nu, + fill: "colour", + "fill-opacity": nu, + "font-size": nu, + height: nu, + opacity: nu, + path: "path", + r: nu, + rx: nu, + ry: nu, + stroke: "colour", + "stroke-opacity": nu, + "stroke-width": nu, + transform: "transform", + width: nu, + x: nu, + y: nu + }, + whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, + commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, + hsrg = {hs: 1, rg: 1}, + p2s = /,?([achlmqrstvxz]),?/gi, + pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, + radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, + eldata = {}, + sortByKey = function (a, b) { + return a.key - b.key; + }, + sortByNumber = function (a, b) { + return toFloat(a) - toFloat(b); + }, + fun = function () {}, + pipe = function (x) { + return x; + }, + rectPath = R._rectPath = function (x, y, w, h, r) { + if (r) { + return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; + } + return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; + }, + ellipsePath = function (x, y, rx, ry) { + if (ry == null) { + ry = rx; + } + return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; + }, + getPath = R._getPath = { + path: function (el) { + return el.attr("path"); + }, + circle: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.r); + }, + ellipse: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.rx, a.ry); + }, + rect: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height, a.r); + }, + image: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height); + }, + text: function (el) { + var bbox = el._getBBox(); + return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); + }, + set : function(el) { + var bbox = el._getBBox(); + return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); + } + }, + /*\ + * Raphael.mapPath + [ method ] + ** + * Transform the path string with given matrix. + > Parameters + - path (string) path string + - matrix (object) see @Matrix + = (string) transformed path string + \*/ + mapPath = R.mapPath = function (path, matrix) { + if (!matrix) { + return path; + } + var x, y, i, j, ii, jj, pathi; + path = path2curve(path); + for (i = 0, ii = path.length; i < ii; i++) { + pathi = path[i]; + for (j = 1, jj = pathi.length; j < jj; j += 2) { + x = matrix.x(pathi[j], pathi[j + 1]); + y = matrix.y(pathi[j], pathi[j + 1]); + pathi[j] = x; + pathi[j + 1] = y; + } + } + return path; + }; + + R._g = g; + /*\ + * Raphael.type + [ property (string) ] + ** + * Can be “SVG”, “VML” or empty, depending on browser support. + \*/ + R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); + if (R.type == "VML") { + var d = g.doc.createElement("div"), + b; + d.innerHTML = '<v:shape adj="1"/>'; + b = d.firstChild; + b.style.behavior = "url(#default#VML)"; + if (!(b && typeof b.adj == "object")) { + return (R.type = E); + } + d = null; + } + /*\ + * Raphael.svg + [ property (boolean) ] + ** + * `true` if browser supports SVG. + \*/ + /*\ + * Raphael.vml + [ property (boolean) ] + ** + * `true` if browser supports VML. + \*/ + R.svg = !(R.vml = R.type == "VML"); + R._Paper = Paper; + /*\ + * Raphael.fn + [ property (object) ] + ** + * You can add your own method to the canvas. For example if you want to draw a pie chart, + * you can create your own pie chart function and ship it as a Raphaël plugin. To do this + * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a + * Raphaël instance is created, otherwise it will take no effect. Please note that the + * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to + * ensure any namespacing ensures proper context. + > Usage + | Raphael.fn.arrow = function (x1, y1, x2, y2, size) { + | return this.path( ... ); + | }; + | // or create namespace + | Raphael.fn.mystuff = { + | arrow: function () {…}, + | star: function () {…}, + | // etc… + | }; + | var paper = Raphael(10, 10, 630, 480); + | // then use it + | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"}); + | paper.mystuff.arrow(); + | paper.mystuff.star(); + \*/ + R.fn = paperproto = Paper.prototype = R.prototype; + R._id = 0; + R._oid = 0; + /*\ + * Raphael.is + [ method ] + ** + * Handful of replacements for `typeof` operator. + > Parameters + - o (…) any object or primitive + - type (string) name of the type, i.e. “string”, “function”, “number”, etc. + = (boolean) is given value is of given type + \*/ + R.is = function (o, type) { + type = lowerCase.call(type); + if (type == "finite") { + return !isnan[has](+o); + } + if (type == "array") { + return o instanceof Array; + } + return (type == "null" && o === null) || + (type == typeof o && o !== null) || + (type == "object" && o === Object(o)) || + (type == "array" && Array.isArray && Array.isArray(o)) || + objectToString.call(o).slice(8, -1).toLowerCase() == type; + }; + + function clone(obj) { + if (typeof obj == "function" || Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) if (obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + } + + /*\ + * Raphael.angle + [ method ] + ** + * Returns angle between two or three points + > Parameters + - x1 (number) x coord of first point + - y1 (number) y coord of first point + - x2 (number) x coord of second point + - y2 (number) y coord of second point + - x3 (number) #optional x coord of third point + - y3 (number) #optional y coord of third point + = (number) angle in degrees. + \*/ + R.angle = function (x1, y1, x2, y2, x3, y3) { + if (x3 == null) { + var x = x1 - x2, + y = y1 - y2; + if (!x && !y) { + return 0; + } + return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; + } else { + return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); + } + }; + /*\ + * Raphael.rad + [ method ] + ** + * Transform angle to radians + > Parameters + - deg (number) angle in degrees + = (number) angle in radians. + \*/ + R.rad = function (deg) { + return deg % 360 * PI / 180; + }; + /*\ + * Raphael.deg + [ method ] + ** + * Transform angle to degrees + > Parameters + - rad (number) angle in radians + = (number) angle in degrees. + \*/ + R.deg = function (rad) { + return Math.round ((rad * 180 / PI% 360)* 1000) / 1000; + }; + /*\ + * Raphael.snapTo + [ method ] + ** + * Snaps given value to given grid. + > Parameters + - values (array|number) given array of values or step of the grid + - value (number) value to adjust + - tolerance (number) #optional tolerance for snapping. Default is `10`. + = (number) adjusted value. + \*/ + R.snapTo = function (values, value, tolerance) { + tolerance = R.is(tolerance, "finite") ? tolerance : 10; + if (R.is(values, array)) { + var i = values.length; + while (i--) if (abs(values[i] - value) <= tolerance) { + return values[i]; + } + } else { + values = +values; + var rem = value % values; + if (rem < tolerance) { + return value - rem; + } + if (rem > values - tolerance) { + return value - rem + values; + } + } + return value; + }; + + /*\ + * Raphael.createUUID + [ method ] + ** + * Returns RFC4122, version 4 ID + \*/ + var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { + return function () { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); + }; + })(/[xy]/g, function (c) { + var r = math.random() * 16 | 0, + v = c == "x" ? r : (r & 3 | 8); + return v.toString(16); + }); + + /*\ + * Raphael.setWindow + [ method ] + ** + * Used when you need to draw in `<iframe>`. Switched window to the iframe one. + > Parameters + - newwin (window) new window object + \*/ + R.setWindow = function (newwin) { + eve("raphael.setWindow", R, g.win, newwin); + g.win = newwin; + g.doc = g.win.document; + if (R._engine.initWin) { + R._engine.initWin(g.win); + } + }; + var toHex = function (color) { + if (R.vml) { + // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ + var trim = /^\s+|\s+$/g; + var bod; + try { + var docum = new ActiveXObject("htmlfile"); + docum.write("<body>"); + docum.close(); + bod = docum.body; + } catch(e) { + bod = createPopup().document.body; + } + var range = bod.createTextRange(); + toHex = cacher(function (color) { + try { + bod.style.color = Str(color).replace(trim, E); + var value = range.queryCommandValue("ForeColor"); + value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); + return "#" + ("000000" + value.toString(16)).slice(-6); + } catch(e) { + return "none"; + } + }); + } else { + var i = g.doc.createElement("i"); + i.title = "Rapha\xebl Colour Picker"; + i.style.display = "none"; + g.doc.body.appendChild(i); + toHex = cacher(function (color) { + i.style.color = color; + return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); + }); + } + return toHex(color); + }, + hsbtoString = function () { + return "hsb(" + [this.h, this.s, this.b] + ")"; + }, + hsltoString = function () { + return "hsl(" + [this.h, this.s, this.l] + ")"; + }, + rgbtoString = function () { + return this.hex; + }, + prepareRGB = function (r, g, b) { + if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { + b = r.b; + g = r.g; + r = r.r; + } + if (g == null && R.is(r, string)) { + var clr = R.getRGB(r); + r = clr.r; + g = clr.g; + b = clr.b; + } + if (r > 1 || g > 1 || b > 1) { + r /= 255; + g /= 255; + b /= 255; + } + + return [r, g, b]; + }, + packageRGB = function (r, g, b, o) { + r *= 255; + g *= 255; + b *= 255; + var rgb = { + r: r, + g: g, + b: b, + hex: R.rgb(r, g, b), + toString: rgbtoString + }; + R.is(o, "finite") && (rgb.opacity = o); + return rgb; + }; + + /*\ + * Raphael.color + [ method ] + ** + * Parses the color string and returns object with all values for the given color. + > Parameters + - clr (string) color string in one of the supported formats (see @Raphael.getRGB) + = (object) Combined RGB & HSB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #••••••, + o error (boolean) `true` if string can’t be parsed, + o h (number) hue, + o s (number) saturation, + o v (number) value (brightness), + o l (number) lightness + o } + \*/ + R.color = function (clr) { + var rgb; + if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { + rgb = R.hsb2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { + rgb = R.hsl2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else { + if (R.is(clr, "string")) { + clr = R.getRGB(clr); + } + if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { + rgb = R.rgb2hsl(clr); + clr.h = rgb.h; + clr.s = rgb.s; + clr.l = rgb.l; + rgb = R.rgb2hsb(clr); + clr.v = rgb.b; + } else { + clr = {hex: "none"}; + clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; + } + } + clr.toString = rgbtoString; + return clr; + }; + /*\ + * Raphael.hsb2rgb + [ method ] + ** + * Converts HSB values to RGB object. + > Parameters + - h (number) hue + - s (number) saturation + - v (number) value or brightness + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #•••••• + o } + \*/ + R.hsb2rgb = function (h, s, v, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { + v = h.b; + s = h.s; + o = h.o; + h = h.h; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = v * s; + X = C * (1 - abs(h % 2 - 1)); + R = G = B = v - C; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + /*\ + * Raphael.hsl2rgb + [ method ] + ** + * Converts HSL values to RGB object. + > Parameters + - h (number) hue + - s (number) saturation + - l (number) luminosity + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue, + o hex (string) color in HTML/CSS format: #•••••• + o } + \*/ + R.hsl2rgb = function (h, s, l, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { + l = h.l; + s = h.s; + h = h.h; + } + if (h > 1 || s > 1 || l > 1) { + h /= 360; + s /= 100; + l /= 100; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = 2 * s * (l < .5 ? l : 1 - l); + X = C * (1 - abs(h % 2 - 1)); + R = G = B = l - C / 2; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + /*\ + * Raphael.rgb2hsb + [ method ] + ** + * Converts RGB values to HSB object. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (object) HSB object in format: + o { + o h (number) hue + o s (number) saturation + o b (number) brightness + o } + \*/ + R.rgb2hsb = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, V, C; + V = mmax(r, g, b); + C = V - mmin(r, g, b); + H = (C == 0 ? null : + V == r ? (g - b) / C : + V == g ? (b - r) / C + 2 : + (r - g) / C + 4 + ); + H = ((H + 360) % 6) * 60 / 360; + S = C == 0 ? 0 : C / V; + return {h: H, s: S, b: V, toString: hsbtoString}; + }; + /*\ + * Raphael.rgb2hsl + [ method ] + ** + * Converts RGB values to HSL object. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (object) HSL object in format: + o { + o h (number) hue + o s (number) saturation + o l (number) luminosity + o } + \*/ + R.rgb2hsl = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, L, M, m, C; + M = mmax(r, g, b); + m = mmin(r, g, b); + C = M - m; + H = (C == 0 ? null : + M == r ? (g - b) / C : + M == g ? (b - r) / C + 2 : + (r - g) / C + 4); + H = ((H + 360) % 6) * 60 / 360; + L = (M + m) / 2; + S = (C == 0 ? 0 : + L < .5 ? C / (2 * L) : + C / (2 - 2 * L)); + return {h: H, s: S, l: L, toString: hsltoString}; + }; + R._path2string = function () { + return this.join(",").replace(p2s, "$1"); + }; + function repush(array, item) { + for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { + return array.push(array.splice(i, 1)[0]); + } + } + function cacher(f, scope, postprocessor) { + function newf() { + var arg = Array.prototype.slice.call(arguments, 0), + args = arg.join("\u2400"), + cache = newf.cache = newf.cache || {}, + count = newf.count = newf.count || []; + if (cache[has](args)) { + repush(count, args); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + count.length >= 1e3 && delete cache[count.shift()]; + count.push(args); + cache[args] = f[apply](scope, arg); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + return newf; + } + + var preload = R._preload = function (src, f) { + var img = g.doc.createElement("img"); + img.style.cssText = "position:absolute;left:-9999em;top:-9999em"; + img.onload = function () { + f.call(this); + this.onload = null; + g.doc.body.removeChild(this); + }; + img.onerror = function () { + g.doc.body.removeChild(this); + }; + g.doc.body.appendChild(img); + img.src = src; + }; + + function clrToString() { + return this.hex; + } + + /*\ + * Raphael.getRGB + [ method ] + ** + * Parses colour string as RGB object + > Parameters + - colour (string) colour string in one of formats: + # <ul> + # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> + # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> + # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> + # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> + # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> + # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> + # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsl(•••, •••, •••) — same as hsb</li> + # <li>hsl(•••%, •••%, •••%) — same as hsb</li> + # </ul> + = (object) RGB object in format: + o { + o r (number) red, + o g (number) green, + o b (number) blue + o hex (string) color in HTML/CSS format: #••••••, + o error (boolean) true if string can’t be parsed + o } + \*/ + R.getRGB = cacher(function (colour) { + if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + } + if (colour == "none") { + return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; + } + !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); + var res, + red, + green, + blue, + opacity, + t, + values, + rgb = colour.match(colourRegExp); + if (rgb) { + if (rgb[2]) { + blue = toInt(rgb[2].substring(5), 16); + green = toInt(rgb[2].substring(3, 5), 16); + red = toInt(rgb[2].substring(1, 3), 16); + } + if (rgb[3]) { + blue = toInt((t = rgb[3].charAt(3)) + t, 16); + green = toInt((t = rgb[3].charAt(2)) + t, 16); + red = toInt((t = rgb[3].charAt(1)) + t, 16); + } + if (rgb[4]) { + values = rgb[4][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + } + if (rgb[5]) { + values = rgb[5][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsb2rgb(red, green, blue, opacity); + } + if (rgb[6]) { + values = rgb[6][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsl2rgb(red, green, blue, opacity); + } + rgb = {r: red, g: green, b: blue, toString: clrToString}; + rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); + R.is(opacity, "finite") && (rgb.opacity = opacity); + return rgb; + } + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + }, R); + /*\ + * Raphael.hsb + [ method ] + ** + * Converts HSB values to hex representation of the colour. + > Parameters + - h (number) hue + - s (number) saturation + - b (number) value or brightness + = (string) hex representation of the colour. + \*/ + R.hsb = cacher(function (h, s, b) { + return R.hsb2rgb(h, s, b).hex; + }); + /*\ + * Raphael.hsl + [ method ] + ** + * Converts HSL values to hex representation of the colour. + > Parameters + - h (number) hue + - s (number) saturation + - l (number) luminosity + = (string) hex representation of the colour. + \*/ + R.hsl = cacher(function (h, s, l) { + return R.hsl2rgb(h, s, l).hex; + }); + /*\ + * Raphael.rgb + [ method ] + ** + * Converts RGB values to hex representation of the colour. + > Parameters + - r (number) red + - g (number) green + - b (number) blue + = (string) hex representation of the colour. + \*/ + R.rgb = cacher(function (r, g, b) { + function round(x) { return (x + 0.5) | 0; } + return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1); + }); + /*\ + * Raphael.getColor + [ method ] + ** + * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset + > Parameters + - value (number) #optional brightness, default is `0.75` + = (string) hex representation of the colour. + \*/ + R.getColor = function (value) { + var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, + rgb = this.hsb2rgb(start.h, start.s, start.b); + start.h += .075; + if (start.h > 1) { + start.h = 0; + start.s -= .2; + start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); + } + return rgb.hex; + }; + /*\ + * Raphael.getColor.reset + [ method ] + ** + * Resets spectrum position for @Raphael.getColor back to red. + \*/ + R.getColor.reset = function () { + delete this.start; + }; + + // http://schepers.cc/getting-to-the-point + function catmullRom2bezier(crp, z) { + var d = []; + for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { + var p = [ + {x: +crp[i - 2], y: +crp[i - 1]}, + {x: +crp[i], y: +crp[i + 1]}, + {x: +crp[i + 2], y: +crp[i + 3]}, + {x: +crp[i + 4], y: +crp[i + 5]} + ]; + if (z) { + if (!i) { + p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]}; + } else if (iLen - 4 == i) { + p[3] = {x: +crp[0], y: +crp[1]}; + } else if (iLen - 2 == i) { + p[2] = {x: +crp[0], y: +crp[1]}; + p[3] = {x: +crp[2], y: +crp[3]}; + } + } else { + if (iLen - 4 == i) { + p[3] = p[2]; + } else if (!i) { + p[0] = {x: +crp[i], y: +crp[i + 1]}; + } + } + d.push(["C", + (-p[0].x + 6 * p[1].x + p[2].x) / 6, + (-p[0].y + 6 * p[1].y + p[2].y) / 6, + (p[1].x + 6 * p[2].x - p[3].x) / 6, + (p[1].y + 6*p[2].y - p[3].y) / 6, + p[2].x, + p[2].y + ]); + } + + return d; + } + /*\ + * Raphael.parsePathString + [ method ] + ** + * Utility method + ** + * Parses given path string into an array of arrays of path segments. + > Parameters + - pathString (string|array) path string or array of segments (in the last case it will be returned straight away) + = (array) array of segments. + \*/ + R.parsePathString = function (pathString) { + if (!pathString) { + return null; + } + var pth = paths(pathString); + if (pth.arr) { + return pathClone(pth.arr); + } + + var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, + data = []; + if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption + data = pathClone(pathString); + } + if (!data.length) { + Str(pathString).replace(pathCommand, function (a, b, c) { + var params = [], + name = b.toLowerCase(); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + if (name == "m" && params.length > 2) { + data.push([b][concat](params.splice(0, 2))); + name = "l"; + b = b == "m" ? "l" : "L"; + } + if (name == "r") { + data.push([b][concat](params)); + } else while (params.length >= paramCounts[name]) { + data.push([b][concat](params.splice(0, paramCounts[name]))); + if (!paramCounts[name]) { + break; + } + } + }); + } + data.toString = R._path2string; + pth.arr = pathClone(data); + return data; + }; + /*\ + * Raphael.parseTransformString + [ method ] + ** + * Utility method + ** + * Parses given path string into an array of transformations. + > Parameters + - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away) + = (array) array of transformations. + \*/ + R.parseTransformString = cacher(function (TString) { + if (!TString) { + return null; + } + var paramCounts = {r: 3, s: 4, t: 2, m: 6}, + data = []; + if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption + data = pathClone(TString); + } + if (!data.length) { + Str(TString).replace(tCommand, function (a, b, c) { + var params = [], + name = lowerCase.call(b); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + data.push([b][concat](params)); + }); + } + data.toString = R._path2string; + return data; + }); + // PATHS + var paths = function (ps) { + var p = paths.ps = paths.ps || {}; + if (p[ps]) { + p[ps].sleep = 100; + } else { + p[ps] = { + sleep: 100 + }; + } + setTimeout(function () { + for (var key in p) if (p[has](key) && key != ps) { + p[key].sleep--; + !p[key].sleep && delete p[key]; + } + }); + return p[ps]; + }; + /*\ + * Raphael.findDotsAtSegment + [ method ] + ** + * Utility method + ** + * Find dot coordinates on the given cubic bezier curve at the given t. + > Parameters + - p1x (number) x of the first point of the curve + - p1y (number) y of the first point of the curve + - c1x (number) x of the first anchor of the curve + - c1y (number) y of the first anchor of the curve + - c2x (number) x of the second anchor of the curve + - c2y (number) y of the second anchor of the curve + - p2x (number) x of the second point of the curve + - p2y (number) y of the second point of the curve + - t (number) position on the curve (0..1) + = (object) point information in format: + o { + o x: (number) x coordinate of the point + o y: (number) y coordinate of the point + o m: { + o x: (number) x coordinate of the left anchor + o y: (number) y coordinate of the left anchor + o } + o n: { + o x: (number) x coordinate of the right anchor + o y: (number) y coordinate of the right anchor + o } + o start: { + o x: (number) x coordinate of the start of the curve + o y: (number) y coordinate of the start of the curve + o } + o end: { + o x: (number) x coordinate of the end of the curve + o y: (number) y coordinate of the end of the curve + o } + o alpha: (number) angle of the curve derivative at the point + o } + \*/ + R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t, + t13 = pow(t1, 3), + t12 = pow(t1, 2), + t2 = t * t, + t3 = t2 * t, + x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, + y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, + mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), + my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), + nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), + ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), + ax = t1 * p1x + t * c1x, + ay = t1 * p1y + t * c1y, + cx = t1 * c2x + t * p2x, + cy = t1 * c2y + t * p2y, + alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); + (mx > nx || my < ny) && (alpha += 180); + return { + x: x, + y: y, + m: {x: mx, y: my}, + n: {x: nx, y: ny}, + start: {x: ax, y: ay}, + end: {x: cx, y: cy}, + alpha: alpha + }; + }; + /*\ + * Raphael.bezierBBox + [ method ] + ** + * Utility method + ** + * Return bounding box of a given cubic bezier curve + > Parameters + - p1x (number) x of the first point of the curve + - p1y (number) y of the first point of the curve + - c1x (number) x of the first anchor of the curve + - c1y (number) y of the first anchor of the curve + - c2x (number) x of the second anchor of the curve + - c2y (number) y of the second anchor of the curve + - p2x (number) x of the second point of the curve + - p2y (number) y of the second point of the curve + * or + - bez (array) array of six points for bezier curve + = (object) point information in format: + o { + o min: { + o x: (number) x coordinate of the left point + o y: (number) y coordinate of the top point + o } + o max: { + o x: (number) x coordinate of the right point + o y: (number) y coordinate of the bottom point + o } + o } + \*/ + R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + if (!R.is(p1x, "array")) { + p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; + } + var bbox = curveDim.apply(null, p1x); + return { + x: bbox.min.x, + y: bbox.min.y, + x2: bbox.max.x, + y2: bbox.max.y, + width: bbox.max.x - bbox.min.x, + height: bbox.max.y - bbox.min.y + }; + }; + /*\ + * Raphael.isPointInsideBBox + [ method ] + ** + * Utility method + ** + * Returns `true` if given point is inside bounding boxes. + > Parameters + - bbox (string) bounding box + - x (string) x coordinate of the point + - y (string) y coordinate of the point + = (boolean) `true` if point inside + \*/ + R.isPointInsideBBox = function (bbox, x, y) { + return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2; + }; + /*\ + * Raphael.isBBoxIntersect + [ method ] + ** + * Utility method + ** + * Returns `true` if two bounding boxes intersect + > Parameters + - bbox1 (string) first bounding box + - bbox2 (string) second bounding box + = (boolean) `true` if they intersect + \*/ + R.isBBoxIntersect = function (bbox1, bbox2) { + var i = R.isPointInsideBBox; + return i(bbox2, bbox1.x, bbox1.y) + || i(bbox2, bbox1.x2, bbox1.y) + || i(bbox2, bbox1.x, bbox1.y2) + || i(bbox2, bbox1.x2, bbox1.y2) + || i(bbox1, bbox2.x, bbox2.y) + || i(bbox1, bbox2.x2, bbox2.y) + || i(bbox1, bbox2.x, bbox2.y2) + || i(bbox1, bbox2.x2, bbox2.y2) + || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) + && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); + }; + function base3(t, p1, p2, p3, p4) { + var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, + t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; + return t * t2 - 3 * p1 + 3 * p2; + } + function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { + if (z == null) { + z = 1; + } + z = z > 1 ? 1 : z < 0 ? 0 : z; + var z2 = z / 2, + n = 12, + Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816], + Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472], + sum = 0; + for (var i = 0; i < n; i++) { + var ct = z2 * Tvalues[i] + z2, + xbase = base3(ct, x1, x2, x3, x4), + ybase = base3(ct, y1, y2, y3, y4), + comb = xbase * xbase + ybase * ybase; + sum += Cvalues[i] * math.sqrt(comb); + } + return z2 * sum; + } + function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) { + if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) { + return; + } + var t = 1, + step = t / 2, + t2 = t - step, + l, + e = .01; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + while (abs(l - ll) > e) { + step /= 2; + t2 += (l < ll ? 1 : -1) * step; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + } + return t2; + } + function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { + if ( + mmax(x1, x2) < mmin(x3, x4) || + mmin(x1, x2) > mmax(x3, x4) || + mmax(y1, y2) < mmin(y3, y4) || + mmin(y1, y2) > mmax(y3, y4) + ) { + return; + } + var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), + ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), + denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + + if (!denominator) { + return; + } + var px = nx / denominator, + py = ny / denominator, + px2 = +px.toFixed(2), + py2 = +py.toFixed(2); + if ( + px2 < +mmin(x1, x2).toFixed(2) || + px2 > +mmax(x1, x2).toFixed(2) || + px2 < +mmin(x3, x4).toFixed(2) || + px2 > +mmax(x3, x4).toFixed(2) || + py2 < +mmin(y1, y2).toFixed(2) || + py2 > +mmax(y1, y2).toFixed(2) || + py2 < +mmin(y3, y4).toFixed(2) || + py2 > +mmax(y3, y4).toFixed(2) + ) { + return; + } + return {x: px, y: py}; + } + function inter(bez1, bez2) { + return interHelper(bez1, bez2); + } + function interCount(bez1, bez2) { + return interHelper(bez1, bez2, 1); + } + function interHelper(bez1, bez2, justCount) { + var bbox1 = R.bezierBBox(bez1), + bbox2 = R.bezierBBox(bez2); + if (!R.isBBoxIntersect(bbox1, bbox2)) { + return justCount ? 0 : []; + } + var l1 = bezlen.apply(0, bez1), + l2 = bezlen.apply(0, bez2), + n1 = mmax(~~(l1 / 5), 1), + n2 = mmax(~~(l2 / 5), 1), + dots1 = [], + dots2 = [], + xy = {}, + res = justCount ? 0 : []; + for (var i = 0; i < n1 + 1; i++) { + var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1)); + dots1.push({x: p.x, y: p.y, t: i / n1}); + } + for (i = 0; i < n2 + 1; i++) { + p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2)); + dots2.push({x: p.x, y: p.y, t: i / n2}); + } + for (i = 0; i < n1; i++) { + for (var j = 0; j < n2; j++) { + var di = dots1[i], + di1 = dots1[i + 1], + dj = dots2[j], + dj1 = dots2[j + 1], + ci = abs(di1.x - di.x) < .001 ? "y" : "x", + cj = abs(dj1.x - dj.x) < .001 ? "y" : "x", + is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); + if (is) { + if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) { + continue; + } + xy[is.x.toFixed(4)] = is.y.toFixed(4); + var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), + t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); + if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) { + if (justCount) { + res++; + } else { + res.push({ + x: is.x, + y: is.y, + t1: mmin(t1, 1), + t2: mmin(t2, 1) + }); + } + } + } + } + } + return res; + } + /*\ + * Raphael.pathIntersection + [ method ] + ** + * Utility method + ** + * Finds intersections of two paths + > Parameters + - path1 (string) path string + - path2 (string) path string + = (array) dots of intersection + o [ + o { + o x: (number) x coordinate of the point + o y: (number) y coordinate of the point + o t1: (number) t value for segment of path1 + o t2: (number) t value for segment of path2 + o segment1: (number) order number for segment of path1 + o segment2: (number) order number for segment of path2 + o bez1: (array) eight coordinates representing beziér curve for the segment of path1 + o bez2: (array) eight coordinates representing beziér curve for the segment of path2 + o } + o ] + \*/ + R.pathIntersection = function (path1, path2) { + return interPathHelper(path1, path2); + }; + R.pathIntersectionNumber = function (path1, path2) { + return interPathHelper(path1, path2, 1); + }; + function interPathHelper(path1, path2, justCount) { + path1 = R._path2curve(path1); + path2 = R._path2curve(path2); + var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2, + res = justCount ? 0 : []; + for (var i = 0, ii = path1.length; i < ii; i++) { + var pi = path1[i]; + if (pi[0] == "M") { + x1 = x1m = pi[1]; + y1 = y1m = pi[2]; + } else { + if (pi[0] == "C") { + bez1 = [x1, y1].concat(pi.slice(1)); + x1 = bez1[6]; + y1 = bez1[7]; + } else { + bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; + x1 = x1m; + y1 = y1m; + } + for (var j = 0, jj = path2.length; j < jj; j++) { + var pj = path2[j]; + if (pj[0] == "M") { + x2 = x2m = pj[1]; + y2 = y2m = pj[2]; + } else { + if (pj[0] == "C") { + bez2 = [x2, y2].concat(pj.slice(1)); + x2 = bez2[6]; + y2 = bez2[7]; + } else { + bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; + x2 = x2m; + y2 = y2m; + } + var intr = interHelper(bez1, bez2, justCount); + if (justCount) { + res += intr; + } else { + for (var k = 0, kk = intr.length; k < kk; k++) { + intr[k].segment1 = i; + intr[k].segment2 = j; + intr[k].bez1 = bez1; + intr[k].bez2 = bez2; + } + res = res.concat(intr); + } + } + } + } + } + return res; + } + /*\ + * Raphael.isPointInsidePath + [ method ] + ** + * Utility method + ** + * Returns `true` if given point is inside a given closed path. + > Parameters + - path (string) path string + - x (number) x of the point + - y (number) y of the point + = (boolean) true, if point is inside the path + \*/ + R.isPointInsidePath = function (path, x, y) { + var bbox = R.pathBBox(path); + return R.isPointInsideBBox(bbox, x, y) && + interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1; + }; + R._removedFactory = function (methodname) { + return function () { + eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname); + }; + }; + /*\ + * Raphael.pathBBox + [ method ] + ** + * Utility method + ** + * Return bounding box of a given path + > Parameters + - path (string) path string + = (object) bounding box + o { + o x: (number) x coordinate of the left top point of the box + o y: (number) y coordinate of the left top point of the box + o x2: (number) x coordinate of the right bottom point of the box + o y2: (number) y coordinate of the right bottom point of the box + o width: (number) width of the box + o height: (number) height of the box + o cx: (number) x coordinate of the center of the box + o cy: (number) y coordinate of the center of the box + o } + \*/ + var pathDimensions = R.pathBBox = function (path) { + var pth = paths(path); + if (pth.bbox) { + return clone(pth.bbox); + } + if (!path) { + return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; + } + path = path2curve(path); + var x = 0, + y = 0, + X = [], + Y = [], + p; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = p[1]; + y = p[2]; + X.push(x); + Y.push(y); + } else { + var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + X = X[concat](dim.min.x, dim.max.x); + Y = Y[concat](dim.min.y, dim.max.y); + x = p[5]; + y = p[6]; + } + } + var xmin = mmin[apply](0, X), + ymin = mmin[apply](0, Y), + xmax = mmax[apply](0, X), + ymax = mmax[apply](0, Y), + width = xmax - xmin, + height = ymax - ymin, + bb = { + x: xmin, + y: ymin, + x2: xmax, + y2: ymax, + width: width, + height: height, + cx: xmin + width / 2, + cy: ymin + height / 2 + }; + pth.bbox = clone(bb); + return bb; + }, + pathClone = function (pathArray) { + var res = clone(pathArray); + res.toString = R._path2string; + return res; + }, + pathToRelative = R._pathToRelative = function (pathArray) { + var pth = paths(pathArray); + if (pth.rel) { + return pathClone(pth.rel); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = pathArray[0][1]; + y = pathArray[0][2]; + mx = x; + my = y; + start++; + res.push(["M", x, y]); + } + for (var i = start, ii = pathArray.length; i < ii; i++) { + var r = res[i] = [], + pa = pathArray[i]; + if (pa[0] != lowerCase.call(pa[0])) { + r[0] = lowerCase.call(pa[0]); + switch (r[0]) { + case "a": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] - x).toFixed(3); + r[7] = +(pa[7] - y).toFixed(3); + break; + case "v": + r[1] = +(pa[1] - y).toFixed(3); + break; + case "m": + mx = pa[1]; + my = pa[2]; + default: + for (var j = 1, jj = pa.length; j < jj; j++) { + r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); + } + } + } else { + r = res[i] = []; + if (pa[0] == "m") { + mx = pa[1] + x; + my = pa[2] + y; + } + for (var k = 0, kk = pa.length; k < kk; k++) { + res[i][k] = pa[k]; + } + } + var len = res[i].length; + switch (res[i][0]) { + case "z": + x = mx; + y = my; + break; + case "h": + x += +res[i][len - 1]; + break; + case "v": + y += +res[i][len - 1]; + break; + default: + x += +res[i][len - 2]; + y += +res[i][len - 1]; + } + } + res.toString = R._path2string; + pth.rel = pathClone(res); + return res; + }, + pathToAbsolute = R._pathToAbsolute = function (pathArray) { + var pth = paths(pathArray); + if (pth.abs) { + return pathClone(pth.abs); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + if (!pathArray || !pathArray.length) { + return [["M", 0, 0]]; + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = +pathArray[0][1]; + y = +pathArray[0][2]; + mx = x; + my = y; + start++; + res[0] = ["M", x, y]; + } + var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z"; + for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { + res.push(r = []); + pa = pathArray[i]; + if (pa[0] != upperCase.call(pa[0])) { + r[0] = upperCase.call(pa[0]); + switch (r[0]) { + case "A": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] + x); + r[7] = +(pa[7] + y); + break; + case "V": + r[1] = +pa[1] + y; + break; + case "H": + r[1] = +pa[1] + x; + break; + case "R": + var dots = [x, y][concat](pa.slice(1)); + for (var j = 2, jj = dots.length; j < jj; j++) { + dots[j] = +dots[j] + x; + dots[++j] = +dots[j] + y; + } + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + break; + case "M": + mx = +pa[1] + x; + my = +pa[2] + y; + default: + for (j = 1, jj = pa.length; j < jj; j++) { + r[j] = +pa[j] + ((j % 2) ? x : y); + } + } + } else if (pa[0] == "R") { + dots = [x, y][concat](pa.slice(1)); + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + r = ["R"][concat](pa.slice(-2)); + } else { + for (var k = 0, kk = pa.length; k < kk; k++) { + r[k] = pa[k]; + } + } + switch (r[0]) { + case "Z": + x = mx; + y = my; + break; + case "H": + x = r[1]; + break; + case "V": + y = r[1]; + break; + case "M": + mx = r[r.length - 2]; + my = r[r.length - 1]; + default: + x = r[r.length - 2]; + y = r[r.length - 1]; + } + } + res.toString = R._path2string; + pth.abs = pathClone(res); + return res; + }, + l2c = function (x1, y1, x2, y2) { + return [x1, y1, x2, y2, x2, y2]; + }, + q2c = function (x1, y1, ax, ay, x2, y2) { + var _13 = 1 / 3, + _23 = 2 / 3; + return [ + _13 * x1 + _23 * ax, + _13 * y1 + _23 * ay, + _13 * x2 + _23 * ax, + _13 * y2 + _23 * ay, + x2, + y2 + ]; + }, + a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { + // for more information of where this math came from visit: + // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + var _120 = PI * 120 / 180, + rad = PI / 180 * (+angle || 0), + res = [], + xy, + rotate = cacher(function (x, y, rad) { + var X = x * math.cos(rad) - y * math.sin(rad), + Y = x * math.sin(rad) + y * math.cos(rad); + return {x: X, y: Y}; + }); + if (!recursive) { + xy = rotate(x1, y1, -rad); + x1 = xy.x; + y1 = xy.y; + xy = rotate(x2, y2, -rad); + x2 = xy.x; + y2 = xy.y; + var cos = math.cos(PI / 180 * angle), + sin = math.sin(PI / 180 * angle), + x = (x1 - x2) / 2, + y = (y1 - y2) / 2; + var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); + if (h > 1) { + h = math.sqrt(h); + rx = h * rx; + ry = h * ry; + } + var rx2 = rx * rx, + ry2 = ry * ry, + k = (large_arc_flag == sweep_flag ? -1 : 1) * + math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), + cx = k * rx * y / ry + (x1 + x2) / 2, + cy = k * -ry * x / rx + (y1 + y2) / 2, + f1 = math.asin(((y1 - cy) / ry).toFixed(9)), + f2 = math.asin(((y2 - cy) / ry).toFixed(9)); + + f1 = x1 < cx ? PI - f1 : f1; + f2 = x2 < cx ? PI - f2 : f2; + f1 < 0 && (f1 = PI * 2 + f1); + f2 < 0 && (f2 = PI * 2 + f2); + if (sweep_flag && f1 > f2) { + f1 = f1 - PI * 2; + } + if (!sweep_flag && f2 > f1) { + f2 = f2 - PI * 2; + } + } else { + f1 = recursive[0]; + f2 = recursive[1]; + cx = recursive[2]; + cy = recursive[3]; + } + var df = f2 - f1; + if (abs(df) > _120) { + var f2old = f2, + x2old = x2, + y2old = y2; + f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); + x2 = cx + rx * math.cos(f2); + y2 = cy + ry * math.sin(f2); + res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); + } + df = f2 - f1; + var c1 = math.cos(f1), + s1 = math.sin(f1), + c2 = math.cos(f2), + s2 = math.sin(f2), + t = math.tan(df / 4), + hx = 4 / 3 * rx * t, + hy = 4 / 3 * ry * t, + m1 = [x1, y1], + m2 = [x1 + hx * s1, y1 - hy * c1], + m3 = [x2 + hx * s2, y2 - hy * c2], + m4 = [x2, y2]; + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + if (recursive) { + return [m2, m3, m4][concat](res); + } else { + res = [m2, m3, m4][concat](res).join()[split](","); + var newres = []; + for (var i = 0, ii = res.length; i < ii; i++) { + newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; + } + return newres; + } + }, + findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t; + return { + x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, + y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y + }; + }, + curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), + b = 2 * (c1x - p1x) - 2 * (c2x - c1x), + c = p1x - c1x, + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, + y = [p1y, p2y], + x = [p1x, p2x], + dot; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); + b = 2 * (c1y - p1y) - 2 * (c2y - c1y); + c = p1y - c1y; + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + return { + min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, + max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} + }; + }), + path2curve = R._path2curve = cacher(function (path, path2) { + var pth = !path2 && paths(path); + if (!path2 && pth.curve) { + return pathClone(pth.curve); + } + var p = pathToAbsolute(path), + p2 = path2 && pathToAbsolute(path2), + attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + processPath = function (path, d, pcom) { + var nx, ny, tq = {T:1, Q:1}; + if (!path) { + return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; + } + !(path[0] in tq) && (d.qx = d.qy = null); + switch (path[0]) { + case "M": + d.X = path[1]; + d.Y = path[2]; + break; + case "A": + path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); + break; + case "S": + if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S. + nx = d.x * 2 - d.bx; // And reflect the previous + ny = d.y * 2 - d.by; // command's control point relative to the current point. + } + else { // or some else or nothing + nx = d.x; + ny = d.y; + } + path = ["C", nx, ny][concat](path.slice(1)); + break; + case "T": + if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T. + d.qx = d.x * 2 - d.qx; // And make a reflection similar + d.qy = d.y * 2 - d.qy; // to case "S". + } + else { // or something else or nothing + d.qx = d.x; + d.qy = d.y; + } + path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); + break; + case "Q": + d.qx = path[1]; + d.qy = path[2]; + path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); + break; + case "L": + path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); + break; + case "H": + path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); + break; + case "V": + path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); + break; + case "Z": + path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); + break; + } + return path; + }, + fixArc = function (pp, i) { + if (pp[i].length > 7) { + pp[i].shift(); + var pi = pp[i]; + while (pi.length) { + pcoms1[i]="A"; // if created multiple C:s, their original seg is saved + p2 && (pcoms2[i]="A"); // the same as above + pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); + } + pp.splice(i, 1); + ii = mmax(p.length, p2 && p2.length || 0); + } + }, + fixM = function (path1, path2, a1, a2, i) { + if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { + path2.splice(i, 0, ["M", a2.x, a2.y]); + a1.bx = 0; + a1.by = 0; + a1.x = path1[i][1]; + a1.y = path1[i][2]; + ii = mmax(p.length, p2 && p2.length || 0); + } + }, + pcoms1 = [], // path commands of original path p + pcoms2 = [], // path commands of original path p2 + pfirst = "", // temporary holder for original path command + pcom = ""; // holder for previous path command of original path + for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { + p[i] && (pfirst = p[i][0]); // save current path command + + if (pfirst != "C") // C is not saved yet, because it may be result of conversion + { + pcoms1[i] = pfirst; // Save current path command + i && ( pcom = pcoms1[i-1]); // Get previous path command pcom + } + p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath + + if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command + // which may produce multiple C:s + // so we have to make sure that C is also C in original path + + fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 + + if (p2) { // the same procedures is done to p2 + p2[i] && (pfirst = p2[i][0]); + if (pfirst != "C") + { + pcoms2[i] = pfirst; + i && (pcom = pcoms2[i-1]); + } + p2[i] = processPath(p2[i], attrs2, pcom); + + if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C"; + + fixArc(p2, i); + } + fixM(p, p2, attrs, attrs2, i); + fixM(p2, p, attrs2, attrs, i); + var seg = p[i], + seg2 = p2 && p2[i], + seglen = seg.length, + seg2len = p2 && seg2.length; + attrs.x = seg[seglen - 2]; + attrs.y = seg[seglen - 1]; + attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; + attrs.by = toFloat(seg[seglen - 3]) || attrs.y; + attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); + attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); + attrs2.x = p2 && seg2[seg2len - 2]; + attrs2.y = p2 && seg2[seg2len - 1]; + } + if (!p2) { + pth.curve = pathClone(p); + } + return p2 ? [p, p2] : p; + }, null, pathClone), + parseDots = R._parseDots = cacher(function (gradient) { + var dots = []; + for (var i = 0, ii = gradient.length; i < ii; i++) { + var dot = {}, + par = gradient[i].match(/^([^:]*):?([\d\.]*)/); + dot.color = R.getRGB(par[1]); + if (dot.color.error) { + return null; + } + dot.opacity = dot.color.opacity; + dot.color = dot.color.hex; + par[2] && (dot.offset = par[2] + "%"); + dots.push(dot); + } + for (i = 1, ii = dots.length - 1; i < ii; i++) { + if (!dots[i].offset) { + var start = toFloat(dots[i - 1].offset || 0), + end = 0; + for (var j = i + 1; j < ii; j++) { + if (dots[j].offset) { + end = dots[j].offset; + break; + } + } + if (!end) { + end = 100; + j = ii; + } + end = toFloat(end); + var d = (end - start) / (j - i + 1); + for (; i < j; i++) { + start += d; + dots[i].offset = start + "%"; + } + } + } + return dots; + }), + tear = R._tear = function (el, paper) { + el == paper.top && (paper.top = el.prev); + el == paper.bottom && (paper.bottom = el.next); + el.next && (el.next.prev = el.prev); + el.prev && (el.prev.next = el.next); + }, + tofront = R._tofront = function (el, paper) { + if (paper.top === el) { + return; + } + tear(el, paper); + el.next = null; + el.prev = paper.top; + paper.top.next = el; + paper.top = el; + }, + toback = R._toback = function (el, paper) { + if (paper.bottom === el) { + return; + } + tear(el, paper); + el.next = paper.bottom; + el.prev = null; + paper.bottom.prev = el; + paper.bottom = el; + }, + insertafter = R._insertafter = function (el, el2, paper) { + tear(el, paper); + el2 == paper.top && (paper.top = el); + el2.next && (el2.next.prev = el); + el.next = el2.next; + el.prev = el2; + el2.next = el; + }, + insertbefore = R._insertbefore = function (el, el2, paper) { + tear(el, paper); + el2 == paper.bottom && (paper.bottom = el); + el2.prev && (el2.prev.next = el); + el.prev = el2.prev; + el2.prev = el; + el.next = el2; + }, + /*\ + * Raphael.toMatrix + [ method ] + ** + * Utility method + ** + * Returns matrix of transformations applied to a given path + > Parameters + - path (string) path string + - transform (string|array) transformation string + = (object) @Matrix + \*/ + toMatrix = R.toMatrix = function (path, transform) { + var bb = pathDimensions(path), + el = { + _: { + transform: E + }, + getBBox: function () { + return bb; + } + }; + extractTransform(el, transform); + return el.matrix; + }, + /*\ + * Raphael.transformPath + [ method ] + ** + * Utility method + ** + * Returns path transformed by a given transformation + > Parameters + - path (string) path string + - transform (string|array) transformation string + = (string) path + \*/ + transformPath = R.transformPath = function (path, transform) { + return mapPath(path, toMatrix(path, transform)); + }, + extractTransform = R._extractTransform = function (el, tstr) { + if (tstr == null) { + return el._.transform; + } + tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); + var tdata = R.parseTransformString(tstr), + deg = 0, + dx = 0, + dy = 0, + sx = 1, + sy = 1, + _ = el._, + m = new Matrix; + _.transform = tdata || []; + if (tdata) { + for (var i = 0, ii = tdata.length; i < ii; i++) { + var t = tdata[i], + tlen = t.length, + command = Str(t[0]).toLowerCase(), + absolute = t[0] != command, + inver = absolute ? m.invert() : 0, + x1, + y1, + x2, + y2, + bb; + if (command == "t" && tlen == 3) { + if (absolute) { + x1 = inver.x(0, 0); + y1 = inver.y(0, 0); + x2 = inver.x(t[1], t[2]); + y2 = inver.y(t[1], t[2]); + m.translate(x2 - x1, y2 - y1); + } else { + m.translate(t[1], t[2]); + } + } else if (command == "r") { + if (tlen == 2) { + bb = bb || el.getBBox(1); + m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); + deg += t[1]; + } else if (tlen == 4) { + if (absolute) { + x2 = inver.x(t[2], t[3]); + y2 = inver.y(t[2], t[3]); + m.rotate(t[1], x2, y2); + } else { + m.rotate(t[1], t[2], t[3]); + } + deg += t[1]; + } + } else if (command == "s") { + if (tlen == 2 || tlen == 3) { + bb = bb || el.getBBox(1); + m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); + sx *= t[1]; + sy *= t[tlen - 1]; + } else if (tlen == 5) { + if (absolute) { + x2 = inver.x(t[3], t[4]); + y2 = inver.y(t[3], t[4]); + m.scale(t[1], t[2], x2, y2); + } else { + m.scale(t[1], t[2], t[3], t[4]); + } + sx *= t[1]; + sy *= t[2]; + } + } else if (command == "m" && tlen == 7) { + m.add(t[1], t[2], t[3], t[4], t[5], t[6]); + } + _.dirtyT = 1; + el.matrix = m; + } + } + + /*\ + * Element.matrix + [ property (object) ] + ** + * Keeps @Matrix object, which represents element transformation + \*/ + el.matrix = m; + + _.sx = sx; + _.sy = sy; + _.deg = deg; + _.dx = dx = m.e; + _.dy = dy = m.f; + + if (sx == 1 && sy == 1 && !deg && _.bbox) { + _.bbox.x += +dx; + _.bbox.y += +dy; + } else { + _.dirtyT = 1; + } + }, + getEmpty = function (item) { + var l = item[0]; + switch (l.toLowerCase()) { + case "t": return [l, 0, 0]; + case "m": return [l, 1, 0, 0, 1, 0, 0]; + case "r": if (item.length == 4) { + return [l, 0, item[2], item[3]]; + } else { + return [l, 0]; + } + case "s": if (item.length == 5) { + return [l, 1, 1, item[3], item[4]]; + } else if (item.length == 3) { + return [l, 1, 1]; + } else { + return [l, 1]; + } + } + }, + equaliseTransform = R._equaliseTransform = function (t1, t2) { + t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); + t1 = R.parseTransformString(t1) || []; + t2 = R.parseTransformString(t2) || []; + var maxlength = mmax(t1.length, t2.length), + from = [], + to = [], + i = 0, j, jj, + tt1, tt2; + for (; i < maxlength; i++) { + tt1 = t1[i] || getEmpty(t2[i]); + tt2 = t2[i] || getEmpty(tt1); + if ((tt1[0] != tt2[0]) || + (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || + (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) + ) { + return; + } + from[i] = []; + to[i] = []; + for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { + j in tt1 && (from[i][j] = tt1[j]); + j in tt2 && (to[i][j] = tt2[j]); + } + } + return { + from: from, + to: to + }; + }; + R._getContainer = function (x, y, w, h) { + var container; + container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; + if (container == null) { + return; + } + if (container.tagName) { + if (y == null) { + return { + container: container, + width: container.style.pixelWidth || container.offsetWidth, + height: container.style.pixelHeight || container.offsetHeight + }; + } else { + return { + container: container, + width: y, + height: w + }; + } + } + return { + container: 1, + x: x, + y: y, + width: w, + height: h + }; + }; + /*\ + * Raphael.pathToRelative + [ method ] + ** + * Utility method + ** + * Converts path to relative form + > Parameters + - pathString (string|array) path string or array of segments + = (array) array of segments. + \*/ + R.pathToRelative = pathToRelative; + R._engine = {}; + /*\ + * Raphael.path2curve + [ method ] + ** + * Utility method + ** + * Converts path to a new path where all segments are cubic bezier curves. + > Parameters + - pathString (string|array) path string or array of segments + = (array) array of segments. + \*/ + R.path2curve = path2curve; + /*\ + * Raphael.matrix + [ method ] + ** + * Utility method + ** + * Returns matrix based on given parameters. + > Parameters + - a (number) + - b (number) + - c (number) + - d (number) + - e (number) + - f (number) + = (object) @Matrix + \*/ + R.matrix = function (a, b, c, d, e, f) { + return new Matrix(a, b, c, d, e, f); + }; + function Matrix(a, b, c, d, e, f) { + if (a != null) { + this.a = +a; + this.b = +b; + this.c = +c; + this.d = +d; + this.e = +e; + this.f = +f; + } else { + this.a = 1; + this.b = 0; + this.c = 0; + this.d = 1; + this.e = 0; + this.f = 0; + } + } + (function (matrixproto) { + /*\ + * Matrix.add + [ method ] + ** + * Adds given matrix to existing one. + > Parameters + - a (number) + - b (number) + - c (number) + - d (number) + - e (number) + - f (number) + or + - matrix (object) @Matrix + \*/ + matrixproto.add = function (a, b, c, d, e, f) { + var out = [[], [], []], + m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], + matrix = [[a, c, e], [b, d, f], [0, 0, 1]], + x, y, z, res; + + if (a && a instanceof Matrix) { + matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; + } + + for (x = 0; x < 3; x++) { + for (y = 0; y < 3; y++) { + res = 0; + for (z = 0; z < 3; z++) { + res += m[x][z] * matrix[z][y]; + } + out[x][y] = res; + } + } + this.a = out[0][0]; + this.b = out[1][0]; + this.c = out[0][1]; + this.d = out[1][1]; + this.e = out[0][2]; + this.f = out[1][2]; + }; + /*\ + * Matrix.invert + [ method ] + ** + * Returns inverted version of the matrix + = (object) @Matrix + \*/ + matrixproto.invert = function () { + var me = this, + x = me.a * me.d - me.b * me.c; + return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); + }; + /*\ + * Matrix.clone + [ method ] + ** + * Returns copy of the matrix + = (object) @Matrix + \*/ + matrixproto.clone = function () { + return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); + }; + /*\ + * Matrix.translate + [ method ] + ** + * Translate the matrix + > Parameters + - x (number) + - y (number) + \*/ + matrixproto.translate = function (x, y) { + this.add(1, 0, 0, 1, x, y); + }; + /*\ + * Matrix.scale + [ method ] + ** + * Scales the matrix + > Parameters + - x (number) + - y (number) #optional + - cx (number) #optional + - cy (number) #optional + \*/ + matrixproto.scale = function (x, y, cx, cy) { + y == null && (y = x); + (cx || cy) && this.add(1, 0, 0, 1, cx, cy); + this.add(x, 0, 0, y, 0, 0); + (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); + }; + /*\ + * Matrix.rotate + [ method ] + ** + * Rotates the matrix + > Parameters + - a (number) + - x (number) + - y (number) + \*/ + matrixproto.rotate = function (a, x, y) { + a = R.rad(a); + x = x || 0; + y = y || 0; + var cos = +math.cos(a).toFixed(9), + sin = +math.sin(a).toFixed(9); + this.add(cos, sin, -sin, cos, x, y); + this.add(1, 0, 0, 1, -x, -y); + }; + /*\ + * Matrix.x + [ method ] + ** + * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y + > Parameters + - x (number) + - y (number) + = (number) x + \*/ + matrixproto.x = function (x, y) { + return x * this.a + y * this.c + this.e; + }; + /*\ + * Matrix.y + [ method ] + ** + * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x + > Parameters + - x (number) + - y (number) + = (number) y + \*/ + matrixproto.y = function (x, y) { + return x * this.b + y * this.d + this.f; + }; + matrixproto.get = function (i) { + return +this[Str.fromCharCode(97 + i)].toFixed(4); + }; + matrixproto.toString = function () { + return R.svg ? + "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : + [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); + }; + matrixproto.toFilter = function () { + return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; + }; + matrixproto.offset = function () { + return [this.e.toFixed(4), this.f.toFixed(4)]; + }; + function norm(a) { + return a[0] * a[0] + a[1] * a[1]; + } + function normalize(a) { + var mag = math.sqrt(norm(a)); + a[0] && (a[0] /= mag); + a[1] && (a[1] /= mag); + } + /*\ + * Matrix.split + [ method ] + ** + * Splits matrix into primitive transformations + = (object) in format: + o dx (number) translation by x + o dy (number) translation by y + o scalex (number) scale by x + o scaley (number) scale by y + o shear (number) shear + o rotate (number) rotation in deg + o isSimple (boolean) could it be represented via simple transformations + \*/ + matrixproto.split = function () { + var out = {}; + // translation + out.dx = this.e; + out.dy = this.f; + + // scale and shear + var row = [[this.a, this.c], [this.b, this.d]]; + out.scalex = math.sqrt(norm(row[0])); + normalize(row[0]); + + out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; + row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; + + out.scaley = math.sqrt(norm(row[1])); + normalize(row[1]); + out.shear /= out.scaley; + + // rotation + var sin = -row[0][1], + cos = row[1][1]; + if (cos < 0) { + out.rotate = R.deg(math.acos(cos)); + if (sin < 0) { + out.rotate = 360 - out.rotate; + } + } else { + out.rotate = R.deg(math.asin(sin)); + } + + out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); + out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; + out.noRotation = !+out.shear.toFixed(9) && !out.rotate; + return out; + }; + /*\ + * Matrix.toTransformString + [ method ] + ** + * Return transform string that represents given matrix + = (string) transform string + \*/ + matrixproto.toTransformString = function (shorter) { + var s = shorter || this[split](); + if (s.isSimple) { + s.scalex = +s.scalex.toFixed(4); + s.scaley = +s.scaley.toFixed(4); + s.rotate = +s.rotate.toFixed(4); + return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + + (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + + (s.rotate ? "r" + [s.rotate, 0, 0] : E); + } else { + return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; + } + }; + })(Matrix.prototype); + + var preventDefault = function () { + this.returnValue = false; + }, + preventTouch = function () { + return this.originalEvent.preventDefault(); + }, + stopPropagation = function () { + this.cancelBubble = true; + }, + stopTouch = function () { + return this.originalEvent.stopPropagation(); + }, + getEventPosition = function (e) { + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; + + return { + x: e.clientX + scrollX, + y: e.clientY + scrollY + }; + }, + addEvent = (function () { + if (g.doc.addEventListener) { + return function (obj, type, fn, element) { + var f = function (e) { + var pos = getEventPosition(e); + return fn.call(element, e, pos.x, pos.y); + }; + obj.addEventListener(type, f, false); + + if (supportsTouch && touchMap[type]) { + var _f = function (e) { + var pos = getEventPosition(e), + olde = e; + + for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { + if (e.targetTouches[i].target == obj) { + e = e.targetTouches[i]; + e.originalEvent = olde; + e.preventDefault = preventTouch; + e.stopPropagation = stopTouch; + break; + } + } + + return fn.call(element, e, pos.x, pos.y); + }; + obj.addEventListener(touchMap[type], _f, false); + } + + return function () { + obj.removeEventListener(type, f, false); + + if (supportsTouch && touchMap[type]) + obj.removeEventListener(touchMap[type], _f, false); + + return true; + }; + }; + } else if (g.doc.attachEvent) { + return function (obj, type, fn, element) { + var f = function (e) { + e = e || g.win.event; + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + x = e.clientX + scrollX, + y = e.clientY + scrollY; + e.preventDefault = e.preventDefault || preventDefault; + e.stopPropagation = e.stopPropagation || stopPropagation; + return fn.call(element, e, x, y); + }; + obj.attachEvent("on" + type, f); + var detacher = function () { + obj.detachEvent("on" + type, f); + return true; + }; + return detacher; + }; + } + })(), + drag = [], + dragMove = function (e) { + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + dragi, + j = drag.length; + while (j--) { + dragi = drag[j]; + if (supportsTouch && e.touches) { + var i = e.touches.length, + touch; + while (i--) { + touch = e.touches[i]; + if (touch.identifier == dragi.el._drag.id) { + x = touch.clientX; + y = touch.clientY; + (e.originalEvent ? e.originalEvent : e).preventDefault(); + break; + } + } + } else { + e.preventDefault(); + } + var node = dragi.el.node, + o, + next = node.nextSibling, + parent = node.parentNode, + display = node.style.display; + g.win.opera && parent.removeChild(node); + node.style.display = "none"; + o = dragi.el.paper.getElementByPoint(x, y); + node.style.display = display; + g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); + o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o); + x += scrollX; + y += scrollY; + eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); + } + }, + dragUp = function (e) { + R.unmousemove(dragMove).unmouseup(dragUp); + var i = drag.length, + dragi; + while (i--) { + dragi = drag[i]; + dragi.el._drag = {}; + eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); + } + drag = []; + }, + /*\ + * Raphael.el + [ property (object) ] + ** + * You can add your own method to elements. This is usefull when you want to hack default functionality or + * want to wrap some common transformation or attributes in one method. In difference to canvas methods, + * you can redefine element method at any time. Expending element methods wouldn’t affect set. + > Usage + | Raphael.el.red = function () { + | this.attr({fill: "#f00"}); + | }; + | // then use it + | paper.circle(100, 100, 20).red(); + \*/ + elproto = R.el = {}; + /*\ + * Element.click + [ method ] + ** + * Adds event handler for click for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unclick + [ method ] + ** + * Removes event handler for click for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.dblclick + [ method ] + ** + * Adds event handler for double click for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.undblclick + [ method ] + ** + * Removes event handler for double click for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mousedown + [ method ] + ** + * Adds event handler for mousedown for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmousedown + [ method ] + ** + * Removes event handler for mousedown for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mousemove + [ method ] + ** + * Adds event handler for mousemove for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmousemove + [ method ] + ** + * Removes event handler for mousemove for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseout + [ method ] + ** + * Adds event handler for mouseout for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseout + [ method ] + ** + * Removes event handler for mouseout for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseover + [ method ] + ** + * Adds event handler for mouseover for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseover + [ method ] + ** + * Removes event handler for mouseover for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.mouseup + [ method ] + ** + * Adds event handler for mouseup for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.unmouseup + [ method ] + ** + * Removes event handler for mouseup for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchstart + [ method ] + ** + * Adds event handler for touchstart for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchstart + [ method ] + ** + * Removes event handler for touchstart for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchmove + [ method ] + ** + * Adds event handler for touchmove for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchmove + [ method ] + ** + * Removes event handler for touchmove for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchend + [ method ] + ** + * Adds event handler for touchend for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchend + [ method ] + ** + * Removes event handler for touchend for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + + /*\ + * Element.touchcancel + [ method ] + ** + * Adds event handler for touchcancel for the element. + > Parameters + - handler (function) handler for the event + = (object) @Element + \*/ + /*\ + * Element.untouchcancel + [ method ] + ** + * Removes event handler for touchcancel for the element. + > Parameters + - handler (function) #optional handler for the event + = (object) @Element + \*/ + for (var i = events.length; i--;) { + (function (eventName) { + R[eventName] = elproto[eventName] = function (fn, scope) { + if (R.is(fn, "function")) { + this.events = this.events || []; + this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); + } + return this; + }; + R["un" + eventName] = elproto["un" + eventName] = function (fn) { + var events = this.events || [], + l = events.length; + while (l--){ + if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) { + events[l].unbind(); + events.splice(l, 1); + !events.length && delete this.events; + } + } + return this; + }; + })(events[i]); + } + + /*\ + * Element.data + [ method ] + ** + * Adds or retrieves given value asociated with given key. + ** + * See also @Element.removeData + > Parameters + - key (string) key to store data + - value (any) #optional value to store + = (object) @Element + * or, if value is not specified: + = (any) value + * or, if key and value are not specified: + = (object) Key/value pairs for all the data associated with the element. + > Usage + | for (var i = 0, i < 5, i++) { + | paper.circle(10 + 15 * i, 10, 10) + | .attr({fill: "#000"}) + | .data("i", i) + | .click(function () { + | alert(this.data("i")); + | }); + | } + \*/ + elproto.data = function (key, value) { + var data = eldata[this.id] = eldata[this.id] || {}; + if (arguments.length == 0) { + return data; + } + if (arguments.length == 1) { + if (R.is(key, "object")) { + for (var i in key) if (key[has](i)) { + this.data(i, key[i]); + } + return this; + } + eve("raphael.data.get." + this.id, this, data[key], key); + return data[key]; + } + data[key] = value; + eve("raphael.data.set." + this.id, this, value, key); + return this; + }; + + elproto.datum = function(){ + return arguments.length == 0 ? this._bindData : ((this._bindData = arguments[0]), this); + }; + + /*\ + * Element.removeData + [ method ] + ** + * Removes value associated with an element by given key. + * If key is not provided, removes all the data of the element. + > Parameters + - key (string) #optional key + = (object) @Element + \*/ + elproto.removeData = function (key) { + if (key == null) { + eldata[this.id] = {}; + } else { + eldata[this.id] && delete eldata[this.id][key]; + } + return this; + }; + /*\ + * Element.getData + [ method ] + ** + * Retrieves the element data + = (object) data + \*/ + elproto.getData = function () { + return clone(eldata[this.id] || {}); + }; + /*\ + * Element.hover + [ method ] + ** + * Adds event handlers for hover for the element. + > Parameters + - f_in (function) handler for hover in + - f_out (function) handler for hover out + - icontext (object) #optional context for hover in handler + - ocontext (object) #optional context for hover out handler + = (object) @Element + \*/ + elproto.hover = function (f_in, f_out, scope_in, scope_out) { + return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); + }; + /*\ + * Element.unhover + [ method ] + ** + * Removes event handlers for hover for the element. + > Parameters + - f_in (function) handler for hover in + - f_out (function) handler for hover out + = (object) @Element + \*/ + elproto.unhover = function (f_in, f_out) { + return this.unmouseover(f_in).unmouseout(f_out); + }; + var draggable = []; + /*\ + * Element.drag + [ method ] + ** + * Adds event handlers for drag of the element. + > Parameters + - onmove (function) handler for moving + - onstart (function) handler for drag start + - onend (function) handler for drag end + - mcontext (object) #optional context for moving handler + - scontext (object) #optional context for drag start handler + - econtext (object) #optional context for drag end handler + * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start, + * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element + * `drag.over.<id>` will be fired as well. + * + * Start event and start handler will be called in specified context or in context of the element with following parameters: + o x (number) x position of the mouse + o y (number) y position of the mouse + o event (object) DOM event object + * Move event and move handler will be called in specified context or in context of the element with following parameters: + o dx (number) shift by x from the start point + o dy (number) shift by y from the start point + o x (number) x position of the mouse + o y (number) y position of the mouse + o event (object) DOM event object + * End event and end handler will be called in specified context or in context of the element with following parameters: + o event (object) DOM event object + = (object) @Element + \*/ + elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { + function start(e) { + (e.originalEvent || e).preventDefault(); + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; + this._drag.id = e.identifier; + if (supportsTouch && e.touches) { + var i = e.touches.length, touch; + while (i--) { + touch = e.touches[i]; + this._drag.id = touch.identifier; + if (touch.identifier == this._drag.id) { + x = touch.clientX; + y = touch.clientY; + break; + } + } + } + this._drag.x = x + scrollX; + this._drag.y = y + scrollY; + !drag.length && R.mousemove(dragMove).mouseup(dragUp); + drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); + onstart && eve.on("raphael.drag.start." + this.id, onstart); + onmove && eve.on("raphael.drag.move." + this.id, onmove); + onend && eve.on("raphael.drag.end." + this.id, onend); + eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); + } + this._drag = {}; + draggable.push({el: this, start: start}); + this.mousedown(start); + return this; + }; + /*\ + * Element.onDragOver + [ method ] + ** + * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id). + > Parameters + - f (function) handler for event, first argument would be the element you are dragging over + \*/ + elproto.onDragOver = function (f) { + f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id); + }; + /*\ + * Element.undrag + [ method ] + ** + * Removes all drag event handlers from given element. + \*/ + elproto.undrag = function () { + var i = draggable.length; + while (i--) if (draggable[i].el == this) { + this.unmousedown(draggable[i].start); + draggable.splice(i, 1); + eve.unbind("raphael.drag.*." + this.id); + } + !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); + drag = []; + }; + /*\ + * Paper.circle + [ method ] + ** + * Draws a circle. + ** + > Parameters + ** + - x (number) x coordinate of the centre + - y (number) y coordinate of the centre + - r (number) radius + = (object) Raphaël element object with type “circle” + ** + > Usage + | var c = paper.circle(50, 50, 40); + \*/ + paperproto.circle = function (x, y, r) { + var out = R._engine.circle(this, x || 0, y || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.rect + [ method ] + * + * Draws a rectangle. + ** + > Parameters + ** + - x (number) x coordinate of the top left corner + - y (number) y coordinate of the top left corner + - width (number) width + - height (number) height + - r (number) #optional radius for rounded corners, default is 0 + = (object) Raphaël element object with type “rect” + ** + > Usage + | // regular rectangle + | var c = paper.rect(10, 10, 50, 50); + | // rectangle with rounded corners + | var c = paper.rect(40, 40, 50, 50, 10); + \*/ + paperproto.rect = function (x, y, w, h, r) { + var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.ellipse + [ method ] + ** + * Draws an ellipse. + ** + > Parameters + ** + - x (number) x coordinate of the centre + - y (number) y coordinate of the centre + - rx (number) horizontal radius + - ry (number) vertical radius + = (object) Raphaël element object with type “ellipse” + ** + > Usage + | var c = paper.ellipse(50, 50, 40, 20); + \*/ + paperproto.ellipse = function (x, y, rx, ry) { + var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.path + [ method ] + ** + * Creates a path element by given path data string. + > Parameters + - pathString (string) #optional path string in SVG format. + * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example: + | "M10,20L30,40" + * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative. + * + # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p> + # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody> + # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr> + # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr> + # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr> + # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr> + # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr> + # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr> + # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr> + # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr> + # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr> + # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr> + # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table> + * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier. + * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning. + > Usage + | var c = paper.path("M10 10L90 90"); + | // draw a diagonal line: + | // move to 10,10, line to 90,90 + * For example of path strings, check out these icons: http://raphaeljs.com/icons/ + \*/ + paperproto.path = function (pathString) { + pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); + var out = R._engine.path(R.format[apply](R, arguments), this); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.image + [ method ] + ** + * Embeds an image into the surface. + ** + > Parameters + ** + - src (string) URI of the source image + - x (number) x coordinate position + - y (number) y coordinate position + - width (number) width of the image + - height (number) height of the image + = (object) Raphaël element object with type “image” + ** + > Usage + | var c = paper.image("apple.png", 10, 10, 80, 80); + \*/ + paperproto.image = function (src, x, y, w, h) { + var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.text + [ method ] + ** + * Draws a text string. If you need line breaks, put “\n” in the string. + ** + > Parameters + ** + - x (number) x coordinate position + - y (number) y coordinate position + - text (string) The text string to draw + = (object) Raphaël element object with type “text” + ** + > Usage + | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); + \*/ + paperproto.text = function (x, y, text) { + var out = R._engine.text(this, x || 0, y || 0, Str(text)); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Paper.set + [ method ] + ** + * Creates array-like object to keep and operate several elements at once. + * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements. + * Sets act as pseudo elements — all methods available to an element can be used on a set. + = (object) array-like object that represents set of elements + ** + > Usage + | var st = paper.set(); + | st.push( + | paper.circle(10, 10, 5), + | paper.circle(30, 10, 5) + | ); + | st.attr({fill: "red"}); // changes the fill of both circles + \*/ + paperproto.set = function (itemsArray) { + !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); + var out = new Set(itemsArray); + this.__set__ && this.__set__.push(out); + out["paper"] = this; + out["type"] = "set"; + return out; + }; + /*\ + * Paper.setStart + [ method ] + ** + * Creates @Paper.set. All elements that will be created after calling this method and before calling + * @Paper.setFinish will be added to the set. + ** + > Usage + | paper.setStart(); + | paper.circle(10, 10, 5), + | paper.circle(30, 10, 5) + | var st = paper.setFinish(); + | st.attr({fill: "red"}); // changes the fill of both circles + \*/ + paperproto.setStart = function (set) { + this.__set__ = set || this.set(); + }; + /*\ + * Paper.setFinish + [ method ] + ** + * See @Paper.setStart. This method finishes catching and returns resulting set. + ** + = (object) set + \*/ + paperproto.setFinish = function (set) { + var out = this.__set__; + delete this.__set__; + return out; + }; + /*\ + * Paper.getSize + [ method ] + ** + * Obtains current paper actual size. + ** + = (object) + \*/ + paperproto.getSize = function () { + var container = this.canvas.parentNode; + return { + width: container.offsetWidth, + height: container.offsetHeight + }; + }; + /*\ + * Paper.setSize + [ method ] + ** + * If you need to change dimensions of the canvas call this method + ** + > Parameters + ** + - width (number) new width of the canvas + - height (number) new height of the canvas + \*/ + paperproto.setSize = function (width, height) { + return R._engine.setSize.call(this, width, height); + }; + /*\ + * Paper.setViewBox + [ method ] + ** + * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by + * specifying new boundaries. + ** + > Parameters + ** + - x (number) new x position, default is `0` + - y (number) new y position, default is `0` + - w (number) new width of the canvas + - h (number) new height of the canvas + - fit (boolean) `true` if you want graphics to fit into new boundary box + \*/ + paperproto.setViewBox = function (x, y, w, h, fit) { + return R._engine.setViewBox.call(this, x, y, w, h, fit); + }; + /*\ + * Paper.top + [ property ] + ** + * Points to the topmost element on the paper + \*/ + /*\ + * Paper.bottom + [ property ] + ** + * Points to the bottom element on the paper + \*/ + paperproto.top = paperproto.bottom = null; + /*\ + * Paper.raphael + [ property ] + ** + * Points to the @Raphael object/function + \*/ + paperproto.raphael = R; + var getOffset = function (elem) { + var box = elem.getBoundingClientRect(), + doc = elem.ownerDocument, + body = doc.body, + docElem = doc.documentElement, + clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, + top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, + left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; + return { + y: top, + x: left + }; + }; + /*\ + * Paper.getElementByPoint + [ method ] + ** + * Returns you topmost element under given point. + ** + = (object) Raphaël element object + > Parameters + ** + - x (number) x coordinate from the top left corner of the window + - y (number) y coordinate from the top left corner of the window + > Usage + | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"}); + \*/ + paperproto.getElementByPoint = function (x, y) { + var paper = this, + svg = paper.canvas, + target = g.doc.elementFromPoint(x, y); + if (g.win.opera && target.tagName == "svg") { + var so = getOffset(svg), + sr = svg.createSVGRect(); + sr.x = x - so.x; + sr.y = y - so.y; + sr.width = sr.height = 1; + var hits = svg.getIntersectionList(sr, null); + if (hits.length) { + target = hits[hits.length - 1]; + } + } + if (!target) { + return null; + } + while (target.parentNode && target != svg.parentNode && !target.raphael) { + target = target.parentNode; + } + target == paper.canvas.parentNode && (target = svg); + target = target && target.raphael ? paper.getById(target.raphaelid) : null; + return target; + }; + + /*\ + * Paper.getElementsByBBox + [ method ] + ** + * Returns set of elements that have an intersecting bounding box + ** + > Parameters + ** + - bbox (object) bbox to check with + = (object) @Set + \*/ + paperproto.getElementsByBBox = function (bbox) { + var set = this.set(); + this.forEach(function (el) { + if (R.isBBoxIntersect(el.getBBox(), bbox)) { + set.push(el); + } + }); + return set; + }; + + /*\ + * Paper.getById + [ method ] + ** + * Returns you element by its internal ID. + ** + > Parameters + ** + - id (number) id + = (object) Raphaël element object + \*/ + paperproto.getById = function (id) { + var bot = this.bottom; + while (bot) { + if (bot.id == id) { + return bot; + } + bot = bot.next; + } + return null; + }; + /*\ + * Paper.forEach + [ method ] + ** + * Executes given function for each element on the paper + * + * If callback function returns `false` it will stop loop running. + ** + > Parameters + ** + - callback (function) function to run + - thisArg (object) context object for the callback + = (object) Paper object + > Usage + | paper.forEach(function (el) { + | el.attr({ stroke: "blue" }); + | }); + \*/ + paperproto.forEach = function (callback, thisArg) { + var bot = this.bottom; + while (bot) { + if (callback.call(thisArg, bot) === false) { + return this; + } + bot = bot.next; + } + return this; + }; + /*\ + * Paper.getElementsByPoint + [ method ] + ** + * Returns set of elements that have common point inside + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (object) @Set + \*/ + paperproto.getElementsByPoint = function (x, y) { + var set = this.set(); + this.forEach(function (el) { + if (el.isPointInside(x, y)) { + set.push(el); + } + }); + return set; + }; + function x_y() { + return this.x + S + this.y; + } + function x_y_w_h() { + return this.x + S + this.y + S + this.width + " \xd7 " + this.height; + } + /*\ + * Element.isPointInside + [ method ] + ** + * Determine if given point is inside this element’s shape + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (boolean) `true` if point inside the shape + \*/ + elproto.isPointInside = function (x, y) { + var rp = this.realPath = getPath[this.type](this); + if (this.attr('transform') && this.attr('transform').length) { + rp = R.transformPath(rp, this.attr('transform')); + } + return R.isPointInsidePath(rp, x, y); + }; + /*\ + * Element.getBBox + [ method ] + ** + * Return bounding box for a given element + ** + > Parameters + ** + - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`. + = (object) Bounding box object: + o { + o x: (number) top left corner x + o y: (number) top left corner y + o x2: (number) bottom right corner x + o y2: (number) bottom right corner y + o width: (number) width + o height: (number) height + o } + \*/ + elproto.getBBox = function (isWithoutTransform) { + if (this.removed) { + return {}; + } + var _ = this._; + if (isWithoutTransform) { + if (_.dirty || !_.bboxwt) { + this.realPath = getPath[this.type](this); + _.bboxwt = pathDimensions(this.realPath); + _.bboxwt.toString = x_y_w_h; + _.dirty = 0; + } + return _.bboxwt; + } + if (_.dirty || _.dirtyT || !_.bbox) { + if (_.dirty || !this.realPath) { + _.bboxwt = 0; + this.realPath = getPath[this.type](this); + } + _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); + _.bbox.toString = x_y_w_h; + _.dirty = _.dirtyT = 0; + } + return _.bbox; + }; + /*\ + * Element.clone + [ method ] + ** + = (object) clone of a given element + ** + \*/ + elproto.clone = function () { + if (this.removed) { + return null; + } + var out = this.paper[this.type]().attr(this.attr()); + this.__set__ && this.__set__.push(out); + return out; + }; + /*\ + * Element.glow + [ method ] + ** + * Return set of elements that create glow-like effect around given element. See @Paper.set. + * + * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself. + ** + > Parameters + ** + - glow (object) #optional parameters object with all properties optional: + o { + o width (number) size of the glow, default is `10` + o fill (boolean) will it be filled, default is `false` + o opacity (number) opacity, default is `0.5` + o offsetx (number) horizontal offset, default is `0` + o offsety (number) vertical offset, default is `0` + o color (string) glow colour, default is `black` + o } + = (object) @Paper.set of elements that represents glow + \*/ + elproto.glow = function (glow) { + if (this.type == "text") { + return null; + } + glow = glow || {}; + var s = { + width: (glow.width || 10) + (+this.attr("stroke-width") || 1), + fill: glow.fill || false, + opacity: glow.opacity == null ? .5 : glow.opacity, + offsetx: glow.offsetx || 0, + offsety: glow.offsety || 0, + color: glow.color || "#000" + }, + c = s.width / 2, + r = this.paper, + out = r.set(), + path = this.realPath || getPath[this.type](this); + path = this.matrix ? mapPath(path, this.matrix) : path; + for (var i = 1; i < c + 1; i++) { + out.push(r.path(path).attr({ + stroke: s.color, + fill: s.fill ? s.color : "none", + "stroke-linejoin": "round", + "stroke-linecap": "round", + "stroke-width": +(s.width / c * i).toFixed(3), + opacity: +(s.opacity / c).toFixed(3) + })); + } + return out.insertBefore(this).translate(s.offsetx, s.offsety); + }; + var curveslengths = {}, + getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { + if (length == null) { + return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); + } else { + return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); + } + }, + getLengthFactory = function (istotal, subpath) { + return function (path, length, onlystart) { + path = path2curve(path); + var x, y, p, l, sp = "", subpaths = {}, point, + len = 0; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = +p[1]; + y = +p[2]; + } else { + l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + if (len + l > length) { + if (subpath && !subpaths.start) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; + if (onlystart) {return sp;} + subpaths.start = sp; + sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); + len += l; + x = +p[5]; + y = +p[6]; + continue; + } + if (!istotal && !subpath) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + return {x: point.x, y: point.y, alpha: point.alpha}; + } + } + len += l; + x = +p[5]; + y = +p[6]; + } + sp += p.shift() + p; + } + subpaths.end = sp; + point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); + point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); + return point; + }; + }; + var getTotalLength = getLengthFactory(1), + getPointAtLength = getLengthFactory(), + getSubpathsAtLength = getLengthFactory(0, 1); + /*\ + * Raphael.getTotalLength + [ method ] + ** + * Returns length of the given path in pixels. + ** + > Parameters + ** + - path (string) SVG path string. + ** + = (number) length. + \*/ + R.getTotalLength = getTotalLength; + /*\ + * Raphael.getPointAtLength + [ method ] + ** + * Return coordinates of the point located at the given length on the given path. + ** + > Parameters + ** + - path (string) SVG path string + - length (number) + ** + = (object) representation of the point: + o { + o x: (number) x coordinate + o y: (number) y coordinate + o alpha: (number) angle of derivative + o } + \*/ + R.getPointAtLength = getPointAtLength; + /*\ + * Raphael.getSubpath + [ method ] + ** + * Return subpath of a given path from given length to given length. + ** + > Parameters + ** + - path (string) SVG path string + - from (number) position of the start of the segment + - to (number) position of the end of the segment + ** + = (string) pathstring for the segment + \*/ + R.getSubpath = function (path, from, to) { + if (this.getTotalLength(path) - to < 1e-6) { + return getSubpathsAtLength(path, from).end; + } + var a = getSubpathsAtLength(path, to, 1); + return from ? getSubpathsAtLength(a, from).end : a; + }; + /*\ + * Element.getTotalLength + [ method ] + ** + * Returns length of the path in pixels. Only works for element of “path” type. + = (number) length. + \*/ + elproto.getTotalLength = function () { + var path = this.getPath(); + if (!path) { + return; + } + + if (this.node.getTotalLength) { + return this.node.getTotalLength(); + } + + return getTotalLength(path); + }; + /*\ + * Element.getPointAtLength + [ method ] + ** + * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type. + ** + > Parameters + ** + - length (number) + ** + = (object) representation of the point: + o { + o x: (number) x coordinate + o y: (number) y coordinate + o alpha: (number) angle of derivative + o } + \*/ + elproto.getPointAtLength = function (length) { + var path = this.getPath(); + if (!path) { + return; + } + + return getPointAtLength(path, length); + }; + /*\ + * Element.getPath + [ method ] + ** + * Returns path of the element. Only works for elements of “path” type and simple elements like circle. + = (object) path + ** + \*/ + elproto.getPath = function () { + var path, + getPath = R._getPath[this.type]; + + if (this.type == "text" || this.type == "set") { + return; + } + + if (getPath) { + path = getPath(this); + } + + return path; + }; + /*\ + * Element.getSubpath + [ method ] + ** + * Return subpath of a given element from given length to given length. Only works for element of “path” type. + ** + > Parameters + ** + - from (number) position of the start of the segment + - to (number) position of the end of the segment + ** + = (string) pathstring for the segment + \*/ + elproto.getSubpath = function (from, to) { + var path = this.getPath(); + if (!path) { + return; + } + + return R.getSubpath(path, from, to); + }; + /*\ + * Raphael.easing_formulas + [ property ] + ** + * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing: + # <ul> + # <li>“linear”</li> + # <li>“<” or “easeIn” or “ease-in”</li> + # <li>“>” or “easeOut” or “ease-out”</li> + # <li>“<>” or “easeInOut” or “ease-in-out”</li> + # <li>“backIn” or “back-in”</li> + # <li>“backOut” or “back-out”</li> + # <li>“elastic”</li> + # <li>“bounce”</li> + # </ul> + # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p> + \*/ + var ef = R.easing_formulas = { + linear: function (n) { + return n; + }, + "<": function (n) { + return pow(n, 1.7); + }, + ">": function (n) { + return pow(n, .48); + }, + "<>": function (n) { + var q = .48 - n / 1.04, + Q = math.sqrt(.1734 + q * q), + x = Q - q, + X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), + y = -Q - q, + Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), + t = X + Y + .5; + return (1 - t) * 3 * t * t + t * t * t; + }, + backIn: function (n) { + var s = 1.70158; + return n * n * ((s + 1) * n - s); + }, + backOut: function (n) { + n = n - 1; + var s = 1.70158; + return n * n * ((s + 1) * n + s) + 1; + }, + elastic: function (n) { + if (n == !!n) { + return n; + } + return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; + }, + bounce: function (n) { + var s = 7.5625, + p = 2.75, + l; + if (n < (1 / p)) { + l = s * n * n; + } else { + if (n < (2 / p)) { + n -= (1.5 / p); + l = s * n * n + .75; + } else { + if (n < (2.5 / p)) { + n -= (2.25 / p); + l = s * n * n + .9375; + } else { + n -= (2.625 / p); + l = s * n * n + .984375; + } + } + } + return l; + } + }; + ef.easeIn = ef["ease-in"] = ef["<"]; + ef.easeOut = ef["ease-out"] = ef[">"]; + ef.easeInOut = ef["ease-in-out"] = ef["<>"]; + ef["back-in"] = ef.backIn; + ef["back-out"] = ef.backOut; + + var animationElements = [], + requestAnimFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + setTimeout(callback, 16); + }, + animation = function () { + var Now = +new Date, + l = 0; + for (; l < animationElements.length; l++) { + var e = animationElements[l]; + if (e.el.removed || e.paused) { + continue; + } + var time = Now - e.start, + ms = e.ms, + easing = e.easing, + from = e.from, + diff = e.diff, + to = e.to, + t = e.t, + that = e.el, + set = {}, + now, + init = {}, + key; + if (e.initstatus) { + time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; + e.status = e.initstatus; + delete e.initstatus; + e.stop && animationElements.splice(l--, 1); + } else { + e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; + } + if (time < 0) { + continue; + } + if (time < ms) { + var pos = easing(time / ms); + for (var attr in from) if (from[has](attr)) { + switch (availableAnimAttrs[attr]) { + case nu: + now = +from[attr] + pos * ms * diff[attr]; + break; + case "colour": + now = "rgb(" + [ + upto255(round(from[attr].r + pos * ms * diff[attr].r)), + upto255(round(from[attr].g + pos * ms * diff[attr].g)), + upto255(round(from[attr].b + pos * ms * diff[attr].b)) + ].join(",") + ")"; + break; + case "path": + now = []; + for (var i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + now[i] = now[i].join(S); + } + now = now.join(S); + break; + case "transform": + if (diff[attr].real) { + now = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + } + } else { + var get = function (i) { + return +from[attr][i] + pos * ms * diff[attr][i]; + }; + // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; + now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; + } + break; + case "csv": + if (attr == "clip-rect") { + now = []; + i = 4; + while (i--) { + now[i] = +from[attr][i] + pos * ms * diff[attr][i]; + } + } + break; + default: + var from2 = [][concat](from[attr]); + now = []; + i = that.paper.customAttributes[attr].length; + while (i--) { + now[i] = +from2[i] + pos * ms * diff[attr][i]; + } + break; + } + set[attr] = now; + } + that.attr(set); + (function (id, that, anim) { + setTimeout(function () { + eve("raphael.anim.frame." + id, that, anim); + }); + })(that.id, that, e.anim); + } else { + (function(f, el, a) { + setTimeout(function() { + eve("raphael.anim.frame." + el.id, el, a); + eve("raphael.anim.finish." + el.id, el, a); + R.is(f, "function") && f.call(el); + }); + })(e.callback, that, e.anim); + that.attr(to); + animationElements.splice(l--, 1); + if (e.repeat > 1 && !e.next) { + for (key in to) if (to[has](key)) { + init[key] = e.totalOrigin[key]; + } + e.el.attr(init); + runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); + } + if (e.next && !e.stop) { + runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); + } + } + } + animationElements.length && requestAnimFrame(animation); + }, + upto255 = function (color) { + return color > 255 ? 255 : color < 0 ? 0 : color; + }; + /*\ + * Element.animateWith + [ method ] + ** + * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element. + ** + > Parameters + ** + - el (object) element to sync with + - anim (object) animation to sync with + - params (object) #optional final attributes for the element, see also @Element.attr + - ms (number) #optional number of milliseconds for animation to run + - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + * or + - element (object) element to sync with + - anim (object) animation to sync with + - animation (object) #optional animation object, see @Raphael.animation + ** + = (object) original element + \*/ + elproto.animateWith = function (el, anim, params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback), + x, y; + runAnimation(a, element, a.percents[0], null, element.attr()); + for (var i = 0, ii = animationElements.length; i < ii; i++) { + if (animationElements[i].anim == anim && animationElements[i].el == el) { + animationElements[ii - 1].start = animationElements[i].start; + break; + } + } + return element; + // + // + // var a = params ? R.animation(params, ms, easing, callback) : anim, + // status = element.status(anim); + // return this.animate(a).status(a, status * anim.ms / a.ms); + }; + function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { + var cx = 3 * p1x, + bx = 3 * (p2x - p1x) - cx, + ax = 1 - cx - bx, + cy = 3 * p1y, + by = 3 * (p2y - p1y) - cy, + ay = 1 - cy - by; + function sampleCurveX(t) { + return ((ax * t + bx) * t + cx) * t; + } + function solve(x, epsilon) { + var t = solveCurveX(x, epsilon); + return ((ay * t + by) * t + cy) * t; + } + function solveCurveX(x, epsilon) { + var t0, t1, t2, x2, d2, i; + for(t2 = x, i = 0; i < 8; i++) { + x2 = sampleCurveX(t2) - x; + if (abs(x2) < epsilon) { + return t2; + } + d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; + if (abs(d2) < 1e-6) { + break; + } + t2 = t2 - x2 / d2; + } + t0 = 0; + t1 = 1; + t2 = x; + if (t2 < t0) { + return t0; + } + if (t2 > t1) { + return t1; + } + while (t0 < t1) { + x2 = sampleCurveX(t2); + if (abs(x2 - x) < epsilon) { + return t2; + } + if (x > x2) { + t0 = t2; + } else { + t1 = t2; + } + t2 = (t1 - t0) / 2 + t0; + } + return t2; + } + return solve(t, 1 / (200 * duration)); + } + elproto.onAnimation = function (f) { + f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id); + return this; + }; + function Animation(anim, ms) { + var percents = [], + newAnim = {}; + this.ms = ms; + this.times = 1; + if (anim) { + for (var attr in anim) if (anim[has](attr)) { + newAnim[toFloat(attr)] = anim[attr]; + percents.push(toFloat(attr)); + } + percents.sort(sortByNumber); + } + this.anim = newAnim; + this.top = percents[percents.length - 1]; + this.percents = percents; + } + /*\ + * Animation.delay + [ method ] + ** + * Creates a copy of existing animation object with given delay. + ** + > Parameters + ** + - delay (number) number of ms to pass between animation start and actual animation + ** + = (object) new altered Animation object + | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3); + | circle1.animate(anim); // run the given animation immediately + | circle2.animate(anim.delay(500)); // run the given animation after 500 ms + \*/ + Animation.prototype.delay = function (delay) { + var a = new Animation(this.anim, this.ms); + a.times = this.times; + a.del = +delay || 0; + return a; + }; + /*\ + * Animation.repeat + [ method ] + ** + * Creates a copy of existing animation object with given repetition. + ** + > Parameters + ** + - repeat (number) number iterations of animation. For infinite animation pass `Infinity` + ** + = (object) new altered Animation object + \*/ + Animation.prototype.repeat = function (times) { + var a = new Animation(this.anim, this.ms); + a.del = this.del; + a.times = math.floor(mmax(times, 0)) || 1; + return a; + }; + function runAnimation(anim, element, percent, status, totalOrigin, times) { + percent = toFloat(percent); + var params, + isInAnim, + isInAnimSet, + percents = [], + next, + prev, + timestamp, + ms = anim.ms, + from = {}, + to = {}, + diff = {}; + if (status) { + for (i = 0, ii = animationElements.length; i < ii; i++) { + var e = animationElements[i]; + if (e.el.id == element.id && e.anim == anim) { + if (e.percent != percent) { + animationElements.splice(i, 1); + isInAnimSet = 1; + } else { + isInAnim = e; + } + element.attr(e.totalOrigin); + break; + } + } + } else { + status = +to; // NaN + } + for (var i = 0, ii = anim.percents.length; i < ii; i++) { + if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { + percent = anim.percents[i]; + prev = anim.percents[i - 1] || 0; + ms = ms / anim.top * (percent - prev); + next = anim.percents[i + 1]; + params = anim.anim[percent]; + break; + } else if (status) { + element.attr(anim.anim[anim.percents[i]]); + } + } + if (!params) { + return; + } + if (!isInAnim) { + for (var attr in params) if (params[has](attr)) { + if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { + from[attr] = element.attr(attr); + (from[attr] == null) && (from[attr] = availableAttrs[attr]); + to[attr] = params[attr]; + switch (availableAnimAttrs[attr]) { + case nu: + diff[attr] = (to[attr] - from[attr]) / ms; + break; + case "colour": + from[attr] = R.getRGB(from[attr]); + var toColour = R.getRGB(to[attr]); + diff[attr] = { + r: (toColour.r - from[attr].r) / ms, + g: (toColour.g - from[attr].g) / ms, + b: (toColour.b - from[attr].b) / ms + }; + break; + case "path": + var pathes = path2curve(from[attr], to[attr]), + toPath = pathes[1]; + from[attr] = pathes[0]; + diff[attr] = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [0]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; + } + } + break; + case "transform": + var _ = element._, + eq = equaliseTransform(_[attr], to[attr]); + if (eq) { + from[attr] = eq.from; + to[attr] = eq.to; + diff[attr] = []; + diff[attr].real = true; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; + } + } + } else { + var m = (element.matrix || new Matrix), + to2 = { + _: {transform: _.transform}, + getBBox: function () { + return element.getBBox(1); + } + }; + from[attr] = [ + m.a, + m.b, + m.c, + m.d, + m.e, + m.f + ]; + extractTransform(to2, to[attr]); + to[attr] = to2._.transform; + diff[attr] = [ + (to2.matrix.a - m.a) / ms, + (to2.matrix.b - m.b) / ms, + (to2.matrix.c - m.c) / ms, + (to2.matrix.d - m.d) / ms, + (to2.matrix.e - m.e) / ms, + (to2.matrix.f - m.f) / ms + ]; + // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; + // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; + // extractTransform(to2, to[attr]); + // diff[attr] = [ + // (to2._.sx - _.sx) / ms, + // (to2._.sy - _.sy) / ms, + // (to2._.deg - _.deg) / ms, + // (to2._.dx - _.dx) / ms, + // (to2._.dy - _.dy) / ms + // ]; + } + break; + case "csv": + var values = Str(params[attr])[split](separator), + from2 = Str(from[attr])[split](separator); + if (attr == "clip-rect") { + from[attr] = from2; + diff[attr] = []; + i = from2.length; + while (i--) { + diff[attr][i] = (values[i] - from[attr][i]) / ms; + } + } + to[attr] = values; + break; + default: + values = [][concat](params[attr]); + from2 = [][concat](from[attr]); + diff[attr] = []; + i = element.paper.customAttributes[attr].length; + while (i--) { + diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; + } + break; + } + } + } + var easing = params.easing, + easyeasy = R.easing_formulas[easing]; + if (!easyeasy) { + easyeasy = Str(easing).match(bezierrg); + if (easyeasy && easyeasy.length == 5) { + var curve = easyeasy; + easyeasy = function (t) { + return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); + }; + } else { + easyeasy = pipe; + } + } + timestamp = params.start || anim.start || +new Date; + e = { + anim: anim, + percent: percent, + timestamp: timestamp, + start: timestamp + (anim.del || 0), + status: 0, + initstatus: status || 0, + stop: false, + ms: ms, + easing: easyeasy, + from: from, + diff: diff, + to: to, + el: element, + callback: params.callback, + prev: prev, + next: next, + repeat: times || anim.times, + origin: element.attr(), + totalOrigin: totalOrigin + }; + animationElements.push(e); + if (status && !isInAnim && !isInAnimSet) { + e.stop = true; + e.start = new Date - ms * status; + if (animationElements.length == 1) { + return animation(); + } + } + if (isInAnimSet) { + e.start = new Date - e.ms * status; + } + animationElements.length == 1 && requestAnimFrame(animation); + } else { + isInAnim.initstatus = status; + isInAnim.start = new Date - isInAnim.ms * status; + } + eve("raphael.anim.start." + element.id, element, anim); + } + /*\ + * Raphael.animation + [ method ] + ** + * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods. + * See also @Animation.delay and @Animation.repeat methods. + ** + > Parameters + ** + - params (object) final attributes for the element, see also @Element.attr + - ms (number) number of milliseconds for animation to run + - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + ** + = (object) @Animation + \*/ + R.animation = function (params, ms, easing, callback) { + if (params instanceof Animation) { + return params; + } + if (R.is(easing, "function") || !easing) { + callback = callback || easing || null; + easing = null; + } + params = Object(params); + ms = +ms || 0; + var p = {}, + json, + attr; + for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { + json = true; + p[attr] = params[attr]; + } + if (!json) { + // if percent-like syntax is used and end-of-all animation callback used + if(callback){ + // find the last one + var lastKey = 0; + for(var i in params){ + var percent = toInt(i); + if(params[has](i) && percent > lastKey){ + lastKey = percent; + } + } + lastKey += '%'; + // if already defined callback in the last keyframe, skip + !params[lastKey].callback && (params[lastKey].callback = callback); + } + return new Animation(params, ms); + } else { + easing && (p.easing = easing); + callback && (p.callback = callback); + return new Animation({100: p}, ms); + } + }; + /*\ + * Element.animate + [ method ] + ** + * Creates and starts animation for given element. + ** + > Parameters + ** + - params (object) final attributes for the element, see also @Element.attr + - ms (number) number of milliseconds for animation to run + - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)` + - callback (function) #optional callback function. Will be called at the end of animation. + * or + - animation (object) animation object, see @Raphael.animation + ** + = (object) original element + \*/ + elproto.animate = function (params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); + runAnimation(anim, element, anim.percents[0], null, element.attr()); + return element; + }; + /*\ + * Element.setTime + [ method ] + ** + * Sets the status of animation of the element in milliseconds. Similar to @Element.status method. + ** + > Parameters + ** + - anim (object) animation object + - value (number) number of milliseconds from the beginning of the animation + ** + = (object) original element if `value` is specified + * Note, that during animation following events are triggered: + * + * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`. + \*/ + elproto.setTime = function (anim, value) { + if (anim && value != null) { + this.status(anim, mmin(value, anim.ms) / anim.ms); + } + return this; + }; + /*\ + * Element.status + [ method ] + ** + * Gets or sets the status of animation of the element. + ** + > Parameters + ** + - anim (object) #optional animation object + - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position. + ** + = (number) status + * or + = (array) status if `anim` is not specified. Array of objects in format: + o { + o anim: (object) animation object + o status: (number) status + o } + * or + = (object) original element if `value` is specified + \*/ + elproto.status = function (anim, value) { + var out = [], + i = 0, + len, + e; + if (value != null) { + runAnimation(anim, this, -1, mmin(value, 1)); + return this; + } else { + len = animationElements.length; + for (; i < len; i++) { + e = animationElements[i]; + if (e.el.id == this.id && (!anim || e.anim == anim)) { + if (anim) { + return e.status; + } + out.push({ + anim: e.anim, + status: e.status + }); + } + } + if (anim) { + return 0; + } + return out; + } + }; + /*\ + * Element.pause + [ method ] + ** + * Stops animation of the element with ability to resume it later on. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.pause = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { + animationElements[i].paused = true; + } + } + return this; + }; + /*\ + * Element.resume + [ method ] + ** + * Resumes animation if it was paused with @Element.pause method. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.resume = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + var e = animationElements[i]; + if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { + delete e.paused; + this.status(e.anim, e.status); + } + } + return this; + }; + /*\ + * Element.stop + [ method ] + ** + * Stops animation of the element. + ** + > Parameters + ** + - anim (object) #optional animation object + ** + = (object) original element + \*/ + elproto.stop = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { + animationElements.splice(i--, 1); + } + } + return this; + }; + function stopAnimation(paper) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { + animationElements.splice(i--, 1); + } + } + eve.on("raphael.remove", stopAnimation); + eve.on("raphael.clear", stopAnimation); + elproto.toString = function () { + return "Rapha\xebl\u2019s object"; + }; + + // Set + var Set = function (items) { + this.items = []; + this.length = 0; + this.type = "set"; + if (items) { + for (var i = 0, ii = items.length; i < ii; i++) { + if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { + this[this.items.length] = this.items[this.items.length] = items[i]; + this.length++; + } + } + } + }, + setproto = Set.prototype; + /*\ + * Set.push + [ method ] + ** + * Adds each argument to the current set. + = (object) original element + \*/ + setproto.push = function () { + var item, + len; + for (var i = 0, ii = arguments.length; i < ii; i++) { + item = arguments[i]; + if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { + len = this.items.length; + this[len] = this.items[len] = item; + this.length++; + } + } + return this; + }; + /*\ + * Set.pop + [ method ] + ** + * Removes last element and returns it. + = (object) element + \*/ + setproto.pop = function () { + this.length && delete this[this.length--]; + return this.items.pop(); + }; + /*\ + * Set.forEach + [ method ] + ** + * Executes given function for each element in the set. + * + * If function returns `false` it will stop loop running. + ** + > Parameters + ** + - callback (function) function to run + - thisArg (object) context object for the callback + = (object) Set object + \*/ + setproto.forEach = function (callback, thisArg) { + for (var i = 0, ii = this.items.length; i < ii; i++) { + if (callback.call(thisArg, this.items[i], i) === false) { + return this; + } + } + return this; + }; + for (var method in elproto) if (elproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname][apply](el, arg); + }); + }; + })(method); + } + setproto.attr = function (name, value) { + if (name && R.is(name, array) && R.is(name[0], "object")) { + for (var j = 0, jj = name.length; j < jj; j++) { + this.items[j].attr(name[j]); + } + } else { + for (var i = 0, ii = this.items.length; i < ii; i++) { + this.items[i].attr(name, value); + } + } + return this; + }; + /*\ + * Set.clear + [ method ] + ** + * Removes all elements from the set + \*/ + setproto.clear = function () { + while (this.length) { + this.pop(); + } + }; + /*\ + * Set.splice + [ method ] + ** + * Removes given element from the set + ** + > Parameters + ** + - index (number) position of the deletion + - count (number) number of element to remove + - insertion… (object) #optional elements to insert + = (object) set elements that were deleted + \*/ + setproto.splice = function (index, count, insertion) { + index = index < 0 ? mmax(this.length + index, 0) : index; + count = mmax(0, mmin(this.length - index, count)); + var tail = [], + todel = [], + args = [], + i; + for (i = 2; i < arguments.length; i++) { + args.push(arguments[i]); + } + for (i = 0; i < count; i++) { + todel.push(this[index + i]); + } + for (; i < this.length - index; i++) { + tail.push(this[index + i]); + } + var arglen = args.length; + for (i = 0; i < arglen + tail.length; i++) { + this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; + } + i = this.items.length = this.length -= count - arglen; + while (this[i]) { + delete this[i++]; + } + return new Set(todel); + }; + /*\ + * Set.exclude + [ method ] + ** + * Removes given element from the set + ** + > Parameters + ** + - element (object) element to remove + = (boolean) `true` if object was found & removed from the set + \*/ + setproto.exclude = function (el) { + for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { + this.splice(i, 1); + return true; + } + }; + setproto.animate = function (params, ms, easing, callback) { + (R.is(easing, "function") || !easing) && (callback = easing || null); + var len = this.items.length, + i = len, + item, + set = this, + collector; + if (!len) { + return this; + } + callback && (collector = function () { + !--len && callback.call(set); + }); + easing = R.is(easing, string) ? easing : collector; + var anim = R.animation(params, ms, easing, collector); + item = this.items[--i].animate(anim); + while (i--) { + this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim); + (this.items[i] && !this.items[i].removed) || len--; + } + return this; + }; + setproto.insertAfter = function (el) { + var i = this.items.length; + while (i--) { + this.items[i].insertAfter(el); + } + return this; + }; + setproto.getBBox = function () { + var x = [], + y = [], + x2 = [], + y2 = []; + for (var i = this.items.length; i--;) if (!this.items[i].removed) { + var box = this.items[i].getBBox(); + x.push(box.x); + y.push(box.y); + x2.push(box.x + box.width); + y2.push(box.y + box.height); + } + x = mmin[apply](0, x); + y = mmin[apply](0, y); + x2 = mmax[apply](0, x2); + y2 = mmax[apply](0, y2); + return { + x: x, + y: y, + x2: x2, + y2: y2, + width: x2 - x, + height: y2 - y + }; + }; + setproto.clone = function (s) { + s = this.paper.set(); + for (var i = 0, ii = this.items.length; i < ii; i++) { + s.push(this.items[i].clone()); + } + return s; + }; + setproto.toString = function () { + return "Rapha\xebl\u2018s set"; + }; + + setproto.glow = function(glowConfig) { + var ret = this.paper.set(); + this.forEach(function(shape, index){ + var g = shape.glow(glowConfig); + if(g != null){ + g.forEach(function(shape2, index2){ + ret.push(shape2); + }); + } + }); + return ret; + }; + + + /*\ + * Set.isPointInside + [ method ] + ** + * Determine if given point is inside this set’s elements + ** + > Parameters + ** + - x (number) x coordinate of the point + - y (number) y coordinate of the point + = (boolean) `true` if point is inside any of the set's elements + \*/ + setproto.isPointInside = function (x, y) { + var isPointInside = false; + this.forEach(function (el) { + if (el.isPointInside(x, y)) { + isPointInside = true; + return false; // stop loop + } + }); + return isPointInside; + }; + + /*\ + * Raphael.registerFont + [ method ] + ** + * Adds given font to the registered set of font for Raphaël. Should be used as an internal call from within Cufón’s font file. + * Returns original parameter, so it could be used with chaining. + # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a> + ** + > Parameters + ** + - font (object) the font to register + = (object) the font you passed in + > Usage + | Cufon.registerFont(Raphael.registerFont({…})); + \*/ + R.registerFont = function (font) { + if (!font.face) { + return font; + } + this.fonts = this.fonts || {}; + var fontcopy = { + w: font.w, + face: {}, + glyphs: {} + }, + family = font.face["font-family"]; + for (var prop in font.face) if (font.face[has](prop)) { + fontcopy.face[prop] = font.face[prop]; + } + if (this.fonts[family]) { + this.fonts[family].push(fontcopy); + } else { + this.fonts[family] = [fontcopy]; + } + if (!font.svg) { + fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); + for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { + var path = font.glyphs[glyph]; + fontcopy.glyphs[glyph] = { + w: path.w, + k: {}, + d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { + return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; + }) + "z" + }; + if (path.k) { + for (var k in path.k) if (path[has](k)) { + fontcopy.glyphs[glyph].k[k] = path.k[k]; + } + } + } + } + return font; + }; + /*\ + * Paper.getFont + [ method ] + ** + * Finds font object in the registered font by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”. + ** + > Parameters + ** + - family (string) font family name or any word from it + - weight (string) #optional font weight + - style (string) #optional font style + - stretch (string) #optional font stretch + = (object) the font object + > Usage + | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30); + \*/ + paperproto.getFont = function (family, weight, style, stretch) { + stretch = stretch || "normal"; + style = style || "normal"; + weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; + if (!R.fonts) { + return; + } + var font = R.fonts[family]; + if (!font) { + var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); + for (var fontName in R.fonts) if (R.fonts[has](fontName)) { + if (name.test(fontName)) { + font = R.fonts[fontName]; + break; + } + } + } + var thefont; + if (font) { + for (var i = 0, ii = font.length; i < ii; i++) { + thefont = font[i]; + if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { + break; + } + } + } + return thefont; + }; + /*\ + * Paper.print + [ method ] + ** + * Creates path that represent given text written using given font at given position with given size. + * Result of the method is path element that contains whole text as a separate path. + ** + > Parameters + ** + - x (number) x position of the text + - y (number) y position of the text + - string (string) text to print + - font (object) font object, see @Paper.getFont + - size (number) #optional size of the font, default is `16` + - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"` + - letter_spacing (number) #optional number in range `-1..1`, default is `0` + - line_spacing (number) #optional number in range `1..3`, default is `1` + = (object) resulting path element, which consist of all letters + > Usage + | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"}); + \*/ + paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) { + origin = origin || "middle"; // baseline|middle + letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); + line_spacing = mmax(mmin(line_spacing || 1, 3), 1); + var letters = Str(string)[split](E), + shift = 0, + notfirst = 0, + path = E, + scale; + R.is(font, "string") && (font = this.getFont(font)); + if (font) { + scale = (size || 16) / font.face["units-per-em"]; + var bb = font.face.bbox[split](separator), + top = +bb[0], + lineHeight = bb[3] - bb[1], + shifty = 0, + height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2); + for (var i = 0, ii = letters.length; i < ii; i++) { + if (letters[i] == "\n") { + shift = 0; + curr = 0; + notfirst = 0; + shifty += lineHeight * line_spacing; + } else { + var prev = notfirst && font.glyphs[letters[i - 1]] || {}, + curr = font.glyphs[letters[i]]; + shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; + notfirst = 1; + } + if (curr && curr.d) { + path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); + } + } + } + return this.path(path).attr({ + fill: "#000", + stroke: "none" + }); + }; + + /*\ + * Paper.add + [ method ] + ** + * Imports elements in JSON array in format `{type: type, <attributes>}` + ** + > Parameters + ** + - json (array) + = (object) resulting set of imported elements + > Usage + | paper.add([ + | { + | type: "circle", + | cx: 10, + | cy: 10, + | r: 5 + | }, + | { + | type: "rect", + | x: 10, + | y: 10, + | width: 10, + | height: 10, + | fill: "#fc0" + | } + | ]); + \*/ + paperproto.add = function (json) { + if (R.is(json, "array")) { + var res = this.set(), + i = 0, + ii = json.length, + j; + for (; i < ii; i++) { + j = json[i] || {}; + elements[has](j.type) && res.push(this[j.type]().attr(j)); + } + } + return res; + }; + + /*\ + * Raphael.format + [ method ] + ** + * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument. + ** + > Parameters + ** + - token (string) string to format + - … (string) rest of arguments will be treated as parameters for replacement + = (string) formated string + > Usage + | var x = 10, + | y = 20, + | width = 40, + | height = 50; + | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" + | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width)); + \*/ + R.format = function (token, params) { + var args = R.is(params, array) ? [0][concat](params) : arguments; + token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { + return args[++i] == null ? E : args[i]; + })); + return token || E; + }; + /*\ + * Raphael.fullfill + [ method ] + ** + * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument. + ** + > Parameters + ** + - token (string) string to format + - json (object) object which properties will be used as a replacement + = (string) formated string + > Usage + | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" + | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", { + | x: 10, + | y: 20, + | dim: { + | width: 40, + | height: 50, + | "negative width": -40 + | } + | })); + \*/ + R.fullfill = (function () { + var tokenRegex = /\{([^\}]+)\}/g, + objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties + replacer = function (all, key, obj) { + var res = obj; + key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { + name = name || quotedName; + if (res) { + if (name in res) { + res = res[name]; + } + typeof res == "function" && isFunc && (res = res()); + } + }); + res = (res == null || res == obj ? all : res) + ""; + return res; + }; + return function (str, obj) { + return String(str).replace(tokenRegex, function (all, key) { + return replacer(all, key, obj); + }); + }; + })(); + /*\ + * Raphael.ninja + [ method ] + ** + * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method. + * Beware, that in this case plugins could stop working, because they are depending on global variable existence. + ** + = (object) Raphael object + > Usage + | (function (local_raphael) { + | var paper = local_raphael(10, 10, 320, 200); + | … + | })(Raphael.ninja()); + \*/ + R.ninja = function () { + oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; + return R; + }; + /*\ + * Raphael.st + [ property (object) ] + ** + * You can add your own method to elements and sets. It is wise to add a set method for each element method + * you added, so you will be able to call the same method on sets too. + ** + * See also @Raphael.el. + > Usage + | Raphael.el.red = function () { + | this.attr({fill: "#f00"}); + | }; + | Raphael.st.red = function () { + | this.forEach(function (el) { + | el.red(); + | }); + | }; + | // then use it + | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red(); + \*/ + R.st = setproto; + + eve.on("raphael.DOMload", function () { + loaded = true; + }); + + // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html + (function (doc, loaded, f) { + if (doc.readyState == null && doc.addEventListener){ + doc.addEventListener(loaded, f = function () { + doc.removeEventListener(loaded, f, false); + doc.readyState = "complete"; + }, false); + doc.readyState = "loading"; + } + function isLoaded() { + (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload"); + } + isLoaded(); + })(document, "DOMContentLoaded"); + + return R; +})); + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ SVG Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.svg", ["raphael.core"], function(raphael) { + return factory(raphael); + }); + } else if (typeof exports === "object") { + factory(require("raphael.core")); + } else { + factory(glob.Raphael); + } +}(this, function(R) { + if (R && !R.svg) { + return; + } + + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + toInt = parseInt, + math = Math, + mmax = math.max, + abs = math.abs, + pow = math.pow, + separator = /[, ]+/, + eve = R.eve, + E = "", + S = " "; + var xlink = "http://www.w3.org/1999/xlink", + markers = { + block: "M5,0 0,2.5 5,5z", + classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", + diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", + open: "M6,1 1,3.5 6,6", + oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" + }, + markerCounter = {}; + R.toString = function () { + return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; + }; + var $ = function (el, attr) { + if (attr) { + if (typeof el == "string") { + el = $(el); + } + for (var key in attr) if (attr[has](key)) { + if (key.substring(0, 6) == "xlink:") { + el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); + } else { + el.setAttribute(key, Str(attr[key])); + } + } + } else { + el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); + el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); + } + return el; + }, + addGradientFill = function (element, gradient) { + var type = "linear", + id = element.id + gradient, + fx = .5, fy = .5, + o = element.node, + SVG = element.paper, + s = o.style, + el = R._g.doc.getElementById(id); + if (!el) { + gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { + type = "radial"; + if (_fx && _fy) { + fx = toFloat(_fx); + fy = toFloat(_fy); + var dir = ((fy > .5) * 2 - 1); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && + (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && + fy != .5 && + (fy = fy.toFixed(5) - 1e-5 * dir); + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], + max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); + vector[2] *= max; + vector[3] *= max; + if (vector[2] < 0) { + vector[0] = -vector[2]; + vector[2] = 0; + } + if (vector[3] < 0) { + vector[1] = -vector[3]; + vector[3] = 0; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + id = id.replace(/[\(\)\s,\xb0#]/g, "_"); + + if (element.gradient && id != element.gradient.id) { + SVG.defs.removeChild(element.gradient); + delete element.gradient; + } + + if (!element.gradient) { + el = $(type + "Gradient", {id: id}); + element.gradient = el; + $(el, type == "radial" ? { + fx: fx, + fy: fy + } : { + x1: vector[0], + y1: vector[1], + x2: vector[2], + y2: vector[3], + gradientTransform: element.matrix.invert() + }); + SVG.defs.appendChild(el); + for (var i = 0, ii = dots.length; i < ii; i++) { + el.appendChild($("stop", { + offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", + "stop-color": dots[i].color || "#fff", + "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1 + })); + } + } + } + $(o, { + fill: "url('" + document.location.origin + document.location.pathname + "#" + id + "')", + opacity: 1, + "fill-opacity": 1 + }); + s.fill = E; + s.opacity = 1; + s.fillOpacity = 1; + return 1; + }, + updatePosition = function (o) { + var bbox = o.getBBox(1); + $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); + }, + addArrow = function (o, value, isEnd) { + if (o.type == "path") { + var values = Str(value).toLowerCase().split("-"), + p = o.paper, + se = isEnd ? "end" : "start", + node = o.node, + attrs = o.attrs, + stroke = attrs["stroke-width"], + i = values.length, + type = "classic", + from, + to, + dx, + refX, + attr, + w = 3, + h = 3, + t = 5; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": h = 5; break; + case "narrow": h = 2; break; + case "long": w = 5; break; + case "short": w = 2; break; + } + } + if (type == "open") { + w += 2; + h += 2; + t += 2; + dx = 1; + refX = isEnd ? 4 : 1; + attr = { + fill: "none", + stroke: attrs.stroke + }; + } else { + refX = dx = w / 2; + attr = { + fill: attrs.stroke, + stroke: "none" + }; + } + if (o._.arrows) { + if (isEnd) { + o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; + o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; + } else { + o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; + o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; + } + } else { + o._.arrows = {}; + } + if (type != "none") { + var pathId = "raphael-marker-" + type, + markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id; + if (!R._g.doc.getElementById(pathId)) { + p.defs.appendChild($($("path"), { + "stroke-linecap": "round", + d: markers[type], + id: pathId + })); + markerCounter[pathId] = 1; + } else { + markerCounter[pathId]++; + } + var marker = R._g.doc.getElementById(markerId), + use; + if (!marker) { + marker = $($("marker"), { + id: markerId, + markerHeight: h, + markerWidth: w, + orient: "auto", + refX: refX, + refY: h / 2 + }); + use = $($("use"), { + "xlink:href": "#" + pathId, + transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")", + "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4) + }); + marker.appendChild(use); + p.defs.appendChild(marker); + markerCounter[markerId] = 1; + } else { + markerCounter[markerId]++; + use = marker.getElementsByTagName("use")[0]; + } + $(use, attr); + var delta = dx * (type != "diamond" && type != "oval"); + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - delta * stroke; + } else { + from = delta * stroke; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + attr = {}; + attr["marker-" + se] = "url(#" + markerId + ")"; + if (to || from) { + attr.d = R.getSubpath(attrs.path, from, to); + } + $(node, attr); + o._.arrows[se + "Path"] = pathId; + o._.arrows[se + "Marker"] = markerId; + o._.arrows[se + "dx"] = delta; + o._.arrows[se + "Type"] = type; + o._.arrows[se + "String"] = value; + } else { + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - from; + } else { + from = 0; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)}); + delete o._.arrows[se + "Path"]; + delete o._.arrows[se + "Marker"]; + delete o._.arrows[se + "dx"]; + delete o._.arrows[se + "Type"]; + delete o._.arrows[se + "String"]; + } + for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { + var item = R._g.doc.getElementById(attr); + item && item.parentNode.removeChild(item); + } + } + }, + dasharray = { + "-": [3, 1], + ".": [1, 1], + "-.": [3, 1, 1, 1], + "-..": [3, 1, 1, 1, 1, 1], + ". ": [1, 3], + "- ": [4, 3], + "--": [8, 3], + "- .": [4, 3, 1, 3], + "--.": [8, 3, 1, 3], + "--..": [8, 3, 1, 3, 1, 3] + }, + addDashes = function (o, value, params) { + value = dasharray[Str(value).toLowerCase()]; + if (value) { + var width = o.attrs["stroke-width"] || "1", + butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, + dashes = [], + i = value.length; + while (i--) { + dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; + } + $(o.node, {"stroke-dasharray": dashes.join(",")}); + } + else { + $(o.node, {"stroke-dasharray": "none"}); + } + }, + setFillAndStroke = function (o, params) { + var node = o.node, + attrs = o.attrs, + vis = node.style.visibility; + node.style.visibility = "hidden"; + for (var att in params) { + if (params[has](att)) { + if (!R._availableAttrs[has](att)) { + continue; + } + var value = params[att]; + attrs[att] = value; + switch (att) { + case "blur": + o.blur(value); + break; + case "title": + var title = node.getElementsByTagName("title"); + + // Use the existing <title>. + if (title.length && (title = title[0])) { + title.firstChild.nodeValue = value; + } else { + title = $("title"); + var val = R._g.doc.createTextNode(value); + title.appendChild(val); + node.appendChild(title); + } + break; + case "href": + case "target": + var pn = node.parentNode; + if (pn.tagName.toLowerCase() != "a") { + var hl = $("a"); + pn.insertBefore(hl, node); + hl.appendChild(node); + pn = hl; + } + if (att == "target") { + pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value); + } else { + pn.setAttributeNS(xlink, att, value); + } + break; + case "cursor": + node.style.cursor = value; + break; + case "transform": + o.transform(value); + break; + case "arrow-start": + addArrow(o, value); + break; + case "arrow-end": + addArrow(o, value, 1); + break; + case "clip-rect": + var rect = Str(value).split(separator); + if (rect.length == 4) { + o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); + var el = $("clipPath"), + rc = $("rect"); + el.id = R.createUUID(); + $(rc, { + x: rect[0], + y: rect[1], + width: rect[2], + height: rect[3] + }); + el.appendChild(rc); + o.paper.defs.appendChild(el); + $(node, {"clip-path": "url(#" + el.id + ")"}); + o.clip = rc; + } + if (!value) { + var path = node.getAttribute("clip-path"); + if (path) { + var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E)); + clip && clip.parentNode.removeChild(clip); + $(node, {"clip-path": E}); + delete o.clip; + } + } + break; + case "path": + if (o.type == "path") { + $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); + o._.dirty = 1; + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + } + break; + case "width": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fx) { + att = "x"; + value = attrs.x; + } else { + break; + } + case "x": + if (attrs.fx) { + value = -attrs.x - (attrs.width || 0); + } + case "rx": + if (att == "rx" && o.type == "rect") { + break; + } + case "cx": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "height": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fy) { + att = "y"; + value = attrs.y; + } else { + break; + } + case "y": + if (attrs.fy) { + value = -attrs.y - (attrs.height || 0); + } + case "ry": + if (att == "ry" && o.type == "rect") { + break; + } + case "cy": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "r": + if (o.type == "rect") { + $(node, {rx: value, ry: value}); + } else { + node.setAttribute(att, value); + } + o._.dirty = 1; + break; + case "src": + if (o.type == "image") { + node.setAttributeNS(xlink, "href", value); + } + break; + case "stroke-width": + if (o._.sx != 1 || o._.sy != 1) { + value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; + } + node.setAttribute(att, value); + if (attrs["stroke-dasharray"]) { + addDashes(o, attrs["stroke-dasharray"], params); + } + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "stroke-dasharray": + addDashes(o, value, params); + break; + case "fill": + var isURL = Str(value).match(R._ISURL); + if (isURL) { + el = $("pattern"); + var ig = $("image"); + el.id = R.createUUID(); + $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); + $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); + el.appendChild(ig); + + (function (el) { + R._preload(isURL[1], function () { + var w = this.offsetWidth, + h = this.offsetHeight; + $(el, {width: w, height: h}); + $(ig, {width: w, height: h}); + }); + })(el); + o.paper.defs.appendChild(el); + $(node, {fill: "url(#" + el.id + ")"}); + o.pattern = el; + o.pattern && updatePosition(o); + break; + } + var clr = R.getRGB(value); + if (!clr.error) { + delete params.gradient; + delete attrs.gradient; + !R.is(attrs.opacity, "undefined") && + R.is(params.opacity, "undefined") && + $(node, {opacity: attrs.opacity}); + !R.is(attrs["fill-opacity"], "undefined") && + R.is(params["fill-opacity"], "undefined") && + $(node, {"fill-opacity": attrs["fill-opacity"]}); + } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { + if ("opacity" in attrs || "fill-opacity" in attrs) { + var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + var stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); + } + } + attrs.gradient = value; + attrs.fill = "none"; + break; + } + clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + case "stroke": + clr = R.getRGB(value); + node.setAttribute(att, clr.hex); + att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + if (att == "stroke" && o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "gradient": + (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); + break; + case "opacity": + if (attrs.gradient && !attrs[has]("stroke-opacity")) { + $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); + } + // fall + case "fill-opacity": + if (attrs.gradient) { + gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": value}); + } + break; + } + default: + att == "font-size" && (value = toInt(value, 10) + "px"); + var cssrule = att.replace(/(\-.)/g, function (w) { + return w.substring(1).toUpperCase(); + }); + node.style[cssrule] = value; + o._.dirty = 1; + node.setAttribute(att, value); + break; + } + } + } + + tuneText(o, params); + node.style.visibility = vis; + }, + leading = 1.2, + tuneText = function (el, params) { + if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { + return; + } + var a = el.attrs, + node = el.node, + fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; + + if (params[has]("text")) { + a.text = params.text; + while (node.firstChild) { + node.removeChild(node.firstChild); + } + var texts = Str(params.text).split("\n"), + tspans = [], + tspan; + for (var i = 0, ii = texts.length; i < ii; i++) { + tspan = $("tspan"); + i && $(tspan, {dy: fontSize * leading, x: a.x}); + tspan.appendChild(R._g.doc.createTextNode(texts[i])); + node.appendChild(tspan); + tspans[i] = tspan; + } + } else { + tspans = node.getElementsByTagName("tspan"); + for (i = 0, ii = tspans.length; i < ii; i++) if (i) { + $(tspans[i], {dy: fontSize * leading, x: a.x}); + } else { + $(tspans[0], {dy: 0}); + } + } + $(node, {x: a.x, y: a.y}); + el._.dirty = 1; + var bb = el._getBBox(), + dif = a.y - (bb.y + bb.height / 2); + dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); + }, + getRealNode = function (node) { + if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") { + return node.parentNode; + } else { + return node; + } + }, + Element = function (node, svg) { + var X = 0, + Y = 0; + /*\ + * Element.node + [ property (object) ] + ** + * Gives you a reference to the DOM object, so you can assign event handlers or just mess around. + ** + * Note: Don’t mess with it. + > Usage + | // draw a circle at coordinate 10,10 with radius of 10 + | var c = paper.circle(10, 10, 10); + | c.node.onclick = function () { + | c.attr("fill", "red"); + | }; + \*/ + this[0] = this.node = node; + /*\ + * Element.raphael + [ property (object) ] + ** + * Internal reference to @Raphael object. In case it is not available. + > Usage + | Raphael.el.red = function () { + | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill")); + | hsb.h = 1; + | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex}); + | } + \*/ + node.raphael = true; + /*\ + * Element.id + [ property (number) ] + ** + * Unique id of the element. Especially useful when you want to listen to events of the element, + * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method. + \*/ + this.id = R._oid++; + node.raphaelid = this.id; + this.matrix = R.matrix(); + this.realPath = null; + /*\ + * Element.paper + [ property (object) ] + ** + * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions. + > Usage + | Raphael.el.cross = function () { + | this.attr({fill: "red"}); + | this.paper.path("M10,10L50,50M50,10L10,50") + | .attr({stroke: "red"}); + | } + \*/ + this.paper = svg; + this.attrs = this.attrs || {}; + this._ = { + transform: [], + sx: 1, + sy: 1, + deg: 0, + dx: 0, + dy: 0, + dirty: 1 + }; + !svg.bottom && (svg.bottom = this); + /*\ + * Element.prev + [ property (object) ] + ** + * Reference to the previous element in the hierarchy. + \*/ + this.prev = svg.top; + svg.top && (svg.top.next = this); + svg.top = this; + /*\ + * Element.next + [ property (object) ] + ** + * Reference to the next element in the hierarchy. + \*/ + this.next = null; + }, + elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + + R._engine.path = function (pathString, SVG) { + var el = $("path"); + SVG.canvas && SVG.canvas.appendChild(el); + var p = new Element(el, SVG); + p.type = "path"; + setFillAndStroke(p, { + fill: "none", + stroke: "#000", + path: pathString + }); + return p; + }; + /*\ + * Element.rotate + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds rotation by given angle around given point to the list of + * transformations of the element. + > Parameters + - deg (number) angle in degrees + - cx (number) #optional x coordinate of the centre of rotation + - cy (number) #optional y coordinate of the centre of rotation + * If cx & cy aren’t specified centre of the shape is used as a point of rotation. + = (object) @Element + \*/ + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + /*\ + * Element.scale + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds scale by given amount relative to given point to the list of + * transformations of the element. + > Parameters + - sx (number) horisontal scale amount + - sy (number) vertical scale amount + - cx (number) #optional x coordinate of the centre of scale + - cy (number) #optional y coordinate of the centre of scale + * If cx & cy aren’t specified centre of the shape is used instead. + = (object) @Element + \*/ + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + return this; + }; + /*\ + * Element.translate + [ method ] + ** + * Deprecated! Use @Element.transform instead. + * Adds translation by given amount to the list of transformations of the element. + > Parameters + - dx (number) horisontal shift + - dy (number) vertical shift + = (object) @Element + \*/ + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + /*\ + * Element.transform + [ method ] + ** + * Adds transformation to the element which is separate to other attributes, + * i.e. translation doesn’t change `x` or `y` of the rectange. The format + * of transformation string is similar to the path string syntax: + | "t100,100r30,100,100s2,2,100,100r45s1.5" + * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for + * scale and `m` is for matrix. + * + * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`. + * + * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100; + * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin + * coordinates as optional parameters, the default is the centre point of the element. + * Matrix accepts six parameters. + > Usage + | var el = paper.rect(10, 20, 300, 200); + | // translate 100, 100, rotate 45°, translate -100, 0 + | el.transform("t100,100r45t-100,0"); + | // if you want you can append or prepend transformations + | el.transform("...t50,50"); + | el.transform("s2..."); + | // or even wrap + | el.transform("t50,50...t-50-50"); + | // to reset transformation call method with empty string + | el.transform(""); + | // to get current value call it without parameters + | console.log(el.transform()); + > Parameters + - tstr (string) #optional transformation string + * If tstr isn’t specified + = (string) current transformation string + * else + = (object) @Element + \*/ + elproto.transform = function (tstr) { + var _ = this._; + if (tstr == null) { + return _.transform; + } + R._extractTransform(this, tstr); + + this.clip && $(this.clip, {transform: this.matrix.invert()}); + this.pattern && updatePosition(this); + this.node && $(this.node, {transform: this.matrix}); + + if (_.sx != 1 || _.sy != 1) { + var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; + this.attr({"stroke-width": sw}); + } + + return this; + }; + /*\ + * Element.hide + [ method ] + ** + * Makes element invisible. See @Element.show. + = (object) @Element + \*/ + elproto.hide = function () { + if(!this.removed) this.node.style.display = "none"; + return this; + }; + /*\ + * Element.show + [ method ] + ** + * Makes element visible. See @Element.hide. + = (object) @Element + \*/ + elproto.show = function () { + if(!this.removed) this.node.style.display = ""; + return this; + }; + /*\ + * Element.remove + [ method ] + ** + * Removes element from the paper. + \*/ + elproto.remove = function () { + var node = getRealNode(this.node); + if (this.removed || !node.parentNode) { + return; + } + var paper = this.paper; + paper.__set__ && paper.__set__.exclude(this); + eve.unbind("raphael.*.*." + this.id); + if (this.gradient) { + paper.defs.removeChild(this.gradient); + } + R._tear(this, paper); + + node.parentNode.removeChild(node); + + // Remove custom data for element + this.removeData(); + + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto._getBBox = function () { + if (this.node.style.display == "none") { + this.show(); + var hide = true; + } + var canvasHidden = false, + containerStyle; + if (this.paper.canvas.parentElement) { + containerStyle = this.paper.canvas.parentElement.style; + } //IE10+ can't find parentElement + else if (this.paper.canvas.parentNode) { + containerStyle = this.paper.canvas.parentNode.style; + } + + if(containerStyle && containerStyle.display == "none") { + canvasHidden = true; + containerStyle.display = ""; + } + var bbox = {}; + try { + bbox = this.node.getBBox(); + } catch(e) { + // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix + bbox = { + x: this.node.clientLeft, + y: this.node.clientTop, + width: this.node.clientWidth, + height: this.node.clientHeight + } + } finally { + bbox = bbox || {}; + if(canvasHidden){ + containerStyle.display = "none"; + } + } + hide && this.hide(); + return bbox; + }; + /*\ + * Element.attr + [ method ] + ** + * Sets the attributes of the element. + > Parameters + - attrName (string) attribute’s name + - value (string) value + * or + - params (object) object of name/value pairs + * or + - attrName (string) attribute’s name + * or + - attrNames (array) in this case method returns array of current values for given attribute names + = (object) @Element if attrsName & value or params are passed in. + = (...) value of the attribute if only attrsName is passed in. + = (array) array of values of the attribute if attrsNames is passed in. + = (object) object of attributes if nothing is passed in. + > Possible parameters + # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p> + o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`. + o clip-rect (string) comma or space separated values: x, y, width and height + o cursor (string) CSS type of the cursor + o cx (number) the x-axis coordinate of the center of the circle, or ellipse + o cy (number) the y-axis coordinate of the center of the circle, or ellipse + o fill (string) colour, gradient or image + o fill-opacity (number) + o font (string) + o font-family (string) + o font-size (number) font size in pixels + o font-weight (string) + o height (number) + o href (string) URL, if specified element behaves as hyperlink + o opacity (number) + o path (string) SVG path string format + o r (number) radius of the circle, ellipse or rounded corner on the rect + o rx (number) horisontal radius of the ellipse + o ry (number) vertical radius of the ellipse + o src (string) image URL, only works for @Element.image element + o stroke (string) stroke colour + o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”] + o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”] + o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”] + o stroke-miterlimit (number) + o stroke-opacity (number) + o stroke-width (number) stroke width in pixels, default is '1' + o target (string) used with href + o text (string) contents of the text element. Use `\n` for multiline text + o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`” + o title (string) will create tooltip with a given text + o transform (string) see @Element.transform + o width (number) + o x (number) + o y (number) + > Gradients + * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90° + * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black. + * + * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” – + * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point + * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses. + > Path String + # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p> + > Colour Parsing + # <ul> + # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li> + # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li> + # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li> + # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li> + # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li> + # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li> + # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li> + # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li> + # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li> + # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li> + # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li> + # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li> + # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li> + # </ul> + \*/ + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + if (name == "transform") { + return this._.transform; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + if (value != null) { + var params = {}; + params[name] = value; + } else if (name != null && R.is(name, "object")) { + params = name; + } + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + setFillAndStroke(this, params); + return this; + }; + /*\ + * Element.toFront + [ method ] + ** + * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. + = (object) @Element + \*/ + elproto.toFront = function () { + if (this.removed) { + return this; + } + var node = getRealNode(this.node); + node.parentNode.appendChild(node); + var svg = this.paper; + svg.top != this && R._tofront(this, svg); + return this; + }; + /*\ + * Element.toBack + [ method ] + ** + * Moves the element so it is the furthest from the viewer’s eyes, behind other elements. + = (object) @Element + \*/ + elproto.toBack = function () { + if (this.removed) { + return this; + } + var node = getRealNode(this.node); + var parentNode = node.parentNode; + parentNode.insertBefore(node, parentNode.firstChild); + R._toback(this, this.paper); + var svg = this.paper; + return this; + }; + /*\ + * Element.insertAfter + [ method ] + ** + * Inserts current object after the given one. + = (object) @Element + \*/ + elproto.insertAfter = function (element) { + if (this.removed || !element) { + return this; + } + + var node = getRealNode(this.node); + var afterNode = getRealNode(element.node || element[element.length - 1].node); + if (afterNode.nextSibling) { + afterNode.parentNode.insertBefore(node, afterNode.nextSibling); + } else { + afterNode.parentNode.appendChild(node); + } + R._insertafter(this, element, this.paper); + return this; + }; + /*\ + * Element.insertBefore + [ method ] + ** + * Inserts current object before the given one. + = (object) @Element + \*/ + elproto.insertBefore = function (element) { + if (this.removed || !element) { + return this; + } + + var node = getRealNode(this.node); + var beforeNode = getRealNode(element.node || element[0].node); + beforeNode.parentNode.insertBefore(node, beforeNode); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + // Experimental. No Safari support. Use it on your own risk. + var t = this; + if (+size !== 0) { + var fltr = $("filter"), + blur = $("feGaussianBlur"); + t.attrs.blur = size; + fltr.id = R.createUUID(); + $(blur, {stdDeviation: +size || 1.5}); + fltr.appendChild(blur); + t.paper.defs.appendChild(fltr); + t._blur = fltr; + $(t.node, {filter: "url(#" + fltr.id + ")"}); + } else { + if (t._blur) { + t._blur.parentNode.removeChild(t._blur); + delete t._blur; + delete t.attrs.blur; + } + t.node.removeAttribute("filter"); + } + return t; + }; + R._engine.circle = function (svg, x, y, r) { + var el = $("circle"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; + res.type = "circle"; + $(el, res.attrs); + return res; + }; + R._engine.rect = function (svg, x, y, w, h, r) { + var el = $("rect"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; + res.type = "rect"; + $(el, res.attrs); + return res; + }; + R._engine.ellipse = function (svg, x, y, rx, ry) { + var el = $("ellipse"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; + res.type = "ellipse"; + $(el, res.attrs); + return res; + }; + R._engine.image = function (svg, src, x, y, w, h) { + var el = $("image"); + $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); + el.setAttributeNS(xlink, "href", src); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, src: src}; + res.type = "image"; + return res; + }; + R._engine.text = function (svg, x, y, text) { + var el = $("text"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = { + x: x, + y: y, + "text-anchor": "middle", + text: text, + "font-family": R._availableAttrs["font-family"], + "font-size": R._availableAttrs["font-size"], + stroke: "none", + fill: "#000" + }; + res.type = "text"; + setFillAndStroke(res, res.attrs); + return res; + }; + R._engine.setSize = function (width, height) { + this.width = width || this.width; + this.height = height || this.height; + this.canvas.setAttribute("width", this.width); + this.canvas.setAttribute("height", this.height); + if (this._viewBox) { + this.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con && con.container, + x = con.x, + y = con.y, + width = con.width, + height = con.height; + if (!container) { + throw new Error("SVG container not found."); + } + var cnvs = $("svg"), + css = "overflow:hidden;", + isFloating; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + $(cnvs, { + height: height, + version: 1.1, + width: width, + xmlns: "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" + }); + if (container == 1) { + cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; + R._g.doc.body.appendChild(cnvs); + isFloating = 1; + } else { + cnvs.style.cssText = css + "position:relative"; + if (container.firstChild) { + container.insertBefore(cnvs, container.firstChild); + } else { + container.appendChild(cnvs); + } + } + container = new R._Paper; + container.width = width; + container.height = height; + container.canvas = cnvs; + container.clear(); + container._left = container._top = 0; + isFloating && (container.renderfix = function () {}); + container.renderfix(); + return container; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var paperSize = this.getSize(), + size = mmax(w / paperSize.width, h / paperSize.height), + top = this.top, + aspectRatio = fit ? "xMidYMid meet" : "xMinYMin", + vb, + sw; + if (x == null) { + if (this._vbSize) { + size = 1; + } + delete this._vbSize; + vb = "0 0 " + this.width + S + this.height; + } else { + this._vbSize = size; + vb = x + S + y + S + w + S + h; + } + $(this.canvas, { + viewBox: vb, + preserveAspectRatio: aspectRatio + }); + while (size && top) { + sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; + top.attr({"stroke-width": sw}); + top._.dirty = 1; + top._.dirtyT = 1; + top = top.prev; + } + this._viewBox = [x, y, w, h, !!fit]; + return this; + }; + /*\ + * Paper.renderfix + [ method ] + ** + * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant + * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness. + * This method fixes the issue. + ** + Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method. + \*/ + R.prototype.renderfix = function () { + var cnvs = this.canvas, + s = cnvs.style, + pos; + try { + pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(); + } catch (e) { + pos = cnvs.createSVGMatrix(); + } + var left = -pos.e % 1, + top = -pos.f % 1; + if (left || top) { + if (left) { + this._left = (this._left + left) % 1; + s.left = this._left + "px"; + } + if (top) { + this._top = (this._top + top) % 1; + s.top = this._top + "px"; + } + } + }; + /*\ + * Paper.clear + [ method ] + ** + * Clears the paper, i.e. removes all the elements. + \*/ + R.prototype.clear = function () { + R.eve("raphael.clear", this); + var c = this.canvas; + while (c.firstChild) { + c.removeChild(c.firstChild); + } + this.bottom = this.top = null; + (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); + c.appendChild(this.desc); + c.appendChild(this.defs = $("defs")); + }; + /*\ + * Paper.remove + [ method ] + ** + * Removes the paper from the DOM. + \*/ + R.prototype.remove = function () { + eve("raphael.remove", this); + this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + }; + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +})); + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ VML Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael.vml", ["raphael.core"], function(raphael) { + return factory(raphael); + }); + } else if (typeof exports === "object") { + factory(require("raphael")); + } else { + factory(glob.Raphael); + } +}(this, function(R) { + if (R && !R.vml) { + return; + } + + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + math = Math, + round = math.round, + mmax = math.max, + mmin = math.min, + abs = math.abs, + fillString = "fill", + separator = /[, ]+/, + eve = R.eve, + ms = " progid:DXImageTransform.Microsoft", + S = " ", + E = "", + map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, + bites = /([clmz]),?([^clmz]*)/gi, + blurregexp = / progid:\S+Blur\([^\)]+\)/g, + val = /-?[^,\s-]+/g, + cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)", + zoom = 21600, + pathTypes = {path: 1, rect: 1, image: 1}, + ovalTypes = {circle: 1, ellipse: 1}, + path2vml = function (path) { + var total = /[ahqstv]/ig, + command = R._pathToAbsolute; + Str(path).match(total) && (command = R._path2curve); + total = /[clmz]/g; + if (command == R._pathToAbsolute && !Str(path).match(total)) { + var res = Str(path).replace(bites, function (all, command, args) { + var vals = [], + isMove = command.toLowerCase() == "m", + res = map[command]; + args.replace(val, function (value) { + if (isMove && vals.length == 2) { + res += vals + map[command == "m" ? "l" : "L"]; + vals = []; + } + vals.push(round(value * zoom)); + }); + return res + vals; + }); + return res; + } + var pa = command(path), p, r; + res = []; + for (var i = 0, ii = pa.length; i < ii; i++) { + p = pa[i]; + r = pa[i][0].toLowerCase(); + r == "z" && (r = "x"); + for (var j = 1, jj = p.length; j < jj; j++) { + r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); + } + res.push(r); + } + return res.join(S); + }, + compensation = function (deg, dx, dy) { + var m = R.matrix(); + m.rotate(-deg, .5, .5); + return { + dx: m.x(dx, dy), + dy: m.y(dx, dy) + }; + }, + setCoords = function (p, sx, sy, dx, dy, deg) { + var _ = p._, + m = p.matrix, + fillpos = _.fillpos, + o = p.node, + s = o.style, + y = 1, + flip = "", + dxdy, + kx = zoom / sx, + ky = zoom / sy; + s.visibility = "hidden"; + if (!sx || !sy) { + return; + } + o.coordsize = abs(kx) + S + abs(ky); + s.rotation = deg * (sx * sy < 0 ? -1 : 1); + if (deg) { + var c = compensation(deg, dx, dy); + dx = c.dx; + dy = c.dy; + } + sx < 0 && (flip += "x"); + sy < 0 && (flip += " y") && (y = -1); + s.flip = flip; + o.coordorigin = (dx * -kx) + S + (dy * -ky); + if (fillpos || _.fillsize) { + var fill = o.getElementsByTagName(fillString); + fill = fill && fill[0]; + o.removeChild(fill); + if (fillpos) { + c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); + fill.position = c.dx * y + S + c.dy * y; + } + if (_.fillsize) { + fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); + } + o.appendChild(fill); + } + s.visibility = "visible"; + }; + R.toString = function () { + return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; + }; + var addArrow = function (o, value, isEnd) { + var values = Str(value).toLowerCase().split("-"), + se = isEnd ? "end" : "start", + i = values.length, + type = "classic", + w = "medium", + h = "medium"; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": + case "narrow": h = values[i]; break; + case "long": + case "short": w = values[i]; break; + } + } + var stroke = o.node.getElementsByTagName("stroke")[0]; + stroke[se + "arrow"] = type; + stroke[se + "arrowlength"] = w; + stroke[se + "arrowwidth"] = h; + }, + setFillAndStroke = function (o, params) { + // o.paper.canvas.style.display = "none"; + o.attrs = o.attrs || {}; + var node = o.node, + a = o.attrs, + s = node.style, + xy, + newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), + isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), + res = o; + + + for (var par in params) if (params[has](par)) { + a[par] = params[par]; + } + if (newpath) { + a.path = R._getPath[o.type](o); + o._.dirty = 1; + } + params.href && (node.href = params.href); + params.title && (node.title = params.title); + params.target && (node.target = params.target); + params.cursor && (s.cursor = params.cursor); + "blur" in params && o.blur(params.blur); + if (params.path && o.type == "path" || newpath) { + node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); + o._.dirty = 1; + if (o.type == "image") { + o._.fillpos = [a.x, a.y]; + o._.fillsize = [a.width, a.height]; + setCoords(o, 1, 1, 0, 0, 0); + } + } + "transform" in params && o.transform(params.transform); + if (isOval) { + var cx = +a.cx, + cy = +a.cy, + rx = +a.rx || +a.r || 0, + ry = +a.ry || +a.r || 0; + node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); + o._.dirty = 1; + } + if ("clip-rect" in params) { + var rect = Str(params["clip-rect"]).split(separator); + if (rect.length == 4) { + rect[2] = +rect[2] + (+rect[0]); + rect[3] = +rect[3] + (+rect[1]); + var div = node.clipRect || R._g.doc.createElement("div"), + dstyle = div.style; + dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); + if (!node.clipRect) { + dstyle.position = "absolute"; + dstyle.top = 0; + dstyle.left = 0; + dstyle.width = o.paper.width + "px"; + dstyle.height = o.paper.height + "px"; + node.parentNode.insertBefore(div, node); + div.appendChild(node); + node.clipRect = div; + } + } + if (!params["clip-rect"]) { + node.clipRect && (node.clipRect.style.clip = "auto"); + } + } + if (o.textpath) { + var textpathStyle = o.textpath.style; + params.font && (textpathStyle.font = params.font); + params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); + params["font-size"] && (textpathStyle.fontSize = params["font-size"]); + params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); + params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); + } + if ("arrow-start" in params) { + addArrow(res, params["arrow-start"]); + } + if ("arrow-end" in params) { + addArrow(res, params["arrow-end"], 1); + } + if (params.opacity != null || + params["stroke-width"] != null || + params.fill != null || + params.src != null || + params.stroke != null || + params["stroke-width"] != null || + params["stroke-opacity"] != null || + params["fill-opacity"] != null || + params["stroke-dasharray"] != null || + params["stroke-miterlimit"] != null || + params["stroke-linejoin"] != null || + params["stroke-linecap"] != null) { + var fill = node.getElementsByTagName(fillString), + newfill = false; + fill = fill && fill[0]; + !fill && (newfill = fill = createNode(fillString)); + if (o.type == "image" && params.src) { + fill.src = params.src; + } + params.fill && (fill.on = true); + if (fill.on == null || params.fill == "none" || params.fill === null) { + fill.on = false; + } + if (fill.on && params.fill) { + var isURL = Str(params.fill).match(R._ISURL); + if (isURL) { + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = isURL[1]; + fill.type = "tile"; + var bbox = o.getBBox(1); + fill.position = bbox.x + S + bbox.y; + o._.fillpos = [bbox.x, bbox.y]; + + R._preload(isURL[1], function () { + o._.fillsize = [this.offsetWidth, this.offsetHeight]; + }); + } else { + fill.color = R.getRGB(params.fill).hex; + fill.src = E; + fill.type = "solid"; + if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { + a.fill = "none"; + a.gradient = params.fill; + fill.rotate = false; + } + } + } + if ("fill-opacity" in params || "opacity" in params) { + var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); + opacity = mmin(mmax(opacity, 0), 1); + fill.opacity = opacity; + if (fill.src) { + fill.color = "none"; + } + } + node.appendChild(fill); + var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), + newstroke = false; + !stroke && (newstroke = stroke = createNode("stroke")); + if ((params.stroke && params.stroke != "none") || + params["stroke-width"] || + params["stroke-opacity"] != null || + params["stroke-dasharray"] || + params["stroke-miterlimit"] || + params["stroke-linejoin"] || + params["stroke-linecap"]) { + stroke.on = true; + } + (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); + var strokeColor = R.getRGB(params.stroke); + stroke.on && params.stroke && (stroke.color = strokeColor.hex); + opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); + var width = (toFloat(params["stroke-width"]) || 1) * .75; + opacity = mmin(mmax(opacity, 0), 1); + params["stroke-width"] == null && (width = a["stroke-width"]); + params["stroke-width"] && (stroke.weight = width); + width && width < 1 && (opacity *= width) && (stroke.weight = 1); + stroke.opacity = opacity; + + params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); + stroke.miterlimit = params["stroke-miterlimit"] || 8; + params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); + if ("stroke-dasharray" in params) { + var dasharray = { + "-": "shortdash", + ".": "shortdot", + "-.": "shortdashdot", + "-..": "shortdashdotdot", + ". ": "dot", + "- ": "dash", + "--": "longdash", + "- .": "dashdot", + "--.": "longdashdot", + "--..": "longdashdotdot" + }; + stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; + } + newstroke && node.appendChild(stroke); + } + if (res.type == "text") { + res.paper.canvas.style.display = E; + var span = res.paper.span, + m = 100, + fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); + s = span.style; + a.font && (s.font = a.font); + a["font-family"] && (s.fontFamily = a["font-family"]); + a["font-weight"] && (s.fontWeight = a["font-weight"]); + a["font-style"] && (s.fontStyle = a["font-style"]); + fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10; + s.fontSize = fontSize * m + "px"; + res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); + var brect = span.getBoundingClientRect(); + res.W = a.w = (brect.right - brect.left) / m; + res.H = a.h = (brect.bottom - brect.top) / m; + // res.paper.canvas.style.display = "none"; + res.X = a.x; + res.Y = a.y + res.H / 2; + + ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); + var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; + for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { + res._.dirty = 1; + break; + } + + // text-anchor emulation + switch (a["text-anchor"]) { + case "start": + res.textpath.style["v-text-align"] = "left"; + res.bbx = res.W / 2; + break; + case "end": + res.textpath.style["v-text-align"] = "right"; + res.bbx = -res.W / 2; + break; + default: + res.textpath.style["v-text-align"] = "center"; + res.bbx = 0; + break; + } + res.textpath.style["v-text-kern"] = true; + } + // res.paper.canvas.style.display = E; + }, + addGradientFill = function (o, gradient, fill) { + o.attrs = o.attrs || {}; + var attrs = o.attrs, + pow = Math.pow, + opacity, + oindex, + type = "linear", + fxfy = ".5 .5"; + o.attrs.gradient = gradient; + gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { + type = "radial"; + if (fx && fy) { + fx = toFloat(fx); + fy = toFloat(fy); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); + fxfy = fx + S + fy; + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + o = o.shape || o.node; + if (dots.length) { + o.removeChild(fill); + fill.on = true; + fill.method = "none"; + fill.color = dots[0].color; + fill.color2 = dots[dots.length - 1].color; + var clrs = []; + for (var i = 0, ii = dots.length; i < ii; i++) { + dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); + } + fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; + if (type == "radial") { + fill.type = "gradientTitle"; + fill.focus = "100%"; + fill.focussize = "0 0"; + fill.focusposition = fxfy; + fill.angle = 0; + } else { + // fill.rotate= true; + fill.type = "gradient"; + fill.angle = (270 - angle) % 360; + } + o.appendChild(fill); + } + return 1; + }, + Element = function (node, vml) { + this[0] = this.node = node; + node.raphael = true; + this.id = R._oid++; + node.raphaelid = this.id; + this.X = 0; + this.Y = 0; + this.attrs = {}; + this.paper = vml; + this.matrix = R.matrix(); + this._ = { + transform: [], + sx: 1, + sy: 1, + dx: 0, + dy: 0, + deg: 0, + dirty: 1, + dirtyT: 1 + }; + !vml.bottom && (vml.bottom = this); + this.prev = vml.top; + vml.top && (vml.top.next = this); + vml.top = this; + this.next = null; + }; + var elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + elproto.transform = function (tstr) { + if (tstr == null) { + return this._.transform; + } + var vbs = this.paper._viewBoxShift, + vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, + oldt; + if (vbs) { + oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); + } + R._extractTransform(this, vbt + tstr); + var matrix = this.matrix.clone(), + skew = this.skew, + o = this.node, + split, + isGrad = ~Str(this.attrs.fill).indexOf("-"), + isPatt = !Str(this.attrs.fill).indexOf("url("); + matrix.translate(1, 1); + if (isPatt || isGrad || this.type == "image") { + skew.matrix = "1 0 0 1"; + skew.offset = "0 0"; + split = matrix.split(); + if ((isGrad && split.noRotation) || !split.isSimple) { + o.style.filter = matrix.toFilter(); + var bb = this.getBBox(), + bbt = this.getBBox(1), + dx = bb.x - bbt.x, + dy = bb.y - bbt.y; + o.coordorigin = (dx * -zoom) + S + (dy * -zoom); + setCoords(this, 1, 1, dx, dy, 0); + } else { + o.style.filter = E; + setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); + } + } else { + o.style.filter = E; + skew.matrix = Str(matrix); + skew.offset = matrix.offset(); + } + if (oldt !== null) { // empty string value is true as well + this._.transform = oldt; + R._extractTransform(this, oldt); + } + return this; + }; + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + if (deg == null) { + return; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this._.dirtyT = 1; + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + if (this._.bbox) { + this._.bbox.x += dx; + this._.bbox.y += dy; + } + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + isNaN(cx) && (cx = null); + isNaN(cy) && (cy = null); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + this._.dirtyT = 1; + return this; + }; + elproto.hide = function () { + !this.removed && (this.node.style.display = "none"); + return this; + }; + elproto.show = function () { + !this.removed && (this.node.style.display = E); + return this; + }; + // Needed to fix the vml setViewBox issues + elproto.auxGetBBox = R.el.getBBox; + elproto.getBBox = function(){ + var b = this.auxGetBBox(); + if (this.paper && this.paper._viewBoxShift) + { + var c = {}; + var z = 1/this.paper._viewBoxShift.scale; + c.x = b.x - this.paper._viewBoxShift.dx; + c.x *= z; + c.y = b.y - this.paper._viewBoxShift.dy; + c.y *= z; + c.width = b.width * z; + c.height = b.height * z; + c.x2 = c.x + c.width; + c.y2 = c.y + c.height; + return c; + } + return b; + }; + elproto._getBBox = function () { + if (this.removed) { + return {}; + } + return { + x: this.X + (this.bbx || 0) - this.W / 2, + y: this.Y - this.H, + width: this.W, + height: this.H + }; + }; + elproto.remove = function () { + if (this.removed || !this.node.parentNode) { + return; + } + this.paper.__set__ && this.paper.__set__.exclude(this); + R.eve.unbind("raphael.*.*." + this.id); + R._tear(this, this.paper); + this.node.parentNode.removeChild(this.node); + this.shape && this.shape.parentNode.removeChild(this.shape); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (this.attrs && value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + var params; + if (value != null) { + params = {}; + params[name] = value; + } + value == null && R.is(name, "object") && (params = name); + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + if (params) { + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + // this.paper.canvas.style.display = "none"; + if (params.text && this.type == "text") { + this.textpath.string = params.text; + } + setFillAndStroke(this, params); + // this.paper.canvas.style.display = E; + } + return this; + }; + elproto.toFront = function () { + !this.removed && this.node.parentNode.appendChild(this.node); + this.paper && this.paper.top != this && R._tofront(this, this.paper); + return this; + }; + elproto.toBack = function () { + if (this.removed) { + return this; + } + if (this.node.parentNode.firstChild != this.node) { + this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); + R._toback(this, this.paper); + } + return this; + }; + elproto.insertAfter = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[element.length - 1]; + } + if (element.node.nextSibling) { + element.node.parentNode.insertBefore(this.node, element.node.nextSibling); + } else { + element.node.parentNode.appendChild(this.node); + } + R._insertafter(this, element, this.paper); + return this; + }; + elproto.insertBefore = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[0]; + } + element.node.parentNode.insertBefore(this.node, element.node); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + var s = this.node.runtimeStyle, + f = s.filter; + f = f.replace(blurregexp, E); + if (+size !== 0) { + this.attrs.blur = size; + s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; + s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); + } else { + s.filter = f; + s.margin = 0; + delete this.attrs.blur; + } + return this; + }; + + R._engine.path = function (pathString, vml) { + var el = createNode("shape"); + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = vml.coordorigin; + var p = new Element(el, vml), + attr = {fill: "none", stroke: "#000"}; + pathString && (attr.path = pathString); + p.type = "path"; + p.path = []; + p.Path = E; + setFillAndStroke(p, attr); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.rect = function (vml, x, y, w, h, r) { + var path = R._rectPath(x, y, w, h, r), + res = vml.path(path), + a = res.attrs; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.r = r; + a.path = path; + res.type = "rect"; + return res; + }; + R._engine.ellipse = function (vml, x, y, rx, ry) { + var res = vml.path(), + a = res.attrs; + res.X = x - rx; + res.Y = y - ry; + res.W = rx * 2; + res.H = ry * 2; + res.type = "ellipse"; + setFillAndStroke(res, { + cx: x, + cy: y, + rx: rx, + ry: ry + }); + return res; + }; + R._engine.circle = function (vml, x, y, r) { + var res = vml.path(), + a = res.attrs; + res.X = x - r; + res.Y = y - r; + res.W = res.H = r * 2; + res.type = "circle"; + setFillAndStroke(res, { + cx: x, + cy: y, + r: r + }); + return res; + }; + R._engine.image = function (vml, src, x, y, w, h) { + var path = R._rectPath(x, y, w, h), + res = vml.path(path).attr({stroke: "none"}), + a = res.attrs, + node = res.node, + fill = node.getElementsByTagName(fillString)[0]; + a.src = src; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.path = path; + res.type = "image"; + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = src; + fill.type = "tile"; + res._.fillpos = [x, y]; + res._.fillsize = [w, h]; + node.appendChild(fill); + setCoords(res, 1, 1, 0, 0, 0); + return res; + }; + R._engine.text = function (vml, x, y, text) { + var el = createNode("shape"), + path = createNode("path"), + o = createNode("textpath"); + x = x || 0; + y = y || 0; + text = text || ""; + path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); + path.textpathok = true; + o.string = Str(text); + o.on = true; + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = "0 0"; + var p = new Element(el, vml), + attr = { + fill: "#000", + stroke: "none", + font: R._availableAttrs.font, + text: text + }; + p.shape = el; + p.path = path; + p.textpath = o; + p.type = "text"; + p.attrs.text = Str(text); + p.attrs.x = x; + p.attrs.y = y; + p.attrs.w = 1; + p.attrs.h = 1; + setFillAndStroke(p, attr); + el.appendChild(o); + el.appendChild(path); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.setSize = function (width, height) { + var cs = this.canvas.style; + this.width = width; + this.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + cs.width = width; + cs.height = height; + cs.clip = "rect(0 " + width + " " + height + " 0)"; + if (this._viewBox) { + R._engine.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var paperSize = this.getSize(), + width = paperSize.width, + height = paperSize.height, + H, W; + if (fit) { + H = height / h; + W = width / w; + if (w * H < width) { + x -= (width - w * H) / 2 / H; + } + if (h * W < height) { + y -= (height - h * W) / 2 / W; + } + } + this._viewBox = [x, y, w, h, !!fit]; + this._viewBoxShift = { + dx: -x, + dy: -y, + scale: paperSize + }; + this.forEach(function (el) { + el.transform("..."); + }); + return this; + }; + var createNode; + R._engine.initWin = function (win) { + var doc = win.document; + if (doc.styleSheets.length < 31) { + doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); + } else { + // no more room, add to the existing one + // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx + doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)"); + } + try { + !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); + createNode = function (tagName) { + return doc.createElement('<rvml:' + tagName + ' class="rvml">'); + }; + } catch (e) { + createNode = function (tagName) { + return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); + }; + } + }; + R._engine.initWin(R._g.win); + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con.container, + height = con.height, + s, + width = con.width, + x = con.x, + y = con.y; + if (!container) { + throw new Error("VML container not found."); + } + var res = new R._Paper, + c = res.canvas = R._g.doc.createElement("div"), + cs = c.style; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + res.width = width; + res.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + res.coordsize = zoom * 1e3 + S + zoom * 1e3; + res.coordorigin = "0 0"; + res.span = R._g.doc.createElement("span"); + res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; + c.appendChild(res.span); + cs.cssText = R.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);", width, height); + if (container == 1) { + R._g.doc.body.appendChild(c); + cs.left = x + "px"; + cs.top = y + "px"; + cs.position = "absolute"; + } else { + if (container.firstChild) { + container.insertBefore(c, container.firstChild); + } else { + container.appendChild(c); + } + } + res.renderfix = function () {}; + return res; + }; + R.prototype.clear = function () { + R.eve("raphael.clear", this); + this.canvas.innerHTML = E; + this.span = R._g.doc.createElement("span"); + this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; + this.canvas.appendChild(this.span); + this.bottom = this.top = null; + }; + R.prototype.remove = function () { + R.eve("raphael.remove", this); + this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + return true; + }; + + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +})); + +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob, factory) { + if (typeof define === "function" && define.amd) { + define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) { + return factory(Raphael); + }); + } else if (typeof exports === "object") { + var raphael = require("raphael.core"); + + require("raphael.svg"); + require("raphael.vml"); + + module.exports = factory(raphael); + } else { + //glob.Raphael = factory(glob.Raphael); + } +}(this, function (Raphael) { + return Raphael.ninja(); +}));/** + * svg绘图 + * + * Created by GUY on 2015/12/3. + * @class BI.Svg + * @extends BI.Widget + */ +BI.Svg = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Svg.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-svg" + }) + }, + + _init: function () { + BI.Svg.superclass._init.apply(this, arguments); + this.paper = Raphael(this.element[0]); + + this.element.css("overflow", "hidden"); + $(this.paper.canvas).width("100%").height("100%").css({"left": "0", "top": "0"}).appendTo(this.element); + + this.top = this.paper.top; + this.bottom = this.paper.bottom; + this.customAttributes = this.paper.customAttributes; + this.ca = this.paper.ca; + this.raphael = this.paper.raphael; + }, + + add: function () { + return this.paper.add.apply(this.paper, arguments); + }, + + path: function () { + return this.paper.path.apply(this.paper, arguments); + }, + + image: function () { + return this.paper.image.apply(this.paper, arguments); + }, + + rect: function () { + return this.paper.rect.apply(this.paper, arguments); + }, + + circle: function () { + return this.paper.circle.apply(this.paper, arguments); + }, + + ellipse: function () { + return this.paper.ellipse.apply(this.paper, arguments); + }, + + text: function () { + return this.paper.text.apply(this.paper, arguments); + }, + + print: function () { + return this.paper.print.apply(this.paper, arguments); + }, + + + setStart: function () { + return this.paper.setStart.apply(this.paper, arguments); + }, + + setFinish: function () { + return this.paper.setFinish.apply(this.paper, arguments); + }, + + setSize: function () { + return this.paper.setSize.apply(this.paper, arguments); + }, + + setViewBox: function () { + return this.paper.setViewBox.apply(this.paper, arguments); + }, + + + getById: function () { + return this.paper.getById.apply(this.paper, arguments); + }, + + getElementByPoint: function () { + return this.paper.getElementByPoint.apply(this.paper, arguments); + }, + + getElementsByPoint: function () { + return this.paper.getElementsByPoint.apply(this.paper, arguments); + }, + + getFont: function () { + return this.paper.getFont.apply(this.paper, arguments); + }, + + + set: function () { + return this.paper.set.apply(this.paper, arguments); + }, + remove: function () { + return this.paper.remove.apply(this.paper, arguments); + }, + clear: function () { + return this.paper.clear.apply(this.paper, arguments); + } +}); +BI.shortcut("bi.svg", BI.Svg);/** + * + * 原生表格滚动条,为了IE8的兼容 + * + * Created by GUY on 2016/1/12. + * @class BI.NativeTableScrollbar + * @extends BI.Widget + */ +BI.NativeTableScrollbar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + defaultPosition: 0, + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + //把滚动台size改掉 + this.element.width(36); + + var throttle = BI.throttle(function () { + self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollTop()); + }, 150, {leading: false}); + this.element.scroll(function () { + throttle(); + }); + return { + type: "bi.default", + scrolly: true, + items: [{ + type: "bi.layout", + width: 1, + ref: function (_ref) { + self.inner = _ref; + } + }] + } + }, + + mounted: function () { + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + try { + this.element.scrollTop(o.position); + } catch (e) { + + } + this.inner.element.height(o.contentSize); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.setHeight(size); + this.options.size = size; + }, + + populate: function () { + this._populate(); + } +}); +BI.NativeTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.native_table_scrollbar", BI.NativeTableScrollbar); + + +BI.NativeTableHorizontalScrollbar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + //把滚动台size改掉 + this.element.height(36); + + var throttle = BI.throttle(function () { + self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollLeft()); + }, 150, {leading: false}); + this.element.scroll(function () { + throttle(); + }); + return { + type: "bi.default", + scrollx: true, + items: [{ + type: "bi.layout", + height: 1, + ref: function (_ref) { + self.inner = _ref; + } + }] + } + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.setWidth(size); + this.options.size = size; + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + try { + this.element.scrollLeft(o.position); + } catch (e) { + + } + this.inner.element.width(o.contentSize); + }, + + populate: function () { + this._populate(); + } +}); +BI.NativeTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.native_table_horizontal_scrollbar", BI.NativeTableHorizontalScrollbar);/** + * + * 表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableCell + * @extends BI.Single + */ +BI.TableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-cell", + textAlign: "left", + text: "" + }) + }, + + _init: function () { + BI.TableCell.superclass._init.apply(this, arguments); + BI.createWidget({ + type: "bi.label", + element: this, + whiteSpace: "nowrap", + textAlign: this.options.textAlign, + height: this.options.height, + text: this.options.text, + value: this.options.value, + lgap: 5 + }) + } +}); + +BI.shortcut("bi.table_cell", BI.TableCell);/** + * + * 表格单元格 + * + * Created by GUY on 2016/1/12. + * @class BI.CollectionTableCell + * @extends BI.Widget + */ +BI.CollectionTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection-table-cell bi-border-right bi-border-bottom", + width: 0, + height: 0, + _left: 0, + _top: 0, + cell: {} + }) + }, + + _init: function () { + BI.CollectionTableCell.superclass._init.apply(this, arguments); + var o = this.options; + this.cell = BI.createWidget(BI.extend({ + type: "bi.label" + }, o.cell, { + cls: (o.cell.cls || "") + " collection-table-cell-wrapper", + width: o.width - (o._left === 0 ? 1 : 0) - 1, + height: o.height - (o._top === 0 ? 1 : 0) - 1 + })); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.cell, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + }, + + setWidth: function (width) { + BI.CollectionTableCell.superclass.setWidth.apply(this, arguments); + var o = this.options; + this.cell.setWidth(o.width - (o._left === 0 ? 1 : 0) - 1); + }, + + setHeight: function (height) { + BI.CollectionTableCell.superclass.setHeight.apply(this, arguments); + var o = this.options; + this.cell.setHeight(o.height - (o._top === 0 ? 1 : 0) - 1); + } +}); + +BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/** + * CollectionTable + * + * Created by GUY on 2016/1/12. + * @class BI.CollectionTable + * @extends BI.Widget + */ +BI.CollectionTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-collection-table", + headerRowSize: 25, + rowSize: 25, + columnSize: [], + isNeedFreeze: false, + freezeCols: [], + isNeedMerge: false, + mergeCols: [], + mergeRule: BI.emptyFn, + header: [], + items: [], + regionColumnSize: [] + }); + }, + + render: function () { + var self = this, o = this.options; + this._width = 0; + this._height = 0; + this._scrollBarSize = BI.DOM.getScrollWidth(); + this.topLeftCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.topLeftItems[index]; + } + }); + this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomLeftCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topRightCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.topRightItems[index]; + } + }); + this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomRightCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomLeftCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.bottomLeftItems[index]; + } + }); + this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomRightCollection.setScrollTop(scroll.scrollTop); + self.topLeftCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomRightCollection = BI.createWidget({ + type: "bi.collection_view", + cellSizeAndPositionGetter: function (index) { + return self.bottomRightItems[index]; + } + }); + this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL, function (scroll) { + self.bottomLeftCollection.setScrollTop(scroll.scrollTop); + self.topRightCollection.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topLeftCollection] + }); + this.topRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topRightCollection] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomLeftCollection] + }); + this.bottomRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomRightCollection] + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topLeft, + top: 0, + left: 0 + }, { + el: this.topRight, + top: 0 + }, { + el: this.bottomLeft, + left: 0 + }, { + el: this.bottomRight + }] + }); + + this.topScrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + width: BI.GridTableScrollbar.SIZE + }); + this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { + self.bottomLeftCollection.setScrollTop(scrollTop); + self.bottomRightCollection.setScrollTop(scrollTop); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.leftScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topLeftCollection.setScrollLeft(scrollLeft); + self.bottomLeftCollection.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.rightScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topRightCollection.setScrollLeft(scrollLeft); + self.bottomRightCollection.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.scrollBarLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topScrollbar, + right: 0, + top: 0 + }, { + el: this.leftScrollbar, + left: 0 + }, { + el: this.rightScrollbar, + }] + }); + this._width = o.width - BI.GridTableScrollbar.SIZE; + this._height = o.height - BI.GridTableScrollbar.SIZE; + }, + + mounted: function () { + var o = this.options; + if (o.items.length > 0 || o.header.length > 0) { + this._digest(); + this._populate(); + } + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; + }, + + _getFreezeHeaderHeight: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return 0; + } + return o.header.length * o.headerRowSize; + }, + + _getActualItems: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return o.header.concat(o.items); + } + return o.items; + }, + + _populateScrollbar: function () { + var o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); + this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); + this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()); + this.topScrollbar.populate(); + + this.leftScrollbar.setContentSize(totalLeftColumnSize); + this.leftScrollbar.setSize(regionSize); + this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()); + this.leftScrollbar.populate(); + + this.rightScrollbar.setContentSize(totalRightColumnSize); + this.rightScrollbar.setSize(this._width - regionSize); + this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()); + this.rightScrollbar.populate(); + + var items = this.scrollBarLayout.attr("items"); + items[0].top = this._getFreezeHeaderHeight(); + items[1].top = this._height; + items[2].top = this._height; + items[2].left = regionSize; + this.scrollBarLayout.attr("items", items); + this.scrollBarLayout.resize(); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + var tlw = otlw + this._scrollBarSize; + var tlh = otlh + this._scrollBarSize; + var trw = otrw + this._scrollBarSize; + var trh = otrh + this._scrollBarSize; + var blw = oblw + this._scrollBarSize; + var blh = oblh + this._scrollBarSize; + var brw = obrw + this._scrollBarSize; + var brh = obrh + this._scrollBarSize; + + var digest = function (el) { + el.element.css({ + overflow: "scroll", + overflowX: "scroll", + overflowY: "scroll" + }) + }; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftCollection.setWidth(tlw); + this.topLeftCollection.setHeight(tlh); + this.topRightCollection.setWidth(trw); + this.topRightCollection.setHeight(trh); + this.bottomLeftCollection.setWidth(blw); + this.bottomLeftCollection.setHeight(blh); + this.bottomRightCollection.setWidth(brw); + this.bottomRightCollection.setHeight(brh); + + digest(this.topLeftCollection); + digest(this.topRightCollection); + digest(this.bottomLeftCollection); + digest(this.bottomRightCollection); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + var run = function (positions, items, rendered) { + BI.each(positions, function (i, item) { + var cell = { + type: "bi.collection_table_cell", + cell: items[item.row][item.col] + }; + rendered.push(cell); + }); + }; + run(this.topLeftItems, o.header, leftHeader); + run(this.topRightItems, o.header, rightHeader); + run(this.bottomLeftItems, this._getActualItems(), leftItems); + run(this.bottomRightItems, this._getActualItems(), rightItems); + + this.topLeftCollection._populate(leftHeader); + this.topRightCollection._populate(rightHeader); + this.bottomLeftCollection._populate(leftItems); + this.bottomRightCollection._populate(rightItems); + }, + + _digest: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + //如果表头位置不够,取消表头冻结 + if (this._getFreezeHeaderHeight() <= 0) { + this.topLeftItems = []; + this.topRightItems = []; + this.bottomLeftItems = this._serialize(this._getActualItems(), 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); + this.bottomRightItems = this._serialize(this._getActualItems(), freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length)); + } else { + this.topLeftItems = this._serialize(o.header, 0, freezeColLength, o.headerRowSize, o.columnSize, o.mergeCols); + this.topRightItems = this._serialize(o.header, freezeColLength, o.columnSize.length, o.headerRowSize, o.columnSize, true); + this.bottomLeftItems = this._serialize(o.items, 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols); + this.bottomRightItems = this._serialize(o.items, freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols); + } + }, + + _serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols, mergeRows) { + mergeCols = mergeCols || []; + mergeRows = mergeRows || []; + var self = this, o = this.options; + var result = [], cache = {}, preCol = {}, preRow = {}, map = {}; + var summaryColumnSize = []; + for (var i = startCol; i < endCol; i++) { + if (i === startCol) { + summaryColumnSize[i] = columnSize[i]; + } else { + summaryColumnSize[i] = summaryColumnSize[i - 1] + columnSize[i]; + } + } + var mergeRow = function (i, j) { + preCol[j]._height += rowHeight; + preCol[j].__mergeRows.push(i); + }; + + var mergeCol = function (i, j) { + preRow[i]._width += columnSize[j]; + preRow[i].__mergeCols.push(j); + }; + + var createOneEl = function (r, c) { + var width = columnSize[c]; + var height = rowHeight; + map[r][c]._row = r; + map[r][c]._col = c; + map[r][c]._width = width; + map[r][c]._height = height; + preCol[c] = map[r][c]; + preCol[c].__mergeRows = [r]; + preRow[r] = map[r][c]; + preRow[r].__mergeCols = [c]; + + result.push({ + x: summaryColumnSize[c] - columnSize[c], + y: +r * rowHeight, + item: map[r][c] + }); + }; + + BI.each(items, function (i, cols) { + for (var j = startCol; j < endCol; j++) { + if (!cache[i]) { + cache[i] = {}; + } + if (!map[i]) { + map[i] = {}; + } + cache[i][j] = cols[j]; + map[i][j] = {}; + if (mergeCols === true || mergeCols.indexOf(j) > -1 || mergeRows === true || mergeRows.indexOf(i) > -1) { + if (i === 0 && j === startCol) { + createOneEl(0, startCol); + } else if (j === startCol && i > 0) { + var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); + if (isNeedMergeRow === true) { + mergeRow(i, j); + preRow[i] = preCol[j]; + } else { + createOneEl(i, j); + } + } else if (i === 0 && j > startCol) { + var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); + if (isNeedMergeCol === true) { + mergeCol(i, j); + preCol[j] = preRow[i]; + } else { + createOneEl(i, j); + } + } else { + var isNeedMergeRow = o.mergeRule(cache[i][j], cache[i - 1][j]); + var isNeedMergeCol = o.mergeRule(cache[i][j], cache[i][j - 1]); + if (isNeedMergeCol && isNeedMergeRow) { + continue; + //mergeRow(i, j);//优先合并列 + } + if (isNeedMergeCol) { + mergeCol(i, j); + } + if (isNeedMergeRow) { + mergeRow(i, j); + } + if (!isNeedMergeCol && !isNeedMergeRow) { + createOneEl(i, j); + } + } + } else { + createOneEl(i, j); + } + } + }); + return BI.map(result, function (i, item) { + return { + x: item.x, + y: item.y, + row: item.item._row, + col: item.item._col, + width: item.item._width, + height: item.item._height + } + }); + }, + + _populate: function () { + if (this._width <= 0 || this._height <= 0) { + return; + } + if (this._isNeedDigest === true) { + this._digest(); + } + this._isNeedDigest = false; + this._populateTable(); + this._populateScrollbar(); + }, + + getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + setVerticalScroll: function (scrollTop) { + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.topLeftCollection.setScrollLeft(scrollLeft); + this.bottomLeftCollection.setScrollLeft(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.topRightCollection.setScrollLeft(scrollLeft); + this.bottomRightCollection.setScrollLeft(scrollLeft); + }, + + getVerticalScroll: function () { + return this.bottomRightCollection.getScrollTop(); + }, + + getLeftHorizontalScroll: function () { + return this.bottomLeftCollection.getScrollLeft(); + }, + + getRightHorizontalScroll: function () { + return this.bottomRightCollection.getScrollLeft(); + }, + + setWidth: function (width) { + BI.CollectionTable.superclass.setWidth.apply(this, arguments); + this._width = this.options.width - BI.GridTableScrollbar.SIZE; + }, + + setHeight: function (height) { + BI.CollectionTable.superclass.setHeight.apply(this, arguments); + this._height = this.options.height - BI.GridTableScrollbar.SIZE; + }, + + setColumnSize: function (columnSize) { + this._isNeedDigest = true; + this.options.columnSize = columnSize; + }, + + setRegionColumnSize: function (regionColumnSize) { + this._isNeedDigest = true; + this.options.regionColumnSize = regionColumnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + populate: function (items, header) { + if (items && items !== this.options.items) { + this._isNeedDigest = true; + this.options.items = items; + this._restore(); + } + if (header && header !== this.options.header) { + this._isNeedDigest = true; + this.options.header = header; + this._restore(); + } + this._populate(); + }, + + _restore: function () { + this.topLeftCollection.restore(); + this.topRightCollection.restore(); + this.bottomLeftCollection.restore(); + this.bottomRightCollection.restore(); + }, + + restore: function () { + this._restore(); + } +}); +BI.shortcut('bi.collection_table', BI.CollectionTable);/** + * QuickCollectionTable + * + * Created by GUY on 2016/1/12. + * @class BI.QuickCollectionTable + * @extends BI.CollectionTable + */ +BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, { + _defaultConfig: function () { + return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-quick-collection-table" + }); + }, + + render: function () { + BI.QuickCollectionTable.superclass.render.apply(this, arguments); + var self = this, o = this.options; + this.topLeftCollection.setOverflowX(false); + this.topLeftCollection.setOverflowY(false); + this.topRightCollection.setOverflowX(false); + this.topRightCollection.setOverflowY(false); + this.bottomLeftCollection.setOverflowX(false); + this.bottomLeftCollection.setOverflowY(false); + this.bottomRightCollection.setOverflowX(false); + this.bottomRightCollection.setOverflowY(false); + }, + + mounted: function () { + BI.QuickCollectionTable.superclass.mounted.apply(this, arguments); + var self = this; + this._topLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._topRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this.topLeftCollection.element.mousewheel(function (e) { + self._topLeftWheelHandler.onWheel(e.originalEvent); + }); + this.topRightCollection.element.mousewheel(function (e) { + self._topRightWheelHandler.onWheel(e.originalEvent); + }); + this.bottomLeftCollection.element.mousewheel(function (e) { + self._bottomLeftWheelHandler.onWheel(e.originalEvent); + }); + this.bottomRightCollection.element.mousewheel(function (e) { + self._bottomRightWheelHandler.onWheel(e.originalEvent); + }); + }, + + _shouldHandleLeftX: function (delta) { + if (delta > 0) { + return this.bottomLeftCollection.getScrollLeft() < this.bottomLeftCollection.getMaxScrollLeft(); + } else { + return this.bottomLeftCollection.getScrollLeft() > 0; + } + }, + + _shouldHandleRightX: function (delta) { + if (delta > 0) { + return this.bottomRightCollection.getScrollLeft() < this.bottomRightCollection.getMaxScrollLeft(); + } else { + return this.bottomRightCollection.getScrollLeft() > 0; + } + }, + + _shouldHandleY: function (delta) { + if (delta > 0) { + return this.bottomRightCollection.getScrollTop() < this.bottomRightCollection.getMaxScrollTop(); + } else { + return this.bottomRightCollection.getScrollTop() > 0; + } + }, + + _onWheelLeft: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomLeftCollection.getScrollTop(); + var scrollLeft = this.bottomLeftCollection.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + this.topLeftCollection.setScrollLeft(scrollLeft); + this.bottomLeftCollection.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _onWheelRight: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomRightCollection.getScrollTop(); + var scrollLeft = this.bottomRightCollection.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftCollection.setScrollTop(scrollTop); + this.bottomRightCollection.setScrollTop(scrollTop); + this.topRightCollection.setScrollLeft(scrollLeft); + this.bottomRightCollection.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = [] + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftCollection.setWidth(otlw); + this.topLeftCollection.setHeight(otlh); + this.topRightCollection.setWidth(otrw); + this.topRightCollection.setHeight(otrh); + this.bottomLeftCollection.setWidth(oblw); + this.bottomLeftCollection.setHeight(oblh); + this.bottomRightCollection.setWidth(obrw); + this.bottomRightCollection.setHeight(obrh); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + var run = function (positions, items, rendered) { + BI.each(positions, function (i, item) { + var cell = { + type: "bi.collection_table_cell", + cell: items[item.row][item.col] + }; + rendered.push(cell); + }); + }; + run(this.topLeftItems, o.header, leftHeader); + run(this.topRightItems, o.header, rightHeader); + run(this.bottomLeftItems, this._getActualItems(), leftItems); + run(this.bottomRightItems, this._getActualItems(), rightItems); + + this.topLeftCollection.populate(leftHeader); + this.topRightCollection.populate(rightHeader); + this.bottomLeftCollection.populate(leftItems); + this.bottomRightCollection.populate(rightItems); + } +}); +BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/** + * + * 表格单元格 + * + * Created by GUY on 2016/1/12. + * @class BI.GridTableCell + * @extends BI.Widget + */ +BI.GridTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-table-cell bi-border-right bi-border-bottom", + width: 0, + height: 0, + _rowIndex: 0, + _columnIndex: 0, + _left: 0, + _top: 0, + cell: {} + }) + }, + + _init: function () { + BI.GridTableCell.superclass._init.apply(this, arguments); + var o = this.options; + this.cell = BI.createWidget(BI.extend({ + type: "bi.label" + }, o.cell, { + cls: (o.cell.cls || "") + "grid-table-cell-wrapper", + width: o.width - (o._columnIndex === 0 ? 1 : 0) - 1, + height: o.height - (o._rowIndex === 0 ? 1 : 0) - 1 + })); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.cell, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + }, + + setWidth: function (width) { + BI.GridTableCell.superclass.setWidth.apply(this, arguments); + var o = this.options; + this.cell.setWidth(o.width - (o._columnIndex === 0 ? 1 : 0) - 1); + }, + + setHeight: function (height) { + BI.GridTableCell.superclass.setHeight.apply(this, arguments); + var o = this.options; + this.cell.setHeight(o.height - (o._rowIndex === 0 ? 1 : 0) - 1); + } +}); + +BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/** + * GridTable + * + * Created by GUY on 2016/1/12. + * @class BI.GridTable + * @extends BI.Widget + */ +BI.GridTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-grid-table", + headerRowSize: 25, + rowSize: 25, + columnSize: [], + isNeedFreeze: false, + freezeCols: [], + header: [], + items: [], + regionColumnSize: [] + }); + }, + + render: function () { + var self = this, o = this.options; + this._width = 0; + this._height = 0; + this._scrollBarSize = BI.DOM.getScrollWidth(); + var rowHeightGetter = function () { + return o.rowSize; + }; + var columnLeftWidthGetter = function (index) { + return o.columnSize[index]; + }; + var columnRightWidthGetter = function (index) { + return o.columnSize[index + self._getFreezeColLength()]; + }; + this.topLeftGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnLeftWidthGetter + }); + this.topLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomLeftGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topRightGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnRightWidthGetter + }); + this.topRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomRightGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomLeftGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnLeftWidthGetter + }); + this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomRightGrid.setScrollTop(scroll.scrollTop); + self.topLeftGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.bottomRightGrid = BI.createWidget({ + type: "bi.grid_view", + rowHeightGetter: rowHeightGetter, + columnWidthGetter: columnRightWidthGetter + }); + this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL, function (scroll) { + self.bottomLeftGrid.setScrollTop(scroll.scrollTop); + self.topRightGrid.setScrollLeft(scroll.scrollLeft); + self._populateScrollbar(); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.topLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topLeftGrid] + }); + this.topRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.topRightGrid] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomLeftGrid] + }); + this.bottomRight = BI.createWidget({ + type: "bi.vertical", + scrollable: false, + scrolly: false, + items: [this.bottomRightGrid] + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topLeft, + top: 0, + left: 0 + }, { + el: this.topRight, + top: 0 + }, { + el: this.bottomLeft, + left: 0 + }, { + el: this.bottomRight + }] + }); + + this.topScrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + width: BI.GridTableScrollbar.SIZE + }); + this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function (scrollTop) { + self.bottomLeftGrid.setScrollTop(scrollTop); + self.bottomRightGrid.setScrollTop(scrollTop); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.leftScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topLeftGrid.setScrollLeft(scrollLeft); + self.bottomLeftGrid.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.rightScrollbar = BI.createWidget({ + type: "bi.grid_table_horizontal_scrollbar", + height: BI.GridTableScrollbar.SIZE + }); + this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, function (scrollLeft) { + self.topRightGrid.setScrollLeft(scrollLeft); + self.bottomRightGrid.setScrollLeft(scrollLeft); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.scrollBarLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.topScrollbar, + right: 0, + top: 0 + }, { + el: this.leftScrollbar, + left: 0 + }, { + el: this.rightScrollbar + }] + }); + this._width = o.width - BI.GridTableScrollbar.SIZE; + this._height = o.height - BI.GridTableScrollbar.SIZE; + this.header = this._getHeader(); + this.items = this._getItems(); + }, + + mounted: function () { + var o = this.options; + if (o.items.length > 0 || o.header.length > 0) { + this._populate(); + } + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze ? this.options.freezeCols.length : 0; + }, + + _getFreezeHeaderHeight: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return 0; + } + return o.header.length * o.headerRowSize; + }, + + _getActualItems: function () { + var o = this.options; + if (o.header.length * o.headerRowSize >= this._height) { + return o.header.concat(o.items); + } + return o.items; + }, + + _populateScrollbar: function () { + var o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize); + this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight()); + this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(), this.bottomRightGrid.getScrollTop())); + this.topScrollbar.populate(); + + this.leftScrollbar.setContentSize(totalLeftColumnSize); + this.leftScrollbar.setSize(regionSize); + this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()); + this.leftScrollbar.populate(); + + this.rightScrollbar.setContentSize(totalRightColumnSize); + this.rightScrollbar.setSize(this._width - regionSize); + this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()); + this.rightScrollbar.populate(); + + var items = this.scrollBarLayout.attr("items"); + items[0].top = this._getFreezeHeaderHeight(); + items[1].top = this._height; + items[2].top = this._height; + items[2].left = regionSize; + this.scrollBarLayout.attr("items", items); + this.scrollBarLayout.resize(); + }, + + _getHeader: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + var leftHeader = [], rightHeader = []; + BI.each(o.header, function (i, cols) { + leftHeader[i] = []; + rightHeader[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftHeader[i].push(cell); + } else { + rightHeader[i].push(cell); + } + }); + }); + return [leftHeader, rightHeader]; + }, + + _getItems: function () { + var o = this.options; + var freezeColLength = this._getFreezeColLength(); + var leftItems = [], rightItems = []; + BI.each(this._getActualItems(), function (i, cols) { + leftItems[i] = []; + rightItems[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftItems[i].push(cell); + } else { + rightItems[i].push(cell); + } + }); + }); + return [leftItems, rightItems]; + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + var freezeColLength = this._getFreezeColLength(); + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + var tlw = otlw + this._scrollBarSize; + var tlh = otlh + this._scrollBarSize; + var trw = otrw + this._scrollBarSize; + var trh = otrh + this._scrollBarSize; + var blw = oblw + this._scrollBarSize; + var blh = oblh + this._scrollBarSize; + var brw = obrw + this._scrollBarSize; + var brh = obrh + this._scrollBarSize; + + var digest = function (el) { + el.element.css({ + overflow: "scroll", + overflowX: "scroll", + overflowY: "scroll" + }) + }; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftGrid.setWidth(tlw); + this.topLeftGrid.setHeight(tlh); + this.topRightGrid.setWidth(trw); + this.topRightGrid.setHeight(trh); + this.bottomLeftGrid.setWidth(blw); + this.bottomLeftGrid.setHeight(blh); + this.bottomRightGrid.setWidth(brw); + this.bottomRightGrid.setHeight(brh); + + digest(this.topLeftGrid); + digest(this.topRightGrid); + digest(this.bottomLeftGrid); + digest(this.bottomRightGrid); + + this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); + this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.topRightGrid.setEstimatedRowSize(o.headerRowSize); + this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); + this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.bottomRightGrid.setEstimatedRowSize(o.rowSize); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + this.topLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.topRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + + function overscan(grid, w, h, rSize, cSize) { + var rCount = h / rSize; + var cCount = w / cSize; + if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { + grid.attr("overscanRowCount", 100); + grid.attr("overscanColumnCount", 100); + } + } + + if (freezeColLength > 0) { + overscan(this.topLeftGrid, tlw, tlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); + overscan(this.bottomLeftGrid, blw, blh, o.rowSize, totalLeftColumnSize / freezeColLength); + } + if (o.columnSize.length - freezeColLength > 0) { + overscan(this.topRight, trw, trh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + overscan(this.bottomRightGrid, brw, brh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + } + + this.topLeftGrid._populate(this.header[0]); + this.topRightGrid._populate(this.header[1]); + this.bottomLeftGrid._populate(this.items[0]); + this.bottomRightGrid._populate(this.items[1]); + }, + + _populate: function () { + if (this._width <= 0 || this._height <= 0) { + return; + } + this._populateTable(); + this._populateScrollbar(); + }, + + getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + setVerticalScroll: function (scrollTop) { + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.topLeftGrid.setScrollLeft(scrollLeft); + this.bottomLeftGrid.setScrollLeft(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.topRightGrid.setScrollLeft(scrollLeft); + this.bottomRightGrid.setScrollLeft(scrollLeft); + }, + + getVerticalScroll: function () { + return this.bottomRightGrid.getScrollTop(); + }, + + getLeftHorizontalScroll: function () { + return this.bottomLeftGrid.getScrollLeft(); + }, + + getRightHorizontalScroll: function () { + return this.bottomRightGrid.getScrollLeft(); + }, + + setWidth: function (width) { + BI.GridTable.superclass.setWidth.apply(this, arguments); + this._width = this.options.width - BI.GridTableScrollbar.SIZE; + }, + + setHeight: function (height) { + BI.GridTable.superclass.setHeight.apply(this, arguments); + this._height = this.options.height - BI.GridTableScrollbar.SIZE; + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this._isNeedDigest = true; + }, + + setRegionColumnSize: function (regionColumnSize) { + this.options.regionColumnSize = regionColumnSize; + this._isNeedDigest = true; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + populate: function (items, header) { + if (items && this.options.items !== items) { + this.options.items = items; + this.items = this._getItems(); + this._restore(); + } + if (header && this.options.header !== header) { + this.options.header = header; + this.header = this._getHeader(); + this._restore(); + } + this._populate(); + }, + + _restore: function () { + this.topLeftGrid.restore(); + this.topRightGrid.restore(); + this.bottomLeftGrid.restore(); + this.bottomRightGrid.restore(); + }, + + restore: function () { + this._restore(); + } +}); +BI.shortcut('bi.grid_table', BI.GridTable);/** + * QuickGridTable + * + * Created by GUY on 2016/1/12. + * @class BI.QuickGridTable + * @extends BI.GridTable + */ +BI.QuickGridTable = BI.inherit(BI.GridTable, { + _defaultConfig: function () { + return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-quick-grid-table" + }); + }, + + render: function () { + BI.QuickGridTable.superclass.render.apply(this, arguments); + var self = this, o = this.options; + this.topLeftGrid.setOverflowX(false); + this.topLeftGrid.setOverflowY(false); + this.topRightGrid.setOverflowX(false); + this.topRightGrid.setOverflowY(false); + this.bottomLeftGrid.setOverflowX(false); + this.bottomLeftGrid.setOverflowY(false); + this.bottomRightGrid.setOverflowX(false); + this.bottomRightGrid.setOverflowY(false); + }, + + mounted: function () { + BI.QuickGridTable.superclass.mounted.apply(this, arguments); + var self = this; + this._topLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._topRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomLeftWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelLeft, this), + BI.bind(this._shouldHandleLeftX, this), + BI.bind(this._shouldHandleY, this) + ); + this._bottomRightWheelHandler = new BI.WheelHandler( + BI.bind(this._onWheelRight, this), + BI.bind(this._shouldHandleRightX, this), + BI.bind(this._shouldHandleY, this) + ); + this.topLeftGrid.element.mousewheel(function (e) { + self._topLeftWheelHandler.onWheel(e.originalEvent); + }); + this.topRightGrid.element.mousewheel(function (e) { + self._topRightWheelHandler.onWheel(e.originalEvent); + }); + this.bottomLeftGrid.element.mousewheel(function (e) { + self._bottomLeftWheelHandler.onWheel(e.originalEvent); + }); + this.bottomRightGrid.element.mousewheel(function (e) { + self._bottomRightWheelHandler.onWheel(e.originalEvent); + }); + }, + + _shouldHandleLeftX: function (delta) { + if (delta > 0) { + return this.bottomLeftGrid.getScrollLeft() < this.bottomLeftGrid.getMaxScrollLeft(); + } else { + return this.bottomLeftGrid.getScrollLeft() > 0; + } + }, + + _shouldHandleRightX: function (delta) { + if (delta > 0) { + return this.bottomRightGrid.getScrollLeft() < this.bottomRightGrid.getMaxScrollLeft(); + } else { + return this.bottomRightGrid.getScrollLeft() > 0; + } + }, + + _shouldHandleY: function (delta) { + if (delta > 0) { + return this.bottomRightGrid.getScrollTop() < this.bottomRightGrid.getMaxScrollTop(); + } else { + return this.bottomRightGrid.getScrollTop() > 0; + } + }, + + _onWheelLeft: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomLeftGrid.getScrollTop(); + var scrollLeft = this.bottomLeftGrid.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + this.topLeftGrid.setScrollLeft(scrollLeft); + this.bottomLeftGrid.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _onWheelRight: function (deltaX, deltaY) { + var self = this; + var scrollTop = this.bottomRightGrid.getScrollTop(); + var scrollLeft = this.bottomRightGrid.getScrollLeft(); + scrollTop += deltaY; + scrollLeft += deltaX; + this.bottomLeftGrid.setScrollTop(scrollTop); + this.bottomRightGrid.setScrollTop(scrollTop); + this.topRightGrid.setScrollLeft(scrollLeft); + this.bottomRightGrid.setScrollLeft(scrollLeft); + self._populateScrollbar(); + this.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }, + + _populateTable: function () { + var self = this, o = this.options; + var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, + summaryColumnSizeArray = []; + var freezeColLength = this._getFreezeColLength(); + BI.each(o.columnSize, function (i, size) { + if (o.isNeedFreeze === true && o.freezeCols.contains(i)) { + totalLeftColumnSize += size; + } else { + totalRightColumnSize += size; + } + totalColumnSize += size; + if (i === 0) { + summaryColumnSizeArray[i] = size; + } else { + summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size; + } + }); + + var otlw = regionSize; + var otlh = this._getFreezeHeaderHeight(); + var otrw = this._width - regionSize; + var otrh = this._getFreezeHeaderHeight(); + var oblw = regionSize; + var oblh = this._height - otlh; + var obrw = this._width - regionSize; + var obrh = this._height - otrh; + + this.topLeft.setWidth(otlw); + this.topLeft.setHeight(otlh); + this.topRight.setWidth(otrw); + this.topRight.setHeight(otrh); + this.bottomLeft.setWidth(oblw); + this.bottomLeft.setHeight(oblh); + this.bottomRight.setWidth(obrw); + this.bottomRight.setHeight(obrh); + + this.topLeftGrid.setWidth(otlw); + this.topLeftGrid.setHeight(otlh); + this.topRightGrid.setWidth(otrw); + this.topRightGrid.setHeight(otrh); + this.bottomLeftGrid.setWidth(oblw); + this.bottomLeftGrid.setHeight(oblh); + this.bottomRightGrid.setWidth(obrw); + this.bottomRightGrid.setHeight(obrh); + + this.topLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.topLeftGrid.setEstimatedRowSize(o.headerRowSize); + this.topRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.topRightGrid.setEstimatedRowSize(o.headerRowSize); + this.bottomLeftGrid.setEstimatedColumnSize(freezeColLength > 0 ? totalLeftColumnSize / freezeColLength : 0); + this.bottomLeftGrid.setEstimatedRowSize(o.rowSize); + this.bottomRightGrid.setEstimatedColumnSize((o.columnSize.length - freezeColLength) > 0 ? (totalRightColumnSize / (o.columnSize.length - freezeColLength)) : 0); + this.bottomRightGrid.setEstimatedRowSize(o.rowSize); + + var items = this.contextLayout.attr("items"); + items[1].left = regionSize; + items[2].top = this._getFreezeHeaderHeight(); + items[3].left = regionSize; + items[3].top = this._getFreezeHeaderHeight(); + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + + var leftHeader = [], rightHeader = [], leftItems = [], rightItems = []; + BI.each(o.header, function (i, cols) { + leftHeader[i] = []; + rightHeader[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftHeader[i].push(cell); + } else { + rightHeader[i].push(cell); + } + }); + }); + BI.each(this._getActualItems(), function (i, cols) { + leftItems[i] = []; + rightItems[i] = []; + BI.each(cols, function (j, col) { + var cell = { + type: "bi.grid_table_cell", + cell: col + }; + if (j < freezeColLength) { + leftItems[i].push(cell); + } else { + rightItems[i].push(cell); + } + }); + }); + + this.topLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.topRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomLeftGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + this.bottomRightGrid.attr({ + overscanColumnCount: 0, + overscanRowCount: 0 + }); + + function overscan(grid, w, h, rSize, cSize) { + var rCount = h / rSize; + var cCount = w / cSize; + if (cCount * (120 / rSize) >= 60 || rCount * (120 / cSize) >= 60) { + grid.attr("overscanRowCount", 100); + grid.attr("overscanColumnCount", 100); + } + } + + if (freezeColLength > 0) { + overscan(this.topLeftGrid, otlw, otlh, o.headerRowSize, totalLeftColumnSize / freezeColLength); + overscan(this.bottomLeftGrid, oblw, oblh, o.rowSize, totalLeftColumnSize / freezeColLength); + } + if (o.columnSize.length - freezeColLength > 0) { + overscan(this.topRight, otrw, otrh, o.headerRowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + overscan(this.bottomRightGrid, obrw, obrh, o.rowSize, totalRightColumnSize / (o.columnSize.length - freezeColLength)); + } + + this.topLeftGrid.populate(leftHeader); + this.topRightGrid.populate(rightHeader); + this.bottomLeftGrid.populate(leftItems); + this.bottomRightGrid.populate(rightItems); + } +}); +BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/** + * + * 表格滚动条 + * + * Created by GUY on 2016/1/12. + * @class BI.GridTableScrollbar + * @extends BI.Widget + */ +BI.GridTableScrollbar = BI.inherit(BI.Widget, { + _const: { + FACE_MARGIN: 4, + FACE_MARGIN_2: 4 * 2, + FACE_SIZE_MIN: 30, + KEYBOARD_SCROLL_AMOUNT: 40 + }, + _defaultConfig: function () { + return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this, arguments), { + baseCls: "scrollbar-layout-main public-scrollbar-main", + attributes: { + tabIndex: 0 + }, + contentSize: 0, + defaultPosition: 0, + isOpaque: false, + orientation: "vertical", + position: 0, + size: 0 + }) + }, + + render: function () { + var self = this, o = this.options; + this.focused = false; + this.isDragging = false; + this.face = BI.createWidget({ + type: "bi.layout", + cls: "scrollbar-layout-face public-scrollbar-face " + + (this._isHorizontal() ? "scrollbar-layout-face-horizontal" : "scrollbar-layout-face-vertical") + }); + this.contextLayout = BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.face, + left: 0, + top: 0 + }] + }); + }, + + mounted: function () { + var self = this, o = this.options; + var onWheel = o.orientation === 'horizontal' ? this._onWheelX : this._onWheelY; + this._wheelHandler = new BI.WheelHandler( + BI.bind(onWheel, this), + BI.bind(this._shouldHandleX, this), + BI.bind(this._shouldHandleY, this) + ); + this._mouseMoveTracker = new BI.MouseMoveTracker( + BI.bind(this._onMouseMove, this), + BI.bind(this._onMouseMoveEnd, this), + document + ); + this.element.on("mousedown", BI.bind(this._onMouseDown, this)); + this.element.on("mousewheel", function (e) { + self._wheelHandler.onWheel(e.originalEvent); + }); + this.element.on("keydown", BI.bind(this._onKeyDown, this)); + this.element.on("focus", function () { + self.focused = true; + self._populate(); + }); + this.element.on("blur", function () { + self.focused = false; + self._populate(); + }); + if (this._isHorizontal()) { + this.element.addClass("scrollbar-layout-main-horizontal"); + } else { + this.element.addClass("scrollbar-layout-main-vertical"); + } + this._populate(); + }, + + _isHorizontal: function () { + return this.options.orientation === 'horizontal' + }, + + _getScale: function () { + var o = this.options; + var scale = o.size / o.contentSize; + var faceSize = o.size * scale; + + if (faceSize < this._const.FACE_SIZE_MIN) { + scale = (o.size - this._const.FACE_SIZE_MIN) / (o.contentSize - o.size); + } + return scale; + }, + + _getFaceSize: function () { + var o = this.options; + var scale = o.size / o.contentSize; + var faceSize = o.size * scale; + + if (faceSize < this._const.FACE_SIZE_MIN) { + faceSize = this._const.FACE_SIZE_MIN; + } + return faceSize; + }, + + _shouldHandleX: function (delta) { + return this.options.orientation === 'horizontal' ? + this._shouldHandleChange(delta) : + false; + }, + + _shouldHandleY: function (delta) { + return this.options.orientation !== 'horizontal' ? + this._shouldHandleChange(delta) : + false; + }, + + _shouldHandleChange: function (delta) { + return this.options.position + delta !== this.options.position; + }, + + _onWheelY: function (deltaX, deltaY) { + this._onWheel(deltaY); + }, + + _onWheelX: function (deltaX, deltaY) { + this._onWheel(deltaX); + }, + + _onWheel: function (delta) { + var maxPosition = this.options.contentSize - this.options.size; + this.options.position += delta; + if (this.options.position < 0) { + this.options.position = 0; + } else if (this.options.position > maxPosition) { + this.options.position = maxPosition; + } + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _onMouseDown: function (e) { + if (e.target !== this.face.element[0]) { + var position = this._isHorizontal() ? e.offsetX : e.offsetY; + position /= this._getScale(); + this.options.position = BI.clamp(position - (this._getFaceSize() * 0.5 / this._getScale()), 0, this.options.contentSize - this.options.size); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + } else { + this._mouseMoveTracker.captureMouseMoves(e); + } + try { + this.element[0].focus(); + } catch (e) { + + } + }, + + _onMouseMove: function (deltaX, deltaY) { + var delta = this._isHorizontal() ? deltaX : deltaY; + delta /= this._getScale(); + this.options.position = BI.clamp(this.options.position + delta, 0, this.options.contentSize - this.options.size); + this.isDragging = this._mouseMoveTracker.isDragging(); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _onMouseMoveEnd: function (event) { + this._mouseMoveTracker.releaseMouseMoves(); + if (this.isDragging === true) { + this.isDragging = false; + this._populate(); + } + }, + + _onKeyDown: function (event) { + var Keys = { + BACKSPACE: 8, + TAB: 9, + RETURN: 13, + ALT: 18, + ESC: 27, + SPACE: 32, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + DELETE: 46, + COMMA: 188, + PERIOD: 190, + A: 65, + Z: 90, + ZERO: 48, + NUMPAD_0: 96, + NUMPAD_9: 105 + }; + var keyCode = event.keyCode; + + if (keyCode === Keys.TAB) { + return; + } + + var distance = 40; + var direction = 0; + + if (this._isHorizontal()) { + switch (keyCode) { + case Keys.HOME: + direction = -1; + distance = this.options.contentSize; + break; + + case Keys.LEFT: + direction = -1; + break; + + case Keys.RIGHT: + direction = 1; + break; + + default: + return; + } + } + + if (!this._isHorizontal()) { + switch (keyCode) { + case Keys.SPACE: + if (event.shiftKey) { + direction = -1; + } else { + direction = 1; + } + break; + + case Keys.HOME: + direction = -1; + distance = this.options.contentSize; + break; + + case Keys.UP: + direction = -1; + break; + + case Keys.DOWN: + direction = 1; + break; + + case Keys.PAGE_UP: + direction = -1; + distance = this.options.size; + break; + + case Keys.PAGE_DOWN: + direction = 1; + distance = this.options.size; + break; + + default: + return; + } + } + + this.options.position = BI.clamp(this.options.position + (distance * direction), 0, this.options.contentSize - this.options.size); + event.preventDefault(); + this._populate(); + this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL, this.options.position); + }, + + _populate: function () { + var self = this, o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + + var size = o.size; + var isHorizontal = this._isHorizontal(); + var isActive = this.focused || this.isDragging; + + var faceSize = this._getFaceSize(); + var isOpaque = o.isOpaque; + this.element[isOpaque === true ? "addClass" : "removeClass"]("public-scrollbar-main-opaque"); + this.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-main-active"); + + this.face.element[isActive === true ? "addClass" : "removeClass"]("public-scrollbar-face-active"); + + var position = o.position * this._getScale() + this._const.FACE_MARGIN; + + var items = this.contextLayout.attr("items"); + if (isHorizontal) { + this.setWidth(size); + this.face.setWidth(faceSize - this._const.FACE_MARGIN_2); + items[0].left = position; + items[0].top = 0; + } else { + this.setHeight(size); + this.face.setHeight(faceSize - this._const.FACE_MARGIN_2); + items[0].left = 0; + items[0].top = position; + } + this.contextLayout.attr("items", items); + this.contextLayout.resize(); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + }, + + setPosition: function (position) { + this.options.position = position; + }, + + setSize: function (size) { + this.options.size = size; + }, + + populate: function () { + this._populate(); + } +}); +BI.GridTableScrollbar.SIZE = 10; +BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar); + + +BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, { + _const: { + FACE_MARGIN: 4, + FACE_MARGIN_2: 4 * 2, + FACE_SIZE_MIN: 30, + KEYBOARD_SCROLL_AMOUNT: 40 + }, + _defaultConfig: function () { + return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this, arguments), { + attributes: { + tabIndex: 0 + }, + contentSize: 0, + position: 0, + size: 0 + }) + }, + + _init: function () { + BI.GridTableHorizontalScrollbar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.scrollbar = BI.createWidget({ + type: "bi.grid_table_scrollbar", + orientation: "horizontal", + isOpaque: true, + position: o.position, + contentSize: o.contentSize, + size: o.size + }); + this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL, function () { + self.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL, arguments); + }); + BI.createWidget({ + type: "bi.absolute", + cls: "horizontal-scrollbar", + element: this, + width: o.size, + height: BI.GridTableScrollbar.SIZE, + items: [{ + el: { + type: "bi.absolute", + scrollable: false, + height: BI.GridTableScrollbar.SIZE, + items: [{ + el: this.scrollbar, + left: 0, + top: 0 + }] + }, + top: 0, + left: 0, + right: 0 + }] + }); + }, + + setContentSize: function (contentSize) { + this.options.contentSize = contentSize; + this.scrollbar.setContentSize(contentSize); + }, + + setPosition: function (position) { + this.options.position = position; + this.scrollbar.setPosition(position); + }, + + setSize: function (size) { + this.setWidth(size); + this.options.size = size; + this.scrollbar.setSize(size); + }, + + populate: function () { + this.scrollbar.populate(); + var o = this.options; + if (o.size < 1 || o.contentSize <= o.size) { + this.setVisible(false); + return; + } + this.setVisible(true); + } +}); +BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL"; +BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/** + * + * 表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableHeaderCell + * @extends BI.Single + */ +BI.TableHeaderCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-header-cell", + text: "" + }) + }, + + _init: function () { + BI.TableHeaderCell.superclass._init.apply(this, arguments); + BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "center", + height: this.options.height, + text: this.options.text, + value: this.options.value + }) + } +}); + +BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/** + * + * 表格 + * + * 能处理静态宽度以及动态宽度的表, 百分比宽度的表请使用PreviewTable + * + * Created by GUY on 2015/9/22. + * @class BI.Table + * @extends BI.Widget + */ +BI.Table = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Table.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table", + logic: { //冻结的页面布局逻辑 + dynamic: false + }, + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 + + isNeedMerge: false,//是否需要合并单元格 + mergeCols: [], //合并的单元格列号 + mergeRule: function (row1, row2) { //合并规则, 默认相等时合并 + return BI.isEqual(row1, row2); + }, + + columnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: false, + + header: [], + footer: false, + items: [] //二维数组 + }) + }, + + _calculateWidth: function (width) { + if (!width || width === "0") { + return ""; + } + width = BI.parseFloat(width); + if (width < 0) { + width = 0; + } + return width > 1.01 ? width : (width * 100 + "%"); + }, + + _calculateHeight: function (height) { + return height ? height : ""; + }, + + _isRightFreeze: function () { + return BI.isNotEmptyArray(this.options.freezeCols) && BI.first(this.options.freezeCols) !== 0; + }, + + _createTopLeft: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.topLeftColGroupTds = {}; + this.topLeftBodyTds = {}; + this.topLeftBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnLeft, this.topLeftColGroupTds); + var body = this.topLeftBody = this._body(); + body.element.append(this._createHeaderCells(this.topLeftItems, this.columnLeft, this.mergeLeft, this.topLeftBodyTds, this.topLeftBodyItems)); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.topLeftContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createTopRight: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.topRightColGroupTds = {}; + this.topRightBodyTds = {}; + this.topRightBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnRight, this.topRightColGroupTds); + var body = this.topRightBody = this._body(); + body.element.append(this._createHeaderCells(this.topRightItems, this.columnRight, this.mergeRight, this.topRightBodyTds, this.topRightBodyItems, this.columnLeft.length)); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (!isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w)) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.topRightContainer = BI.createWidget({ + type: "bi.adaptive", + width: w || undefined, + items: [table] + })); + }, + + _createBottomLeft: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.bottomLeftColGroupTds = {}; + this.bottomLeftBodyTds = {}; + this.bottomLeftBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnLeft, this.bottomLeftColGroupTds); + var body = this._createBottomLeftBody(); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.bottomLeftContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createBottomLeftBody: function () { + var body = this.bottomLeftBody = this._body(); + body.element.append(this._createCells(this.bottomLeftItems, this.columnLeft, this.mergeLeft, this.bottomLeftBodyTds, this.bottomLeftBodyItems)); + return body; + }, + + _createBottomRight: function () { + var o = this.options, isRight = this._isRightFreeze(); + this.bottomRightColGroupTds = {}; + this.bottomRightBodyTds = {}; + this.bottomRightBodyItems = {}; + var table = this._table(); + var colgroup = this._createColGroup(this.columnRight, this.bottomRightColGroupTds); + var body = this._createBottomRightBody(); + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, body] + }); + if (!isRight) { + var w = 0; + BI.each(o.columnSize, function (i, col) { + if (!o.freezeCols.contains(i)) { + w += col; + } + }); + if (BI.isNumeric(w) && w > 1) { + w = BI.parseFloat(w) + o.columnSize.length - o.freezeCols.length; + } + } + return (this.bottomRightContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + })); + }, + + _createBottomRightBody: function () { + var body = this.bottomRightBody = this._body(); + body.element.append(this._createCells(this.bottomRightItems, this.columnRight, this.mergeRight, this.bottomRightBodyTds, this.bottomRightBodyItems, this.columnLeft.length)); + return body; + }, + + _createFreezeTable: function () { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + var split = this._split(o.header); + this.topLeftItems = split.left; + this.topRightItems = split.right; + split = this._split(o.items); + this.bottomLeftItems = split.left; + this.bottomRightItems = split.right; + + this.columnLeft = []; + this.columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + self[isRight ? "columnRight" : "columnLeft"].push(size); + } else { + self[isRight ? "columnLeft" : "columnRight"].push(size); + } + }); + this.mergeLeft = []; + this.mergeRight = []; + BI.each(o.mergeCols, function (i, col) { + if (o.freezeCols.contains(col)) { + self[isRight ? "mergeRight" : "mergeLeft"].push(col); + } else { + self[isRight ? "mergeLeft" : "mergeRight"].push(col); + } + }); + + var topLeft = this._createTopLeft(); + var topRight = this._createTopRight(); + var bottomLeft = this._createBottomLeft(); + var bottomRight = this._createBottomRight(); + + this.scrollTopLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-top-left", + width: "100%", + height: "100%", + scrollable: false, + items: [topLeft] + }); + this.scrollTopRight = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-top-right", + width: "100%", + height: "100%", + scrollable: false, + items: [topRight] + }); + this.scrollBottomLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-bottom-left", + width: "100%", + height: "100%", + scrollable: isRight || null, + scrollx: !isRight, + items: [bottomLeft] + }); + this.scrollBottomRight = BI.createWidget({ + type: "bi.adaptive", + cls: "scroll-bottom-right", + width: "100%", + height: "100%", + scrollable: !isRight || null, + scrollx: isRight, + items: [bottomRight] + }); + this.topLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "top-left", + scrollable: false, + items: [this.scrollTopLeft] + }); + this.topRight = BI.createWidget({ + type: "bi.adaptive", + cls: "top-right", + scrollable: false, + items: [this.scrollTopRight] + }); + this.bottomLeft = BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-left", + // scrollable: false, + items: [this.scrollBottomLeft] + }); + this.bottomRight = BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-right", + scrollable: false, + items: [this.scrollBottomRight] + }); + + var headerHeight = o.header.length * ((o.headerRowSize || o.rowSize) + 1) + 1; + var leftWidth = BI.sum(o.freezeCols, function (i, col) { + return o.columnSize[col] > 1 ? o.columnSize[col] + 1 : o.columnSize[col]; + }); + + this._resize = function () { + if (self.scrollBottomLeft.element.is(":visible")) { + self.scrollBottomLeft.element.css({"overflow-x": "auto"}); + self.scrollBottomRight.element.css({"overflow-x": "auto"}); + self.setColumnSize(o.columnSize); + if (isRight) { + self.scrollBottomLeft.element.css({"overflow-y": "auto"}); + } else { + self.scrollBottomRight.element.css({"overflow-y": "auto"}); + } + if (self.scrollBottomLeft.element.hasHorizonScroll() || self.scrollBottomRight.element.hasHorizonScroll()) { + self.scrollBottomLeft.element.css("overflow-x", "scroll"); + self.scrollBottomRight.element.css("overflow-x", "scroll"); + } + if (self.scrollBottomRight.element.hasVerticalScroll()) { + self.scrollTopRight.element.css("overflow-y", "scroll"); + } else { + self.scrollTopRight.element.css("overflow-y", "hidden"); + } + if (self.scrollBottomLeft.element.hasVerticalScroll()) { + self.scrollTopLeft.element.css("overflow-y", "scroll"); + } else { + self.scrollTopLeft.element.css("overflow-y", "hidden"); + } + self.scrollTopLeft.element[0].scrollLeft = self.scrollBottomLeft.element[0].scrollLeft; + self.scrollTopRight.element[0].scrollLeft = self.scrollBottomRight.element[0].scrollLeft; + self.scrollBottomLeft.element[0].scrollTop = self.scrollBottomRight.element[0].scrollTop; + } + }; + + var regionColumnSize = o.regionColumnSize; + if (o.freezeCols.length === 0) { + regionColumnSize = isRight ? ['fill', 0] : [0, 'fill']; + } else if (o.freezeCols.length >= o.columnSize.length) { + regionColumnSize = isRight ? [0, 'fill'] : ['fill', 0]; + } + this.partitions = BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + rows: 2, + columns: 2, + columnSize: regionColumnSize || (isRight ? ['fill', leftWidth] : [leftWidth, 'fill']), + rowSize: [headerHeight, 'fill'], + items: [[{ + el: this.topLeft + }, { + el: this.topRight + }], [{ + el: this.bottomLeft + }, { + el: this.bottomRight + }]] + })))); + + this._initFreezeScroll(); + BI.nextTick(function () { + if (self.element.is(":visible")) { + self._resize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); + } + }); + BI.ResizeDetector.addResizeListener(this, function () { + self._resize(); + self.fireEvent(BI.Table.EVENT_TABLE_RESIZE); + }); + }, + + _initFreezeScroll: function () { + var self = this, o = this.options; + scroll(this.scrollBottomRight.element, this.scrollTopRight.element, this.scrollBottomLeft.element); + // scroll(this.scrollBottomLeft.element, this.scrollTopLeft.element, this.scrollBottomRight.element); + + function scroll(scrollElement, scrollTopElement, otherElement) { + scrollElement.scroll(function (e) { + otherElement.scrollTop(scrollElement.scrollTop()); + scrollTopElement.scrollLeft(scrollElement.scrollLeft()); + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); + }); + } + }, + + resize: function () { + this._resize && this._resize(); + }, + + _createCells: function (items, columnSize, mergeCols, TDs, Ws, start, rowSize) { + var self = this, o = this.options, preCol = {}, preRow = {}, preRW = {}, preCW = {}, map = {}; + columnSize = columnSize || o.columnSize; + mergeCols = mergeCols || o.mergeCols; + TDs = TDs || {}; + Ws = Ws || {}; + start = start || 0; + rowSize || (rowSize = o.rowSize); + var frag = document.createDocumentFragment(); + BI.each(items, function (i, rows) { + var tr = $("<tr>").addClass((i & 1) === 0 ? "odd" : "even"); + BI.each(rows, function (j, row) { + if (!map[i]) { + map[i] = {}; + } + if (!TDs[i]) { + TDs[i] = {}; + } + if (!Ws[i]) { + Ws[i] = {}; + } + map[i][j] = row; + + if (o.isNeedMerge && mergeCols.contains(j)) { + if (i === 0 && j === 0) { + createOneEl(0, 0); + } else if (j === 0 && i > 0) { + var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); + if (isNeedMergeRow === true) { + mergeRow(i, j); + preRow[i] = preCol[j]; + preRW[i] = preCW[j]; + } else { + createOneEl(i, j); + } + } else if (i === 0 && j > 0) { + var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); + if (isNeedMergeCol === true) { + mergeCol(i, j); + preCol[j] = preRow[i]; + preCW[j] = preRW[i]; + } else { + createOneEl(i, j); + } + } else { + var isNeedMergeRow = o.mergeRule(map[i][j], map[i - 1][j]); + var isNeedMergeCol = o.mergeRule(map[i][j], map[i][j - 1]); + if (isNeedMergeCol && isNeedMergeRow) { + return; + } + if (isNeedMergeCol) { + mergeCol(i, j); + } + if (isNeedMergeRow) { + mergeRow(i, j); + } + if (!isNeedMergeCol && !isNeedMergeRow) { + createOneEl(i, j); + } + } + } else { + createOneEl(i, j); + } + }); + function mergeRow(i, j) { + var height = (preCol[j].attr("height") | 0) + rowSize + 1; + preCol[j].attr("height", height).css("height", height); + //preCW[j].element.css("height", height); + var rowspan = ((preCol[j].attr("rowspan") || 1) | 0) + 1; + preCol[j].attr("rowspan", rowspan); + preCol[j].__mergeRows.pushDistinct(i); + TDs[i][j] = preCol[j]; + Ws[i][j] = preCW[j]; + } + + function mergeCol(i, j) { + if (columnSize[j]) { + var width = preRow[i].attr("width") | 0; + if (width > 1.05 && columnSize[j]) { + width = width + columnSize[j] + 1; + if (j === columnSize.length - 1) { + width--; + } + } else { + width = width + columnSize[j] + } + width = self._calculateWidth(width); + preRow[i].attr("width", width).css("width", width); + preRW[i].element.width(width); + } + var colspan = ((preRow[i].attr("colspan") || 1) | 0) + 1; + preRow[i].attr("colspan", colspan); + preRow[i].__mergeCols.pushDistinct(j); + TDs[i][j] = preRow[i]; + Ws[i][j] = preRW[i]; + } + + function createOneEl(r, c) { + var width = self._calculateWidth(columnSize[c]); + if (width > 1.05 && c === columnSize.length - 1) { + width--; + } + var height = self._calculateHeight(rowSize); + var td = $("<td>").attr("height", height) + .attr("width", width).css({"width": width, "height": height, "position": "relative"}) + .addClass((c & 1) === 0 ? "odd-col" : "even-col") + .addClass(r === 0 ? "first-row" : "") + .addClass(c === 0 ? "first-col" : "") + .addClass(c === rows.length - 1 ? "last-col" : ""); + var w = BI.createWidget(map[r][c], { + type: "bi.table_cell", + textAlign: "left", + width: BI.isNumeric(width) ? width : "", + height: BI.isNumeric(height) ? height : "", + _row: r, + _col: c + start + }); + self.addWidget(w.getName(), w); + w._mount(); + w.element.css("position", "relative"); + td.append(w.element); + tr.append(td); + preCol[c] = td; + preCol[c].__mergeRows = [r]; + preCW[c] = w; + preRow[r] = td; + preRow[r].__mergeCols = [c]; + preRW[r] = w; + TDs[r][c] = td; + Ws[r][c] = w; + } + + frag.appendChild(tr[0]); + }); + return frag; + }, + + _createColGroupCells: function (columnSize, store) { + var self = this, o = this.options; + columnSize = columnSize || o.columnSize; + store = store || {}; + var frag = document.createDocumentFragment(); + BI.each(columnSize, function (i, size) { + var width = self._calculateWidth(size); + var col = $("<col>").attr("width", width).css("width", width); + store[i] = col; + frag.appendChild(col[0]); + }); + return frag; + }, + + _createHeaderCells: function (items, columnSize, mergeCols, TDs, Ws, start) { + var self = this, o = this.options; + start || (start = 0); + var frag = this._createCells(items, columnSize, BI.range(o.columnSize.length), TDs, Ws, start, o.headerRowSize || o.rowSize); + + return frag; + }, + + _createFooterCells: function (items, columnSize, TDs, Ws) { + var o = this.options; + var frag = this._createCells(items, columnSize, [], TDs, Ws, 0); + return frag; + }, + + _createColGroup: function (columnSize, store, widgets) { + var self = this, o = this.options; + this.colgroup = this._colgroup(); + this.colgroup.element.append(this._createColGroupCells(columnSize, store, widgets)); + return this.colgroup; + }, + + _createHeader: function () { + var self = this, o = this.options; + if (o.header === false) { + return; + } + this.header = this._header(); + this.header.element.append(this._createHeaderCells(o.header, null, null, this.headerTds, this.headerItems)); + return this.header; + }, + + _createFooter: function (columnSize, store, widgets) { + var self = this, o = this.options; + if (o.footer === false) { + return; + } + this.footer = this._footer(); + this.footer.element.append(this._createFooterCells(o.footer, null, this.footerTds, this.footerItems)); + return this.footer; + }, + + + _createBody: function () { + var self = this, o = this.options; + this.body = this._body(); + this.body.element.append(this._createCells(o.items, null, null, this.bodyTds, this.bodyItems)); + return this.body; + }, + + _createNormalTable: function () { + var self = this, o = this.options, table = this._table(); + this.colgroupTds = {}; + this.headerTds = {}; + this.footerTds = {}; + this.bodyTds = {}; + + this.headerItems = {}; + this.footerItems = {}; + this.bodyItems = {}; + var colgroup = this._createColGroup(null, this.colgroupTds); + var header = this._createHeader(); + var footer = this._createFooter(); + var body = this._createBody(); + + BI.createWidget({ + type: "bi.adaptive", + element: table, + items: [colgroup, header, footer, body] + }); + + var w = BI.sum(this.options.columnSize) || undefined; + w = this._calculateWidth(w); + if (BI.isNumeric(w) && w > 1) { + w += o.columnSize.length; + } + this.tableContainer = BI.createWidget({ + type: "bi.adaptive", + width: this._calculateWidth(w), + items: [table] + }); + + this.scrollBottomRight = BI.createWidget({ + type: "bi.adaptive", + width: "100%", + height: "100%", + cls: "scroll-bottom-right", + scrollable: true, + items: [this.tableContainer] + }); + + BI.createWidget({ + type: "bi.adaptive", + cls: "bottom-right", + element: this, + scrollable: false, + items: [this.scrollBottomRight] + }); + + this._initNormalScroll(); + BI.nextTick(function () { + if (self.element.is(":visible")) { + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT); + } + }); + }, + + _initNormalScroll: function () { + var self = this; + this.scrollBottomRight.element.scroll(function (e) { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL); + }); + }, + + _split: function (items) { + var o = this.options, left = [], right = [], isRight = this._isRightFreeze(); + BI.each(items, function (i, rows) { + left.push([]); + right.push([]); + BI.each(rows, function (j, cell) { + if (o.freezeCols.contains(j)) { + (isRight ? right : left)[i].push(cell); + } else { + (isRight ? left : right)[i].push(cell); + } + }) + }); + return { + left: left, + right: right + } + }, + + _table: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "table", + cls: "table", + attribute: {"cellspacing": 0, "cellpadding": 0} + }); + }, + + _header: function () { + return BI.createWidget({ + type: "bi.layout", + cls: "header", + tagName: "thead" + }); + }, + + _footer: function () { + return BI.createWidget({ + type: "bi.layout", + cls: "footer", + tagName: "tfoot" + }); + }, + + _body: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "tbody", + cls: "body" + }); + }, + + _colgroup: function () { + return BI.createWidget({ + type: "bi.layout", + tagName: "colgroup" + }); + }, + + _init: function () { + BI.Table.superclass._init.apply(this, arguments); + + this.populate(this.options.items); + }, + + setColumnSize: function (columnSize) { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + o.columnSize = columnSize || []; + if (o.isNeedFreeze) { + var columnLeft = []; + var columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + isRight ? columnRight.push(size) : columnLeft.push(size); + } else { + isRight ? columnLeft.push(size) : columnRight.push(size); + } + }); + var topleft = 0, topright = 1, bottomleft = 2, bottomright = 3; + var run = function (direction) { + var colgroupTds, bodyTds, bodyItems, sizes; + switch (direction) { + case topleft: + colgroupTds = self.topLeftColGroupTds; + bodyTds = self.topLeftBodyTds; + bodyItems = self.topLeftBodyItems; + sizes = columnLeft; + break; + case topright: + colgroupTds = self.topRightColGroupTds; + bodyTds = self.topRightBodyTds; + bodyItems = self.topRightBodyItems; + sizes = columnRight; + break; + case bottomleft: + colgroupTds = self.bottomLeftColGroupTds; + bodyTds = self.bottomLeftBodyTds; + bodyItems = self.bottomLeftBodyItems; + sizes = columnLeft; + break; + case bottomright: + colgroupTds = self.bottomRightColGroupTds; + bodyTds = self.bottomRightBodyTds; + bodyItems = self.bottomRightBodyItems; + sizes = columnRight; + break; + } + BI.each(colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (sizes[i] !== "" && width !== sizes[i]) { + var w = self._calculateWidth(sizes[i]); + colgroup.attr("width", w).css("width", w); + BI.each(bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(bodyItems, function (j, items) { + if (items[i]) { + if (bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }) + }; + run(topleft); + run(topright); + run(bottomleft); + run(bottomright); + + var lw = 0, rw = 0; + this.columnLeft = []; + this.columnRight = []; + BI.each(o.columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + lw += size; + self[isRight ? "columnRight" : "columnLeft"].push(size); + } else { + rw += size; + self[isRight ? "columnLeft" : "columnRight"].push(size); + } + }); + lw = this._calculateWidth(lw); + rw = this._calculateWidth(rw); + + if (BI.isNumeric(lw)) { + lw = BI.parseFloat(lw) + o.freezeCols.length; + } + if (BI.isNumeric(rw)) { + rw = BI.parseFloat(rw) + o.columnSize.length - o.freezeCols.length; + } + this.topLeftContainer.element.width(isRight ? rw : lw); + this.bottomLeftContainer.element.width(isRight ? rw : lw); + this.topRightContainer.element.width(isRight ? lw : rw); + this.bottomRightContainer.element.width(isRight ? lw : rw); + this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; + this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; + } else { + BI.each(this.colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (o.columnSize[i] !== "" && width !== o.columnSize[i]) { + var w = self._calculateWidth(o.columnSize[i]); + colgroup.attr("width", w).css("width", w); + BI.each(self.bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.headerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.footerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.bodyItems, function (j, items) { + if (items[i]) { + if (self.bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + BI.each(self.headerItems, function (j, items) { + if (items[i]) { + if (self.headerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.headerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.headerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + BI.each(self.footerItems, function (j, items) { + if (items[i]) { + if (self.footerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(o.columnSize, function (t, s) { + if (self.footerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.footerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }); + var w = this._calculateWidth(BI.sum(o.columnSize)); + if (w > 1.05) { + w += o.columnSize.length; + } + if (w > 1.05) { + this.tableContainer.element.width(w); + } + } + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + getCalculateColumnSize: function () { + var self = this, o = this.options; + var columnSize = []; + if (o.isNeedFreeze === true) { + if (BI.size(this.bottomLeftBodyTds) > 0 || BI.size(this.bottomRightBodyTds) > 0) { + if (!BI.any(this.bottomLeftBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.bottomLeftBodyTds[0], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.bottomLeftBodyTds[0]) - 1) { + width++; + } + columnSize.push(width); + }); + } + if (!BI.any(this.bottomRightBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.bottomRightBodyTds[0], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.bottomRightBodyTds[0]) - 1) { + width++; + } + columnSize.push(width); + }); + } + return columnSize; + } + if (!BI.any(this.topLeftBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.topLeftBodyTds[BI.size(self.topLeftBodyTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + if (!BI.any(this.topRightBodyTds, function (i, tds) { + if (!BI.any(tds, function (i, item) { + if (item.__mergeCols.length > 1) { + return true; + } + })) { + BI.each(tds, function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(tds) - 1) { + width++; + } + columnSize.push(width); + }); + return true; + } + })) { + BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.topRightBodyTds[BI.size(self.topRightBodyTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + } else { + BI.each(this.headerTds[BI.size(this.headerTds) - 1], function (i, item) { + var width = item.width() / item.__mergeCols.length; + if (i == BI.size(self.headerTds[BI.size(self.headerTds) - 1]) - 1) { + width++; + } + columnSize.push(width); + }); + } + return columnSize; + }, + + setHeaderColumnSize: function (columnSize) { + var self = this, o = this.options; + var isRight = this._isRightFreeze(); + if (o.isNeedFreeze) { + var columnLeft = []; + var columnRight = []; + BI.each(columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + isRight ? columnRight.push(size) : columnLeft.push(size); + } else { + isRight ? columnLeft.push(size) : columnRight.push(size); + } + }); + var topleft = 0, topright = 1; + var run = function (direction) { + var colgroupTds, bodyTds, bodyItems, sizes; + switch (direction) { + case topleft: + colgroupTds = self.topLeftColGroupTds; + bodyTds = self.topLeftBodyTds; + bodyItems = self.topLeftBodyItems; + sizes = columnLeft; + break; + case topright: + colgroupTds = self.topRightColGroupTds; + bodyTds = self.topRightBodyTds; + bodyItems = self.topRightBodyItems; + sizes = columnRight; + break; + } + BI.each(colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (width !== sizes[i]) { + var w = self._calculateWidth(sizes[i]); + colgroup.attr("width", w).css("width", w); + BI.each(bodyTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(bodyItems, function (j, items) { + if (items[i]) { + if (bodyTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(sizes, function (t, s) { + if (bodyTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += bodyTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }) + }; + run(topleft); + run(topright); + + var lw = 0, rw = 0; + BI.each(columnSize, function (i, size) { + if (o.freezeCols.contains(i)) { + lw += size; + } else { + rw += size; + } + }); + lw = this._calculateWidth(lw); + rw = this._calculateWidth(rw); + + if (BI.isNumeric(lw)) { + lw = BI.parseFloat(lw) + o.freezeCols.length; + } + if (BI.isNumeric(rw)) { + rw = BI.parseFloat(rw) + columnSize.length - o.freezeCols.length; + } + this.topLeftContainer.element.width(isRight ? rw : lw); + this.topRightContainer.element.width(isRight ? lw : rw); + this.scrollTopLeft.element[0].scrollLeft = this.scrollBottomLeft.element[0].scrollLeft; + this.scrollTopRight.element[0].scrollLeft = this.scrollBottomRight.element[0].scrollLeft; + } else { + BI.each(this.colgroupTds, function (i, colgroup) { + var width = colgroup.attr("width") | 0; + if (width !== columnSize[i]) { + var w = self._calculateWidth(columnSize[i]); + colgroup.attr("width", w).css("width", w); + BI.each(self.headerTds, function (j, items) { + if (items[i]) { + if (items[i].__mergeCols.length > 1) { + var wid = 0; + BI.each(columnSize, function (t, s) { + if (items[i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += items[i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].attr("width", "").css("width", ""); + } + } else { + if (i == BI.size(items) - 1) { + items[i].attr("width", w - 1).css("width", w - 1); + } else { + items[i].attr("width", w).css("width", w); + } + } + } + }); + BI.each(self.headerItems, function (j, items) { + if (items[i]) { + if (self.headerTds[j][i].__mergeCols.length > 1) { + var wid = 0; + BI.each(columnSize, function (t, s) { + if (self.headerTds[j][i].__mergeCols.contains(t)) { + wid += s; + } + }); + wid = self._calculateWidth(wid); + if (wid > 1) { + wid += self.headerTds[j][i].__mergeCols.length - 1; + } + if (BI.isNumeric(wid)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", wid - 1).css("width", wid - 1); + } else { + items[i].element.attr("width", wid).css("width", wid); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } else { + if (BI.isNumeric(w)) { + if (i == BI.size(items) - 1) { + items[i].element.attr("width", w - 1).css("width", w - 1); + } else { + items[i].element.attr("width", w).css("width", w); + } + } else { + items[i].element.attr("width", "").css("width", ""); + } + } + } + }); + } + }); + var cW = this._calculateWidth(BI.sum(columnSize)); + if (cW > 1.05) { + cW = cW + columnSize.length; + } + this.tableContainer.element.width(cW); + } + }, + + setRegionColumnSize: function (columnSize) { + var self = this, o = this.options; + o.regionColumnSize = columnSize; + if (o.freezeCols.length === 0) { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", this._isRightFreeze() ? ['fill', 0] : [0, 'fill']); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } else if (o.freezeCols.length > 0 && o.freezeCols.length < o.columnSize.length) { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", columnSize); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } else { + if (o.isNeedFreeze) { + this.partitions.attr("columnSize", this._isRightFreeze() ? [0, 'fill'] : ['fill', 0]); + this.partitions.resize(); + } else { + this.tableContainer.element.width(columnSize[0]); + } + } + }, + + getRegionColumnSize: function () { + return this.options.regionColumnSize; + }, + + getCalculateRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element.width(), this.scrollBottomRight.element.width()]; + } + return [this.scrollBottomRight.element.width()]; + }, + + getCalculateRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollTopRight.element.height(), this.scrollBottomRight.element.height()]; + } + return [this.scrollBottomRight.element.height()]; + }, + + getClientRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].clientWidth, this.scrollBottomRight.element[0].clientWidth]; + } + return [this.scrollBottomRight.element[0].clientWidth]; + }, + + getClientRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].clientHeight, this.scrollBottomRight.element[0].clientHeight]; + } + return [this.scrollBottomRight.element[0].clientHeight]; + }, + + getScrollRegionColumnSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + return [this.scrollBottomLeft.element[0].scrollWidth, this.scrollBottomRight.element[0].scrollWidth]; + } + return [this.scrollBottomRight.element[0].scrollWidth]; + }, + + getScrollRegionRowSize: function () { + var o = this.options; + if (o.isNeedFreeze) { + if (o.freezeCols.length < o.columnSize.length) { + return [this.scrollTopRight.element[0].scrollHeight, this.scrollBottomRight.element[0].scrollHeight]; + } else { + return [this.scrollTopLeft.element[0].scrollHeight, this.scrollBottomLeft.element[0].scrollHeight]; + } + } + return [this.scrollBottomRight.element[0].scrollHeight]; + }, + + hasVerticalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element.hasVerticalScroll() || this.scrollBottomLeft.element.hasVerticalScroll(); + } + return this.scrollBottomRight.element.hasVerticalScroll(); + }, + + setVerticalScroll: function (scrollTop) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { + this.scrollBottomRight.element[0].scrollTop = scrollTop; + } + if (this.scrollBottomLeft.element[0].scrollTop !== scrollTop) { + this.scrollBottomLeft.element[0].scrollTop = scrollTop; + } + } else { + if (this.scrollBottomRight.element[0].scrollTop !== scrollTop) { + this.scrollBottomRight.element[0].scrollTop = scrollTop; + } + } + }, + + setLeftHorizontalScroll: function (scrollLeft) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomLeft.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomLeft.element[0].scrollLeft = scrollLeft; + } + if (this.scrollTopLeft.element[0].scrollLeft !== scrollLeft) { + this.scrollTopLeft.element[0].scrollLeft = scrollLeft; + } + } else { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + } + }, + + setRightHorizontalScroll: function (scrollLeft) { + var o = this.options; + if (o.isNeedFreeze) { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + if (this.scrollTopRight.element[0].scrollLeft !== scrollLeft) { + this.scrollTopRight.element[0].scrollLeft = scrollLeft; + } + } else { + if (this.scrollBottomRight.element[0].scrollLeft !== scrollLeft) { + this.scrollBottomRight.element[0].scrollLeft = scrollLeft; + } + } + }, + + getVerticalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element[0].scrollTop || this.scrollBottomLeft.element[0].scrollTop; + } + return this.scrollBottomRight.element[0].scrollTop; + }, + + getLeftHorizontalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomLeft.element[0].scrollLeft; + } + return this.scrollBottomRight.element[0].scrollLeft; + }, + + getRightHorizontalScroll: function () { + var o = this.options; + if (o.isNeedFreeze) { + return this.scrollBottomRight.element[0].scrollLeft; + } + return this.scrollBottomRight.element[0].scrollLeft; + }, + + getColumns: function () { + var o = this.options; + if (o.isNeedFreeze) { + return { + topLeft: this.topLeftBodyItems, + topRight: this.topRightBodyItems, + bottomLeft: this.bottomLeftBodyItems, + bottomRight: this.bottomRightBodyItems + } + } else { + return { + header: this.headerItems, + body: this.bodyItems, + footer: this.footerItems + } + } + }, + + populate: function (items, header) { + this.options.items = items || []; + if (header) { + this.options.header = header; + } + this.empty(); + if (this.options.isNeedFreeze) { + this._createFreezeTable(); + } else { + this._createNormalTable(); + } + } +}) +; +BI.Table.EVENT_TABLE_AFTER_INIT = "EVENT_TABLE_AFTER_INIT"; +BI.Table.EVENT_TABLE_RESIZE = "EVENT_TABLE_RESIZE"; +BI.Table.EVENT_TABLE_SCROLL = "EVENT_TABLE_SCROLL"; +BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE = "EVENT_TABLE_BEFORE_COLUMN_RESIZE"; +BI.Table.EVENT_TABLE_COLUMN_RESIZE = "EVENT_TABLE_COLUMN_RESIZE"; +BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE"; + +BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE"; +BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE"; +BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE"; +BI.shortcut("bi.table_view", BI.Table); /** * * 表格单元格 @@ -32676,2853 +32676,2853 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, { this.cell.setHeight(o.height); } }); -BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/** - * - * 可调整列宽的grid表格 - * - * Created by GUY on 2016/1/12. - * @class BI.ResizableTable - * @extends BI.Widget - */ -BI.ResizableTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-resizable-table", - el: { - type: "bi.grid_table" - }, - isNeedFreeze: false, - isNeedResize: true, - isResizeAdapt: false, - headerRowSize: 25, - rowSize: 25, - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - freezeCols: [], - header: [], - items: [], - regionColumnSize: [] - }) - }, - - _init: function () { - BI.ResizableTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.resizer = BI.createWidget({ - type: "bi.layout", - cls: "resizable-table-resizer", - invisible: true, - width: 2 - }); - this.regionResizerHandler = this._createResizerHandler(); - this.table = BI.createWidget(o.el, { - type: "bi.grid_table", - element: this, - width: o.width, - height: o.height, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - columnSize: o.columnSize, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: BI.bind(this._mergeRule, this), - - header: this._formatHeader(o.header), - items: o.items, - regionColumnSize: o.regionColumnSize - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.regionResizerHandler, - left: 0, - top: 0, - bottom: 0 - }, { - el: this.resizer, - left: 0, - top: 0 - }] - }); - this._populate(); - }, - - _mergeRule: function (row1, row2) { - var o = this.options; - if (row1.type === "bi.resizable_table_cell") { - row1 = row1.cell; - } - if (row2.type === "bi.resizable_table_cell") { - row2 = row2.cell; - } - return o.mergeRule(row1, row2); - }, - - _createResizerHandler: function () { - var self = this, o = this.options; - var regionResizerHandler = BI.createWidget({ - type: "bi.absolute", - cls: "resizable-table-region-resizer", - invisible: true, - width: 6, - items: [{ - el: { - type: "bi.layout", - width: 2, - cls: "resizable-table-region-resizer-knob" - }, - left: 2, - top: 0, - bottom: 0 - }] - }); - var size = 0, offset = 0, defaultSize = 0, start = false; - var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { - if (mouseMoveTracker.isDragging()) { - start = true; - offset += deltaX; - size = BI.clamp(defaultSize + offset, 15, o.width - 15); - - self.regionResizerHandler.element.addClass("dragging"); - self._setRegionResizerHandlerPosition(size - 3, 0); - } - - }, function () { - if (start === true) { - o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15); - self.table.setRegionColumnSize(o.regionColumnSize); - if (o.isResizeAdapt === true) { - var freezeColumnSize = self._getFreezeColumnSize(); - o.columnSize[self._getFreezeColLength() - 1] += o.regionColumnSize[0] - freezeColumnSize; - self.table.setColumnSize(o.columnSize); - } - self.table.populate(); - self._populate(); - self.regionResizerHandler.element.removeClass("dragging"); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE); - start = false; - } - mouseMoveTracker.releaseMouseMoves(); - }, document); - regionResizerHandler.element.on("mousedown", function (event) { - defaultSize = size = self._getRegionSize(); - offset = 0; - self._setResizerPosition(0, 0); - mouseMoveTracker.captureMouseMoves(event); - }); - return regionResizerHandler; - }, - - _setResizerPosition: function (left, top) { - this.resizer.element.css({ - left: left + "px", - top: top + "px" - }); - }, - - _setRegionResizerHandlerPosition: function (left, top) { - this.regionResizerHandler.element.css({ - left: left + "px", - top: top + "px" - }); - }, - - _getRegionSize: function () { - var o = this.options; - var regionSize = o.regionColumnSize[0] || 0; - if (o.isNeedFreeze === false || o.freezeCols.length === 0) { - return 0; - } - if (!regionSize) { - BI.each(o.freezeCols, function (i, col) { - regionSize += o.columnSize[col]; - }); - } - return regionSize; - }, - - _getRegionRowSize: function () { - var o = this.options; - return [o.header.length * o.headerRowSize, - Math.min(o.height - o.header.length * o.headerRowSize, o.items.length * o.rowSize)]; - }, - - _getFreezeColLength: function () { - return this.options.freezeCols.length; - }, - - _getFreezeColumnSize: function () { - var columnSize = this.options.columnSize; - var sum = 0; - for (var i = 0, len = this._getFreezeColLength(); i < len; i++) { - sum += columnSize[i]; - } - return sum; - }, - - _getResizerLeft: function (j) { - var left = 0; - var columnSize = this.options.columnSize; - var freezeColLength = this._getFreezeColLength(); - for (var i = (j >= freezeColLength ? freezeColLength : 0); i < j; i++) { - left += columnSize[i] || 0; - } - if (j >= freezeColLength) { - left += this.table.getRegionSize(); - left -= this.table.getRightHorizontalScroll(); - } else { - left -= this.table.getLeftHorizontalScroll(); - } - return left; - }, - - _formatHeader: function (header) { - var self = this, o = this.options; - var result = []; - var resize = function (j, size) { - self.resizer.setVisible(true); - var height = o.headerRowSize + self._getRegionRowSize()[1]; - self.resizer.setHeight(height); - //TODO 不知道为什么加入这段代码会使得列宽调整出问题 - // if (o.minColumnSize[j]) { - // if (size === o.minColumnSize[j]) { - // self.resizer.element.addClass("suitable"); - // } else { - // self.resizer.element.removeClass("suitable"); - // } - // } - self._setResizerPosition(self._getResizerLeft(j) + size, (o.header.length - 1) * o.headerRowSize); - }; - var stop = function (j, size) { - self.resizer.setVisible(false); - var columnSize = o.columnSize.slice(); - columnSize[j] = size; - o.columnSize = columnSize; - self.table.setColumnSize(columnSize); - self.table.populate(); - self._populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE); - }; - BI.each(header, function (i, cols) { - if (i === header.length - 1) { - result[i] = []; - BI.each(cols, function (j, col) { - if (j === self._getFreezeColLength() - 1 || j === cols.length - 1) { - result[i][j] = col; - } else { - result[i][j] = { - type: "bi.resizable_table_cell", - cell: col, - suitableSize: o.minColumnSize[j], - maxSize: o.maxColumnSize[j], - resize: BI.bind(resize, null, j), - stop: BI.bind(stop, null, j) - }; - if (o.isNeedMerge) { - var r = i; - while (r > 0 && self._mergeRule(result[r][j], result[r - 1][j])) { - result[r - 1][j] = { - type: "bi.resizable_table_cell", - cell: result[r - 1][j], - suitableSize: o.minColumnSize[j], - maxSize: o.maxColumnSize[j], - resize: BI.bind(resize, null, j), - stop: BI.bind(stop, null, j) - }; - r--; - } - } - } - }); - } else { - result.push(cols); - } - }); - return result; - }, - - _populate: function () { - var o = this.options; - var regionSize = this._getRegionSize(); - if (regionSize > 0) { - this.regionResizerHandler.setVisible(true); - this._setRegionResizerHandlerPosition(regionSize - 3, 0); - } else { - this.regionResizerHandler.setVisible(false); - } - }, - - setWidth: function (width) { - BI.ResizableTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width) - }, - - setHeight: function (height) { - BI.ResizableTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this.table.setColumnSize(columnSize); - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function () { - BI.ResizableTable.superclass.attr.apply(this, arguments); - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header) { - if (items) { - this.options.items = items; - } - if (header) { - this.options.header = header; - if (this.options.isNeedResize) { - header = this._formatHeader(header); - } - } - this.table.populate(items, header); - this._populate(); - } -}); - -BI.shortcut("bi.resizable_table", BI.ResizableTable);/** - * - * 自定义树 - * - * Created by GUY on 2015/9/7. - * @class BI.CustomTree - * @extends BI.Single - */ -BI.CustomTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-custom-tree", - expander: { - el: {}, - popup: { - type: "bi.custom_tree" - } - }, - - items: [], - itemsCreator: BI.emptyFn, - - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - } - }) - }, - - _init: function () { - BI.CustomTree.superclass._init.apply(this, arguments); - this.initTree(this.options.items); - }, - - _formatItems: function (nodes) { - var self = this, o = this.options; - nodes = BI.Tree.transformToTreeFormat(nodes); - - var items = []; - BI.each(nodes, function (i, node) { - if (BI.isNotEmptyArray(node.children) || node.isParent === true) { - var item = BI.extend({ - type: "bi.expander", - el: {}, - popup: {type: "bi.custom_tree"} - }, BI.deepClone(o.expander), { - id: node.id, - pId: node.pId, - value: node.value - }); - var el = BI.stripEL(node); - if (!BI.isWidget(el)) { - el = BI.clone(el); - delete el.children; - BI.extend(item.el, el); - } else { - item.el = el; - } - item.popup.expander = BI.deepClone(o.expander); - item.items = item.popup.items = node.children; - item.itemsCreator = item.popup.itemsCreator = function (op) { - if (BI.isNotNull(op.node)) {//从子节点传过来的itemsCreator直接向上传递 - return o.itemsCreator.apply(self, arguments); - } - var args = Array.prototype.slice.call(arguments, 0); - args[0].node = node; - return o.itemsCreator.apply(self, args); - }; - BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el)); - items.push(item); - } else { - items.push(node); - } - }); - return items; - }, - - //构造树结构, - initTree: function (nodes) { - var self = this, o = this.options; - this.tree = BI.createWidget(o.el, { - element: this, - items: this._formatItems(nodes), - itemsCreator: function (op, callback) { - o.itemsCreator.apply(this, [op, function (items) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = self._formatItems(items); - callback.apply(null, args); - }]); - } - }); - this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj); - } - }) - }, - - //生成树方法 - stroke: function (nodes) { - this.populate.apply(this, arguments); - }, - - populate: function (nodes) { - var args = Array.prototype.slice.call(arguments, 0); - if (arguments.length > 0) { - args[0] = this._formatItems(nodes); - } - this.tree.populate.apply(this.tree, args); - }, - - setValue: function (v) { - this.tree && this.tree.setValue(v); - }, - - getValue: function () { - return this.tree ? this.tree.getValue() : []; - }, - - getAllButtons: function () { - return this.tree ? this.tree.getAllButtons() : []; - }, - - getAllLeaves: function () { - return this.tree ? this.tree.getAllLeaves() : []; - }, - - getNodeById: function (id) { - return this.tree && this.tree.getNodeById(id); - }, - - getNodeByValue: function (id) { - return this.tree && this.tree.getNodeByValue(id); - }, - - empty: function () { - this.tree.empty(); - } -}); -BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.custom_tree", BI.CustomTree);/* - * JQuery zTree core v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-06-18 - */ -(function($){ - var settings = {}, roots = {}, caches = {}, - //default consts of core - _consts = { - className: { - BUTTON: "button", - LEVEL: "level", - ICO_LOADING: "ico_loading", - SWITCH: "switch" - }, - event: { - NODECREATED: "ztree_nodeCreated", - CLICK: "ztree_click", - EXPAND: "ztree_expand", - COLLAPSE: "ztree_collapse", - ASYNC_SUCCESS: "ztree_async_success", - ASYNC_ERROR: "ztree_async_error", - REMOVE: "ztree_remove", - SELECTED: "ztree_selected", - UNSELECTED: "ztree_unselected" - }, - id: { - A: "_a", - ICON: "_ico", - SPAN: "_span", - SWITCH: "_switch", - UL: "_ul" - }, - line: { - ROOT: "root", - ROOTS: "roots", - CENTER: "center", - BOTTOM: "bottom", - NOLINE: "noline", - LINE: "line" - }, - folder: { - OPEN: "open", - CLOSE: "close", - DOCU: "docu" - }, - node: { - CURSELECTED: "curSelectedNode" - } - }, - //default setting of core - _setting = { - treeId: "", - treeObj: null, - view: { - addDiyDom: null, - autoCancelSelected: true, - dblClickExpand: true, - expandSpeed: "fast", - fontCss: {}, - nameIsHTML: false, - selectedMulti: true, - showIcon: true, - showLine: true, - showTitle: true, - txtSelectedEnable: false - }, - data: { - key: { - children: "children", - name: "name", - title: "", - url: "url" - }, - simpleData: { - enable: false, - idKey: "id", - pIdKey: "pId", - rootPId: null - }, - keep: { - parent: false, - leaf: false - } - }, - async: { - enable: false, - contentType: "application/x-www-form-urlencoded", - type: "post", - dataType: "text", - url: "", - autoParam: [], - otherParam: [], - dataFilter: null - }, - callback: { - beforeAsync:null, - beforeClick:null, - beforeDblClick:null, - beforeRightClick:null, - beforeMouseDown:null, - beforeMouseUp:null, - beforeExpand:null, - beforeCollapse:null, - beforeRemove:null, - - onAsyncError:null, - onAsyncSuccess:null, - onNodeCreated:null, - onClick:null, - onDblClick:null, - onRightClick:null, - onMouseDown:null, - onMouseUp:null, - onExpand:null, - onCollapse:null, - onRemove:null - } - }, - //default root of core - //zTree use root to save full data - _initRoot = function (setting) { - var r = data.getRoot(setting); - if (!r) { - r = {}; - data.setRoot(setting, r); - } - r[setting.data.key.children] = []; - r.expandTriggerFlag = false; - r.curSelectedList = []; - r.noSelection = true; - r.createdNodes = []; - r.zId = 0; - r._ver = (new Date()).getTime(); - }, - //default cache of core - _initCache = function(setting) { - var c = data.getCache(setting); - if (!c) { - c = {}; - data.setCache(setting, c); - } - c.nodes = []; - c.doms = []; - }, - //default bindEvent of core - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.NODECREATED, function (event, treeId, node) { - tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); - }); - - o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { - tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); - }); - - o.bind(c.EXPAND, function (event, treeId, node) { - tools.apply(setting.callback.onExpand, [event, treeId, node]); - }); - - o.bind(c.COLLAPSE, function (event, treeId, node) { - tools.apply(setting.callback.onCollapse, [event, treeId, node]); - }); - - o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { - tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); - }); - - o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { - tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); - }); - - o.bind(c.REMOVE, function (event, treeId, treeNode) { - tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); - }); - - o.bind(c.SELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onSelected, [srcEvent, treeId, node]); - }); - o.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.NODECREATED) - .unbind(c.CLICK) - .unbind(c.EXPAND) - .unbind(c.COLLAPSE) - .unbind(c.ASYNC_SUCCESS) - .unbind(c.ASYNC_ERROR) - .unbind(c.REMOVE) - .unbind(c.SELECTED) - .unbind(c.UNSELECTED); - }, - //default event proxy of core - _eventProxy = function(event) { - var target = event.target, - setting = data.getSetting(event.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null, - tmp = null; - - if (tools.eqs(event.type, "mousedown")) { - treeEventType = "mousedown"; - } else if (tools.eqs(event.type, "mouseup")) { - treeEventType = "mouseup"; - } else if (tools.eqs(event.type, "contextmenu")) { - treeEventType = "contextmenu"; - } else if (tools.eqs(event.type, "click")) { - if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "switchNode"; - } else { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "clickNode"; - } - } - } else if (tools.eqs(event.type, "dblclick")) { - treeEventType = "dblclick"; - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "switchNode"; - } - } - if (treeEventType.length > 0 && tId.length == 0) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) {tId = tools.getNodeMainDom(tmp).id;} - } - // event to node - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "switchNode" : - if (!node.isParent) { - nodeEventType = ""; - } else if (tools.eqs(event.type, "click") - || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { - nodeEventCallback = handler.onSwitchNode; - } else { - nodeEventType = ""; - } - break; - case "clickNode" : - nodeEventCallback = handler.onClickNode; - break; - } - } - // event to zTree - switch (treeEventType) { - case "mousedown" : - treeEventCallback = handler.onZTreeMousedown; - break; - case "mouseup" : - treeEventCallback = handler.onZTreeMouseup; - break; - case "dblclick" : - treeEventCallback = handler.onZTreeDblclick; - break; - case "contextmenu" : - treeEventCallback = handler.onZTreeContextmenu; - break; - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of core - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var r = data.getRoot(setting), - childKey = setting.data.key.children; - n.level = level; - n.tId = setting.treeId + "_" + (++r.zId); - n.parentTId = parentNode ? parentNode.tId : null; - n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; - if (n[childKey] && n[childKey].length > 0) { - n.isParent = true; - n.zAsync = true; - } else { - n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; - n.open = (n.isParent && !setting.async.enable) ? n.open : false; - n.zAsync = !n.isParent; - } - n.isFirstNode = isFirstNode; - n.isLastNode = isLastNode; - n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; - n.getPreNode = function() {return data.getPreNode(setting, n);}; - n.getNextNode = function() {return data.getNextNode(setting, n);}; - n.isAjaxing = false; - data.fixPIdKeyValue(setting, n); - }, - _init = { - bind: [_bindEvent], - unbind: [_unbindEvent], - caches: [_initCache], - nodes: [_initNode], - proxys: [_eventProxy], - roots: [_initRoot], - beforeA: [], - afterA: [], - innerBeforeA: [], - innerAfterA: [], - zTreeTools: [] - }, - //method of operate data - data = { - addNodeCache: function(setting, node) { - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; - }, - getNodeCacheId: function(tId) { - return tId.substring(tId.lastIndexOf("_")+1); - }, - addAfterA: function(afterA) { - _init.afterA.push(afterA); - }, - addBeforeA: function(beforeA) { - _init.beforeA.push(beforeA); - }, - addInnerAfterA: function(innerAfterA) { - _init.innerAfterA.push(innerAfterA); - }, - addInnerBeforeA: function(innerBeforeA) { - _init.innerBeforeA.push(innerBeforeA); - }, - addInitBind: function(bindEvent) { - _init.bind.push(bindEvent); - }, - addInitUnBind: function(unbindEvent) { - _init.unbind.push(unbindEvent); - }, - addInitCache: function(initCache) { - _init.caches.push(initCache); - }, - addInitNode: function(initNode) { - _init.nodes.push(initNode); - }, - addInitProxy: function(initProxy, isFirst) { - if (!!isFirst) { - _init.proxys.splice(0,0,initProxy); - } else { - _init.proxys.push(initProxy); - } - }, - addInitRoot: function(initRoot) { - _init.roots.push(initRoot); - }, - addNodesData: function(setting, parentNode, nodes) { - var childKey = setting.data.key.children; - if (!parentNode[childKey]) parentNode[childKey] = []; - if (parentNode[childKey].length > 0) { - parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; - view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); - } - parentNode.isParent = true; - parentNode[childKey] = parentNode[childKey].concat(nodes); - }, - addSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - if (!data.isSelectedNode(setting, node)) { - root.curSelectedList.push(node); - } - }, - addCreatedNode: function(setting, node) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - root.createdNodes.push(node); - } - }, - addZTreeTools: function(zTreeTools) { - _init.zTreeTools.push(zTreeTools); - }, - exSetting: function(s) { - $.extend(true, _setting, s); - }, - fixPIdKeyValue: function(setting, node) { - if (setting.data.simpleData.enable) { - node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; - } - }, - getAfterA: function(setting, node, array) { - for (var i=0, j=_init.afterA.length; i<j; i++) { - _init.afterA[i].apply(this, arguments); - } - }, - getBeforeA: function(setting, node, array) { - for (var i=0, j=_init.beforeA.length; i<j; i++) { - _init.beforeA[i].apply(this, arguments); - } - }, - getInnerAfterA: function(setting, node, array) { - for (var i=0, j=_init.innerAfterA.length; i<j; i++) { - _init.innerAfterA[i].apply(this, arguments); - } - }, - getInnerBeforeA: function(setting, node, array) { - for (var i=0, j=_init.innerBeforeA.length; i<j; i++) { - _init.innerBeforeA[i].apply(this, arguments); - } - }, - getCache: function(setting) { - return caches[setting.treeId]; - }, - getNextNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length-1; i<=l; i++) { - if (p[childKey][i] === node) { - return (i==l ? null : p[childKey][i+1]); - } - } - return null; - }, - getNodeByParam: function(setting, nodes, key, value) { - if (!nodes || !key) return null; - var childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i][key] == value) { - return nodes[i]; - } - var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value); - if (tmp) return tmp; - } - return null; - }, - getNodeCache: function(setting, tId) { - if (!tId) return null; - var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; - return n ? n : null; - }, - getNodeName: function(setting, node) { - var nameKey = setting.data.key.name; - return "" + node[nameKey]; - }, - getNodeTitle: function(setting, node) { - var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; - return "" + node[t]; - }, - getNodes: function(setting) { - return data.getRoot(setting)[setting.data.key.children]; - }, - getNodesByParam: function(setting, nodes, key, value) { - if (!nodes || !key) return []; - var childKey = setting.data.key.children, - result = []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i][key] == value) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByParamFuzzy: function(setting, nodes, key, value) { - if (!nodes || !key) return []; - var childKey = setting.data.key.children, - result = []; - value = value.toLowerCase(); - for (var i = 0, l = nodes.length; i < l; i++) { - if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { - if (!nodes) return (isSingle ? null : []); - var childKey = setting.data.key.children, - result = isSingle ? null : []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (tools.apply(filter, [nodes[i], invokeParam], false)) { - if (isSingle) {return nodes[i];} - result.push(nodes[i]); - } - var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); - if (isSingle && !!tmpResult) {return tmpResult;} - result = isSingle ? tmpResult : result.concat(tmpResult); - } - return result; - }, - getPreNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length; i<l; i++) { - if (p[childKey][i] === node) { - return (i==0 ? null : p[childKey][i-1]); - } - } - return null; - }, - getRoot: function(setting) { - return setting ? roots[setting.treeId] : null; - }, - getRoots: function() { - return roots; - }, - getSetting: function(treeId) { - return settings[treeId]; - }, - getSettings: function() { - return settings; - }, - getZTreeTools: function(treeId) { - var r = this.getRoot(this.getSetting(treeId)); - return r ? r.treeTools : null; - }, - initCache: function(setting) { - for (var i=0, j=_init.caches.length; i<j; i++) { - _init.caches[i].apply(this, arguments); - } - }, - initNode: function(setting, level, node, parentNode, preNode, nextNode) { - for (var i=0, j=_init.nodes.length; i<j; i++) { - _init.nodes[i].apply(this, arguments); - } - }, - initRoot: function(setting) { - for (var i=0, j=_init.roots.length; i<j; i++) { - _init.roots[i].apply(this, arguments); - } - }, - isSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - for (var i=0, j=root.curSelectedList.length; i<j; i++) { - if(node === root.curSelectedList[i]) return true; - } - return false; - }, - removeNodeCache: function(setting, node) { - var childKey = setting.data.key.children; - if (node[childKey]) { - for (var i=0, l=node[childKey].length; i<l; i++) { - arguments.callee(setting, node[childKey][i]); - } - } - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; - }, - removeSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - for (var i=0, j=root.curSelectedList.length; i<j; i++) { - if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { - root.curSelectedList.splice(i, 1); - i--;j--; - } - } - }, - setCache: function(setting, cache) { - caches[setting.treeId] = cache; - }, - setRoot: function(setting, root) { - roots[setting.treeId] = root; - }, - setZTreeTools: function(setting, zTreeTools) { - for (var i=0, j=_init.zTreeTools.length; i<j; i++) { - _init.zTreeTools[i].apply(this, arguments); - } - }, - transformToArrayFormat: function (setting, nodes) { - if (!nodes) return []; - var childKey = setting.data.key.children, - r = []; - if (tools.isArray(nodes)) { - for (var i=0, l=nodes.length; i<l; i++) { - r.push(nodes[i]); - if (nodes[i][childKey]) - r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey])); - } - } else { - r.push(nodes); - if (nodes[childKey]) - r = r.concat(data.transformToArrayFormat(setting, nodes[childKey])); - } - return r; - }, - transformTozTreeFormat: function(setting, sNodes) { - var i,l, - key = setting.data.simpleData.idKey, - parentKey = setting.data.simpleData.pIdKey, - childKey = setting.data.key.children; - if (!key || key=="" || !sNodes) return []; - - if (tools.isArray(sNodes)) { - var r = []; - var tmpMap = []; - for (i=0, l=sNodes.length; i<l; i++) { - tmpMap[sNodes[i][key]] = sNodes[i]; - } - for (i=0, l=sNodes.length; i<l; i++) { - if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) { - if (!tmpMap[sNodes[i][parentKey]][childKey]) - tmpMap[sNodes[i][parentKey]][childKey] = []; - tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]); - } else { - r.push(sNodes[i]); - } - } - return r; - }else { - return [sNodes]; - } - } - }, - //method of event proxy - event = { - bindEvent: function(setting) { - for (var i=0, j=_init.bind.length; i<j; i++) { - _init.bind[i].apply(this, arguments); - } - }, - unbindEvent: function(setting) { - for (var i=0, j=_init.unbind.length; i<j; i++) { - _init.unbind[i].apply(this, arguments); - } - }, - bindTree: function(setting) { - var eventParam = { - treeId: setting.treeId - }, - o = setting.treeObj; - if (!setting.view.txtSelectedEnable) { - // for can't select text - o.bind('selectstart', function(e){ - var node - var n = e.originalEvent.srcElement.nodeName.toLowerCase(); - return (n === "input" || n === "textarea" ); - }).css({ - "-moz-user-select":"-moz-none" - }); - } - o.bind('click', eventParam, event.proxy); - o.bind('dblclick', eventParam, event.proxy); - o.bind('mouseover', eventParam, event.proxy); - o.bind('mouseout', eventParam, event.proxy); - o.bind('mousedown', eventParam, event.proxy); - o.bind('mouseup', eventParam, event.proxy); - o.bind('contextmenu', eventParam, event.proxy); - }, - unbindTree: function(setting) { - var o = setting.treeObj; - o.unbind('click', event.proxy) - .unbind('dblclick', event.proxy) - .unbind('mouseover', event.proxy) - .unbind('mouseout', event.proxy) - .unbind('mousedown', event.proxy) - .unbind('mouseup', event.proxy) - .unbind('contextmenu', event.proxy); - }, - doProxy: function(e) { - var results = []; - for (var i=0, j=_init.proxys.length; i<j; i++) { - var proxyResult = _init.proxys[i].apply(this, arguments); - results.push(proxyResult); - if (proxyResult.stop) { - break; - } - } - return results; - }, - proxy: function(e) { - var setting = data.getSetting(e.data.treeId); - if (!tools.uCanDo(setting, e)) return true; - var results = event.doProxy(e), - r = true, x = false; - for (var i=0, l=results.length; i<l; i++) { - var proxyResult = results[i]; - if (proxyResult.nodeEventCallback) { - x = true; - r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; - } - if (proxyResult.treeEventCallback) { - x = true; - r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; - } - } - return r; - } - }, - //method of event handler - handler = { - onSwitchNode: function (event, node) { - var setting = data.getSetting(event.data.treeId); - if (node.open) { - if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; - data.getRoot(setting).expandTriggerFlag = true; - view.switchNode(setting, node); - } else { - if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; - data.getRoot(setting).expandTriggerFlag = true; - view.switchNode(setting, node); - } - return true; - }, - onClickNode: function (event, node) { - var setting = data.getSetting(event.data.treeId), - clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; - if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; - if (clickFlag === 0) { - view.cancelPreSelectedNode(setting, node); - } else { - view.selectNode(setting, node, clickFlag === 2); - } - setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); - return true; - }, - onZTreeMousedown: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { - tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); - } - return true; - }, - onZTreeMouseup: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { - tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); - } - return true; - }, - onZTreeDblclick: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { - tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); - } - return true; - }, - onZTreeContextmenu: function(event, node) { - var setting = data.getSetting(event.data.treeId); - if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { - tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); - } - return (typeof setting.callback.onRightClick) != "function"; - } - }, - //method of tools for zTree - tools = { - apply: function(fun, param, defaultValue) { - if ((typeof fun) == "function") { - return fun.apply(zt, param?param:[]); - } - return defaultValue; - }, - canAsync: function(setting, node) { - var childKey = setting.data.key.children; - return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0))); - }, - clone: function (obj){ - if (obj === null) return null; - var o = tools.isArray(obj) ? [] : {}; - for(var i in obj){ - o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); - } - return o; - }, - eqs: function(str1, str2) { - return str1.toLowerCase() === str2.toLowerCase(); - }, - isArray: function(arr) { - return Object.prototype.toString.apply(arr) === "[object Array]"; - }, - $: function(node, exp, setting) { - if (!!exp && typeof exp != "string") { - setting = exp; - exp = ""; - } - if (typeof node == "string") { - return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); - } else { - return $("#" + node.tId + exp, setting ? setting.treeObj : null); - } - }, - getMDom: function (setting, curDom, targetExpr) { - if (!curDom) return null; - while (curDom && curDom.id !== setting.treeId) { - for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) { - if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { - return curDom; - } - } - curDom = curDom.parentNode; - } - return null; - }, - getNodeMainDom:function(target) { - return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); - }, - isChildOrSelf: function(dom, parentId) { - return ( $(dom).closest("#" + parentId).length> 0 ); - }, - uCanDo: function(setting, e) { - return true; - } - }, - //method of operate ztree dom - view = { - addNodes: function(setting, parentNode, newNodes, isSilent) { - if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { - return; - } - if (!tools.isArray(newNodes)) { - newNodes = [newNodes]; - } - if (setting.data.simpleData.enable) { - newNodes = data.transformTozTreeFormat(setting, newNodes); - } - if (parentNode) { - var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), - target_icoObj = $$(parentNode, consts.id.ICON, setting), - target_ulObj = $$(parentNode, consts.id.UL, setting); - - if (!parentNode.open) { - view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); - view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); - parentNode.open = false; - target_ulObj.css({ - "display": "none" - }); - } - - data.addNodesData(setting, parentNode, newNodes); - view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); - if (!isSilent) { - view.expandCollapseParentNode(setting, parentNode, true); - } - } else { - data.addNodesData(setting, data.getRoot(setting), newNodes); - view.createNodes(setting, 0, newNodes, null); - } - }, - appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { - if (!nodes) return []; - var html = [], - childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - var node = nodes[i]; - if (initFlag) { - var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), - tmpPChild = tmpPNode[childKey], - isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), - isLastNode = (i == (nodes.length - 1)); - data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); - data.addNodeCache(setting, node); - } - - var childHtml = []; - if (node[childKey] && node[childKey].length > 0) { - //make child html first, because checkType - childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); - } - if (openFlag) { - - view.makeDOMNodeMainBefore(html, setting, node); - view.makeDOMNodeLine(html, setting, node); - data.getBeforeA(setting, node, html); - view.makeDOMNodeNameBefore(html, setting, node); - data.getInnerBeforeA(setting, node, html); - view.makeDOMNodeIcon(html, setting, node); - data.getInnerAfterA(setting, node, html); - view.makeDOMNodeNameAfter(html, setting, node); - data.getAfterA(setting, node, html); - if (node.isParent && node.open) { - view.makeUlHtml(setting, node, html, childHtml.join('')); - } - view.makeDOMNodeMainAfter(html, setting, node); - data.addCreatedNode(setting, node); - } - } - return html; - }, - appendParentULDom: function(setting, node) { - var html = [], - nObj = $$(node, setting); - if (!nObj.get(0) && !!node.parentTId) { - view.appendParentULDom(setting, node.getParentNode()); - nObj = $$(node, setting); - } - var ulObj = $$(node, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.remove(); - } - var childKey = setting.data.key.children, - childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); - view.makeUlHtml(setting, node, html, childHtml.join('')); - nObj.append(html.join('')); - }, - asyncNode: function(setting, node, isSilent, callback) { - var i, l; - if (node && !node.isParent) { - tools.apply(callback); - return false; - } else if (node && node.isAjaxing) { - return false; - } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { - tools.apply(callback); - return false; - } - if (node) { - node.isAjaxing = true; - var icoObj = $$(node, consts.id.ICON, setting); - icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); - } - - var tmpParam = {}; - for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { - var pKey = setting.async.autoParam[i].split("="), spKey = pKey; - if (pKey.length>1) { - spKey = pKey[1]; - pKey = pKey[0]; - } - tmpParam[spKey] = node[pKey]; - } - if (tools.isArray(setting.async.otherParam)) { - for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { - tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; - } - } else { - for (var p in setting.async.otherParam) { - tmpParam[p] = setting.async.otherParam[p]; - } - } - - var _tmpV = data.getRoot(setting)._ver; - $.ajax({ - contentType: setting.async.contentType, - cache: false, - type: setting.async.type, - url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), - data: tmpParam, - dataType: setting.async.dataType, - success: function(msg) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - var newNodes = []; - try { - if (!msg || msg.length == 0) { - newNodes = []; - } else if (typeof msg == "string") { - newNodes = eval("(" + msg + ")"); - } else { - newNodes = msg; - } - } catch(err) { - newNodes = msg; - } - - if (node) { - node.isAjaxing = null; - node.zAsync = true; - } - view.setNodeLineIcos(setting, node); - if (newNodes && newNodes !== "") { - newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); - view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); - } else { - view.addNodes(setting, node, [], !!isSilent); - } - setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); - tools.apply(callback); - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - if (node) node.isAjaxing = null; - view.setNodeLineIcos(setting, node); - setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); - } - }); - return true; - }, - cancelPreSelectedNode: function (setting, node, excludeNode) { - var list = data.getRoot(setting).curSelectedList, - i, n; - for (i=list.length-1; i>=0; i--) { - n = list[i]; - if (node === n || (!node && (!excludeNode || excludeNode !== n))) { - $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); - if (node) { - data.removeSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - break; - } else { - list.splice(i, 1); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - } - } - } - }, - createNodeCallback: function(setting) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - while (root.createdNodes.length>0) { - var node = root.createdNodes.shift(); - tools.apply(setting.view.addDiyDom, [setting.treeId, node]); - if (!!setting.callback.onNodeCreated) { - setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); - } - } - } - }, - createNodes: function(setting, level, nodes, parentNode) { - if (!nodes || nodes.length == 0) return; - var root = data.getRoot(setting), - childKey = setting.data.key.children, - openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); - root.createdNodes = []; - var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); - if (!parentNode) { - setting.treeObj.append(zTreeHtml.join('')); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.append(zTreeHtml.join('')); - } - } - view.createNodeCallback(setting); - }, - destroy: function(setting) { - if (!setting) return; - data.initCache(setting); - data.initRoot(setting); - event.unbindTree(setting); - event.unbindEvent(setting); - setting.treeObj.empty(); - delete settings[setting.treeId]; - }, - expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (!node) { - tools.apply(callback, []); - return; - } - if (root.expandTriggerFlag) { - var _callback = callback; - callback = function(){ - if (_callback) _callback(); - if (node.open) { - setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); - } else { - setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); - } - }; - root.expandTriggerFlag = false; - } - if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { - view.appendParentULDom(setting, node); - view.createNodeCallback(setting); - } - if (node.open == expandFlag) { - tools.apply(callback, []); - return; - } - var ulObj = $$(node, consts.id.UL, setting), - switchObj = $$(node, consts.id.SWITCH, setting), - icoObj = $$(node, consts.id.ICON, setting); - - if (node.isParent) { - node.open = !node.open; - if (node.iconOpen && node.iconClose) { - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - } - - if (node.open) { - view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); - view.replaceIcoClass(node, icoObj, consts.folder.OPEN); - if (animateFlag == false || setting.view.expandSpeed == "") { - ulObj.show(); - tools.apply(callback, []); - } else { - if (node[childKey] && node[childKey].length > 0) { - ulObj.slideDown(setting.view.expandSpeed, callback); - } else { - ulObj.show(); - tools.apply(callback, []); - } - } - } else { - view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); - view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); - if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { - ulObj.hide(); - tools.apply(callback, []); - } else { - ulObj.slideUp(setting.view.expandSpeed, callback); - } - } - } else { - tools.apply(callback, []); - } - }, - expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { - if (!node) return; - if (!node.parentTId) { - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); - return; - } else { - view.expandCollapseNode(setting, node, expandFlag, animateFlag); - } - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); - } - }, - expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - treeNodes = (node) ? node[childKey]: root[childKey], - selfAnimateSign = (node) ? false : animateFlag, - expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; - data.getRoot(setting).expandTriggerFlag = false; - if (treeNodes) { - for (var i = 0, l = treeNodes.length; i < l; i++) { - if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); - } - } - data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); - }, - isSelectedNode: function (setting, node) { - if (!node) { - return false; - } - var list = data.getRoot(setting).curSelectedList, - i; - for (i=list.length-1; i>=0; i--) { - if (node === list[i]) { - return true; - } - } - return false; - }, - makeDOMNodeIcon: function(html, setting, node) { - var nameStr = data.getNodeName(setting, node), - name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); - html.push("<span id='", node.tId, consts.id.ICON, - "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), - "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, - "'>",name,"</span>"); - }, - makeDOMNodeLine: function(html, setting, node) { - html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>"); - }, - makeDOMNodeMainAfter: function(html, setting, node) { - html.push("</li>"); - }, - makeDOMNodeMainBefore: function(html, setting, node) { - html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>"); - }, - makeDOMNodeNameAfter: function(html, setting, node) { - html.push("</a>"); - }, - makeDOMNodeNameBefore: function(html, setting, node) { - var title = data.getNodeTitle(setting, node), - url = view.makeNodeUrl(setting, node), - fontcss = view.makeNodeFontCss(setting, node), - fontStyle = []; - for (var f in fontcss) { - fontStyle.push(f, ":", fontcss[f], ";"); - } - html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''), - "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), - "'"); - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");} - html.push(">"); - }, - makeNodeFontCss: function(setting, node) { - var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); - return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; - }, - makeNodeIcoClass: function(setting, node) { - var icoCss = ["ico"]; - if (!node.isAjaxing) { - icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; - if (node.isParent) { - icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - icoCss.push(consts.folder.DOCU); - } - } - return consts.className.BUTTON + " " + icoCss.join('_'); - }, - makeNodeIcoStyle: function(setting, node) { - var icoStyle = []; - if (!node.isAjaxing) { - var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; - if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); - if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { - icoStyle.push("width:0px;height:0px;"); - } - } - return icoStyle.join(''); - }, - makeNodeLineClass: function(setting, node) { - var lineClass = []; - if (setting.view.showLine) { - if (node.level == 0 && node.isFirstNode && node.isLastNode) { - lineClass.push(consts.line.ROOT); - } else if (node.level == 0 && node.isFirstNode) { - lineClass.push(consts.line.ROOTS); - } else if (node.isLastNode) { - lineClass.push(consts.line.BOTTOM); - } else { - lineClass.push(consts.line.CENTER); - } - } else { - lineClass.push(consts.line.NOLINE); - } - if (node.isParent) { - lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - lineClass.push(consts.folder.DOCU); - } - return view.makeNodeLineClassEx(node) + lineClass.join('_'); - }, - makeNodeLineClassEx: function(node) { - return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; - }, - makeNodeTarget: function(node) { - return (node.target || "_blank"); - }, - makeNodeUrl: function(setting, node) { - var urlKey = setting.data.key.url; - return node[urlKey] ? node[urlKey] : null; - }, - makeUlHtml: function(setting, node, html, content) { - html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>"); - html.push(content); - html.push("</ul>"); - }, - makeUlLineClass: function(setting, node) { - return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); - }, - removeChildNodes: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - nodes = node[childKey]; - if (!nodes) return; - - for (var i = 0, l = nodes.length; i < l; i++) { - data.removeNodeCache(setting, nodes[i]); - } - data.removeSelectedNode(setting); - delete node[childKey]; - - if (!setting.data.keep.parent) { - node.isParent = false; - node.open = false; - var tmp_switchObj = $$(node, consts.id.SWITCH, setting), - tmp_icoObj = $$(node, consts.id.ICON, setting); - view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); - $$(node, consts.id.UL, setting).remove(); - } else { - $$(node, consts.id.UL, setting).empty(); - } - }, - setFirstNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][0].isFirstNode = true; - } - }, - setLastNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][childLength - 1].isLastNode = true; - } - }, - removeNode: function(setting, node) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : root; - - node.isFirstNode = false; - node.isLastNode = false; - node.getPreNode = function() {return null;}; - node.getNextNode = function() {return null;}; - - if (!data.getNodeCache(setting, node.tId)) { - return; - } - - $$(node, setting).remove(); - data.removeNodeCache(setting, node); - data.removeSelectedNode(setting, node); - - for (var i = 0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i].tId == node.tId) { - parentNode[childKey].splice(i, 1); - break; - } - } - view.setFirstNode(setting, parentNode); - view.setLastNode(setting, parentNode); - - var tmp_ulObj,tmp_switchObj,tmp_icoObj, - childLength = parentNode[childKey].length; - - //repair nodes old parent - if (!setting.data.keep.parent && childLength == 0) { - //old parentNode has no child nodes - parentNode.isParent = false; - parentNode.open = false; - tmp_ulObj = $$(parentNode, consts.id.UL, setting); - tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); - tmp_icoObj = $$(parentNode, consts.id.ICON, setting); - view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (setting.view.showLine && childLength > 0) { - //old parentNode has child nodes - var newLast = parentNode[childKey][childLength - 1]; - tmp_ulObj = $$(newLast, consts.id.UL, setting); - tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); - tmp_icoObj = $$(newLast, consts.id.ICON, setting); - if (parentNode == root) { - if (parentNode[childKey].length == 1) { - //node was root, and ztree has only one root after move node - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); - } else { - var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); - view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - } else { - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - tmp_ulObj.removeClass(consts.line.LINE); - } - }, - replaceIcoClass: function(node, obj, newName) { - if (!obj || node.isAjaxing) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[tmpList.length-1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - }, - replaceSwitchClass: function(node, obj, newName) { - if (!obj) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.line.ROOT: - case consts.line.ROOTS: - case consts.line.CENTER: - case consts.line.BOTTOM: - case consts.line.NOLINE: - tmpList[0] = view.makeNodeLineClassEx(node) + newName; - break; - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - if (newName !== consts.folder.DOCU) { - obj.removeAttr("disabled"); - } else { - obj.attr("disabled", "disabled"); - } - }, - selectNode: function(setting, node, addFlag) { - if (!addFlag) { - view.cancelPreSelectedNode(setting, null, node); - } - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); - data.addSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); - }, - setNodeFontCss: function(setting, treeNode) { - var aObj = $$(treeNode, consts.id.A, setting), - fontCss = view.makeNodeFontCss(setting, treeNode); - if (fontCss) { - aObj.css(fontCss); - } - }, - setNodeLineIcos: function(setting, node) { - if (!node) return; - var switchObj = $$(node, consts.id.SWITCH, setting), - ulObj = $$(node, consts.id.UL, setting), - icoObj = $$(node, consts.id.ICON, setting), - ulLine = view.makeUlLineClass(setting, node); - if (ulLine.length==0) { - ulObj.removeClass(consts.line.LINE); - } else { - ulObj.addClass(ulLine); - } - switchObj.attr("class", view.makeNodeLineClass(setting, node)); - if (node.isParent) { - switchObj.removeAttr("disabled"); - } else { - switchObj.attr("disabled", "disabled"); - } - icoObj.removeAttr("style"); - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - icoObj.attr("class", view.makeNodeIcoClass(setting, node)); - }, - setNodeName: function(setting, node) { - var title = data.getNodeTitle(setting, node), - nObj = $$(node, consts.id.SPAN, setting); - nObj.empty(); - if (setting.view.nameIsHTML) { - nObj.html(data.getNodeName(setting, node)); - } else { - nObj.text(data.getNodeName(setting, node)); - } - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("title", !title ? "" : title); - } - }, - setNodeTarget: function(setting, node) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("target", view.makeNodeTarget(node)); - }, - setNodeUrl: function(setting, node) { - var aObj = $$(node, consts.id.A, setting), - url = view.makeNodeUrl(setting, node); - if (url == null || url.length == 0) { - aObj.removeAttr("href"); - } else { - aObj.attr("href", url); - } - }, - switchNode: function(setting, node) { - if (node.open || !tools.canAsync(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - } else if (setting.async.enable) { - if (!view.asyncNode(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - return; - } - } else if (node) { - view.expandCollapseNode(setting, node, !node.open); - } - } - }; - // zTree defind - $.fn.zTree = { - consts : _consts, - _z : { - tools: tools, - view: view, - event: event, - data: data - }, - getZTreeObj: function(treeId) { - var o = data.getZTreeTools(treeId); - return o ? o : null; - }, - destroy: function(treeId) { - if (!!treeId && treeId.length > 0) { - view.destroy(data.getSetting(treeId)); - } else { - for(var s in settings) { - view.destroy(settings[s]); - } - } - }, - init: function(obj, zSetting, zNodes) { - var setting = tools.clone(_setting); - $.extend(true, setting, zSetting); - setting.treeId = obj.attr("id"); - setting.treeObj = obj; - setting.treeObj.empty(); - settings[setting.treeId] = setting; - //For some older browser,(e.g., ie6) - if(typeof document.body.style.maxHeight === "undefined") { - setting.view.expandSpeed = ""; - } - data.initRoot(setting); - var root = data.getRoot(setting), - childKey = setting.data.key.children; - zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; - if (setting.data.simpleData.enable) { - root[childKey] = data.transformTozTreeFormat(setting, zNodes); - } else { - root[childKey] = zNodes; - } - - data.initCache(setting); - event.unbindTree(setting); - event.bindTree(setting); - event.unbindEvent(setting); - event.bindEvent(setting); - - var zTreeTools = { - setting : setting, - addNodes : function(parentNode, newNodes, isSilent) { - if (!newNodes) return null; - if (!parentNode) parentNode = null; - if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; - var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); - function addCallback() { - view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); - } - - if (tools.canAsync(setting, parentNode)) { - view.asyncNode(setting, parentNode, isSilent, addCallback); - } else { - addCallback(); - } - return xNewNodes; - }, - cancelSelectedNode : function(node) { - view.cancelPreSelectedNode(setting, node); - }, - destroy : function() { - view.destroy(setting); - }, - expandAll : function(expandFlag) { - expandFlag = !!expandFlag; - view.expandCollapseSonNode(setting, null, expandFlag, true); - return expandFlag; - }, - expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { - if (!node || !node.isParent) return null; - if (expandFlag !== true && expandFlag !== false) { - expandFlag = !node.open; - } - callbackFlag = !!callbackFlag; - - if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { - return null; - } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { - return null; - } - if (expandFlag && node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); - } - if (expandFlag === node.open && !sonSign) { - return null; - } - - data.getRoot(setting).expandTriggerFlag = callbackFlag; - if (!tools.canAsync(setting, node) && sonSign) { - view.expandCollapseSonNode(setting, node, expandFlag, true, function() { - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - }); - } else { - node.open = !expandFlag; - view.switchNode(this.setting, node); - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - } - return expandFlag; - }, - getNodes : function() { - return data.getNodes(setting); - }, - getNodeByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodeByTId : function(tId) { - return data.getNodeCache(setting, tId); - }, - getNodesByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByParamFuzzy : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { - isSingle = !!isSingle; - if (!filter || (typeof filter != "function")) return (isSingle ? null : []); - return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); - }, - getNodeIndex : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i] == node) return i; - } - return -1; - }, - getSelectedNodes : function() { - var r = [], list = data.getRoot(setting).curSelectedList; - for (var i=0, l=list.length; i<l; i++) { - r.push(list[i]); - } - return r; - }, - isSelectedNode : function(node) { - return data.isSelectedNode(setting, node); - }, - reAsyncChildNodes : function(parentNode, reloadType, isSilent) { - if (!this.setting.async.enable) return; - var isRoot = !parentNode; - if (isRoot) { - parentNode = data.getRoot(setting); - } - if (reloadType=="refresh") { - var childKey = this.setting.data.key.children; - for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) { - data.removeNodeCache(setting, parentNode[childKey][i]); - } - data.removeSelectedNode(setting); - parentNode[childKey] = []; - if (isRoot) { - this.setting.treeObj.empty(); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - ulObj.empty(); - } - } - view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent); - }, - refresh : function() { - this.setting.treeObj.empty(); - var root = data.getRoot(setting), - nodes = root[setting.data.key.children] - data.initRoot(setting); - root[setting.data.key.children] = nodes - data.initCache(setting); - view.createNodes(setting, 0, root[setting.data.key.children]); - }, - removeChildNodes : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - nodes = node[childKey]; - view.removeChildNodes(setting, node); - return nodes ? nodes : null; - }, - removeNode : function(node, callbackFlag) { - if (!node) return; - callbackFlag = !!callbackFlag; - if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; - view.removeNode(setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); - } - }, - selectNode : function(node, addFlag) { - if (!node) return; - if (tools.uCanDo(setting)) { - addFlag = setting.view.selectedMulti && addFlag; - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() { - try{$$(node, setting).focus().blur();}catch(e){} - }); - } else { - try{$$(node, setting).focus().blur();}catch(e){} - } - view.selectNode(setting, node, addFlag); - } - }, - transformTozTreeNodes : function(simpleNodes) { - return data.transformTozTreeFormat(setting, simpleNodes); - }, - transformToArray : function(nodes) { - return data.transformToArrayFormat(setting, nodes); - }, - updateNode : function(node, checkTypeFlag) { - if (!node) return; - var nObj = $$(node, setting); - if (nObj.get(0) && tools.uCanDo(setting)) { - view.setNodeName(setting, node); - view.setNodeTarget(setting, node); - view.setNodeUrl(setting, node); - view.setNodeLineIcos(setting, node); - view.setNodeFontCss(setting, node); - } - } - } - root.treeTools = zTreeTools; - data.setZTreeTools(setting, zTreeTools); - - if (root[childKey] && root[childKey].length > 0) { - view.createNodes(setting, 0, root[childKey]); - } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { - view.asyncNode(setting); - } - return zTreeTools; - } - }; - - var zt = $.fn.zTree, - $$ = tools.$, - consts = zt.consts; -})(jQuery);/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-06-18 - */ -(function($){ - //default consts of excheck - var _consts = { - event: { - CHECK: "ztree_check" - }, - id: { - CHECK: "_check" - }, - checkbox: { - STYLE: "checkbox", - DEFAULT: "chk", - DISABLED: "disable", - FALSE: "false", - TRUE: "true", - FULL: "full", - PART: "part", - FOCUS: "focus" - }, - radio: { - STYLE: "radio", - TYPE_ALL: "all", - TYPE_LEVEL: "level" - } - }, - //default setting of excheck - _setting = { - check: { - enable: false, - autoCheckTrigger: false, - chkStyle: _consts.checkbox.STYLE, - nocheckInherit: false, - chkDisabledInherit: false, - radioType: _consts.radio.TYPE_LEVEL, - chkboxType: { - "Y": "ps", - "N": "ps" - } - }, - data: { - key: { - checked: "checked" - } - }, - callback: { - beforeCheck:null, - onCheck:null - } - }, - //default root of excheck - _initRoot = function (setting) { - var r = data.getRoot(setting); - r.radioCheckedList = []; - }, - //default cache of excheck - _initCache = function(treeId) {}, - //default bind event of excheck - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.CHECK, function (event, srcEvent, treeId, node) { - event.srcEvent = srcEvent; - tools.apply(setting.callback.onCheck, [event, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.CHECK); - }, - //default event proxy of excheck - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null; - - if (tools.eqs(e.type, "mouseover")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoverCheck"; - } - } else if (tools.eqs(e.type, "mouseout")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoutCheck"; - } - } else if (tools.eqs(e.type, "click")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "checkNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "checkNode" : - nodeEventCallback = _handler.onCheckNode; - break; - case "mouseoverCheck" : - nodeEventCallback = _handler.onMouseoverCheck; - break; - case "mouseoutCheck" : - nodeEventCallback = _handler.onMouseoutCheck; - break; - } - } - var proxyResult = { - stop: nodeEventType === "checkNode", - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of excheck - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var checkedKey = setting.data.key.checked; - if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); - n[checkedKey] = !!n[checkedKey]; - n.checkedOld = n[checkedKey]; - if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); - n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); - if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); - n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); - if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); - n.halfCheck = !!n.halfCheck; - n.check_Child_State = -1; - n.check_Focus = false; - n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; - - if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { - var r = data.getRoot(setting); - r.radioCheckedList.push(n); - } - }, - //add dom for check - _beforeA = function(setting, node, html) { - var checkedKey = setting.data.key.checked; - if (setting.check.enable) { - data.makeChkFlag(setting, node); - html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>"); - } - }, - //update zTreeObj, add method of check - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { - var checkedKey = this.setting.data.key.checked; - if (node.chkDisabled === true) return; - if (checked !== true && checked !== false) { - checked = !node[checkedKey]; - } - callbackFlag = !!callbackFlag; - - if (node[checkedKey] === checked && !checkTypeFlag) { - return; - } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { - return; - } - if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { - node[checkedKey] = checked; - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); - } - } - } - - zTreeTools.checkAllNodes = function(checked) { - view.repairAllChk(this.setting, !!checked); - } - - zTreeTools.getCheckedNodes = function(checked) { - var childKey = this.setting.data.key.children; - checked = (checked !== false); - return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); - } - - zTreeTools.getChangeCheckedNodes = function() { - var childKey = this.setting.data.key.children; - return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); - } - - zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { - disabled = !!disabled; - inheritParent = !!inheritParent; - inheritChildren = !!inheritChildren; - view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); - view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); - } - - var _updateNode = zTreeTools.updateNode; - zTreeTools.updateNode = function(node, checkTypeFlag) { - if (_updateNode) _updateNode.apply(zTreeTools, arguments); - if (!node || !this.setting.check.enable) return; - var nObj = $$(node, this.setting); - if (nObj.get(0) && tools.uCanDo(this.setting)) { - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - } - } - }, - //method of operate data - _data = { - getRadioCheckedList: function(setting) { - var checkedList = data.getRoot(setting).radioCheckedList; - for (var i=0, j=checkedList.length; i<j; i++) { - if(!data.getNodeCache(setting, checkedList[i].tId)) { - checkedList.splice(i, 1); - i--; j--; - } - } - return checkedList; - }, - getCheckStatus: function(setting, node) { - if (!setting.check.enable || node.nocheck || node.chkDisabled) return null; - var checkedKey = setting.data.key.checked, - r = { - checked: node[checkedKey], - half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) - }; - return r; - }, - getTreeCheckedNodes: function(setting, nodes, checked, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { - results.push(nodes[i]); - if(onlyOne) { - break; - } - } - data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); - if(onlyOne && results.length > 0) { - break; - } - } - return results; - }, - getTreeChangeCheckedNodes: function(setting, nodes, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked; - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { - results.push(nodes[i]); - } - data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); - } - return results; - }, - makeChkFlag: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - chkFlag = -1; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var cNode = node[childKey][i]; - var tmp = -1; - if (setting.check.chkStyle == consts.radio.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 2; - } else if (cNode[checkedKey]) { - tmp = 2; - } else { - tmp = cNode.check_Child_State > 0 ? 2:0; - } - if (tmp == 2) { - chkFlag = 2; break; - } else if (tmp == 0){ - chkFlag = 0; - } - } else if (setting.check.chkStyle == consts.checkbox.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 1; - } else if (cNode[checkedKey] ) { - tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; - } else { - tmp = (cNode.check_Child_State > 0) ? 1 : 0; - } - if (tmp === 1) { - chkFlag = 1; break; - } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { - chkFlag = 1; break; - } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { - chkFlag = 1; break; - } else if (tmp > -1) { - chkFlag = tmp; - } - } - } - } - node.check_Child_State = chkFlag; - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onCheckNode: function (event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkedKey = setting.data.key.checked; - if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; - node[checkedKey] = !node[checkedKey]; - view.checkNodeRelation(setting, node); - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - view.repairParentChkClassWithSelf(setting, node); - setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); - return true; - }, - onMouseoverCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = true; - view.setChkClass(setting, checkObj, node); - return true; - }, - onMouseoutCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = false; - view.setChkClass(setting, checkObj, node); - return true; - } - }, - //method of tools for zTree - _tools = { - - }, - //method of operate ztree dom - _view = { - checkNodeRelation: function(setting, node) { - var pNode, i, l, - childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - r = consts.radio; - if (setting.check.chkStyle == r.STYLE) { - var checkedList = data.getRadioCheckedList(setting); - if (node[checkedKey]) { - if (setting.check.radioType == r.TYPE_ALL) { - for (i = checkedList.length-1; i >= 0; i--) { - pNode = checkedList[i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - checkedList.splice(i, 1); - - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - if (pNode.parentTId != node.parentTId) { - view.repairParentChkClassWithSelf(setting, pNode); - } - } - } - checkedList.push(node); - } else { - var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (i = 0, l = parentNode[childKey].length; i < l; i++) { - pNode = parentNode[childKey][i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - } - } - } - } else if (setting.check.radioType == r.TYPE_ALL) { - for (i = 0, l = checkedList.length; i < l; i++) { - if (node == checkedList[i]) { - checkedList.splice(i, 1); - break; - } - } - } - - } else { - if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, false); - } - if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, false); - } - } - }, - makeChkClass: function(setting, node) { - var checkedKey = setting.data.key.checked, - c = consts.checkbox, r = consts.radio, - fullStyle = ""; - if (node.chkDisabled === true) { - fullStyle = c.DISABLED; - } else if (node.halfCheck) { - fullStyle = c.PART; - } else if (setting.check.chkStyle == r.STYLE) { - fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; - } else { - fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); - } - var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; - chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; - return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; - }, - repairAllChk: function(setting, checked) { - if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { - var checkedKey = setting.data.key.checked, - childKey = setting.data.key.children, - root = data.getRoot(setting); - for (var i = 0, l = root[childKey].length; i<l ; i++) { - var node = root[childKey][i]; - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = checked; - } - view.setSonNodeCheckBox(setting, node, checked); - } - } - }, - repairChkClass: function(setting, node) { - if (!node) return; - data.makeChkFlag(setting, node); - if (node.nocheck !== true) { - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - } - }, - repairParentChkClass: function(setting, node) { - if (!node || !node.parentTId) return; - var pNode = node.getParentNode(); - view.repairChkClass(setting, pNode); - view.repairParentChkClass(setting, pNode); - }, - repairParentChkClassWithSelf: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children; - if (node[childKey] && node[childKey].length > 0) { - view.repairParentChkClass(setting, node[childKey][0]); - } else { - view.repairParentChkClass(setting, node); - } - }, - repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - var childKey = setting.data.key.children; - if (node.chkDisabled != chkDisabled) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - if (node[childKey] && inherit) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var sNode = node[childKey][i]; - view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); - } - } - }, - repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - if (node.chkDisabled != chkDisabled && inherit) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); - }, - setChkClass: function(setting, obj, node) { - if (!obj) return; - if (node.nocheck === true) { - obj.hide(); - } else { - obj.show(); - } - obj.attr('class', view.makeChkClass(setting, node)); - }, - setParentNodeCheckBox: function(setting, node, value, srcNode) { - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - data.makeChkFlag(setting, node); - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - if (node.parentTId) { - var pSign = true; - if (!value) { - var pNodes = node.getParentNode()[childKey]; - for (var i = 0, l = pNodes.length; i < l; i++) { - if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) - || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { - pSign = false; - break; - } - } - } - if (pSign) { - view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); - } - } - }, - setSonNodeCheckBox: function(setting, node, value, srcNode) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - - var hasDisable = false; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { - var sNode = node[childKey][i]; - view.setSonNodeCheckBox(setting, sNode, value, srcNode); - if (sNode.chkDisabled === true) hasDisable = true; - } - } - - if (node != data.getRoot(setting) && node.chkDisabled !== true) { - if (hasDisable && node.nocheck !== true) { - data.makeChkFlag(setting, node); - } - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; - } else { - node.check_Child_State = -1; - } - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy, true); - data.addInitRoot(_initRoot); - data.addBeforeA(_beforeA); - data.addZTreeTools(_zTreeTools); - - var _createNodes = view.createNodes; - view.createNodes = function(setting, level, nodes, parentNode) { - if (_createNodes) _createNodes.apply(view, arguments); - if (!nodes) return; - view.repairParentChkClassWithSelf(setting, parentNode); - } - var _removeNode = view.removeNode; - view.removeNode = function(setting, node) { - var parentNode = node.getParentNode(); - if (_removeNode) _removeNode.apply(view, arguments); - if (!node || !parentNode) return; - view.repairChkClass(setting, parentNode); - view.repairParentChkClass(setting, parentNode); - } - - var _appendNodes = view.appendNodes; - view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { - var html = ""; - if (_appendNodes) { - html = _appendNodes.apply(view, arguments); - } - if (parentNode) { - data.makeChkFlag(setting, parentNode); - } - return html; - } +BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/** + * + * 可调整列宽的grid表格 + * + * Created by GUY on 2016/1/12. + * @class BI.ResizableTable + * @extends BI.Widget + */ +BI.ResizableTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-resizable-table", + el: { + type: "bi.grid_table" + }, + isNeedFreeze: false, + isNeedResize: true, + isResizeAdapt: false, + headerRowSize: 25, + rowSize: 25, + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + freezeCols: [], + header: [], + items: [], + regionColumnSize: [] + }) + }, + + _init: function () { + BI.ResizableTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.resizer = BI.createWidget({ + type: "bi.layout", + cls: "resizable-table-resizer", + invisible: true, + width: 2 + }); + this.regionResizerHandler = this._createResizerHandler(); + this.table = BI.createWidget(o.el, { + type: "bi.grid_table", + element: this, + width: o.width, + height: o.height, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + columnSize: o.columnSize, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: BI.bind(this._mergeRule, this), + + header: this._formatHeader(o.header), + items: o.items, + regionColumnSize: o.regionColumnSize + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.regionResizerHandler, + left: 0, + top: 0, + bottom: 0 + }, { + el: this.resizer, + left: 0, + top: 0 + }] + }); + this._populate(); + }, + + _mergeRule: function (row1, row2) { + var o = this.options; + if (row1.type === "bi.resizable_table_cell") { + row1 = row1.cell; + } + if (row2.type === "bi.resizable_table_cell") { + row2 = row2.cell; + } + return o.mergeRule(row1, row2); + }, + + _createResizerHandler: function () { + var self = this, o = this.options; + var regionResizerHandler = BI.createWidget({ + type: "bi.absolute", + cls: "resizable-table-region-resizer", + invisible: true, + width: 6, + items: [{ + el: { + type: "bi.layout", + width: 2, + cls: "resizable-table-region-resizer-knob" + }, + left: 2, + top: 0, + bottom: 0 + }] + }); + var size = 0, offset = 0, defaultSize = 0, start = false; + var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { + if (mouseMoveTracker.isDragging()) { + start = true; + offset += deltaX; + size = BI.clamp(defaultSize + offset, 15, o.width - 15); + + self.regionResizerHandler.element.addClass("dragging"); + self._setRegionResizerHandlerPosition(size - 3, 0); + } + + }, function () { + if (start === true) { + o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15); + self.table.setRegionColumnSize(o.regionColumnSize); + if (o.isResizeAdapt === true) { + var freezeColumnSize = self._getFreezeColumnSize(); + o.columnSize[self._getFreezeColLength() - 1] += o.regionColumnSize[0] - freezeColumnSize; + self.table.setColumnSize(o.columnSize); + } + self.table.populate(); + self._populate(); + self.regionResizerHandler.element.removeClass("dragging"); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE); + start = false; + } + mouseMoveTracker.releaseMouseMoves(); + }, document); + regionResizerHandler.element.on("mousedown", function (event) { + defaultSize = size = self._getRegionSize(); + offset = 0; + self._setResizerPosition(0, 0); + mouseMoveTracker.captureMouseMoves(event); + }); + return regionResizerHandler; + }, + + _setResizerPosition: function (left, top) { + this.resizer.element.css({ + left: left + "px", + top: top + "px" + }); + }, + + _setRegionResizerHandlerPosition: function (left, top) { + this.regionResizerHandler.element.css({ + left: left + "px", + top: top + "px" + }); + }, + + _getRegionSize: function () { + var o = this.options; + var regionSize = o.regionColumnSize[0] || 0; + if (o.isNeedFreeze === false || o.freezeCols.length === 0) { + return 0; + } + if (!regionSize) { + BI.each(o.freezeCols, function (i, col) { + regionSize += o.columnSize[col]; + }); + } + return regionSize; + }, + + _getRegionRowSize: function () { + var o = this.options; + return [o.header.length * o.headerRowSize, + Math.min(o.height - o.header.length * o.headerRowSize, o.items.length * o.rowSize)]; + }, + + _getFreezeColLength: function () { + return this.options.freezeCols.length; + }, + + _getFreezeColumnSize: function () { + var columnSize = this.options.columnSize; + var sum = 0; + for (var i = 0, len = this._getFreezeColLength(); i < len; i++) { + sum += columnSize[i]; + } + return sum; + }, + + _getResizerLeft: function (j) { + var left = 0; + var columnSize = this.options.columnSize; + var freezeColLength = this._getFreezeColLength(); + for (var i = (j >= freezeColLength ? freezeColLength : 0); i < j; i++) { + left += columnSize[i] || 0; + } + if (j >= freezeColLength) { + left += this.table.getRegionSize(); + left -= this.table.getRightHorizontalScroll(); + } else { + left -= this.table.getLeftHorizontalScroll(); + } + return left; + }, + + _formatHeader: function (header) { + var self = this, o = this.options; + var result = []; + var resize = function (j, size) { + self.resizer.setVisible(true); + var height = o.headerRowSize + self._getRegionRowSize()[1]; + self.resizer.setHeight(height); + //TODO 不知道为什么加入这段代码会使得列宽调整出问题 + // if (o.minColumnSize[j]) { + // if (size === o.minColumnSize[j]) { + // self.resizer.element.addClass("suitable"); + // } else { + // self.resizer.element.removeClass("suitable"); + // } + // } + self._setResizerPosition(self._getResizerLeft(j) + size, (o.header.length - 1) * o.headerRowSize); + }; + var stop = function (j, size) { + self.resizer.setVisible(false); + var columnSize = o.columnSize.slice(); + columnSize[j] = size; + o.columnSize = columnSize; + self.table.setColumnSize(columnSize); + self.table.populate(); + self._populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE); + }; + BI.each(header, function (i, cols) { + if (i === header.length - 1) { + result[i] = []; + BI.each(cols, function (j, col) { + if (j === self._getFreezeColLength() - 1 || j === cols.length - 1) { + result[i][j] = col; + } else { + result[i][j] = { + type: "bi.resizable_table_cell", + cell: col, + suitableSize: o.minColumnSize[j], + maxSize: o.maxColumnSize[j], + resize: BI.bind(resize, null, j), + stop: BI.bind(stop, null, j) + }; + if (o.isNeedMerge) { + var r = i; + while (r > 0 && self._mergeRule(result[r][j], result[r - 1][j])) { + result[r - 1][j] = { + type: "bi.resizable_table_cell", + cell: result[r - 1][j], + suitableSize: o.minColumnSize[j], + maxSize: o.maxColumnSize[j], + resize: BI.bind(resize, null, j), + stop: BI.bind(stop, null, j) + }; + r--; + } + } + } + }); + } else { + result.push(cols); + } + }); + return result; + }, + + _populate: function () { + var o = this.options; + var regionSize = this._getRegionSize(); + if (regionSize > 0) { + this.regionResizerHandler.setVisible(true); + this._setRegionResizerHandlerPosition(regionSize - 3, 0); + } else { + this.regionResizerHandler.setVisible(false); + } + }, + + setWidth: function (width) { + BI.ResizableTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width) + }, + + setHeight: function (height) { + BI.ResizableTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this.table.setColumnSize(columnSize); + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function () { + BI.ResizableTable.superclass.attr.apply(this, arguments); + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header) { + if (items) { + this.options.items = items; + } + if (header) { + this.options.header = header; + if (this.options.isNeedResize) { + header = this._formatHeader(header); + } + } + this.table.populate(items, header); + this._populate(); + } +}); + +BI.shortcut("bi.resizable_table", BI.ResizableTable);/** + * + * 自定义树 + * + * Created by GUY on 2015/9/7. + * @class BI.CustomTree + * @extends BI.Single + */ +BI.CustomTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-custom-tree", + expander: { + el: {}, + popup: { + type: "bi.custom_tree" + } + }, + + items: [], + itemsCreator: BI.emptyFn, + + el: { + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + } + }) + }, + + _init: function () { + BI.CustomTree.superclass._init.apply(this, arguments); + this.initTree(this.options.items); + }, + + _formatItems: function (nodes) { + var self = this, o = this.options; + nodes = BI.Tree.transformToTreeFormat(nodes); + + var items = []; + BI.each(nodes, function (i, node) { + if (BI.isNotEmptyArray(node.children) || node.isParent === true) { + var item = BI.extend({ + type: "bi.expander", + el: {}, + popup: {type: "bi.custom_tree"} + }, BI.deepClone(o.expander), { + id: node.id, + pId: node.pId, + value: node.value + }); + var el = BI.stripEL(node); + if (!BI.isWidget(el)) { + el = BI.clone(el); + delete el.children; + BI.extend(item.el, el); + } else { + item.el = el; + } + item.popup.expander = BI.deepClone(o.expander); + item.items = item.popup.items = node.children; + item.itemsCreator = item.popup.itemsCreator = function (op) { + if (BI.isNotNull(op.node)) {//从子节点传过来的itemsCreator直接向上传递 + return o.itemsCreator.apply(self, arguments); + } + var args = Array.prototype.slice.call(arguments, 0); + args[0].node = node; + return o.itemsCreator.apply(self, args); + }; + BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el)); + items.push(item); + } else { + items.push(node); + } + }); + return items; + }, + + //构造树结构, + initTree: function (nodes) { + var self = this, o = this.options; + this.tree = BI.createWidget(o.el, { + element: this, + items: this._formatItems(nodes), + itemsCreator: function (op, callback) { + o.itemsCreator.apply(this, [op, function (items) { + var args = Array.prototype.slice.call(arguments, 0); + args[0] = self._formatItems(items); + callback.apply(null, args); + }]); + } + }); + this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj); + } + }) + }, + + //生成树方法 + stroke: function (nodes) { + this.populate.apply(this, arguments); + }, + + populate: function (nodes) { + var args = Array.prototype.slice.call(arguments, 0); + if (arguments.length > 0) { + args[0] = this._formatItems(nodes); + } + this.tree.populate.apply(this.tree, args); + }, + + setValue: function (v) { + this.tree && this.tree.setValue(v); + }, + + getValue: function () { + return this.tree ? this.tree.getValue() : []; + }, + + getAllButtons: function () { + return this.tree ? this.tree.getAllButtons() : []; + }, + + getAllLeaves: function () { + return this.tree ? this.tree.getAllLeaves() : []; + }, + + getNodeById: function (id) { + return this.tree && this.tree.getNodeById(id); + }, + + getNodeByValue: function (id) { + return this.tree && this.tree.getNodeByValue(id); + }, + + empty: function () { + this.tree.empty(); + } +}); +BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.custom_tree", BI.CustomTree);/* + * JQuery zTree core v3.5.18 + * http://zTree.me/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * email: hunter.z@263.net + * Date: 2015-06-18 + */ +(function($){ + var settings = {}, roots = {}, caches = {}, + //default consts of core + _consts = { + className: { + BUTTON: "button", + LEVEL: "level", + ICO_LOADING: "ico_loading", + SWITCH: "switch" + }, + event: { + NODECREATED: "ztree_nodeCreated", + CLICK: "ztree_click", + EXPAND: "ztree_expand", + COLLAPSE: "ztree_collapse", + ASYNC_SUCCESS: "ztree_async_success", + ASYNC_ERROR: "ztree_async_error", + REMOVE: "ztree_remove", + SELECTED: "ztree_selected", + UNSELECTED: "ztree_unselected" + }, + id: { + A: "_a", + ICON: "_ico", + SPAN: "_span", + SWITCH: "_switch", + UL: "_ul" + }, + line: { + ROOT: "root", + ROOTS: "roots", + CENTER: "center", + BOTTOM: "bottom", + NOLINE: "noline", + LINE: "line" + }, + folder: { + OPEN: "open", + CLOSE: "close", + DOCU: "docu" + }, + node: { + CURSELECTED: "curSelectedNode" + } + }, + //default setting of core + _setting = { + treeId: "", + treeObj: null, + view: { + addDiyDom: null, + autoCancelSelected: true, + dblClickExpand: true, + expandSpeed: "fast", + fontCss: {}, + nameIsHTML: false, + selectedMulti: true, + showIcon: true, + showLine: true, + showTitle: true, + txtSelectedEnable: false + }, + data: { + key: { + children: "children", + name: "name", + title: "", + url: "url" + }, + simpleData: { + enable: false, + idKey: "id", + pIdKey: "pId", + rootPId: null + }, + keep: { + parent: false, + leaf: false + } + }, + async: { + enable: false, + contentType: "application/x-www-form-urlencoded", + type: "post", + dataType: "text", + url: "", + autoParam: [], + otherParam: [], + dataFilter: null + }, + callback: { + beforeAsync:null, + beforeClick:null, + beforeDblClick:null, + beforeRightClick:null, + beforeMouseDown:null, + beforeMouseUp:null, + beforeExpand:null, + beforeCollapse:null, + beforeRemove:null, + + onAsyncError:null, + onAsyncSuccess:null, + onNodeCreated:null, + onClick:null, + onDblClick:null, + onRightClick:null, + onMouseDown:null, + onMouseUp:null, + onExpand:null, + onCollapse:null, + onRemove:null + } + }, + //default root of core + //zTree use root to save full data + _initRoot = function (setting) { + var r = data.getRoot(setting); + if (!r) { + r = {}; + data.setRoot(setting, r); + } + r[setting.data.key.children] = []; + r.expandTriggerFlag = false; + r.curSelectedList = []; + r.noSelection = true; + r.createdNodes = []; + r.zId = 0; + r._ver = (new Date()).getTime(); + }, + //default cache of core + _initCache = function(setting) { + var c = data.getCache(setting); + if (!c) { + c = {}; + data.setCache(setting, c); + } + c.nodes = []; + c.doms = []; + }, + //default bindEvent of core + _bindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.bind(c.NODECREATED, function (event, treeId, node) { + tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); + }); + + o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { + tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); + }); + + o.bind(c.EXPAND, function (event, treeId, node) { + tools.apply(setting.callback.onExpand, [event, treeId, node]); + }); + + o.bind(c.COLLAPSE, function (event, treeId, node) { + tools.apply(setting.callback.onCollapse, [event, treeId, node]); + }); + + o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { + tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); + }); + + o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { + tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); + }); + + o.bind(c.REMOVE, function (event, treeId, treeNode) { + tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); + }); + + o.bind(c.SELECTED, function (event, srcEvent, treeId, node) { + tools.apply(setting.callback.onSelected, [srcEvent, treeId, node]); + }); + o.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) { + tools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]); + }); + }, + _unbindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.unbind(c.NODECREATED) + .unbind(c.CLICK) + .unbind(c.EXPAND) + .unbind(c.COLLAPSE) + .unbind(c.ASYNC_SUCCESS) + .unbind(c.ASYNC_ERROR) + .unbind(c.REMOVE) + .unbind(c.SELECTED) + .unbind(c.UNSELECTED); + }, + //default event proxy of core + _eventProxy = function(event) { + var target = event.target, + setting = data.getSetting(event.data.treeId), + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null, + tmp = null; + + if (tools.eqs(event.type, "mousedown")) { + treeEventType = "mousedown"; + } else if (tools.eqs(event.type, "mouseup")) { + treeEventType = "mouseup"; + } else if (tools.eqs(event.type, "contextmenu")) { + treeEventType = "contextmenu"; + } else if (tools.eqs(event.type, "click")) { + if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "switchNode"; + } else { + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "clickNode"; + } + } + } else if (tools.eqs(event.type, "dblclick")) { + treeEventType = "dblclick"; + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "switchNode"; + } + } + if (treeEventType.length > 0 && tId.length == 0) { + tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); + if (tmp) {tId = tools.getNodeMainDom(tmp).id;} + } + // event to node + if (tId.length>0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "switchNode" : + if (!node.isParent) { + nodeEventType = ""; + } else if (tools.eqs(event.type, "click") + || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { + nodeEventCallback = handler.onSwitchNode; + } else { + nodeEventType = ""; + } + break; + case "clickNode" : + nodeEventCallback = handler.onClickNode; + break; + } + } + // event to zTree + switch (treeEventType) { + case "mousedown" : + treeEventCallback = handler.onZTreeMousedown; + break; + case "mouseup" : + treeEventCallback = handler.onZTreeMouseup; + break; + case "dblclick" : + treeEventCallback = handler.onZTreeDblclick; + break; + case "contextmenu" : + treeEventCallback = handler.onZTreeContextmenu; + break; + } + var proxyResult = { + stop: false, + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of core + _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + var r = data.getRoot(setting), + childKey = setting.data.key.children; + n.level = level; + n.tId = setting.treeId + "_" + (++r.zId); + n.parentTId = parentNode ? parentNode.tId : null; + n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; + if (n[childKey] && n[childKey].length > 0) { + n.isParent = true; + n.zAsync = true; + } else { + n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; + n.open = (n.isParent && !setting.async.enable) ? n.open : false; + n.zAsync = !n.isParent; + } + n.isFirstNode = isFirstNode; + n.isLastNode = isLastNode; + n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; + n.getPreNode = function() {return data.getPreNode(setting, n);}; + n.getNextNode = function() {return data.getNextNode(setting, n);}; + n.isAjaxing = false; + data.fixPIdKeyValue(setting, n); + }, + _init = { + bind: [_bindEvent], + unbind: [_unbindEvent], + caches: [_initCache], + nodes: [_initNode], + proxys: [_eventProxy], + roots: [_initRoot], + beforeA: [], + afterA: [], + innerBeforeA: [], + innerAfterA: [], + zTreeTools: [] + }, + //method of operate data + data = { + addNodeCache: function(setting, node) { + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; + }, + getNodeCacheId: function(tId) { + return tId.substring(tId.lastIndexOf("_")+1); + }, + addAfterA: function(afterA) { + _init.afterA.push(afterA); + }, + addBeforeA: function(beforeA) { + _init.beforeA.push(beforeA); + }, + addInnerAfterA: function(innerAfterA) { + _init.innerAfterA.push(innerAfterA); + }, + addInnerBeforeA: function(innerBeforeA) { + _init.innerBeforeA.push(innerBeforeA); + }, + addInitBind: function(bindEvent) { + _init.bind.push(bindEvent); + }, + addInitUnBind: function(unbindEvent) { + _init.unbind.push(unbindEvent); + }, + addInitCache: function(initCache) { + _init.caches.push(initCache); + }, + addInitNode: function(initNode) { + _init.nodes.push(initNode); + }, + addInitProxy: function(initProxy, isFirst) { + if (!!isFirst) { + _init.proxys.splice(0,0,initProxy); + } else { + _init.proxys.push(initProxy); + } + }, + addInitRoot: function(initRoot) { + _init.roots.push(initRoot); + }, + addNodesData: function(setting, parentNode, nodes) { + var childKey = setting.data.key.children; + if (!parentNode[childKey]) parentNode[childKey] = []; + if (parentNode[childKey].length > 0) { + parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; + view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); + } + parentNode.isParent = true; + parentNode[childKey] = parentNode[childKey].concat(nodes); + }, + addSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + if (!data.isSelectedNode(setting, node)) { + root.curSelectedList.push(node); + } + }, + addCreatedNode: function(setting, node) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + root.createdNodes.push(node); + } + }, + addZTreeTools: function(zTreeTools) { + _init.zTreeTools.push(zTreeTools); + }, + exSetting: function(s) { + $.extend(true, _setting, s); + }, + fixPIdKeyValue: function(setting, node) { + if (setting.data.simpleData.enable) { + node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; + } + }, + getAfterA: function(setting, node, array) { + for (var i=0, j=_init.afterA.length; i<j; i++) { + _init.afterA[i].apply(this, arguments); + } + }, + getBeforeA: function(setting, node, array) { + for (var i=0, j=_init.beforeA.length; i<j; i++) { + _init.beforeA[i].apply(this, arguments); + } + }, + getInnerAfterA: function(setting, node, array) { + for (var i=0, j=_init.innerAfterA.length; i<j; i++) { + _init.innerAfterA[i].apply(this, arguments); + } + }, + getInnerBeforeA: function(setting, node, array) { + for (var i=0, j=_init.innerBeforeA.length; i<j; i++) { + _init.innerBeforeA[i].apply(this, arguments); + } + }, + getCache: function(setting) { + return caches[setting.treeId]; + }, + getNextNode: function(setting, node) { + if (!node) return null; + var childKey = setting.data.key.children, + p = node.parentTId ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l=p[childKey].length-1; i<=l; i++) { + if (p[childKey][i] === node) { + return (i==l ? null : p[childKey][i+1]); + } + } + return null; + }, + getNodeByParam: function(setting, nodes, key, value) { + if (!nodes || !key) return null; + var childKey = setting.data.key.children; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i][key] == value) { + return nodes[i]; + } + var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value); + if (tmp) return tmp; + } + return null; + }, + getNodeCache: function(setting, tId) { + if (!tId) return null; + var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; + return n ? n : null; + }, + getNodeName: function(setting, node) { + var nameKey = setting.data.key.name; + return "" + node[nameKey]; + }, + getNodeTitle: function(setting, node) { + var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; + return "" + node[t]; + }, + getNodes: function(setting) { + return data.getRoot(setting)[setting.data.key.children]; + }, + getNodesByParam: function(setting, nodes, key, value) { + if (!nodes || !key) return []; + var childKey = setting.data.key.children, + result = []; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i][key] == value) { + result.push(nodes[i]); + } + result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value)); + } + return result; + }, + getNodesByParamFuzzy: function(setting, nodes, key, value) { + if (!nodes || !key) return []; + var childKey = setting.data.key.children, + result = []; + value = value.toLowerCase(); + for (var i = 0, l = nodes.length; i < l; i++) { + if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) { + result.push(nodes[i]); + } + result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); + } + return result; + }, + getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { + if (!nodes) return (isSingle ? null : []); + var childKey = setting.data.key.children, + result = isSingle ? null : []; + for (var i = 0, l = nodes.length; i < l; i++) { + if (tools.apply(filter, [nodes[i], invokeParam], false)) { + if (isSingle) {return nodes[i];} + result.push(nodes[i]); + } + var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); + if (isSingle && !!tmpResult) {return tmpResult;} + result = isSingle ? tmpResult : result.concat(tmpResult); + } + return result; + }, + getPreNode: function(setting, node) { + if (!node) return null; + var childKey = setting.data.key.children, + p = node.parentTId ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l=p[childKey].length; i<l; i++) { + if (p[childKey][i] === node) { + return (i==0 ? null : p[childKey][i-1]); + } + } + return null; + }, + getRoot: function(setting) { + return setting ? roots[setting.treeId] : null; + }, + getRoots: function() { + return roots; + }, + getSetting: function(treeId) { + return settings[treeId]; + }, + getSettings: function() { + return settings; + }, + getZTreeTools: function(treeId) { + var r = this.getRoot(this.getSetting(treeId)); + return r ? r.treeTools : null; + }, + initCache: function(setting) { + for (var i=0, j=_init.caches.length; i<j; i++) { + _init.caches[i].apply(this, arguments); + } + }, + initNode: function(setting, level, node, parentNode, preNode, nextNode) { + for (var i=0, j=_init.nodes.length; i<j; i++) { + _init.nodes[i].apply(this, arguments); + } + }, + initRoot: function(setting) { + for (var i=0, j=_init.roots.length; i<j; i++) { + _init.roots[i].apply(this, arguments); + } + }, + isSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + for (var i=0, j=root.curSelectedList.length; i<j; i++) { + if(node === root.curSelectedList[i]) return true; + } + return false; + }, + removeNodeCache: function(setting, node) { + var childKey = setting.data.key.children; + if (node[childKey]) { + for (var i=0, l=node[childKey].length; i<l; i++) { + arguments.callee(setting, node[childKey][i]); + } + } + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; + }, + removeSelectedNode: function(setting, node) { + var root = data.getRoot(setting); + for (var i=0, j=root.curSelectedList.length; i<j; i++) { + if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { + root.curSelectedList.splice(i, 1); + i--;j--; + } + } + }, + setCache: function(setting, cache) { + caches[setting.treeId] = cache; + }, + setRoot: function(setting, root) { + roots[setting.treeId] = root; + }, + setZTreeTools: function(setting, zTreeTools) { + for (var i=0, j=_init.zTreeTools.length; i<j; i++) { + _init.zTreeTools[i].apply(this, arguments); + } + }, + transformToArrayFormat: function (setting, nodes) { + if (!nodes) return []; + var childKey = setting.data.key.children, + r = []; + if (tools.isArray(nodes)) { + for (var i=0, l=nodes.length; i<l; i++) { + r.push(nodes[i]); + if (nodes[i][childKey]) + r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey])); + } + } else { + r.push(nodes); + if (nodes[childKey]) + r = r.concat(data.transformToArrayFormat(setting, nodes[childKey])); + } + return r; + }, + transformTozTreeFormat: function(setting, sNodes) { + var i,l, + key = setting.data.simpleData.idKey, + parentKey = setting.data.simpleData.pIdKey, + childKey = setting.data.key.children; + if (!key || key=="" || !sNodes) return []; + + if (tools.isArray(sNodes)) { + var r = []; + var tmpMap = []; + for (i=0, l=sNodes.length; i<l; i++) { + tmpMap[sNodes[i][key]] = sNodes[i]; + } + for (i=0, l=sNodes.length; i<l; i++) { + if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) { + if (!tmpMap[sNodes[i][parentKey]][childKey]) + tmpMap[sNodes[i][parentKey]][childKey] = []; + tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]); + } else { + r.push(sNodes[i]); + } + } + return r; + }else { + return [sNodes]; + } + } + }, + //method of event proxy + event = { + bindEvent: function(setting) { + for (var i=0, j=_init.bind.length; i<j; i++) { + _init.bind[i].apply(this, arguments); + } + }, + unbindEvent: function(setting) { + for (var i=0, j=_init.unbind.length; i<j; i++) { + _init.unbind[i].apply(this, arguments); + } + }, + bindTree: function(setting) { + var eventParam = { + treeId: setting.treeId + }, + o = setting.treeObj; + if (!setting.view.txtSelectedEnable) { + // for can't select text + o.bind('selectstart', function(e){ + var node + var n = e.originalEvent.srcElement.nodeName.toLowerCase(); + return (n === "input" || n === "textarea" ); + }).css({ + "-moz-user-select":"-moz-none" + }); + } + o.bind('click', eventParam, event.proxy); + o.bind('dblclick', eventParam, event.proxy); + o.bind('mouseover', eventParam, event.proxy); + o.bind('mouseout', eventParam, event.proxy); + o.bind('mousedown', eventParam, event.proxy); + o.bind('mouseup', eventParam, event.proxy); + o.bind('contextmenu', eventParam, event.proxy); + }, + unbindTree: function(setting) { + var o = setting.treeObj; + o.unbind('click', event.proxy) + .unbind('dblclick', event.proxy) + .unbind('mouseover', event.proxy) + .unbind('mouseout', event.proxy) + .unbind('mousedown', event.proxy) + .unbind('mouseup', event.proxy) + .unbind('contextmenu', event.proxy); + }, + doProxy: function(e) { + var results = []; + for (var i=0, j=_init.proxys.length; i<j; i++) { + var proxyResult = _init.proxys[i].apply(this, arguments); + results.push(proxyResult); + if (proxyResult.stop) { + break; + } + } + return results; + }, + proxy: function(e) { + var setting = data.getSetting(e.data.treeId); + if (!tools.uCanDo(setting, e)) return true; + var results = event.doProxy(e), + r = true, x = false; + for (var i=0, l=results.length; i<l; i++) { + var proxyResult = results[i]; + if (proxyResult.nodeEventCallback) { + x = true; + r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + if (proxyResult.treeEventCallback) { + x = true; + r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + } + return r; + } + }, + //method of event handler + handler = { + onSwitchNode: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (node.open) { + if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } else { + if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } + return true; + }, + onClickNode: function (event, node) { + var setting = data.getSetting(event.data.treeId), + clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; + if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; + if (clickFlag === 0) { + view.cancelPreSelectedNode(setting, node); + } else { + view.selectNode(setting, node, clickFlag === 2); + } + setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); + return true; + }, + onZTreeMousedown: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); + } + return true; + }, + onZTreeMouseup: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); + } + return true; + }, + onZTreeDblclick: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); + } + return true; + }, + onZTreeContextmenu: function(event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); + } + return (typeof setting.callback.onRightClick) != "function"; + } + }, + //method of tools for zTree + tools = { + apply: function(fun, param, defaultValue) { + if ((typeof fun) == "function") { + return fun.apply(zt, param?param:[]); + } + return defaultValue; + }, + canAsync: function(setting, node) { + var childKey = setting.data.key.children; + return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0))); + }, + clone: function (obj){ + if (obj === null) return null; + var o = tools.isArray(obj) ? [] : {}; + for(var i in obj){ + o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); + } + return o; + }, + eqs: function(str1, str2) { + return str1.toLowerCase() === str2.toLowerCase(); + }, + isArray: function(arr) { + return Object.prototype.toString.apply(arr) === "[object Array]"; + }, + $: function(node, exp, setting) { + if (!!exp && typeof exp != "string") { + setting = exp; + exp = ""; + } + if (typeof node == "string") { + return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); + } else { + return $("#" + node.tId + exp, setting ? setting.treeObj : null); + } + }, + getMDom: function (setting, curDom, targetExpr) { + if (!curDom) return null; + while (curDom && curDom.id !== setting.treeId) { + for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) { + if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { + return curDom; + } + } + curDom = curDom.parentNode; + } + return null; + }, + getNodeMainDom:function(target) { + return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); + }, + isChildOrSelf: function(dom, parentId) { + return ( $(dom).closest("#" + parentId).length> 0 ); + }, + uCanDo: function(setting, e) { + return true; + } + }, + //method of operate ztree dom + view = { + addNodes: function(setting, parentNode, newNodes, isSilent) { + if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { + return; + } + if (!tools.isArray(newNodes)) { + newNodes = [newNodes]; + } + if (setting.data.simpleData.enable) { + newNodes = data.transformTozTreeFormat(setting, newNodes); + } + if (parentNode) { + var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), + target_icoObj = $$(parentNode, consts.id.ICON, setting), + target_ulObj = $$(parentNode, consts.id.UL, setting); + + if (!parentNode.open) { + view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); + view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); + parentNode.open = false; + target_ulObj.css({ + "display": "none" + }); + } + + data.addNodesData(setting, parentNode, newNodes); + view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); + if (!isSilent) { + view.expandCollapseParentNode(setting, parentNode, true); + } + } else { + data.addNodesData(setting, data.getRoot(setting), newNodes); + view.createNodes(setting, 0, newNodes, null); + } + }, + appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { + if (!nodes) return []; + var html = [], + childKey = setting.data.key.children; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (initFlag) { + var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), + tmpPChild = tmpPNode[childKey], + isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), + isLastNode = (i == (nodes.length - 1)); + data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); + data.addNodeCache(setting, node); + } + + var childHtml = []; + if (node[childKey] && node[childKey].length > 0) { + //make child html first, because checkType + childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); + } + if (openFlag) { + + view.makeDOMNodeMainBefore(html, setting, node); + view.makeDOMNodeLine(html, setting, node); + data.getBeforeA(setting, node, html); + view.makeDOMNodeNameBefore(html, setting, node); + data.getInnerBeforeA(setting, node, html); + view.makeDOMNodeIcon(html, setting, node); + data.getInnerAfterA(setting, node, html); + view.makeDOMNodeNameAfter(html, setting, node); + data.getAfterA(setting, node, html); + if (node.isParent && node.open) { + view.makeUlHtml(setting, node, html, childHtml.join('')); + } + view.makeDOMNodeMainAfter(html, setting, node); + data.addCreatedNode(setting, node); + } + } + return html; + }, + appendParentULDom: function(setting, node) { + var html = [], + nObj = $$(node, setting); + if (!nObj.get(0) && !!node.parentTId) { + view.appendParentULDom(setting, node.getParentNode()); + nObj = $$(node, setting); + } + var ulObj = $$(node, consts.id.UL, setting); + if (ulObj.get(0)) { + ulObj.remove(); + } + var childKey = setting.data.key.children, + childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); + view.makeUlHtml(setting, node, html, childHtml.join('')); + nObj.append(html.join('')); + }, + asyncNode: function(setting, node, isSilent, callback) { + var i, l; + if (node && !node.isParent) { + tools.apply(callback); + return false; + } else if (node && node.isAjaxing) { + return false; + } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { + tools.apply(callback); + return false; + } + if (node) { + node.isAjaxing = true; + var icoObj = $$(node, consts.id.ICON, setting); + icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); + } + + var tmpParam = {}; + for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { + var pKey = setting.async.autoParam[i].split("="), spKey = pKey; + if (pKey.length>1) { + spKey = pKey[1]; + pKey = pKey[0]; + } + tmpParam[spKey] = node[pKey]; + } + if (tools.isArray(setting.async.otherParam)) { + for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { + tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; + } + } else { + for (var p in setting.async.otherParam) { + tmpParam[p] = setting.async.otherParam[p]; + } + } + + var _tmpV = data.getRoot(setting)._ver; + $.ajax({ + contentType: setting.async.contentType, + cache: false, + type: setting.async.type, + url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), + data: tmpParam, + dataType: setting.async.dataType, + success: function(msg) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + var newNodes = []; + try { + if (!msg || msg.length == 0) { + newNodes = []; + } else if (typeof msg == "string") { + newNodes = eval("(" + msg + ")"); + } else { + newNodes = msg; + } + } catch(err) { + newNodes = msg; + } + + if (node) { + node.isAjaxing = null; + node.zAsync = true; + } + view.setNodeLineIcos(setting, node); + if (newNodes && newNodes !== "") { + newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); + view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); + } else { + view.addNodes(setting, node, [], !!isSilent); + } + setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); + tools.apply(callback); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + if (node) node.isAjaxing = null; + view.setNodeLineIcos(setting, node); + setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); + } + }); + return true; + }, + cancelPreSelectedNode: function (setting, node, excludeNode) { + var list = data.getRoot(setting).curSelectedList, + i, n; + for (i=list.length-1; i>=0; i--) { + n = list[i]; + if (node === n || (!node && (!excludeNode || excludeNode !== n))) { + $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); + if (node) { + data.removeSelectedNode(setting, node); + setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); + break; + } else { + list.splice(i, 1); + setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); + } + } + } + }, + createNodeCallback: function(setting) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + while (root.createdNodes.length>0) { + var node = root.createdNodes.shift(); + tools.apply(setting.view.addDiyDom, [setting.treeId, node]); + if (!!setting.callback.onNodeCreated) { + setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); + } + } + } + }, + createNodes: function(setting, level, nodes, parentNode) { + if (!nodes || nodes.length == 0) return; + var root = data.getRoot(setting), + childKey = setting.data.key.children, + openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); + root.createdNodes = []; + var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); + if (!parentNode) { + setting.treeObj.append(zTreeHtml.join('')); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + if (ulObj.get(0)) { + ulObj.append(zTreeHtml.join('')); + } + } + view.createNodeCallback(setting); + }, + destroy: function(setting) { + if (!setting) return; + data.initCache(setting); + data.initRoot(setting); + event.unbindTree(setting); + event.unbindEvent(setting); + setting.treeObj.empty(); + delete settings[setting.treeId]; + }, + expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting), + childKey = setting.data.key.children; + if (!node) { + tools.apply(callback, []); + return; + } + if (root.expandTriggerFlag) { + var _callback = callback; + callback = function(){ + if (_callback) _callback(); + if (node.open) { + setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); + } else { + setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); + } + }; + root.expandTriggerFlag = false; + } + if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { + view.appendParentULDom(setting, node); + view.createNodeCallback(setting); + } + if (node.open == expandFlag) { + tools.apply(callback, []); + return; + } + var ulObj = $$(node, consts.id.UL, setting), + switchObj = $$(node, consts.id.SWITCH, setting), + icoObj = $$(node, consts.id.ICON, setting); + + if (node.isParent) { + node.open = !node.open; + if (node.iconOpen && node.iconClose) { + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + } + + if (node.open) { + view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); + view.replaceIcoClass(node, icoObj, consts.folder.OPEN); + if (animateFlag == false || setting.view.expandSpeed == "") { + ulObj.show(); + tools.apply(callback, []); + } else { + if (node[childKey] && node[childKey].length > 0) { + ulObj.slideDown(setting.view.expandSpeed, callback); + } else { + ulObj.show(); + tools.apply(callback, []); + } + } + } else { + view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); + view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); + if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { + ulObj.hide(); + tools.apply(callback, []); + } else { + ulObj.slideUp(setting.view.expandSpeed, callback); + } + } + } else { + tools.apply(callback, []); + } + }, + expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { + if (!node) return; + if (!node.parentTId) { + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); + return; + } else { + view.expandCollapseNode(setting, node, expandFlag, animateFlag); + } + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); + } + }, + expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting), + childKey = setting.data.key.children, + treeNodes = (node) ? node[childKey]: root[childKey], + selfAnimateSign = (node) ? false : animateFlag, + expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; + data.getRoot(setting).expandTriggerFlag = false; + if (treeNodes) { + for (var i = 0, l = treeNodes.length; i < l; i++) { + if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); + } + } + data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); + }, + isSelectedNode: function (setting, node) { + if (!node) { + return false; + } + var list = data.getRoot(setting).curSelectedList, + i; + for (i=list.length-1; i>=0; i--) { + if (node === list[i]) { + return true; + } + } + return false; + }, + makeDOMNodeIcon: function(html, setting, node) { + var nameStr = data.getNodeName(setting, node), + name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + html.push("<span id='", node.tId, consts.id.ICON, + "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), + "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, + "'>",name,"</span>"); + }, + makeDOMNodeLine: function(html, setting, node) { + html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>"); + }, + makeDOMNodeMainAfter: function(html, setting, node) { + html.push("</li>"); + }, + makeDOMNodeMainBefore: function(html, setting, node) { + html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>"); + }, + makeDOMNodeNameAfter: function(html, setting, node) { + html.push("</a>"); + }, + makeDOMNodeNameBefore: function(html, setting, node) { + var title = data.getNodeTitle(setting, node), + url = view.makeNodeUrl(setting, node), + fontcss = view.makeNodeFontCss(setting, node), + fontStyle = []; + for (var f in fontcss) { + fontStyle.push(f, ":", fontcss[f], ";"); + } + html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''), + "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), + "'"); + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");} + html.push(">"); + }, + makeNodeFontCss: function(setting, node) { + var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); + return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; + }, + makeNodeIcoClass: function(setting, node) { + var icoCss = ["ico"]; + if (!node.isAjaxing) { + icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; + if (node.isParent) { + icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + icoCss.push(consts.folder.DOCU); + } + } + return consts.className.BUTTON + " " + icoCss.join('_'); + }, + makeNodeIcoStyle: function(setting, node) { + var icoStyle = []; + if (!node.isAjaxing) { + var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; + if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); + if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { + icoStyle.push("width:0px;height:0px;"); + } + } + return icoStyle.join(''); + }, + makeNodeLineClass: function(setting, node) { + var lineClass = []; + if (setting.view.showLine) { + if (node.level == 0 && node.isFirstNode && node.isLastNode) { + lineClass.push(consts.line.ROOT); + } else if (node.level == 0 && node.isFirstNode) { + lineClass.push(consts.line.ROOTS); + } else if (node.isLastNode) { + lineClass.push(consts.line.BOTTOM); + } else { + lineClass.push(consts.line.CENTER); + } + } else { + lineClass.push(consts.line.NOLINE); + } + if (node.isParent) { + lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + lineClass.push(consts.folder.DOCU); + } + return view.makeNodeLineClassEx(node) + lineClass.join('_'); + }, + makeNodeLineClassEx: function(node) { + return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; + }, + makeNodeTarget: function(node) { + return (node.target || "_blank"); + }, + makeNodeUrl: function(setting, node) { + var urlKey = setting.data.key.url; + return node[urlKey] ? node[urlKey] : null; + }, + makeUlHtml: function(setting, node, html, content) { + html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>"); + html.push(content); + html.push("</ul>"); + }, + makeUlLineClass: function(setting, node) { + return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); + }, + removeChildNodes: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children, + nodes = node[childKey]; + if (!nodes) return; + + for (var i = 0, l = nodes.length; i < l; i++) { + data.removeNodeCache(setting, nodes[i]); + } + data.removeSelectedNode(setting); + delete node[childKey]; + + if (!setting.data.keep.parent) { + node.isParent = false; + node.open = false; + var tmp_switchObj = $$(node, consts.id.SWITCH, setting), + tmp_icoObj = $$(node, consts.id.ICON, setting); + view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); + $$(node, consts.id.UL, setting).remove(); + } else { + $$(node, consts.id.UL, setting).empty(); + } + }, + setFirstNode: function(setting, parentNode) { + var childKey = setting.data.key.children, childLength = parentNode[childKey].length; + if ( childLength > 0) { + parentNode[childKey][0].isFirstNode = true; + } + }, + setLastNode: function(setting, parentNode) { + var childKey = setting.data.key.children, childLength = parentNode[childKey].length; + if ( childLength > 0) { + parentNode[childKey][childLength - 1].isLastNode = true; + } + }, + removeNode: function(setting, node) { + var root = data.getRoot(setting), + childKey = setting.data.key.children, + parentNode = (node.parentTId) ? node.getParentNode() : root; + + node.isFirstNode = false; + node.isLastNode = false; + node.getPreNode = function() {return null;}; + node.getNextNode = function() {return null;}; + + if (!data.getNodeCache(setting, node.tId)) { + return; + } + + $$(node, setting).remove(); + data.removeNodeCache(setting, node); + data.removeSelectedNode(setting, node); + + for (var i = 0, l = parentNode[childKey].length; i < l; i++) { + if (parentNode[childKey][i].tId == node.tId) { + parentNode[childKey].splice(i, 1); + break; + } + } + view.setFirstNode(setting, parentNode); + view.setLastNode(setting, parentNode); + + var tmp_ulObj,tmp_switchObj,tmp_icoObj, + childLength = parentNode[childKey].length; + + //repair nodes old parent + if (!setting.data.keep.parent && childLength == 0) { + //old parentNode has no child nodes + parentNode.isParent = false; + parentNode.open = false; + tmp_ulObj = $$(parentNode, consts.id.UL, setting); + tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); + tmp_icoObj = $$(parentNode, consts.id.ICON, setting); + view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); + tmp_ulObj.css("display", "none"); + + } else if (setting.view.showLine && childLength > 0) { + //old parentNode has child nodes + var newLast = parentNode[childKey][childLength - 1]; + tmp_ulObj = $$(newLast, consts.id.UL, setting); + tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); + tmp_icoObj = $$(newLast, consts.id.ICON, setting); + if (parentNode == root) { + if (parentNode[childKey].length == 1) { + //node was root, and ztree has only one root after move node + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); + } else { + var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); + view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + } else { + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + tmp_ulObj.removeClass(consts.line.LINE); + } + }, + replaceIcoClass: function(node, obj, newName) { + if (!obj || node.isAjaxing) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[tmpList.length-1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + }, + replaceSwitchClass: function(node, obj, newName) { + if (!obj) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.line.ROOT: + case consts.line.ROOTS: + case consts.line.CENTER: + case consts.line.BOTTOM: + case consts.line.NOLINE: + tmpList[0] = view.makeNodeLineClassEx(node) + newName; + break; + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + if (newName !== consts.folder.DOCU) { + obj.removeAttr("disabled"); + } else { + obj.attr("disabled", "disabled"); + } + }, + selectNode: function(setting, node, addFlag) { + if (!addFlag) { + view.cancelPreSelectedNode(setting, null, node); + } + $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); + data.addSelectedNode(setting, node); + setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); + }, + setNodeFontCss: function(setting, treeNode) { + var aObj = $$(treeNode, consts.id.A, setting), + fontCss = view.makeNodeFontCss(setting, treeNode); + if (fontCss) { + aObj.css(fontCss); + } + }, + setNodeLineIcos: function(setting, node) { + if (!node) return; + var switchObj = $$(node, consts.id.SWITCH, setting), + ulObj = $$(node, consts.id.UL, setting), + icoObj = $$(node, consts.id.ICON, setting), + ulLine = view.makeUlLineClass(setting, node); + if (ulLine.length==0) { + ulObj.removeClass(consts.line.LINE); + } else { + ulObj.addClass(ulLine); + } + switchObj.attr("class", view.makeNodeLineClass(setting, node)); + if (node.isParent) { + switchObj.removeAttr("disabled"); + } else { + switchObj.attr("disabled", "disabled"); + } + icoObj.removeAttr("style"); + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + icoObj.attr("class", view.makeNodeIcoClass(setting, node)); + }, + setNodeName: function(setting, node) { + var title = data.getNodeTitle(setting, node), + nObj = $$(node, consts.id.SPAN, setting); + nObj.empty(); + if (setting.view.nameIsHTML) { + nObj.html(data.getNodeName(setting, node)); + } else { + nObj.text(data.getNodeName(setting, node)); + } + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("title", !title ? "" : title); + } + }, + setNodeTarget: function(setting, node) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("target", view.makeNodeTarget(node)); + }, + setNodeUrl: function(setting, node) { + var aObj = $$(node, consts.id.A, setting), + url = view.makeNodeUrl(setting, node); + if (url == null || url.length == 0) { + aObj.removeAttr("href"); + } else { + aObj.attr("href", url); + } + }, + switchNode: function(setting, node) { + if (node.open || !tools.canAsync(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + } else if (setting.async.enable) { + if (!view.asyncNode(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + return; + } + } else if (node) { + view.expandCollapseNode(setting, node, !node.open); + } + } + }; + // zTree defind + $.fn.zTree = { + consts : _consts, + _z : { + tools: tools, + view: view, + event: event, + data: data + }, + getZTreeObj: function(treeId) { + var o = data.getZTreeTools(treeId); + return o ? o : null; + }, + destroy: function(treeId) { + if (!!treeId && treeId.length > 0) { + view.destroy(data.getSetting(treeId)); + } else { + for(var s in settings) { + view.destroy(settings[s]); + } + } + }, + init: function(obj, zSetting, zNodes) { + var setting = tools.clone(_setting); + $.extend(true, setting, zSetting); + setting.treeId = obj.attr("id"); + setting.treeObj = obj; + setting.treeObj.empty(); + settings[setting.treeId] = setting; + //For some older browser,(e.g., ie6) + if(typeof document.body.style.maxHeight === "undefined") { + setting.view.expandSpeed = ""; + } + data.initRoot(setting); + var root = data.getRoot(setting), + childKey = setting.data.key.children; + zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; + if (setting.data.simpleData.enable) { + root[childKey] = data.transformTozTreeFormat(setting, zNodes); + } else { + root[childKey] = zNodes; + } + + data.initCache(setting); + event.unbindTree(setting); + event.bindTree(setting); + event.unbindEvent(setting); + event.bindEvent(setting); + + var zTreeTools = { + setting : setting, + addNodes : function(parentNode, newNodes, isSilent) { + if (!newNodes) return null; + if (!parentNode) parentNode = null; + if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; + var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); + function addCallback() { + view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); + } + + if (tools.canAsync(setting, parentNode)) { + view.asyncNode(setting, parentNode, isSilent, addCallback); + } else { + addCallback(); + } + return xNewNodes; + }, + cancelSelectedNode : function(node) { + view.cancelPreSelectedNode(setting, node); + }, + destroy : function() { + view.destroy(setting); + }, + expandAll : function(expandFlag) { + expandFlag = !!expandFlag; + view.expandCollapseSonNode(setting, null, expandFlag, true); + return expandFlag; + }, + expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { + if (!node || !node.isParent) return null; + if (expandFlag !== true && expandFlag !== false) { + expandFlag = !node.open; + } + callbackFlag = !!callbackFlag; + + if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { + return null; + } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { + return null; + } + if (expandFlag && node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); + } + if (expandFlag === node.open && !sonSign) { + return null; + } + + data.getRoot(setting).expandTriggerFlag = callbackFlag; + if (!tools.canAsync(setting, node) && sonSign) { + view.expandCollapseSonNode(setting, node, expandFlag, true, function() { + if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} + }); + } else { + node.open = !expandFlag; + view.switchNode(this.setting, node); + if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} + } + return expandFlag; + }, + getNodes : function() { + return data.getNodes(setting); + }, + getNodeByParam : function(key, value, parentNode) { + if (!key) return null; + return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodeByTId : function(tId) { + return data.getNodeCache(setting, tId); + }, + getNodesByParam : function(key, value, parentNode) { + if (!key) return null; + return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodesByParamFuzzy : function(key, value, parentNode) { + if (!key) return null; + return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); + }, + getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { + isSingle = !!isSingle; + if (!filter || (typeof filter != "function")) return (isSingle ? null : []); + return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); + }, + getNodeIndex : function(node) { + if (!node) return null; + var childKey = setting.data.key.children, + parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + for (var i=0, l = parentNode[childKey].length; i < l; i++) { + if (parentNode[childKey][i] == node) return i; + } + return -1; + }, + getSelectedNodes : function() { + var r = [], list = data.getRoot(setting).curSelectedList; + for (var i=0, l=list.length; i<l; i++) { + r.push(list[i]); + } + return r; + }, + isSelectedNode : function(node) { + return data.isSelectedNode(setting, node); + }, + reAsyncChildNodes : function(parentNode, reloadType, isSilent) { + if (!this.setting.async.enable) return; + var isRoot = !parentNode; + if (isRoot) { + parentNode = data.getRoot(setting); + } + if (reloadType=="refresh") { + var childKey = this.setting.data.key.children; + for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) { + data.removeNodeCache(setting, parentNode[childKey][i]); + } + data.removeSelectedNode(setting); + parentNode[childKey] = []; + if (isRoot) { + this.setting.treeObj.empty(); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + ulObj.empty(); + } + } + view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent); + }, + refresh : function() { + this.setting.treeObj.empty(); + var root = data.getRoot(setting), + nodes = root[setting.data.key.children] + data.initRoot(setting); + root[setting.data.key.children] = nodes + data.initCache(setting); + view.createNodes(setting, 0, root[setting.data.key.children]); + }, + removeChildNodes : function(node) { + if (!node) return null; + var childKey = setting.data.key.children, + nodes = node[childKey]; + view.removeChildNodes(setting, node); + return nodes ? nodes : null; + }, + removeNode : function(node, callbackFlag) { + if (!node) return; + callbackFlag = !!callbackFlag; + if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; + view.removeNode(setting, node); + if (callbackFlag) { + this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); + } + }, + selectNode : function(node, addFlag) { + if (!node) return; + if (tools.uCanDo(setting)) { + addFlag = setting.view.selectedMulti && addFlag; + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() { + try{$$(node, setting).focus().blur();}catch(e){} + }); + } else { + try{$$(node, setting).focus().blur();}catch(e){} + } + view.selectNode(setting, node, addFlag); + } + }, + transformTozTreeNodes : function(simpleNodes) { + return data.transformTozTreeFormat(setting, simpleNodes); + }, + transformToArray : function(nodes) { + return data.transformToArrayFormat(setting, nodes); + }, + updateNode : function(node, checkTypeFlag) { + if (!node) return; + var nObj = $$(node, setting); + if (nObj.get(0) && tools.uCanDo(setting)) { + view.setNodeName(setting, node); + view.setNodeTarget(setting, node); + view.setNodeUrl(setting, node); + view.setNodeLineIcos(setting, node); + view.setNodeFontCss(setting, node); + } + } + } + root.treeTools = zTreeTools; + data.setZTreeTools(setting, zTreeTools); + + if (root[childKey] && root[childKey].length > 0) { + view.createNodes(setting, 0, root[childKey]); + } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { + view.asyncNode(setting); + } + return zTreeTools; + } + }; + + var zt = $.fn.zTree, + $$ = tools.$, + consts = zt.consts; +})(jQuery);/* + * JQuery zTree excheck v3.5.18 + * http://zTree.me/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * email: hunter.z@263.net + * Date: 2015-06-18 + */ +(function($){ + //default consts of excheck + var _consts = { + event: { + CHECK: "ztree_check" + }, + id: { + CHECK: "_check" + }, + checkbox: { + STYLE: "checkbox", + DEFAULT: "chk", + DISABLED: "disable", + FALSE: "false", + TRUE: "true", + FULL: "full", + PART: "part", + FOCUS: "focus" + }, + radio: { + STYLE: "radio", + TYPE_ALL: "all", + TYPE_LEVEL: "level" + } + }, + //default setting of excheck + _setting = { + check: { + enable: false, + autoCheckTrigger: false, + chkStyle: _consts.checkbox.STYLE, + nocheckInherit: false, + chkDisabledInherit: false, + radioType: _consts.radio.TYPE_LEVEL, + chkboxType: { + "Y": "ps", + "N": "ps" + } + }, + data: { + key: { + checked: "checked" + } + }, + callback: { + beforeCheck:null, + onCheck:null + } + }, + //default root of excheck + _initRoot = function (setting) { + var r = data.getRoot(setting); + r.radioCheckedList = []; + }, + //default cache of excheck + _initCache = function(treeId) {}, + //default bind event of excheck + _bindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.bind(c.CHECK, function (event, srcEvent, treeId, node) { + event.srcEvent = srcEvent; + tools.apply(setting.callback.onCheck, [event, treeId, node]); + }); + }, + _unbindEvent = function(setting) { + var o = setting.treeObj, + c = consts.event; + o.unbind(c.CHECK); + }, + //default event proxy of excheck + _eventProxy = function(e) { + var target = e.target, + setting = data.getSetting(e.data.treeId), + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null; + + if (tools.eqs(e.type, "mouseover")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "mouseoverCheck"; + } + } else if (tools.eqs(e.type, "mouseout")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "mouseoutCheck"; + } + } else if (tools.eqs(e.type, "click")) { + if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "checkNode"; + } + } + if (tId.length>0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "checkNode" : + nodeEventCallback = _handler.onCheckNode; + break; + case "mouseoverCheck" : + nodeEventCallback = _handler.onMouseoverCheck; + break; + case "mouseoutCheck" : + nodeEventCallback = _handler.onMouseoutCheck; + break; + } + } + var proxyResult = { + stop: nodeEventType === "checkNode", + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of excheck + _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + var checkedKey = setting.data.key.checked; + if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); + n[checkedKey] = !!n[checkedKey]; + n.checkedOld = n[checkedKey]; + if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); + n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); + if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); + n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); + if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); + n.halfCheck = !!n.halfCheck; + n.check_Child_State = -1; + n.check_Focus = false; + n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; + + if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { + var r = data.getRoot(setting); + r.radioCheckedList.push(n); + } + }, + //add dom for check + _beforeA = function(setting, node, html) { + var checkedKey = setting.data.key.checked; + if (setting.check.enable) { + data.makeChkFlag(setting, node); + html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>"); + } + }, + //update zTreeObj, add method of check + _zTreeTools = function(setting, zTreeTools) { + zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { + var checkedKey = this.setting.data.key.checked; + if (node.chkDisabled === true) return; + if (checked !== true && checked !== false) { + checked = !node[checkedKey]; + } + callbackFlag = !!callbackFlag; + + if (node[checkedKey] === checked && !checkTypeFlag) { + return; + } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { + return; + } + if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { + node[checkedKey] = checked; + var checkObj = $$(node, consts.id.CHECK, this.setting); + if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); + view.setChkClass(this.setting, checkObj, node); + view.repairParentChkClassWithSelf(this.setting, node); + if (callbackFlag) { + this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); + } + } + } + + zTreeTools.checkAllNodes = function(checked) { + view.repairAllChk(this.setting, !!checked); + } + + zTreeTools.getCheckedNodes = function(checked) { + var childKey = this.setting.data.key.children; + checked = (checked !== false); + return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); + } + + zTreeTools.getChangeCheckedNodes = function() { + var childKey = this.setting.data.key.children; + return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); + } + + zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { + disabled = !!disabled; + inheritParent = !!inheritParent; + inheritChildren = !!inheritChildren; + view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); + view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); + } + + var _updateNode = zTreeTools.updateNode; + zTreeTools.updateNode = function(node, checkTypeFlag) { + if (_updateNode) _updateNode.apply(zTreeTools, arguments); + if (!node || !this.setting.check.enable) return; + var nObj = $$(node, this.setting); + if (nObj.get(0) && tools.uCanDo(this.setting)) { + var checkObj = $$(node, consts.id.CHECK, this.setting); + if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); + view.setChkClass(this.setting, checkObj, node); + view.repairParentChkClassWithSelf(this.setting, node); + } + } + }, + //method of operate data + _data = { + getRadioCheckedList: function(setting) { + var checkedList = data.getRoot(setting).radioCheckedList; + for (var i=0, j=checkedList.length; i<j; i++) { + if(!data.getNodeCache(setting, checkedList[i].tId)) { + checkedList.splice(i, 1); + i--; j--; + } + } + return checkedList; + }, + getCheckStatus: function(setting, node) { + if (!setting.check.enable || node.nocheck || node.chkDisabled) return null; + var checkedKey = setting.data.key.checked, + r = { + checked: node[checkedKey], + half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) + }; + return r; + }, + getTreeCheckedNodes: function(setting, nodes, checked, results) { + if (!nodes) return []; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); + results = !results ? [] : results; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { + results.push(nodes[i]); + if(onlyOne) { + break; + } + } + data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); + if(onlyOne && results.length > 0) { + break; + } + } + return results; + }, + getTreeChangeCheckedNodes: function(setting, nodes, results) { + if (!nodes) return []; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked; + results = !results ? [] : results; + for (var i = 0, l = nodes.length; i < l; i++) { + if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { + results.push(nodes[i]); + } + data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); + } + return results; + }, + makeChkFlag: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + chkFlag = -1; + if (node[childKey]) { + for (var i = 0, l = node[childKey].length; i < l; i++) { + var cNode = node[childKey][i]; + var tmp = -1; + if (setting.check.chkStyle == consts.radio.STYLE) { + if (cNode.nocheck === true || cNode.chkDisabled === true) { + tmp = cNode.check_Child_State; + } else if (cNode.halfCheck === true) { + tmp = 2; + } else if (cNode[checkedKey]) { + tmp = 2; + } else { + tmp = cNode.check_Child_State > 0 ? 2:0; + } + if (tmp == 2) { + chkFlag = 2; break; + } else if (tmp == 0){ + chkFlag = 0; + } + } else if (setting.check.chkStyle == consts.checkbox.STYLE) { + if (cNode.nocheck === true || cNode.chkDisabled === true) { + tmp = cNode.check_Child_State; + } else if (cNode.halfCheck === true) { + tmp = 1; + } else if (cNode[checkedKey] ) { + tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; + } else { + tmp = (cNode.check_Child_State > 0) ? 1 : 0; + } + if (tmp === 1) { + chkFlag = 1; break; + } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { + chkFlag = 1; break; + } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { + chkFlag = 1; break; + } else if (tmp > -1) { + chkFlag = tmp; + } + } + } + } + node.check_Child_State = chkFlag; + } + }, + //method of event proxy + _event = { + + }, + //method of event handler + _handler = { + onCheckNode: function (event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkedKey = setting.data.key.checked; + if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; + node[checkedKey] = !node[checkedKey]; + view.checkNodeRelation(setting, node); + var checkObj = $$(node, consts.id.CHECK, setting); + view.setChkClass(setting, checkObj, node); + view.repairParentChkClassWithSelf(setting, node); + setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); + return true; + }, + onMouseoverCheck: function(event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkObj = $$(node, consts.id.CHECK, setting); + node.check_Focus = true; + view.setChkClass(setting, checkObj, node); + return true; + }, + onMouseoutCheck: function(event, node) { + if (node.chkDisabled === true) return false; + var setting = data.getSetting(event.data.treeId), + checkObj = $$(node, consts.id.CHECK, setting); + node.check_Focus = false; + view.setChkClass(setting, checkObj, node); + return true; + } + }, + //method of tools for zTree + _tools = { + + }, + //method of operate ztree dom + _view = { + checkNodeRelation: function(setting, node) { + var pNode, i, l, + childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + r = consts.radio; + if (setting.check.chkStyle == r.STYLE) { + var checkedList = data.getRadioCheckedList(setting); + if (node[checkedKey]) { + if (setting.check.radioType == r.TYPE_ALL) { + for (i = checkedList.length-1; i >= 0; i--) { + pNode = checkedList[i]; + if (pNode[checkedKey] && pNode != node) { + pNode[checkedKey] = false; + checkedList.splice(i, 1); + + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); + if (pNode.parentTId != node.parentTId) { + view.repairParentChkClassWithSelf(setting, pNode); + } + } + } + checkedList.push(node); + } else { + var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + for (i = 0, l = parentNode[childKey].length; i < l; i++) { + pNode = parentNode[childKey][i]; + if (pNode[checkedKey] && pNode != node) { + pNode[checkedKey] = false; + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); + } + } + } + } else if (setting.check.radioType == r.TYPE_ALL) { + for (i = 0, l = checkedList.length; i < l; i++) { + if (node == checkedList[i]) { + checkedList.splice(i, 1); + break; + } + } + } + + } else { + if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, true); + } + if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, false); + } + if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, true); + } + if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, false); + } + } + }, + makeChkClass: function(setting, node) { + var checkedKey = setting.data.key.checked, + c = consts.checkbox, r = consts.radio, + fullStyle = ""; + if (node.chkDisabled === true) { + fullStyle = c.DISABLED; + } else if (node.halfCheck) { + fullStyle = c.PART; + } else if (setting.check.chkStyle == r.STYLE) { + fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; + } else { + fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); + } + var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; + chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; + return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; + }, + repairAllChk: function(setting, checked) { + if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { + var checkedKey = setting.data.key.checked, + childKey = setting.data.key.children, + root = data.getRoot(setting); + for (var i = 0, l = root[childKey].length; i<l ; i++) { + var node = root[childKey][i]; + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = checked; + } + view.setSonNodeCheckBox(setting, node, checked); + } + } + }, + repairChkClass: function(setting, node) { + if (!node) return; + data.makeChkFlag(setting, node); + if (node.nocheck !== true) { + var checkObj = $$(node, consts.id.CHECK, setting); + view.setChkClass(setting, checkObj, node); + } + }, + repairParentChkClass: function(setting, node) { + if (!node || !node.parentTId) return; + var pNode = node.getParentNode(); + view.repairChkClass(setting, pNode); + view.repairParentChkClass(setting, pNode); + }, + repairParentChkClassWithSelf: function(setting, node) { + if (!node) return; + var childKey = setting.data.key.children; + if (node[childKey] && node[childKey].length > 0) { + view.repairParentChkClass(setting, node[childKey][0]); + } else { + view.repairParentChkClass(setting, node); + } + }, + repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { + if (!node) return; + var childKey = setting.data.key.children; + if (node.chkDisabled != chkDisabled) { + node.chkDisabled = chkDisabled; + } + view.repairChkClass(setting, node); + if (node[childKey] && inherit) { + for (var i = 0, l = node[childKey].length; i < l; i++) { + var sNode = node[childKey][i]; + view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); + } + } + }, + repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { + if (!node) return; + if (node.chkDisabled != chkDisabled && inherit) { + node.chkDisabled = chkDisabled; + } + view.repairChkClass(setting, node); + view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); + }, + setChkClass: function(setting, obj, node) { + if (!obj) return; + if (node.nocheck === true) { + obj.hide(); + } else { + obj.show(); + } + obj.attr('class', view.makeChkClass(setting, node)); + }, + setParentNodeCheckBox: function(setting, node, value, srcNode) { + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + data.makeChkFlag(setting, node); + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = value; + view.setChkClass(setting, checkObj, node); + if (setting.check.autoCheckTrigger && node != srcNode) { + setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); + } + } + if (node.parentTId) { + var pSign = true; + if (!value) { + var pNodes = node.getParentNode()[childKey]; + for (var i = 0, l = pNodes.length; i < l; i++) { + if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) + || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { + pSign = false; + break; + } + } + } + if (pSign) { + view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); + } + } + }, + setSonNodeCheckBox: function(setting, node, value, srcNode) { + if (!node) return; + var childKey = setting.data.key.children, + checkedKey = setting.data.key.checked, + checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + + var hasDisable = false; + if (node[childKey]) { + for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { + var sNode = node[childKey][i]; + view.setSonNodeCheckBox(setting, sNode, value, srcNode); + if (sNode.chkDisabled === true) hasDisable = true; + } + } + + if (node != data.getRoot(setting) && node.chkDisabled !== true) { + if (hasDisable && node.nocheck !== true) { + data.makeChkFlag(setting, node); + } + if (node.nocheck !== true && node.chkDisabled !== true) { + node[checkedKey] = value; + if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; + } else { + node.check_Child_State = -1; + } + view.setChkClass(setting, checkObj, node); + if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { + setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); + } + } + + } + }, + + _z = { + tools: _tools, + view: _view, + event: _event, + data: _data + }; + $.extend(true, $.fn.zTree.consts, _consts); + $.extend(true, $.fn.zTree._z, _z); + + var zt = $.fn.zTree, + tools = zt._z.tools, + consts = zt.consts, + view = zt._z.view, + data = zt._z.data, + event = zt._z.event, + $$ = tools.$; + + data.exSetting(_setting); + data.addInitBind(_bindEvent); + data.addInitUnBind(_unbindEvent); + data.addInitCache(_initCache); + data.addInitNode(_initNode); + data.addInitProxy(_eventProxy, true); + data.addInitRoot(_initRoot); + data.addBeforeA(_beforeA); + data.addZTreeTools(_zTreeTools); + + var _createNodes = view.createNodes; + view.createNodes = function(setting, level, nodes, parentNode) { + if (_createNodes) _createNodes.apply(view, arguments); + if (!nodes) return; + view.repairParentChkClassWithSelf(setting, parentNode); + } + var _removeNode = view.removeNode; + view.removeNode = function(setting, node) { + var parentNode = node.getParentNode(); + if (_removeNode) _removeNode.apply(view, arguments); + if (!node || !parentNode) return; + view.repairChkClass(setting, parentNode); + view.repairParentChkClass(setting, parentNode); + } + + var _appendNodes = view.appendNodes; + view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { + var html = ""; + if (_appendNodes) { + html = _appendNodes.apply(view, arguments); + } + if (parentNode) { + data.makeChkFlag(setting, parentNode); + } + return html; + } })(jQuery); \ No newline at end of file diff --git a/bi/slider.js b/bi/slider.js index 04ba397d9..f65d80897 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -45,13 +45,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track" + baseCls: "bi-single-slider bi-slider-track", + digit: 3 }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); - var self = this; + var self = this, o = this.options; var c = this._constant; this.enable = false; this.value = ""; @@ -80,9 +81,10 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); @@ -116,7 +118,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -138,7 +140,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - self.value = v; + this.setValue(v.toFixed(o.digit)); + self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); @@ -262,7 +265,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, setValue: function (v) { + var o = this.options; var value = BI.parseFloat(v); + value = value.toFixed(o.digit); if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; diff --git a/demo/js/widget/slider/demo.slider.js b/demo/js/widget/slider/demo.slider.js index 56a97ccad..fce9ad3b2 100644 --- a/demo/js/widget/slider/demo.slider.js +++ b/demo/js/widget/slider/demo.slider.js @@ -14,6 +14,7 @@ Demo.Slider = BI.inherit(BI.Widget, { var singleSlider = BI.createWidget({ type: "bi.single_slider", + digit: 0, width: 300, height: 50 }); @@ -23,7 +24,11 @@ Demo.Slider = BI.inherit(BI.Widget, { max: 100 }); + singleSlider.setValue(30); singleSlider.populate(); + singleSlider.on(BI.SingleSlider.EVENT_CHANGE, function () { + console.log(this.getValue()); + }); var normalSingleSlider = BI.createWidget({ type: "bi.single_slider_normal", diff --git a/dist/demo.js b/dist/demo.js index 9f9c13df8..dce92f59a 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -8448,6 +8448,7 @@ Demo.Slider = BI.inherit(BI.Widget, { var singleSlider = BI.createWidget({ type: "bi.single_slider", + digit: 0, width: 300, height: 50 }); @@ -8457,7 +8458,11 @@ Demo.Slider = BI.inherit(BI.Widget, { max: 100 }); + singleSlider.setValue(30); singleSlider.populate(); + singleSlider.on(BI.SingleSlider.EVENT_CHANGE, function () { + console.log(this.getValue()); + }); var normalSingleSlider = BI.createWidget({ type: "bi.single_slider_normal", diff --git a/dist/slider.js b/dist/slider.js index 04ba397d9..f65d80897 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -45,13 +45,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track" + baseCls: "bi-single-slider bi-slider-track", + digit: 3 }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); - var self = this; + var self = this, o = this.options; var c = this._constant; this.enable = false; this.value = ""; @@ -80,9 +81,10 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); @@ -116,7 +118,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -138,7 +140,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - self.value = v; + this.setValue(v.toFixed(o.digit)); + self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); @@ -262,7 +265,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, setValue: function (v) { + var o = this.options; var value = BI.parseFloat(v); + value = value.toFixed(o.digit); if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; diff --git a/src/addons/slider/singleslider/singleslider.js b/src/addons/slider/singleslider/singleslider.js index a7a6f8483..5547135e4 100644 --- a/src/addons/slider/singleslider/singleslider.js +++ b/src/addons/slider/singleslider/singleslider.js @@ -13,13 +13,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track" + baseCls: "bi-single-slider bi-slider-track", + digit: 3 }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); - var self = this; + var self = this, o = this.options; var c = this._constant; this.enable = false; this.value = ""; @@ -48,9 +49,10 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; + self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); @@ -84,7 +86,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent); + var v = self._getValueByPercent(significantPercent).toFixed(o.digit); self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -106,7 +108,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - self.value = v; + this.setValue(v.toFixed(o.digit)); + self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); @@ -230,7 +233,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }, setValue: function (v) { + var o = this.options; var value = BI.parseFloat(v); + value = value.toFixed(o.digit); if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; From b19ed21889e985262f8eb487ffe5666b126f0552 Mon Sep 17 00:00:00 2001 From: guy <guy@finereport.com> Date: Tue, 12 Sep 2017 17:47:02 +0800 Subject: [PATCH 09/14] combo --- bi/base.js | 30 ++++++++++++++++ bi/widget.css | 2 +- dist/base.js | 30 ++++++++++++++++ dist/bundle.css | 2 +- dist/bundle.js | 30 ++++++++++++++++ dist/bundle.min.css | 2 +- dist/bundle.min.js | 68 +++++++++++++++++------------------ dist/widget.css | 2 +- src/base/combination/combo.js | 30 ++++++++++++++++ 9 files changed, 158 insertions(+), 38 deletions(-) diff --git a/bi/base.js b/bi/base.js index dcf07f9dd..e7cb34fd4 100644 --- a/bi/base.js +++ b/bi/base.js @@ -3024,6 +3024,9 @@ BI.Combo = BI.inherit(BI.Widget, { var debounce = BI.debounce(function (e) { if (self.combo.element.__isMouseInBounds__(e)) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (!o.toggle && self.isViewVisible()) { + return; + } o.toggle ? self._toggle() : self._popupView(); if (self.isViewVisible()) { self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); @@ -3040,6 +3043,33 @@ BI.Combo = BI.inherit(BI.Widget, { st(e); }); break; + case "click-hover": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (self.isViewVisible()) { + return; + } + self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; } }); }, diff --git a/bi/widget.css b/bi/widget.css index 08bf6b8b8..401e34c4d 100644 --- a/bi/widget.css +++ b/bi/widget.css @@ -433,7 +433,7 @@ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/dist/base.js b/dist/base.js index 4c88d74fc..696292e97 100644 --- a/dist/base.js +++ b/dist/base.js @@ -3024,6 +3024,9 @@ BI.Combo = BI.inherit(BI.Widget, { var debounce = BI.debounce(function (e) { if (self.combo.element.__isMouseInBounds__(e)) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (!o.toggle && self.isViewVisible()) { + return; + } o.toggle ? self._toggle() : self._popupView(); if (self.isViewVisible()) { self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); @@ -3040,6 +3043,33 @@ BI.Combo = BI.inherit(BI.Widget, { st(e); }); break; + case "click-hover": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (self.isViewVisible()) { + return; + } + self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; } }); }, diff --git a/dist/bundle.css b/dist/bundle.css index e110b84c2..93d69e840 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -3210,7 +3210,7 @@ li.CodeMirror-hint-active { /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/dist/bundle.js b/dist/bundle.js index 68ba4b972..2485bfbf0 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -31812,6 +31812,9 @@ BI.Combo = BI.inherit(BI.Widget, { var debounce = BI.debounce(function (e) { if (self.combo.element.__isMouseInBounds__(e)) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (!o.toggle && self.isViewVisible()) { + return; + } o.toggle ? self._toggle() : self._popupView(); if (self.isViewVisible()) { self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); @@ -31828,6 +31831,33 @@ BI.Combo = BI.inherit(BI.Widget, { st(e); }); break; + case "click-hover": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (self.isViewVisible()) { + return; + } + self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; } }); }, diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 0bb3e9b10..7a397accf 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 908f42e96..81d4dc18f 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -11,37 +11,37 @@ this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.chi b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c<g;)b+=a*h[c],h[c]=b%f,b=Math.floor(b/f)}function b(a){for(var b=g,c=0;--b>=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<<m),a(1,1),b(2),j=c()}else a(0,l),a(1<<-k,0),j=c()+"0.00000000000000000000".slice(2,2+g);return g>0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),Number.prototype.add=function(a){return accAdd(a,this)},Number.prototype.sub=function(a){return accSub(this,a)},Number.prototype.mul=function(a){return accMul(a,this)},Number.prototype.div=function(a){return accDiv(this,a)},$.extend(String.prototype,{startWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substr(0,a.length)==a},endWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substring(this.length-a.length)==a},getQuery:function(a){var b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)"),c=this.substr(this.indexOf("?")+1).match(b);return c?unescape(c[2]):null},appendQuery:function(a){if(!a)return this;var b=this;return b.indexOf("?")===-1&&(b+="?"),b.endWith("?")!==!1||(b+="&"),$.each(a,function(a,c){"string"==typeof a&&(b+=a+"="+c+"&")}),b=b.substr(0,b.length-1)},replaceAll:function(a,b){return this.replace(new RegExp(a,"gm"),b)},perfectStart:function(a){return this.startWith(a)?this:a+this},allIndexOf:function(a){if("string"!=typeof a)return[];for(var b=this,c=[],d=0;b.length>0;){var e=b.indexOf(a);if(e===-1)break;c.push(d+e),b=b.substring(e+a.length,b.length),d+=e+a.length}return c}}),$.extend(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(a,b,c){var d=String(a);for(c||(c=" ");d.length<b;)d=c+d;return d.toString()},format:function(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/\{(\d+)\}/g,function(a,c){return b[c]})}}),BI.EventListener={listen:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,c,!1)}}):a.attachEvent?(a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+b,c)}}):void 0},capture:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!0),{remove:function(){a.removeEventListener(b,c,!0)}}):{remove:BI.emptyFn}},registerDefault:function(){}},!function(){var a=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||window.clearTimeout,b=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.setTimeout;BI.MouseMoveTracker=function(a,b,c){this._isDragging=!1,this._animationFrameID=null,this._domNode=c,this._onMove=a,this._onMoveEnd=b,this._onMouseMove=BI.bind(this._onMouseMove,this),this._onMouseUp=BI.bind(this._onMouseUp,this),this._didMouseMove=BI.bind(this._didMouseMove,this)},BI.MouseMoveTracker.prototype={constructor:BI.MouseMoveTracker,captureMouseMoves:function(a){this._eventMoveToken||this._eventUpToken||(this._eventMoveToken=BI.EventListener.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=BI.EventListener.listen(this._domNode,"mouseup",this._onMouseUp)),this._isDragging||(this._deltaX=0,this._deltaY=0,this._isDragging=!0,this._x=a.clientX,this._y=a.clientY),a.preventDefault?a.preventDefault():a.returnValue=!1},releaseMouseMoves:function(){this._eventMoveToken&&this._eventUpToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null),null!==this._animationFrameID&&(a(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)},isDragging:function(){return this._isDragging},_onMouseMove:function(a){var c=a.clientX,d=a.clientY;this._deltaX+=c-this._x,this._deltaY+=d-this._y,null===this._animationFrameID&&(this._animationFrameID=b(this._didMouseMove)),this._x=c,this._y=d,a.preventDefault?a.preventDefault():a.returnValue=!1},_didMouseMove:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0},_onMouseUp:function(){this._animationFrameID&&this._didMouseMove(),this._onMoveEnd()}}}(),!function(){function a(a){var e=0,f=0,g=0,h=0;return"detail"in a&&(f=a.detail),"wheelDelta"in a&&(f=-a.wheelDelta/120),"wheelDeltaY"in a&&(f=-a.wheelDeltaY/120),"wheelDeltaX"in a&&(e=-a.wheelDeltaX/120),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(e=f,f=0),g=e*b,h=f*b,"deltaY"in a&&(h=a.deltaY),"deltaX"in a&&(g=a.deltaX),(g||h)&&a.deltaMode&&(1===a.deltaMode?(g*=c,h*=c):(g*=d,h*=d)),g&&!e&&(e=g<1?-1:1),h&&!f&&(f=h<1?-1:1),{spinX:e,spinY:f,pixelX:g,pixelY:h}}var b=10,c=40,d=800,e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.setTimeout;BI.WheelHandler=function(a,b,c,d){this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=BI.bind(this._didWheel,this),"function"!=typeof b&&(b=b?function(){return!0}:function(){return!1}),"function"!=typeof c&&(c=c?function(){return!0}:function(){return!1}),"function"!=typeof d&&(d=d?function(){return!0}:function(){return!1}),this._handleScrollX=b,this._handleScrollY=c,this._stopPropagation=d,this._onWheelCallback=a,this.onWheel=BI.bind(this.onWheel,this)},BI.WheelHandler.prototype={constructor:BI.WheelHandler,onWheel:function(b){var c=a(b),d=this._deltaX+c.pixelX,f=this._deltaY+c.pixelY,g=this._handleScrollX(d,f),h=this._handleScrollY(f,d);if(g||h){this._deltaX+=g?c.pixelX:0,this._deltaY+=h?c.pixelY:0,b.preventDefault?b.preventDefault():b.returnValue=!1;var i;0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&(b.stopPropagation?b.stopPropagation():b.cancelBubble=!0),i=!0),i===!0&&null===this._animationFrameID&&(this._animationFrameID=e(this._didWheel))}},_didWheel:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}}(),_.extend(BI,{MAX:0x1000000000000000,MIN:-0x1000000000000000,EVENT_RESPONSE_TIME:200,zIndex_layer:1e5,zIndex_floatbox:1e6,zIndex_popup:1e7,zIndex_masker:1e8,zIndex_tip:1e9,emptyStr:"",emptyFn:function(){},empty:null,KeyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},Status:{SUCCESS:1,WRONG:2,START:3,END:4,WAITING:5,READY:6,RUNNING:7,OUTOFBOUNDS:8,NULL:-1},Direction:{Top:"top",Bottom:"bottom",Left:"left",Right:"right",Custom:"custom"},Axis:{Vertical:"vertical",Horizontal:"horizontal"},Selection:{Default:-2,None:-1,Single:0,Multi:1,All:2},HorizontalAlign:{Left:"left",Right:"right",Center:"center"},VerticalAlign:{Middle:"middle",Top:"top",Bottom:"bottom"}}),BI.version="2.0",BI.AbsoluteCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-center-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0),right:c.hgap+c.rgap+(b.rgap||0),top:c.vgap+c.tgap+(b.tgap||0),bottom:c.vgap+c.bgap+(b.bgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),BI.AbsoluteHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-horizontal-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0),right:c.hgap+c.rgap+(b.rgap||0),margin:"auto"}),c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),BI.AbsoluteVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-vertical-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteVerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0),bottom:c.vgap+c.bgap+(b.bgap||0),margin:"auto"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),BI.CenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-adapt-layout",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.CenterAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.CenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),BI.HorizontalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-adapt-layout",verticalAlign:BI.VerticalAlign.Middle,columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),BI.LeftRightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-right-vertical-adapt-layout",items:{},llgap:0,lrgap:0,lhgap:0,rlgap:0,rrgap:0,rhgap:0})},render:function(){BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options;if("left"in a){var c=BI.createWidget({type:"bi.vertical_adapt",items:a.left,hgap:b.lhgap,lgap:b.llgap,rgap:b.lrgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})}if("right"in a){var d=BI.createWidget({type:"bi.vertical_adapt",items:a.right,hgap:b.rhgap,lgap:b.rlgap,rgap:b.rrgap});d.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[d]})}},populate:function(a){BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_right_vertical_adapt",BI.LeftRightVerticalAdaptLayout),BI.LeftVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})},populate:function(a){BI.LeftVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_vertical_adapt",BI.LeftVerticalAdaptLayout),BI.RightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-right-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[c]})},populate:function(a){BI.RightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),BI.VerticalAdaptLayout=BI.inherit(BI.Layout,{props:{baseCls:"bi-vertical-adapt-layout",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0},render:function(){BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},_getWrapper:function(){return this.$tr},resize:function(){},populate:function(a){BI.VerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),BI.HorizontalAutoLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizon-auto-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAutoLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),BI.FloatCenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatCenterAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},mounted:function(){var a=this,b=this.left.element.outerWidth(),c=this.left.element.outerHeight();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.center_adapt",element:this,items:[this.left]})},stroke:function(a){var b=this.options;this.left=BI.createWidget({type:"bi.vertical",items:a,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,lgap:b.lgap,rgap:b.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]})},populate:function(a){BI.FloatCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.float_center_adapt",BI.FloatCenterAdaptLayout),BI.FloatHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-horizontal-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},mounted:function(){var a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-center-layout"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative","flex-shrink":"0"}),c},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-layout",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass(a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical_center",BI.FlexVerticalCenter),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-center-layout clearfix"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=$("<div>").addClass("flex-wrapper-center-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-horizontal-layout clearfix",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.$wrapper=$("<div>").addClass("flex-wrapper-horizontal-layout-wrapper "+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-vertical-center clearfix",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.$wrapper=$("<div>").addClass("flex-wrapper-vertical-center-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_vertical_center",BI.FlexVerticalCenter),BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),BI.AdaptiveLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this,arguments),{baseCls:"bi-adaptive-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AdaptiveLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments); d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),BI.BorderLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.BorderLayout.superclass.props.apply(this,arguments),{baseCls:"bi-border-layout",items:{}})},render:function(){BI.BorderLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),BI.CardLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CardLayout.superclass.props.apply(this,arguments),{baseCls:"bi-card-layout",items:[]})},render:function(){BI.CardLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},stroke:function(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),BI.DefaultLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DefaultLayout.superclass.props.apply(this,arguments),{hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[]})},render:function(){BI.DefaultLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),BI.DivisionLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DivisionLayout.superclass.props.apply(this,arguments),{baseCls:"bi-division-layout",columns:null,rows:null,items:[]})},render:function(){BI.DivisionLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.opitons.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k<f;k++)for(var l=0,m=0;m<g;m++){if(!h[k][m])throw new Error("item be required");if(this.hasWidget(this.getName()+k+"_"+m))n=this.getWidgetByName(this.getName()+k+"_"+m);else{var n=BI.createWidget(h[k][m]);this.addWidget(this.getName()+k+"_"+m,n)}var o=100*l/i[k];if(n.element.css({position:"absolute",left:o+"%"}),m>0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m<e.columns;m++)for(var q=0,k=0;k<e.rows;k++){var n=this.getWidgetByName(this.getName()+k+"_"+m),r=100*q/j[m];if(n.element.css({top:r+"%"}),k>0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),BI.FloatLeftLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-left-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatLeftLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatLeftLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left",BI.FloatLeftLayout),BI.FloatRightLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatRightLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-right-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatRightLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),BI.GridLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.GridLayout.superclass.props.apply(this,arguments),{baseCls:"bi-grid-layout",columns:null,rows:null,items:[]})},render:function(){BI.GridLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k<f;k++)j[k]=[];BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(b,c){j[a][b]=BI.createWidget(c)}):void(j[b.row][b.column]=BI.createWidget(b))});for(var k=0;k<f;k++)for(var l=0;l<g;l++)j[k][l]||(j[k][l]=BI.createWidget({type:"bi.layout"})),d(j[k][l],k,l),j[k][l].element.css({position:"absolute",top:i*k+"%",left:h*l+"%",right:100-h*(l+1)+"%",bottom:100-i*(k+1)+"%"}),this.addWidget(j[k][l])},populate:function(a){BI.GridLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.grid",BI.GridLayout),BI.HorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-layout",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalLayout.superclass.render.apply(this,arguments),this.$table=$("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)>0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)>0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)>0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)>0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal",BI.HorizontalLayout),BI.HorizontalCellLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-cell-layout",scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCellLayout.superclass.render.apply(this,arguments),this.element.css({display:"table","vertical-align":"top"}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;f<b.length&&BI.isNumber(h.columnSize[f]);f++)e(b[f],this.rows,f),i.push(BI.extend({top:0,bottom:0,left:h.columnSize[f]<=1?100*j+"%":j,width:h.columnSize[f]<=1?100*h.columnSize[f]+"%":h.columnSize[f]},b[f])),j+=h.columnSize[f]+(h.columnSize[f]<1?0:h.hgap);for(g=b.length-1;g>f;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f<b.length&&(e(b[f],this.rows,f),i.push(BI.extend({top:0,bottom:0,left:j<=1?100*j+"%":j,right:k<=1?100*k+"%":k},b[f])));var l=BI.createWidget({type:"bi.absolute",height:BI.isArray(h.rowSize)?h.rowSize[this.rows]:h.rowSize,items:i});return this.rows>0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:c.vgap+c.tgap+"px",bottom:c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},populate:function(a){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-v-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:c.hgap+c.lgap+"px",right:c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=$("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h<b.length;h++){var i=BI.createWidget(b[h]);i.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),e(i,this.rows++,h);var j=BI.createWidget({type:"bi.default",attributes:{width:f.columnSize[h]<=1?100*f.columnSize[h]+"%":f.columnSize[h]},tagName:"td",items:[i]});j.element.css({position:"relative","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),g.addItem(j)}return this.addWidget(this.getName()+a,g),g},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$table.append(b),this.element.append(this.$table))},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TdLayout.superclass.addItem.apply(this,arguments)},populate:function(a){BI.TdLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.td",BI.TdLayout),BI.VerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,scrolly:!0})},render:function(){BI.VerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.VerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.VerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical",BI.VerticalLayout),BI.WindowLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.WindowLayout.superclass.props.apply(this,arguments),{baseCls:"bi-window-layout",columns:3,rows:2,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,columnSize:[100,"fill",200],rowSize:[100,"fill"],items:[[{el:{type:"bi.button",text:"button1"}},{el:{type:"bi.button",text:"button2"}},{el:{type:"bi.button",text:"button3"}}]]})},render:function(){BI.WindowLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f<e.rows;f++)for(var g=0;g<e.columns;g++){if(!e.items[f][g])throw new Error("item be required");if(!this.hasWidget(this.getName()+f+"_"+g)){var h=BI.createWidget(e.items[f][g]);h.element.css({position:"absolute"}),this.addWidget(this.getName()+f+"_"+g,h)}}var i={},j={},k={},l={};i[0]=0,k[0]=0,j[e.columns-1]=0,l[e.rows-1]=0;for(var f=0;f<e.rows;f++){for(var g=0;g<e.columns;g++){var m=this.getWidgetByName(this.getName()+f+"_"+g);BI.isNull(k[f])&&(k[f]=k[f-1]+(e.rowSize[f-1]<1?e.rowSize[f-1]:e.rowSize[f-1]+e.vgap+e.bgap));var n=k[f]<=1?100*k[f]+"%":k[f]+e.vgap+e.tgap+"px",o="";BI.isNumber(e.rowSize[f])&&(o=e.rowSize[f]<=1?100*e.rowSize[f]+"%":e.rowSize[f]+"px"),m.element.css({top:n,height:o}),d(m,f,g)}if(!BI.isNumber(e.rowSize[f]))break}for(var f=e.rows-1;f>=0;f--){for(var g=0;g<e.columns;g++){var m=this.getWidgetByName(this.getName()+f+"_"+g);BI.isNull(l[f])&&(l[f]=l[f+1]+(e.rowSize[f+1]<1?e.rowSize[f+1]:e.rowSize[f+1]+e.vgap+e.tgap));var p=l[f]<=1?100*l[f]+"%":l[f]+e.vgap+e.bgap+"px",o="";BI.isNumber(e.rowSize[f])&&(o=e.rowSize[f]<=1?100*e.rowSize[f]+"%":e.rowSize[f]+"px"),m.element.css({bottom:p,height:o}),d(m,f,g)}if(!BI.isNumber(e.rowSize[f]))break}for(var g=0;g<e.columns;g++){for(var f=0;f<e.rows;f++){var m=this.getWidgetByName(this.getName()+f+"_"+g);BI.isNull(i[g])&&(i[g]=i[g-1]+(e.columnSize[g-1]<1?e.columnSize[g-1]:e.columnSize[g-1]+e.hgap+e.rgap));var q=i[g]<=1?100*i[g]+"%":i[g]+e.hgap+e.lgap+"px",h="";BI.isNumber(e.columnSize[g])&&(h=e.columnSize[g]<=1?100*e.columnSize[g]+"%":e.columnSize[g]+"px"),m.element.css({left:q,width:h}),d(m,f,g)}if(!BI.isNumber(e.columnSize[g]))break}for(var g=e.columns-1;g>=0;g--){for(var f=0;f<e.rows;f++){var m=this.getWidgetByName(this.getName()+f+"_"+g);BI.isNull(j[g])&&(j[g]=j[g+1]+(e.columnSize[g+1]<1?e.columnSize[g+1]:e.columnSize[g+1]+e.hgap+e.lgap));var r=j[g]<=1?100*j[g]+"%":j[g]+e.hgap+e.rgap+"px",h="";BI.isNumber(e.columnSize[g])&&(h=e.columnSize[g]<=1?100*e.columnSize[g]+"%":e.columnSize[g]+"px"),m.element.css({right:r,width:h}),d(m,f,g)}if(!BI.isNumber(e.columnSize[g]))break}},populate:function(a){BI.WindowLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.window",BI.WindowLayout),BI.CenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.CenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=[];BI.each(a,function(b){c.push({column:b,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===b?"first-element ":"")+(b===a.length-1?"last-element":"")})})}),BI.each(a,function(a,d){if(d){var e=BI.createWidget(d);e.element.css({position:"absolute",left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap,width:"auto",height:"auto"}),c[a].el.addItem(e)}}),BI.createWidget({type:"bi.grid",element:this,columns:c.length,rows:1,items:c})},populate:function(a){BI.CenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.center",BI.CenterLayout),BI.FloatCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=[],d=100/a.length;BI.each(a,function(b){var e=BI.createWidget({type:"bi.default"});e.element.addClass("center-element "+(0===b?"first-element ":"")+(b===a.length-1?"last-element":"")).css({ width:d+"%",height:"100%"}),c.push({el:e})}),BI.each(a,function(a,d){if(d){var e=BI.createWidget(d);e.element.css({position:"absolute",left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap,width:"auto",height:"auto"}),c[a].el.addItem(e)}}),BI.createWidget({type:"bi.left",element:this,items:c})},populate:function(a){BI.FloatCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.float_center",BI.FloatCenterLayout),BI.HorizontalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=[];BI.each(a,function(b){c.push({column:b,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===b?"first-element ":"")+(b===a.length-1?"last-element":"")})})}),BI.each(a,function(a,d){if(d){var e=BI.createWidget(d);e.element.css({position:"absolute",left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap,width:"auto"}),c[a].el.addItem(e)}}),BI.createWidget({type:"bi.grid",element:this,columns:c.length,rows:1,items:c})},populate:function(a){BI.HorizontalCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_center",BI.HorizontalCenterLayout),BI.VerticalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.VerticalCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=[];BI.each(a,function(b){c.push({column:0,row:b,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===b?"first-element ":"")+(b===a.length-1?"last-element":"")})})}),BI.each(a,function(a,d){if(d){var e=BI.createWidget(d);e.element.css({position:"absolute",left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap,height:"auto"}),c[a].el.addItem(e)}}),BI.createWidget({type:"bi.grid",element:this,columns:1,rows:c.length,items:c})},populate:function(a){BI.VerticalCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical_center",BI.VerticalCenterLayout),BI.Data=Data={},Data.Constant=BI.Constant=BICst={},function(){var a={};Data.BufferPool={put:function(b,c){if(BI.isNotNull(a[b]))throw new Error("Buffer Pool has the key already!");a[b]=c},get:function(b){return a[b]}}}(),function(){var a={};Data.SharingPool={_Shared:a,put:function(b,c){a[b]=c},cat:function(){for(var b=Array.prototype.slice.call(arguments,0),c=a,d=0;d<b.length;d++)c=c&&c[b[d]];return c},get:function(){return BI.deepClone(this.cat.apply(this,arguments))},remove:function(b){delete a[b]}}}(),Data.Req={},Data.Source=BISource={},$(function(){var a=BI.isSupportCss3("flex");BI.Plugin.registerWidget("bi.horizontal",function(b){return a?BI.extend(b,{type:"bi.flex_horizontal"}):b}),BI.Plugin.registerWidget("bi.center_adapt",function(b){return a&&b.items&&b.items.length<=1?b.scrollable===!0||b.scrollx===!0||b.scrolly===!0?BI.isIE()?b:BI.extend(b,{type:"bi.flex_wrapper_center"}):BI.extend(b,{type:"bi.flex_center"}):b}),BI.Plugin.registerWidget("bi.vertical_adapt",function(b){return a?b.scrollable===!0||b.scrollx===!0||b.scrolly===!0?BI.isIE()?b:BI.extend({},b,{type:"bi.flex_wrapper_vertical_center"}):BI.extend(b,{type:"bi.flex_vertical_center"}):b}),BI.Plugin.registerWidget("bi.float_center_adapt",function(b){return a?b.scrollable===!0||b.scrollx===!0||b.scrolly===!0?BI.isIE()?b:BI.extend({},b,{type:"bi.flex_wrapper_center"}):BI.extend(b,{type:"bi.flex_center"}):b}),BI.Plugin.registerWidget("bi.grid_table_scrollbar",function(a){return BI.isIE9Below()?BI.extend(a,{type:"bi.native_table_scrollbar"}):a}),BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar",function(a){return BI.isIE9Below()?BI.extend(a,{type:"bi.native_table_horizontal_scrollbar"}):a}),BI.Plugin.registerWidget("bi.grid_table",function(a){return BI.isChrome()&&BI.isWindows()&&!BI.isEdge()?a:BI.extend(a,{type:"bi.quick_grid_table"})}),BI.Plugin.registerWidget("bi.collection_table",function(a){return BI.isChrome()&&BI.isWindows()&&!BI.isEdge()?a:BI.extend(a,{type:"bi.quick_collection_table"})}),BI.isIE9Below()&&(BI.GridTableScrollbar.SIZE=18)}),function(a){"function"==typeof define&&define.amd?define(["../core/jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=g.detail*-1),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=g.wheelDeltaX*-1),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=m*-1,m=0),j=0===m?l:m,"deltaY"in g&&(m=g.deltaY*-1,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=l*-1)),0!==m||0!==l){if(1===g.deltaMode){var q=40;j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=800;j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||n<f)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_init:function(){BI.Pane.superclass._init.apply(this,arguments)},_assertTip:function(){var a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.vertical",element:this,items:[this._tipText],bgap:25}))},loading:function(){var a=this,b=this.options;b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.vtape",items:[{el:{type:"bi.layout",cls:"loading-background"},height:30}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=BI.createWidget({type:"bi.layout",cls:"loading-background",height:30}),this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this._loading,left:0,right:0,top:0}]}))},loaded:function(){var a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED)},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null})},_showToolTip:function(a,b){b||(b={});var c=this.getTipType()||(this.isEnabled()?"success":"warning"),d="success"===c?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(d)&&BI.Tooltips.show(a,this.getName(),d,c,this,b)},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover()},enableHover:function(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(a){b._e=a,b.element.__isMouseInBounds__(a)||(BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip())}),this.element.on("mouseleave.title"+this.getName(),function(){b._e=null,BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip()}),this._hoverBinded=!0)},disabledHover:function(){BI.isNotNull(this.timeout)&&clearTimeout(this.timeout),this._hideTooltip(),$(this.element).unbind("mouseenter.title"+this.getName()).unbind("mousemove.title"+this.getName()).unbind("mouseleave.title"+this.getName()),this._hoverBinded=!1},populate:function(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value}}),BI.Text=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Text.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:""})},_init:function(){BI.Text.superclass._init.apply(this,arguments);var a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.text.element.__textKeywordMarked__(b.text,b.keyword,b.py)},doRedMark:function(a){var b=this.options;this.text.element.__textKeywordMarked__(b.text||b.value,a,b.py)},unRedMark:function(){var a=this.options;this.text.element.__textKeywordMarked__(a.text||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Text.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.text((a+"").replaceAll(" "," "))}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-basic-button"+(a.invalid?"":" cursor-pointer"),value:"",text:"",stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.BasicButton.superclass._init.apply(this,arguments);var a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow()},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){d.stopEvent&&a.stopEvent(),d.stopPropagation&&a.stopPropagation()}function b(b){a(b),!c.isEnabled()||c.isOnce()&&c.isSelected()||h.apply(c,arguments)}var c=this,d=this.options,f=this.handle();if(f){f=f.element;var g=(d.trigger||"").split(",");BI.each(g,function(g,h){switch(h){case"mouseup":var i=!1;f.mousedown(function(){i=!0,a(e)}),f.mouseup(function(c){i===!0&&b(c),i=!1,a(c)});break;case"mousedown":var i=!1,j=!1;f.mousedown(function(d){$(document).bind("mouseup."+c.getName(),function(a){!BI.DOM.isExist(c)||f.__isMouseInBounds__(a)||i!==!0||j||c._trigger(),i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(c.isSelected()?j=!0:b(d),i=!0,a(d))}),f.mouseup(function(a){BI.DOM.isExist(c)&&i===!0&&j===!0&&b(a),i=!1,j=!1,$(document).unbind("mouseup."+c.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var k,i=!1;f.mousedown(function(b){$(document).bind("mouseup."+c.getName(),function(a){k&&clearInterval(k),k=null,i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(!c.isEnabled()||c.isOnce()&&c.isSelected()||(k=setInterval(function(){c.doClick()},100),i=!0,a(b)))});break;default:(d.stopEvent||d.stopPropagation)&&(f.mousedown(function(b){a(b)}),f.mouseup(function(b){a(b)})),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,!0)}},_trigger:function(){var a=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){a.handler.call(this,this.getValue(),this);var b=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.BasicButton.EVENT_CHANGE,b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(),this.isValid()&&this.doClick(a)},beforeClick:function(){},doClick:function(){},handle:function(){return this},hover:function(){this._hover=!0,this.handle().element.addClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!0)},dishover:function(){this._hover=!1,this.handle().element.removeClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},setSelected:function(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.isShadowShowingOnSelected&&this.$mask&&this.$mask.setVisible(!1)},isSelected:function(){return this.options.selected},isOnce:function(){return this.options.once},isForceSelected:function(){return this.options.forceSelected},isForceNotSelected:function(){return this.options.forceNotSelected},isDisableSelected:function(){return this.options.disableSelected},setText:function(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},empty:function(){$(document).unbind("mouseup."+this.getName()),BI.BasicButton.superclass.empty.apply(this,arguments)},destroy:function(){BI.BasicButton.superclass.destroy.apply(this,arguments)}}),BI.BasicButton.EVENT_CHANGE="BasicButton.EVENT_CHANGE",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.isOpened())})},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.setOpened(!this.isOpened())},isOnce:function(){return!1},isOpened:function(){return!!this.options.open},setOpened:function(a){this.options.open=!!a},triggerCollapse:function(){this.isOpened()&&(this.setOpened(!1),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,this.getValue(),this))},triggerExpand:function(){this.isOpened()||(this.setOpened(!0),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,this.getValue(),this))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),BI.ButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-group",behaviors:{},items:[],chooseType:BI.Selection.Single,layouts:[{type:"bi.center",hgap:0,vgap:0}]})},_init:function(){BI.ButtonGroup.superclass._init.apply(this,arguments);var a={};BI.each(this.options.behaviors,function(b,c){a[b]=BI.BehaviorFactory.createBehavior(b,{rule:c})}),this.behaviors=a,this.populate(this.options.items)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},empty:function(){BI.ButtonGroup.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.ButtonGroup.superclass.destroy.apply(this,arguments),this.options.items=[]}}),BI.extend(BI.ButtonGroup,{CHOOSE_TYPE_SINGLE:BI.Selection.Single,CHOOSE_TYPE_MULTI:BI.Selection.Multi,CHOOSE_TYPE_ALL:BI.Selection.All,CHOOSE_TYPE_NONE:BI.Selection.None,CHOOSE_TYPE_DEFAULT:BI.Selection.Default}),BI.ButtonGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_group",BI.ButtonGroup),BI.ButtonTree=BI.inherit(BI.ButtonGroup,{_defaultConfig:function(){return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-tree"})},_init:function(){BI.ButtonTree.superclass._init.apply(this,arguments)},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),BI.TreeView=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree",paras:{},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments),this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]})},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"<ul id='"+this.id+"' class='ztree'></ul>"}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){l.nodes.checkNode(c,!c.checked,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+window.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+window.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return BI.servletURL+"?op="+l.options.op+"&cmd="+l.options.cmd+"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^<html>[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?a.text.replace(/<[^>]+>/g,"").replaceAll(" "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,BI.isKey(b.paras.keyword)?c.text=$("<div>").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=(c.text+"").replaceAll(" "," ")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{ -enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes&&this.nodes.checkAllNodes(a)},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView),BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b);d.checkNode(c,!c.checked,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||e.itemsCreator(g,h)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},getValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments);else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i<j;i++){if(g=g[h[i]],null==g)return;if(BI.isEmpty(g))break}d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_SELECT_DATA,notSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)})}},_getSelectedValues:function(){function a(d){BI.each(d,function(d,e){var f=e.getCheckStatus();if(f.checked===!1)return!0;var g=e.parentValues||b._getParentValues(e),h=g.concat([b._getNodeValue(e)]);return b._buildTree(c,h),BI.isNotEmptyArray(e.children)?(a(e.children),!0):void(f.half===!0&&b._getHalfSelectedValues(c,e))})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,g.length>0&&c(d._dealWidthNodes(g)),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){var a=this.options,b=BI.PartTree.superclass.getValue.apply(this,arguments);return a.itemsCreator({type:BI.TreeView.REQ_TYPE_ADJUST_DATA,selectedValues:b},function(a){b=a}),b},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.FloatBoxController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager,BI.Canvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-canvas"})},_init:function(){BI.Canvas.superclass._init.apply(this,arguments);var a=this.options,b=document.createElement("canvas");document.createElement("canvas").getContext||(b=window.G_vmlCanvasManager.initElement(b)),this.element.append(b),b.width=a.width,b.height=a.height,$(b).width("100%"),$(b).height("100%"),this.canvas=b,this._queue=[]},_getContext:function(){return this.ctx||(this.ctx=this.canvas.getContext("2d")),this.ctx},_attr:function(a,b){var c=this;if(!BI.isNull(a))return BI.isObject(a)?void BI.each(a,function(a,b){c._queue.push({k:a,v:b})}):void this._queue.push({k:a,v:b})},_line:function(a,b){var c=this,d=[].slice.call(arguments,2);BI.isOdd(d.length)&&(this._attr(BI.last(d)),d=BI.initial(d)),this._attr("moveTo",[a,b]);var e=BI.filter(d,function(a){return a%2===0}),f=BI.filter(d,function(a){return a%2!==0});d=BI.zip(e,f),BI.each(d,function(a,b){c._attr("lineTo",b)})},line:function(a,b,c,d){this._line.apply(this,arguments),this._attr("stroke",[])},rect:function(a,b,c,d,e){this._attr("fillStyle",e),this._attr("fillRect",[a,b,c,d])},circle:function(a,b,c,d){this._attr({fillStyle:d,beginPath:[],arc:[a,b,c,0,2*Math.PI,!0],closePath:[],fill:[]})},hollow:function(){this._attr("beginPath",[]),this._line.apply(this,arguments),this._attr("closePath",[]),this._attr("stroke",[])},solid:function(){this.hollow.apply(this,arguments),this._attr("fill",[])},gradient:function(a,b,c,d,e,f){var g=this._getContext().createLinearGradient(a,b,c,d);return g.addColorStop(0,e),g.addColorStop(1,f),g},reset:function(){this._getContext().clearRect(0,0,this.canvas.width,this.canvas.height)},stroke:function(a){var b=this;BI.nextTick(function(){var c=b._getContext();BI.each(b._queue,function(a,b){BI.isFunction(c[b.k])?c[b.k].apply(c,b.v):c[b.k]=b.v}),b._queue=[],a&&a()})}}),BI.shortcut("bi.canvas",BI.Canvas),BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate()),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f<g;f++){var h=a.cellSizeAndPositionGetter(f);if(null==h.height||isNaN(h.height)||null==h.width||isNaN(h.width)||null==h.x||isNaN(h.x)||null==h.y||isNaN(h.y))throw Error();d=Math.max(d,h.y+h.height),e=Math.max(e,h.x+h.width),h.index=f,b[f]=h,c.registerCell(h,f)}this._cellMetadata=b,this._sectionManager=c,this._height=d,this._width=e},_cellRenderers:function(a,b,c,d){return this._lastRenderedCellIndices=this._sectionManager.getCellIndices(a,b,c,d),this._cellGroupRenderer()},_cellGroupRenderer:function(){var a=this,b=(this.options,[]);return BI.each(this._lastRenderedCellIndices,function(c,d){var e=a._sectionManager.getCellMetadata(d);b.push(e)}),b},_calculateChildrenToRender:function(){var a=this,b=this.options,c=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),d=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),e=Math.max(0,c-b.horizontalOverscanSize),f=Math.max(0,d-b.verticalOverscanSize),g=Math.min(this._width,c+b.width+b.horizontalOverscanSize),h=Math.min(this._height,d+b.height+b.verticalOverscanSize);if(g>0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k=[],l={},m={},n={},o=0,p=i.length;o<p;o++){var q=i[o];m[q.x]=q.x,m[q.x+q.width]=q.x+q.width,n[q.y]=q.y,n[q.y+q.height]=q.y+q.height}m=BI.toArray(m),n=BI.toArray(n);for(var r=BI.invert(m),s=BI.invert(n),t={},u={},v={},w={},x=function(a,b){null==a[b]&&(a[b]=Number.MAX_VALUE)},y=function(a,b){null==a[b]&&(a[b]=0)},o=0,p=i.length;o<p;o++){var z,q=i[o],A=BI.deepIndexOf(this.renderedKeys,q.index);A>-1?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k.push(q.index),l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){BI.deepContains(a.renderedKeys,c)?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(I,b)||BI.deepContains(J,b)||K.push(a)}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a){L.push(j[a])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0&&(this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft))},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.combo}]}),b.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(","),d=function(a){b.stopEvent&&a.stopEvent(),b.stopPropagation&&a.stopPropagation()};BI.each(c,function(c,e){switch(e){case"hover":a.element.on("mouseenter."+a.getName(),function(b){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND))}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&b.toggle===!0&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))});break;case"click":var f=BI.debounce(function(c){a.combo.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isViewVisible()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0);a.element.off(e+"."+a.getName()).on(e+"."+a.getName(),function(a){f(a),d(a)})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view"}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(a){if(!(this.element.find(a.target).length>0)){var b=this.options.hideChecker.apply(this,[a]);b!==!1&&this._hideView()}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(),this.adjustHeight(),this.element.addClass(this.options.comboClass),$(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(){var a=this.options;if(this.popupView&&a.isNeedAdjustWidth===!0){this.resetListWidth("");var b=this.popupView.element.outerWidth(),c=this.element.outerWidth()||a.width;b>c+80?c+=80:b>c&&(c=b),this.resetListWidth(c<100?100:c)}},adjustHeight:function(){var a=this.options,b={};if(this.popupView){var c=this.popupView.isVisible();switch(this.popupView.visible(),a.direction){case"bottom":case"bottom,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","right","left"],a.offsetStyle);break;case"top":case"top,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","right","left"],a.offsetStyle);break;case"left":case"left,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","bottom","top"],a.offsetStyle);break;case"right":case"right,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","bottom","top"],a.offsetStyle);break;case"top,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","left","right"],a.offsetStyle);break;case"bottom,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","left","right"],a.offsetStyle);break;case"left,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","top","bottom"],a.offsetStyle);break;case"right,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","top","bottom"],a.offsetStyle);break;case"top,custom":case"custom,top":b=$.getTopAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":b=$.getBottomAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"left,custom":case"custom,left":b=$.getLeftAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight;break;case"custom,right":case"right,custom":b=$.getRightAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight}"adaptHeight"in b&&this.resetListHeight(b.adaptHeight),"left"in b&&this.popupView.element.css({left:b.left}),"top"in b&&this.popupView.element.css({top:b.top}),this.position=b,this.popupView.setVisible(c)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.combo.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView&&this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(){this.isEnabled()&&this.combo.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroy:function(){$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),BI.Combo.superclass.destroy.apply(this,arguments)}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo),BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this.popupView?this.popupView.getValue():[]},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander),BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments),this.populate(this.options.el)},populate:function(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight, -adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){this.populate(this.options.items)},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:BI.stripEL(d)})]})});return a},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){this.layouts.setValue(a)},getValue:function(){return this.layouts.getValue()},empty:function(){this.layouts.empty()},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasPrev.apply(this,[{times:this.times,count:this.count}])},hasNext:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasNext.apply(this,[{times:this.times,count:this.count}])},prependItems:function(a){this.count+=a.length,this.next!==!1&&(this.hasPrev()?(this.options.items=this.options.items.concat(a),this.prev.setLoaded()):this.prev.setEnd()),this.button_group.prependItems.apply(this.button_group,arguments)},addItems:function(a){this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(a),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments)},populate:function(a){var b=this,c=this.options;return 0===arguments.length&&BI.isFunction(c.itemsCreator)?void c.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("arguments can not be null!!!");b.populate.apply(b,arguments),c.onLoaded()}]):(this.options.items=a,this.times=1,this.count=0,this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.isObject(this.prev)&&(this.hasPrev()?this.prev.setLoaded():this.prev.invisible()),void this.button_group.populate.apply(this.button_group,arguments))},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)},empty:function(){this.button_group.empty(),BI.each([this.prev,this.next],function(a,b){b&&b.setVisible(!1)})},destroy:function(){BI.Loader.superclass.destroy.apply(this,arguments)}}),BI.Loader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.loader",BI.Loader),BI.Navigation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments),{direction:"bottom",logic:{dynamic:!1},single:!1,defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()},afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},render:function(){var a=this,b=this.options;this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.cardMap={},this.showIndex=0,this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardNameCreator:function(b){return a.showIndex+b},cardCreator:function(c){var d=b.cardCreator(c);return a.cardMap[c]=d,d},afterCardCreated:BI.bind(this.afterCardCreated,this),afterCardShow:BI.bind(this.afterCardShow,this)})},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},afterCardCreated:function(a){var b=this;this.cardMap[a].on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.Navigation.EVENT_CHANGE,d)}),this.options.afterCardCreated.apply(this,arguments)},afterCardShow:function(a){this.showIndex=a,this._deleteOtherCards(a),this.options.afterCardShow.apply(this,arguments)},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate.apply(a,arguments)},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b),this.afterCardCreated(a)}},setSelect:function(a){this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.showIndex!==a&&(this.showIndex=a,BI.nextTick(BI.bind(this.afterCardShow,this,a)))},getSelect:function(){return this.showIndex},getSelectedCard:function(){if(BI.isKey(this.showIndex))return this.cardMap[this.showIndex]},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){BI.Navigation.superclass.destroy.apply(this,arguments)}}),BI.Navigation.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.navigation",BI.Navigation),BI.Searcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-searcher",lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,isDefaultInit:!1,isAutoSearch:!0,isAutoSync:!0,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,onSearch:function(a,b){b([])},el:{type:"bi.search_editor"},popup:{type:"bi.searcher_view"},adapter:null,masker:{offset:{}}})},_init:function(){BI.Searcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.search_editor"}),BI.createWidget({type:"bi.vertical",element:this,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:[this.editor]}),b.isDefaultInit&&this._assertPopupView();var c=BI.debounce(BI.bind(this._search,this),BI.EVENT_RESPONSE_TIME,!0);this.editor.on(BI.Controller.EVENT_CHANGE,function(b){switch(b){case BI.Events.STARTEDIT:a._startSearch();break;case BI.Events.EMPTY:a._stopSearch();break;case BI.Events.CHANGE:c();break;case BI.Events.PAUSE:a._pauseSearch()}})},_assertPopupView:function(){var a=this,b=this.options;(b.masker&&!BI.Maskers.has(this.getName())||b.masker===!1&&!this.popupView)&&(this.popupView=BI.createWidget(b.popup,{type:"bi.searcher_view",chooseType:b.chooseType}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(c,d,e){if(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),c===BI.Events.CLICK){if(b.isAutoSync){var f=b.adapter&&b.adapter.getValue();if(e.isSelected())switch(b.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.adapter&&b.adapter.setValue([e.getValue()]);break;case BI.ButtonGroup.CHOOSE_TYPE_MULTI:f.push(e.getValue()),b.adapter&&b.adapter.setValue(f)}else b.adapter&&b.adapter.setValue(BI.deepWithout(f,e.getValue()))}a.fireEvent(BI.Searcher.EVENT_CHANGE,d,e)}}),BI.nextTick(function(){a.fireEvent(BI.Searcher.EVENT_AFTER_INIT)})),b.masker&&!BI.Maskers.has(this.getName())&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this,render:this.popupView},b.masker))},_startSearch:function(){this._assertPopupView(),this._stop=!1,this._isSearching=!0,this.fireEvent(BI.Searcher.EVENT_START),this.popupView.startSearch&&this.popupView.startSearch(),BI.nextTick(function(a){BI.Maskers.show(a)},this.getName())},_pauseSearch:function(){this.options,this.getName();this._stop=!0,BI.nextTick(function(a){BI.Maskers.hide(a)},this.getName()),this._isSearching===!0&&(this.popupView&&this.popupView.pauseSearch&&this.popupView.pauseSearch(),this.fireEvent(BI.Searcher.EVENT_PAUSE)),this._isSearching=!1},_stopSearch:function(){var a=(this.options,this.getName());this._stop=!0,BI.Maskers.hide(a),this._isSearching===!0&&(this.popupView&&this.popupView.stopSearch&&this.popupView.stopSearch(),this.fireEvent(BI.Searcher.EVENT_STOP)),this._isSearching=!1},_search:function(){var a=this,b=this.options,c=this.editor.getValue();if(""!==c&&!this._stop){if(b.isAutoSearch){var d=b.adapter&&(b.adapter.getItems&&b.adapter.getItems()||b.adapter.attr("items"))||[],e=BI.Func.getSearchResult(d,c),f=e.matched,g=e.finded;return this.popupView.populate(g,f,c),b.isAutoSync&&b.adapter&&b.adapter.getValue&&this.popupView.setValue(b.adapter.getValue()),void a.fireEvent(BI.Searcher.EVENT_SEARCHING)}this.popupView.loading&&this.popupView.loading(),b.onSearch({times:1,keyword:c,selectedValues:b.adapter&&b.adapter.getValue()},function(d,e){if(!a._stop){var f=[].slice.call(arguments);f.length>0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(a){this._assertPopupView(),this.popupView&&this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Maskers.remove(this.getName()),BI.Searcher.superclass.destroy.apply(this,arguments)}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher),BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.switcher.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView?this.popupView.getValue():[]},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher),BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab),BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),function(a){this.CodeMirror=a()}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?He(d):{},He(Vf,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new rg(e,d.mode)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!xf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ze,keySeq:null,specialChars:null};var i=this;nf&&of<11&&setTimeout(function(){i.display.input.reset(!0)},20),Pb(this),Te(),tb(this),this.curOp.forceUpdate=!0,Ud(this,e),d.autofocus&&!xf||i.hasFocus()?setTimeout(Ie(nc,this),20):oc(this);for(var k in Wf)Wf.hasOwnProperty(k)&&Wf[k](this,d[k],Xf);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<_f.length;++l)_f[l](this);vb(this),pf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Me("div",null,"CodeMirror-code"),d.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Me("div",null,"CodeMirror-cursors"),d.measure=Me("div",null,"CodeMirror-measure"),d.lineMeasure=Me("div",null,"CodeMirror-measure"),d.lineSpace=Me("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Me("div",[Me("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Me("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Me("div",null,null,"position: absolute; height: "+Bg+"px; width: 1px;"),d.gutters=Me("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Me("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Me("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),nf&&of<8&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),pf||kf&&xf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ma(a,100),a.state.modeGen++,a.curOp&&Ib(a)}function e(a){a.options.lineWrapping?(Rg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Qg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Ib(a),gb(a),setTimeout(function(){s(a)},100)}function f(a){var b=rb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/sb(a.display)-3);return function(e){if(sd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function g(a){var b=a.doc,c=f(a);b.iter(function(a){var b=c(a);b!=a.height&&Yd(a,b)})}function h(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gb(a)}function i(a){j(a),Ib(a),setTimeout(function(){v(a)},20)}function j(a){var b=a.display.gutters,c=a.options.gutters;Ne(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Me("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none",k(a)}function k(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px"}function l(a){if(0==a.height)return 0;for(var b,c=a.text.length,d=a;b=ld(d);){var e=b.find(0,!0);d=e.from.line,c+=e.from.ch-e.to.ch}for(d=a;b=md(d);){var e=b.find(0,!0);c-=d.text.length-e.from.ch,d=e.to.line,c+=d.text.length-e.to.ch}return c}function m(a){var b=a.display,c=a.doc;b.maxLine=Vd(c,c.first),b.maxLineLength=l(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=l(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=De(a.gutters,"CodeMirror-linenumbers");b==-1&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ra(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ta(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),xg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),xg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedOverlay=!1,nf&&of<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Qg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),xg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?bc(b,a):ac(b,a)},b),b.display.scrollbars.addClass&&Rg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;e<4&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Qa(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=$d(b,d),g=$d(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;h<f?(f=h,g=$d(b,_d(Vd(b,h))+a.wrapper.clientHeight)):Math.min(i,b.lastLine())>=g&&(f=$d(b,_d(Vd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function w(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=x(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Me("div",[Me("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g)+1, -d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",k(a),!0}return!1}function x(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function y(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function z(a,b,c){var d=a.display;this.viewport=b,this.visible=u(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Ua(a),this.force=c,this.dims=H(a),this.events=[]}function A(a){var b=a.display;!b.scrollbarsClipped&&b.scroller.offsetWidth&&(b.nativeBarWidth=b.scroller.offsetWidth-b.scroller.clientWidth,b.heightForcer.style.height=Ta(a)+"px",b.sizer.style.marginBottom=-b.nativeBarWidth+"px",b.sizer.style.borderRightWidth=Ta(a)+"px",b.scrollbarsClipped=!0)}function B(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Kb(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Ob(a))return!1;w(a)&&(Kb(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&f-c.viewFrom<20&&(f=Math.max(d.first,c.viewFrom)),c.viewTo>g&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Ef&&(f=qd(a.doc,f),g=rd(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Nb(a,f,g),c.viewOffset=_d(Vd(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Ob(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Pe();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Pe()!=j&&j.offsetHeight&&j.focus(),Ne(c.cursorDiv),Ne(c.selectionDiv),c.gutters.style.height=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Ma(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Ua(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ra(a.display)-Va(a),c.top)}),b.visible=u(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&B(a,b);d=!1){F(a);var e=o(a);Ha(a),E(a,e),s(a,e)}b.signal(a,"update",a),a.display.viewFrom==a.display.reportedViewFrom&&a.display.viewTo==a.display.reportedViewTo||(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Ha(a),E(a,d),s(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px",a.display.gutters.style.height=Math.max(c+Ta(a),b.clientHeight)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d<b.view.length;d++){var e,f=b.view[d];if(!f.hidden){if(nf&&of<8){var g=f.node.offsetTop+f.node.offsetHeight;e=g-c,c=g}else{var h=f.node.getBoundingClientRect();e=h.bottom-h.top}var i=f.line.height-e;if(e<2&&(e=rb(b)),(i>.001||i<-.001)&&(Yd(f.line,e),G(f.line),f.rest))for(var j=0;j<f.rest.length;j++)G(f.rest[j])}}}function G(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function H(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:y(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function I(a,b,c){function d(b){var c=b.nextSibling;return pf&&yf&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,i=e.view,j=e.viewFrom,k=0;k<i.length;k++){var l=i[k];if(l.hidden);else if(l.node&&l.node.parentNode==g){for(;h!=l.node;)h=d(h);var m=f&&null!=b&&b<=j&&l.lineNumber;l.changes&&(De(l.changes,"gutter")>-1&&(m=!1),J(a,l,j,c)),m&&(Ne(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?N(a,b):"gutter"==f?P(a,b,c,d):"class"==f?O(b):"widget"==f&&Q(a,b,d)}b.changes=null}function K(a){return a.node==a.text&&(a.node=Me("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),nf&&of<8&&(a.node.style.zIndex=2)),a.node}function L(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=K(a);a.background=c.insertBefore(Me("div",null,b),c.firstChild)}}function M(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Id(a,b)}function N(a,b){var c=b.text.className,d=M(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,O(b)):c&&(b.text.className=c)}function O(a){L(a),a.line.wrapClass?K(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function P(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=K(b),g=b.gutter=Me("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");if(a.display.input.setUneditable(g),f.insertBefore(g,b.text),b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Me("div",x(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=e.hasOwnProperty(i)&&e[i];j&&g.appendChild(Me("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function Q(a,b,c){b.alignable&&(b.alignable=null);for(var d,e=b.node.firstChild;e;e=d){var d=e.nextSibling;"CodeMirror-linewidget"==e.className&&b.node.removeChild(e)}S(a,b,c)}function R(a,b,c,d){var e=M(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),O(b),P(a,b,c,d),S(a,b,d),b.node}function S(a,b,c){if(T(a,b.line,b,c,!0),b.rest)for(var d=0;d<b.rest.length;d++)T(a,b.rest[d],b,c,!1)}function T(a,b,c,d,e){if(b.widgets)for(var f=K(c),g=0,h=b.widgets;g<h.length;++g){var i=h[g],j=Me("div",[i.node],"CodeMirror-linewidget");i.handleMouseEvents||j.setAttribute("cm-ignore-events","true"),U(i,j,c,d),a.display.input.setUneditable(j),e&&i.above?f.insertBefore(j,c.gutter||c.text):f.appendChild(j),te(i,"redraw")}}function U(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function V(a){return Ff(a.line,a.ch)}function W(a,b){return Gf(a,b)<0?b:a}function X(a,b){return Gf(a,b)<0?a:b}function Y(a){a.state.focused||(a.display.input.focus(),nc(a))}function Z(a){return a.options.readOnly||a.doc.cantEdit}function $(a,b,c,d,e){var f=a.doc;a.display.shift=!1,d||(d=f.sel);var g=a.state.pasteIncoming||"paste"==e,h=Ug(b),i=null;g&&d.ranges.length>1&&(Hf&&Hf.join("\n")==b?i=d.ranges.length%Hf.length==0&&Ee(Hf,Ug):h.length==d.ranges.length&&(i=Ee(h,function(a){return[a]})));for(var j=d.ranges.length-1;j>=0;j--){var k=d.ranges[j],l=k.from(),m=k.to();k.empty()&&(c&&c>0?l=Ff(l.line,l.ch-c):a.state.overwrite&&!g&&(m=Ff(m.line,Math.min(Vd(f,m.line).text.length,m.ch+Ce(h).length))));var n=a.curOp.updateInput,o={from:l,to:m,text:i?i[j%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};wc(a.doc,o),te(a,"inputRead",a,o)}b&&!g&&aa(a,b),Ic(a),a.curOp.updateInput=n,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function _(a,b){var c=a.clipboardData&&a.clipboardData.getData("text/plain");if(c)return a.preventDefault(),Cb(b,function(){$(b,c,0,null,"paste")}),!0}function aa(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h<f.electricChars.length;h++)if(b.indexOf(f.electricChars.charAt(h))>-1){g=Kc(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(Vd(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Kc(a,e.head.line,"smart"));g&&te(a,"electricInput",a,e.head.line)}}}function ba(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line,f={anchor:Ff(e,0),head:Ff(e+1,0)};c.push(f),b.push(a.getRange(f.anchor,f.head))}return{text:b,ranges:c}}function ca(a){a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false")}function da(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ze,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ea(){var a=Me("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),b=Me("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pf?a.style.width="1000px":a.setAttribute("wrap","off"),wf&&(a.style.border="1px solid black"),ca(a),b}function fa(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ze,this.gracePeriod=!1}function ga(a,b){var c=$a(a,b.line);if(!c||c.hidden)return null;var d=Vd(a.doc,b.line),e=Xa(c,d,b.line),f=ae(d),g="left";if(f){var h=ff(f,b.ch);g=h%2?"right":"left"}var i=bb(e.map,b.ch,g);return i.offset="right"==i.collapse?i.end:i.start,i}function ha(a,b){return b&&(a.bad=!0),a}function ia(a,b,c){var d;if(b==a.display.lineDiv){if(d=a.display.lineDiv.childNodes[c],!d)return ha(a.clipPos(Ff(a.display.viewTo-1)),!0);b=null,c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=a.display.view[e];if(f.node==d)return ja(f,b,c)}}function ja(a,b,c){function d(b,c,d){for(var e=-1;e<(k?k.length:0);e++)for(var f=e<0?j.map:k[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==c){var i=Zd(e<0?a.line:a.rest[e]),l=f[g]+d;return(d<0||h!=b)&&(l=f[g+(d?1:0)]),Ff(i,l)}}}var e=a.text.firstChild,f=!1;if(!b||!Ng(e,b))return ha(Ff(Zd(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b)){var g=a.rest?Ce(a.rest):a.line;return ha(Ff(Zd(g),g.text.length),f)}var h=3==b.nodeType?b:null,i=b;for(h||1!=b.childNodes.length||3!=b.firstChild.nodeType||(h=b.firstChild,c&&(c=h.nodeValue.length));i.parentNode!=e;)i=i.parentNode;var j=a.measure,k=j.maps,l=d(h,i,c);if(l)return ha(l,f);for(var m=i.nextSibling,n=h?h.nodeValue.length-c:0;m;m=m.nextSibling){if(l=d(m,m.firstChild,0))return ha(Ff(l.line,l.ch-n),f);n+=m.textContent.length}for(var o=i.previousSibling,n=c;o;o=o.previousSibling){if(l=d(o,o.firstChild,-1))return ha(Ff(l.line,l.ch+n),f);n+=m.textContent.length}}function ka(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return""==c&&(c=b.textContent.replace(/\u200b/g,"")),void(h+=c);var j,k=b.getAttribute("cm-marker");if(k){var l=a.findMarks(Ff(d,0),Ff(e+1,0),f(+k));return void(l.length&&(j=l[0].find())&&(h+=Wd(a.doc,j.from,j.to).join("\n")))}if("false"==b.getAttribute("contenteditable"))return;for(var m=0;m<b.childNodes.length;m++)g(b.childNodes[m]);/^(pre|div|p)$/i.test(b.nodeName)&&(i=!0)}else if(3==b.nodeType){var n=b.nodeValue;if(!n)return;i&&(h+="\n",i=!1),h+=n}}for(var h="",i=!1;g(b),b!=c;)b=b.nextSibling;return h}function la(a,b){this.ranges=a,this.primIndex=b}function ma(a,b){this.anchor=a,this.head=b}function na(a,b){var c=a[b];a.sort(function(a,b){return Gf(a.from(),b.from())}),b=De(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(Gf(f.to(),e.from())>=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;d<=b&&--b,a.splice(--d,2,new ma(i?h:g,i?g:h))}}return new la(a,b)}function oa(a,b){return new la([new ma(a,b||a)],0)}function pa(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function qa(a,b){if(b.line<a.first)return Ff(a.first,0);var c=a.first+a.size-1;return b.line>c?Ff(c,Vd(a,c).text.length):ra(b,Vd(a,b.line).text.length)}function ra(a,b){var c=a.ch;return null==c||c>b?Ff(a.line,b):c<0?Ff(a.line,0):a}function sa(a,b){return b>=a.first&&b<a.first+a.size}function ta(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=qa(a,b[d]);return c}function ua(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=Gf(c,e)<0;f!=Gf(d,e)<0?(e=c,c=d):f!=Gf(c,d)<0&&(c=d)}return new ma(e,c)}return new ma(d||c,c)}function va(a,b,c,d){Ba(a,new la([ua(a,a.sel.primary(),b,c)],0),d)}function wa(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=ua(a,a.sel.ranges[e],b[e],null);var f=na(d,a.sel.primIndex);Ba(a,f,c)}function xa(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,Ba(a,na(e,a.sel.primIndex),d)}function ya(a,b,c,d){Ba(a,oa(b,c),d)}function za(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new ma(qa(a,b[c].anchor),qa(a,b[c].head))}};return zg(a,"beforeSelectionChange",a,c),a.cm&&zg(a.cm,"beforeSelectionChange",a.cm,c),c.ranges!=b.ranges?na(c.ranges,c.ranges.length-1):b}function Aa(a,b,c){var d=a.history.done,e=Ce(d);e&&e.ranges?(d[d.length-1]=b,Ca(a,b,c)):Ba(a,b,c)}function Ba(a,b,c){Ca(a,b,c),he(a,a.sel,a.cm?a.cm.curOp.id:NaN,c)}function Ca(a,b,c){(xe(a,"beforeSelectionChange")||a.cm&&xe(a.cm,"beforeSelectionChange"))&&(b=za(a,b));var d=c&&c.bias||(Gf(b.primary().head,a.sel.primary().head)<0?-1:1);Da(a,Fa(a,b,d,!0)),c&&c.scroll===!1||!a.cm||Ic(a.cm)}function Da(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,we(a.cm)),te(a,"cursorActivity",a))}function Ea(a){Da(a,Fa(a,a.sel,null,!1),Dg)}function Fa(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Ga(a,g.anchor,c,d),i=Ga(a,g.head,c,d);(e||h!=g.anchor||i!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new ma(h,i))}return e?na(e,b.primIndex):b}function Ga(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=Vd(a,f.line);if(h.markedSpans)for(var i=0;i<h.markedSpans.length;++i){var j=h.markedSpans[i],k=j.marker;if((null==j.from||(k.inclusiveLeft?j.from<=f.ch:j.from<f.ch))&&(null==j.to||(k.inclusiveRight?j.to>=f.ch:j.to>f.ch))){if(d&&(zg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(g<0?-1:1);if(0==Gf(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?qa(a,Ff(l.line-1)):null:l.ch>h.text.length&&(l=l.line<a.first+a.size-1?Ff(l.line+1,0):null),!l)){if(e)return d?(a.cantEdit=!0,Ff(a.first,0)):Ga(a,b,c,!0);e=!0,l=b,g=-g}f=l;continue a}}return f}}function Ha(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ia(a,b){for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(b!==!1||g!=c.sel.primIndex){var h=c.sel.ranges[g],i=h.empty();(i||a.options.showCursorWhenSelecting)&&Ja(a,h,e),i||Ka(a,h,f)}return d}function Ja(a,b,c){var d=mb(a,b.head,"div",null,null,!a.options.singleCursorHeightPerLine),e=c.appendChild(Me("div"," ","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Me("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Ka(a,b,c){function d(a,b,c,d){b<0&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Me("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return lb(a,Ff(b,c),"div",l,d)}var h,i,l=Vd(g,b),m=l.text.length;return Ye(ae(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottom<l.top&&d(n,p.bottom,null,l.top)),null==e&&b==m&&(o=k),(!h||p.top<h.top||p.top==h.top&&p.left<h.left)&&(h=p),(!i||l.bottom>i.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),n<j+1&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Sa(a.display),j=i.left,k=Math.max(f.sizerWidth,Ua(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Vd(g,l.line),o=Vd(g,m.line),p=od(n)==od(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(d(q.right,q.top,null,q.bottom),d(j,r.top,r.left,r.bottom)):d(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&d(j,q.bottom,null,r.top)}c.appendChild(h)}function La(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ma(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Ie(Na,a))}function Na(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=bg(b.mode,Pa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=Ed(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&l<g.length;++l)k=g[l]!=f.styles[l];k&&e.push(b.frontier),f.stateAfter=bg(b.mode,d)}else Gd(a,f.text,d),f.stateAfter=b.frontier%5==0?bg(b.mode,d):null;if(++b.frontier,+new Date>c)return Ma(a,a.options.workDelay),!0}),e.length&&Cb(a,function(){for(var b=0;b<e.length;b++)Jb(a,e[b],"text")})}}function Oa(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Vd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Gg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Pa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Oa(a,b,c),g=f>d.first&&Vd(d,f-1).stateAfter;return g=g?bg(d.mode,g):cg(d.mode),d.iter(f,b,function(c){Gd(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?bg(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Qa(a){return a.lineSpace.offsetTop}function Ra(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Sa(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Oe(a.measure,Me("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function Ta(a){return Bg-a.display.nativeBarWidth}function Ua(a){return a.display.scroller.clientWidth-Ta(a)-a.display.barWidth}function Va(a){return a.display.scroller.clientHeight-Ta(a)-a.display.barHeight}function Wa(a,b,c){var d=a.options.lineWrapping,e=d&&Ua(a);if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Xa(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(Zd(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Ya(a,b){b=od(b);var c=Zd(b),d=a.display.externalMeasured=new Gb(a.doc,b,c);d.lineN=c;var e=d.built=Id(a,d);return d.text=e.pre,Oe(a.display.lineMeasure,e.pre),d}function Za(a,b,c,d){return ab(a,_a(a,b),c,d)}function $a(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Lb(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function _a(a,b){var c=Zd(b),d=$a(a,c);d&&!d.text?d=null:d&&d.changes&&J(a,d,c,H(a)),d||(d=Ya(a,b));var e=Xa(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function ab(a,b,c,d,e){b.before&&(c=-1);var f,g=c+(d||"");return b.cache.hasOwnProperty(g)?f=b.cache[g]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(Wa(a,b.view,b.rect),b.hasHeights=!0),f=cb(a,b,c,d),f.bogus||(b.cache[g]=f)),{left:f.left,right:f.right,top:e?f.rtop:f.top,bottom:e?f.rbottom:f.bottom}}function bb(a,b,c){for(var d,e,f,g,h=0;h<a.length;h+=3){var i=a[h],j=a[h+1];if(b<i?(e=0,f=1,g="left"):b<j?(e=b-i,f=e+1):(h==a.length-3||b==j&&a[h+3]>b)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;h<a.length-3&&a[h+3]==a[h+4]&&!a[h+5].insertLeft;)d=a[(h+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:i,coverEnd:j}}function cb(a,b,c,d){var e,f=bb(b.map,c,d),g=f.node,h=f.start,i=f.end,j=f.collapse;if(3==g.nodeType){for(var k=0;k<4;k++){for(;h&&Le(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+i<f.coverEnd&&Le(b.line.text.charAt(f.coverStart+i));)++i;if(nf&&of<9&&0==h&&i==f.coverEnd-f.coverStart)e=g.parentNode.getBoundingClientRect();else if(nf&&a.options.lineWrapping){var l=Jg(g,h,i).getClientRects();e=l.length?l["right"==d?l.length-1:0]:Lf}else e=Jg(g,h,i).getBoundingClientRect()||Lf;if(e.left||e.right||0==h)break;i=h,h-=1,j="right"}nf&&of<11&&(e=db(a.display.measure,e))}else{h>0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(nf&&of<9&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+sb(a.display),top:m.top,bottom:m.bottom}:Lf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;k<q.length-1&&!(p<q[k]);k++);var r=k?q[k-1]:0,s=q[k],t={left:("right"==j?e.right:e.left)-b.rect.left,right:("left"==j?e.left:e.right)-b.rect.left,top:r,bottom:s};return e.left||e.right||(t.bogus=!0),a.options.singleCursorHeightPerLine||(t.rtop=n,t.rbottom=o),t}function db(a,b){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Xe(a))return b;var c=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*c,right:b.right*c,top:b.top*d,bottom:b.bottom*d}}function eb(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function fb(a){a.display.externalMeasure=null,Ne(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)eb(a.display.view[b])}function gb(a){fb(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function hb(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ib(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function jb(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=vd(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=_d(b);if("local"==d?g+=Qa(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:ib());var i=h.left+("window"==d?0:hb());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function kb(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=hb(),e-=ib();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function lb(a,b,c,d,e){return d||(d=Vd(a.doc,b.line)),jb(a,d,Za(a,d,b.ch,e),c)}function mb(a,b,c,d,e,f){function g(b,g){var h=ab(a,e,b,g?"right":"left",f);return g?h.left=h.right:h.right=h.left,jb(a,d,h,c)}function h(a,b){var c=i[b],d=c.level%2;return a==Ze(c)&&b&&c.level<i[b-1].level?(c=i[--b],a=$e(c)-(c.level%2?0:1),d=!0):a==$e(c)&&b<i.length-1&&c.level<i[b+1].level&&(c=i[++b],a=Ze(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||Vd(a.doc,b.line),e||(e=_a(a,d));var i=ae(d),j=b.ch;if(!i)return g(j);var k=ff(i,j),l=h(j,k);return null!=Zg&&(l.other=h(j,Zg)),l}function nb(a,b){var c=0,b=qa(a.doc,b);a.options.lineWrapping||(c=sb(a.display)*b.ch);var d=Vd(a.doc,b.line),e=_d(d)+Qa(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function ob(a,b,c,d){var e=Ff(a,b);return e.xRel=d,c&&(e.outside=!0),e}function pb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,c<0)return ob(d.first,0,!0,-1);var e=$d(d,c),f=d.first+d.size-1;if(e>f)return ob(d.first+d.size-1,Vd(d,f).text.length,!0,1);b<0&&(b=0);for(var g=Vd(d,e);;){var h=qb(a,g,e,b,c),i=md(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Zd(g=j.to.line)}}function qb(a,b,c,d,e){function f(d){var e=mb(a,Ff(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:g<e.top?e.left+i:(h=!1,e.left)}var g=e-_d(b),h=!1,i=2*a.display.wrapper.clientWidth,j=_a(a,b),k=ae(b),l=b.text.length,m=_e(b),n=af(b),o=f(m),p=h,q=f(n),r=h;if(d>q)return ob(c,n,r,1);for(;;){if(k?n==m||n==hf(b,m,1):n-m<=1){for(var s=d<o||d-o<=q-d?m:n,t=d-(s==m?o:q);Le(b.text.charAt(s));)++s;var u=ob(c,s,s==m?p:r,t<-1?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;x<v;++x)w=hf(b,w,1)}var y=f(w);y>d?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function rb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==If){If=Me("pre");for(var b=0;b<49;++b)If.appendChild(document.createTextNode("x")),If.appendChild(Me("br"));If.appendChild(document.createTextNode("x"))}Oe(a.measure,If);var c=If.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Ne(a.measure),c||1}function sb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Me("span","xxxxxxxxxx"),c=Me("pre",[b]);Oe(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function tb(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Nf},Mf?Mf.ops.push(a.curOp):a.curOp.ownsGroup=Mf={ops:[a.curOp],delayedCallbacks:[]}}function ub(a){var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c]();for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++](e.cm)}}while(c<b.length)}function vb(a){var b=a.curOp,c=b.ownsGroup;if(c)try{ub(c)}finally{Mf=null;for(var d=0;d<c.ops.length;d++)c.ops[d].cm.curOp=null;wb(c)}}function wb(a){for(var b=a.ops,c=0;c<b.length;c++)xb(b[c]);for(var c=0;c<b.length;c++)yb(b[c]);for(var c=0;c<b.length;c++)zb(b[c]);for(var c=0;c<b.length;c++)Ab(b[c]);for(var c=0;c<b.length;c++)Bb(b[c])}function xb(a){var b=a.cm,c=b.display;A(b),a.updateMaxLine&&m(b),a.mustUpdate=a.viewChanged||a.forceUpdate||null!=a.scrollTop||a.scrollToPos&&(a.scrollToPos.from.line<c.viewFrom||a.scrollToPos.to.line>=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function yb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function zb(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=Za(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ta(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Ua(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection())}function Ab(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&bc(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1),a.preparedSelection&&b.display.input.showSelection(a.preparedSelection),a.updatedDisplay&&E(b,a.barMeasure),(a.updatedDisplay||a.startHeight!=b.doc.height)&&s(b,a.barMeasure),a.selectionChanged&&La(b),b.state.focused&&a.updateInput&&b.display.input.reset(a.typing),a.focus&&a.focus==Pe()&&Y(a.cm)}function Bb(a){var b=a.cm,c=b.display,d=b.doc;if(a.updatedDisplay&&C(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null==a.scrollTop||c.scroller.scrollTop==a.scrollTop&&!a.forceScroll||(d.scrollTop=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop)),c.scrollbars.setScrollTop(d.scrollTop),c.scroller.scrollTop=d.scrollTop),null==a.scrollLeft||c.scroller.scrollLeft==a.scrollLeft&&!a.forceScroll||(d.scrollLeft=Math.max(0,Math.min(c.scroller.scrollWidth-Ua(b),a.scrollLeft)),c.scrollbars.setScrollLeft(d.scrollLeft),c.scroller.scrollLeft=d.scrollLeft,v(b)),a.scrollToPos){var e=Ec(b,qa(d,a.scrollToPos.from),qa(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Dc(b,e)}var f=a.maybeHiddenMarkers,g=a.maybeUnhiddenMarkers;if(f)for(var h=0;h<f.length;++h)f[h].lines.length||zg(f[h],"hide");if(g)for(var h=0;h<g.length;++h)g[h].lines.length&&zg(g[h],"unhide");c.wrapper.offsetHeight&&(d.scrollTop=b.display.scroller.scrollTop),a.changeObjs&&zg(b,"changes",b,a.changeObjs),a.update&&a.update.finish()}function Cb(a,b){if(a.curOp)return b();tb(a);try{return b()}finally{vb(a)}}function Db(a,b){return function(){if(a.curOp)return b.apply(a,arguments);tb(a);try{return b.apply(a,arguments)}finally{vb(a)}}}function Eb(a){return function(){if(this.curOp)return a.apply(this,arguments);tb(this);try{return a.apply(this,arguments)}finally{vb(this)}}}function Fb(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);tb(b);try{return a.apply(this,arguments)}finally{vb(b)}}}function Gb(a,b,c){this.line=b,this.rest=pd(b),this.size=this.rest?Zd(Ce(this.rest))-c+1:1,this.node=this.text=null,this.hidden=sd(a,b)}function Hb(a,b,c){for(var d,e=[],f=b;f<c;f=d){var g=new Gb(a.doc,Vd(a.doc,f),f);d=f+g.size,e.push(g)}return e}function Ib(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b), -a.curOp.viewChanged=!0,b>=e.viewTo)Ef&&qd(a.doc,b)<e.viewTo&&Kb(a);else if(c<=e.viewFrom)Ef&&rd(a.doc,c+d)>e.viewFrom?Kb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Kb(a);else if(b<=e.viewFrom){var f=Mb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Kb(a)}else if(c>=e.viewTo){var f=Mb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Kb(a)}else{var g=Mb(a,b,b,-1),h=Mb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Hb(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Kb(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Jb(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Lb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);De(g,c)==-1&&g.push(c)}}}function Kb(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Lb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,b<0)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,b<0)return d}function Mb(a,b,c,d){var e,f=Lb(a,b),g=a.display.view;if(!Ef||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=0,i=a.display.viewFrom;h<f;h++)i+=g[h].size;if(i!=b){if(d>0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;qd(a.doc,c)!=c;){if(f==(d<0?0:g.length-1))return null;c+=d*g[f-(d<0?1:0)].size,f+=d}return{index:f,lineN:c}}function Nb(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Hb(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Hb(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Lb(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Hb(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Lb(a,c)))),d.viewTo=c}function Ob(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Pb(a){function b(){e.activeTouch&&(f=setTimeout(function(){e.activeTouch=null},1e3),g=e.activeTouch,g.end=+new Date)}function c(a){if(1!=a.touches.length)return!1;var b=a.touches[0];return b.radiusX<=1&&b.radiusY<=1}function d(a,b){if(null==b.left)return!0;var c=b.left-a.left,d=b.top-a.top;return c*c+d*d>400}var e=a.display;xg(e.scroller,"mousedown",Db(a,Ub)),nf&&of<11?xg(e.scroller,"dblclick",Db(a,function(b){if(!ve(a,b)){var c=Tb(a,b);if(c&&!Zb(a,b)&&!Sb(a.display,b)){ug(b);var d=a.findWordAt(c);va(a.doc,d.anchor,d.head)}}})):xg(e.scroller,"dblclick",function(b){ve(a,b)||ug(b)}),Cf||xg(e.scroller,"contextmenu",function(b){pc(a,b)});var f,g={end:0};xg(e.scroller,"touchstart",function(a){if(!c(a)){clearTimeout(f);var b=+new Date;e.activeTouch={start:b,moved:!1,prev:b-g.end<=300?g:null},1==a.touches.length&&(e.activeTouch.left=a.touches[0].pageX,e.activeTouch.top=a.touches[0].pageY)}}),xg(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),xg(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Sb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new ma(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new ma(Ff(h.line,0),qa(a.doc,Ff(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),ug(c)}b()}),xg(e.scroller,"touchcancel",b),xg(e.scroller,"scroll",function(){e.scroller.clientHeight&&(ac(a,e.scroller.scrollTop),bc(a,e.scroller.scrollLeft,!0),zg(a,"scroll",a))}),xg(e.scroller,"mousewheel",function(b){cc(a,b)}),xg(e.scroller,"DOMMouseScroll",function(b){cc(a,b)}),xg(e.wrapper,"scroll",function(){e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={simple:function(b){ve(a,b)||wg(b)},start:function(b){_b(a,b)},drop:Db(a,$b)};var h=e.input.getField();xg(h,"keyup",function(b){kc.call(a,b)}),xg(h,"keydown",Db(a,ic)),xg(h,"keypress",Db(a,lc)),xg(h,"focus",Ie(nc,a)),xg(h,"blur",Ie(oc,a))}function Qb(b,c,d){var e=d&&d!=a.Init;if(!c!=!e){var f=b.display.dragFunctions,g=c?xg:yg;g(b.display.scroller,"dragstart",f.start),g(b.display.scroller,"dragenter",f.simple),g(b.display.scroller,"dragover",f.simple),g(b.display.scroller,"drop",f.drop)}}function Rb(a){var b=a.display;b.lastWrapHeight==b.wrapper.clientHeight&&b.lastWrapWidth==b.wrapper.clientWidth||(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize())}function Sb(a,b){for(var c=re(b);c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Tb(a,b,c,d){var e=a.display;if(!c&&"true"==re(b).getAttribute("cm-not-content"))return null;var f,g,h=e.lineSpace.getBoundingClientRect();try{f=b.clientX-h.left,g=b.clientY-h.top}catch(b){return null}var i,j=pb(a,f,g);if(d&&1==j.xRel&&(i=Vd(a.doc,j.line).text).length==j.ch){var k=Gg(i,i.length,a.options.tabSize)-i.length;j=Ff(j.line,Math.max(0,Math.round((f-Sa(a.display).left)/sb(a.display))-k))}return j}function Ub(a){var b=this,c=b.display;if(!(c.activeTouch&&c.input.supportsTouch()||ve(b,a))){if(c.shift=a.shiftKey,Sb(c,a))return void(pf||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)));if(!Zb(b,a)){var d=Tb(b,a);switch(window.focus(),se(a)){case 1:d?Vb(b,a,d):re(a)==c.scroller&&ug(a);break;case 2:pf&&(b.state.lastMiddleDown=+new Date),d&&va(b.doc,d),setTimeout(function(){c.input.focus()},20),ug(a);break;case 3:Cf?pc(b,a):mc(b)}}}}function Vb(a,b,c){nf?setTimeout(Ie(Y,a),0):a.curOp.focus=Pe();var d,e=+new Date;Kf&&Kf.time>e-400&&0==Gf(Kf.pos,c)?d="triple":Jf&&Jf.time>e-400&&0==Gf(Jf.pos,c)?(d="double",Kf={time:e,pos:c}):(d="single",Jf={time:e,pos:c});var f,g=a.doc.sel,h=yf?b.metaKey:b.ctrlKey;a.options.dragDrop&&Tg&&!Z(a)&&"single"==d&&(f=g.contains(c))>-1&&(Gf((f=g.ranges[f]).from(),c)<0||c.xRel>0)&&(Gf(f.to(),c)>0||c.xRel<0)?Wb(a,b,c,h):Xb(a,b,c,d,h)}function Wb(a,b,c,d){var e=a.display,f=+new Date,g=Db(a,function(h){pf&&(e.scroller.draggable=!1),a.state.draggingText=!1,yg(document,"mouseup",g),yg(e.scroller,"drop",g),Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)<10&&(ug(h),!d&&+new Date-200<f&&va(a.doc,c),pf||nf&&9==of?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});pf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),xg(document,"mouseup",g),xg(e.scroller,"drop",g)}function Xb(a,b,c,d,e){function f(b){if(0!=Gf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Gg(Vd(j,c.line).text,c.ch,f),h=Gg(Vd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));o<=p;o++){var r=Vd(j,o).text,s=Ae(r,i,f);i==n?e.push(new ma(Ff(o,s),Ff(o,s))):r.length>s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.line<h.from)&&setTimeout(Db(a,function(){s==c&&g(b)}),150)}else{var k=b.clientY<r.top?-20:b.clientY>r.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j<a.options.gutters.length;++j){var k=h.gutters.childNodes[j];if(k&&k.getBoundingClientRect().right>=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i<e;++i)h(d[i],i);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;i<j.length;++i)Cc(b.doc,"",j[i].anchor,j[i].head,"drag");b.replaceSelection(f,"around","paste"),b.display.input.focus()}}catch(a){}}}}function _b(a,b){if(nf&&(!a.state.draggingText||+new Date-Of<100))return void wg(b);if(!ve(a,b)&&!Sb(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.setDragImage&&!tf)){var c=Me("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",sf&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop),b.dataTransfer.setDragImage(c,0,0),sf&&c.parentNode.removeChild(c)}}function ac(a,b){Math.abs(a.doc.scrollTop-b)<2||(a.doc.scrollTop=b,kf||D(a,{top:b}),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbars.setScrollTop(b),kf&&D(a),Ma(a,100))}function bc(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,v(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function cc(a,b){var c=Rf(b),d=c.x,e=c.y,f=a.display,g=f.scroller;if(d&&g.scrollWidth>g.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j<i.length;j++)if(i[j].node==h){a.display.currentWheelTarget=h;break a}if(d&&!kf&&!sf&&null!=Qf)return e&&ac(a,Math.max(0,Math.min(g.scrollTop+e*Qf,g.scrollHeight-g.clientHeight))),bc(a,Math.max(0,Math.min(g.scrollLeft+d*Qf,g.scrollWidth-g.clientWidth))),ug(b),void(f.wheelStartX=null);if(e&&null!=Qf){var k=e*Qf,l=a.doc.scrollTop,m=l+f.wrapper.clientHeight;k<0?l=Math.max(0,l+k-50):m=Math.min(a.doc.height,m+k+50),D(a,{top:l,bottom:m})}Pf<20&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=d,f.wheelDY=e,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,c=b&&f.wheelDY&&b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;f.wheelStartX=f.wheelStartY=null,c&&(Qf=(Qf*Pf+c)/(Pf+1),++Pf)}},200)):(f.wheelDX+=d,f.wheelDY+=e))}}function dc(a,b,c){if("string"==typeof b&&(b=dg[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{Z(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Cg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function ec(a,b,c){for(var d=0;d<a.state.keyMaps.length;d++){var e=fg(b,a.state.keyMaps[d],c,a);if(e)return e}return a.options.extraKeys&&fg(b,a.options.extraKeys,c,a)||fg(b,a.options.keyMap,c,a)}function fc(a,b,c,d){var e=a.state.keySeq;if(e){if(gg(b))return"handled";Sf.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())}),b=e+" "+b}var f=ec(a,b,d);return"multi"==f&&(a.state.keySeq=b),"handled"==f&&te(a,"keyHandled",a,b,c),"handled"!=f&&"multi"!=f||(ug(c),La(a)),e&&!f&&/\'$/.test(b)?(ug(c),!0):!!f}function gc(a,b){var c=hg(b,!0);return!!c&&(b.shiftKey&&!a.state.keySeq?fc(a,"Shift-"+c,b,function(b){return dc(a,b,!0)})||fc(a,c,b,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return dc(a,b)}):fc(a,c,b,function(b){return dc(a,b)}))}function hc(a,b,c){return fc(a,"'"+c+"'",b,function(b){return dc(a,b,!0)})}function ic(a){var b=this;if(b.curOp.focus=Pe(),!ve(b,a)){nf&&of<11&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var d=gc(b,a);sf&&(Tf=d?c:null,!d&&88==c&&!Wg&&(yf?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||jc(b)}}function jc(a){function b(a){18!=a.keyCode&&a.altKey||(Qg(c,"CodeMirror-crosshair"),yg(document,"keyup",b),yg(document,"mouseover",b))}var c=a.display.lineDiv;Rg(c,"CodeMirror-crosshair"),xg(document,"keyup",b),xg(document,"mouseover",b)}function kc(a){16==a.keyCode&&(this.doc.sel.shift=!1),ve(this,a)}function lc(a){var b=this;if(!(Sb(b.display,a)||ve(b,a)||a.ctrlKey&&!a.altKey||yf&&a.metaKey)){var c=a.keyCode,d=a.charCode;if(sf&&c==Tf)return Tf=null,void ug(a);if(!sf||a.which&&!(a.which<10)||!gc(b,a)){var e=String.fromCharCode(null==d?c:d);hc(b,a,e)||b.display.input.onKeyPress(a)}}}function mc(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,oc(a))},100)}function nc(a){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),"nocursor"!=a.options.readOnly&&(a.state.focused||(zg(a,"focus",a),a.state.focused=!0,Rg(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),pf&&setTimeout(function(){a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),La(a))}function oc(a){a.state.delayingBlurEvent||(a.state.focused&&(zg(a,"blur",a),a.state.focused=!1,Qg(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function pc(a,b){Sb(a.display,b)||qc(a,b)||a.display.input.onContextMenu(b)}function qc(a,b){return!!xe(a,"gutterContextMenu")&&Yb(a,b,"gutterContextMenu",!1,zg)}function rc(a,b){if(Gf(a,b.from)<0)return a;if(Gf(a,b.to)<=0)return Uf(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Uf(b).ch-b.to.ch),Ff(c,d)}function sc(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new ma(rc(e.anchor,b),rc(e.head,b)))}return na(c,a.sel.primIndex)}function tc(a,b,c){return a.line==b.line?Ff(c.line,a.ch-b.ch+c.ch):Ff(c.line+(a.line-b.line),a.ch)}function uc(a,b,c){for(var d=[],e=Ff(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=tc(h.from,e,f),j=tc(Uf(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=Gf(k.head,k.anchor)<0;d[g]=new ma(l?j:i,l?i:j)}else d[g]=new ma(i,i)}return new la(d,a.sel.primIndex)}function vc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=qa(a,b)),c&&(this.to=qa(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),zg(a,"beforeChange",a,d),a.cm&&zg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function wc(a,b,c){if(a.cm){if(!a.cm.curOp)return Db(a.cm,wc)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(xe(a,"beforeChange")||a.cm&&xe(a.cm,"beforeChange"))||(b=vc(a,b,!0))){var d=Df&&!c&&ed(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i<g.length&&(d=g[i],c?!d.ranges||d.equals(a.sel):d.ranges);i++);if(i!=g.length){for(e.lastOrigin=e.lastSelOrigin=null;d=g.pop(),d.ranges;){if(ie(d,h),c&&!d.equals(a.sel))return void Ba(a,d,{clearRedo:!1});f=d}var j=[];ie(f,h),h.push({changes:j,generation:e.generation}),e.generation=d.generation||++e.maxGeneration;for(var k=xe(a,"beforeChange")||a.cm&&xe(a.cm,"beforeChange"),i=d.changes.length-1;i>=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Jb(a.cm,d,"gutter")}}function Ac(a,b,c,d){if(a.cm&&!a.cm.curOp)return Db(a.cm,Ac)(a,b,c,d);if(b.to.line<a.first)return void zc(a,b.text.length-1-(b.to.line-b.from.line));if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);zc(a,e),b={from:Ff(a.first,0),to:Ff(b.to.line+e,b.to.ch),text:[Ce(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=c<g,m=e>k-g;if(c<h)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:b<o?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m<j&&(l+=Be(j-m)),l!=k)return Cc(f,l,Ff(b,0),Ff(b,k.length),"+input"),h.stateAfter=null,!0;for(var n=0;n<f.sel.ranges.length;n++){var o=f.sel.ranges[n];if(o.head.line==b&&o.head.ch<k.length){var m=Ff(b,k.length);xa(f,n,new ma(m,m));break}}}function Lc(a,b,c,d){var e=b,f=b;return"number"==typeof b?f=Vd(a,pa(a,b)):e=Zd(b),null==e?null:(d(f,e)&&a.cm&&Jb(a.cm,e,c),f)}function Mc(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&Gf(f.from,Ce(d).to)<=0;){var g=d.pop();if(Gf(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Cb(a,function(){for(var b=d.length-1;b>=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b<a.first||b>=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g<f.length-1;g++){var h=f[g];if(/^(cmd|meta|m)$/i.test(h))e=!0;else if(/^a(lt)?$/i.test(h))b=!0;else if(/^(c|ctrl|control)$/i.test(h))c=!0;else{if(!/^s(hift)$/i.test(h))throw new Error("Unrecognized modifier name: "+h);d=!0}}return b&&(a="Alt-"+a),c&&(a="Ctrl-"+a),e&&(a="Cmd-"+a),d&&(a="Shift-"+a),a}function Rc(a){return"string"==typeof a?eg[a]:a}function Sc(a,b,c,d,e){if(d&&d.shared)return Tc(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Db(a.cm,Sc)(a,b,c,d,e);var f=new kg(a,e),g=Gf(b,c);if(d&&He(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Ce(f)}),new lg(f,g)}function Uc(a){return a.findMarks(Ff(a.first,0),a.clipPos(Ff(a.lastLine())),function(a){return a.parent})}function Vc(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(Gf(f,g)){var h=Sc(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function Wc(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Td(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];De(d,f.doc)==-1&&(f.parent=null,c.markers.splice(e--,1))}}}function Xc(a,b,c){this.marker=a,this.from=b,this.to=c}function Yc(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function Zc(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function $c(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function _c(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(d||(d=[])).push(new Xc(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return d}function bd(a,b){if(b.full)return null;var c=sa(a,b.from.line)&&Vd(a,b.from.line).markedSpans,d=sa(a,b.to.line)&&Vd(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==Gf(b.from,b.to),h=_c(c,e,g),i=ad(d,f,g),j=1==b.text.length,k=Ce(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=Yc(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=Yc(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=cd(h)),i&&i!=h&&(i=cd(i));var o=[h];if(!j){var p,q=b.text.length-2;if(q>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(p||(p=[])).push(new Xc(h[l].marker,null,null));for(var l=0;l<q;++l)o.push(p);o.push(i)}return o}function cd(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function dd(a,b){var c=le(a,b),d=bd(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function ed(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&De(d,c)!=-1||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(Gf(j.to,h.from)<0||Gf(j.from,h.to)>0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function gd(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function hd(a){return a.inclusiveLeft?-1:0}function id(a){return a.inclusiveRight?1:0}function jd(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=Gf(d.from,e.from)||hd(a)-hd(b);if(f)return-f;var g=Gf(d.to,e.to)||id(a)-id(b);return g?g:b.id-a.id}function kd(a,b){var c,d=Ef&&a.markedSpans;if(d)for(var e,f=0;f<d.length;++f)e=d[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!c||jd(c,e.marker)<0)&&(c=e.marker);return c}function ld(a){return kd(a,!0)}function md(a){return kd(a,!1)}function nd(a,b,c,d,e){var f=Vd(a,b),g=Ef&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=Gf(j.from,c)||hd(i.marker)-hd(e),l=Gf(j.to,d)||id(i.marker)-id(e);if(!(k>=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&td(a,b,d))return!0}}function td(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return td(a,d.line,Yc(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&td(a,b,e))return!0}function ud(a,b,c){_d(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Hc(a,null,c)}function vd(a){if(null!=a.height)return a.height;var b=a.doc.cm;if(!b)return 0;if(!Ng(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;"),a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;"),Oe(b.display.measure,Me("div",[a.node],null,c))}return a.height=a.node.offsetHeight}function wd(a,b,c,d){var e=new mg(a,c,d),f=a.cm;return f&&e.noHScroll&&(f.display.alignWidgets=!0),Lc(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,f&&!sd(a,b)){var d=_d(b)<a.scrollTop;Yd(b,b.height+vd(e)),d&&Hc(f,null,e.height),f.curOp.forceUpdate=!0}return!0}),e}function xd(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null), -a.styles&&(a.styles=null),null!=a.order&&(a.order=null),fd(a),gd(a,c);var e=d?d(a):1;e!=a.height&&Yd(a,e)}function yd(a){a.parent=null,fd(a)}function zd(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function Ad(b,c){if(b.blankLine)return b.blankLine(c);if(b.innerMode){var d=a.innerMode(b,c);return d.mode.blankLine?d.mode.blankLine(d.state):void 0}}function Bd(b,c,d,e){for(var f=0;f<10;f++){e&&(e[0]=a.innerMode(b,d).mode);var g=b.token(c,d);if(c.pos>c.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.pos<b.ch)&&!l.eol();)l.start=l.pos,f=Bd(h,l,k),d&&i.push(e(!0));return d?i:e()}function Dd(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var i,j=0,k=null,l=new ig(b,a.options.tabSize),m=a.options.addModeClass&&[null];for(""==b&&zd(Ad(c,d),f);!l.eol();){if(l.pos>a.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;j<l.start;)j=Math.min(l.start,j+5e4),e(j,k);k=i}l.start=l.pos}for(;j<l.pos;){var o=Math.min(l.pos,j+5e4);e(o,k),j=o}}function Ed(a,b,c,d){var e=[a.state.modeGen],f={};Dd(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;Dd(a,b.text,h.mode,!0,function(a,b){for(var c=i;j<a;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;c<i;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function Fd(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=Ed(a,b,b.stateAfter=Pa(a,Zd(b)));b.styles=d.styles,d.classes?b.styleClasses=d.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function Gd(a,b,c,d){var e=a.doc.mode,f=new ig(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&Ad(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)Bd(e,f,c),f.start=f.pos}function Hd(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?pg:og;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function Id(a,b){var c=Me("span",null,null,pf?"padding-right: .1px":null),d={pre:Me("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,splitSpaces:(nf||pf)&&a.getOption("lineWrapping")};b.measure={};for(var e=0;e<=(b.rest?b.rest.length:0);e++){var f,g=e?b.rest[e-1]:b.line;d.pos=0,d.addToken=Kd,We(a.display.measure)&&(f=ae(g))&&(d.addToken=Md(d.addToken,f)),d.map=[];var h=b!=a.display.externalMeasured&&Zd(g);Od(g,d,Fd(a,g,h)),g.styleClasses&&(g.styleClasses.bgClass&&(d.bgClass=Re(g.styleClasses.bgClass,d.bgClass||"")),g.styleClasses.textClass&&(d.textClass=Re(g.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild(Ve(a.display.measure))),0==e?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return pf&&/\bcm-tab\b/.test(d.content.lastChild.className)&&(d.content.className="cm-tab-wrap-hack"),zg(a,"renderLine",a,b.line,d.pre),d.pre.className&&(d.textClass=Re(d.pre.className,d.textClass||"")),d}function Jd(a){var b=Me("span","•","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function Kd(a,b,c,d,e,f,g){if(b){var h=a.splitSpaces?b.replace(/ {3,}/g,Ld):b,i=a.cm.state.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(h.slice(l,l+n));nf&&of<9?k.appendChild(Me("span",[o])):k.appendChild(o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1,"\t"==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Me("span",Be(q),"cm-tab"));o.setAttribute("role","presentation"),o.setAttribute("cm-text","\t"),a.col+=q}else{var o=a.cm.options.specialCharPlaceholder(m[0]);o.setAttribute("cm-text",m[0]),nf&&of<9?k.appendChild(Me("span",[o])):k.appendChild(o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(h);a.map.push(a.pos,a.pos+b.length,k),nf&&of<9&&(j=!0),a.pos+=b.length}if(c||d||e||j||g){var r=c||"";d&&(r+=d),e&&(r+=e);var s=Me("span",[k],r,g);return f&&(s.title=f),a.content.appendChild(s)}a.content.appendChild(k)}}function Ld(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":" ";return b+=" "}function Md(a,b){return function(c,d,e,f,g,h,i){e=e?e+" cm-force-border":"cm-force-border";for(var j=c.pos,k=j+d.length;;){for(var l=0;l<b.length;l++){var m=b[l];if(m.to>j&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;t<d.length;++t){var u=d[t],v=u.marker;"bookmark"==v.type&&u.from==o&&v.widgetNode?s.push(v):u.from<=o&&(null==u.to||u.to>o||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return;m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t<s.length;++t)Nd(b,0,s[t])}if(o>=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p<c.length;p+=2)b.addToken(b,e.slice(f,f=c[p]),Hd(c[p+1],b.cm.options))}function Pd(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Ce(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Qd(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){xd(a,c,e,d),te(a,"change",a,b)}function g(a,b){for(var c=a,f=[];c<b;++c)f.push(new ng(j[c],e(c),d));return f}var h=b.from,i=b.to,j=b.text,k=Vd(a,h.line),l=Vd(a,i.line),m=Ce(j),n=e(j.length-1),o=i.line-h.line;if(b.full)a.insert(0,g(0,j.length)),a.remove(j.length,a.size-j.length);else if(Pd(a,b)){var p=g(0,j.length-1);f(l,l.text,n),o&&a.remove(h.line,o),p.length&&a.insert(h.line,p)}else if(k==l)if(1==j.length)f(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{var p=g(1,j.length-1);p.push(new ng(m+k.text.slice(i.ch),n,d)),f(k,k.text.slice(0,h.ch)+j[0],e(0)),a.insert(h.line+1,p)}else if(1==j.length)f(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),e(0)),a.remove(h.line+1,o);else{f(k,k.text.slice(0,h.ch)+j[0],e(0)),f(l,m+l.text.slice(i.ch),n);var p=g(1,j.length-1);o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Sd(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Td(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;c&&!i||(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Ud(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,g(a),c(a),a.options.lineWrapping||m(a),a.options.mode=b.modeOption,Ib(a)}function Vd(a,b){if(b-=a.first,b<0||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b<f){c=e;break}b-=f}return c.lines[b]}function Wd(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Xd(a,b,c,d){var e=[];return a.iter(b,c,function(a){var b=a.text;d&&(b=d(a)),e.push(b)}),e}function Yd(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function Zd(a){if(null==a.parent)return null;for(var b=a.parent,c=De(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function $d(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(b<f){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(b<h)break;b-=h}return c+d}function _d(a){a=od(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function ae(a){var b=a.order;return null==b&&(b=a.order=$g(a.text)),b}function be(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ce(a,b){var c={from:V(b.from),to:Uf(b),text:Wd(a,b.from,b.to)};return je(a,c,b.from.line,b.to.line+1),Td(a,function(a){je(a,c,b.from.line,b.to.line+1)},!0),c}function de(a){for(;a.length;){var b=Ce(a);if(!b.ranges)break;a.pop()}}function ee(a,b){return b?(de(a.done),Ce(a.done)):a.done.length&&!Ce(a.done).ranges?Ce(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function le(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(ke(c[d]));return e}function me(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?la.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var j,k=g[i];if(h.push({from:k.from,to:k.to,text:k.text}),b)for(var l in k)(j=l.match(/^spans_(\d+)$/))&&De(b,Number(j[1]))>-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function oe(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)ne(f.ranges[h].anchor,b,c,d),ne(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=Ff(i.from.line+d,i.from.ch),i.to=Ff(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function pe(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;oe(a.done,c,d,e),oe(a.undone,c,d,e)}function qe(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function re(a){return a.target||a.srcElement}function se(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),yf&&a.ctrlKey&&1==b&&(b=3),b}function te(a,b){function c(a){return function(){a.apply(null,f)}}var d=a._handlers&&a._handlers[b];if(d){var e,f=Array.prototype.slice.call(arguments,2);Mf?e=Mf.delayedCallbacks:Ag?e=Ag:(e=Ag=[],setTimeout(ue,0));for(var g=0;g<d.length;++g)e.push(c(d[g]))}}function ue(){var a=Ag;Ag=null;for(var b=0;b<a.length;++b)a[b]()}function ve(a,b,c){return"string"==typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}}),zg(a,c||b.type,a,b),qe(b)||b.codemirrorIgnore}function we(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)De(c,b[d])==-1&&c.push(b[d])}function xe(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Ee(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Fe(){}function Ge(a,b){var c;return Object.create?c=Object.create(a):(Fe.prototype=a,c=new Fe),b&&He(b,c),c}function He(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Ie(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Je(a,b){return b?!!(b.source.indexOf("\\w")>-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Ne(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Qe(c[d]).test(b)&&(b+=" "+c[d]);return b}function Se(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Te(){Sg||(Ue(),Sg=!0)}function Ue(){var a;xg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,Se(Rb)},100))}),xg(window,"blur",function(){Se(oc)})}function Ve(a){if(null==Og){var b=Me("span","​");Oe(a,Me("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Og=b.offsetWidth<=1&&b.offsetHeight>2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&b<c}function ff(a,b){Zg=null;for(var c,d=0;d<a.length;++d){var e=a[d];if(e.from<b&&e.to>b)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return ff(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a<this.events.length;a++)zg.apply(null,this.events[a])};var Ff=a.Pos=function(a,b){return this instanceof Ff?(this.line=a,void(this.ch=b)):new Ff(a,b)},Gf=a.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},Hf=null;da.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,f.value=Hf.join("\n"),Ig(f));else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type?d.setSelections(b.ranges,null,Dg):(c.prevInput="",f.value=b.text.join("\n"),Ig(f))}"cut"==a.type&&(d.state.cutIncoming=!0)}var c=this,d=this.cm,e=this.wrapper=ea(),f=this.textarea=e.firstChild;a.wrapper.insertBefore(e,a.wrapper.firstChild),wf&&(f.style.width="0px"),xg(f,"input",function(){nf&&of>=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f<g&&c.charCodeAt(f)==d.charCodeAt(f);)++f;var h=this;return Cb(a,function(){$(a,d.slice(f),c.length-f,null,h.composing?"*compose":null),d.length>1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n<r&&p.charCodeAt(n)==q.charCodeAt(n);)++n;for(var s=Ce(l),t=Ce(m),u=Math.min(s.length-(1==l.length?n:0),t.length-(1==m.length?n:0));o<u&&s.charCodeAt(s.length-o-1)==t.charCodeAt(t.length-o-1);)++o;l[l.length-1]=s.slice(0,s.length-o),l[0]=l[0].slice(n);var v=Ff(g,n),w=Ff(j,m.length?Ce(m).length-o:0);return l.length>1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){ -a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Db(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Fe,resetPosition:Fe,needsContentAttribute:!0},fa.prototype),a.inputStyles={textarea:da,contenteditable:fa},la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=Gf(c.anchor,d.anchor)||0!=Gf(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new ma(V(this.ranges[b].anchor),V(this.ranges[b].head));return new la(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(Gf(b,d.from())>=0&&Gf(a,d.to())<=0)return c}return-1}},ma.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var If,Jf,Kf,Lf={left:0,right:0,top:0,bottom:0},Mf=null,Nf=0,Of=0,Pf=0,Qf=null;nf?Qf=-.53:kf?Qf=15:rf?Qf=-.7:tf&&(Qf=-1/3);var Rf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Rf(a);return b.x*=Qf,b.y*=Qf,b};var Sf=new ze,Tf=null,Uf=a.changeEnd=function(a){return a.text?Ff(a.from.line+a.text.length-1,Ce(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,Wf.hasOwnProperty(a)&&Db(this,Wf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Rc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:Eb(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:d,modeSpec:b,opaque:c&&c.opaque}),this.state.modeGen++,Ib(this)}),removeOverlay:Eb(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,void Ib(this)}}),indentLine:Eb(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),sa(this.doc,a)&&Kc(this,a,b,c)}),indentSelection:Eb(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(Kc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Ic(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;i<c;++i)Kc(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&xa(this.doc,d,new ma(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return Cd(this,a,b)},getLineTokens:function(a,b){return Cd(this,Ff(a),b,!0)},getTokenTypeAt:function(a){a=qa(this.doc,a);var b,c=Fd(this,Vd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]<f)){b=c[2*g+2];break}d=g+1}}var h=b?b.indexOf("cm-overlay "):-1;return h<0?b:0==h?null:b.slice(0,h-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!ag.hasOwnProperty(b))return c;var d=ag[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&De(c,h.val)==-1&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=pa(c,null==a?c.first+c.size-1:a),Pa(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?qa(this.doc,a):a?d.from():d.to(),mb(this,c,b||"page")},charCoords:function(a,b){return lb(this,qa(this.doc,a),b||"page")},coordsChar:function(a,b){return a=kb(this,a,b||"page"),pb(this,a.left,a.top)},lineAtHeight:function(a,b){return a=kb(this,{top:a,left:0},b||"page").top,$d(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c,d=!1;if("number"==typeof a){var e=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0),c=Vd(this.doc,a)}else c=a;return jb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-_d(c):0)},defaultTextHeight:function(){return rb(this.display)},defaultCharWidth:function(){return sb(this.display)},setGutterMarker:Eb(function(a,b,c){return Lc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ke(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Eb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Jb(b,d,"gutter"),Ke(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!sa(this.doc,a))return null;var b=a;if(a=Vd(this.doc,a),!a)return null}else{var b=Zd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=mb(this,qa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b),f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Fc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Eb(ic),triggerOnKeyPress:Eb(lc),triggerOnKeyUp:kc,execCommand:function(a){if(dg.hasOwnProperty(a))return dg[a](this)},triggerElectric:Eb(function(a){aa(this,a)}),findPosH:function(a,b,c,d){var e=1;b<0&&(e=-1,b=-b);for(var f=0,g=qa(this.doc,a);f<b&&(g=Nc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Eb(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Nc(c.doc,d.head,a,b,c.options.rtlMoveVisually):a<0?d.from():d.to()},Fg)}),deleteH:Eb(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):Mc(this,function(c){var e=Nc(d,c.head,a,b,!1);return a<0?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;b<0&&(e=-1,b=-b);for(var g=0,h=qa(this.doc,a);g<b;++g){var i=mb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Oc(this,i,e,c),h.hitSide)break}return h},moveV:Eb(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return a<0?g.from():g.to();var h=mb(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=Oc(c,h,a,b);return"page"==b&&g==d.sel.primary()&&Hc(c,null,lb(c,i,"div").top-h.top),i},Fg),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=this.doc,c=Vd(b,a.line).text,d=a.ch,e=a.ch;if(c){var f=this.getHelper(a,"wordChars");(a.xRel<0||e==c.length)&&d?--d:++e;for(var g=c.charAt(d),h=Je(g,f)?function(a){return Je(a,f)}:/\s/.test(g)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Je(a)};d>0&&h(c.charAt(d-1));)--d;for(;e<c.length&&h(c.charAt(e));)++e}return new ma(Ff(a.line,d),Ff(a.line,e))},toggleOverwrite:function(a){null!=a&&a==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Rg(this.display.cursorDiv,"CodeMirror-overwrite"):Qg(this.display.cursorDiv,"CodeMirror-overwrite"),zg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Pe()},scrollTo:Eb(function(a,b){null==a&&null==b||Jc(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Ta(this)-this.display.barHeight,width:a.scrollWidth-Ta(this)-this.display.barWidth,clientHeight:Va(this),clientWidth:Ua(this)}},scrollIntoView:Eb(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:Ff(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)Jc(this),this.curOp.scrollToPos=a;else{var c=Gc(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Eb(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var d=this;null!=a&&(d.display.wrapper.style.width=c(a)),null!=b&&(d.display.wrapper.style.height=c(b)),d.options.lineWrapping&&fb(this);var e=d.display.viewFrom;d.doc.iter(e,d.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Jb(d,e,"widget");break}++e}),d.curOp.forceUpdate=!0,zg(d,"refresh",this)}),operation:function(a){return Cb(this,a)},refresh:Eb(function(){var a=this.display.cachedTextHeight;Ib(this),this.curOp.forceUpdate=!0,gb(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),k(this),(null==a||Math.abs(a-rb(this.display))>.5)&&g(this),zg(this,"refresh",this)}),swapDoc:Eb(function(a){var b=this.doc;return b.cm=null,Ud(this,a),gb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,te(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(a);var Vf=a.defaults={},Wf=a.optionHandlers={},Xf=a.Init={toString:function(){return"CodeMirror.Init"}};Pc("value","",function(a,b){a.setValue(b)},!0),Pc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Pc("indentUnit",2,c,!0),Pc("indentWithTabs",!1),Pc("smartIndent",!0),Pc("tabSize",4,function(a){d(a),gb(a),Ib(a)},!0),Pc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test("\t")?"":"|\t"),"g"),d!=a.Init&&b.refresh()}),Pc("specialCharPlaceholder",Jd,function(a){a.refresh()},!0),Pc("electricChars",!0),Pc("inputStyle",xf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Pc("rtlMoveVisually",!zf),Pc("wholeLineUpdateBefore",!0),Pc("theme","default",function(a){h(a),i(a)},!0),Pc("keyMap","default",function(b,c,d){var e=Rc(c),f=d!=a.Init&&Rc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Pc("extraKeys",null),Pc("lineWrapping",!1,e,!0),Pc("gutters",[],function(a){n(a.options),i(a)},!0),Pc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Pc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Pc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Pc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Pc("firstLineNumber",1,i,!0),Pc("lineNumberFormatter",function(a){return a},i,!0),Pc("showCursorWhenSelecting",!1,Ha,!0),Pc("resetSelectionOnContextMenu",!0),Pc("lineWiseCopyCut",!0),Pc("readOnly",!1,function(a,b){"nocursor"==b?(oc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Pc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Pc("dragDrop",!0,Qb),Pc("cursorBlinkRate",530),Pc("cursorScrollMargin",0),Pc("cursorHeight",1,Ha,!0),Pc("singleCursorHeightPerLine",!0,Ha,!0),Pc("workTime",100),Pc("workDelay",100),Pc("flattenSpans",!0,d,!0),Pc("addModeClass",!1,d,!0),Pc("pollInterval",100),Pc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Pc("historyEventDelay",1250),Pc("viewportMargin",10,function(a){a.refresh()},!0),Pc("maxHighlightLength",1e4,d,!0),Pc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Pc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Pc("autofocus",null);var Yf=a.modes={},Zf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Yf[b]=c},a.defineMIME=function(a,b){Zf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Zf.hasOwnProperty(b))b=Zf[b];else if(b&&"string"==typeof b.name&&Zf.hasOwnProperty(b.name)){var c=Zf[b.name];"string"==typeof c&&(c={name:c}),b=Ge(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Yf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if($f.hasOwnProperty(c.name)){var f=$f[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var $f=a.modeExtensions={};a.extendMode=function(a,b){var c=$f.hasOwnProperty(a)?$f[a]:$f[a]={};He(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){rg.prototype[a]=b},a.defineOption=Pc;var _f=[];a.defineInitHook=function(a){_f.push(a)};var ag=a.helpers={};a.registerHelper=function(b,c,d){ag.hasOwnProperty(b)||(ag[b]=a[b]={_global:[]}),ag[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),ag[b]._global.push({pred:d,val:e})};var bg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},cg=a.startState=function(a,b,c){return!a.startState||a.startState(b,c)};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var dg=a.commands={selectAll:function(a){a.setSelection(Ff(a.firstLine(),0),Ff(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){Mc(a,function(b){if(b.empty()){var c=Vd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:Ff(b.head.line+1,0)}:{from:b.head,to:Ff(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Mc(a,function(b){return{from:Ff(b.from().line,0),to:qa(a.doc,Ff(b.to().line+1,0))}})},delLineLeft:function(a){Mc(a,function(a){return{from:Ff(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Mc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){Mc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(Ff(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(Ff(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return bf(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return df(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return cf(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Fg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Fg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?df(a,b.head):d},Fg)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("\t")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Gg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Cb(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Vd(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new Ff(e.line,e.ch-1)),e.ch>0)e=new Ff(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Ff(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Vd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Ff(e.line-1,g.length-1),Ff(e.line,1),"+transpose")}c.push(new ma(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Cb(a,function(){for(var b=a.listSelections().length,c=0;c<b;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),Ic(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},eg=a.keyMap={};eg.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},eg.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},eg.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},eg.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},eg["default"]=yf?eg.macDefault:eg.pcDefault,a.normalizeKeyMap=function(a){var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(/^(name|fallthrough|(de|at)tach)$/.test(c))continue;if("..."==d){delete a[c];continue}for(var e=Ee(c.split(" "),Qc),f=0;f<e.length;f++){var g,h;f==e.length-1?(h=e.join(" "),g=d):(h=e.slice(0,f+1).join(" "),g="...");var i=b[h];if(i){if(i!=g)throw new Error("Inconsistent bindings for "+h)}else b[h]=g}delete a[c]}for(var j in b)a[j]=b[j];return a};var fg=a.lookupKey=function(a,b,c,d){b=Rc(b);var e=b.call?b.call(a,d):b[a];if(e===!1)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=Object.prototype.toString.call(b.fallthrough))return fg(a,b.fallthrough,c,d);for(var f=0;f<b.fallthrough.length;f++){var g=fg(a,b.fallthrough[f],c,d);if(g)return g}}},gg=a.isModifierKey=function(a){var b="string"==typeof a?a:Yg[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},hg=a.keyName=function(a,b){if(sf&&34==a.keyCode&&a["char"])return!1;var c=Yg[a.keyCode],d=c;return null!=d&&!a.altGraphKey&&(a.altKey&&"Alt"!=c&&(d="Alt-"+d),(Bf?a.metaKey:a.ctrlKey)&&"Ctrl"!=c&&(d="Ctrl-"+d),(Bf?a.ctrlKey:a.metaKey)&&"Cmd"!=c&&(d="Cmd-"+d),!b&&a.shiftKey&&"Shift"!=c&&(d="Shift-"+d),d)};a.fromTextArea=function(b,c){function d(){b.value=j.getValue()}if(c=c?He(c):{},c.value=b.value,!c.tabindex&&b.tabIndex&&(c.tabindex=b.tabIndex),!c.placeholder&&b.placeholder&&(c.placeholder=b.placeholder),null==c.autofocus){var e=Pe();c.autofocus=e==b||null!=b.getAttribute("autofocus")&&e==document.body}if(b.form&&(xg(b.form,"submit",d),!c.leaveSubmitMethodAlone)){var f=b.form,g=f.submit;try{var h=f.submit=function(){d(),f.submit=g,f.submit(),f.submit=h}}catch(i){}}c.finishInit=function(a){a.save=d,a.getTextArea=function(){return b},a.toTextArea=function(){a.toTextArea=isNaN,d(),b.parentNode.removeChild(a.getWrapperElement()),b.style.display="",b.form&&(yg(b.form,"submit",d),"function"==typeof b.form.submit&&(b.form.submit=g))}},b.style.display="none";var j=a(function(a){b.parentNode.insertBefore(a,b.nextSibling)},c);return j};var ig=a.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ig.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));if(c)return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Gg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Gg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Gg(this.string,null,this.tabSize)-(this.lineStart?Gg(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var jg=0,kg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++jg};ye(kg),kg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&tb(a),xe(this,"clear")){var c=this.find();c&&te(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=Yc(g.markedSpans,this);a&&!this.collapsed?Jb(a,Zd(g),"text"):a&&(null!=h.to&&(e=Zd(g)),null!=h.from&&(d=Zd(g))),g.markedSpans=Zc(g.markedSpans,h),null==h.from&&this.collapsed&&!sd(this.doc,g)&&a&&Yd(g,rb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=od(this.lines[f]),j=l(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Ib(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ea(a.doc)),a&&te(a,"markerCleared",a,this),b&&vb(a),this.parent&&this.parent.clear()}},kg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=Yc(f.markedSpans,this);if(null!=g.from&&(c=Ff(b?f:Zd(f),g.from),a==-1))return c;if(null!=g.to&&(d=Ff(b?f:Zd(f),g.to),1==a))return d}return c&&{from:c,to:d}},kg.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Cb(c,function(){var d=a.line,e=Zd(a.line),f=$a(c,e);if(f&&(eb(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!sd(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=vd(b)-g;h&&Yd(d,d.height+h)}})},kg.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&De(b.maybeHiddenMarkers,this)!=-1||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},kg.prototype.detachLine=function(a){if(this.lines.splice(De(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var jg=0,lg=a.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};ye(lg),lg.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();te(this,"clear")}},lg.prototype.find=function(a,b){return this.primary.find(a,b)};var mg=a.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a,this.node=b};ye(mg),mg.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=Zd(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=vd(this);Yd(c,Math.max(0,c.height-f)),a&&Cb(a,function(){ud(a,c,-f),Jb(a,d,"widget")})}},mg.prototype.changed=function(){var a=this.height,b=this.doc.cm,c=this.line;this.height=null;var d=vd(this)-a;d&&(Yd(c,c.height+d),b&&Cb(b,function(){b.curOp.forceUpdate=!0,ud(b,c,d)}))};var ng=a.Line=function(a,b,c){this.text=a,gd(this,b),this.height=c?c(this):1};ye(ng),ng.prototype.lineNo=function(){return Zd(this)};var og={},pg={};Rd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];this.height-=e.height,yd(e),te(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;a<d;++a)if(c(this.lines[a]))return!0}},Sd.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Rd))){var h=[];this.collapse(h),this.children=[new Rd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<=f){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Rd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Sd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=De(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Sd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<f){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var qg=0,rg=a.Doc=function(a,b,c){if(!(this instanceof rg))return new rg(a,b,c);null==c&&(c=0),Sd.call(this,[new Rd([new ng("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=Ff(c,0);this.sel=oa(d),this.history=new be(null),this.id=++qg,this.modeOption=b,"string"==typeof a&&(a=Ug(a)),Qd(this,{from:d,to:d,text:a}),Ba(this,oa(d),Dg)};rg.prototype=Ge(Sd.prototype,{constructor:rg,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a,b){var c=Xd(this,this.first,this.first+this.size,b);return a===!1?c:c.join(a||"\n")},setValue:Fb(function(a){var b=Ff(this.first,0),c=this.first+this.size-1;wc(this,{from:b,to:Ff(c,Vd(this,c).text.length),text:Ug(a),origin:"setValue",full:!0},!0),Ba(this,oa(b))}),replaceRange:function(a,b,c,d){b=qa(this,b),c=c?qa(this,c):b,Cc(this,a,b,c,d)},getRange:function(a,b,c){var d=Wd(this,qa(this,a),qa(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){if(sa(this,a))return Vd(this,a)},getLineNumber:function(a){ -return Zd(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Vd(this,a)),od(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return qa(this,a)},getCursor:function(a){var b,c=this.sel.primary();return b=null==a||"head"==a?c.head:"anchor"==a?c.anchor:"end"==a||"to"==a||a===!1?c.to():c.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fb(function(a,b,c){ya(this,qa(this,"number"==typeof a?Ff(a,b||0):a),null,c)}),setSelection:Fb(function(a,b,c){ya(this,qa(this,a),qa(this,b||a),c)}),extendSelection:Fb(function(a,b,c){va(this,qa(this,a),b&&qa(this,b),c)}),extendSelections:Fb(function(a,b){wa(this,ta(this,a,b))}),extendSelectionsBy:Fb(function(a,b){wa(this,Ee(this.sel.ranges,a),b)}),setSelections:Fb(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new ma(qa(this,a[d].anchor),qa(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),Ba(this,na(e,b),c)}}),addSelection:Fb(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new ma(qa(this,a),qa(this,b||a))),Ba(this,na(d,d.length-1),c)}),getSelection:function(a){for(var b,c=this.sel.ranges,d=0;d<c.length;d++){var e=Wd(this,c[d].from(),c[d].to());b=b?b.concat(e):e}return a===!1?b:b.join(a||"\n")},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Wd(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||"\n")),b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:Fb(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:Ug(a[f]),origin:c}}for(var h=b&&"end"!=b&&uc(this,d,b),f=d.length-1;f>=0;f--)wc(this,d[f]);h?Aa(this,h):this.cm&&Ic(this.cm)}),undo:Fb(function(){yc(this,"undo")}),redo:Fb(function(){yc(this,"redo")}),undoSelection:Fb(function(){yc(this,"undo",!0)}),redoSelection:Fb(function(){yc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new be(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:me(this.history.done),undone:me(this.history.undone)}},setHistory:function(a){var b=this.history=new be(this.history.maxGeneration);b.done=me(a.done.slice(0),null,!0),b.undone=me(a.undone.slice(0),null,!0)},addLineClass:Fb(function(a,b,c){return Lc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(Qe(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Fb(function(a,b,c){return Lc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(Qe(c));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Fb(function(a,b,c){return wd(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return Sc(this,qa(this,a),qa(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};return a=qa(this,a),Sc(this,a,a,c,"bookmark")},findMarksAt:function(a){a=qa(this,a);var b=[],c=Vd(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=qa(this,a),b=qa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];e==a.line&&a.ch>i.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){var e=d.text.length+1;return e>a?(b=a,!0):(a-=e,void++c)}),qa(this,Ff(c,b))},indexFromPos:function(a){a=qa(this,a);var b=a.ch;return a.line<this.first||a.ch<0?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new rg(Xd(this,this.first,this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to);var d=new rg(Xd(this,b,c),a.mode||this.modeOption,b);return a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],Vc(d,Uc(this)),d},unlinkDoc:function(b){if(b instanceof a&&(b=b.doc),this.linked)for(var c=0;c<this.linked.length;++c){var d=this.linked[c];if(d.doc==b){this.linked.splice(c,1),b.unlinkDoc(this),Wc(Uc(this));break}}if(b.history==this.history){var e=[b.id];Td(b,function(a){e.push(a.id)},!0),b.history=new be(null),b.history.done=me(this.history.done,e),b.history.undone=me(this.history.undone,e)}},iterLinkedDocs:function(a){Td(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),rg.prototype.eachLine=rg.prototype.iter;var sg="iter insert remove copy getEditor constructor".split(" ");for(var tg in rg.prototype)rg.prototype.hasOwnProperty(tg)&&De(sg,tg)<0&&(a.prototype[tg]=function(a){return function(){return a.apply(this.doc,arguments)}}(rg.prototype[tg]));ye(rg);var ug=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},vg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},wg=a.e_stop=function(a){ug(a),vg(a)},xg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},yg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}}},zg=a.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},Ag=null,Bg=30,Cg=a.Pass={toString:function(){return"CodeMirror.Pass"}},Dg={scroll:!1},Eg={origin:"*mouse"},Fg={origin:"+move"};ze.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var Gg=a.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),b==-1&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf("\t",f);if(h<0||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;m<k;++m)l.push(d=a(c.charCodeAt(m)));for(var m=0,n=j;m<k;++m){var d=l[m];"m"==d?l[m]=n:n=d}for(var m=0,o=j;m<k;++m){var d=l[m];"1"==d&&"r"==o?l[m]="n":g.test(d)&&(o=d,"r"==d&&(l[m]="R"))}for(var m=1,n=l[0];m<k-1;++m){var d=l[m];"+"==d&&"1"==n&&"1"==l[m+1]?l[m]="1":","!=d||n!=l[m+1]||"1"!=n&&"n"!=n||(l[m]=n),n=d}for(var m=0;m<k;++m){var d=l[m];if(","==d)l[m]="N";else if("%"==d){for(var p=m+1;p<k&&"%"==l[p];++p);for(var q=m&&"!"==l[m-1]||p<k&&"1"==l[p]?"1":"N",r=m;r<p;++r)l[r]=q;m=p-1}}for(var m=0,o=j;m<k;++m){var d=l[m];"L"==o&&"1"==d?l[m]="L":g.test(d)&&(o=d)}for(var m=0;m<k;++m)if(f.test(l[m])){for(var p=m+1;p<k&&f.test(l[p]);++p);for(var s="L"==(m?l[m-1]:j),t="L"==(p<k?l[p]:j),q=s||t?"L":"R",r=m;r<p;++r)l[r]=q;m=p-1}for(var u,v=[],m=0;m<k;)if(h.test(l[m])){var w=m;for(++m;m<k&&h.test(l[m]);++m);v.push(new b(0,w,m))}else{var x=m,y=v.length;for(++m;m<k&&"L"!=l[m];++m);for(var r=x;r<m;)if(i.test(l[r])){x<r&&v.splice(y,0,new b(1,x,r));var z=r;for(++r;r<m&&i.test(l[r]);++r);v.splice(y,0,new b(2,z,r)),x=r}else++r;x<m&&v.splice(y,0,new b(1,x,m))}return 1==v[0].level&&(u=c.match(/^\s+/))&&(v[0].from=u[0].length,v.unshift(new b(0,0,u[0].length))),1==Ce(v).level&&(u=c.match(/\s+$/))&&(Ce(v).to-=u[0].length,v.push(new b(0,k-u[0].length,k))),2==v[0].level&&v.unshift(new b(1,v[0].to,v[0].to)),v[0].level!=Ce(v).level&&v.push(new b(v[0].level,k,k)),v}}();return a.version="5.4.1",a}),function(a){a(CodeMirror)}(function(a){function b(a,b){for(var c=0,d=a.length;c<d;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return a.indexOf(b)!=-1}function d(b,c,d,e){var f=b.getCursor(),i=d(b,f);if(!/\b(?:string)\b/.test(i.type)){i.state=a.innerMode(b.getMode(),i.state).state,/^[\w$_]*$/.test(i.string)?i.end>f.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c<d;++c)b[a[c]]=!0;return b}function b(a,b){if(a.eatSpace())return null;var d=a.next();if('"'===d||"'"===d)return c(a,d),"string";if(/[\[\],\(\)]/.test(d))return"bracket";a.eatWhile(/[\w-]/);var g=a.current();return e.hasOwnProperty(g)?"atom":f.hasOwnProperty(g)?"keyword":null}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(c===b&&!d)return!1;d=!d&&"\\"===c}return d}function d(a,c){return(c.tokens[0]||b)(a,c)}var e=a(["false","true"]),f=a(BI.FormulaCollections);return{startState:function(){return{tokens:[]}},token:function(a,b){return d(a,b)},fold:"brace"}}),a.defineMIME("text/fx-formula","formula")}),function(a){a(CodeMirror)}(function(a){"use strict";function b(a,b){this.cm=a,this.options=this.buildOptions(b),this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor(),this.startLen=this.cm.getLine(this.startPos.line).length;var c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}function c(a){return"string"==typeof a?a:a.text}function d(a,b){function c(a,c){var e;e="string"!=typeof c?function(a){return c(a,b)}:d.hasOwnProperty(c)?d[c]:c,f[a]=e}var d={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},e=a.options.customKeys,f=e?{}:d;if(e)for(var g in e)e.hasOwnProperty(g)&&c(g,e[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&c(g,h[g]);return f}function e(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function f(b,f){this.completion=b,this.data=f,this.picked=!1;var i=this,j=b.cm,k=this.hints=document.createElement("ul");k.className="CodeMirror-hints",this.selectedHint=f.selectedHint||0;for(var l=f.list,m=0;m<l.length;++m){var n=k.appendChild(document.createElement("li")),o=l[m],p=g+(m!=this.selectedHint?"":" "+h);null!=o.className&&(p=o.className+" "+p),n.className=p,o.render?o.render(n,f,o):n.appendChild(document.createTextNode(o.displayText||c(o))),n.hintId=m}var q=j.cursorCoords(b.options.alignWithWord?f.from:null),r=q.left,s=q.bottom,t=!0;k.style.left=r+"px",k.style.top=s+"px";var u=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),v=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(b.options.container||document.body).appendChild(k);var w=k.getBoundingClientRect(),x=w.bottom-v;if(x>0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else{this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete");var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-1)))this.close();else{var c=this;this.debounce=i(function(){c.update()}),this.widget&&this.widget.disable()}},update:function(b){if(null!=this.tick)if(this.data&&a.signal(this.data,"update"),this.options.hint.async){var c=++this.tick,d=this;this.options.hint(this.cm,function(a){d.tick==c&&d.finishUpdate(a,b)},this.options)}else this.finishUpdate(this.options.hint(this.cm,this.options),b)},finishUpdate:function(b,c){this.data=b;var d=this.widget&&this.widget.picked||c&&this.options.completeSingle;this.widget&&this.widget.close(),b&&b.list.length&&(d&&1==b.list.length?this.pick(b,0):(this.widget=new f(this,b),a.signal(b,"shown")))},buildOptions:function(a){var b=this.cm.options.hintOptions,c={};for(var d in k)c[d]=k[d];if(b)for(var d in b)void 0!==b[d]&&(c[d]=b[d]);if(a)for(var d in a)void 0!==a[d]&&(c[d]=a[d]);return c}},f.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus)),a.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(b,c){if(b>=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTop<this.hints.scrollTop?this.hints.scrollTop=d.offsetTop-3:d.offsetTop+d.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f<e.length;f++){var g=e[f](b,c);if(g&&g.list.length)return g}else if(d=b.getHelper(b.getCursor(),"hintWords")){if(d)return a.hint.fromList(b,{words:d})}else if(a.hint.anyword)return a.hint.anyword(b,c)}),a.registerHelper("hint","fromList",function(b,c){for(var d=b.getCursor(),e=b.getTokenAt(d),f=[],g=0;g<c.words.length;g++){var h=c.words[g];h.slice(0,e.string.length)==e.string&&f.push(h)}if(f.length)return{list:f,from:a.Pos(d.line,e.start),to:a.Pos(d.line,e.end)}}),a.commands.autocomplete=a.showHint;var k={hint:a.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),BI.FormulaCollections=["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"],BI.FormulaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-formula-editor bi-card",watermark:"",value:"",fieldTextValueMap:{},showHint:!0,lineHeight:2})},_init:function(){BI.FormulaEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;if(this.editor=CodeMirror(this.element[0],{textWrapping:!0,lineWrapping:!0,lineNumbers:!1,mode:"formula"}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.formulaHint,{completeSingle:!1}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),BI.isKey(a.value)&&b.setValue(a.value),BI.isKey(this.options.watermark)){var b=this;this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,whiteSpace:"nowrap",textAlign:"left"}),BI.createWidget({type:"bi.absolute",element:b,items:[{el:b.watermark,left:0,top:0}]}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),this.watermark.element.css({position:"absolute",left:3,right:3,top:6,bottom:0})}},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},focus:function(){this.editor.focus()},insertField:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"fieldName",atomic:!0,startStyle:"start",endStyle:"end"}),this.editor.replaceSelection(" "),this.editor.focus()},insertFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0}),this.editor.replaceSelection("() "),c=this.editor.getCursor(),c.ch=c.ch-2,this.editor.setCursor(c),this.editor.focus()},insertOperator:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"%operator",atomic:!0}),this.editor.replaceSelection(" "),this.editor.focus()},setFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getFormulaString:function(){return this.editor.getValue()},getUsedFields:function(){var a=this.options.fieldTextValueMap,b=[];return this.editor.getValue(!0,function(c){var d=c.text;_.forEach(c.markedSpans,function(c,e){switch(c.marker.className){case"fieldName":var f=a[d.substr(c.from,c.to-c.from)];b.contains(f)||b.push(f)}})}),b},getCheckString:function(){return this.editor.getValue(!0,function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(a.markedSpans,function(a,b){switch(a.marker.className){case"fieldName":var e=a.to-a.from;c=c.substr(0,a.from+d)+"$a"+c.substr(a.to+d,c.length),d=d+2-e}}),c})},getValue:function(){var a=this.options.fieldTextValueMap;return this.editor.getValue("\n",function(b){var c=b.text,d=b.text,e=0;return d.text=c,_.forEach(b.markedSpans,function(b,c){switch(b.marker.className){case"fieldName":var f=b.to-b.from,g=a[d.substr(b.from+e,f)];d=d.substr(0,b.from+e)+"${"+a[d.substr(b.from+e,f)]+"}"+d.substr(b.to+e,d.length),e+=g.length-f+3}}),d})},setValue:function(a){this.editor.setValue(a)},setFieldTextValueMap:function(a){this.options.fieldTextValueMap=a},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.FormulaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.FormulaEditor.EVENT_BLUR="EVENT_BLUR",BI.FormulaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.formula_editor",BI.FormulaEditor), -$.extend(BI,{Msg:function(){var a,b,c;return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){c=c||$("body");var d=BI.createWidget({type:"bi.toast",level:b,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:d,left:"50%",top:0}]}),d.element.outerWidth()>c.outerWidth()&&d.setWidth(c.width()),d.element.css({"margin-left":-1*d.element.outerWidth()/2}),d.invisible(),d.element.slideDown(500,function(){BI.delay(function(){d.element.slideUp(500,function(){d.destroy()})},5e3)})},_show:function(d,e,f,g){b=$('<div class="bi-z-index-mask">').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('<div class="bi-message-depend">').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),height:30,level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),height:30,handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,type:"bi.center_adapt",items:[{type:"bi.border",cls:"bi-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};a=BI.createWidget(j)}}}()}),BI.GridView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-view",overflowX:!0,overflowY:!0,overscanColumnCount:0,overscanRowCount:0,rowHeightGetter:BI.emptyFn,columnWidthGetter:BI.emptyFn,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.GridView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B=[],C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=[I,K],N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=BI.deepIndexOf(this.renderedKeys,M);O>-1?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l})),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B.push(M),C[H++]=L}var P={},Q={},R=[];BI.each(B,function(b,c){BI.deepContains(a.renderedKeys,c)?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(P,b)||BI.deepContains(Q,b)||R.push(a)}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a){S.push(A[a])}),this.container.addItems(S),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getMaxScrollLeft:function(){return Math.max(0,this._columnSizeAndPositionManager.getTotalSize()-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._rowSizeAndPositionManager.getTotalSize()-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a),b.items.length>0?(this.columnCount=b.items[0].length,this.rowCount=b.items.length):(this.rowCount=0,this.columnCount=0),this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},setEstimatedColumnSize:function(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.FloatBox=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-float-box bi-card",width:600,height:500})},_init:function(){BI.FloatBox.superclass._init.apply(this,arguments);var a=this,b=this.options;this.showAction=new BI.ShowAction({tar:this}),this._center=BI.createWidget(),this._north=BI.createWidget(),this.element.draggable&&this.element.draggable({handle:".bi-message-title",drag:function(a,c){var d=$("body").width(),e=$("body").height();c.position.left+b.width>d&&(c.position.left=d-b.width),c.position.top+b.height>e&&(c.position.top=e-b.height),c.position.left<0&&(c.position.left=0),c.position.top<0&&(c.position.top=0)}}),this._south=BI.createWidget(),BI.createWidget({type:"bi.border",element:this,items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.absolute",items:[{el:this._north,left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:50,handler:function(){a.currentSectionProvider.close()}},width:60}}},height:50},center:{el:{type:"bi.absolute",items:[{el:this._center,left:10,top:10,right:10,bottom:10}]}},south:{el:{type:"bi.absolute",items:[{el:this._south,left:10,top:0,right:10,bottom:0}]},height:60}}})},populate:function(a){var b=this;this.currentSectionProvider&&this.currentSectionProvider!==a&&this.currentSectionProvider.destroy(),this.currentSectionProvider=a,a.rebuildNorth(this._north),a.rebuildCenter(this._center),a.rebuildSouth(this._south),a.on(BI.PopoverSection.EVENT_CLOSE,function(){b.close()})},show:function(){this.showAction.actionPerformed()},hide:function(){this.showAction.actionBack()},open:function(){this.show(),this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN)},close:function(){this.hide(),this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED)},setZindex:function(a){this.element.css({"z-index":a})},destroyed:function(){this.currentSectionProvider&&this.currentSectionProvider.destroy()}}),BI.shortcut("bi.float_box",BI.FloatBox),BI.FloatBox.EVENT_FLOAT_BOX_CLOSED="EVENT_FLOAT_BOX_CLOSED",BI.FloatBox.EVENT_FLOAT_BOX_OPEN="EVENT_FLOAT_BOX_CLOSED",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popup-view",maxWidth:"auto",minWidth:100,minHeight:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,direction:BI.Direction.Top,stopEvent:!1,stopPropagation:!1,logic:{dynamic:!0},tool:!1,tabs:[],buttons:[],el:{type:"bi.button_group",items:[],chooseType:0,behaviors:{},layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.PopupView.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card bi-border"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group"}),this.button_group.element.css({"min-height":a.minHeight+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-background"}]}),this.searcher=BI.createWidget(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())<e&&f<c.items.length;){var i=c.items.slice(f,f+c.blockSize);this.container.addItems(i);var j=h()-a;this.cache[g]={index:f,scrollTop:a,height:j},this.renderedIndex=g,g++,f+=c.blockSize}},_calculateBlocksToRender:function(){this.options;this._renderMoreIf()},_populate:function(a){var b=this.options;a&&this.options.items!==a&&(this.options.items=a),this._calculateBlocksToRender(),this.element.scrollTop(b.scrollTop)},restore:function(){this.renderedIndex=-1,this.container.empty(),this.cache={}},populate:function(a){a&&this.options.items!==a&&this.restore(),this._populate()},destroyed:function(){this.restore()}}),BI.shortcut("bi.list_view",BI.ListView),BI.VirtualList=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-virtual-list",overscanHeight:100,blockSize:10,scrollTop:0,items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var a=this;this.options;return{type:"bi.vertical",items:[{type:"bi.layout",ref:function(){a.topBlank=this}},{type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},{type:"bi.layout",ref:function(){a.bottomBlank=this}}],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()+b.topBlank.element.height()+b.bottomBlank.element.height()};(a=h())<e&&f<c.items.length;){var i=c.items.slice(f,f+c.blockSize);this.container.addItems(i);var j=h()-a;this.cache[g]={index:f,scrollTop:a,height:j},this.tree.set(g,j),this.renderedIndex=g,g++,f+=c.blockSize}},_calculateBlocksToRender:function(){var a=this.options;this._renderMoreIf();for(var b=this.element.height(),c=a.scrollTop-a.overscanHeight,d=a.scrollTop+b+a.overscanHeight,e=this.tree.greatestLowerBound(c),f=this.tree.leastUpperBound(d),g=[],h=0;h<e;h++){var i=this.cache[h].index;if(!this.cache[h].destroyed){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++)g.push(this.container._children[j]),this.container._children[j]=null;this.cache[h].destroyed=!0}}for(var h=f+1;h<=this.renderedIndex;h++){var i=this.cache[h].index;if(!this.cache[h].destroyed){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++)g.push(this.container._children[j]),this.container._children[j]=null;this.cache[h].destroyed=!0}}for(var k=document.createDocumentFragment(),l=document.createDocumentFragment(),m=k,h=e<0?0:e;h<=f&&h<=this.renderedIndex;h++){var i=this.cache[h].index;if(this.cache[h].destroyed||(m=l),this.cache[h].destroyed===!0){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++){var n=this.container._addElement(j,BI.extend({root:!0},BI.stripEL(a.items[j])));m.appendChild(n.element[0])}this.cache[h].destroyed=!1}}this.container.element.prepend(k),this.container.element.append(l),this.topBlank.setHeight(this.cache[e<0?0:e].scrollTop);var o=this.cache[Math.min(f,this.renderedIndex)];this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex)-o.scrollTop-o.height),BI.each(g,function(a,b){b&&b._destroy()})},_populate:function(a){var b=this.options;a&&this.options.items!==a&&(this.options.items=a),this.tree=BI.PrefixIntervalTree.empty(Math.ceil(b.items.length/b.blockSize)),this._calculateBlocksToRender(),this.element.scrollTop(b.scrollTop)},_clearChildren:function(){BI.each(this.container._children,function(a,b){b&&b.el._destroy()}),this.container._children={},this.container.attr("items",[])},restore:function(){this.renderedIndex=-1,this._clearChildren(),this.cache={},this.options.scrollTop=0},populate:function(a){a&&this.options.items!==a&&this.restore(),this._populate()},destroyed:function(){this.restore()}}),BI.shortcut("bi.virtual_list",BI.VirtualList),BI.Pager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.Pager.superclass._init.apply(this,arguments);this.currPage=BI.result(this.options,"curr"),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start<g-1&&(d.start=d.end-g+1);var l=d.start,m=d.end;for(h&&i&&d.index>1&&0!==g&&e>g&&d.end<e&&0!==g&&(l++,m--);l<=m;l++)l===f?c.push({text:l,value:l,selected:!0}):c.push({text:l,value:l});(!b.dynamicShow&&!b.dynamicShowFirstLast||e>g&&d.end<e&&0!==g)&&i&&(e>g&&d.end<e&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),c.push({text:i,value:"last",disabled:!(e>g&&d.end<e&&0!==g)})),d.flow=!j&&0===g,(!b.dynamicShow&&!b.dynamicShowPrevNext&&k||f!==e&&k||d.flow)&&c.push(function(){return BI.isKey(k)?e===!1?{text:k,value:"next",disabled:b.hasNext(f)===!1}:d.flow&&f===e?{text:k,value:"next",disabled:!0}:{text:k,value:"next",disabled:!(f!==e&&k||d.flow)}:BI.extend({disabled:e===!1?b.hasNext(f)===!1:!(f!==e&&k||d.flow)},k)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(c,{cls:"bi-list-item-select",height:23,hgap:10}),behaviors:b.behaviors,layouts:b.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(c,d,f){if(c===BI.Events.CLICK){var g=a.button_group.getValue()[0];switch(g){case"first":a.currPage=1;break;case"last":a.currPage=e;break;case"prev":a.currPage--;break;case"next":a.currPage++;break;default:a.currPage=g}b.jump.apply(a,[{pages:e,curr:a.currPage}]),a._populate(),a.fireEvent(BI.Pager.EVENT_CHANGE,f)}a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(a){this.options.pages=a},hasPrev:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasPrev(a):a>1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):a<c},setValue:function(a){var b=this.options;if(a=0|a,a=a<1?1:a,b.pages===!1){var c=BI.result(b,"lastPage"),d=1;this.currPage=a>c?c:(d=BI.result(b,"firstPage"),a<d?d:a)}else a=a>b.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.Pager.EVENT_CHANGE="EVENT_CHANGE",BI.Pager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.pager",BI.Pager),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,element:"<a/>"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{consts:{loadedText:BI.i18nText("BI-Load_More"),endText:BI.i18nText("BI-No_More_Data")},_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=this;this.loaded=BI.createWidget({type:"bi.text_button",cls:"loading-text bi-list-item-simple",text:this.consts.loadedText,width:120,handler:this.options.handler}),this.loaded.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.loading=BI.createWidget({type:"bi.layout",width:this.options.height,height:this.options.height,cls:"loading-background cursor-default"});var b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,cardName:"loading"}]}),this.invisible()},_reset:function(){this.visible(),this.loaded.setText(this.consts.loadedText),this.loaded.enable()},setLoaded:function(){this._reset(),this.cardLayout.showCardByName("loaded")},setEnd:function(){this.setLoaded(),this.loaded.setText(this.consts.endText),this.loaded.disable()},setLoading:function(){this._reset(),this.cardLayout.showCardByName("loading")}}),BI.shortcut("bi.loading_bar",BI.LoadingBar),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]})},doClick:function(){BI.IconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconButton.EVENT_CHANGE,this)}}),BI.IconButton.EVENT_CHANGE="IconButton.EVENT_CHANGE",BI.shortcut("bi.icon_button",BI.IconButton),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.iconHeight)?BI.createWidget({type:"bi.center_adapt",element:this,items:[this.image]}):BI.createWidget({type:"bi.adaptive",element:this,items:[this.image],scrollable:!1})},setWidth:function(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},getSrc:function(){return this.image.getSrc()},doClick:function(){BI.ImageButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageButton.EVENT_CHANGE,this)}}),BI.ImageButton.EVENT_CHANGE="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button",minWidth:a.block===!0||a.clear===!0?0:90,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconClass:"",level:"common",block:!1,clear:!1,textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height+"px"}),BI.isKey(a.iconClass)?(this.icon=BI.createWidget({type:"bi.icon",width:18}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value}),BI.createWidget({type:"bi.horizontal_auto",cls:"button-"+a.level+" "+a.iconClass,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",cls:"button-"+a.level,textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},destroy:function(){BI.Button.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.button",BI.Button),BI.Button.EVENT_CHANGE="EVENT_CHANGE"}(jQuery), -BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,forceCenter:a.forceCenter,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py})},doClick:function(){BI.TextButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextButton.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconIconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const,c=BI.createWidget({type:"bi.layout",width:a.blankWidth});this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:b.commonWidth}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:b.commonWidth}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.icon1,this.icon2,this.text)}))))},doClick:function(){BI.BlankIconIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_icon_text_item",BI.BlankIconIconTextItem),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},c,this.text,{type:"bi.layout",width:b.commonWidth})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},cls:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const,c=BI.createWidget({type:"bi.layout",width:a.blankWidth});this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),d=BI.createWidget({type:"bi.layout",width:b.commonWidth});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.text,d)}))))},doClick:function(){BI.IconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_item",BI.IconTextIconItem),BI.IconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-item",direction:BI.Direction.Left,logic:{dynamic:!1},iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.IconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_item",BI.IconTextItem),BI.TextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-icon-item",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-item",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.py})},doClick:function(){BI.TextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_item",BI.TextItem),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-icon-node",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),d=BI.createWidget({type:"bi.layout",width:b.commonWidth});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.text,d)}))))},doClick:function(){BI.IconTextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_node",BI.IconTextIconNode),BI.IconTextNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.IconTextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_node",BI.IconTextNode),BI.TextIconNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-icon-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconNode.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.TextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_node",BI.TextIconNode),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-node",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextNode.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.py})},doClick:function(){BI.TextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_node",BI.TextNode),BI.CodeEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-code-editor bi-card",value:"",watermark:"",lineHeight:2,readOnly:!1,paramFormatter:function(a){return a}})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.editor=CodeMirror(this.element[0],{textWrapping:!0,lineWrapping:!0,lineNumbers:!1,readOnly:a.readOnly}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(a,c){BI.nextTick(function(){b.fireEvent(BI.CodeEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b.watermark.setVisible(!1),b.fireEvent(BI.CodeEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.watermark.setVisible(BI.isEmptyString(b.getValue())),b.fireEvent(BI.CodeEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:a.watermark,cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:5}]}),BI.isKey(a.value)&&BI.nextTick(function(){b.setValue(a.value)})},_setEnable:function(a){BI.CodeEditor.superclass._setEnable.apply(this,arguments),this.editor.setOption("readOnly",a!==!0&&"nocursor")},_checkWaterMark:function(){var a=this.options;BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},insertParam:function(a){var b=a;a=this.options.paramFormatter(a);var c=this.editor.getCursor();this.editor.replaceSelection(a);var d=this.editor.getCursor(),e={className:"param",atomic:!0};BI.isNotNull(a.match(/^<!.*!>$/))&&(e.className="error-param"),e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getValue:function(){return this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(a.markedSpans,function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c})},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g;return a.match(b)},setValue:function(a){var b,c=this;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var d=/\$[\{][^\}]*[\}]/,e=b.match(d);BI.isNotEmptyArray(e)?c.insertParam(e[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},focus:function(){this.editor.focus()},blur:function(){this.editor.getInputField().blur()},setStyle:function(a){this.style=a,this.element.css(a)},getStyle:function(){return this.style},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.CodeEditor.EVENT_CHANGE="EVENT_CHANGE",BI.CodeEditor.EVENT_BLUR="EVENT_BLUR",BI.CodeEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.code_editor",BI.CodeEditor),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,tipType:"warning",inputType:"text",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){BI.Editor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"<input type='"+b.inputType+"'/>",root:!0,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,forceCenter:!0,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}),this.watermark.element.css({position:"absolute",left:"3px",right:"3px",top:"0px",bottom:"0px"}));var c=[{el:{type:"bi.default",items:this.watermark?[this.editor,this.watermark]:[this.editor]},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:c}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a.setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a.setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a.setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a.setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?this.setValue(this.options.value):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this.setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(this.editor.getValue())),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,this),this._checkToolTip(),BI.Bubbles.get(this.getName())},disableError:function(){this.disabledError=!0,this._checkError()},enableError:function(){this.disabledError=!1,this._checkError()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},enableWaterMark:function(){this.disabledWaterMark=!1,this._checkWaterMark()},focus:function(){this.element.addClass("text-editor-focus"),this.editor.focus()},blur:function(){this.element.removeClass("text-editor-focus"),this.editor.blur()},selectAll:function(){this.editor.selectAll()},onKeyDown:function(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),this._checkError(),this._checkWaterMark()},getLastValidValue:function(){return this.editor.getLastValidValue()},resetLastValidValue:function(){this.editor.resetLastValidValue()},getValue:function(){return this.isValid()?BI.trim(this.editor.getValue()):BI.trim(this.editor.getLastValidValue())},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.Editor.EVENT_CHANGE="EVENT_CHANGE",BI.Editor.EVENT_FOCUS="EVENT_FOCUS",BI.Editor.EVENT_BLUR="EVENT_BLUR",BI.Editor.EVENT_CLICK="EVENT_CLICK",BI.Editor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Editor.EVENT_SPACE="EVENT_SPACE",BI.Editor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Editor.EVENT_START="EVENT_START",BI.Editor.EVENT_PAUSE="EVENT_PAUSE",BI.Editor.EVENT_STOP="EVENT_STOP",BI.Editor.EVENT_CONFIRM="EVENT_CONFIRM",BI.Editor.EVENT_VALID="EVENT_VALID",BI.Editor.EVENT_ERROR="EVENT_ERROR",BI.Editor.EVENT_ENTER="EVENT_ENTER",BI.Editor.EVENT_RESTRICT="EVENT_RESTRICT",BI.Editor.EVENT_REMOVE="EVENT_REMOVE",BI.Editor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.editor",BI.Editor),BI.MultifileEditor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments); -}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADED,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",scrollable:!1,items:[this.file]},top:0,right:0,left:0,bottom:0}]})},select:function(){this.file.select()},getValue:function(){return this.file.getValue()},upload:function(){this.file.upload()},reset:function(){this.file.reset()}}),BI.MultifileEditor.EVENT_CHANGE="MultifileEditor.EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="MultifileEditor.EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="MultifileEditor.EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="MultifileEditor.EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="MultifileEditor.EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor bi-card",value:""})},_init:function(){BI.TextAreaEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.content=BI.createWidget({type:"bi.layout",tagName:"textarea",width:"100%",height:"100%",cls:"bi-textarea textarea-editor-content display-block"}),this.content.element.css({resize:"none"}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",items:[this.content]},left:0,right:3,top:0,bottom:5}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),$(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&($(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),$(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&b.setValue(a.value),BI.isNotNull(a.style)&&b.setValue(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark",textAlign:"left",height:30,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)}}),BI.TextAreaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextAreaEditor.EVENT_BLUR="EVENT_BLUR",BI.TextAreaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.textarea_editor",BI.TextAreaEditor),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.baseCls||"")+" x-icon b-font horizon-center display-block"})},_init:function(){BI.Icon.superclass._init.apply(this,arguments),BI.isIE9Below()&&this.element.addClass("hack")}}),BI.shortcut("bi.icon",BI.Icon),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-iframe",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("<iframe frameborder='0' src='"+a.src+"'>"),BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name},getWidth:function(){return this.options.width},getHeight:function(){return this.options.height}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-img display-block",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("<img src='"+a.src+"'>"),BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.Checkbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Checkbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.Checkbox.superclass._init.apply(this,arguments)},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)}}),BI.Checkbox.EVENT_CHANGE="Checkbox.EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',BI.cjkEncode(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1<b&&b<a.file.fileSize)return void(isFunction(a.onerror)&&a.onerror());for(var e=new XMLHttpRequest,f=e.upload||{addEventListener:function(a,b){this["on"+a]=b}},g=0;g<length;g++)f.addEventListener(split[g].substring(2),function(b){return function(c){isFunction(a[b])&&a[b](c,e)}}(split[g]),!1);if(f.addEventListener("load",function(b){a.onreadystatechange===!1?isFunction(a.onload)&&a.onload(b,e):setTimeout(function(){4===e.readyState?isFunction(a.onload)&&a.onload(b,e):setTimeout(arguments.callee,15)},15)},!1),e.open("post",a.url+"&filename="+window.encodeURIComponent(a.file.fileName),!0),e.upload)e.onreadystatechange=function(){switch(e.readyState){case 4:var b=BI.jsonDecode(e.responseText);a.file.type.indexOf("image")!=-1&&(b.attach_type="image"),b.filename=a.file.fileName,1==a.maxlength?a.attach_array[0]=b:a.attach_array.push(b)}};else{var h={loaded:0,total:a.file.fileSize||a.file.size,simulation:!0};h.interval=setInterval(function(){h.loaded+=256,h.total<=h.loaded&&(h.loaded=h.total),f.onprogress(h)},100),e.onabort=function(){f.onabort({})},e.onerror=function(){f.onerror({})},e.onreadystatechange=function(){switch(e.readyState){case 2:case 3:h.total<=h.loaded&&(h.loaded=h.total),f.onprogress(h);break;case 4:if(clearInterval(h.interval),h.interval=0,h.loaded=h.total,f.onprogress(h),199<e.status&&e.status<400){f.onload({});var b=BI.jsonDecode(e.responseText);b.filename=a.file.fileName,a.file.type.indexOf("image")!=-1&&(b.attach_type="image"),a.attach_array.push(b)}else f.onerror({})}},f.onloadstart(h)}var i="AjaxUploadBoundary"+(new Date).getTime();if(e.setRequestHeader("Content-Type","multipart/form-data; boundary="+i),a.file.getAsBinary)e[e.sendAsBinary?"sendAsBinary":"send"](multipart(i,a.name,a.file));else{e.setRequestHeader("Content-Type","multipart/form-data");var j=new FormData;j.append("FileData",a.file),e.send(j)}return a}:function(handler,maxSize,width,height){var url=handler.url.concat(-1===handler.url.indexOf("?")?"?":"&","AjaxUploadFrame=true"),rpe={loaded:1,total:100,simulation:!0,interval:setInterval(function(){rpe.loaded<rpe.total&&++rpe.loaded,isFunction(handler.onprogress)&&handler.onprogress(rpe,{})},100)},onload=function(){iframe.onreadystatechange=iframe.onload=iframe.onerror=null,form.parentNode.removeChild(form),form=null,clearInterval(rpe.interval);try{var a=(iframe.contentWindow.document||iframe.contentWindow.contentDocument).body.innerHTML,b=BI.jsonDecode(a);handler.file.type.indexOf("image")!=-1&&(b.attach_type="image"),b.filename=BI.cjkDecode(handler.file.fileName),1==handler.maxlength?handler.attach_array[0]=b:handler.attach_array.push(b)}catch(c){isFunction(handler.onerror)&&handler.onerror(rpe,event||window.event)}isFunction(handler.onload)&&handler.onload(rpe,{responseText:a})},target=["AjaxUpload",(new Date).getTime(),String(Math.random()).substring(2)].join("_");try{var form=document.createElement('<form enctype="multipart/form-data"></form>'),iframe=handler.iframe||(handler.iframe=document.createElement('<iframe id="'+target+'" name="'+target+'" src="'+url+'"></iframe>'))}catch(e){var form=document.createElement("form"),iframe=handler.iframe||(handler.iframe=document.createElement("iframe"));form.setAttribute("enctype","multipart/form-data"),iframe.setAttribute("name",iframe.id=target),iframe.setAttribute("src",url)}with(iframe.style.position="absolute",iframe.style.left=iframe.style.top="-10000px",iframe.onload=onload,iframe.onerror=function(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||window.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded<rpe.total&&++rpe.loaded,handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(a,b,c,d){var e=a.files.length,f=a.onload,g=a.onloadstart;for(a.current=0,a.total=0,a.sent=0;a.current<e;)a.total+=a.files[a.current].fileSize||a.files[a.current].size,a.current++;return a.current=0,e&&a.files[0].fileSize!==-1?(a.file=a.files[a.current],sendFile(a,b,c,d).onload=function(h,i){a.onloadstart=null,a.sent+=a.files[a.current].fileSize||a.files[a.current].size,++a.current<e?(a.file=a.files[a.current],sendFile(a,b,c,d).onload=arguments.callee):f&&(a.onloadstart=g,a.onload=f,a.onload(h,i))}):e&&(a.total=100*e,a.file=a.files[a.current],sendFile(a,b,c,d).onload=function(h,i){var j=arguments.callee;a.onloadstart=null,a.sent+=100,++a.current<e?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(a.iframe.parentNode.removeChild(a.iframe),a.iframe=null),setTimeout(function(){a.file=a.files[a.current],sendFile(a,b,c,d).onload=j},15)):f&&setTimeout(function(){a.iframe.parentNode.removeChild(a.iframe),a.iframe=null,a.onloadstart=g,a.onload=f,a.onload(h,i)},15)}),a};BI.File=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-file display-block",element:"<input type='file'>",name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var a=this,b=this.options;BI.File.superclass._init.apply(this,arguments),b.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",b.name||this.getName()),BI.nextTick(function(){var c=a.wrap=a._wrap(a.element[0],b.maxSize);c.onloadstart=function(b,c){a.fireEvent(BI.File.EVENT_UPLOADSTART)},c.onprogress=function(b,c){this.file.fileSize!==-1&&b.simulation,a.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:b.total,loaded:b.loaded,simulation:b.simulation})},c.onerror=function(){a.fireEvent(BI.File.EVENT_ERROR)},c.onload=function(b,c){var d=this;setTimeout(function(){d.clean(),d.hide(),a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url?b.url:BI.servletURL+"?op=fr_attach&cmd=ah_upload",c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0})},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d<e.length;d++){var f=e.item(d),g=f.value||f.name,h=f.fileName||(f.fileName=g.split("\\").pop()),i=-1!==h.indexOf(".")?h.split(".").pop().toLowerCase():"unknown",j=f.fileSize||f.size;a.fileType&&-1===a.fileType.indexOf("*."+i)?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")),b.fireEvent(BI.File.EVENT_ERROR,{errorType:0,file:f})):a.maxSize!==-1&&j&&a.maxSize<j?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")),b.fireEvent(BI.File.EVENT_ERROR,{errorType:1,file:f})):(a.files.unshift(f),b.fireEvent(BI.File.EVENT_CHANGE,{file:f}))}c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){this.dom.disabled||(this.dom.disabled=!0,this.dom.input.setAttribute("disabled","disabled"))}})},select:function(){$(this.wrap.dom.input).click()},upload:function(a){this.wrap.upload(a)},getValue:function(){return this.wrap.attach_array},reset:function(){this.wrap.attach_array=[],this.wrap.attach_names=[],this.wrap.attachNum=0},_setEnable:function(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?this.element.attr("disabled","disabled"):this.element.removeAttr("disabled")}}),BI.File.EVENT_CHANGE="BI.File.EVENT_CHANGE",BI.File.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.File.EVENT_ERROR="EVENT_ERROR",BI.File.EVENT_PROGRESS="EVENT_PROGRESS",BI.File.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.file",BI.File)}(),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-input display-block",element:"<input/>",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var a=this,b=!1,c=!1,d=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),e=BI.debounce(BI.bind(this._click,this),BI.EVENT_RESPONSE_TIME,!0);this._blurDebounce=BI.debounce(BI.bind(this._blur,this),BI.EVENT_RESPONSE_TIME,!0),this.element.keydown(function(d){c=!1,b=d.ctrlKey,a.fireEvent(BI.Input.EVENT_QUICK_DOWN)}).keyup(function(b){c&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,d(b.keyCode))}).on("input propertychange",function(b){c=!0,a._keydown_=!0,d(b.keyCode)}).click(function(a){a.stopPropagation(),e()}).mousedown(function(b){a.element.val(a.element.val())}).focusout(function(b){a._blurDebounce()})},_focus:function(){this.element.addClass("bi-input-focus"),this._checkValidationOnValueChange(),this._isEditing=!0,""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this.fireEvent(BI.Input.EVENT_FOCUS)},_blur:function(){function a(){b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM)),b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this._focus(),this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){this.isValid()&&BI.trim(this._lastValidValue)===BI.trim(this.getValue())||this._checkValidationOnValueChange(),this.isValid()&&""!==BI.trim(this.getValue())&&((BI.trim(this.getValue())===this._lastValue||this._start&&null!=this._lastValue&&""!==this._lastValue)&&(this._pause!==!0||/(\s|\u00A0)$/.test(this.getValue()))||(this._start=!0,this._pause=!1,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STARTEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_START))),b===!0&&86===a?this._valueChange():(a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE)),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_defaultState:function(){""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue(),this._lastSubmitValue=null},_valueChange:function(){this.isValid()&&BI.trim(this.getValue())!==this._lastSubmitValue&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,this.getValue(),this),this.fireEvent(BI.Input.EVENT_CHANGE),this._lastSubmitValue=BI.trim(this.getValue())),""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue()},_checkValidationOnValueChange:function(){var a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastValidValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this._focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(this.element.blur(),this._blurDebounce())},selectAll:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能select");this.element.select(),this._isEditing=!0},setValue:function(a){this.element.val(a),BI.nextTick(BI.bind(function(){this._checkValidationOnValueChange(),this._defaultState(),this.isValid()&&(this._lastSubmitValue=this.getValue())},this))},getValue:function(){return this.element.val()||""},isEditing:function(){return this._isEditing},getLastValidValue:function(){return this._lastValidValue},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this._lastValidValue=this.getValue(),this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastValidValue===this.getValue()&&(this._lastValidValue=null),this.element.addClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_ERROR,BI.trim(this.getValue()),this))},_setEnable:function(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),BI.Input.EVENT_CHANGE="EVENT_CHANGE",BI.Input.EVENT_FOCUS="EVENT_FOCUS",BI.Input.EVENT_CLICK="EVENT_CLICK",BI.Input.EVENT_BLUR="EVENT_BLUR",BI.Input.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Input.EVENT_QUICK_DOWN="EVENT_QUICK_DOWN",BI.Input.EVENT_SPACE="EVENT_SPACE",BI.Input.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Input.EVENT_START="EVENT_START",BI.Input.EVENT_PAUSE="EVENT_PAUSE",BI.Input.EVENT_STOP="EVENT_STOP",BI.Input.EVENT_CONFIRM="EVENT_CONFIRM",BI.Input.EVENT_REMOVE="EVENT_REMOVE",BI.Input.EVENT_EMPTY="EVENT_EMPTY",BI.Input.EVENT_VALID="EVENT_VALID",BI.Input.EVENT_ERROR="EVENT_ERROR",BI.Input.EVENT_ENTER="EVENT_ENTER",BI.Input.EVENT_RESTRICT="EVENT_RESTRICT",BI.shortcut("bi.input",BI.Input),BI.Radio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Radio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-radio radio-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.Radio.superclass._init.apply(this,arguments)},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)}}),BI.Radio.EVENT_CHANGE="Radio.EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio),BI.Label=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Label.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-label",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:"",keyword:""})},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword}},_init:function(){BI.Label.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();if(BI.isNumber(a.width)&&a.width>0){if(BI.isNumber(a.textWidth)&&a.textWidth>0){if(BI.isNumber(a.height)&&a.height>0){var c=(a.width-a.textWidth)/2;return BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:c+a.hgap+a.lgap,right:c+a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})}return b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})}return"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}))}return BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_createNotCenterEl:function(){var a=this.options,b=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?BI.isNumber(a.height)&&a.height>0?(BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})):(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.Label.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.Label.superclass.populate.apply(this,arguments)}}),BI.shortcut("bi.label",BI.Label),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),BI.Bubble=BI.inherit(BI.Tip,{_defaultConfig:function(){return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble",direction:"top",text:"",height:35})},_init:function(){BI.Bubble.superclass._init.apply(this,arguments);var a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text",text:this.options.text,hgap:10,height:30})},_top:function(){return BI.createWidget({type:"bi.vertical",items:[{el:this._createBubbleText(),height:30},{el:{type:"bi.layout"},height:3}]})},_bottom:function(){return BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout"},height:3},{el:this._createBubbleText(),height:30}]})},_left:function(){return BI.createWidget({type:"bi.right",items:[{el:{type:"bi.layout",width:3,height:30}},{el:this._createBubbleText()}]})},_right:function(){return BI.createWidget({type:"bi.left",items:[{el:{type:"bi.layout",width:3,height:30}},{el:this._createBubbleText()}]})},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),BI.Toast=BI.inherit(BI.Tip,{_const:{minWidth:200,hgap:20},_defaultConfig:function(){return BI.extend(BI.Toast.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-toast",text:"",level:"success",height:30})},_init:function(){BI.Toast.superclass._init.apply(this,arguments);var a=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+a.level);var b=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b}),this.text=BI.createWidget({type:"bi.label",element:this,text:a.text,height:30, -hgap:this._const.hgap})},setWidth:function(a){this.element.width(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:10},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:20})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:16}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,textHeight:20,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger cursor-pointer",height:30})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),function(a,b){"function"==typeof define&&define.amd?define("eve",function(){return b()}):"object"==typeof exports?module.exports=b():a.eve=b()}(this,function(){var a,b,c="0.4.2",d="hasOwnProperty",e=/[\.\/]/,f="*",g=function(){},h=function(a,b){return a-b},i={n:{}},j=function(c,d){c=String(c);var e,f=b,g=Array.prototype.slice.call(arguments,2),i=j.listeners(c),k=0,l=[],m={},n=[],o=a;a=c,b=0;for(var p=0,q=i.length;p<q;p++)"zIndex"in i[p]&&(l.push(i[p].zIndex),i[p].zIndex<0&&(m[i[p].zIndex]=i[p]));for(l.sort(h);l[k]<0;)if(e=m[l[k++]],n.push(e.apply(d,g)),b)return b=f,n;for(p=0;p<q;p++)if(e=i[p],"zIndex"in e)if(e.zIndex==l[k]){if(n.push(e.apply(d,g)),b)break;do if(k++,e=m[l[k]],e&&n.push(e.apply(d,g)),b)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),b)break;return b=f,a=o,n.length?n:null};return j._events=i,j.listeners=function(a){var b,c,d,g,h,j,k,l,m=a.split(e),n=i,o=[n],p=[];for(g=0,h=m.length;g<h;g++){for(l=[],j=0,k=o.length;j<k;j++)for(n=o[j].n,c=[n[m[g]],n[f]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},j.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(e),d=i,f=0,h=c.length;f<h;f++)d=d.n,d=d.hasOwnProperty(c[f])&&d[c[f]]||(d[c[f]]={n:{}});for(d.f=d.f||[],f=0,h=d.f.length;f<h;f++)if(d.f[f]==b)return g;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},j.f=function(a){var b=[].slice.call(arguments,1);return function(){j.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},j.stop=function(){b=1},j.nt=function(b){return b?new RegExp("(?:\\.|\\/|^)"+b+"(?:\\.|\\/|$)").test(a):a},j.nts=function(){return a.split(e)},j.off=j.unbind=function(a,b){if(!a)return void(j._events=i={n:{}});var c,g,h,k,l,m,n,o=a.split(e),p=[i];for(k=0,l=o.length;k<l;k++)for(m=0;m<p.length;m+=h.length-2){if(h=[m,1],c=p[m].n,o[k]!=f)c[o[k]]&&h.push(c[o[k]]);else for(g in c)c[d](g)&&h.push(c[g]);p.splice.apply(p,h)}for(k=0,l=p.length;k<l;k++)for(c=p[k];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;m<n;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(g in c.n)if(c.n[d](g)&&c.n[g].f){var q=c.n[g].f;for(m=0,n=q.length;m<n;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[g].f}}else{delete c.f;for(g in c.n)c.n[d](g)&&c.n[g].f&&delete c.n[g].f}c=c.n}},j.once=function(a,b){var c=function(){return j.unbind(a,c),b.apply(this,arguments)};return j.on(a,c)},j.version=c,j.toString=function(){return"You are running Eve "+c},j}),function(a,b){"function"==typeof define&&define.amd?define("raphael.core",["eve"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("eve")):a.Raphael=b(a.eve)}(this,function(a){function b(c){if(b.is(c,"function"))return t?c():a.on("raphael.DOMload",c);if(b.is(c,U))return b._engine.create[C](b,c.splice(0,3+b.is(c[0],S))).add(c);var d=Array.prototype.slice.call(arguments,0);if(b.is(d[d.length-1],"function")){var e=d.pop();return t?e.call(b._engine.create[C](b,d)):a.on("raphael.DOMload",function(){e.call(b._engine.create[C](b,d))})}return b._engine.create[C](b,arguments)}function c(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var d in a)a[y](d)&&(b[d]=c(a[d]));return b}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function e(a,b,c){function e(){var f=Array.prototype.slice.call(arguments,0),g=f.join("␀"),h=e.cache=e.cache||{},i=e.count=e.count||[];return h[y](g)?(d(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[C](b,f),c?c(h[g]):h[g])}return e}function f(){return this.hex}function g(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function h(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function i(a,b,c,d,e,f,g,i,j){null==j&&(j=1),j=j>1?1:j<0?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;p<l;p++){var q=k*m[p]+k,r=h(q,a,c,e,g),s=h(q,b,d,f,i),t=r*r+s*s;o+=n[p]*M.sqrt(t)}return k*o}function j(a,b,c,d,e,f,g,h,j){if(!(j<0||i(a,b,c,d,e,f,g,h)<j)){var k,l=1,m=l/2,n=l-m,o=.01;for(k=i(a,b,c,d,e,f,g,h,n);P(k-j)>o;)m/=2,n+=(k<j?1:-1)*m,k=i(a,b,c,d,e,f,g,h,n);return n}}function k(a,b,c,d,e,f,g,h){if(!(N(a,c)<O(e,g)||O(a,c)>N(e,g)||N(b,d)<O(f,h)||O(b,d)>N(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+O(a,c).toFixed(2)||n>+N(a,c).toFixed(2)||n<+O(e,g).toFixed(2)||n>+N(e,g).toFixed(2)||o<+O(b,d).toFixed(2)||o>+N(b,d).toFixed(2)||o<+O(f,h).toFixed(2)||o>+N(f,h).toFixed(2)))return{x:l,y:m}}}}function l(a,c,d){var e=b.bezierBBox(a),f=b.bezierBBox(c);if(!b.isBBoxIntersect(e,f))return d?0:[];for(var g=i.apply(0,a),h=i.apply(0,c),j=N(~~(g/5),1),l=N(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;q<j+1;q++){var r=b.findDotsAtSegment.apply(b,a.concat(q/j));m.push({x:r.x,y:r.y,t:q/j})}for(q=0;q<l+1;q++)r=b.findDotsAtSegment.apply(b,c.concat(q/l)),n.push({x:r.x,y:r.y,t:q/l});for(q=0;q<j;q++)for(var s=0;s<l;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=P(u.x-t.x)<.001?"y":"x",y=P(w.x-v.x)<.001?"y":"x",z=k(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+P((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+P((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&A<=1.001&&B>=0&&B<=1.001&&(d?p++:p.push({x:z.x,y:z.y,t1:O(A,1),t2:O(B,1)}))}}return p}function m(a,c,d){a=b._path2curve(a),c=b._path2curve(c);for(var e,f,g,h,i,j,k,m,n,o,p=d?0:[],q=0,r=a.length;q<r;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=c.length;t<u;t++){var v=c[t];if("M"==v[0])g=k=v[1],h=m=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,m,k,m],g=k,h=m);var w=l(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;x<y;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function n(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function o(){return this.x+G+this.y+G+this.width+" × "+this.height}function p(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;i<8;i++){if(f=g(e)-a,P(f)<b)return e;if(h=(3*l*e+2*k)*e+j,P(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,e<c)return c;if(e>d)return d;for(;c<d;){if(f=g(e),P(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function q(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[y](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(ka)}this.anim=d,this.top=c[c.length-1],this.percents=c}function r(c,d,e,f,g,h){e=$(e);var i,j,k,l,m,o,q=c.ms,r={},s={},t={};if(f)for(w=0,x=fb.length;w<x;w++){var u=fb[w];if(u.el.id==d.id&&u.anim==c){u.percent!=e?(fb.splice(w,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var w=0,x=c.percents.length;w<x;w++){if(c.percents[w]==e||c.percents[w]>f*c.top){e=c.percents[w],m=c.percents[w-1]||0,q=q/c.top*(e-m),l=c.percents[w+1],i=c.anim[e];break}f&&d.attr(c.anim[c.percents[w]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var z in i)if(i[y](z)&&(ca[y](z)||d.paper.customAttributes[y](z)))switch(r[z]=d.attr(z),null==r[z]&&(r[z]=ba[z]),s[z]=i[z],ca[z]){case S:t[z]=(s[z]-r[z])/q;break;case"colour":r[z]=b.getRGB(r[z]);var A=b.getRGB(s[z]);t[z]={r:(A.r-r[z].r)/q,g:(A.g-r[z].g)/q,b:(A.b-r[z].b)/q};break;case"path":var B=Ia(r[z],s[z]),C=B[1];for(r[z]=B[0],t[z]=[],w=0,x=r[z].length;w<x;w++){t[z][w]=[0];for(var E=1,F=r[z][w].length;E<F;E++)t[z][w][E]=(C[w][E]-r[z][w][E])/q}break;case"transform":var G=d._,J=Na(G[z],s[z]);if(J)for(r[z]=J.from,s[z]=J.to,t[z]=[],t[z].real=!0,w=0,x=r[z].length;w<x;w++)for(t[z][w]=[r[z][w][0]],E=1,F=r[z][w].length;E<F;E++)t[z][w][E]=(s[z][w][E]-r[z][w][E])/q;else{var K=d.matrix||new n,L={_:{transform:G.transform},getBBox:function(){return d.getBBox(1)}};r[z]=[K.a,K.b,K.c,K.d,K.e,K.f],La(L,s[z]),s[z]=L._.transform,t[z]=[(L.matrix.a-K.a)/q,(L.matrix.b-K.b)/q,(L.matrix.c-K.c)/q,(L.matrix.d-K.d)/q,(L.matrix.e-K.e)/q,(L.matrix.f-K.f)/q]}break;case"csv":var M=H(i[z])[I](v),N=H(r[z])[I](v);if("clip-rect"==z)for(r[z]=N,t[z]=[],w=N.length;w--;)t[z][w]=(M[w]-r[z][w])/q;s[z]=M;break;default:for(M=[][D](i[z]),N=[][D](r[z]),t[z]=[],w=d.paper.customAttributes[z].length;w--;)t[z][w]=((M[w]||0)-(N[w]||0))/q}var O=i.easing,P=b.easing_formulas[O];if(!P)if(P=H(O).match(Y),P&&5==P.length){var Q=P;P=function(a){return p(a,+Q[1],+Q[2],+Q[3],+Q[4],q)}}else P=la;if(o=i.start||c.start||+new Date,u={anim:c,percent:e,timestamp:o,start:o+(c.del||0),status:0,initstatus:f||0,stop:!1,ms:q,easing:P,from:r,diff:t,to:s,el:d,callback:i.callback,prev:m,next:l,repeat:h||c.times,origin:d.attr(),totalOrigin:g},fb.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-q*f,1==fb.length))return hb();k&&(u.start=new Date-u.ms*f),1==fb.length&&gb(hb)}a("raphael.anim.start."+d.id,d,c)}}function s(a){for(var b=0;b<fb.length;b++)fb[b].el.paper==a&&fb.splice(b--,1)}b.version="2.1.4",b.eve=a;var t,u,v=/[, ]+/,w={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},x=/\{(\d+)\}/g,y="hasOwnProperty",z={doc:document,win:window},A={was:Object.prototype[y].call(z.win,"Raphael"),is:z.win.Raphael},B=function(){this.ca=this.customAttributes={}},C="apply",D="concat",E="ontouchstart"in z.win||z.win.DocumentTouch&&z.doc instanceof DocumentTouch,F="",G=" ",H=String,I="split",J="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[I](G),K={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},L=H.prototype.toLowerCase,M=Math,N=M.max,O=M.min,P=M.abs,Q=M.pow,R=M.PI,S="number",T="string",U="array",V=Object.prototype.toString,W=(b._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),X={NaN:1,Infinity:1,"-Infinity":1},Y=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Z=M.round,$=parseFloat,_=parseInt,aa=H.prototype.toUpperCase,ba=b._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},ca=b._availableAnimAttrs={blur:S,"clip-rect":"csv",cx:S,cy:S,fill:"colour","fill-opacity":S,"font-size":S,height:S,opacity:S,path:"path",r:S,rx:S,ry:S,stroke:"colour","stroke-opacity":S,"stroke-width":S,transform:"transform",width:S,x:S,y:S},da=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,ea={hs:1,rg:1},fa=/,?([achlmqrstvxz]),?/gi,ga=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ha=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ia=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ja=(b._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ka=function(a,b){return $(a)-$(b)},la=function(a){return a},ma=b._rectPath=function(a,b,c,d,e){return e?[["M",a+e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]]:[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},na=function(a,b,c,d){return null==d&&(d=c),[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},oa=b._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return na(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return na(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return ma(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return ma(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return ma(b.x,b.y,b.width,b.height)},set:function(a){var b=a._getBBox();return ma(b.x,b.y,b.width,b.height)}},pa=b.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=Ia(a),e=0,g=a.length;e<g;e++)for(i=a[e],f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(b._g=z,b.type=z.win.SVGAngle||z.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==b.type){var qa,ra=z.doc.createElement("div");if(ra.innerHTML='<v:shape adj="1"/>',qa=ra.firstChild,qa.style.behavior="url(#default#VML)",!qa||"object"!=typeof qa.adj)return b.type=F;ra=null}b.svg=!(b.vml="VML"==b.type),b._Paper=B,b.fn=u=B.prototype=b.prototype,b._id=0,b._oid=0,b.is=function(a,b){return b=L.call(b),"finite"==b?!X[y](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||V.call(a).slice(8,-1).toLowerCase()==b},b.angle=function(a,c,d,e,f,g){if(null==f){var h=a-d,i=c-e;return h||i?(180+180*M.atan2(-i,-h)/R+360)%360:0}return b.angle(a,c,f,g)-b.angle(d,e,f,g)},b.rad=function(a){return a%360*R/180},b.deg=function(a){return Math.round(180*a/R%360*1e3)/1e3},b.snapTo=function(a,c,d){if(d=b.is(d,"finite")?d:10,b.is(a,U)){for(var e=a.length;e--;)if(P(a[e]-c)<=d)return a[e]}else{a=+a;var f=c%a;if(f<d)return c-f;if(f>a-d)return c-f+a}return c};b.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*M.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});b.setWindow=function(c){a("raphael.setWindow",b,z.win,c),z.win=c,z.doc=z.win.document,b._engine.initWin&&b._engine.initWin(z.win)};var sa=function(a){if(b.vml){var c,d=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write("<body>"),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sa=e(function(a){try{c.style.color=H(a).replace(d,F);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=z.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",z.doc.body.appendChild(i),sa=e(function(a){return i.style.color=a,z.doc.defaultView.getComputedStyle(i,F).getPropertyValue("color")})}return sa(a)},ta=function(){return"hsb("+[this.h,this.s,this.b]+")"},ua=function(){return"hsl("+[this.h,this.s,this.l]+")"},va=function(){return this.hex},wa=function(a,c,d){if(null==c&&b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,c=a.g,a=a.r),null==c&&b.is(a,T)){var e=b.getRGB(a);a=e.r,c=e.g,d=e.b}return(a>1||c>1||d>1)&&(a/=255,c/=255,d/=255),[a,c,d]},xa=function(a,c,d,e){a*=255,c*=255,d*=255;var f={r:a,g:c,b:d,hex:b.rgb(a,c,d),toString:va};return b.is(e,"finite")&&(f.opacity=e),f};b.color=function(a){var c;return b.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(c=b.hsb2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):b.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(c=b.hsl2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):(b.is(a,"string")&&(a=b.getRGB(a)),b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(c=b.rgb2hsl(a),a.h=c.h,a.s=c.s,a.l=c.l,c=b.rgb2hsb(a),a.v=c.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=va,a},b.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-P(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-P(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.rgb2hsb=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=N(a,b,c),g=f-O(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:ta}},b.rgb2hsl=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=N(a,b,c),h=O(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:f<.5?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ua}},b._path2string=function(){return this.join(",").replace(fa,"$1")};b._preload=function(a,b){var c=z.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,z.doc.body.removeChild(this)},c.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(c),c.src=a};b.getRGB=e(function(a){if(!a||(a=H(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:f};!(ea[y](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=sa(a));var c,d,e,g,h,i,j=a.match(W);return j?(j[2]&&(e=_(j[2].substring(5),16),d=_(j[2].substring(3,5),16),c=_(j[2].substring(1,3),16)),j[3]&&(e=_((h=j[3].charAt(3))+h,16),d=_((h=j[3].charAt(2))+h,16),c=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsb2rgb(c,d,e,g)):j[6]?(i=j[6][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsl2rgb(c,d,e,g)):(j={r:c,g:d,b:e,toString:f},j.hex="#"+(16777216|e|d<<8|c<<16).toString(16).slice(1),b.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f}},b),b.hsb=e(function(a,c,d){return b.hsb2rgb(a,c,d).hex}),b.hsl=e(function(a,c,d){return b.hsl2rgb(a,c,d).hex}),b.rgb=e(function(a,b,c){function d(a){return a+.5|0}return"#"+(16777216|d(c)|d(b)<<8|d(a)<<16).toString(16).slice(1)}),b.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},b.getColor.reset=function(){delete this.start},b.parsePathString=function(a){if(!a)return null;var c=ya(a);if(c.arr)return Aa(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return b.is(a,U)&&b.is(a[0],U)&&(e=Aa(a)),e.length||H(a).replace(ga,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ia,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][D](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][D](f));else for(;f.length>=d[g]&&(e.push([b][D](f.splice(0,d[g]))),d[g]););}),e.toString=b._path2string,c.arr=Aa(e),e},b.parseTransformString=e(function(a){if(!a)return null;var c=[];return b.is(a,U)&&b.is(a[0],U)&&(c=Aa(a)),c.length||H(a).replace(ha,function(a,b,d){var e=[];L.call(b);d.replace(ia,function(a,b){b&&e.push(+b)}),c.push([b][D](e))}),c.toString=b._path2string,c});var ya=function(a){var b=ya.ps=ya.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[y](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};b.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=Q(j,3),l=Q(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*M.atan2(q-s,r-t)/R;return(q>s||r<t)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},b.bezierBBox=function(a,c,d,e,f,g,h,i){b.is(a,"array")||(a=[a,c,d,e,f,g,h,i]);var j=Ha.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},b.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},b.isBBoxIntersect=function(a,c){var d=b.isPointInsideBBox;return d(c,a.x,a.y)||d(c,a.x2,a.y)||d(c,a.x,a.y2)||d(c,a.x2,a.y2)||d(a,c.x,c.y)||d(a,c.x2,c.y)||d(a,c.x,c.y2)||d(a,c.x2,c.y2)||(a.x<c.x2&&a.x>c.x||c.x<a.x2&&c.x>a.x)&&(a.y<c.y2&&a.y>c.y||c.y<a.y2&&c.y>a.y)},b.pathIntersection=function(a,b){return m(a,b)},b.pathIntersectionNumber=function(a,b){return m(a,b,1)},b.isPointInsidePath=function(a,c,d){var e=b.pathBBox(a);return b.isPointInsideBBox(e,c,d)&&m(a,[["M",c,d],["H",e.x2+10]],1)%2==1},b._removedFactory=function(b){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var za=b.pathBBox=function(a){var b=ya(a);if(b.bbox)return c(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ia(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;i<j;i++)if(d=a[i],"M"==d[0])e=d[1],f=d[2],g.push(e),h.push(f);else{var k=Ha(e,f,d[1],d[2],d[3],d[4],d[5],d[6]);g=g[D](k.min.x,k.max.x),h=h[D](k.min.y,k.max.y),e=d[5],f=d[6]}var l=O[C](0,g),m=O[C](0,h),n=N[C](0,g),o=N[C](0,h),p=n-l,q=o-m,r={x:l,y:m,x2:n,y2:o,width:p,height:q,cx:l+p/2,cy:m+q/2};return b.bbox=c(r),r},Aa=function(a){var d=c(a);return d.toString=b._path2string,d},Ba=b._pathToRelative=function(a){var c=ya(a);if(c.rel)return Aa(c.rel);b.is(a,U)&&b.is(a&&a[0],U)||(a=b.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;j<k;j++){var l=d[j]=[],m=a[j];if(m[0]!=L.call(m[0]))switch(l[0]=L.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;n<o;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;p<q;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=b._path2string,c.rel=Aa(d),d},Ca=b._pathToAbsolute=function(a){var c=ya(a);if(c.abs)return Aa(c.abs);if(b.is(a,U)&&b.is(a&&a[0],U)||(a=b.parsePathString(a)),!a||!a.length)return[["M",0,0]];var d=[],e=0,f=0,h=0,i=0,j=0;"M"==a[0][0]&&(e=+a[0][1],f=+a[0][2],h=e,i=f,j++,d[0]=["M",e,f]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;n<o;n++){if(d.push(k=[]),l=a[n],l[0]!=aa.call(l[0]))switch(k[0]=aa.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,f][D](l.slice(1)),q=2,r=p.length;q<r;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[D](g(p,m));break;case"M":h=+l[1]+e,i=+l[2]+f;default:for(q=1,r=l.length;q<r;q++)k[q]=+l[q]+(q%2?e:f)}else if("R"==l[0])p=[e,f][D](l.slice(1)),d.pop(),d=d[D](g(p,m)),k=["R"][D](l.slice(-2));else for(var s=0,t=l.length;s<t;s++)k[s]=l[s];switch(k[0]){case"Z":e=h,f=i;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":h=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}return d.toString=b._path2string,c.abs=Aa(d),d},Da=function(a,b,c,d){return[a,b,c,d,c,d]},Ea=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Fa=function(a,b,c,d,f,g,h,i,j,k){var l,m=120*R/180,n=R/180*(+f||0),o=[],p=e(function(a,b,c){var d=a*M.cos(c)-b*M.sin(c),e=a*M.sin(c)+b*M.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(a,b,-n),a=l.x,b=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(M.cos(R/180*f),M.sin(R/180*f),(a-i)/2),r=(b-j)/2,s=q*q/(c*c)+r*r/(d*d);s>1&&(s=M.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*M.sqrt(P((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=M.asin(((b-x)/d).toFixed(9)),z=M.asin(((j-x)/d).toFixed(9));y=a<w?R-y:y,z=i<w?R-z:z,y<0&&(y=2*R+y),z<0&&(z=2*R+z),h&&y>z&&(y-=2*R),!h&&z>y&&(z-=2*R)}var A=z-y;if(P(A)>m){var B=z,C=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*M.cos(z),j=x+d*M.sin(z),o=Fa(i,j,c,d,f,0,h,C,E,[z,B,w,x])}A=z-y;var F=M.cos(y),G=M.sin(y),H=M.cos(z),J=M.sin(z),K=M.tan(A/4),L=4/3*c*K,N=4/3*d*K,O=[a,b],Q=[a+L*G,b-N*F],S=[i+L*J,j-N*H],T=[i,j];if(Q[0]=2*O[0]-Q[0],Q[1]=2*O[1]-Q[1],k)return[Q,S,T][D](o);o=[Q,S,T][D](o).join()[I](",");for(var U=[],V=0,W=o.length;V<W;V++)U[V]=V%2?p(o[V-1],o[V],n).y:p(o[V],o[V+1],n).x;return U},Ga=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:Q(j,3)*a+3*Q(j,2)*i*c+3*j*i*i*e+Q(i,3)*g,y:Q(j,3)*b+3*Q(j,2)*i*d+3*j*i*i*f+Q(i,3)*h}},Ha=e(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:O[C](0,p),y:O[C](0,o)},max:{x:N[C](0,p),y:N[C](0,o)}}}),Ia=b._path2curve=e(function(a,b){var c=!b&&ya(a);if(!b&&c.curve)return Aa(c.curve);for(var d=Ca(a),e=b&&Ca(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][D](Fa[C](0,[b.x,b.y][D](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][D](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][D](Ea(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][D](Ea(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][D](Da(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][D](Da(b.x,b.y,a[1],b.y));break;case"V":a=["C"][D](Da(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][D](Da(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)k[b]="A",e&&(l[b]="A"),a.splice(b++,0,["C"][D](c.splice(0,6)));a.splice(b,1),p=N(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],p=N(d.length,e&&e.length||0))},k=[],l=[],m="",n="",o=0,p=N(d.length,e&&e.length||0);o<p;o++){d[o]&&(m=d[o][0]),"C"!=m&&(k[o]=m,o&&(n=k[o-1])),d[o]=h(d[o],f,n),"A"!=k[o]&&"C"==m&&(k[o]="C"),i(d,o),e&&(e[o]&&(m=e[o][0]),"C"!=m&&(l[o]=m,o&&(n=l[o-1])),e[o]=h(e[o],g,n),"A"!=l[o]&&"C"==m&&(l[o]="C"),i(e,o)),j(d,e,f,g,o),j(e,d,g,f,o);var q=d[o],r=e&&e[o],s=q.length,t=e&&r.length;f.x=q[s-2],f.y=q[s-1],f.bx=$(q[s-4])||f.x,f.by=$(q[s-3])||f.y,g.bx=e&&($(r[t-4])||g.x),g.by=e&&($(r[t-3])||g.y),g.x=e&&r[t-2],g.y=e&&r[t-1]}return e||(c.curve=Aa(d)),e?[d,e]:d},null,Aa),Ja=(b._parseDots=e(function(a){for(var c=[],d=0,e=a.length;d<e;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=b.getRGB(g[1]),f.color.error)return null;f.opacity=f.color.opacity,f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){for(var h=$(c[d-1].offset||0),i=0,j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=$(i);for(var k=(i-h)/(j-d+1);d<j;d++)h+=k,c[d].offset=h+"%"}return c}),b._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Ka=(b._tofront=function(a,b){b.top!==a&&(Ja(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},b._toback=function(a,b){b.bottom!==a&&(Ja(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a); -},b._insertafter=function(a,b,c){Ja(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},b._insertbefore=function(a,b,c){Ja(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},b.toMatrix=function(a,b){var c=za(a),d={_:{transform:F},getBBox:function(){return c}};return La(d,b),d.matrix}),La=(b.transformPath=function(a,b){return pa(a,Ka(a,b))},b._extractTransform=function(a,c){if(null==c)return a._.transform;c=H(c).replace(/\.{3}|\u2026/g,a._.transform||F);var d=b.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=a._,k=new n;if(j.transform=d||[],d)for(var l=0,m=d.length;l<m;l++){var o,p,q,r,s,t=d[l],u=t.length,v=H(t[0]).toLowerCase(),w=t[0]!=v,x=w?k.invert():0;"t"==v&&3==u?w?(o=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),k.translate(q-o,r-p)):k.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),k.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==v&&7==u&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),Ma=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Na=b._equaliseTransform=function(a,c){c=H(c).replace(/\.{3}|\u2026/g,a),a=b.parseTransformString(a)||[],c=b.parseTransformString(c)||[];for(var d,e,f,g,h=N(a.length,c.length),i=[],j=[],k=0;k<h;k++){if(f=a[k]||Ma(c[k]),g=c[k]||Ma(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=N(f.length,g.length);d<e;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};b._getContainer=function(a,c,d,e){var f;if(f=null!=e||b.is(a,"object")?a:z.doc.getElementById(a),null!=f)return f.tagName?null==c?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}:{container:1,x:a,y:c,width:d,height:e}},b.pathToRelative=Ba,b._engine={},b.path2curve=Ia,b.matrix=function(a,b,c,d,e,f){return new n(a,b,c,d,e,f)},function(a){function c(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var b=M.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof n&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;g<3;g++)for(h=0;h<3;h++){for(j=0,i=0;i<3;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new n(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new n(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,c,d){a=b.rad(a),c=c||0,d=d||0;var e=+M.cos(a).toFixed(9),f=+M.sin(a).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[H.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return b.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=M.sqrt(c(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=M.sqrt(c(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return g<0?(a.rotate=b.deg(M.acos(g)),f<0&&(a.rotate=360-a.rotate)):a.rotate=b.deg(M.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[I]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:F)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:F)+(b.rotate?"r"+[b.rotate,0,0]:F)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(n.prototype);for(var Oa=function(){this.returnValue=!1},Pa=function(){return this.originalEvent.preventDefault()},Qa=function(){this.cancelBubble=!0},Ra=function(){return this.originalEvent.stopPropagation()},Sa=function(a){var b=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,c=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;return{x:a.clientX+c,y:a.clientY+b}},Ta=function(){return z.doc.addEventListener?function(a,b,c,d){var e=function(a){var b=Sa(a);return c.call(d,a,b.x,b.y)};if(a.addEventListener(b,e,!1),E&&K[b]){var f=function(b){for(var e=Sa(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;g<h;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=Pa,b.stopPropagation=Ra;break}return c.call(d,b,e.x,e.y)};a.addEventListener(K[b],f,!1)}return function(){return a.removeEventListener(b,e,!1),E&&K[b]&&a.removeEventListener(K[b],f,!1),!0}}:z.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||z.win.event;var b=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,e=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||Oa,a.stopPropagation=a.stopPropagation||Qa,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),Ua=[],Va=function(b){for(var c,d=b.clientX,e=b.clientY,f=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,g=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,h=Ua.length;h--;){if(c=Ua[h],E&&b.touches){for(var i,j=b.touches.length;j--;)if(i=b.touches[j],i.identifier==c.el._drag.id){d=i.clientX,e=i.clientY,(b.originalEvent?b.originalEvent:b).preventDefault();break}}else b.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;z.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(d,e),l.style.display=o,z.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&a("raphael.drag.over."+c.el.id,c.el,k),d+=g,e+=f,a("raphael.drag.move."+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,b)}},Wa=function(c){b.unmousemove(Va).unmouseup(Wa);for(var d,e=Ua.length;e--;)d=Ua[e],d.el._drag={},a("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,c);Ua=[]},Xa=b.el={},Ya=J.length;Ya--;)!function(a){b[a]=Xa[a]=function(c,d){return b.is(c,"function")&&(this.events=this.events||[],this.events.push({name:a,f:c,unbind:Ta(this.shape||this.node||z.doc,a,c,d||this)})),this},b["un"+a]=Xa["un"+a]=function(c){for(var d=this.events||[],e=d.length;e--;)d[e].name!=a||!b.is(c,"undefined")&&d[e].f!=c||(d[e].unbind(),d.splice(e,1),!d.length&&delete this.events);return this}}(J[Ya]);Xa.data=function(c,d){var e=ja[this.id]=ja[this.id]||{};if(0==arguments.length)return e;if(1==arguments.length){if(b.is(c,"object")){for(var f in c)c[y](f)&&this.data(f,c[f]);return this}return a("raphael.data.get."+this.id,this,e[c],c),e[c]}return e[c]=d,a("raphael.data.set."+this.id,this,d,c),this},Xa.datum=function(){return 0==arguments.length?this._bindData:(this._bindData=arguments[0],this)},Xa.removeData=function(a){return null==a?ja[this.id]={}:ja[this.id]&&delete ja[this.id][a],this},Xa.getData=function(){return c(ja[this.id]||{})},Xa.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},Xa.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var Za=[];Xa.drag=function(c,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=i.clientX,k=i.clientY,l=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,m=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;if(this._drag.id=i.identifier,E&&i.touches)for(var n,o=i.touches.length;o--;)if(n=i.touches[o],this._drag.id=n.identifier,n.identifier==this._drag.id){j=n.clientX,k=n.clientY;break}this._drag.x=j+m,this._drag.y=k+l,!Ua.length&&b.mousemove(Va).mouseup(Wa),Ua.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&a.on("raphael.drag.start."+this.id,d),c&&a.on("raphael.drag.move."+this.id,c),e&&a.on("raphael.drag.end."+this.id,e),a("raphael.drag.start."+this.id,g||f||this,i.clientX+m,i.clientY+l,i)}return this._drag={},Za.push({el:this,start:i}),this.mousedown(i),this},Xa.onDragOver=function(b){b?a.on("raphael.drag.over."+this.id,b):a.unbind("raphael.drag.over."+this.id)},Xa.undrag=function(){for(var c=Za.length;c--;)Za[c].el==this&&(this.unmousedown(Za[c].start),Za.splice(c,1),a.unbind("raphael.drag.*."+this.id));!Za.length&&b.unmousemove(Va).unmouseup(Wa),Ua=[]},u.circle=function(a,c,d){var e=b._engine.circle(this,a||0,c||0,d||0);return this.__set__&&this.__set__.push(e),e},u.rect=function(a,c,d,e,f){var g=b._engine.rect(this,a||0,c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},u.ellipse=function(a,c,d,e){var f=b._engine.ellipse(this,a||0,c||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},u.path=function(a){a&&!b.is(a,T)&&!b.is(a[0],U)&&(a+=F);var c=b._engine.path(b.format[C](b,arguments),this);return this.__set__&&this.__set__.push(c),c},u.image=function(a,c,d,e,f){var g=b._engine.image(this,a||"about:blank",c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},u.text=function(a,c,d){var e=b._engine.text(this,a||0,c||0,H(d));return this.__set__&&this.__set__.push(e),e},u.set=function(a){!b.is(a,"array")&&(a=Array.prototype.splice.call(arguments,0,arguments.length));var c=new jb(a);return this.__set__&&this.__set__.push(c),c.paper=this,c.type="set",c},u.setStart=function(a){this.__set__=a||this.set()},u.setFinish=function(a){var b=this.__set__;return delete this.__set__,b},u.getSize=function(){var a=this.canvas.parentNode;return{width:a.offsetWidth,height:a.offsetHeight}},u.setSize=function(a,c){return b._engine.setSize.call(this,a,c)},u.setViewBox=function(a,c,d,e,f){return b._engine.setViewBox.call(this,a,c,d,e,f)},u.top=u.bottom=null,u.raphael=b;var $a=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(z.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(z.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}};u.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=z.doc.elementFromPoint(a,b);if(z.win.opera&&"svg"==e.tagName){var f=$a(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},u.getElementsByBBox=function(a){var c=this.set();return this.forEach(function(d){b.isBBoxIntersect(d.getBBox(),a)&&c.push(d)}),c},u.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},u.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},u.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},Xa.isPointInside=function(a,c){var d=this.realPath=oa[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=b.transformPath(d,this.attr("transform"))),b.isPointInsidePath(d,a,c)},Xa.getBBox=function(a){if(this.removed)return{};var b=this._;return a?(!b.dirty&&b.bboxwt||(this.realPath=oa[this.type](this),b.bboxwt=za(this.realPath),b.bboxwt.toString=o,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&(!b.dirty&&this.realPath||(b.bboxwt=0,this.realPath=oa[this.type](this)),b.bbox=za(pa(this.realPath,this.matrix)),b.bbox.toString=o,b.dirty=b.dirtyT=0),b.bbox)},Xa.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},Xa.glow=function(a){if("text"==this.type)return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:null==a.opacity?.5:a.opacity,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||oa[this.type](this);f=this.matrix?pa(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var _a=function(a,c,d,e,f,g,h,k,l){return null==l?i(a,c,d,e,f,g,h,k):b.findDotsAtSegment(a,c,d,e,f,g,h,k,j(a,c,d,e,f,g,h,k,l))},ab=function(a,c){return function(d,e,f){d=Ia(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;o<p;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(c&&!m.start){if(k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!c)return k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:c?m:b.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},bb=ab(1),cb=ab(),db=ab(0,1);b.getTotalLength=bb,b.getPointAtLength=cb,b.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return db(a,b).end;var d=db(a,c,1);return b?db(d,b).end:d},Xa.getTotalLength=function(){var a=this.getPath();if(a)return this.node.getTotalLength?this.node.getTotalLength():bb(a)},Xa.getPointAtLength=function(a){var b=this.getPath();if(b)return cb(b,a)},Xa.getPath=function(){var a,c=b._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return c&&(a=c(this)),a},Xa.getSubpath=function(a,c){var d=this.getPath();if(d)return b.getSubpath(d,a,c)};var eb=b.easing_formulas={linear:function(a){return a},"<":function(a){return Q(a,1.7)},">":function(a){return Q(a,.48)},"<>":function(a){var b=.48-a/1.04,c=M.sqrt(.1734+b*b),d=c-b,e=Q(P(d),1/3)*(d<0?-1:1),f=-c-b,g=Q(P(f),1/3)*(f<0?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:Q(2,-10*a)*M.sin((a-.075)*(2*R)/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return a<1/d?b=c*a*a:a<2/d?(a-=1.5/d,b=c*a*a+.75):a<2.5/d?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};eb.easeIn=eb["ease-in"]=eb["<"],eb.easeOut=eb["ease-out"]=eb[">"],eb.easeInOut=eb["ease-in-out"]=eb["<>"],eb["back-in"]=eb.backIn,eb["back-out"]=eb.backOut;var fb=[],gb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},hb=function(){for(var c=+new Date,d=0;d<fb.length;d++){var e=fb[d];if(!e.el.removed&&!e.paused){var f,g,h=c-e.start,i=e.ms,j=e.easing,k=e.from,l=e.diff,m=e.to,n=(e.t,e.el),o={},p={};if(e.initstatus?(h=(e.initstatus*e.anim.top-e.prev)/(e.percent-e.prev)*i,e.status=e.initstatus,delete e.initstatus,e.stop&&fb.splice(d--,1)):e.status=(e.prev+(e.percent-e.prev)*(h/i))/e.anim.top,!(h<0))if(h<i){var q=j(h/i);for(var s in k)if(k[y](s)){switch(ca[s]){case S:f=+k[s]+q*i*l[s];break;case"colour":f="rgb("+[ib(Z(k[s].r+q*i*l[s].r)),ib(Z(k[s].g+q*i*l[s].g)),ib(Z(k[s].b+q*i*l[s].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[s].length;t<u;t++){f[t]=[k[s][t][0]];for(var v=1,w=k[s][t].length;v<w;v++)f[t][v]=+k[s][t][v]+q*i*l[s][t][v];f[t]=f[t].join(G)}f=f.join(G);break;case"transform":if(l[s].real)for(f=[],t=0,u=k[s].length;t<u;t++)for(f[t]=[k[s][t][0]],v=1,w=k[s][t].length;v<w;v++)f[t][v]=k[s][t][v]+q*i*l[s][t][v];else{var x=function(a){return+k[s][a]+q*i*l[s][a]};f=[["m",x(0),x(1),x(2),x(3),x(4),x(5)]]}break;case"csv":if("clip-rect"==s)for(f=[],t=4;t--;)f[t]=+k[s][t]+q*i*l[s][t];break;default:var z=[][D](k[s]);for(f=[],t=n.paper.customAttributes[s].length;t--;)f[t]=+z[t]+q*i*l[s][t]}o[s]=f}n.attr(o),function(b,c,d){setTimeout(function(){a("raphael.anim.frame."+b,c,d)})}(n.id,n,e.anim)}else{if(function(c,d,e){setTimeout(function(){a("raphael.anim.frame."+d.id,d,e),a("raphael.anim.finish."+d.id,d,e),b.is(c,"function")&&c.call(d)})}(e.callback,n,e.anim),n.attr(m),fb.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[y](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),r(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&r(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}fb.length&&gb(hb)},ib=function(a){return a>255?255:a<0?0:a};Xa.animateWith=function(a,c,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof q?d:b.animation(d,e,f,g);r(i,h,i.percents[0],null,h.attr());for(var j=0,k=fb.length;j<k;j++)if(fb[j].anim==c&&fb[j].el==a){fb[k-1].start=fb[j].start;break}return h},Xa.onAnimation=function(b){return b?a.on("raphael.anim.frame."+this.id,b):a.unbind("raphael.anim.frame."+this.id),this},q.prototype.delay=function(a){var b=new q(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},q.prototype.repeat=function(a){var b=new q(this.anim,this.ms);return b.del=this.del,b.times=M.floor(N(a,0))||1,b},b.animation=function(a,c,d,e){if(a instanceof q)return a;!b.is(d,"function")&&d||(e=e||d||null,d=null),a=Object(a),c=+c||0;var f,g,h={};for(g in a)a[y](g)&&$(g)!=g&&$(g)+"%"!=g&&(f=!0,h[g]=a[g]);if(f)return d&&(h.easing=d),e&&(h.callback=e),new q({100:h},c);if(e){var i=0;for(var j in a){var k=_(j);a[y](j)&&k>i&&(i=k)}i+="%",!a[i].callback&&(a[i].callback=e)}return new q(a,c)},Xa.animate=function(a,c,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof q?a:b.animation(a,c,d,e);return r(g,f,g.percents[0],null,f.attr()),f},Xa.setTime=function(a,b){return a&&null!=b&&this.status(a,O(b,a.ms)/a.ms),this},Xa.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return r(a,this,-1,O(b,1)),this;for(c=fb.length;f<c;f++)if(d=fb[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},Xa.pause=function(b){for(var c=0;c<fb.length;c++)fb[c].el.id!=this.id||b&&fb[c].anim!=b||a("raphael.anim.pause."+this.id,this,fb[c].anim)!==!1&&(fb[c].paused=!0);return this},Xa.resume=function(b){for(var c=0;c<fb.length;c++)if(fb[c].el.id==this.id&&(!b||fb[c].anim==b)){var d=fb[c];a("raphael.anim.resume."+this.id,this,d.anim)!==!1&&(delete d.paused,this.status(d.anim,d.status))}return this},Xa.stop=function(b){for(var c=0;c<fb.length;c++)fb[c].el.id!=this.id||b&&fb[c].anim!=b||a("raphael.anim.stop."+this.id,this,fb[c].anim)!==!1&&fb.splice(c--,1);return this},a.on("raphael.remove",s),a.on("raphael.clear",s),Xa.toString=function(){return"Raphaël’s object"};var jb=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;b<c;b++)!a[b]||a[b].constructor!=Xa.constructor&&a[b].constructor!=jb||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},kb=jb.prototype;kb.push=function(){for(var a,b,c=0,d=arguments.length;c<d;c++)a=arguments[c],!a||a.constructor!=Xa.constructor&&a.constructor!=jb||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},kb.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},kb.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var lb in Xa)Xa[y](lb)&&(kb[lb]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][C](c,b)})}}(lb));return kb.attr=function(a,c){if(a&&b.is(a,U)&&b.is(a[0],"object"))for(var d=0,e=a.length;d<e;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(a,c);return this},kb.clear=function(){for(;this.length;)this.pop()},kb.splice=function(a,b,c){a=a<0?N(this.length+a,0):a,b=N(0,O(this.length-a,b));var d,e=[],f=[],g=[];for(d=2;d<arguments.length;d++)g.push(arguments[d]);for(d=0;d<b;d++)f.push(this[a+d]);for(;d<this.length-a;d++)e.push(this[a+d]);var h=g.length;for(d=0;d<h+e.length;d++)this.items[a+d]=this[a+d]=d<h?g[d]:e[d-h];for(d=this.items.length=this.length-=b-h;this[d];)delete this[d++];return new jb(f)},kb.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a)return this.splice(b,1),!0},kb.animate=function(a,c,d,e){(b.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=b.is(d,T)?d:g;var k=b.animation(a,c,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k),this.items[i]&&!this.items[i].removed||h--;return this},kb.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},kb.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=O[C](0,a),b=O[C](0,b),c=N[C](0,c),d=N[C](0,d),{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},kb.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},kb.toString=function(){return"Raphaël‘s set"},kb.glow=function(a){var b=this.paper.set();return this.forEach(function(c,d){var e=c.glow(a);null!=e&&e.forEach(function(a,c){b.push(a)})}),b},kb.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){if(d.isPointInside(a,b))return c=!0,!1}),c},b.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[y](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=_(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[y](e)){var f=a.glyphs[e];if(b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[y](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},u.getFont=function(a,c,d,e){if(e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400,b.fonts){var f=b.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,F)+"(\\s|$)","i");for(var h in b.fonts)if(b.fonts[y](h)&&g.test(h)){f=b.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;j<k&&(i=f[j],i.face["font-weight"]!=c||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},u.print=function(a,c,d,e,f,g,h,i){g=g||"middle",h=N(O(h||0,1),-1),i=N(O(i||1,3),1);var j,k=H(d)[I](F),l=0,m=0,n=F;if(b.is(e,"string")&&(e=this.getFont(e)),e){j=(f||16)/e.face["units-per-em"];for(var o=e.face.bbox[I](v),p=+o[0],q=o[3]-o[1],r=0,s=+o[1]+("baseline"==g?q+ +e.face.descent:q/2),t=0,u=k.length;t<u;t++){if("\n"==k[t])l=0,x=0,m=0,r+=q*i;else{var w=m&&e.glyphs[k[t-1]]||{},x=e.glyphs[k[t]];l+=m?(w.w||e.w)+(w.k&&w.k[k[t]]||0)+e.w*h:0,m=1}x&&x.d&&(n+=b.transformPath(x.d,["t",l*j,r*j,"s",j,j,p,s,"t",(a-p)/j,(c-s)/j]))}}return this.path(n).attr({fill:"#000",stroke:"none"})},u.add=function(a){if(b.is(a,"array"))for(var c,d=this.set(),e=0,f=a.length;e<f;e++)c=a[e]||{},w[y](c.type)&&d.push(this[c.type]().attr(c));return d},b.format=function(a,c){var d=b.is(c,U)?[0][D](c):arguments;return a&&b.is(a,T)&&d.length-1&&(a=a.replace(x,function(a,b){return null==d[++b]?F:d[b]})),a||F},b.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),b.ninja=function(){return A.was?z.win.Raphael=A.is:delete Raphael,b},b.st=kb,a.on("raphael.DOMload",function(){t=!0}),function(a,c,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):b.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(c,d=function(){a.removeEventListener(c,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b}),function(a,b){"function"==typeof define&&define.amd?define("raphael.svg",["raphael.core"],function(a){return b(a)}):b("object"==typeof exports?require("raphael.core"):a.Raphael)}(this,function(a){if(!a||a.svg){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){"string"==typeof d&&(d=q(d));for(var f in e)e[b](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){if(e=c(e).replace(a._radial_gradient,function(a,b,c){if(j="radial",b&&c){m=d(b),n=d(c);var e=2*(n>.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,"radial"==j?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff","stop-opacity":isFinite(w[x].opacity)?w[x].opacity:1}))}}return q(o,{fill:"url('"+document.location.origin+document.location.pathname+"#"+k+"')",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1,1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,m=c(e).toLowerCase().split("-"),n=d.paper,r=f?"end":"start",s=d.node,t=d.attrs,u=t["stroke-width"],v=m.length,w="classic",x=3,y=3,z=5;v--;)switch(m[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=m[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={fill:"none",stroke:t.stroke}):(j=i=x/2,k={fill:t.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+r+w+x+y+"-obj"+d.id;a._g.doc.getElementById(A)?p[A]++:(n.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[w],id:A})),p[A]=1);var C,D=a._g.doc.getElementById(B);D?(p[B]++,C=D.getElementsByTagName("use")[0]):(D=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:j,refY:y/2}),C=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),n.defs.appendChild(D),p[B]=1),q(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-E*u):(g=E*u,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+r]="url(#"+B+")",(h||g)&&(k.d=a.getSubpath(t.path,g,h)),q(s,k),d._.arrows[r+"Path"]=A,d._.arrows[r+"Marker"]=B,d._.arrows[r+"dx"]=E,d._.arrows[r+"Type"]=w,d._.arrows[r+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-g):(g=0,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),d._.arrows[r+"Path"]&&q(s,{d:a.getSubpath(t.path,g,h)}),delete d._.arrows[r+"Path"],delete d._.arrows[r+"Marker"],delete d._.arrows[r+"dx"],delete d._.arrows[r+"Type"],delete d._.arrows[r+"String"];for(k in p)if(p[b](k)&&!p[k]){var F=a._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},u={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){if(b=u[c(b).toLowerCase()]){for(var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;h--;)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}else q(a.node,{"stroke-dasharray":"none"})},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];switch(k[o]=p,o){case"blur":d.blur(p);break;case"title":var u=i.getElementsByTagName("title");if(u.length&&(u=u[0]))u.firstChild.nodeValue=p;else{u=q("title");var w=a._g.doc.createTextNode(p);u.appendChild(w),i.appendChild(u)}break;case"href":case"target":var x=i.parentNode;if("a"!=x.tagName.toLowerCase()){var z=q("a");x.insertBefore(z,i),z.appendChild(i),x=z}"target"==o?x.setAttributeNS(n,"show","blank"==p?"new":p):x.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var A=c(p).split(j);if(4==A.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var B=q("clipPath"),C=q("rect");B.id=a.createUUID(),q(C,{x:A[0],y:A[1],width:A[2],height:A[3]}),B.appendChild(C),d.paper.defs.appendChild(B),q(i,{"clip-path":"url(#"+B.id+")"}),d.clip=C}if(!p){var D=i.getAttribute("clip-path");if(D){var E=a._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g,l));E&&E.parentNode.removeChild(E),q(i,{"clip-path":l}),delete d.clip}}break;case"path":"path"==d.type&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(o,p),d._.dirty=1,!k.fx)break;o="x",p=k.x;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if("rx"==o&&"rect"==d.type)break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":if(i.setAttribute(o,p),d._.dirty=1,!k.fy)break;o="y",p=k.y;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if("ry"==o&&"rect"==d.type)break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":"rect"==d.type?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(n,"href",p);break;case"stroke-width": -1==d._.sx&&1==d._.sy||(p/=g(h(d._.sx),h(d._.sy))||1),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var F=c(p).match(a._ISURL);if(F){B=q("pattern");var G=q("image");B.id=a.createUUID(),q(B,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(G,{x:0,y:0,"xlink:href":F[1]}),B.appendChild(G),function(b){a._preload(F[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(G,{width:a,height:c})})}(B),d.paper.defs.appendChild(B),q(i,{fill:"url(#"+B.id+")"}),d.pattern=B,d.pattern&&s(d);break}var H=a.getRGB(p);if(H.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(I){var J=I.getElementsByTagName("stop");q(J[J.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}}else delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});H[b]("opacity")&&q(i,{"fill-opacity":H.opacity>1?H.opacity/100:H.opacity});case"stroke":H=a.getRGB(p),i.setAttribute(o,H.hex),"stroke"==o&&H[b]("opacity")&&q(i,{"stroke-opacity":H.opacity>1?H.opacity/100:H.opacity}),"stroke"==o&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),I&&(J=I.getElementsByTagName("stop"),q(J[J.length-1],{"stop-opacity":p}));break}default:"font-size"==o&&(p=e(p,10)+"px");var K=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[K]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if("text"==d.type&&(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var j,k=c(f.text).split("\n"),m=[],n=0,o=k.length;n<o;n++)j=q("tspan"),n&&q(j,{dy:i*x,x:g.x}),j.appendChild(a._g.doc.createTextNode(k[n])),h.appendChild(j),m[n]=j}else for(m=h.getElementsByTagName("tspan"),n=0,o=m.length;n<o;n++)n?q(m[n],{dy:i*x,x:g.x}):q(m[0],{dy:0});q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(m[0],{dy:r})}},z=function(a){return a.parentNode&&"a"===a.parentNode.tagName.toLowerCase()?a.parentNode:a},A=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},B=a.el;A.prototype=B,B.constructor=A,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new A(c,b);return d.type="path",w(d,{fill:"none",stroke:"#000",path:a}),d},B.rotate=function(a,b,e){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this.transform(this._.transform.concat([["r",a,b,e]])),this},B.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this},B.translate=function(a,b){return this.removed?this:(a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this)},B.transform=function(c){var d=this._;if(null==c)return d.transform;if(a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix}),1!=d.sx||1!=d.sy){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},B.hide=function(){return this.removed||(this.node.style.display="none"),this},B.show=function(){return this.removed||(this.node.style.display=""),this},B.remove=function(){var b=z(this.node);if(!this.removed&&b.parentNode){var c=this.paper;c.__set__&&c.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&c.defs.removeChild(this.gradient),a._tear(this,c),b.parentNode.removeChild(b),this.removeData();for(var d in this)this[d]="function"==typeof this[d]?a._removedFactory(d):null;this.removed=!0}},B._getBBox=function(){if("none"==this.node.style.display){this.show();var a=!0}var b,c=!1;this.paper.canvas.parentElement?b=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(b=this.paper.canvas.parentNode.style),b&&"none"==b.display&&(c=!0,b.display="");var d={};try{d=this.node.getBBox()}catch(e){d={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{d=d||{},c&&(b.display="none")}return a&&this.hide(),d},B.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if("fill"==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==c)return this._.transform;for(var g=c.split(j),h={},i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(null==d&&a.is(c,"array")){for(h={},i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(null!=d){var m={};m[c]=d}else null!=c&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}return w(this,m),this},B.toFront=function(){if(this.removed)return this;var b=z(this.node);b.parentNode.appendChild(b);var c=this.paper;return c.top!=this&&a._tofront(this,c),this},B.toBack=function(){if(this.removed)return this;var b=z(this.node),c=b.parentNode;c.insertBefore(b,c.firstChild),a._toback(this,this.paper);this.paper;return this},B.insertAfter=function(b){if(this.removed||!b)return this;var c=z(this.node),d=z(b.node||b[b.length-1].node);return d.nextSibling?d.parentNode.insertBefore(c,d.nextSibling):d.parentNode.appendChild(c),a._insertafter(this,b,this.paper),this},B.insertBefore=function(b){if(this.removed||!b)return this;var c=z(this.node),d=z(b.node||b[0].node);return d.parentNode.insertBefore(c,d),a._insertbefore(this,b,this.paper),this},B.blur=function(b){var c=this;if(0!==+b){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter");return c},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new A(e,a);return f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs),f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new A(g,a);return h.attrs={x:b,y:c,width:d,height:e,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs),h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new A(f,a);return g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs),g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new A(g,a);return h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image",h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new A(f,b);return g.attrs={x:c,y:d,"text-anchor":"middle",text:e,"font-family":a._availableAttrs["font-family"],"font-size":a._availableAttrs["font-size"],stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs),g},a._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h,i=q("svg"),j="overflow:hidden;";return d=d||0,e=e||0,f=f||512,g=g||342,q(i,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==c?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i)),c=new a._Paper,c.width=f,c.height=g,c.canvas=i,c.clear(),c._left=c._top=0,h&&(c.renderfix=function(){}),c.renderfix(),c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=this.getSize(),j=g(c/i.width,d/i.height),l=this.top,n=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(j=1),delete this._vbSize,f="0 0 "+this.width+m+this.height):(this._vbSize=j,f=a+m+b+m+c+m+d),q(this.canvas,{viewBox:f,preserveAspectRatio:n});j&&l;)h="stroke-width"in l.attrs?l.attrs["stroke-width"]:1,l.attr({"stroke-width":h}),l._.dirty=1,l._.dirtyT=1,l=l.prev;return this._viewBox=[a,b,c,d,!!e],this},a.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},a.prototype.clear=function(){a.eve("raphael.clear",this);for(var b=this.canvas;b.firstChild;)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null};var C=a.st;for(var D in B)B[b](D)&&!C[b](D)&&(C[D]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(D))}}),function(a,b){"function"==typeof define&&define.amd?define("raphael.vml",["raphael.core"],function(a){return b(a)}):b("object"==typeof exports?require("raphael"):a.Raphael)}(this,function(a){if(!a||a.vml){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/gi,e=a._pathToAbsolute;if(c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g,e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=p[b];return c.replace(s,function(a){e&&2==d.length&&(g+=d+p["m"==b?"l":"L"],d=[]),d.push(f(a*u))}),g+d});return g}var h,i,j=e(b);g=[];for(var k=0,l=j.length;k<l;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,r=h.length;m<r;m++)i+=f(h[m]*u)+(m!=r-1?",":o);g.push(i)}return g.join(n)},y=function(b,c,d){var e=a.matrix();return e.rotate(-b,.5,.5),{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q=u/b,r=u/c;if(m.visibility="hidden",b&&c){if(l.coordsize=i(q)+n+i(r),m.rotation=f*(b*c<0?-1:1),f){var s=y(f,d,e);d=s.dx,e=s.dy}if(b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-q+n+e*-r,k||g.fillsize){var t=l.getElementsByTagName(j);t=t&&t[0],l.removeChild(t),k&&(s=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),t.position=s.dx*o+n+s.dy*o),g.fillsize&&(t.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(t)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){for(var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s=e;for(var t in i)i[b](t)&&(m[t]=i[t]);if(q&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e._.dirty=1,"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),r){var y=+m.cx,B=+m.cy,D=+m.rx||+m.r||0,E=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-D)*u),f((B-E)*u),f((y+D)*u),f((B+E)*u),f(y*u)),e._.dirty=1}if("clip-rect"in i){var G=c(i["clip-rect"]).split(k);if(4==G.length){G[2]=+G[2]+ +G[0],G[3]=+G[3]+ +G[1];var H=l.clipRect||a._g.doc.createElement("div"),I=H.style;I.clip=a.format("rect({1}px {2}px {3}px {0}px)",G),l.clipRect||(I.position="absolute",I.top=0,I.left=0,I.width=e.paper.width+"px",I.height=e.paper.height+"px",l.parentNode.insertBefore(H,l),H.appendChild(l),l.clipRect=H)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var J=e.textpath.style;i.font&&(J.font=i.font),i["font-family"]&&(J.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(J.fontSize=i["font-size"]),i["font-weight"]&&(J.fontWeight=i["font-weight"]),i["font-style"]&&(J.fontStyle=i["font-style"])}if("arrow-start"in i&&A(s,i["arrow-start"]),"arrow-end"in i&&A(s,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var K=l.getElementsByTagName(j),L=!1;if(K=K&&K[0],!K&&(L=K=F(j)),"image"==e.type&&i.src&&(K.src=i.src),i.fill&&(K.on=!0),null!=K.on&&"none"!=i.fill&&null!==i.fill||(K.on=!1),K.on&&i.fill){var M=c(i.fill).match(a._ISURL);if(M){K.parentNode==l&&l.removeChild(K),K.rotate=!0,K.src=M[1],K.type="tile";var N=e.getBBox(1);K.position=N.x+n+N.y,e._.fillpos=[N.x,N.y],a._preload(M[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else K.color=a.getRGB(i.fill).hex,K.src=o,K.type="solid",a.getRGB(i.fill).error&&(s.type in{circle:1,ellipse:1}||"r"!=c(i.fill).charAt())&&C(s,i.fill,K)&&(m.fill="none",m.gradient=i.fill,K.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var O=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);O=h(g(O,0),1),K.opacity=O,K.src&&(K.color="none")}l.appendChild(K);var P=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],Q=!1;!P&&(Q=P=F("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(P.on=!0),("none"==i.stroke||null===i.stroke||null==P.on||0==i.stroke||0==i["stroke-width"])&&(P.on=!1);var R=a.getRGB(i.stroke);P.on&&i.stroke&&(P.color=R.hex),O=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+R.o+1||2)-1);var S=.75*(d(i["stroke-width"])||1);if(O=h(g(O,0),1),null==i["stroke-width"]&&(S=m["stroke-width"]),i["stroke-width"]&&(P.weight=S),S&&S<1&&(O*=S)&&(P.weight=1),P.opacity=O,i["stroke-linejoin"]&&(P.joinstyle=i["stroke-linejoin"]||"miter"),P.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(P.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),"stroke-dasharray"in i){var T={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};P.dashstyle=T[b](i["stroke-dasharray"])?T[i["stroke-dasharray"]]:o}Q&&l.appendChild(P)}if("text"==s.type){s.paper.canvas.style.display=o;var U=s.paper.span,V=100,W=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=U.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),W=d(m["font-size"]||W&&W[0])||10,p.fontSize=W*V+"px",s.textpath.string&&(U.innerHTML=c(s.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();s.W=m.w=(X.right-X.left)/V,s.H=m.h=(X.bottom-X.top)/V,s.X=m.x,s.Y=m.y+s.H/2,("x"in i||"y"in i)&&(s.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));for(var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,$=Y.length;Z<$;Z++)if(Y[Z]in i){s._.dirty=1;break}switch(m["text-anchor"]){case"start":s.textpath.style["v-text-align"]="left",s.bbx=s.W/2;break;case"end":s.textpath.style["v-text-align"]="right",s.bbx=-s.W/2;break;default:s.textpath.style["v-text-align"]="center",s.bbx=0}s.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=(b.attrs,Math.pow),i="linear",j=".5 .5";if(b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){return i="radial",b&&c&&(b=d(b),c=d(c),h(b-.5,2)+h(c-.5,2)>.25&&(c=e.sqrt(.25-h(b-.5,2))*(2*(c>.5)-1)+.5),j=b+n+c),o}),f=f.split(/\s*\-\s*/),"linear"==i){var k=f.shift();if(k=-d(k),isNaN(k))return null}var l=a._parseDots(f);if(!l)return null;if(b=b.shape||b.node,l.length){b.removeChild(g),g.on=!0,g.method="none",g.color=l[0].color,g.color2=l[l.length-1].color;for(var m=[],p=0,q=l.length;p<q;p++)l[p].offset&&m.push(l[p].offset+n+l[p].color);g.colors=m.length?m.join():"0% "+g.color,"radial"==i?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=j,g.angle=0):(g.type="gradient",g.angle=(270-k)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(null==b)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:o;e&&(d=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,f+b);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;j.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else j.style.filter=o,z(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=o,i.matrix=c(h),i.offset=h.offset();return null!==d&&(this._.transform=d,a._extractTransform(this,d)),this},E.rotate=function(a,b,e){if(this.removed)return this;if(null!=a){if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]])),this}},E.translate=function(a,b){return this.removed?this:(a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this)},E.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=o),this},E.auxGetBBox=a.el.getBBox,E.getBBox=function(){var a=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var b={},c=1/this.paper._viewBoxShift.scale;return b.x=a.x-this.paper._viewBoxShift.dx,b.x*=c,b.y=a.y-this.paper._viewBoxShift.dy,b.y*=c,b.width=a.width*c,b.height=a.height*c,b.x2=b.x+b.width,b.y2=b.y+b.height,b}return a},E._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if(c==j&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var g=c.split(k),h={},i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&null==d&&a.is(c,"array")){for(h={},i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;null!=d&&(n={},n[c]=d),null==d&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&"text"==this.type&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper)),this)},E.insertAfter=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this)},E.insertBefore=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper),this)},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;return d=d.replace(r,o),0!==+b?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur),this},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");return f.on=!0,c.appendChild(f),d.skew=f,d.transform(o),d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;return i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e}),f},a._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",B(e,{cx:b,cy:c,r:d}),e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];return k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0),i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");return m.on=!0,h.appendChild(m),k.skew=m,k.transform(o),k},a._engine.setSize=function(b,c){var d=this.canvas.style;return this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox),this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var g,h,i=this.getSize(),j=i.width,k=i.height;return f&&(g=k/e,h=j/d,d*g<j&&(b-=(j-d*g)/2/g),e*h<k&&(c-=(k-e*h)/2/h)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:i},this.forEach(function(a){a.transform("...")}),this};var F;a._engine.initWin=function(a){var b=a.document;b.styleSheets.length<31?b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):b.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e=b.width,f=b.x,g=b.y;if(!c)throw new Error("VML container not found.");var h=new a._Paper,i=h.canvas=a._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*u+n+1e3*u,h.coordorigin="0 0",h.span=a._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=a.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);",e,d),1==c?(a._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i),h.renderfix=function(){},h},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}}),function(a,b){if("function"==typeof define&&define.amd)define("raphael",["raphael.core","raphael.svg","raphael.vml"],function(a){return b(a)});else if("object"==typeof exports){var c=require("raphael.core");require("raphael.svg"),require("raphael.vml"),module.exports=b(c)}}(this,function(a){return a.ninja()}),BI.Svg=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Svg.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-svg"})},_init:function(){BI.Svg.superclass._init.apply(this,arguments),this.paper=Raphael(this.element[0]),this.element.css("overflow","hidden"),$(this.paper.canvas).width("100%").height("100%").css({left:"0",top:"0"}).appendTo(this.element),this.top=this.paper.top,this.bottom=this.paper.bottom,this.customAttributes=this.paper.customAttributes,this.ca=this.paper.ca,this.raphael=this.paper.raphael},add:function(){return this.paper.add.apply(this.paper,arguments)},path:function(){return this.paper.path.apply(this.paper,arguments)},image:function(){return this.paper.image.apply(this.paper,arguments)},rect:function(){return this.paper.rect.apply(this.paper,arguments)},circle:function(){return this.paper.circle.apply(this.paper,arguments)},ellipse:function(){return this.paper.ellipse.apply(this.paper,arguments)},text:function(){return this.paper.text.apply(this.paper,arguments)},print:function(){return this.paper.print.apply(this.paper,arguments)},setStart:function(){return this.paper.setStart.apply(this.paper,arguments)},setFinish:function(){return this.paper.setFinish.apply(this.paper,arguments)},setSize:function(){return this.paper.setSize.apply(this.paper,arguments)},setViewBox:function(){return this.paper.setViewBox.apply(this.paper,arguments)},getById:function(){return this.paper.getById.apply(this.paper,arguments)},getElementByPoint:function(){return this.paper.getElementByPoint.apply(this.paper,arguments)},getElementsByPoint:function(){return this.paper.getElementsByPoint.apply(this.paper,arguments)},getFont:function(){return this.paper.getFont.apply(this.paper,arguments)},set:function(){return this.paper.set.apply(this.paper,arguments)},remove:function(){return this.paper.remove.apply(this.paper,arguments)},clear:function(){return this.paper.clear.apply(this.paper,arguments)}}),BI.shortcut("bi.svg",BI.Svg),BI.NativeTableScrollbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,defaultPosition:0,position:0,size:0})},render:function(){var a=this;this.options;this.element.width(36);var b=BI.throttle(function(){a.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL,a.element.scrollTop())},150,{leading:!1});return this.element.scroll(function(){b(); -}),{type:"bi.default",scrolly:!0,items:[{type:"bi.layout",width:1,ref:function(b){a.inner=b}}]}},mounted:function(){this._populate()},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);try{this.element.scrollTop(a.position)}catch(b){}this.inner.element.height(a.contentSize)},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.setHeight(a),this.options.size=a},populate:function(){this._populate()}}),BI.NativeTableScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.native_table_scrollbar",BI.NativeTableScrollbar),BI.NativeTableHorizontalScrollbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,position:0,size:0})},render:function(){var a=this;this.options;this.element.height(36);var b=BI.throttle(function(){a.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL,a.element.scrollLeft())},150,{leading:!1});return this.element.scroll(function(){b()}),{type:"bi.default",scrollx:!0,items:[{type:"bi.layout",height:1,ref:function(b){a.inner=b}}]}},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.setWidth(a),this.options.size=a},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);try{this.element.scrollLeft(a.position)}catch(b){}this.inner.element.width(a.contentSize)},populate:function(){this._populate()}}),BI.NativeTableHorizontalScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.native_table_horizontal_scrollbar",BI.NativeTableHorizontalScrollbar),BI.TableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-cell",textAlign:"left",text:""})},_init:function(){BI.TableCell.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.label",element:this,whiteSpace:"nowrap",textAlign:this.options.textAlign,height:this.options.height,text:this.options.text,value:this.options.value,lgap:5})}}),BI.shortcut("bi.table_cell",BI.TableCell),BI.CollectionTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection-table-cell bi-border-right bi-border-bottom",width:0,height:0,_left:0,_top:0,cell:{}})},_init:function(){BI.CollectionTableCell.superclass._init.apply(this,arguments);var a=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},a.cell,{cls:(a.cell.cls||"")+" collection-table-cell-wrapper",width:a.width-(0===a._left?1:0)-1,height:a.height-(0===a._top?1:0)-1})),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.CollectionTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width-(0===b._left?1:0)-1)},setHeight:function(a){BI.CollectionTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height-(0===b._top?1:0)-1)}}),BI.shortcut("bi.collection_table_cell",BI.CollectionTableCell),BI.CollectionTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection-table",headerRowSize:25,rowSize:25,columnSize:[],isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,header:[],items:[],regionColumnSize:[]})},render:function(){var a=this,b=this.options;this._width=0,this._height=0,this._scrollBarSize=BI.DOM.getScrollWidth(),this.topLeftCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.topLeftItems[b]}}),this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topRightCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.topRightItems[b]}}),this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomRightCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomLeftCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.bottomLeftItems[b]}}),this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomRightCollection.setScrollTop(b.scrollTop),a.topLeftCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomRightCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.bottomRightItems[b]}}),this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollTop(b.scrollTop),a.topRightCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topLeftCollection]}),this.topRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topRightCollection]}),this.bottomLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomLeftCollection]}),this.bottomRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomRightCollection]}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topLeft,top:0,left:0},{el:this.topRight,top:0},{el:this.bottomLeft,left:0},{el:this.bottomRight}]}),this.topScrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",width:BI.GridTableScrollbar.SIZE}),this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollTop(b),a.bottomRightCollection.setScrollTop(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.leftScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.topLeftCollection.setScrollLeft(b),a.bottomLeftCollection.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.rightScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.topRightCollection.setScrollLeft(b),a.bottomRightCollection.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.scrollBarLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topScrollbar,right:0,top:0},{el:this.leftScrollbar,left:0},{el:this.rightScrollbar}]}),this._width=b.width-BI.GridTableScrollbar.SIZE,this._height=b.height-BI.GridTableScrollbar.SIZE},mounted:function(){var a=this.options;(a.items.length>0||a.header.length>0)&&(this._digest(),this._populate())},_getFreezeColLength:function(){return this.options.isNeedFreeze?this.options.freezeCols.length:0},_getFreezeHeaderHeight:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?0:a.header.length*a.headerRowSize},_getActualItems:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?a.header.concat(a.items):a.items},_populateScrollbar:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g}),this.topScrollbar.setContentSize(this._getActualItems().length*a.rowSize),this.topScrollbar.setSize(this._height-this._getFreezeHeaderHeight()),this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()),this.topScrollbar.populate(),this.leftScrollbar.setContentSize(c),this.leftScrollbar.setSize(b),this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()),this.leftScrollbar.populate(),this.rightScrollbar.setContentSize(d),this.rightScrollbar.setSize(this._width-b),this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()),this.rightScrollbar.populate();var g=this.scrollBarLayout.attr("items");g[0].top=this._getFreezeHeaderHeight(),g[1].top=this._height,g[2].top=this._height,g[2].left=b,this.scrollBarLayout.attr("items",g),this.scrollBarLayout.resize()},_populateTable:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g});var g=b,h=this._getFreezeHeaderHeight(),i=this._width-b,j=this._getFreezeHeaderHeight(),k=b,l=this._height-h,m=this._width-b,n=this._height-j,o=g+this._scrollBarSize,p=h+this._scrollBarSize,q=i+this._scrollBarSize,r=j+this._scrollBarSize,s=k+this._scrollBarSize,t=l+this._scrollBarSize,u=m+this._scrollBarSize,v=n+this._scrollBarSize,w=function(a){a.element.css({overflow:"scroll",overflowX:"scroll",overflowY:"scroll"})};this.topLeft.setWidth(g),this.topLeft.setHeight(h),this.topRight.setWidth(i),this.topRight.setHeight(j),this.bottomLeft.setWidth(k),this.bottomLeft.setHeight(l),this.bottomRight.setWidth(m),this.bottomRight.setHeight(n),this.topLeftCollection.setWidth(o),this.topLeftCollection.setHeight(p),this.topRightCollection.setWidth(q),this.topRightCollection.setHeight(r),this.bottomLeftCollection.setWidth(s),this.bottomLeftCollection.setHeight(t),this.bottomRightCollection.setWidth(u),this.bottomRightCollection.setHeight(v),w(this.topLeftCollection),w(this.topRightCollection),w(this.bottomLeftCollection),w(this.bottomRightCollection);var x=this.contextLayout.attr("items");x[1].left=b,x[2].top=this._getFreezeHeaderHeight(),x[3].left=b,x[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",x),this.contextLayout.resize();var y=[],z=[],A=[],B=[],C=function(a,b,c){BI.each(a,function(a,d){var e={type:"bi.collection_table_cell",cell:b[d.row][d.col]};c.push(e)})};C(this.topLeftItems,a.header,y),C(this.topRightItems,a.header,z),C(this.bottomLeftItems,this._getActualItems(),A),C(this.bottomRightItems,this._getActualItems(),B),this.topLeftCollection._populate(y),this.topRightCollection._populate(z),this.bottomLeftCollection._populate(A),this.bottomRightCollection._populate(B)},_digest:function(){var a=this.options,b=this._getFreezeColLength();this._getFreezeHeaderHeight()<=0?(this.topLeftItems=[],this.topRightItems=[],this.bottomLeftItems=this._serialize(this._getActualItems(),0,b,a.rowSize,a.columnSize,a.mergeCols,BI.range(a.header.length)),this.bottomRightItems=this._serialize(this._getActualItems(),b,a.columnSize.length,a.rowSize,a.columnSize,a.mergeCols,BI.range(a.header.length))):(this.topLeftItems=this._serialize(a.header,0,b,a.headerRowSize,a.columnSize,a.mergeCols),this.topRightItems=this._serialize(a.header,b,a.columnSize.length,a.headerRowSize,a.columnSize,!0),this.bottomLeftItems=this._serialize(a.items,0,b,a.rowSize,a.columnSize,a.mergeCols),this.bottomRightItems=this._serialize(a.items,b,a.columnSize.length,a.rowSize,a.columnSize,a.mergeCols))},_serialize:function(a,b,c,d,e,f,g){f=f||[],g=g||[];for(var h=this.options,i=[],j={},k={},l={},m={},n=[],o=b;o<c;o++)o===b?n[o]=e[o]:n[o]=n[o-1]+e[o];var p=function(a,b){k[b]._height+=d,k[b].__mergeRows.push(a)},q=function(a,b){l[a]._width+=e[b],l[a].__mergeCols.push(b)},r=function(a,b){var c=e[b],f=d;m[a][b]._row=a,m[a][b]._col=b,m[a][b]._width=c,m[a][b]._height=f,k[b]=m[a][b],k[b].__mergeRows=[a],l[a]=m[a][b],l[a].__mergeCols=[b],i.push({x:n[b]-e[b],y:+a*d,item:m[a][b]})};return BI.each(a,function(a,d){for(var e=b;e<c;e++)if(j[a]||(j[a]={}),m[a]||(m[a]={}),j[a][e]=d[e],m[a][e]={},f===!0||f.indexOf(e)>-1||g===!0||g.indexOf(a)>-1)if(0===a&&e===b)r(0,b);else if(e===b&&a>0){var i=h.mergeRule(j[a][e],j[a-1][e]);i===!0?(p(a,e),l[a]=k[e]):r(a,e)}else if(0===a&&e>b){var n=h.mergeRule(j[a][e],j[a][e-1]);n===!0?(q(a,e),k[e]=l[a]):r(a,e)}else{var i=h.mergeRule(j[a][e],j[a-1][e]),n=h.mergeRule(j[a][e],j[a][e-1]);if(n&&i)continue;n&&q(a,e),i&&p(a,e),n||i||r(a,e)}else r(a,e)}),BI.map(i,function(a,b){return{x:b.x,y:b.y,row:b.item._row,col:b.item._col,width:b.item._width,height:b.item._height}})},_populate:function(){this._width<=0||this._height<=0||(this._isNeedDigest===!0&&this._digest(),this._isNeedDigest=!1,this._populateTable(),this._populateScrollbar())},getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},setVerticalScroll:function(a){this.bottomLeftCollection.setScrollTop(a),this.bottomRightCollection.setScrollTop(a)},setLeftHorizontalScroll:function(a){this.topLeftCollection.setScrollLeft(a),this.bottomLeftCollection.setScrollLeft(a)},setRightHorizontalScroll:function(a){this.topRightCollection.setScrollLeft(a),this.bottomRightCollection.setScrollLeft(a)},getVerticalScroll:function(){return this.bottomRightCollection.getScrollTop()},getLeftHorizontalScroll:function(){return this.bottomLeftCollection.getScrollLeft()},getRightHorizontalScroll:function(){return this.bottomRightCollection.getScrollLeft()},setWidth:function(a){BI.CollectionTable.superclass.setWidth.apply(this,arguments),this._width=this.options.width-BI.GridTableScrollbar.SIZE},setHeight:function(a){BI.CollectionTable.superclass.setHeight.apply(this,arguments),this._height=this.options.height-BI.GridTableScrollbar.SIZE},setColumnSize:function(a){this._isNeedDigest=!0,this.options.columnSize=a},setRegionColumnSize:function(a){this._isNeedDigest=!0,this.options.regionColumnSize=a},getColumnSize:function(){return this.options.columnSize},getRegionColumnSize:function(){return this.options.regionColumnSize},populate:function(a,b){a&&a!==this.options.items&&(this._isNeedDigest=!0,this.options.items=a,this._restore()),b&&b!==this.options.header&&(this._isNeedDigest=!0,this.options.header=b,this._restore()),this._populate()},_restore:function(){this.topLeftCollection.restore(),this.topRightCollection.restore(),this.bottomLeftCollection.restore(),this.bottomRightCollection.restore()},restore:function(){this._restore()}}),BI.shortcut("bi.collection_table",BI.CollectionTable),BI.QuickCollectionTable=BI.inherit(BI.CollectionTable,{_defaultConfig:function(){return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quick-collection-table"})},render:function(){BI.QuickCollectionTable.superclass.render.apply(this,arguments);this.options;this.topLeftCollection.setOverflowX(!1),this.topLeftCollection.setOverflowY(!1),this.topRightCollection.setOverflowX(!1),this.topRightCollection.setOverflowY(!1),this.bottomLeftCollection.setOverflowX(!1),this.bottomLeftCollection.setOverflowY(!1),this.bottomRightCollection.setOverflowX(!1),this.bottomRightCollection.setOverflowY(!1)},mounted:function(){BI.QuickCollectionTable.superclass.mounted.apply(this,arguments);var a=this;this._topLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._topRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this._bottomLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._bottomRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this.topLeftCollection.element.mousewheel(function(b){a._topLeftWheelHandler.onWheel(b.originalEvent)}),this.topRightCollection.element.mousewheel(function(b){a._topRightWheelHandler.onWheel(b.originalEvent)}),this.bottomLeftCollection.element.mousewheel(function(b){a._bottomLeftWheelHandler.onWheel(b.originalEvent)}),this.bottomRightCollection.element.mousewheel(function(b){a._bottomRightWheelHandler.onWheel(b.originalEvent)})},_shouldHandleLeftX:function(a){return a>0?this.bottomLeftCollection.getScrollLeft()<this.bottomLeftCollection.getMaxScrollLeft():this.bottomLeftCollection.getScrollLeft()>0},_shouldHandleRightX:function(a){return a>0?this.bottomRightCollection.getScrollLeft()<this.bottomRightCollection.getMaxScrollLeft():this.bottomRightCollection.getScrollLeft()>0},_shouldHandleY:function(a){return a>0?this.bottomRightCollection.getScrollTop()<this.bottomRightCollection.getMaxScrollTop():this.bottomRightCollection.getScrollTop()>0},_onWheelLeft:function(a,b){var c=this,d=this.bottomLeftCollection.getScrollTop(),e=this.bottomLeftCollection.getScrollLeft();d+=b,e+=a,this.bottomLeftCollection.setScrollTop(d),this.bottomRightCollection.setScrollTop(d),this.topLeftCollection.setScrollLeft(e),this.bottomLeftCollection.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_onWheelRight:function(a,b){var c=this,d=this.bottomRightCollection.getScrollTop(),e=this.bottomRightCollection.getScrollLeft();d+=b,e+=a,this.bottomLeftCollection.setScrollTop(d),this.bottomRightCollection.setScrollTop(d),this.topRightCollection.setScrollLeft(e),this.bottomRightCollection.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_populateTable:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g});var g=b,h=this._getFreezeHeaderHeight(),i=this._width-b,j=this._getFreezeHeaderHeight(),k=b,l=this._height-h,m=this._width-b,n=this._height-j;this.topLeft.setWidth(g),this.topLeft.setHeight(h),this.topRight.setWidth(i),this.topRight.setHeight(j),this.bottomLeft.setWidth(k),this.bottomLeft.setHeight(l),this.bottomRight.setWidth(m),this.bottomRight.setHeight(n),this.topLeftCollection.setWidth(g),this.topLeftCollection.setHeight(h),this.topRightCollection.setWidth(i),this.topRightCollection.setHeight(j),this.bottomLeftCollection.setWidth(k),this.bottomLeftCollection.setHeight(l),this.bottomRightCollection.setWidth(m),this.bottomRightCollection.setHeight(n);var o=this.contextLayout.attr("items");o[1].left=b,o[2].top=this._getFreezeHeaderHeight(),o[3].left=b,o[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",o),this.contextLayout.resize();var p=[],q=[],r=[],s=[],t=function(a,b,c){BI.each(a,function(a,d){var e={type:"bi.collection_table_cell",cell:b[d.row][d.col]};c.push(e)})};t(this.topLeftItems,a.header,p),t(this.topRightItems,a.header,q),t(this.bottomLeftItems,this._getActualItems(),r),t(this.bottomRightItems,this._getActualItems(),s),this.topLeftCollection.populate(p),this.topRightCollection.populate(q),this.bottomLeftCollection.populate(r),this.bottomRightCollection.populate(s)}}),BI.shortcut("bi.quick_collection_table",BI.QuickCollectionTable),BI.GridTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-table-cell bi-border-right bi-border-bottom",width:0,height:0,_rowIndex:0,_columnIndex:0,_left:0,_top:0,cell:{}})},_init:function(){BI.GridTableCell.superclass._init.apply(this,arguments);var a=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},a.cell,{cls:(a.cell.cls||"")+"grid-table-cell-wrapper",width:a.width-(0===a._columnIndex?1:0)-1,height:a.height-(0===a._rowIndex?1:0)-1})),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.GridTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width-(0===b._columnIndex?1:0)-1)},setHeight:function(a){BI.GridTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height-(0===b._rowIndex?1:0)-1)}}),BI.shortcut("bi.grid_table_cell",BI.GridTableCell),BI.GridTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-table",headerRowSize:25,rowSize:25,columnSize:[],isNeedFreeze:!1,freezeCols:[],header:[],items:[],regionColumnSize:[]})},render:function(){var a=this,b=this.options;this._width=0,this._height=0,this._scrollBarSize=BI.DOM.getScrollWidth();var c=function(){return b.rowSize},d=function(a){return b.columnSize[a]},e=function(c){return b.columnSize[c+a._getFreezeColLength()]};this.topLeftGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:d}),this.topLeftGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topRightGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:e}),this.topRightGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomRightGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomLeftGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:d}),this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomRightGrid.setScrollTop(b.scrollTop),a.topLeftGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomRightGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:e}),this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollTop(b.scrollTop),a.topRightGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topLeftGrid]}),this.topRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topRightGrid]}),this.bottomLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomLeftGrid]}),this.bottomRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomRightGrid]}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topLeft,top:0,left:0},{el:this.topRight,top:0},{el:this.bottomLeft,left:0},{el:this.bottomRight}]}),this.topScrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",width:BI.GridTableScrollbar.SIZE}),this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollTop(b),a.bottomRightGrid.setScrollTop(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.leftScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,function(b){a.topLeftGrid.setScrollLeft(b),a.bottomLeftGrid.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.rightScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,function(b){a.topRightGrid.setScrollLeft(b),a.bottomRightGrid.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.scrollBarLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topScrollbar,right:0,top:0},{el:this.leftScrollbar,left:0},{el:this.rightScrollbar}]}),this._width=b.width-BI.GridTableScrollbar.SIZE,this._height=b.height-BI.GridTableScrollbar.SIZE,this.header=this._getHeader(),this.items=this._getItems()},mounted:function(){var a=this.options;(a.items.length>0||a.header.length>0)&&this._populate()},_getFreezeColLength:function(){return this.options.isNeedFreeze?this.options.freezeCols.length:0},_getFreezeHeaderHeight:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?0:a.header.length*a.headerRowSize},_getActualItems:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?a.header.concat(a.items):a.items},_populateScrollbar:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g}),this.topScrollbar.setContentSize(this._getActualItems().length*a.rowSize),this.topScrollbar.setSize(this._height-this._getFreezeHeaderHeight()),this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(),this.bottomRightGrid.getScrollTop())),this.topScrollbar.populate(),this.leftScrollbar.setContentSize(c),this.leftScrollbar.setSize(b),this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()),this.leftScrollbar.populate(),this.rightScrollbar.setContentSize(d),this.rightScrollbar.setSize(this._width-b),this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()),this.rightScrollbar.populate();var g=this.scrollBarLayout.attr("items");g[0].top=this._getFreezeHeaderHeight(),g[1].top=this._height,g[2].top=this._height,g[2].left=b,this.scrollBarLayout.attr("items",g),this.scrollBarLayout.resize()},_getHeader:function(){var a=this.options,b=this._getFreezeColLength(),c=[],d=[];return BI.each(a.header,function(a,e){c[a]=[],d[a]=[],BI.each(e,function(e,f){var g={type:"bi.grid_table_cell",cell:f};e<b?c[a].push(g):d[a].push(g)})}),[c,d]},_getItems:function(){var a=(this.options,this._getFreezeColLength()),b=[],c=[];return BI.each(this._getActualItems(),function(d,e){b[d]=[],c[d]=[],BI.each(e,function(e,f){var g={type:"bi.grid_table_cell",cell:f};e<a?b[d].push(g):c[d].push(g)})}),[b,c]},_populateTable:function(){function a(a,b,c,d,e){var f=c/d,g=b/e;(g*(120/d)>=60||f*(120/e)>=60)&&(a.attr("overscanRowCount",100),a.attr("overscanColumnCount",100))}var b=this.options,c=this.getRegionSize(),d=0,e=0,f=0,g=[],h=this._getFreezeColLength();BI.each(b.columnSize,function(a,c){b.isNeedFreeze===!0&&b.freezeCols.contains(a)?d+=c:e+=c,f+=c,0===a?g[a]=c:g[a]=g[a-1]+c});var i=c,j=this._getFreezeHeaderHeight(),k=this._width-c,l=this._getFreezeHeaderHeight(),m=c,n=this._height-j,o=this._width-c,p=this._height-l,q=i+this._scrollBarSize,r=j+this._scrollBarSize,s=k+this._scrollBarSize,t=l+this._scrollBarSize,u=m+this._scrollBarSize,v=n+this._scrollBarSize,w=o+this._scrollBarSize,x=p+this._scrollBarSize,y=function(a){a.element.css({overflow:"scroll",overflowX:"scroll",overflowY:"scroll"})};this.topLeft.setWidth(i),this.topLeft.setHeight(j),this.topRight.setWidth(k),this.topRight.setHeight(l),this.bottomLeft.setWidth(m),this.bottomLeft.setHeight(n),this.bottomRight.setWidth(o),this.bottomRight.setHeight(p),this.topLeftGrid.setWidth(q),this.topLeftGrid.setHeight(r),this.topRightGrid.setWidth(s),this.topRightGrid.setHeight(t),this.bottomLeftGrid.setWidth(u),this.bottomLeftGrid.setHeight(v),this.bottomRightGrid.setWidth(w),this.bottomRightGrid.setHeight(x),y(this.topLeftGrid),y(this.topRightGrid),y(this.bottomLeftGrid),y(this.bottomRightGrid),this.topLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.topLeftGrid.setEstimatedRowSize(b.headerRowSize),this.topRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.topRightGrid.setEstimatedRowSize(b.headerRowSize),this.bottomLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.bottomLeftGrid.setEstimatedRowSize(b.rowSize),this.bottomRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.bottomRightGrid.setEstimatedRowSize(b.rowSize);var z=this.contextLayout.attr("items");z[1].left=c,z[2].top=this._getFreezeHeaderHeight(),z[3].left=c,z[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",z),this.contextLayout.resize(),this.topLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.topRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),h>0&&(a(this.topLeftGrid,q,r,b.headerRowSize,d/h),a(this.bottomLeftGrid,u,v,b.rowSize,d/h)),b.columnSize.length-h>0&&(a(this.topRight,s,t,b.headerRowSize,e/(b.columnSize.length-h)),a(this.bottomRightGrid,w,x,b.rowSize,e/(b.columnSize.length-h))),this.topLeftGrid._populate(this.header[0]),this.topRightGrid._populate(this.header[1]),this.bottomLeftGrid._populate(this.items[0]),this.bottomRightGrid._populate(this.items[1])},_populate:function(){this._width<=0||this._height<=0||(this._populateTable(),this._populateScrollbar())},getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},setVerticalScroll:function(a){this.bottomLeftGrid.setScrollTop(a),this.bottomRightGrid.setScrollTop(a)},setLeftHorizontalScroll:function(a){this.topLeftGrid.setScrollLeft(a),this.bottomLeftGrid.setScrollLeft(a)},setRightHorizontalScroll:function(a){this.topRightGrid.setScrollLeft(a),this.bottomRightGrid.setScrollLeft(a)},getVerticalScroll:function(){return this.bottomRightGrid.getScrollTop()},getLeftHorizontalScroll:function(){return this.bottomLeftGrid.getScrollLeft()},getRightHorizontalScroll:function(){return this.bottomRightGrid.getScrollLeft()},setWidth:function(a){BI.GridTable.superclass.setWidth.apply(this,arguments),this._width=this.options.width-BI.GridTableScrollbar.SIZE},setHeight:function(a){BI.GridTable.superclass.setHeight.apply(this,arguments),this._height=this.options.height-BI.GridTableScrollbar.SIZE},setColumnSize:function(a){this.options.columnSize=a,this._isNeedDigest=!0},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this._isNeedDigest=!0},getColumnSize:function(){return this.options.columnSize},getRegionColumnSize:function(){return this.options.regionColumnSize},populate:function(a,b){a&&this.options.items!==a&&(this.options.items=a,this.items=this._getItems(),this._restore()),b&&this.options.header!==b&&(this.options.header=b,this.header=this._getHeader(),this._restore()),this._populate()},_restore:function(){this.topLeftGrid.restore(),this.topRightGrid.restore(),this.bottomLeftGrid.restore(),this.bottomRightGrid.restore()},restore:function(){this._restore()}}),BI.shortcut("bi.grid_table",BI.GridTable),BI.QuickGridTable=BI.inherit(BI.GridTable,{_defaultConfig:function(){return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quick-grid-table"})},render:function(){BI.QuickGridTable.superclass.render.apply(this,arguments);this.options;this.topLeftGrid.setOverflowX(!1),this.topLeftGrid.setOverflowY(!1),this.topRightGrid.setOverflowX(!1),this.topRightGrid.setOverflowY(!1),this.bottomLeftGrid.setOverflowX(!1),this.bottomLeftGrid.setOverflowY(!1),this.bottomRightGrid.setOverflowX(!1),this.bottomRightGrid.setOverflowY(!1)},mounted:function(){BI.QuickGridTable.superclass.mounted.apply(this,arguments);var a=this;this._topLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._topRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this._bottomLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._bottomRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this.topLeftGrid.element.mousewheel(function(b){a._topLeftWheelHandler.onWheel(b.originalEvent)}),this.topRightGrid.element.mousewheel(function(b){a._topRightWheelHandler.onWheel(b.originalEvent)}),this.bottomLeftGrid.element.mousewheel(function(b){a._bottomLeftWheelHandler.onWheel(b.originalEvent)}),this.bottomRightGrid.element.mousewheel(function(b){a._bottomRightWheelHandler.onWheel(b.originalEvent)})},_shouldHandleLeftX:function(a){ -return a>0?this.bottomLeftGrid.getScrollLeft()<this.bottomLeftGrid.getMaxScrollLeft():this.bottomLeftGrid.getScrollLeft()>0},_shouldHandleRightX:function(a){return a>0?this.bottomRightGrid.getScrollLeft()<this.bottomRightGrid.getMaxScrollLeft():this.bottomRightGrid.getScrollLeft()>0},_shouldHandleY:function(a){return a>0?this.bottomRightGrid.getScrollTop()<this.bottomRightGrid.getMaxScrollTop():this.bottomRightGrid.getScrollTop()>0},_onWheelLeft:function(a,b){var c=this,d=this.bottomLeftGrid.getScrollTop(),e=this.bottomLeftGrid.getScrollLeft();d+=b,e+=a,this.bottomLeftGrid.setScrollTop(d),this.bottomRightGrid.setScrollTop(d),this.topLeftGrid.setScrollLeft(e),this.bottomLeftGrid.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_onWheelRight:function(a,b){var c=this,d=this.bottomRightGrid.getScrollTop(),e=this.bottomRightGrid.getScrollLeft();d+=b,e+=a,this.bottomLeftGrid.setScrollTop(d),this.bottomRightGrid.setScrollTop(d),this.topRightGrid.setScrollLeft(e),this.bottomRightGrid.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_populateTable:function(){function a(a,b,c,d,e){var f=c/d,g=b/e;(g*(120/d)>=60||f*(120/e)>=60)&&(a.attr("overscanRowCount",100),a.attr("overscanColumnCount",100))}var b=this.options,c=this.getRegionSize(),d=0,e=0,f=0,g=[],h=this._getFreezeColLength();BI.each(b.columnSize,function(a,c){b.isNeedFreeze===!0&&b.freezeCols.contains(a)?d+=c:e+=c,f+=c,0===a?g[a]=c:g[a]=g[a-1]+c});var i=c,j=this._getFreezeHeaderHeight(),k=this._width-c,l=this._getFreezeHeaderHeight(),m=c,n=this._height-j,o=this._width-c,p=this._height-l;this.topLeft.setWidth(i),this.topLeft.setHeight(j),this.topRight.setWidth(k),this.topRight.setHeight(l),this.bottomLeft.setWidth(m),this.bottomLeft.setHeight(n),this.bottomRight.setWidth(o),this.bottomRight.setHeight(p),this.topLeftGrid.setWidth(i),this.topLeftGrid.setHeight(j),this.topRightGrid.setWidth(k),this.topRightGrid.setHeight(l),this.bottomLeftGrid.setWidth(m),this.bottomLeftGrid.setHeight(n),this.bottomRightGrid.setWidth(o),this.bottomRightGrid.setHeight(p),this.topLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.topLeftGrid.setEstimatedRowSize(b.headerRowSize),this.topRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.topRightGrid.setEstimatedRowSize(b.headerRowSize),this.bottomLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.bottomLeftGrid.setEstimatedRowSize(b.rowSize),this.bottomRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.bottomRightGrid.setEstimatedRowSize(b.rowSize);var q=this.contextLayout.attr("items");q[1].left=c,q[2].top=this._getFreezeHeaderHeight(),q[3].left=c,q[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",q),this.contextLayout.resize();var r=[],s=[],t=[],u=[];BI.each(b.header,function(a,b){r[a]=[],s[a]=[],BI.each(b,function(b,c){var d={type:"bi.grid_table_cell",cell:c};b<h?r[a].push(d):s[a].push(d)})}),BI.each(this._getActualItems(),function(a,b){t[a]=[],u[a]=[],BI.each(b,function(b,c){var d={type:"bi.grid_table_cell",cell:c};b<h?t[a].push(d):u[a].push(d)})}),this.topLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.topRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),h>0&&(a(this.topLeftGrid,i,j,b.headerRowSize,d/h),a(this.bottomLeftGrid,m,n,b.rowSize,d/h)),b.columnSize.length-h>0&&(a(this.topRight,k,l,b.headerRowSize,e/(b.columnSize.length-h)),a(this.bottomRightGrid,o,p,b.rowSize,e/(b.columnSize.length-h))),this.topLeftGrid.populate(r),this.topRightGrid.populate(s),this.bottomLeftGrid.populate(t),this.bottomRightGrid.populate(u)}}),BI.shortcut("bi.quick_grid_table",BI.QuickGridTable),BI.GridTableScrollbar=BI.inherit(BI.Widget,{_const:{FACE_MARGIN:4,FACE_MARGIN_2:8,FACE_SIZE_MIN:30,KEYBOARD_SCROLL_AMOUNT:40},_defaultConfig:function(){return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this,arguments),{baseCls:"scrollbar-layout-main public-scrollbar-main",attributes:{tabIndex:0},contentSize:0,defaultPosition:0,isOpaque:!1,orientation:"vertical",position:0,size:0})},render:function(){this.options;this.focused=!1,this.isDragging=!1,this.face=BI.createWidget({type:"bi.layout",cls:"scrollbar-layout-face public-scrollbar-face "+(this._isHorizontal()?"scrollbar-layout-face-horizontal":"scrollbar-layout-face-vertical")}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.face,left:0,top:0}]})},mounted:function(){var a=this,b=this.options,c="horizontal"===b.orientation?this._onWheelX:this._onWheelY;this._wheelHandler=new BI.WheelHandler(BI.bind(c,this),BI.bind(this._shouldHandleX,this),BI.bind(this._shouldHandleY,this)),this._mouseMoveTracker=new BI.MouseMoveTracker(BI.bind(this._onMouseMove,this),BI.bind(this._onMouseMoveEnd,this),document),this.element.on("mousedown",BI.bind(this._onMouseDown,this)),this.element.on("mousewheel",function(b){a._wheelHandler.onWheel(b.originalEvent)}),this.element.on("keydown",BI.bind(this._onKeyDown,this)),this.element.on("focus",function(){a.focused=!0,a._populate()}),this.element.on("blur",function(){a.focused=!1,a._populate()}),this._isHorizontal()?this.element.addClass("scrollbar-layout-main-horizontal"):this.element.addClass("scrollbar-layout-main-vertical"),this._populate()},_isHorizontal:function(){return"horizontal"===this.options.orientation},_getScale:function(){var a=this.options,b=a.size/a.contentSize,c=a.size*b;return c<this._const.FACE_SIZE_MIN&&(b=(a.size-this._const.FACE_SIZE_MIN)/(a.contentSize-a.size)),b},_getFaceSize:function(){var a=this.options,b=a.size/a.contentSize,c=a.size*b;return c<this._const.FACE_SIZE_MIN&&(c=this._const.FACE_SIZE_MIN),c},_shouldHandleX:function(a){return"horizontal"===this.options.orientation&&this._shouldHandleChange(a)},_shouldHandleY:function(a){return"horizontal"!==this.options.orientation&&this._shouldHandleChange(a)},_shouldHandleChange:function(a){return this.options.position+a!==this.options.position},_onWheelY:function(a,b){this._onWheel(b)},_onWheelX:function(a,b){this._onWheel(a)},_onWheel:function(a){var b=this.options.contentSize-this.options.size;this.options.position+=a,this.options.position<0?this.options.position=0:this.options.position>b&&(this.options.position=b),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)},_onMouseDown:function(a){if(a.target!==this.face.element[0]){var b=this._isHorizontal()?a.offsetX:a.offsetY;b/=this._getScale(),this.options.position=BI.clamp(b-.5*this._getFaceSize()/this._getScale(),0,this.options.contentSize-this.options.size),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)}else this._mouseMoveTracker.captureMouseMoves(a);try{this.element[0].focus()}catch(a){}},_onMouseMove:function(a,b){var c=this._isHorizontal()?a:b;c/=this._getScale(),this.options.position=BI.clamp(this.options.position+c,0,this.options.contentSize-this.options.size),this.isDragging=this._mouseMoveTracker.isDragging(),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)},_onMouseMoveEnd:function(a){this._mouseMoveTracker.releaseMouseMoves(),this.isDragging===!0&&(this.isDragging=!1,this._populate())},_onKeyDown:function(a){var b={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105},c=a.keyCode;if(c!==b.TAB){var d=40,e=0;if(this._isHorizontal())switch(c){case b.HOME:e=-1,d=this.options.contentSize;break;case b.LEFT:e=-1;break;case b.RIGHT:e=1;break;default:return}if(!this._isHorizontal())switch(c){case b.SPACE:e=a.shiftKey?-1:1;break;case b.HOME:e=-1,d=this.options.contentSize;break;case b.UP:e=-1;break;case b.DOWN:e=1;break;case b.PAGE_UP:e=-1,d=this.options.size;break;case b.PAGE_DOWN:e=1,d=this.options.size;break;default:return}this.options.position=BI.clamp(this.options.position+d*e,0,this.options.contentSize-this.options.size),a.preventDefault(),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)}},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);var b=a.size,c=this._isHorizontal(),d=this.focused||this.isDragging,e=this._getFaceSize(),f=a.isOpaque;this.element[f===!0?"addClass":"removeClass"]("public-scrollbar-main-opaque"),this.element[d===!0?"addClass":"removeClass"]("public-scrollbar-main-active"),this.face.element[d===!0?"addClass":"removeClass"]("public-scrollbar-face-active");var g=a.position*this._getScale()+this._const.FACE_MARGIN,h=this.contextLayout.attr("items");c?(this.setWidth(b),this.face.setWidth(e-this._const.FACE_MARGIN_2),h[0].left=g,h[0].top=0):(this.setHeight(b),this.face.setHeight(e-this._const.FACE_MARGIN_2),h[0].left=0,h[0].top=g),this.contextLayout.attr("items",h),this.contextLayout.resize()},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.options.size=a},populate:function(){this._populate()}}),BI.GridTableScrollbar.SIZE=10,BI.GridTableScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_table_scrollbar",BI.GridTableScrollbar),BI.GridTableHorizontalScrollbar=BI.inherit(BI.Widget,{_const:{FACE_MARGIN:4,FACE_MARGIN_2:8,FACE_SIZE_MIN:30,KEYBOARD_SCROLL_AMOUNT:40},_defaultConfig:function(){return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,position:0,size:0})},_init:function(){BI.GridTableHorizontalScrollbar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.scrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",orientation:"horizontal",isOpaque:!0,position:b.position,contentSize:b.contentSize,size:b.size}),this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(){a.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,arguments)}),BI.createWidget({type:"bi.absolute",cls:"horizontal-scrollbar",element:this,width:b.size,height:BI.GridTableScrollbar.SIZE,items:[{el:{type:"bi.absolute",scrollable:!1,height:BI.GridTableScrollbar.SIZE,items:[{el:this.scrollbar,left:0,top:0}]},top:0,left:0,right:0}]})},setContentSize:function(a){this.options.contentSize=a,this.scrollbar.setContentSize(a)},setPosition:function(a){this.options.position=a,this.scrollbar.setPosition(a)},setSize:function(a){this.setWidth(a),this.options.size=a,this.scrollbar.setSize(a)},populate:function(){this.scrollbar.populate();var a=this.options;return a.size<1||a.contentSize<=a.size?void this.setVisible(!1):void this.setVisible(!0)}}),BI.GridTableHorizontalScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_table_horizontal_scrollbar",BI.GridTableHorizontalScrollbar),BI.TableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-header-cell",text:""})},_init:function(){BI.TableHeaderCell.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.label",element:this,textAlign:"center",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.table_header_cell",BI.TableHeaderCell),BI.Table=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Table.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table",logic:{dynamic:!1},isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[]})},_calculateWidth:function(a){return a&&"0"!==a?(a=BI.parseFloat(a),a<0&&(a=0),a>1.01?a:100*a+"%"):""},_calculateHeight:function(a){return a?a:""},_isRightFreeze:function(){return BI.isNotEmptyArray(this.options.freezeCols)&&0!==BI.first(this.options.freezeCols)},_createTopLeft:function(){var a=this.options,b=this._isRightFreeze();this.topLeftColGroupTds={},this.topLeftBodyTds={},this.topLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.topLeftColGroupTds),e=this.topLeftBody=this._body();if(e.element.append(this._createHeaderCells(this.topLeftItems,this.columnLeft,this.mergeLeft,this.topLeftBodyTds,this.topLeftBodyItems)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createTopRight:function(){var a=this.options,b=this._isRightFreeze();this.topRightColGroupTds={},this.topRightBodyTds={},this.topRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.topRightColGroupTds),e=this.topRightBody=this._body();if(e.element.append(this._createHeaderCells(this.topRightItems,this.columnRight,this.mergeRight,this.topRightBodyTds,this.topRightBodyItems,this.columnLeft.length)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topRightContainer=BI.createWidget({type:"bi.adaptive",width:f||void 0,items:[c]})},_createBottomLeft:function(){var a=this.options,b=this._isRightFreeze();this.bottomLeftColGroupTds={},this.bottomLeftBodyTds={},this.bottomLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.bottomLeftColGroupTds),e=this._createBottomLeftBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomLeftBody:function(){var a=this.bottomLeftBody=this._body();return a.element.append(this._createCells(this.bottomLeftItems,this.columnLeft,this.mergeLeft,this.bottomLeftBodyTds,this.bottomLeftBodyItems)),a},_createBottomRight:function(){var a=this.options,b=this._isRightFreeze();this.bottomRightColGroupTds={},this.bottomRightBodyTds={},this.bottomRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.bottomRightColGroupTds),e=this._createBottomRightBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomRightContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomRightBody:function(){var a=this.bottomRightBody=this._body();return a.element.append(this._createCells(this.bottomRightItems,this.columnRight,this.mergeRight,this.bottomRightBodyTds,this.bottomRightBodyItems,this.columnLeft.length)),a},_createFreezeTable:function(){var a=this,b=this.options,c=this._isRightFreeze(),d=this._split(b.header);this.topLeftItems=d.left,this.topRightItems=d.right,d=this._split(b.items),this.bottomLeftItems=d.left,this.bottomRightItems=d.right,this.columnLeft=[],this.columnRight=[],BI.each(b.columnSize,function(d,e){b.freezeCols.contains(d)?a[c?"columnRight":"columnLeft"].push(e):a[c?"columnLeft":"columnRight"].push(e)}),this.mergeLeft=[],this.mergeRight=[],BI.each(b.mergeCols,function(d,e){b.freezeCols.contains(e)?a[c?"mergeRight":"mergeLeft"].push(e):a[c?"mergeLeft":"mergeRight"].push(e)});var e=this._createTopLeft(),f=this._createTopRight(),g=this._createBottomLeft(),h=this._createBottomRight();this.scrollTopLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-left",width:"100%",height:"100%",scrollable:!1,items:[e]}),this.scrollTopRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-right",width:"100%",height:"100%",scrollable:!1,items:[f]}),this.scrollBottomLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-left",width:"100%",height:"100%",scrollable:c||null,scrollx:!c,items:[g]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-right",width:"100%",height:"100%",scrollable:!c||null,scrollx:c,items:[h]}),this.topLeft=BI.createWidget({type:"bi.adaptive",cls:"top-left",scrollable:!1,items:[this.scrollTopLeft]}),this.topRight=BI.createWidget({type:"bi.adaptive",cls:"top-right",scrollable:!1,items:[this.scrollTopRight]}),this.bottomLeft=BI.createWidget({type:"bi.adaptive",cls:"bottom-left",items:[this.scrollBottomLeft]}),this.bottomRight=BI.createWidget({type:"bi.adaptive",cls:"bottom-right",scrollable:!1,items:[this.scrollBottomRight]});var i=b.header.length*((b.headerRowSize||b.rowSize)+1)+1,j=BI.sum(b.freezeCols,function(a,c){return b.columnSize[c]>1?b.columnSize[c]+1:b.columnSize[c]});this._resize=function(){a.scrollBottomLeft.element.is(":visible")&&(a.scrollBottomLeft.element.css({"overflow-x":"auto"}),a.scrollBottomRight.element.css({"overflow-x":"auto"}),a.setColumnSize(b.columnSize),c?a.scrollBottomLeft.element.css({"overflow-y":"auto"}):a.scrollBottomRight.element.css({"overflow-y":"auto"}),(a.scrollBottomLeft.element.hasHorizonScroll()||a.scrollBottomRight.element.hasHorizonScroll())&&(a.scrollBottomLeft.element.css("overflow-x","scroll"),a.scrollBottomRight.element.css("overflow-x","scroll")),a.scrollBottomRight.element.hasVerticalScroll()?a.scrollTopRight.element.css("overflow-y","scroll"):a.scrollTopRight.element.css("overflow-y","hidden"),a.scrollBottomLeft.element.hasVerticalScroll()?a.scrollTopLeft.element.css("overflow-y","scroll"):a.scrollTopLeft.element.css("overflow-y","hidden"),a.scrollTopLeft.element[0].scrollLeft=a.scrollBottomLeft.element[0].scrollLeft,a.scrollTopRight.element[0].scrollLeft=a.scrollBottomRight.element[0].scrollLeft,a.scrollBottomLeft.element[0].scrollTop=a.scrollBottomRight.element[0].scrollTop)};var k=b.regionColumnSize;0===b.freezeCols.length?k=c?["fill",0]:[0,"fill"]:b.freezeCols.length>=b.columnSize.length&&(k=c?[0,"fill"]:["fill",0]),this.partitions=BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{rows:2,columns:2,columnSize:k||(c?["fill",j]:[j,"fill"]),rowSize:[i,"fill"],items:[[{el:this.topLeft},{el:this.topRight}],[{el:this.bottomLeft},{el:this.bottomRight}]]})))),this._initFreezeScroll(),BI.nextTick(function(){a.element.is(":visible")&&(a._resize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT))}),BI.ResizeDetector.addResizeListener(this,function(){a._resize(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE)})},_initFreezeScroll:function(){function a(a,c,d){a.scroll(function(e){d.scrollTop(a.scrollTop()),c.scrollLeft(a.scrollLeft()),b.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})}var b=this;this.options;a(this.scrollBottomRight.element,this.scrollTopRight.element,this.scrollBottomLeft.element)},resize:function(){this._resize&&this._resize()},_createCells:function(a,b,c,d,e,f,g){var h=this,i=this.options,j={},k={},l={},m={},n={};b=b||i.columnSize,c=c||i.mergeCols,d=d||{},e=e||{},f=f||0,g||(g=i.rowSize);var o=document.createDocumentFragment();return BI.each(a,function(a,p){function q(a,b){var c=(0|j[b].attr("height"))+g+1;j[b].attr("height",c).css("height",c);var f=(0|(j[b].attr("rowspan")||1))+1;j[b].attr("rowspan",f),j[b].__mergeRows.pushDistinct(a),d[a][b]=j[b],e[a][b]=m[b]}function r(a,c){if(b[c]){var f=0|k[a].attr("width");f>1.05&&b[c]?(f=f+b[c]+1,c===b.length-1&&f--):f+=b[c],f=h._calculateWidth(f),k[a].attr("width",f).css("width",f),l[a].element.width(f)}var g=(0|(k[a].attr("colspan")||1))+1;k[a].attr("colspan",g),k[a].__mergeCols.pushDistinct(c),d[a][c]=k[a],e[a][c]=l[a]}function s(a,c){var i=h._calculateWidth(b[c]);i>1.05&&c===b.length-1&&i--;var o=h._calculateHeight(g),q=$("<td>").attr("height",o).attr("width",i).css({width:i,height:o,position:"relative"}).addClass(0===(1&c)?"odd-col":"even-col").addClass(0===a?"first-row":"").addClass(0===c?"first-col":"").addClass(c===p.length-1?"last-col":""),r=BI.createWidget(n[a][c],{type:"bi.table_cell",textAlign:"left",width:BI.isNumeric(i)?i:"",height:BI.isNumeric(o)?o:"",_row:a,_col:c+f});h.addWidget(r.getName(),r),r._mount(),r.element.css("position","relative"),q.append(r.element),t.append(q),j[c]=q,j[c].__mergeRows=[a],m[c]=r,k[a]=q,k[a].__mergeCols=[c],l[a]=r,d[a][c]=q,e[a][c]=r}var t=$("<tr>").addClass(0===(1&a)?"odd":"even");BI.each(p,function(b,f){if(n[a]||(n[a]={}),d[a]||(d[a]={}),e[a]||(e[a]={}),n[a][b]=f,i.isNeedMerge&&c.contains(b))if(0===a&&0===b)s(0,0);else if(0===b&&a>0){var g=i.mergeRule(n[a][b],n[a-1][b]);g===!0?(q(a,b),k[a]=j[b],l[a]=m[b]):s(a,b)}else if(0===a&&b>0){var h=i.mergeRule(n[a][b],n[a][b-1]);h===!0?(r(a,b),j[b]=k[a],m[b]=l[a]):s(a,b)}else{var g=i.mergeRule(n[a][b],n[a-1][b]),h=i.mergeRule(n[a][b],n[a][b-1]);if(h&&g)return;h&&r(a,b),g&&q(a,b),h||g||s(a,b)}else s(a,b)}),o.appendChild(t[0])}),o},_createColGroupCells:function(a,b){var c=this,d=this.options;a=a||d.columnSize,b=b||{};var e=document.createDocumentFragment();return BI.each(a,function(a,d){var f=c._calculateWidth(d),g=$("<col>").attr("width",f).css("width",f);b[a]=g,e.appendChild(g[0])}),e},_createHeaderCells:function(a,b,c,d,e,f){var g=this.options;f||(f=0);var h=this._createCells(a,b,BI.range(g.columnSize.length),d,e,f,g.headerRowSize||g.rowSize);return h},_createFooterCells:function(a,b,c,d){var e=(this.options,this._createCells(a,b,[],c,d,0));return e},_createColGroup:function(a,b,c){this.options;return this.colgroup=this._colgroup(),this.colgroup.element.append(this._createColGroupCells(a,b,c)),this.colgroup},_createHeader:function(){var a=this.options;if(a.header!==!1)return this.header=this._header(),this.header.element.append(this._createHeaderCells(a.header,null,null,this.headerTds,this.headerItems)),this.header},_createFooter:function(a,b,c){var d=this.options;if(d.footer!==!1)return this.footer=this._footer(),this.footer.element.append(this._createFooterCells(d.footer,null,this.footerTds,this.footerItems)),this.footer},_createBody:function(){var a=this.options;return this.body=this._body(),this.body.element.append(this._createCells(a.items,null,null,this.bodyTds,this.bodyItems)),this.body},_createNormalTable:function(){var a=this,b=this.options,c=this._table();this.colgroupTds={},this.headerTds={},this.footerTds={},this.bodyTds={},this.headerItems={},this.footerItems={},this.bodyItems={};var d=this._createColGroup(null,this.colgroupTds),e=this._createHeader(),f=this._createFooter(),g=this._createBody();BI.createWidget({type:"bi.adaptive",element:c,items:[d,e,f,g]});var h=BI.sum(this.options.columnSize)||void 0;h=this._calculateWidth(h),BI.isNumeric(h)&&h>1&&(h+=b.columnSize.length),this.tableContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(h),items:[c]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",cls:"scroll-bottom-right",scrollable:!0,items:[this.tableContainer]}),BI.createWidget({type:"bi.adaptive",cls:"bottom-right",element:this,scrollable:!1,items:[this.scrollBottomRight]}),this._initNormalScroll(),BI.nextTick(function(){a.element.is(":visible")&&a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT)})},_initNormalScroll:function(){var a=this;this.scrollBottomRight.element.scroll(function(b){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})},_split:function(a){var b=this.options,c=[],d=[],e=this._isRightFreeze();return BI.each(a,function(a,f){c.push([]),d.push([]),BI.each(f,function(f,g){b.freezeCols.contains(f)?(e?d:c)[a].push(g):(e?c:d)[a].push(g)})}),{left:c,right:d}},_table:function(){return BI.createWidget({type:"bi.layout",tagName:"table",cls:"table",attribute:{cellspacing:0,cellpadding:0}})},_header:function(){return BI.createWidget({type:"bi.layout",cls:"header",tagName:"thead"})},_footer:function(){return BI.createWidget({type:"bi.layout",cls:"footer",tagName:"tfoot"})},_body:function(){return BI.createWidget({type:"bi.layout",tagName:"tbody",cls:"body"})},_colgroup:function(){return BI.createWidget({type:"bi.layout",tagName:"colgroup"})},_init:function(){BI.Table.superclass._init.apply(this,arguments),this.populate(this.options.items)},setColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.columnSize=a||[],c.isNeedFreeze){var e=[],f=[];BI.each(c.columnSize,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=2,j=3,k=function(a){var c,d,k,l;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,k=b.topLeftBodyItems,l=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,k=b.topRightBodyItems,l=f;break;case i:c=b.bottomLeftColGroupTds,d=b.bottomLeftBodyTds,k=b.bottomLeftBodyItems,l=e;break;case j:c=b.bottomRightColGroupTds,d=b.bottomRightBodyTds,k=b.bottomRightBodyItems,l=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(""!==l[a]&&e!==l[a]){var f=b._calculateWidth(l[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(l,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(k,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(l,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};k(g),k(h),k(i),k(j);var l=0,m=0;this.columnLeft=[],this.columnRight=[],BI.each(c.columnSize,function(a,e){c.freezeCols.contains(a)?(l+=e,b[d?"columnRight":"columnLeft"].push(e)):(m+=e,b[d?"columnLeft":"columnRight"].push(e))}),l=this._calculateWidth(l),m=this._calculateWidth(m),BI.isNumeric(l)&&(l=BI.parseFloat(l)+c.freezeCols.length),BI.isNumeric(m)&&(m=BI.parseFloat(m)+c.columnSize.length-c.freezeCols.length),this.topLeftContainer.element.width(d?m:l),this.bottomLeftContainer.element.width(d?m:l),this.topRightContainer.element.width(d?l:m),this.bottomRightContainer.element.width(d?l:m),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(a,d){var e=0|d.attr("width");if(""!==c.columnSize[a]&&e!==c.columnSize[a]){var f=b._calculateWidth(c.columnSize[a]);d.attr("width",f).css("width",f),BI.each(b.bodyTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.headerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.footerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.bodyItems,function(d,e){if(e[a])if(b.bodyTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.bodyTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.bodyTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.headerItems,function(d,e){if(e[a])if(b.headerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.headerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.footerItems,function(d,e){if(e[a])if(b.footerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.footerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.footerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}});var n=this._calculateWidth(BI.sum(c.columnSize));n>1.05&&(n+=c.columnSize.length),n>1.05&&this.tableContainer.element.width(n)}},getColumnSize:function(){return this.options.columnSize},getCalculateColumnSize:function(){var a=this,b=this.options,c=[];if(b.isNeedFreeze===!0){if(BI.size(this.bottomLeftBodyTds)>0||BI.size(this.bottomRightBodyTds)>0)return BI.any(this.bottomLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomLeftBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomLeftBodyTds[0])-1&&e++,c.push(e)}),BI.any(this.bottomRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomRightBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomRightBodyTds[0])-1&&e++,c.push(e)}),c;BI.any(this.topLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.topLeftBodyTds[BI.size(a.topLeftBodyTds)-1])-1&&e++,c.push(e)}),BI.any(this.topRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds)-1],function(b,d){ -var e=d.width()/d.__mergeCols.length;b==BI.size(a.topRightBodyTds[BI.size(a.topRightBodyTds)-1])-1&&e++,c.push(e)})}else BI.each(this.headerTds[BI.size(this.headerTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.headerTds[BI.size(a.headerTds)-1])-1&&e++,c.push(e)});return c},setHeaderColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.isNeedFreeze){var e=[],f=[];BI.each(a,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=function(a){var c,d,i,j;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,i=b.topLeftBodyItems,j=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,i=b.topRightBodyItems,j=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(e!==j[a]){var f=b._calculateWidth(j[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(j,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(i,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(j,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};i(g),i(h);var j=0,k=0;BI.each(a,function(a,b){c.freezeCols.contains(a)?j+=b:k+=b}),j=this._calculateWidth(j),k=this._calculateWidth(k),BI.isNumeric(j)&&(j=BI.parseFloat(j)+c.freezeCols.length),BI.isNumeric(k)&&(k=BI.parseFloat(k)+a.length-c.freezeCols.length),this.topLeftContainer.element.width(d?k:j),this.topRightContainer.element.width(d?j:k),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(c,d){var e=0|d.attr("width");if(e!==a[c]){var f=b._calculateWidth(a[c]);d.attr("width",f).css("width",f),BI.each(b.headerTds,function(d,e){if(e[c])if(e[c].__mergeCols.length>1){var g=0;BI.each(a,function(a,b){e[c].__mergeCols.contains(a)&&(g+=b)}),g=b._calculateWidth(g),g>1&&(g+=e[c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].attr("width","").css("width","")}else c==BI.size(e)-1?e[c].attr("width",f-1).css("width",f-1):e[c].attr("width",f).css("width",f)}),BI.each(b.headerItems,function(d,e){if(e[c])if(b.headerTds[d][c].__mergeCols.length>1){var g=0;BI.each(a,function(a,e){b.headerTds[d][c].__mergeCols.contains(a)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].element.attr("width","").css("width","")}else BI.isNumeric(f)?c==BI.size(e)-1?e[c].element.attr("width",f-1).css("width",f-1):e[c].element.attr("width",f).css("width",f):e[c].element.attr("width","").css("width","")})}});var l=this._calculateWidth(BI.sum(a));l>1.05&&(l+=a.length),this.tableContainer.element.width(l)}},setRegionColumnSize:function(a){var b=this.options;b.regionColumnSize=a,0===b.freezeCols.length?b.isNeedFreeze?(this.partitions.attr("columnSize",this._isRightFreeze()?["fill",0]:[0,"fill"]),this.partitions.resize()):this.tableContainer.element.width(a[0]):b.freezeCols.length>0&&b.freezeCols.length<b.columnSize.length?b.isNeedFreeze?(this.partitions.attr("columnSize",a),this.partitions.resize()):this.tableContainer.element.width(a[0]):b.isNeedFreeze?(this.partitions.attr("columnSize",this._isRightFreeze()?[0,"fill"]:["fill",0]),this.partitions.resize()):this.tableContainer.element.width(a[0])},getRegionColumnSize:function(){return this.options.regionColumnSize},getCalculateRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element.width(),this.scrollBottomRight.element.width()]:[this.scrollBottomRight.element.width()]},getCalculateRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollTopRight.element.height(),this.scrollBottomRight.element.height()]:[this.scrollBottomRight.element.height()]},getClientRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].clientWidth,this.scrollBottomRight.element[0].clientWidth]:[this.scrollBottomRight.element[0].clientWidth]},getClientRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].clientHeight,this.scrollBottomRight.element[0].clientHeight]:[this.scrollBottomRight.element[0].clientHeight]},getScrollRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].scrollWidth,this.scrollBottomRight.element[0].scrollWidth]:[this.scrollBottomRight.element[0].scrollWidth]},getScrollRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?a.freezeCols.length<a.columnSize.length?[this.scrollTopRight.element[0].scrollHeight,this.scrollBottomRight.element[0].scrollHeight]:[this.scrollTopLeft.element[0].scrollHeight,this.scrollBottomLeft.element[0].scrollHeight]:[this.scrollBottomRight.element[0].scrollHeight]},hasVerticalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element.hasVerticalScroll()||this.scrollBottomLeft.element.hasVerticalScroll():this.scrollBottomRight.element.hasVerticalScroll()},setVerticalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomRight.element[0].scrollTop!==a&&(this.scrollBottomRight.element[0].scrollTop=a),this.scrollBottomLeft.element[0].scrollTop!==a&&(this.scrollBottomLeft.element[0].scrollTop=a)):this.scrollBottomRight.element[0].scrollTop!==a&&(this.scrollBottomRight.element[0].scrollTop=a)},setLeftHorizontalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomLeft.element[0].scrollLeft!==a&&(this.scrollBottomLeft.element[0].scrollLeft=a),this.scrollTopLeft.element[0].scrollLeft!==a&&(this.scrollTopLeft.element[0].scrollLeft=a)):this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a)},setRightHorizontalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a),this.scrollTopRight.element[0].scrollLeft!==a&&(this.scrollTopRight.element[0].scrollLeft=a)):this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a)},getVerticalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element[0].scrollTop||this.scrollBottomLeft.element[0].scrollTop:this.scrollBottomRight.element[0].scrollTop},getLeftHorizontalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomLeft.element[0].scrollLeft:this.scrollBottomRight.element[0].scrollLeft},getRightHorizontalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element[0].scrollLeft:this.scrollBottomRight.element[0].scrollLeft},getColumns:function(){var a=this.options;return a.isNeedFreeze?{topLeft:this.topLeftBodyItems,topRight:this.topRightBodyItems,bottomLeft:this.bottomLeftBodyItems,bottomRight:this.bottomRightBodyItems}:{header:this.headerItems,body:this.bodyItems,footer:this.footerItems}},populate:function(a,b){this.options.items=a||[],b&&(this.options.header=b),this.empty(),this.options.isNeedFreeze?this._createFreezeTable():this._createNormalTable()}}),BI.Table.EVENT_TABLE_AFTER_INIT="EVENT_TABLE_AFTER_INIT",BI.Table.EVENT_TABLE_RESIZE="EVENT_TABLE_RESIZE",BI.Table.EVENT_TABLE_SCROLL="EVENT_TABLE_SCROLL",BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE="EVENT_TABLE_BEFORE_COLUMN_RESIZE",BI.Table.EVENT_TABLE_COLUMN_RESIZE="EVENT_TABLE_COLUMN_RESIZE",BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE="EVENT_TABLE_AFTER_COLUMN_RESIZE",BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE="EVENT_TABLE_BEFORE_REGION_RESIZE",BI.Table.EVENT_TABLE_REGION_RESIZE="EVENT_TABLE_REGION_RESIZE",BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE="EVENT_TABLE_AFTER_REGION_RESIZE",BI.shortcut("bi.table_view",BI.Table),BI.ResizableTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ResizableTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-resizable-table-cell",cell:{},minSize:15,maxSize:Number.MAX_VALUE,start:BI.emptyFn,resize:BI.emptyFn,stop:BI.emptyFn})},_init:function(){function a(a){var b=BI.clamp(a,c.minSize,c.maxSize||Number.MAX_VALUE);return b}BI.ResizableTableCell.superclass._init.apply(this,arguments);var b=this,c=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},c.cell,{width:c.width,height:c.height}));var d=!1,e=0,f=0,g=c.width,h=new BI.MouseMoveTracker(function(i,j){h.isDragging()&&(d=!0,f+=i,e=a(g+f),b.handler.element.addClass("dragging"),c.resize(e))},function(){d===!0&&(e=a(e),c.stop(e),e=0,f=0,g=c.width,d=!1),b.handler.element.removeClass("dragging"),b.handler.element.removeClass("suitable"),h.releaseMouseMoves()},document);this.handler=BI.createWidget({type:"bi.absolute",cls:"resizable-table-cell-resizer-container",width:6,items:[{el:{type:"bi.layout",cls:"resizable-table-cell-resizer-knob",width:4},right:0,top:0,bottom:0}]}),this.handler.element.on("mousedown",function(b){g=c.width,a(g),h.captureMouseMoves(b)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0},{el:this.handler,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.ResizableTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width)},setHeight:function(a){BI.ResizableTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height)}}),BI.shortcut("bi.resizable_table_cell",BI.ResizableTableCell),BI.ResizableTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-resizable-table",el:{type:"bi.grid_table"},isNeedFreeze:!1,isNeedResize:!0,isResizeAdapt:!1,headerRowSize:25,rowSize:25,isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],freezeCols:[],header:[],items:[],regionColumnSize:[]})},_init:function(){BI.ResizableTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.resizer=BI.createWidget({type:"bi.layout",cls:"resizable-table-resizer",invisible:!0,width:2}),this.regionResizerHandler=this._createResizerHandler(),this.table=BI.createWidget(b.el,{type:"bi.grid_table",element:this,width:b.width,height:b.height,headerRowSize:b.headerRowSize,rowSize:b.rowSize,columnSize:b.columnSize,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:BI.bind(this._mergeRule,this),header:this._formatHeader(b.header),items:b.items,regionColumnSize:b.regionColumnSize}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.regionResizerHandler,left:0,top:0,bottom:0},{el:this.resizer,left:0,top:0}]}),this._populate()},_mergeRule:function(a,b){var c=this.options;return"bi.resizable_table_cell"===a.type&&(a=a.cell),"bi.resizable_table_cell"===b.type&&(b=b.cell),c.mergeRule(a,b)},_createResizerHandler:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.absolute",cls:"resizable-table-region-resizer",invisible:!0,width:6,items:[{el:{type:"bi.layout",width:2,cls:"resizable-table-region-resizer-knob"},left:2,top:0,bottom:0}]}),d=0,e=0,f=0,g=!1,h=new BI.MouseMoveTracker(function(c,i){h.isDragging()&&(g=!0,e+=c,d=BI.clamp(f+e,15,b.width-15),a.regionResizerHandler.element.addClass("dragging"),a._setRegionResizerHandlerPosition(d-3,0))},function(){if(g===!0){if(b.regionColumnSize[0]=BI.clamp(d,15,b.width-15),a.table.setRegionColumnSize(b.regionColumnSize),b.isResizeAdapt===!0){var c=a._getFreezeColumnSize();b.columnSize[a._getFreezeColLength()-1]+=b.regionColumnSize[0]-c,a.table.setColumnSize(b.columnSize)}a.table.populate(),a._populate(),a.regionResizerHandler.element.removeClass("dragging"),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE),g=!1}h.releaseMouseMoves()},document);return c.element.on("mousedown",function(b){f=d=a._getRegionSize(),e=0,a._setResizerPosition(0,0),h.captureMouseMoves(b)}),c},_setResizerPosition:function(a,b){this.resizer.element.css({left:a+"px",top:b+"px"})},_setRegionResizerHandlerPosition:function(a,b){this.regionResizerHandler.element.css({left:a+"px",top:b+"px"})},_getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},_getRegionRowSize:function(){var a=this.options;return[a.header.length*a.headerRowSize,Math.min(a.height-a.header.length*a.headerRowSize,a.items.length*a.rowSize)]},_getFreezeColLength:function(){return this.options.freezeCols.length},_getFreezeColumnSize:function(){for(var a=this.options.columnSize,b=0,c=0,d=this._getFreezeColLength();c<d;c++)b+=a[c];return b},_getResizerLeft:function(a){for(var b=0,c=this.options.columnSize,d=this._getFreezeColLength(),e=a>=d?d:0;e<a;e++)b+=c[e]||0;return a>=d?(b+=this.table.getRegionSize(),b-=this.table.getRightHorizontalScroll()):b-=this.table.getLeftHorizontalScroll(),b},_formatHeader:function(a){var b=this,c=this.options,d=[],e=function(a,d){b.resizer.setVisible(!0);var e=c.headerRowSize+b._getRegionRowSize()[1];b.resizer.setHeight(e),b._setResizerPosition(b._getResizerLeft(a)+d,(c.header.length-1)*c.headerRowSize)},f=function(a,d){b.resizer.setVisible(!1);var e=c.columnSize.slice();e[a]=d,c.columnSize=e,b.table.setColumnSize(e),b.table.populate(),b._populate(),b.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE)};return BI.each(a,function(g,h){g===a.length-1?(d[g]=[],BI.each(h,function(a,i){if(a===b._getFreezeColLength()-1||a===h.length-1)d[g][a]=i;else if(d[g][a]={type:"bi.resizable_table_cell",cell:i,suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},c.isNeedMerge)for(var j=g;j>0&&b._mergeRule(d[j][a],d[j-1][a]);)d[j-1][a]={type:"bi.resizable_table_cell",cell:d[j-1][a],suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},j--})):d.push(h)}),d},_populate:function(){var a=(this.options,this._getRegionSize());a>0?(this.regionResizerHandler.setVisible(!0),this._setRegionResizerHandlerPosition(a-3,0)):this.regionResizerHandler.setVisible(!1)},setWidth:function(a){BI.ResizableTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.ResizableTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.ResizableTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b){a&&(this.options.items=a),b&&(this.options.header=b,this.options.isNeedResize&&(b=this._formatHeader(b))),this.table.populate(a,b),this._populate()}}),BI.shortcut("bi.resizable_table",BI.ResizableTable),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId,value:e.value}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},getValue:function(){return this.tree?this.tree.getValue():[]},getAllButtons:function(){return this.tree?this.tree.getAllButtons():[]},getAllLeaves:function(){return this.tree?this.tree.getAllLeaves():[]},getNodeById:function(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d<e;d++)_init.afterA[d].apply(this,arguments)},getBeforeA:function(a,b,c){for(var d=0,e=_init.beforeA.length;d<e;d++)_init.beforeA[d].apply(this,arguments)},getInnerAfterA:function(a,b,c){for(var d=0,e=_init.innerAfterA.length;d<e;d++)_init.innerAfterA[d].apply(this,arguments)},getInnerBeforeA:function(a,b,c){for(var d=0,e=_init.innerBeforeA.length;d<e;d++)_init.innerBeforeA[d].apply(this,arguments)},getCache:function(a){return caches[a.treeId]},getNextNode:function(a,b){if(!b)return null;for(var c=a.data.key.children,d=b.parentTId?b.getParentNode():data.getRoot(a),e=0,f=d[c].length-1;e<=f;e++)if(d[c][e]===b)return e==f?null:d[c][e+1];return null},getNodeByParam:function(a,b,c,d){if(!b||!c)return null;for(var e=a.data.key.children,f=0,g=b.length;f<g;f++){if(b[f][c]==d)return b[f];var h=data.getNodeByParam(a,b[f][e],c,d);if(h)return h}return null},getNodeCache:function(a,b){if(!b)return null;var c=caches[a.treeId].nodes[data.getNodeCacheId(b)];return c?c:null},getNodeName:function(a,b){var c=a.data.key.name;return""+b[c]},getNodeTitle:function(a,b){var c=""===a.data.key.title?a.data.key.name:a.data.key.title;return""+b[c]},getNodes:function(a){return data.getRoot(a)[a.data.key.children]},getNodesByParam:function(a,b,c,d){if(!b||!c)return[];for(var e=a.data.key.children,f=[],g=0,h=b.length;g<h;g++)b[g][c]==d&&f.push(b[g]),f=f.concat(data.getNodesByParam(a,b[g][e],c,d));return f},getNodesByParamFuzzy:function(a,b,c,d){if(!b||!c)return[];var e=a.data.key.children,f=[];d=d.toLowerCase();for(var g=0,h=b.length;g<h;g++)"string"==typeof b[g][c]&&b[g][c].toLowerCase().indexOf(d)>-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h<i;h++){if(tools.apply(c,[b[h],e],!1)){if(d)return b[h];g.push(b[h])}var j=data.getNodesByFilter(a,b[h][f],c,d,e);if(d&&j)return j;g=d?j:g.concat(j)}return g},getPreNode:function(a,b){if(!b)return null;for(var c=a.data.key.children,d=b.parentTId?b.getParentNode():data.getRoot(a),e=0,f=d[c].length;e<f;e++)if(d[c][e]===b)return 0==e?null:d[c][e-1];return null},getRoot:function(a){return a?roots[a.treeId]:null},getRoots:function(){return roots},getSetting:function(a){return settings[a]},getSettings:function(){return settings},getZTreeTools:function(a){var b=this.getRoot(this.getSetting(a));return b?b.treeTools:null},initCache:function(a){for(var b=0,c=_init.caches.length;b<c;b++)_init.caches[b].apply(this,arguments)},initNode:function(a,b,c,d,e,f){for(var g=0,h=_init.nodes.length;g<h;g++)_init.nodes[g].apply(this,arguments)},initRoot:function(a){for(var b=0,c=_init.roots.length;b<c;b++)_init.roots[b].apply(this,arguments)},isSelectedNode:function(a,b){for(var c=data.getRoot(a),d=0,e=c.curSelectedList.length;d<e;d++)if(b===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(a,b){var c=a.data.key.children;if(b[c])for(var d=0,e=b[c].length;d<e;d++)arguments.callee(a,b[c][d]);data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=null},removeSelectedNode:function(a,b){for(var c=data.getRoot(a),d=0,e=c.curSelectedList.length;d<e;d++)b!==c.curSelectedList[d]&&data.getNodeCache(a,c.curSelectedList[d].tId)||(c.curSelectedList.splice(d,1),d--,e--)},setCache:function(a,b){caches[a.treeId]=b},setRoot:function(a,b){roots[a.treeId]=b},setZTreeTools:function(a,b){for(var c=0,d=_init.zTreeTools.length;c<d;c++)_init.zTreeTools[c].apply(this,arguments)},transformToArrayFormat:function(a,b){if(!b)return[];var c=a.data.key.children,d=[];if(tools.isArray(b))for(var e=0,f=b.length;e<f;e++)d.push(b[e]),b[e][c]&&(d=d.concat(data.transformToArrayFormat(a,b[e][c])));else d.push(b),b[c]&&(d=d.concat(data.transformToArrayFormat(a,b[c])));return d},transformTozTreeFormat:function(a,b){var c,d,e=a.data.simpleData.idKey,f=a.data.simpleData.pIdKey,g=a.data.key.children;if(!e||""==e||!b)return[];if(tools.isArray(b)){var h=[],i=[];for(c=0,d=b.length;c<d;c++)i[b[c][e]]=b[c];for(c=0,d=b.length;c<d;c++)i[b[c][f]]&&b[c][e]!=b[c][f]?(i[b[c][f]][g]||(i[b[c][f]][g]=[]),i[b[c][f]][g].push(b[c])):h.push(b[c]);return h}return[b]}},event={bindEvent:function(a){for(var b=0,c=_init.bind.length;b<c;b++)_init.bind[b].apply(this,arguments)},unbindEvent:function(a){for(var b=0,c=_init.unbind.length;b<c;b++)_init.unbind[b].apply(this,arguments)},bindTree:function(a){var b={treeId:a.treeId},c=a.treeObj;a.view.txtSelectedEnable||c.bind("selectstart",function(a){var b=a.originalEvent.srcElement.nodeName.toLowerCase();return"input"===b||"textarea"===b}).css({"-moz-user-select":"-moz-none"}),c.bind("click",b,event.proxy),c.bind("dblclick",b,event.proxy),c.bind("mouseover",b,event.proxy),c.bind("mouseout",b,event.proxy),c.bind("mousedown",b,event.proxy),c.bind("mouseup",b,event.proxy),c.bind("contextmenu",b,event.proxy)},unbindTree:function(a){var b=a.treeObj;b.unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(a){for(var b=[],c=0,d=_init.proxys.length;c<d;c++){var e=_init.proxys[c].apply(this,arguments);if(b.push(e),e.stop)break}return b},proxy:function(a){var b=data.getSetting(a.data.treeId);if(!tools.uCanDo(b,a))return!0;for(var c=event.doProxy(a),d=!0,e=!1,f=0,g=c.length;f<g;f++){var h=c[f];h.nodeEventCallback&&(e=!0,d=h.nodeEventCallback.apply(h,[a,h.node])&&d),h.treeEventCallback&&(e=!0,d=h.treeEventCallback.apply(h,[a,h.node])&&d)}return d}},handler={onSwitchNode:function(a,b){var c=data.getSetting(a.data.treeId);if(b.open){if(0==tools.apply(c.callback.beforeCollapse,[c.treeId,b],!0))return!0;data.getRoot(c).expandTriggerFlag=!0,view.switchNode(c,b)}else{if(0==tools.apply(c.callback.beforeExpand,[c.treeId,b],!0))return!0;data.getRoot(c).expandTriggerFlag=!0,view.switchNode(c,b)}return!0},onClickNode:function(a,b){var c=data.getSetting(a.data.treeId),d=c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&data.isSelectedNode(c,b)?0:c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&c.view.selectedMulti?2:1;return 0==tools.apply(c.callback.beforeClick,[c.treeId,b,d],!0)||(0===d?view.cancelPreSelectedNode(c,b):view.selectNode(c,b,2===d),c.treeObj.trigger(consts.event.CLICK,[a,c.treeId,b,d]),!0)},onZTreeMousedown:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeMouseDown,[c.treeId,b],!0)&&tools.apply(c.callback.onMouseDown,[a,c.treeId,b]),!0},onZTreeMouseup:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeMouseUp,[c.treeId,b],!0)&&tools.apply(c.callback.onMouseUp,[a,c.treeId,b]), -!0},onZTreeDblclick:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeDblClick,[c.treeId,b],!0)&&tools.apply(c.callback.onDblClick,[a,c.treeId,b]),!0},onZTreeContextmenu:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeRightClick,[c.treeId,b],!0)&&tools.apply(c.callback.onRightClick,[a,c.treeId,b]),"function"!=typeof c.callback.onRightClick}},tools={apply:function(a,b,c){return"function"==typeof a?a.apply(zt,b?b:[]):c},canAsync:function(a,b){var c=a.data.key.children;return a.async.enable&&b&&b.isParent&&!(b.zAsync||b[c]&&b[c].length>0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d<e;d++)if(tools.eqs(b.tagName,c[d].tagName)&&null!==b.getAttribute(c[d].attrName))return b;b=b.parentNode}return null},getNodeMainDom:function(a){return $(a).parent("li").get(0)||$(a).parentsUntil("li").parent().get(0)},isChildOrSelf:function(a,b){return $(a).closest("#"+b).length>0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i<j;i++){var k=c[i];if(e){var l=d?d:data.getRoot(a),m=l[h],n=m.length==c.length&&0==i,o=i==c.length-1;data.initNode(a,b,k,d,n,o,f),data.addNodeCache(a,k)}var p=[];k[h]&&k[h].length>0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i<l;i++){var pKey=setting.async.autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i<l;i+=2)tmpParam[setting.async.otherParam[i]]=setting.async.otherParam[i+1];else for(var p in setting.async.otherParam)tmpParam[p]=setting.async.otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:tmpParam,dataType:setting.async.dataType,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(err){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(a,b,c){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,a,b,c]))}}),!0},cancelPreSelectedNode:function(a,b,c){var d,e,f=data.getRoot(a).curSelectedList;for(d=f.length-1;d>=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k<l;k++)h[k]&&view.expandCollapseSonNode(a,h[k],c,i);data.getRoot(a).expandTriggerFlag=j,view.expandCollapseNode(a,b,c,d,e)},isSelectedNode:function(a,b){if(!b)return!1;var c,d=data.getRoot(a).curSelectedList;for(c=d.length-1;c>=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push("<span id='",c.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(b,c),"' style='",view.makeNodeIcoStyle(b,c),"'></span><span id='",c.tId,consts.id.SPAN,"'>",e,"</span>")},makeDOMNodeLine:function(a,b,c){a.push("<span id='",c.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(b,c),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(a,b,c){a.push("</li>")},makeDOMNodeMainBefore:function(a,b,c){a.push("<li id='",c.tId,"' class='",consts.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(a,b,c){a.push("</a>")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("<a id='",c.tId,consts.id.A,"' class='",consts.className.LEVEL,c.level,"' treeNode",consts.id.A,' onclick="',c.click||"",'" ',null!=e&&e.length>0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("<ul id='",b.tId,consts.id.UL,"' class='",consts.className.LEVEL,b.level," ",view.makeUlLineClass(a,b),"' style='display:",b.open?"block":"none","'>"),c.push(d),c.push("</ul>")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e<f;e++)data.removeNodeCache(a,d[e]);if(data.removeSelectedNode(a),delete b[c],a.data.keep.parent)$$(b,consts.id.UL,a).empty();else{b.isParent=!1,b.open=!1;var g=$$(b,consts.id.SWITCH,a),h=$$(b,consts.id.ICON,a);view.replaceSwitchClass(b,g,consts.folder.DOCU),view.replaceIcoClass(b,h,consts.folder.DOCU),$$(b,consts.id.UL,a).remove()}}}},setFirstNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f<g;f++)if(e[d][f].tId==b.tId){e[d].splice(f,1);break}view.setFirstNode(a,e),view.setLastNode(a,e);var h,i,j,k=e[d].length;if(a.data.keep.parent||0!=k){if(a.view.showLine&&k>0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e<f;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=data.getRoot(d).curSelectedList,c=0,e=b.length;c<e;c++)a.push(b[c]);return a},isSelectedNode:function(a){return data.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var e=!a;if(e&&(a=data.getRoot(d)),"refresh"==b){for(var f=this.setting.data.key.children,g=0,h=a[f]?a[f].length:0;g<h;g++)data.removeNodeCache(d,a[f][g]);if(data.removeSelectedNode(d),a[f]=[],e)this.setting.treeObj.empty();else{var i=$$(a,consts.id.UL,d);i.empty()}}view.asyncNode(this.setting,e?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=data.getRoot(d),b=a[d.data.key.children];data.initRoot(d),a[d.data.key.children]=b,data.initCache(d),view.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=d.data.key.children,c=a[b];return view.removeChildNodes(d,a),c?c:null},removeNode:function(a,b){a&&(b=!!b,b&&0==tools.apply(d.callback.beforeRemove,[d.treeId,a],!0)||(view.removeNode(d,a),b&&this.setting.treeObj.trigger(consts.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&tools.uCanDo(d)){if(b=d.view.selectedMulti&&b,a.parentTId)view.expandCollapseParentNode(d,a.getParentNode(),!0,!1,function(){try{$$(a,d).focus().blur()}catch(b){}});else try{$$(a,d).focus().blur()}catch(c){}view.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return data.transformTozTreeFormat(d,a)},transformToArray:function(a){return data.transformToArrayFormat(d,a)},updateNode:function(a,b){if(a){var c=$$(a,d);c.get(0)&&tools.uCanDo(d)&&(view.setNodeName(d,a),view.setNodeTarget(d,a),view.setNodeUrl(d,a),view.setNodeLineIcos(d,a),view.setNodeFontCss(d,a))}}};return e.treeTools=g,data.setZTreeTools(d,g),e[f]&&e[f].length>0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push("<span ID='",b.tId,t.id.CHECK,"' class='",u.makeChkClass(a,b),"' treeNode",t.id.CHECK,b.nocheck===!0?" style='display:none;'":"","></span>"))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c<d;c++)v.getNodeCache(a,b[c].tId)||(b.splice(c,1),c--,d--);return b},getCheckStatus:function(a,b){if(!a.check.enable||b.nocheck||b.chkDisabled)return null;var c=a.data.key.checked,d={checked:b[c],half:b.halfCheck?b.halfCheck:a.check.chkStyle==t.radio.STYLE?2===b.check_Child_State:b[c]?b.check_Child_State>-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h<i&&(b[h].nocheck===!0||b[h].chkDisabled===!0||b[h][f]!=c||(d.push(b[h]),!g))&&(v.getTreeCheckedNodes(a,b[h][e],c,d),!(g&&d.length>0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f<g;f++)b[f].nocheck!==!0&&b[f].chkDisabled!==!0&&b[f][e]!=b[f].checkedOld&&c.push(b[f]),v.getTreeChangeCheckedNodes(a,b[f][d],c);return c},makeChkFlag:function(a,b){if(b){var c=a.data.key.children,d=a.data.key.checked,e=-1;if(b[c])for(var f=0,g=b[c].length;f<g;f++){var h=b[c][f],i=-1;if(a.check.chkStyle==t.radio.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?2:h[d]?2:h.check_Child_State>0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d<e;d++)c=j[f][d],c[g]&&c!=b&&(c[g]=!1,u.setChkClass(a,w(c,t.id.CHECK,a),c))}else if(a.check.radioType==h.TYPE_ALL)for(d=0,e=i.length;d<e;d++)if(b==i[d]){i.splice(d,1);break}}else b[g]&&(!b[f]||0==b[f].length||a.check.chkboxType.Y.indexOf("s")>-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f="";f=b.chkDisabled===!0?d.DISABLED:b.halfCheck?d.PART:a.check.chkStyle==e.STYLE?b.check_Child_State<1?d.FULL:d.PART:b[c]?2===b.check_Child_State||b.check_Child_State===-1?d.FULL:d.PART:b.check_Child_State<1?d.FULL:d.PART;var g=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+f;return g=b.check_Focus&&b.chkDisabled!==!0?g+"_"+d.FOCUS:g,t.className.BUTTON+" "+d.DEFAULT+" "+g},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f<g;f++){var h=e[d][f];h.nocheck!==!0&&h.chkDisabled!==!0&&(h[c]=b),u.setSonNodeCheckBox(a,h,b)}},repairChkClass:function(a,b){if(b&&(v.makeChkFlag(a,b),b.nocheck!==!0)){var c=w(b,t.id.CHECK,a);u.setChkClass(a,c,b)}},repairParentChkClass:function(a,b){if(b&&b.parentTId){var c=b.getParentNode();u.repairChkClass(a,c),u.repairParentChkClass(a,c)}},repairParentChkClassWithSelf:function(a,b){if(b){var c=a.data.key.children;b[c]&&b[c].length>0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f<g;f++){var h=b[e][f];u.repairSonChkDisabled(a,h,c,d)}}},repairParentChkDisabled:function(a,b,c,d){b&&(b.chkDisabled!=c&&d&&(b.chkDisabled=c),u.repairChkClass(a,b),u.repairParentChkDisabled(a,b.getParentNode(),c,d))},setChkClass:function(a,b,c){b&&(c.nocheck===!0?b.hide():b.show(),b.attr("class",u.makeChkClass(a,c)))},setParentNodeCheckBox:function(a,b,c,d){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);if(d||(d=b),v.makeChkFlag(a,b),b.nocheck!==!0&&b.chkDisabled!==!0&&(b[f]=c,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b])),b.parentTId){var h=!0;if(!c)for(var i=b.getParentNode()[e],j=0,k=i.length;j<k;j++)if(i[j].nocheck!==!0&&i[j].chkDisabled!==!0&&i[j][f]||(i[j].nocheck===!0||i[j].chkDisabled===!0)&&i[j].check_Child_State>0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i<j&&b.chkDisabled!==!0;i++){var k=b[e][i];u.setSonNodeCheckBox(a,k,c,d),k.chkDisabled===!0&&(h=!0)}b!=v.getRoot(a)&&b.chkDisabled!==!0&&(h&&b.nocheck!==!0&&v.makeChkFlag(a,b),b.nocheck!==!0&&b.chkDisabled!==!0?(b[f]=c,h||(b.check_Child_State=b[e]&&b[e].length>0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-icon-change-button",iconClass:"",iconWidth:null,iconHeight:null,stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.IconChangeButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconClass,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconClass!==a&&(this.element.removeClass(b.iconClass).addClass(a),b.iconClass=a)}}),BI.IconChangeButton.EVENT_CHANGE="IconChangeButton.EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments); -return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})},_init:function(){BI.HalfIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.HalfIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfIconButton.EVENT_CHANGE)}}),BI.HalfIconButton.EVENT_CHANGE="HalfIconButton.EVENT_CHANGE",BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})},_init:function(){BI.TriggerIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.TriggerIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE,this)}}),BI.TriggerIconButton.EVENT_CHANGE="TriggerIconButton.EVENT_CHANGE",BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:25,logic:{dynamic:!1}})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MultiSelectItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconClass:"",hgap:10,height:25})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconClass,once:b.once,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem),BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:25,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.single_select_item",BI.SingleSelectItem),BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item bi-list-item-active",logic:{dynamic:!1},hgap:10,height:25})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(!a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected())},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){var a=this,b=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_tree_group_node_checkbox",iconWidth:13,iconHeight:13}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setValue:function(a){this.text.setValue(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.FirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_group_node_checkbox",width:23,stopPropagation:!0});var c=BI.createWidget({type:"bi.center_adapt",cls:b.iconCls,width:23,items:[{type:"bi.icon",height:b.iconHeight,width:b.iconWidth}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},{width:23,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MidPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-icon-arrow-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.MultiLayerIconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.PlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.PlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.TriangleGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TriangleGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-triangle-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.TriangleGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({iconWidth:13,iconHeight:13,type:"bi.tree_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.TriangleGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setOpened:function(a){BI.TriangleGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)},setText:function(a){BI.TriangleGroupNode.superclass.setText.apply(this,arguments),this.text.setText(a)}}),BI.shortcut("bi.triangle_group_node",BI.TriangleGroupNode),BI.FirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.FirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),BI.IconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},height:25,iconWidth:16,iconHeight:16,iconCls:""})},_init:function(){BI.IconTreeLeafItem.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:23,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:23,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),BI.LastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.LastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),BI.MidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.MidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),BI.MultiLayerIconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-icon-tree-leaf-item bi-list-item-active",layer:0,height:25,iconCls:"",iconHeight:14,iconWidth:12})},_init:function(){BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),BI.TreeTextLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tree-text-leaf-item bi-list-item-active",id:"",pId:"",height:25,hgap:0,lgap:0,rgap:0})},_init:function(){BI.TreeTextLeafItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.py}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text}]})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.tree_text_leaf_item",BI.TreeTextLeafItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:7,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=new Date,g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=Date._MD.slice(0);i[1]=Date.isLeap(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay(),e.PDay=i[0===b?11:b-1]-e.FDay+1,e.NDay=1;var j=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a<e.FDay?(c.lastMonth=!0,b=a+e.PDay,1===f&&(d-=1),f=1===f?12:f-1):a>=e.FDay&&a<e.FDay+i[e.ymd[1]]?(b=a-e.FDay+1,a-e.FDay+1===e.ymd[2]&&(c.currentDay=!0)):(c.nextMonth=!0,b=e.NDay++,12===f&&(d+=1),f=12===f?1:f+1),Date.checkVoid(d,f,b,g,h)[0]&&(c.disabled=!0),c.text=b,j.push(c)}),j},_init:function(){BI.Calendar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=BI.map(Date._SDN.slice(0,7),function(a,b){return{type:"bi.label",height:25,text:b}}),d=BI.createWidget({type:"bi.button_group",height:25,items:c}),e=this._dateCreator(b.year,b.month,b.day);c=[],c.push(e.slice(0,7)),c.push(e.slice(7,14)),c.push(e.slice(14,21)),c.push(e.slice(21,28)),c.push(e.slice(28,35)),c.push(e.slice(35,42)),c=BI.map(c,function(a,c){return BI.map(c,function(a,c){return BI.extend(c,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:25,value:b.year+"-"+b.month+"-"+c.text,disabled:c.lastMonth||c.nextMonth||c.disabled})})}),this.days=BI.createWidget({type:"bi.button_group",items:BI.createItems(c,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:7,rows:6,columnSize:[1/7,1/7,1/7,1/7,1/7,1/7,1/7],rowSize:25}))]}),this.days.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",d,this.days)}))))},isFrontDate:function(){var a=this.options,b=(this._const,a.year),c=a.month,d=new Date,e=d.getDay();b=0|b,d.setFullYear(b,c,1);var f=d.getOffsetDate(-1*(e+1));return!!Date.checkVoid(f.getFullYear(),f.getMonth(),f.getDate(),a.min,a.max)[0]},isFinalDate:function(){var a=this.options,b=(this._const,a.year),c=a.month,d=new Date,e=d.getDay();b=0|b,d.setFullYear(b,c,1);var f=d.getOffsetDate(42-e);return!!Date.checkVoid(f.getFullYear(),f.getMonth(),f.getDate(),a.min,a.max)[0]},setValue:function(a){this.days.setValue([a.year+"-"+a.month+"-"+a.day])},getValue:function(){var a=this.days.getValue()[0].match(/\d+/g);return{year:0|a[0],month:0|a[1],day:0|a[2]}}}),BI.extend(BI.Calendar,{getPageByDateJSON:function(a){var b=(new Date).getFullYear(),c=(new Date).getMonth(),d=12*(a.year-b);return d+=a.month-c},getDateJSONByPage:function(a){var b=(new Date).getMonth(),c=a;c+=b;var d=BI.parseInt(c/12);c<0&&c%12!==0&&d--;var e=c>=0?c%12:(12+c%12)%12;return{year:(new Date).getFullYear()+d,month:e}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[];return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){ -var e={};Date.checkVoid(c+a,1,1,b.min,b.max)[0]&&(e.disabled=!0),e.text=c+a,d.push(e)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=(new Date).getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:23,width:38,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!Date.checkVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!Date.checkVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=(new Date).getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL},getPageByYear:function(a){var b=(new Date).getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),BI.ComplexCanvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-complex-canvas"})},_init:function(){BI.ComplexCanvas.superclass._init.apply(this,arguments);var a=this.options;this.canvas=BI.createWidget({type:"bi.canvas",element:this,width:a.width,height:a.height})},branch:function(a,b,c,d,e,f){var g=this,h=[].slice.call(arguments);if(h.length<=5)return this.canvas.line.apply(this.canvas,arguments);var i;BI.isOdd(h.length)&&(i=BI.last(h),h=BI.initial(h)),h=[].slice.call(h,2);var j=BI.filter(h,function(a){return a%2===0}),k=BI.filter(h,function(a){return a%2!==0});i||(i={});var l=i.offset||20;if(b>d&&b>f||b<d&&b<f){if(b>d&&b>f)var m=Math.max.apply(this,k)+l;else var m=Math.min.apply(this,k)-l;var n=Math.min.apply(this,j),o=BI.indexOf(j,n),p=Math.max.apply(this,j),q=BI.indexOf(j,p);return this.canvas.line(n,k[o],n,m,p,m,p,k[q],i),BI.each(j,function(a,b){a!==q&&a!==o&&g.canvas.line(b,k[a],b,m,i)}),void this.canvas.line(a,m,a,b,i)}if(a>c&&a>e||a<c&&a<e){if(a>c&&a>e)var r=Math.max.apply(this,j)+l;else var r=Math.min.apply(this,j)-l;var s=Math.min.apply(this,k),t=BI.indexOf(k,s),u=Math.max.apply(this,k),v=BI.indexOf(k,u);return this.canvas.line(j[t],s,r,s,r,u,j[v],u,i),BI.each(k,function(a,b){a!==t&&a!==v&&g.canvas.line(j[a],b,r,b,i)}),void this.canvas.line(r,b,a,b,i)}},stroke:function(a){this.canvas.stroke(a)}}),BI.shortcut("bi.complex_canvas",BI.ComplexCanvas),BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-tree-group-node",iconWidth:13,iconHeight:13})},_init:function(){BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"):this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font")}}),BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font",iconWidth:13,iconHeight:13})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:25,iconHeight:25})},_init:function(){BI.FirstTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:25,iconHeight:25})},_init:function(){BI.LastTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:25,iconHeight:25})},_init:function(){BI.MidTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),BI.TreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-node-triangle-collapse-font",iconWidth:13,iconHeight:13})},_init:function(){BI.TreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"):this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font")}}),BI.shortcut("bi.tree_group_node_checkbox",BI.TreeGroupNodeCheckbox),BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:25,iconHeight:25})},_init:function(){BI.TreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox);try{!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Clipboard=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b){for(;a&&a.nodeType!==e;){if(a.matches(b))return a;a=a.parentNode}}var e=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var f=Element.prototype;f.matches=f.matchesSelector||f.mozMatchesSelector||f.msMatchesSelector||f.oMatchesSelector||f.webkitMatchesSelector}b.exports=d},{}],2:[function(a,b,c){function d(a,b,c,d,f){var g=e.apply(this,arguments);return a.addEventListener(c,g,f),{destroy:function(){a.removeEventListener(c,g,f)}}}function e(a,b,c,d){return function(c){c.delegateTarget=f(c.target,b),c.delegateTarget&&d.call(a,c)}}var f=a("./closest");b.exports=d},{"./closest":1}],3:[function(a,b,c){c.node=function(a){return void 0!==a&&a instanceof HTMLElement&&1===a.nodeType},c.nodeList=function(a){var b=Object.prototype.toString.call(a);return void 0!==a&&("[object NodeList]"===b||"[object HTMLCollection]"===b)&&"length"in a&&(0===a.length||c.node(a[0]))},c.string=function(a){return"string"==typeof a||a instanceof String},c.fn=function(a){var b=Object.prototype.toString.call(a);return"[object Function]"===b}},{}],4:[function(a,b,c){function d(a,b,c){if(!a&&!b&&!c)throw new Error("Missing required arguments");if(!h.string(b))throw new TypeError("Second argument must be a String");if(!h.fn(c))throw new TypeError("Third argument must be a Function");if(h.node(a))return e(a,b,c);if(h.nodeList(a))return f(a,b,c);if(h.string(a))return g(a,b,c);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function e(a,b,c){return a.addEventListener(b,c),{destroy:function(){a.removeEventListener(b,c)}}}function f(a,b,c){return Array.prototype.forEach.call(a,function(a){a.addEventListener(b,c)}),{destroy:function(){Array.prototype.forEach.call(a,function(a){a.removeEventListener(b,c)})}}}function g(a,b,c){return i(document.body,a,b,c)}var h=a("./is"),i=a("delegate");b.exports=d},{"./is":3,delegate:2}],5:[function(a,b,c){function d(a){var b;if("SELECT"===a.nodeName)a.focus(),b=a.value;else if("INPUT"===a.nodeName||"TEXTAREA"===a.nodeName){var c=a.hasAttribute("readonly");c||a.setAttribute("readonly",""),a.select(),a.setSelectionRange(0,a.value.length),c||a.removeAttribute("readonly"),b=a.value}else{a.hasAttribute("contenteditable")&&a.focus();var d=window.getSelection(),e=document.createRange();e.selectNodeContents(a),d.removeAllRanges(),d.addRange(e),b=d.toString()}return b}b.exports=d},{}],6:[function(a,b,c){function d(){}d.prototype={on:function(a,b,c){var d=this.e||(this.e={});return(d[a]||(d[a]=[])).push({fn:b,ctx:c}),this},once:function(a,b,c){function d(){e.off(a,d),b.apply(c,arguments)}var e=this;return d._=b,this.on(a,d,c)},emit:function(a){var b=[].slice.call(arguments,1),c=((this.e||(this.e={}))[a]||[]).slice(),d=0,e=c.length;for(d;d<e;d++)c[d].fn.apply(c[d].ctx,b);return this},off:function(a,b){var c=this.e||(this.e={}),d=c[a],e=[];if(d&&b)for(var f=0,g=d.length;f<g;f++)d[f].fn!==b&&d[f].fn._!==b&&e.push(d[f]);return e.length?c[a]=e:delete c[a],this}},b.exports=d},{}],7:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","select"],f);else if("undefined"!=typeof d)f(c,b("select"));else{var g={exports:{}};f(g,e.select),e.clipboardAction=g.exports}}(this,function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=c(b),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(){function a(b){d(this,a),this.resolveOptions(b),this.initSelection()}return g(a,[{key:"resolveOptions",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=a.action,this.emitter=a.emitter,this.target=a.target,this.text=a.text,this.trigger=a.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var a=this,b="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return a.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[b?"right":"left"]="-9999px";var c=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=c+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,e["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,e["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var a=void 0;try{a=document.execCommand(this.action)}catch(b){a=!1}this.handleResult(a)}},{key:"handleResult",value:function(a){this.emitter.emit(a?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=a,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==("undefined"==typeof a?"undefined":f(a))||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}]),a}();a.exports=h})},{select:5}],8:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","./clipboard-action","tiny-emitter","good-listener"],f);else if("undefined"!=typeof d)f(c,b("./clipboard-action"),b("tiny-emitter"),b("good-listener"));else{var g={exports:{}};f(g,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=g.exports}}(this,function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c="data-clipboard-"+a;if(b.hasAttribute(c))return b.getAttribute(c)}var j=e(b),k=e(c),l=e(d),m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return d.resolveOptions(c),d.listenClick(a),d}return h(b,a),m(b,[{key:"resolveOptions",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof a.action?a.action:this.defaultAction,this.target="function"==typeof a.target?a.target:this.defaultTarget,this.text="function"==typeof a.text?a.text:this.defaultText}},{key:"listenClick",value:function(a){var b=this;this.listener=(0,l["default"])(a,"click",function(a){return b.onClick(a)})}},{key:"onClick",value:function(a){var b=a.delegateTarget||a.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new j["default"]({action:this.action(b),target:this.target(b),text:this.text(b),trigger:b,emitter:this})}},{key:"defaultAction",value:function(a){return i("action",a)}},{key:"defaultTarget",value:function(a){var b=i("target",a);if(b)return document.querySelector(b)}},{key:"defaultText",value:function(a){return i("text",a)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],b="string"==typeof a?[a]:a,c=!!document.queryCommandSupported;return b.forEach(function(a){c=c&&!!document.queryCommandSupported(a)}),c}}]),b}(k["default"]);a.exports=n})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)})}catch(e){!function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var c=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof c.copy||a.isFunction(c.copy))){ZeroClipboard.setMoviePath(c.path);var d=new ZeroClipboard.Client;a.isFunction(c.copy)&&b.bind("zClip_copy",c.copy),a.isFunction(c.beforeCopy)&&b.bind("zClip_beforeCopy",c.beforeCopy),a.isFunction(c.afterCopy)&&b.bind("zClip_afterCopy",c.afterCopy),d.setHandCursor(c.setHandCursor),d.setCSSEffects(c.setCSSEffects),d.addEventListener("mouseOver",function(a){b.trigger("mouseenter")}),d.addEventListener("mouseOut",function(a){b.trigger("mouseleave")}),d.addEventListener("mouseDown",function(e){b.trigger("mousedown"),a.isFunction(c.copy)?d.setText(b.triggerHandler("zClip_copy")):d.setText(c.copy),a.isFunction(c.beforeCopy)&&b.trigger("zClip_beforeCopy")}),d.addEventListener("complete",function(d,e){a.isFunction(c.afterCopy)?b.trigger("zClip_afterCopy"):(e.length>500&&(e=e.substr(0,500)+"...\n\n("+(e.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+e)),c.clickAfter&&b.trigger("click")}),d.glue(b[0],b.parent()[0]),a(window).bind("load resize",function(){d.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),e=a("#"+d+".zclip");"remove"==b?(e.remove(),c.removeClass("active hover")):"hide"==b?(e.hide(),c.removeClass("active hover")):"show"==b&&e.show()})}}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a),this.className+=" "+a},a.removeClass=function(a){for(var b=this.className.split(/\s+/),c=-1,d=0;d<b.length;d++)b[d]==a&&(c=d,d=b.length);return c>-1&&(b.splice(c,1),this.className=b.join(" ")),this},a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}),a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){var d=this.clients[a];d&&d.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var c={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};return a&&a!=b&&(c.left+=a.offsetLeft,c.top+=a.offsetTop),c},Client:function(a){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,c){this.domElement=ZeroClipboard.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1),"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var e=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div"),this.div.className="zclip",this.div.id="zclip-"+this.movieId,$(this.domElement).data("zclipId","zclip-"+this.movieId);var f=this.div.style;if(f.position="absolute",f.left=""+e.left+"px",f.top=""+e.top+"px",f.width=""+e.width+"px",f.height=""+e.height+"px",f.zIndex=d,"object"==typeof c)for(addedStyle in c)f[addedStyle]=c[addedStyle];b.appendChild(this.div),this.div.innerHTML=this.getHTML(e.width,e.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>'}else c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null,this.div=null}},reposition:function(a){if(a&&(this.domElement=ZeroClipboard.$(a),this.domElement||this.hide()),this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement),c=this.div.style;c.left=""+b.left+"px",c.top=""+b.top+"px"}},setText:function(a){this.clipText=a,this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=[]),this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a,this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){switch(a=a.toString().toLowerCase().replace(/^on/,"")){case"load":if(this.movie=document.getElementById(this.movieId),!this.movie){var c=this;return void setTimeout(function(){c.receiveEvent("load",null)},1)}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;return setTimeout(function(){c.receiveEvent("load",null)},100),void(this.ready=!0)}this.ready=!0;try{this.movie.setText(this.clipText)}catch(d){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(d){}break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var e=0,f=this.handlers[a].length;e<f;e++){var g=this.handlers[a][e];"function"==typeof g?g(this,b):"object"==typeof g&&2==g.length?g[0][g[1]](this,b):"string"==typeof g&&window[g](this,b)}}}}BI.ClipBoard=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-clipboard",copy:BI.emptyFn,afterCopy:BI.emptyFn})},_init:function(){BI.ClipBoard.superclass._init.apply(this,arguments)},mounted:function(){var a=this.options;window.Clipboard?(this.clipboard=new Clipboard(this.element[0],{text:function(){return BI.isFunction(a.copy)?a.copy():a.copy}}),this.clipboard.on("success",a.afterCopy)):this.element.zclip({path:BI.resourceURL+"/ZeroClipboard.swf",copy:a.copy,beforeCopy:a.beforeCopy,afterCopy:a.afterCopy})},destroyed:function(){this.clipboard&&this.clipboard.destroy()}}),BI.shortcut("bi.clipboard",BI.ClipBoard),BI.CustomColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-color-chooser",width:227,height:245})},_init:function(){BI.CustomColorChooser.superclass._init.apply(this,arguments);var a=this;this.editor=BI.createWidget({type:"bi.color_picker_editor",width:195}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.setValue(this.getValue())}),BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.absolute",items:[{el:this.editor,left:15,top:10,right:15}],height:30},{type:"bi.absolute",items:[{el:this.farbtastic,left:15,right:15,top:10}],height:215}]})},setValue:function(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="CustomColorChooser.EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",el:{}})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.color_chooser_trigger",width:b.width,height:b.height},b.el)),this.colorPicker=BI.createWidget({type:"bi.color_chooser_popup"}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:1,el:this.trigger,popup:{el:this.colorPicker,stopPropagation:!1,minWidth:202}});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b);var c=BI.string2Array(BI.Cache.getItem("colors")||""),d=new BI.Queue(8);d.fromArray(c),d.remove(b),d.unshift(b),BI.Cache.setItem("colors",BI.array2String(d.toArray()))};this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){c()}),this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){c(),a.combo.hideView()}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors")||""))}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.colorPicker.getValue()}}),BI.ColorChooser.EVENT_CHANGE="ColorChooser.EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser-popup",height:145})},_init:function(){BI.ColorChooserPopup.superclass._init.apply(this,arguments);var a=this;this.options;this.colorEditor=BI.createWidget({type:"bi.color_picker_editor"}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,arguments)}),this.storeColors=BI.createWidget({type:"bi.color_picker",items:[[{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0}]],width:190,height:25}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:190,height:50}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser"});var b=BI.createWidget({type:"bi.popup_panel",buttons:[BI.i18nText("BI-Basic_Cancel"),BI.i18nText("BI-Basic_Save")],title:BI.i18nText("BI-Custom_Color"),el:this.customColorChooser,stopPropagation:!1,bgap:-1,rgap:1,lgap:1,minWidth:227});this.more=BI.createWidget({type:"bi.combo",direction:"right,top",isNeedAdjustHeight:!1,el:{type:"bi.text_item",cls:"color-chooser-popup-more bi-list-item",textAlign:"center",height:20,text:BI.i18nText("BI-Basic_More")+"..."},popup:b}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),b.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a.more.hideView(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:{type:"bi.absolute",cls:"bi-background bi-border-bottom",items:[{el:this.colorEditor,left:0,right:0,top:5}]},height:30},{el:{type:"bi.absolute",items:[{el:this.storeColors,left:5,right:5,top:5}]},height:30},{el:{type:"bi.absolute",items:[{el:this.colorPicker,left:5,right:5,top:5}]},height:65},{el:this.more,height:20}]})},setStoreColors:function(a){if(BI.isArray(a)){var b=BI.map(a,function(a,b){return{value:b}});BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),this.storeColors.populate([b])}},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},getValue:function(){return this.colorEditor.getValue()}}),BI.ColorChooserPopup.EVENT_VALUE_CHANGE="ColorChooserPopup.EVENT_VALUE_CHANGE",BI.ColorChooserPopup.EVENT_CHANGE="ColorChooserPopup.EVENT_CHANGE",BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger",height:30})},_init:function(){BI.ColorChooserTrigger.superclass._init.apply(this,arguments),this.colorContainer=BI.createWidget({type:"bi.layout", -cls:"bi-card color-chooser-trigger-content"});var a=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:a,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="ColorChooserTrigger.EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="ColorPickerButton.EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),BI.ColorPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker",items:null})},_items:[[{value:"#ffffff"},{value:"#f2f2f2"},{value:"#e5e5e5"},{value:"#d9d9d9"},{value:"#cccccc"},{value:"#bfbfbf"},{value:"#b2b2b2"},{value:"#a6a6a6"},{value:"#999999"},{value:"#8c8c8c"},{value:"#808080"},{value:"#737373"},{value:"#666666"},{value:"#4d4d4d"},{value:"#333333"},{value:"#000000"}],[{value:"#d8b5a6"},{value:"#ff9e9a"},{value:"#ffc17d"},{value:"#f5e56b"},{value:"#d8e698"},{value:"#e0ebaf"},{value:"#c3d825"},{value:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{value:"#a0d8ef"},{value:"#89c3eb"},{value:"#bbc8e6"},{value:"#bbbcde"},{value:"#d6b4cc"},{value:"#fbc0d3"}],[{value:"#bb9581"},{value:"#f37d79"},{value:"#fba74f"},{value:"#ffdb4f"},{value:"#c7dc68"},{value:"#b0ca71"},{value:"#99ab4e"},{value:"#84b9cb"},{value:"#00a3af"},{value:"#2ca9e1"},{value:"#0095d9"},{value:"#4c6cb3"},{value:"#8491c3"},{value:"#a59aca"},{value:"#cc7eb1"},{value:"#e89bb4"}],[{value:"#9d775f"},{value:"#dd4b4b"},{value:"#ef8b07"},{value:"#fcc800"},{value:"#aacf53"},{value:"#82ae46"},{value:"#69821b"},{value:"#59b9c6"},{value:"#2a83a2"},{value:"#007bbb"},{value:"#19448e"},{value:"#274a78"},{value:"#4a488e"},{value:"#7058a3"},{value:"#884898"},{value:"#d47596"}]],_init:function(){BI.ColorPicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}]}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="ColorPicker.EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),BI.ColorPickerEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",width:200,height:20})},_init:function(){BI.ColorPickerEditor.superclass._init.apply(this,arguments);var a=this;this.options;this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card",height:20});var b=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:10,height:20})),c=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},d=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:c,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:32,height:20});BI.each(d,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=d[0],this.G=d[1],this.B=d[2],this.none=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("transparent")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.colorShow,width:"fill"},{el:b[0],lgap:10,width:16},{el:this.R,width:32},{el:b[1],lgap:10,width:16},{el:this.G,width:32},{el:b[2],lgap:10,width:16},{el:this.B,width:32},{el:{type:"bi.center_adapt",items:[this.none]},width:18},{el:{type:"bi.center_adapt",items:[this.transparent]},width:18}]})},setValue:function(a){if("transparent"===a)return this.transparent.setSelected(!0),this.none.setSelected(!1),this.R.setValue(""),this.G.setValue(""),void this.B.setValue("");a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this.colorShow.element.css("background-color",a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.b)},getValue:function(){return this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.ColorPickerEditor.EVENT_CHANGE="ColorPickerEditor.EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor),BI.Farbtastic=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-farbtastic",width:195,height:195})},_init:function(){BI.Farbtastic.superclass._init.apply(this,arguments)},mounted:function(){var a=this;this.farbtastic=$.farbtastic(this.element,function(b){a.fireEvent(BI.Farbtastic.EVENT_CHANGE,a.getValue(),a)})},setValue:function(a){this.farbtastic.setColor(a)},getValue:function(){return this.farbtastic.color}}),BI.Farbtastic.EVENT_CHANGE="Farbtastic.EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),jQuery.fn.farbtastic=function(a){return $.farbtastic(this,a),this},jQuery.farbtastic=function(a,b){var a=$(a).get(0);return a.farbtastic||(a.farbtastic=new jQuery._farbtastic(a,b))},jQuery._farbtastic=function(a,b){var c=this;$(a).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var d=$(".farbtastic",a);c.wheel=$(".wheel",a).get(0),c.radius=84,c.square=100,c.width=194,navigator.appVersion.match(/MSIE [0-6]\./)&&$("*",d).each(function(){if("none"!=this.currentStyle.backgroundImage){var a=this.currentStyle.backgroundImage;a=this.currentStyle.backgroundImage.substring(5,a.length-2),$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"})}}),c.linkTo=function(a){return"object"==typeof c.callback&&$(c.callback).unbind("keyup",c.updateValue),c.color=null,"function"==typeof a?c.callback=a:"object"!=typeof a&&"string"!=typeof a||(c.callback=$(a),c.callback.bind("keyup",c.updateValue),c.callback.get(0).value&&c.setColor(c.callback.get(0).value)),this},c.updateValue=function(a){this.value&&this.value!=c.color&&c.setColor(this.value)},c.setColor=function(a){var b=c.unpack(a);return c.color!=a&&b&&(c.color=a,c.rgb=b,c.hsl=c.RGBToHSL(c.rgb),c.updateDisplay()),this},c.setHSL=function(a){return c.hsl=a,c.rgb=c.HSLToRGB(a),c.color=c.pack(c.rgb),c.updateDisplay(),this},c.widgetCoords=function(a){var b,d,e=a.target||a.srcElement,f=c.wheel;if("undefined"!=typeof a.offsetX){for(var g={x:a.offsetX,y:a.offsetY},h=e;h;)h.mouseX=g.x,h.mouseY=g.y,g.x+=h.offsetLeft,g.y+=h.offsetTop,h=h.offsetParent;for(var h=f,i={x:0,y:0};h;){if("undefined"!=typeof h.mouseX){b=h.mouseX-i.x,d=h.mouseY-i.y;break}i.x+=h.offsetLeft,i.y+=h.offsetTop,h=h.offsetParent}for(h=e;h;)h.mouseX=void 0,h.mouseY=void 0,h=h.offsetParent}else{var g=c.absolutePosition(f);b=(a.pageX||0*(a.clientX+$("html").get(0).scrollLeft))-g.x,d=(a.pageY||0*(a.clientY+$("html").get(0).scrollTop))-g.y}return{x:b-c.width/2,y:d-c.width/2}},c.mousedown=function(a){document.dragging||($(document).bind("mousemove",c.mousemove).bind("mouseup",c.mouseup),document.dragging=!0);var b=c.widgetCoords(a);return c.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>c.square,c.mousemove(a),!1},c.mousemove=function(a){var b=c.widgetCoords(a);if(c.circleDrag){var d=Math.atan2(b.x,-b.y)/6.28;d<0&&(d+=1),c.setHSL([d,c.hsl[1],c.hsl[2]])}else{var e=Math.max(0,Math.min(1,-(b.x/c.square)+.5)),f=Math.max(0,Math.min(1,-(b.y/c.square)+.5));c.setHSL([c.hsl[0],e,f])}return!1},c.mouseup=function(){$(document).unbind("mousemove",c.mousemove),$(document).unbind("mouseup",c.mouseup),document.dragging=!1},c.updateDisplay=function(){var a=6.28*c.hsl[0];$(".h-marker",d).css({left:Math.round(Math.sin(a)*c.radius+c.width/2)+"px",top:Math.round(-Math.cos(a)*c.radius+c.width/2)+"px"}),$(".sl-marker",d).css({left:Math.round(c.square*(.5-c.hsl[1])+c.width/2)+"px",top:Math.round(c.square*(.5-c.hsl[2])+c.width/2)+"px"}),$(".color",d).css("backgroundColor",c.pack(c.HSLToRGB([c.hsl[0],1,.5]))),"object"==typeof c.callback?($(c.callback).css({backgroundColor:c.color,color:c.hsl[2]>.5?"#000":"#fff"}),$(c.callback).each(function(){this.value&&this.value!=c.color&&(this.value=c.color)})):"function"==typeof c.callback&&c.callback.call(c,c.color)},c.absolutePosition=function(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var d=c.absolutePosition(a.offsetParent);b.x+=d.x,b.y+=d.y}return b},c.pack=function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},c.unpack=function(a){return 7==a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4==a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},c.HSLToRGB=function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this.hueToRGB(b,c,d+.33333),this.hueToRGB(b,c,d),this.hueToRGB(b,c,d-.33333)]},c.hueToRGB=function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},c.RGBToHSL=function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},$("*",d).mousedown(c.mousedown),c.setColor("#000000"),b&&c.linkTo(b)},BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a+" bi-high-light-border"}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.dir){case"left,top":case"left,bottom":this._createLeftTriangle(),this.combo.getView().showLine("right");break;case"right,top":case"right,bottom":this._createRightTriangle(),this.combo.getView().showLine("left");break;case"top,left":case"top,right":this._createTopTriangle(),this.combo.getView().showLine("bottom");break;case"bottom,left":case"bottom,right":this._createBottomTriangle(),this.combo.getView().showLine("top")}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null,this.combo.getView()&&this.combo.getView().hideLine()},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.baseCls+" bi-bubble-popup-view"})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)},showLine:function(a){var b={},c={};switch(a){case"left":b={top:0,bottom:0,left:-1},c={width:3};break;case"right":b={top:0,bottom:0,right:-1},c={width:3};break;case"top":b={left:0,right:0,top:-1},c={height:3};break;case"bottom":b={left:0,right:0,bottom:-1},c={height:3}}this.line=BI.createWidget(c,{type:"bi.layout",cls:"bubble-popup-line bi-high-light-background"}),b.el=this.line,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},hideLine:function(){this.line&&this.line.destroy()}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:BI.i18nText(BI.i18nText("BI-Basic_Sure"))},{value:BI.i18nText("BI-Basic_Cancel"),level:"ignore"}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this,c=[];return BI.each(a.buttons.reverse(),function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:30,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.right_vertical_adapt",height:40,hgap:10,bgap:10,items:c})}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),BI.FormulaCombo=BI.inherit(BI.Widget,{_constant:{POPUP_HEIGHT:450,POPUP_WIDTH:600,POPUP_V_GAP:10,POPUP_H_GAP:10,ADJUST_LENGTH:2,HEIGHT_MAX:1e4,MAX_HEIGHT:500,MAX_WIDTH:600,COMBO_TRIGGER_WIDTH:300},_defaultConfig:function(){return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-combo",height:30,items:[]})},_init:function(){BI.FormulaCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.formula_ids=[],this.input=BI.createWidget({type:"bi.formula_combo_trigger",height:b.height,items:b.items}),this.formulaPopup=BI.createWidget({type:"bi.formula_combo_popup",fieldItems:b.items}),this.formulaInputCombo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!0,isNeedAdjustWidth:!1,adjustLength:this._constant.ADJUST_LENGTH,el:this.input,popup:{el:{type:"bi.absolute",height:this._constant.HEIGHT_MAX,width:this._constant.POPUP_WIDTH,items:[{el:this.formulaPopup,top:this._constant.POPUP_V_GAP,left:this._constant.POPUP_H_GAP,right:this._constant.POPUP_V_GAP,bottom:0}]},stopPropagation:!1,maxHeight:this._constant.MAX_HEIGHT,width:this._constant.MAX_WIDTH}}),this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.formulaPopup.setValue(a.input.getValue())}),this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE,function(){a.setValue(a.formulaPopup.getValue()),a.formulaInputCombo.hideView(),a.fireEvent(BI.FormulaCombo.EVENT_CHANGE)}),this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL,function(){a.formulaInputCombo.hideView()})},setValue:function(a){this.formulaInputCombo.isViewVisible()&&this.formulaInputCombo.hideView(),this.input.setValue(a),this.input.setText(BI.Func.getFormulaStringFromFormulaValue(a)),this.formulaPopup.setValue(this.input.getValue())},getFormulaTargetIds:function(){return this.formulaPopup.getFormulaTargetIds()},getValue:function(){return this.input.getValue()}}),BI.FormulaCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.formula_combo",BI.FormulaCombo),BI.FormulaComboPopup=BI.inherit(BI.Widget,{_constant:{BUTTON_HEIGHT:30,SOUTH_HEIGHT:60,SOUTH_H_GAP:10},_defaultConfig:function(){return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-pane-popup"})},_init:function(){BI.FormulaComboPopup.superclass._init.apply(this,arguments),this.populate()},populate:function(){var a=this,b=this.options.fieldItems;this.formula=BI.createWidget({type:"bi.formula_insert"}),this.formula.populate(b);var c=BI.createWidget({type:"bi.button",level:"common",height:this._constant.BUTTON_HEIGHT,text:BI.i18nText("BI-Basic_OK")}),d=BI.createWidget({type:"bi.button",level:"ignore",height:this._constant.BUTTON_HEIGHT,text:BI.i18nText("BI-Basic_Cancel")});this.formula.on(BI.FormulaInsert.EVENT_CHANGE,function(){c.setEnable(a.formula.checkValidation())}),c.on(BI.Button.EVENT_CHANGE,function(){a.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE)}),d.on(BI.Button.EVENT_CHANGE,function(){a.setValue(a.oldValue),a.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL)}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.formula,height:"fill"},{el:{type:"bi.right_vertical_adapt",height:this._constant.SOUTH_HEIGHT,items:[d,c],hgap:this._constant.SOUTH_H_GAP},height:this._constant.SOUTH_HEIGHT}]})},getFormulaTargetIds:function(){return this.formula.getUsedFields()},getValue:function(){return this.formula.getValue()},setValue:function(a){this.oldValue=a,this.formula.setValue(a)}}),BI.FormulaComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.FormulaComboPopup.EVENT_VALUE_CANCEL="EVENT_VALUE_CANCEL",BI.shortcut("bi.formula_combo_popup",BI.FormulaComboPopup),BI.FormulaComboTrigger=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-combo-trigger",height:30,items:[]})},_init:function(){BI.FormulaComboTrigger.superclass._init.apply(this,arguments);this.options;this.label=BI.createWidget({type:"bi.label",element:this,textAlign:"left",textHeight:this.options.height,lgap:10})},_getTextFromFormulaValue:function(a){var b=this,c="",d=/\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g,e=a.match(d);return BI.each(e,function(a,d){var e=/\$[\{][^\}]*[\}]/,f=d.match(e);if(BI.isNotEmptyArray(f)){var g=f[0].substring(2,d.length-1),d=BI.find(BI.flatten(b.options.items),function(a,b){return g===b.value});c+=d.text}else c+=d}),c},getValue:function(){return this.options.value},setValue:function(a){this.options.value=a,this.label.setText(this._getTextFromFormulaValue(a))}}),BI.shortcut("bi.formula_combo_trigger",BI.FormulaComboTrigger),BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,iconClass:"",el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconClass:b.iconClass,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.iconCombo.setValue(a)},getValue:function(){return this.iconCombo.getValue()},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconClass:"",width:25,height:25,isShowDown:!0})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var a=this.options;this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+a.iconClass,disableSelected:!0,width:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8}),this.down.setVisible(a.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:0,bottom:0}]}),BI.isKey(a.value)&&this.setValue(a.value)},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c="";a=BI.isArray(a)?a[0]:a,BI.any(this.options.items,function(b,d){if(a===d.value)return c=d.iconClass,!0})?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),BI.StaticCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-static-combo",height:30,text:"",el:{},items:[],chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.StaticCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.text_icon_item",cls:"bi-select-text-trigger bi-border pull-down-font",text:b.text,readonly:!0,textLgap:5,height:b.height-2}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",textAlign:b.textAlign,chooseType:b.chooseType,items:b.items}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.StaticCombo.EVENT_CHANGE,arguments)}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}})},populate:function(a){this.combo.populate(a)},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.StaticCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_combo",BI.StaticCombo),BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-check-combo",width:100,height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.textIconCheckCombo.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a); -},getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30,text:""})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:30,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:30,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:30})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){ -this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:30})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.BarFloatSection=BI.inherit(BI.FloatSection,{_defaultConfig:function(){return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText("BI-Basic_Cancel")]})},_init:function(){BI.BarFloatSection.superclass._init.apply(this,arguments);var a=this,b=["_init","_defaultConfig","_vessel","_render","getName","listenEnd","local","refresh","load","change"];b=BI.makeObject(b,!0),BI.each(this.constructor.caller.caller.caller.caller.prototype,function(c){if(!b[c]){var d=a[c];BI.isFunction(d)&&(a[c]=BI.bind(function(){return this.model._start===!0?void this._F.push({f:d,arg:arguments}):d.apply(this,arguments)},a))}})},rebuildSouth:function(a){var b=this;this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})}}),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){var e=this.isSelected();b===BI.Events.CLICK&&(a.setAllSelected(e),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.toolbar.isSelected()},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count<c}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(b){a.fireEvent(BI.LazyLoader.EVENT_CHANGE,b)})},_getNextItems:function(a){var b=this.options,c=b.items.length-this._const.PAGE*(a.times-1),d=BI.last(b.items,c),e=BI.first(d,this._const.PAGE);return e},populate:function(a){this.loader.populate(a)},addItems:function(a){this.loader.addItems(a)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader), -BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.next=!1),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",element:this,chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListLoader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasNext:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasNext.apply(this,[{times:this.times,count:this.count}])},addItems:function(a){this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(a),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments),this.next.element.appendTo(this.element)},populate:function(a){var b=this,c=this.options;return 0===arguments.length&&BI.isFunction(c.itemsCreator)?void c.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments),c.onLoaded()}]):(this.options.items=a,this.times=1,this.count=0,this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.DOM.hang([this.next]),this.button_group.populate.apply(this.button_group,arguments),void this.next.element.appendTo(this.element))},empty:function(){BI.DOM.hang([this.next]),this.button_group.empty(),this.next.element.appendTo(this.element),BI.each([this.next],function(a,b){b&&b.setVisible(!1)})},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_loader",BI.ListLoader),BI.SortList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SortList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sort-list",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_init:function(){BI.SortList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.list_loader",element:this,isDefaultInit:b.isDefaultInit,el:b.el,items:this._formatItems(b.items),itemsCreator:function(c,d){b.itemsCreator(c,function(b){d(a._formatItems(b))})},onLoaded:b.onLoaded,count:b.count,next:b.next,hasNext:b.hasNext}),this.loader.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SortList.EVENT_CHANGE,c,d)}),this.loader.element.sortable({containment:b.containment||this.element,connectWith:b.connectWith||".bi-sort-list",items:".sort-item",cursor:b.cursor||"drag",tolerance:b.tolerance||"intersect",placeholder:{element:function(a){var b=BI.createWidget({type:"bi.layout",cls:"bi-sortable-holder",height:a.outerHeight()});return b.element.css({"margin-left":a.css("margin-left"),"margin-right":a.css("margin-right"),"margin-top":a.css("margin-top"),"margin-bottom":a.css("margin-bottom"),margin:a.css("margin")}),b.element},update:function(){}},start:function(a,b){},stop:function(b,c){a.fireEvent(BI.SortList.EVENT_CHANGE)},over:function(a,b){}})},_formatItems:function(a){return BI.each(a,function(a,b){b=BI.stripEL(b),b.cls=b.cls?b.cls+" sort-item":"sort-item",b.attributes={sorted:b.value}}),a},hasNext:function(){return this.loader.hasNext()},addItems:function(a){this.loader.addItems(a)},populate:function(a){a&&(arguments[0]=this._formatItems(a)),this.loader.populate.apply(this.loader,arguments)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue()},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)},getSortedValues:function(){return this.loader.element.sortable("toArray",{attribute:"sorted"})}}),BI.SortList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.sort_list",BI.SortList),BI.AllCountPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-all-count-pager",height:30,pages:1,curr:1,count:1})},_init:function(){BI.AllCountPager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.small_text_editor",cls:"pager-editor",validationChecker:function(b){return 0===a.rowCount.getValue()&&"0"===b||BI.isPositiveInteger(b)},hgap:4,vgap:0,value:b.curr,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),width:35,height:20}),this.pager=BI.createWidget({type:"bi.pager",width:36,layouts:[{type:"bi.horizontal",hgap:1,vgap:1}],dynamicShow:!1,pages:b.pages,curr:b.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Previous_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,cls:"all-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Next_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,cls:"all-pager-next column-next-page-h-font"},hasPrev:b.hasPrev,hasNext:b.hasNext,firstPage:b.firstPage,lastPage:b.lastPage}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.pager.setValue(BI.parseInt(a.editor.getValue())),a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.editor.setValue(a.pager.getCurrentPage())}),this.allPages=BI.createWidget({type:"bi.label",width:30,title:b.pages,text:"/"+b.pages}),this.rowCount=BI.createWidget({type:"bi.label",height:b.height,hgap:5,text:b.count,title:b.count});var c=BI.createWidget({type:"bi.left",height:b.height,scrollable:!1,items:[{type:"bi.label",height:b.height,text:BI.i18nText("BI-Basic_Total"),width:15},this.rowCount,{type:"bi.label",height:b.height,text:BI.i18nText("BI-Tiao_Data"),width:50,textAlign:"left"}]});BI.createWidget({type:"bi.center_adapt",element:this,columnSize:["",35,40,36],items:[c,this.editor,this.allPages,this.pager]})},alwaysShowPager:!0,setAllPages:function(a){this.allPages.setText("/"+a),this.allPages.setTitle(a),this.pager.setAllPages(a),this.editor.setEnable(a>=1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate()}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:30,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var a=this.options;a.vertical,a.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev row-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[74,111,-9,28],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager),BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start<g-1&&(d.start=d.end-g+1);var l=d.start,m=d.end;for(h&&i&&d.index>1&&0!==g&&e>g&&d.end<e&&0!==g&&(l++,m--);l<=m;l++)l===f?c.push({text:l,value:l,selected:!0}):c.push({text:l,value:l});(!b.dynamicShow&&!b.dynamicShowFirstLast||e>g&&d.end<e&&0!==g)&&i&&(e>g&&d.end<e&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),c.push({text:i,value:"last",disabled:!(e>g&&d.end<e&&0!==g)})),d.flow=!j&&0===g,(!b.dynamicShow&&!b.dynamicShowPrevNext&&k||f!==e&&k||d.flow)&&c.push(function(){return BI.isKey(k)?e===!1?{text:k,value:"next",disabled:b.hasNext(f)===!1}:d.flow&&f===e?{text:k,value:"next",disabled:!0}:{text:k,value:"next",disabled:!(f!==e&&k||d.flow)}:BI.extend({disabled:e===!1?b.hasNext(f)===!1:!(f!==e&&k||d.flow)},k)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(c,{cls:"page-item bi-border bi-list-item-active",height:23,hgap:10}),behaviors:b.behaviors,layouts:b.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(c,d,f){if(a._lock!==!0){if(a._lock=!0,a._debouce(),c===BI.Events.CLICK){var g=a.button_group.getValue()[0];switch(g){case"first":a.currPage=1;break;case"last":a.currPage=e;break;case"prev":a.currPage--;break;case"next":a.currPage++;break;default:a.currPage=g}b.jump.apply(a,[{pages:e,curr:a.currPage}]),a._populate(),a.fireEvent(BI.DetailPager.EVENT_CHANGE,f)}a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(a){this.options.pages=a},hasPrev:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasPrev(a):a>1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):a<c},setValue:function(a){var b=this.options;if(a=0|a,a=a<1?1:a,b.pages===!1){var c=BI.result(b,"lastPage"),d=1;this.currPage=a>c?c:(d=BI.result(b,"firstPage"),a<d?d:a)}else a=a>b.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-active",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height-2,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:30})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){return this.options.isNeedFreeze===!0?this.options.freezeCols.length:0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a<f&&(g+=b),h+=b}),f>0&&(b[f-1]=BI.clamp(e-(g-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(h-g-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_recomputeColumnSize:function(){var a=this.options;a.regionColumnSize=this.table.getRegionColumnSize();var b=this.table.getColumnSize().slice();if(a.freezeCols.length>1)for(var c=0;c<a.freezeCols.length-1;c++)b.splice(1,0,0);a.columnSize=b},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=this._createHeader(c),e=this._formatItems(a.items,d,b),f=a.columnSize.slice(),g=a.minColumnSize.slice(),h=a.maxColumnSize.slice();return BI.removeAt(f,e.deletedCols),BI.removeAt(g,e.deletedCols),BI.removeAt(h,e.deletedCols),{header:e.header,items:e.items,columnSize:this._formatColumnSize(f,b),minColumnSize:this._formatColumns(g,b),maxColumnSize:this._formatColumns(h,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.attr("freezeCols",f.freezeCols),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.dynamic_summary_layer_tree_table",BI.DynamicSummaryLayerTreeTable),BI.DynamicSummaryTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.DynamicSummaryTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.DynamicSummaryTreeTable.formatHorizontalItems(a.items,b,!1,a.summaryCellStyleGetter),f=BI.DynamicSummaryTreeTable.formatSummaryItems(e,d,a.crossItems,b),g=a.columnSize.slice(),h=a.minColumnSize.slice(),i=a.maxColumnSize.slice();return BI.removeAt(g,f.deletedCols),BI.removeAt(h,f.deletedCols),BI.removeAt(i,f.deletedCols),{header:f.header,items:f.items,columnSize:g,minColumnSize:h,maxColumnSize:i}},setWidth:function(a){BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){ -BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a){switch(BI.DynamicSummaryTreeTable.superclass.attr.apply(this,arguments),a){case"minColumnSize":case"maxColumnSize":return}this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryTreeTable.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.DynamicSummaryTreeTable,{formatHorizontalItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],(a==-1||g.children.length>1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatSummaryItems:function(a,b,c,d){function e(a){if(BI.isArray(a.children)){if(BI.each(a.children,function(a,b){e(b)}),BI.isNotEmptyArray(a.values)){if(1===a.children.length)for(var b=0;b<a.values.length;b++)f.push(g+b+d);g+=a.values.length}}else a.values&&a.values.length>1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep();return{header:this._createHeader(c),items:this._formatItems(a.items),columnSize:this._formatColumnSize(a.columnSize,b),minColumnSize:this._formatColumns(a.minColumnSize,b),maxColumnSize:this._formatColumns(a.maxColumnSize,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.LayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.LayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.LayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){var a=this.table.getColumnSize(),b=this._getHDeep(),c=[];return b>0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i<e;i++){for(var j=[],k=0;k<d;k++)j.push(b[i]);h.push(j.concat(g[i]||[]))}return a&&a.length>0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatCrossItems:function(a,b,c){var d=BI.TableTree.formatItems(a,b,!0,c);return BI.unzip(d)},maxDeep:function(a){function b(a,c){var d=a;return BI.isNotEmptyArray(c.children)&&BI.each(c.children,function(c,e){d=Math.max(d,b(a+1,e))}),d}var c=1;return BI.isObject(a)&&BI.each(a,function(a,d){c=Math.max(c,b(1,d))}),c}}),BI.shortcut("bi.tree_table",BI.TableTree),BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(a){return a.length>0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{ -baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j<k&&h<e.length;)d.push(h),i+=e[h].height,j+=e[h].height,h++;BI.each(d,function(d,f){var g=BI.deepIndexOf(a.renderedKeys,f);if(g>-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return a<b&&!this._isEqual(a,b)},_isMoreThan:function(a,b){return a>b&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c<d;c++)for(var e=c+1;e<d;e++){var f={left:b[c].x,top:b[c].y,width:b[c].w,height:b[c].h},g={left:b[e].x,top:b[e].y,width:b[e].w,height:b[e].h};if(b[c].isIntersects(b[e])&&this._getCrossArea(f,g)>1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;k<l;k++){var m=j[k];m.moved||b.y>m.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c<d;c++)if(this._collides(a[c],b))return a[c]},_moveElementAwayFromCollision:function(a,b,c,d){if(d){var e={x:c.x,y:c.y,w:c.w,h:c.h,i:"-1"};if(e.y=Math.max(b.y-c.h,0),!this._getFirstCollision(a,e))return this._moveElement(a,c,void 0,e.y)}return this._moveElement(a,c,void 0,c.y+1)},_compactItem:function(a,b,c){if(c)for(;b.y>0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g<h;g++){var i=e[g];i._static||(i=this._compactItem(d,i,b),d.push(i)),f[a.indexOf(i)]=i,i.moved=!1}return f},getRegionByName:function(a){var b={};return b[a]=this.regions[a],this._cloneRegion(b)[a]},getAllRegions:function(){return BI.toArray(this._cloneRegion())},getHelper:function(){var a=BI.createWidget({type:"bi.layout",width:18,height:18,cls:"arrangement-helper bi-border"});return BI.createWidget({type:"bi.absolute",element:this,items:[a]}),a},_start:function(){this.options.layoutType===BI.Arrangement.LAYOUT_TYPE.GRID?this.block.setVisible(!0):this.arrangement.setVisible(!0)},_stop:function(){this.arrangement.setVisible(!1),this.block.setVisible(!1)},setLayoutType:function(a){var b=this.options;if(a!==b.layoutType)switch(b.layoutType=a,b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.relayout()}},getLayoutType:function(){return this.options.layoutType},getLayoutRatio:function(){var a=this._getRegionOccupied(),b=this.getClientWidth(),c=this.getClientHeight();return{x:BI.parseFloat(BI.contentFormat((a.left+a.width)/b,"#.##;-#.##")),y:BI.parseFloat(BI.contentFormat((a.top+a.height)/c,"#.##;-#.##"))}},addRegion:function(a,b){b&&this.setPosition(b,a);this.options;if(!this.position)return!1;var c=this._cloneRegion();BI.each(this.position.regions,function(a,b){c[b.id].left=b.left,c[b.id].top=b.top,c[b.id].width=b.width,c[b.id].height=b.height});var d=BI.extend({},a,{left:this.position.insert.left,top:this.position.insert.top,width:this.position.insert.width,height:this.position.insert.height}),e=this._createOneRegion(d);return c[e.id]=e,!!this._test(c)&&(delete c[e.id],this._modifyRegion(c),this._addRegion(d),this._populate(this.getAllRegions()),!0)},deleteRegion:function(a){if(!this.regions[a])return!1;var b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),!0;case BI.Arrangement.LAYOUT_TYPE.GRID:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),this.resize(),!0}return!1},setRegionSize:function(a,b){var c=this.options,d=!1;switch(c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._cloneRegion();BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)&&(this._modifyRegion(e),d=!0);break;case BI.Arrangement.LAYOUT_TYPE.GRID:var e=this._cloneRegion();if(BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)){var f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),d=!0}}return this._applyRegion(),d},setPosition:function(a,b){var c,d,e=this.options,f=[];if(a.left<0||a.top<0){switch(e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.resize()}return this._stop(),this.position=null,null}var g=this._getScrollOffset();switch(a={left:a.left+g.left,top:a.top+g.top},e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var c={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this.position={insert:c},this._setArrangeSize(c),this._start();break;case BI.Arrangement.LAYOUT_TYPE.GRID:var h={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this._setArrangeSize(h);var d=this._getGridPositionAndSize(h),i=[{x:0,y:BI.MAX,w:d.w,h:d.h,i:d.i}].concat(this._getLayoutsByRegions());i=this._moveElement(i,i[0],d.x,d.y,!0),i=this.compact(i,!0);var f=this._setRegionsByLayout(this._cloneRegion(),i),c=this._getBlockPositionAndSize(i[0]);this.position={insert:c,regions:f},this._applyRegion(f),this._setBlockPositionAndSize(c),this._start()}return this.position},setRegionPosition:function(a,b){var c=this.options,d=this._getScrollOffset();switch(b=BI.extend(b,{left:b.left+d.left,top:b.top+d.top}),c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top}),this._applyRegion();break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(b.stop){BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this.block.setVisible(!1)}else{BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),h=this._getGridPositionAndSize(BI.extend(e[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top})),i=h.x,j=h.y;h=BI.extend(h,{x:0,y:BI.MAX,i:-1}),delete e[a];var f=this._getLayoutsByRegions(e);f=this._moveElement([h].concat(f),h,i,j,!0),f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this._setBlockPositionAndSize(this._getBlockPositionAndSize(h)),this.block.setVisible(!0)}}},setDropPosition:function(a,b){var c=this;this.arrangement.setVisible(!0);var d=this._getScrollOffset();return this._setArrangeSize(BI.extend({},b,{left:a.left+d.left,top:a.top+d.top})),function(){c.arrangement.setVisible(!1)}},scrollTo:function(a){this.scrollContainer.element.scrollTop(a.top),this.scrollContainer.element.scrollLeft(a.left)},zoom:function(a){var b=this;this.options;if(a){var c=this._applyContainer();switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:if(this._isArrangeFine()){var d=this.getClientWidth(),e=(a.x||1)*d/(c.left+c.width),f=this._cloneRegion();BI.each(f,function(a,b){b.left=b.left*e,b.width=b.width*e}),this._test(f)&&(this._modifyRegion(f),this._applyRegion()),this.resize(),this.relayout()}break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine()){var d=this.getClientWidth(),g=this.getClientHeight(),e=(a.x||1)*d/(c.left+c.width),h=(a.y||1)*g/(c.top+c.height),f=this._cloneRegion();if(BI.each(f,function(a,c){c.left=c.left*e,c.width=c.width*e,c.top=c.top*h,c.height=c.height*h;var d=b._getOneWidthPortion(),f=Math.round(c.width/d),g=Math.round(c.left/d),i=Math.round((c.width+c.left)/d);g+f!==i&&(c.left=g*d,c.width=i*d-c.left)}),this._test(f)){var i=this._getLayoutsByRegions(f);i=this.compact(i,!0),f=this._getRegionsByLayout(i),this._modifyRegion(f),this._applyRegion()}}else this.relayout()}}},resize:function(){var a=this.options;switch(a.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.zoom(this.ratio);var b=this._cloneRegion(),c=this._getLayoutsByRegions(b);c=this.compact(c,!0),b=this._getRegionsByLayout(c),this._modifyRegion(b),this._applyRegion()}},relayout:function(){var a=this,b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine())this.resize();else{var c=this._getOneHeightPortion(),d=this.getClientWidth(),e=(this.getClientHeight(),this._cloneRegion()),f=BI.toArray(e);f.sort(function(b,c){return a._isEqual(b.top,c.top)?b.left-c.left:b.top-c.top});var g=f.length,h=4,i=(Math.floor((g-1)/4+1),d/h),j={};if(BI.each(f,function(a,b){var d=Math.floor(a/4),e=a%4;BI.extend(b,{top:d*c*6,left:e*i,width:i,height:6*c}),j[d]||(j[d]={}),j[d][e]=b}),this._test(f)){var k=this._getLayoutsByRegions(e);k=this.compact(k,!0),e=this._getRegionsByLayout(k),this._modifyRegion(e),this._populate(f)}}}},_populate:function(a){this._stop(),this._calculateRegions(a),this._applyRegion()},populate:function(a){var b=this;BI.each(this.regions,function(a,c){b.regions[a].el.setVisible(!1),delete b.regions[a]}),this._populate(a),this._renderRegion()}}),BI.Arrangement.EVENT_SCROLL="EVENT_SCROLL",BI.extend(BI.Arrangement,{PORTION:36,H_PORTION:18,LAYOUT_TYPE:{GRID:0,FREE:1}}),BI.shortcut("bi.arrangement",BI.Arrangement),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.leaf=!0,h.width=g.width,h.height=g.height,h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse()); -var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b<c;b++)e[a[b].id]=a[b];for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!=a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(a[b])):d.push(a[b]);return d}return[a]},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=this._transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:25})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a+1),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker bi-background",height:25,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this._year=(new Date).getFullYear(),this._month=(new Date).getMonth(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){0===a._month?a.setValue({year:a.year.getValue()-1,month:11}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){11===a._month?a.setValue({year:a.year.getValue()+1,month:0}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo"}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.left,width:25},{type:"bi.center_adapt",items:[{type:"bi.horizontal",width:100,items:[this.year,this.month]}]},{el:this.right,width:25}]}),this.setValue({year:this._year,month:this._month})},setValue:function(a){this._year=a.year,this._month=a.month,this.year.setValue(a.year),this.month.setValue(a.month)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:30})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.DateTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&Date.checkLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]})},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return Date.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),BI.parseInt(a)},_alertInEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),a=a<10?"0"+a:a},_finetuning:function(a){var b=BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));this.editor.setValue(this._alertInEditorValue(b+a))},getValue:function(){var a=this.editor.getValue();return this._alertOutEditorValue(a)},setValue:function(a){this.editor.setValue(this._alertInEditorValue(a)),this._finetuning(0)}}),BI.DateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.date_time_select",BI.DateTimeSelect),BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:b.triggerWidth},{el:this.text}]})},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=new Date,b=c.print("%Y-%X-%d %H:%M:%S");else{var d=new Date(c.year,c.month,c.day,c.hour,c.minute,c.second);b=d.print("%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.DirectionPathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#808080",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.DirectionPathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",items:[]})},_init:function(){BI.DirectionPathChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pathChooser=BI.createWidget({type:"bi.path_chooser",element:this,items:b.items}),this.pathChooser.on(BI.PathChooser.EVENT_CHANGE,function(b,c){a._setValue(b,c),a.fireEvent(BI.DirectionPathChooser.EVENT_CHANGE)}),this._drawArrows()},_unselectAllArrows:function(){var a=this._const.lineColor; -BI.each(this.arrows,function(b,c){BI.each(c,function(b,c){BI.each(c,function(b,c){c.attr({fill:a,stroke:a})})})})},_drawOneArrow:function(a,b){var c=this._const.lineColor,d=(this._const.selectLineColor,this.pathChooser.svg),e="";switch(b){case 0:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y+5)+"L"+(a.x+3)+","+(a.y+5)+"L"+a.x+","+a.y;break;case 1:e="M"+a.x+","+a.y+"L"+(a.x-5)+","+(a.y-3)+"L"+(a.x-5)+","+(a.y+3)+"L"+a.x+","+a.y;break;case 2:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y-5)+"L"+(a.x+3)+","+(a.y-5)+"L"+a.x+","+a.y;break;case 3:e="M"+a.x+","+a.y+"L"+(a.x+5)+","+(a.y-3)+"L"+(a.x+5)+","+(a.y+3)+"L"+a.x+","+a.y}return d.path(e).attr({fill:c,stroke:c})},_drawArrows:function(){function a(a,b){return b===-1?100*(a+1)-20:100*a+20}function b(a,b){var c=BI.find(a,function(c,d){if(c>0&&a[c-1].x<b&&a[c].x>b)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a<i.length-1){var e;b.y===i[a-1].y?i[a+1].y!=b.y&&(f[h[h.length-2]].direction===-1?a-1>0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a<b-1},_createChildValue:function(a,b){return a+"_"+b},populate:function(a){BI.DownListPopup.superclass.populate.apply(this,arguments);var b=this;b.childValueMap={},b.fatherValueMap={},b.singleValues=[];var c=b._createChildren(a),d=BI.createItems(c,{},{adjustLength:-2});b.popup.populate(d)},setValue:function(a){var b=this,c=[];BI.each(a,function(a,d){var e;e=BI.isNotNull(d.childValue)?b._createChildValue(d.value,d.childValue):d.value,c.push(e)}),this.popup.setValue(c)},getValue:function(){var a=this,b=[],c=this.popup.getValue();return BI.each(c,function(c,d){var e={};if(BI.isNotNull(a.childValueMap[d])){var f=a.fatherValueMap[d];e.childValue=a.childValueMap[d],e.value=f}else e.value=d;b.push(e)}),b}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),BI.ExcelTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-cell",text:""})},_init:function(){BI.ExcelTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_cell",BI.ExcelTableCell),BI.ExcelTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-header-cell bi-background",text:""})},_init:function(){BI.ExcelTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:BI.HorizontalAlign.Center,whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_header_cell",BI.ExcelTableHeaderCell),BI.ExcelTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",el:{type:"bi.responsive_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:37,footerRowSize:37,rowSize:37,regionColumnSize:!1,items:[]})},_init:function(){BI.ExcelTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[];BI.each(b.mergeCols,function(a,b){c.push(b+1)}),this.table=BI.createWidget(b.el,{type:"bi.table_view",element:this,isNeedFreeze:!1,isNeedMerge:b.isNeedMerge,mergeCols:c,mergeRule:b.mergeRule,columnSize:[""].concat(b.columnSize),headerRowSize:18,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize||[82,""]}),BI.isNotEmptyArray(b.items)&&this.populate(b.items),BI.nextTick(function(){a.setRegionColumnSize(b.regionColumnSize||[82,""])})},resize:function(){this.table.resize()},setColumnSize:function(a){this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},resizeHeader:function(){this.table.resize(),this.table._resizeHeader&&this.table._resizeHeader()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.ExcelTable.superclass.attr.apply(this,arguments),a){case"mergeCols":var d=[];BI.each(b,function(a,b){d.push(b+1)}),b=d}this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this.getColumnSize(),c=[],d=[{type:"bi.excel_table_header_cell"}];BI.isNotNull(a)&&(BI.each(b,function(a,b){d.push({type:"bi.excel_table_header_cell",text:BI.int2Abc(a+1)})}),BI.each(a,function(a,b){c.push([{type:"bi.excel_table_header_cell",text:a+1}].concat(b))})),this.table.populate(c,[d])},destroy:function(){this.table.destroy(),BI.ExcelTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.excel_table",BI.ExcelTable),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j); -}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0); -}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{ -height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={ -type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){ -return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d<a.length;d++){var e=a[d],f=b.getRegionIndexById(e);c.push(f);var g=b.regions[f];if(d===a.length-1){g.hasItem(e)||g.addItem(e,b.texts[e]);break}(d>0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d<BI.last(c);d++)BI.contains(c,d)||b.regions[d].addItem("")},_createNodes:function(){var a=this,b=this.options;this.store={},this.texts={},this.start=[],this.end=[],BI.each(b.items,function(b,c){a.start.push(BI.first(c).value),a.end.push(BI.last(c).value)}),this.start=BI.uniq(this.start),this.end=BI.uniq(this.end);var c=[],d=new BI.Tree,e={},f=0;BI.each(b.items,function(b,c){BI.each(c,function(b,g){BI.has(e,g.value)||(e[g.value]=0),e[g.value]++,f=Math.max(f,e[g.value]);var h={};b>0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h<e;h++)c[h]=c[h+1];c[e]=g}}else c.push(d.get("region"))})}),this._createRegions(c),BI.each(e,function(a,b){b<f&&delete e[a]});for(var g=[],h=d.getRoot();h&&1===h.getChildrenLength();)BI.has(e,h.getChildren()[0].id)?(delete e[h.getChildren()[0].id],h=h.getChildren()[0]):h=null;d.traverse(function(a){BI.has(e,a.id)&&(g.push(a.id),delete e[a.id])});for(var i,j,k={},l=0,m=g.length;l<m+1;l++)0===m?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):l===m?(i=j,j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):0===l?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[d.search(g[l])]):(i=[d.search(j[0]||d.getRoot(),g[l-1])],j=[d.search(i[0],g[l])]),BI.each(i,function(b,c){d._recursion(c,[c.id],function(b,d){if(BI.contains(j,b)&&(k[c.id]||(k[c.id]=[]),k[c.id].push(d),a._pushNodes(d),j.length<=1))return!0})});this.routes=k,this._drawLines(k)},_unselectAllPath:function(){var a=this;BI.each(this.radios,function(a,b){BI.each(b,function(a,b){b.setSelected(!1)})}),BI.each(this.lines,function(b,c){BI.each(c,function(b,c){c.attr("stroke",a._const.lineColor)})}),BI.each(this.regions,function(a,b){b.reset()})},populate:function(a){this.options.items=a||[];this.empty(),this.options.items.length<=0||(this.svg=BI.createWidget({type:"bi.svg"}),this._createNodes(),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}))},setValue:function(a){this._unselectAllPath();var b=BI.keys(this.routes),c=this,d=[],e=[];BI.each(a,function(a,c){BI.contains(b,c)&&e.length>0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.length<a.columnSize.length){ -var e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]<e.left[e.left.length-1]&&(h[h.length-1]=e.left[e.left.length-1]),i[i.length-1]<e.right[e.right.length-1]&&(i[i.length-1]=e.right[e.right.length-1]),a.table.setColumnSize(h.concat(i))}else if(!this._isAdaptiveColumn()){var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),l=e.sum,m=e.size;m[m.length-1]+=d[0]-l;var n=BI.clone(m);n[n.length-1]="",this.table.setColumnSize(n),e=this._getBlockSize(),m[m.length-1]<e.size[e.size.length-1]&&(m[m.length-1]=e.size[e.size.length-1]),this.table.setColumnSize(m)}},_resizeBody:function(){if(this._isAdaptiveColumn()){var a=this.table.getCalculateColumnSize();this.setColumnSize(a)}},_adjustRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this._getBlockSize(),d=c.sumLeft,e=c.sumRight;(d<b[0]||b[0]>=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this.table.element.width();if(b[0]<15||b[1]<15){var d=a.freezeCols,e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h<b.items.length;h++,i++){var j=BI.deepIndexOf(this.renderedKeys,this.start+h),k=h*b.rowSize;if(j>-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""), -this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;b<c;b++)if(i._isMatch(a.slice(0,a.length-1),a[b],l))return!0;return!1}function g(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(c=c[e],null==c)return!1}return!0}function h(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(!BI.has(c,e))return!1;if(c=c[e],BI.isEmpty(c))return!0}return!1}var i=this,j=BI.deepClone(a.selectedValues),k=a.notSelectedValue||{},l=a.keyword||"",m=a.parentValues||[];return null==j||BI.isEmpty(j)?void b({}):(c(j),void b(j))},_reqAdjustTreeNode:function(a,b){function c(a,b){if(null==a||BI.isEmpty(a))return!0;var e=!0;return BI.each(a,function(d,g){var h=BI.clone(b);h.push(d),c(a[d],h)||(BI.each(a[d],function(a,b){var c=BI.clone(h);c.push(a),f.push(c)}),e=!1)}),e&&d(a,b)}function d(a,b){return BI.isEmpty(a)||e._getChildCount(b)===BI.size(a)}var e=this,f=[],g=a.selectedValues;if(null==g||BI.isEmpty(g))return void b({});BI.each(g,function(a,b){f.push([a])}),c(g,[]);var h={};BI.each(f,function(a,b){e._buildTree(h,b)}),b(h)},_reqInitTreeNode:function(a,b){function c(){var a=j._getChildren([]),b=a.length;if(""!==n){for(var c=0,e=b;c<e;c++)if(a[c].value===n){b=c+1;break}}else b=0;for(var f=[],g=b,e=a.length;g<e;g++){if(f.length<j._const.perPage)var h=d(1,[],a[g].value,!1,k);else if(f.length===j._const.perPage)var h=d(1,[],a[g].value,!1,[]);if(h[0]===!0&&f.push(a[g].value),f.length>j._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m<g*this._const.perPage;m++){var n=d(l[m].value,i,k,h);f.push({id:l[m].id,pId:l[m].pId,value:l[m].value,text:l[m].text,times:1,isParent:l[m].getChildrenLength()>0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d<e;d++){if(null==c)return null;c=c[b[d]]}return c},_deleteNode:function(a,b){var c=b[b.length-1],d=b.slice(0,b.length-1),e=this._getNode(a,d);if(null!=e&&e[c])for(delete e[c];d.length>0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d<b*this._const.perPage;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return b*this._const.perPage<a.length},_itemsCreator:function(a,b){function c(c){var e=(a.keywords||[]).slice();if(a.keyword&&e.push(a.keyword),BI.each(e,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var f=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!f[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:d._getItemsByTimes(c,a.times),hasNext:d._hasNextByTimes(c,a.times)})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){var a=this.combo.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_CONFIRM="ValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo),BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this.items=b.items,this.populate())},setValue:function(a){this.list.setValue(a)},getValue:function(){var a=this.list.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="ValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane); \ No newline at end of file +enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes&&this.nodes.checkAllNodes(a)},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView),BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b);d.checkNode(c,!c.checked,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||e.itemsCreator(g,h)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},getValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments);else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i<j;i++){if(g=g[h[i]],null==g)return;if(BI.isEmpty(g))break}d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_SELECT_DATA,notSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)})}},_getSelectedValues:function(){function a(d){BI.each(d,function(d,e){var f=e.getCheckStatus();if(f.checked===!1)return!0;var g=e.parentValues||b._getParentValues(e),h=g.concat([b._getNodeValue(e)]);return b._buildTree(c,h),BI.isNotEmptyArray(e.children)?(a(e.children),!0):void(f.half===!0&&b._getHalfSelectedValues(c,e))})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,g.length>0&&c(d._dealWidthNodes(g)),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){var a=this.options,b=BI.PartTree.superclass.getValue.apply(this,arguments);return a.itemsCreator({type:BI.TreeView.REQ_TYPE_ADJUST_DATA,selectedValues:b},function(a){b=a}),b},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.FloatBoxController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager,BI.Canvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-canvas"})},_init:function(){BI.Canvas.superclass._init.apply(this,arguments);var a=this.options,b=document.createElement("canvas");document.createElement("canvas").getContext||(b=window.G_vmlCanvasManager.initElement(b)),this.element.append(b),b.width=a.width,b.height=a.height,$(b).width("100%"),$(b).height("100%"),this.canvas=b,this._queue=[]},_getContext:function(){return this.ctx||(this.ctx=this.canvas.getContext("2d")),this.ctx},_attr:function(a,b){var c=this;if(!BI.isNull(a))return BI.isObject(a)?void BI.each(a,function(a,b){c._queue.push({k:a,v:b})}):void this._queue.push({k:a,v:b})},_line:function(a,b){var c=this,d=[].slice.call(arguments,2);BI.isOdd(d.length)&&(this._attr(BI.last(d)),d=BI.initial(d)),this._attr("moveTo",[a,b]);var e=BI.filter(d,function(a){return a%2===0}),f=BI.filter(d,function(a){return a%2!==0});d=BI.zip(e,f),BI.each(d,function(a,b){c._attr("lineTo",b)})},line:function(a,b,c,d){this._line.apply(this,arguments),this._attr("stroke",[])},rect:function(a,b,c,d,e){this._attr("fillStyle",e),this._attr("fillRect",[a,b,c,d])},circle:function(a,b,c,d){this._attr({fillStyle:d,beginPath:[],arc:[a,b,c,0,2*Math.PI,!0],closePath:[],fill:[]})},hollow:function(){this._attr("beginPath",[]),this._line.apply(this,arguments),this._attr("closePath",[]),this._attr("stroke",[])},solid:function(){this.hollow.apply(this,arguments),this._attr("fill",[])},gradient:function(a,b,c,d,e,f){var g=this._getContext().createLinearGradient(a,b,c,d);return g.addColorStop(0,e),g.addColorStop(1,f),g},reset:function(){this._getContext().clearRect(0,0,this.canvas.width,this.canvas.height)},stroke:function(a){var b=this;BI.nextTick(function(){var c=b._getContext();BI.each(b._queue,function(a,b){BI.isFunction(c[b.k])?c[b.k].apply(c,b.v):c[b.k]=b.v}),b._queue=[],a&&a()})}}),BI.shortcut("bi.canvas",BI.Canvas),BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate()),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f<g;f++){var h=a.cellSizeAndPositionGetter(f);if(null==h.height||isNaN(h.height)||null==h.width||isNaN(h.width)||null==h.x||isNaN(h.x)||null==h.y||isNaN(h.y))throw Error();d=Math.max(d,h.y+h.height),e=Math.max(e,h.x+h.width),h.index=f,b[f]=h,c.registerCell(h,f)}this._cellMetadata=b,this._sectionManager=c,this._height=d,this._width=e},_cellRenderers:function(a,b,c,d){return this._lastRenderedCellIndices=this._sectionManager.getCellIndices(a,b,c,d),this._cellGroupRenderer()},_cellGroupRenderer:function(){var a=this,b=(this.options,[]);return BI.each(this._lastRenderedCellIndices,function(c,d){var e=a._sectionManager.getCellMetadata(d);b.push(e)}),b},_calculateChildrenToRender:function(){var a=this,b=this.options,c=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),d=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),e=Math.max(0,c-b.horizontalOverscanSize),f=Math.max(0,d-b.verticalOverscanSize),g=Math.min(this._width,c+b.width+b.horizontalOverscanSize),h=Math.min(this._height,d+b.height+b.verticalOverscanSize);if(g>0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k=[],l={},m={},n={},o=0,p=i.length;o<p;o++){var q=i[o];m[q.x]=q.x,m[q.x+q.width]=q.x+q.width,n[q.y]=q.y,n[q.y+q.height]=q.y+q.height}m=BI.toArray(m),n=BI.toArray(n);for(var r=BI.invert(m),s=BI.invert(n),t={},u={},v={},w={},x=function(a,b){null==a[b]&&(a[b]=Number.MAX_VALUE)},y=function(a,b){null==a[b]&&(a[b]=0)},o=0,p=i.length;o<p;o++){var z,q=i[o],A=BI.deepIndexOf(this.renderedKeys,q.index);A>-1?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k.push(q.index),l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){BI.deepContains(a.renderedKeys,c)?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(I,b)||BI.deepContains(J,b)||K.push(a)}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a){L.push(j[a])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0&&(this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft))},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.combo}]}),b.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(","),d=function(a){b.stopEvent&&a.stopEvent(),b.stopPropagation&&a.stopPropagation()};BI.each(c,function(c,e){switch(e){case"hover":a.element.on("mouseenter."+a.getName(),function(b){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND))}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&b.toggle===!0&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))});break;case"click":var f=BI.debounce(function(c){if(a.combo.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()){if(!b.toggle&&a.isViewVisible())return;b.toggle?a._toggle():a._popupView(),a.isViewVisible()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))}},BI.EVENT_RESPONSE_TIME,!0);a.element.off(e+"."+a.getName()).on(e+"."+a.getName(),function(a){f(a),d(a)});break;case"click-hover":var f=BI.debounce(function(b){if(a.combo.element.__isMouseInBounds__(b)&&a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()){if(a.isViewVisible())return;a._popupView(),a.isViewVisible()&&(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND))}},BI.EVENT_RESPONSE_TIME,!0);a.element.off(e+"."+a.getName()).on(e+"."+a.getName(),function(a){f(a),d(a)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&b.toggle===!0&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view"}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(a){if(!(this.element.find(a.target).length>0)){var b=this.options.hideChecker.apply(this,[a]);b!==!1&&this._hideView()}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(),this.adjustHeight(),this.element.addClass(this.options.comboClass),$(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(){var a=this.options;if(this.popupView&&a.isNeedAdjustWidth===!0){this.resetListWidth("");var b=this.popupView.element.outerWidth(),c=this.element.outerWidth()||a.width;b>c+80?c+=80:b>c&&(c=b),this.resetListWidth(c<100?100:c)}},adjustHeight:function(){var a=this.options,b={};if(this.popupView){var c=this.popupView.isVisible();switch(this.popupView.visible(),a.direction){case"bottom":case"bottom,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","right","left"],a.offsetStyle);break;case"top":case"top,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","right","left"],a.offsetStyle);break;case"left":case"left,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","bottom","top"],a.offsetStyle);break;case"right":case"right,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","bottom","top"],a.offsetStyle);break;case"top,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","left","right"],a.offsetStyle);break;case"bottom,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","left","right"],a.offsetStyle);break;case"left,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","top","bottom"],a.offsetStyle);break;case"right,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","top","bottom"],a.offsetStyle);break;case"top,custom":case"custom,top":b=$.getTopAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":b=$.getBottomAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"left,custom":case"custom,left":b=$.getLeftAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight;break;case"custom,right":case"right,custom":b=$.getRightAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight}"adaptHeight"in b&&this.resetListHeight(b.adaptHeight),"left"in b&&this.popupView.element.css({left:b.left}),"top"in b&&this.popupView.element.css({top:b.top}),this.position=b,this.popupView.setVisible(c)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.combo.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView&&this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(){this.isEnabled()&&this.combo.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroy:function(){$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),BI.Combo.superclass.destroy.apply(this,arguments)}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo),BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this.popupView?this.popupView.getValue():[]},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander),BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments), +this.populate(this.options.el)},populate:function(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){this.populate(this.options.items)},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:BI.stripEL(d)})]})});return a},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){this.layouts.setValue(a)},getValue:function(){return this.layouts.getValue()},empty:function(){this.layouts.empty()},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasPrev.apply(this,[{times:this.times,count:this.count}])},hasNext:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasNext.apply(this,[{times:this.times,count:this.count}])},prependItems:function(a){this.count+=a.length,this.next!==!1&&(this.hasPrev()?(this.options.items=this.options.items.concat(a),this.prev.setLoaded()):this.prev.setEnd()),this.button_group.prependItems.apply(this.button_group,arguments)},addItems:function(a){this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(a),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments)},populate:function(a){var b=this,c=this.options;return 0===arguments.length&&BI.isFunction(c.itemsCreator)?void c.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("arguments can not be null!!!");b.populate.apply(b,arguments),c.onLoaded()}]):(this.options.items=a,this.times=1,this.count=0,this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.isObject(this.prev)&&(this.hasPrev()?this.prev.setLoaded():this.prev.invisible()),void this.button_group.populate.apply(this.button_group,arguments))},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)},empty:function(){this.button_group.empty(),BI.each([this.prev,this.next],function(a,b){b&&b.setVisible(!1)})},destroy:function(){BI.Loader.superclass.destroy.apply(this,arguments)}}),BI.Loader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.loader",BI.Loader),BI.Navigation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments),{direction:"bottom",logic:{dynamic:!1},single:!1,defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()},afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},render:function(){var a=this,b=this.options;this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.cardMap={},this.showIndex=0,this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardNameCreator:function(b){return a.showIndex+b},cardCreator:function(c){var d=b.cardCreator(c);return a.cardMap[c]=d,d},afterCardCreated:BI.bind(this.afterCardCreated,this),afterCardShow:BI.bind(this.afterCardShow,this)})},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},afterCardCreated:function(a){var b=this;this.cardMap[a].on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.Navigation.EVENT_CHANGE,d)}),this.options.afterCardCreated.apply(this,arguments)},afterCardShow:function(a){this.showIndex=a,this._deleteOtherCards(a),this.options.afterCardShow.apply(this,arguments)},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate.apply(a,arguments)},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b),this.afterCardCreated(a)}},setSelect:function(a){this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.showIndex!==a&&(this.showIndex=a,BI.nextTick(BI.bind(this.afterCardShow,this,a)))},getSelect:function(){return this.showIndex},getSelectedCard:function(){if(BI.isKey(this.showIndex))return this.cardMap[this.showIndex]},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){BI.Navigation.superclass.destroy.apply(this,arguments)}}),BI.Navigation.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.navigation",BI.Navigation),BI.Searcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-searcher",lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,isDefaultInit:!1,isAutoSearch:!0,isAutoSync:!0,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,onSearch:function(a,b){b([])},el:{type:"bi.search_editor"},popup:{type:"bi.searcher_view"},adapter:null,masker:{offset:{}}})},_init:function(){BI.Searcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.search_editor"}),BI.createWidget({type:"bi.vertical",element:this,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:[this.editor]}),b.isDefaultInit&&this._assertPopupView();var c=BI.debounce(BI.bind(this._search,this),BI.EVENT_RESPONSE_TIME,!0);this.editor.on(BI.Controller.EVENT_CHANGE,function(b){switch(b){case BI.Events.STARTEDIT:a._startSearch();break;case BI.Events.EMPTY:a._stopSearch();break;case BI.Events.CHANGE:c();break;case BI.Events.PAUSE:a._pauseSearch()}})},_assertPopupView:function(){var a=this,b=this.options;(b.masker&&!BI.Maskers.has(this.getName())||b.masker===!1&&!this.popupView)&&(this.popupView=BI.createWidget(b.popup,{type:"bi.searcher_view",chooseType:b.chooseType}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(c,d,e){if(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),c===BI.Events.CLICK){if(b.isAutoSync){var f=b.adapter&&b.adapter.getValue();if(e.isSelected())switch(b.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.adapter&&b.adapter.setValue([e.getValue()]);break;case BI.ButtonGroup.CHOOSE_TYPE_MULTI:f.push(e.getValue()),b.adapter&&b.adapter.setValue(f)}else b.adapter&&b.adapter.setValue(BI.deepWithout(f,e.getValue()))}a.fireEvent(BI.Searcher.EVENT_CHANGE,d,e)}}),BI.nextTick(function(){a.fireEvent(BI.Searcher.EVENT_AFTER_INIT)})),b.masker&&!BI.Maskers.has(this.getName())&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this,render:this.popupView},b.masker))},_startSearch:function(){this._assertPopupView(),this._stop=!1,this._isSearching=!0,this.fireEvent(BI.Searcher.EVENT_START),this.popupView.startSearch&&this.popupView.startSearch(),BI.nextTick(function(a){BI.Maskers.show(a)},this.getName())},_pauseSearch:function(){this.options,this.getName();this._stop=!0,BI.nextTick(function(a){BI.Maskers.hide(a)},this.getName()),this._isSearching===!0&&(this.popupView&&this.popupView.pauseSearch&&this.popupView.pauseSearch(),this.fireEvent(BI.Searcher.EVENT_PAUSE)),this._isSearching=!1},_stopSearch:function(){var a=(this.options,this.getName());this._stop=!0,BI.Maskers.hide(a),this._isSearching===!0&&(this.popupView&&this.popupView.stopSearch&&this.popupView.stopSearch(),this.fireEvent(BI.Searcher.EVENT_STOP)),this._isSearching=!1},_search:function(){var a=this,b=this.options,c=this.editor.getValue();if(""!==c&&!this._stop){if(b.isAutoSearch){var d=b.adapter&&(b.adapter.getItems&&b.adapter.getItems()||b.adapter.attr("items"))||[],e=BI.Func.getSearchResult(d,c),f=e.matched,g=e.finded;return this.popupView.populate(g,f,c),b.isAutoSync&&b.adapter&&b.adapter.getValue&&this.popupView.setValue(b.adapter.getValue()),void a.fireEvent(BI.Searcher.EVENT_SEARCHING)}this.popupView.loading&&this.popupView.loading(),b.onSearch({times:1,keyword:c,selectedValues:b.adapter&&b.adapter.getValue()},function(d,e){if(!a._stop){var f=[].slice.call(arguments);f.length>0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(a){this._assertPopupView(),this.popupView&&this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Maskers.remove(this.getName()),BI.Searcher.superclass.destroy.apply(this,arguments)}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher),BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.switcher.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView?this.popupView.getValue():[]},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher),BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab),BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),function(a){this.CodeMirror=a()}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?He(d):{},He(Vf,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new rg(e,d.mode)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!xf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ze,keySeq:null,specialChars:null};var i=this;nf&&of<11&&setTimeout(function(){i.display.input.reset(!0)},20),Pb(this),Te(),tb(this),this.curOp.forceUpdate=!0,Ud(this,e),d.autofocus&&!xf||i.hasFocus()?setTimeout(Ie(nc,this),20):oc(this);for(var k in Wf)Wf.hasOwnProperty(k)&&Wf[k](this,d[k],Xf);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<_f.length;++l)_f[l](this);vb(this),pf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Me("div",null,"CodeMirror-code"),d.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Me("div",null,"CodeMirror-cursors"),d.measure=Me("div",null,"CodeMirror-measure"),d.lineMeasure=Me("div",null,"CodeMirror-measure"),d.lineSpace=Me("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Me("div",[Me("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Me("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Me("div",null,null,"position: absolute; height: "+Bg+"px; width: 1px;"),d.gutters=Me("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Me("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Me("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),nf&&of<8&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),pf||kf&&xf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ma(a,100),a.state.modeGen++,a.curOp&&Ib(a)}function e(a){a.options.lineWrapping?(Rg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Qg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Ib(a),gb(a),setTimeout(function(){s(a)},100)}function f(a){var b=rb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/sb(a.display)-3);return function(e){if(sd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function g(a){var b=a.doc,c=f(a);b.iter(function(a){var b=c(a);b!=a.height&&Yd(a,b)})}function h(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gb(a)}function i(a){j(a),Ib(a),setTimeout(function(){v(a)},20)}function j(a){var b=a.display.gutters,c=a.options.gutters;Ne(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Me("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none",k(a)}function k(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px"}function l(a){if(0==a.height)return 0;for(var b,c=a.text.length,d=a;b=ld(d);){var e=b.find(0,!0);d=e.from.line,c+=e.from.ch-e.to.ch}for(d=a;b=md(d);){var e=b.find(0,!0);c-=d.text.length-e.from.ch,d=e.to.line,c+=d.text.length-e.to.ch}return c}function m(a){var b=a.display,c=a.doc;b.maxLine=Vd(c,c.first),b.maxLineLength=l(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=l(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=De(a.gutters,"CodeMirror-linenumbers");b==-1&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ra(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ta(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),xg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),xg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedOverlay=!1,nf&&of<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Qg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),xg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?bc(b,a):ac(b,a)},b),b.display.scrollbars.addClass&&Rg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;e<4&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Qa(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=$d(b,d),g=$d(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;h<f?(f=h,g=$d(b,_d(Vd(b,h))+a.wrapper.clientHeight)):Math.min(i,b.lastLine())>=g&&(f=$d(b,_d(Vd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view; +if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function w(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=x(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Me("div",[Me("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g)+1,d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",k(a),!0}return!1}function x(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function y(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function z(a,b,c){var d=a.display;this.viewport=b,this.visible=u(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Ua(a),this.force=c,this.dims=H(a),this.events=[]}function A(a){var b=a.display;!b.scrollbarsClipped&&b.scroller.offsetWidth&&(b.nativeBarWidth=b.scroller.offsetWidth-b.scroller.clientWidth,b.heightForcer.style.height=Ta(a)+"px",b.sizer.style.marginBottom=-b.nativeBarWidth+"px",b.sizer.style.borderRightWidth=Ta(a)+"px",b.scrollbarsClipped=!0)}function B(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Kb(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Ob(a))return!1;w(a)&&(Kb(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&f-c.viewFrom<20&&(f=Math.max(d.first,c.viewFrom)),c.viewTo>g&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Ef&&(f=qd(a.doc,f),g=rd(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Nb(a,f,g),c.viewOffset=_d(Vd(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Ob(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Pe();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Pe()!=j&&j.offsetHeight&&j.focus(),Ne(c.cursorDiv),Ne(c.selectionDiv),c.gutters.style.height=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Ma(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Ua(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ra(a.display)-Va(a),c.top)}),b.visible=u(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&B(a,b);d=!1){F(a);var e=o(a);Ha(a),E(a,e),s(a,e)}b.signal(a,"update",a),a.display.viewFrom==a.display.reportedViewFrom&&a.display.viewTo==a.display.reportedViewTo||(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Ha(a),E(a,d),s(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px",a.display.gutters.style.height=Math.max(c+Ta(a),b.clientHeight)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d<b.view.length;d++){var e,f=b.view[d];if(!f.hidden){if(nf&&of<8){var g=f.node.offsetTop+f.node.offsetHeight;e=g-c,c=g}else{var h=f.node.getBoundingClientRect();e=h.bottom-h.top}var i=f.line.height-e;if(e<2&&(e=rb(b)),(i>.001||i<-.001)&&(Yd(f.line,e),G(f.line),f.rest))for(var j=0;j<f.rest.length;j++)G(f.rest[j])}}}function G(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function H(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:y(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function I(a,b,c){function d(b){var c=b.nextSibling;return pf&&yf&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,i=e.view,j=e.viewFrom,k=0;k<i.length;k++){var l=i[k];if(l.hidden);else if(l.node&&l.node.parentNode==g){for(;h!=l.node;)h=d(h);var m=f&&null!=b&&b<=j&&l.lineNumber;l.changes&&(De(l.changes,"gutter")>-1&&(m=!1),J(a,l,j,c)),m&&(Ne(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?N(a,b):"gutter"==f?P(a,b,c,d):"class"==f?O(b):"widget"==f&&Q(a,b,d)}b.changes=null}function K(a){return a.node==a.text&&(a.node=Me("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),nf&&of<8&&(a.node.style.zIndex=2)),a.node}function L(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=K(a);a.background=c.insertBefore(Me("div",null,b),c.firstChild)}}function M(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Id(a,b)}function N(a,b){var c=b.text.className,d=M(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,O(b)):c&&(b.text.className=c)}function O(a){L(a),a.line.wrapClass?K(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function P(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=K(b),g=b.gutter=Me("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");if(a.display.input.setUneditable(g),f.insertBefore(g,b.text),b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Me("div",x(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=e.hasOwnProperty(i)&&e[i];j&&g.appendChild(Me("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function Q(a,b,c){b.alignable&&(b.alignable=null);for(var d,e=b.node.firstChild;e;e=d){var d=e.nextSibling;"CodeMirror-linewidget"==e.className&&b.node.removeChild(e)}S(a,b,c)}function R(a,b,c,d){var e=M(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),O(b),P(a,b,c,d),S(a,b,d),b.node}function S(a,b,c){if(T(a,b.line,b,c,!0),b.rest)for(var d=0;d<b.rest.length;d++)T(a,b.rest[d],b,c,!1)}function T(a,b,c,d,e){if(b.widgets)for(var f=K(c),g=0,h=b.widgets;g<h.length;++g){var i=h[g],j=Me("div",[i.node],"CodeMirror-linewidget");i.handleMouseEvents||j.setAttribute("cm-ignore-events","true"),U(i,j,c,d),a.display.input.setUneditable(j),e&&i.above?f.insertBefore(j,c.gutter||c.text):f.appendChild(j),te(i,"redraw")}}function U(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function V(a){return Ff(a.line,a.ch)}function W(a,b){return Gf(a,b)<0?b:a}function X(a,b){return Gf(a,b)<0?a:b}function Y(a){a.state.focused||(a.display.input.focus(),nc(a))}function Z(a){return a.options.readOnly||a.doc.cantEdit}function $(a,b,c,d,e){var f=a.doc;a.display.shift=!1,d||(d=f.sel);var g=a.state.pasteIncoming||"paste"==e,h=Ug(b),i=null;g&&d.ranges.length>1&&(Hf&&Hf.join("\n")==b?i=d.ranges.length%Hf.length==0&&Ee(Hf,Ug):h.length==d.ranges.length&&(i=Ee(h,function(a){return[a]})));for(var j=d.ranges.length-1;j>=0;j--){var k=d.ranges[j],l=k.from(),m=k.to();k.empty()&&(c&&c>0?l=Ff(l.line,l.ch-c):a.state.overwrite&&!g&&(m=Ff(m.line,Math.min(Vd(f,m.line).text.length,m.ch+Ce(h).length))));var n=a.curOp.updateInput,o={from:l,to:m,text:i?i[j%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};wc(a.doc,o),te(a,"inputRead",a,o)}b&&!g&&aa(a,b),Ic(a),a.curOp.updateInput=n,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function _(a,b){var c=a.clipboardData&&a.clipboardData.getData("text/plain");if(c)return a.preventDefault(),Cb(b,function(){$(b,c,0,null,"paste")}),!0}function aa(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h<f.electricChars.length;h++)if(b.indexOf(f.electricChars.charAt(h))>-1){g=Kc(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(Vd(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Kc(a,e.head.line,"smart"));g&&te(a,"electricInput",a,e.head.line)}}}function ba(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line,f={anchor:Ff(e,0),head:Ff(e+1,0)};c.push(f),b.push(a.getRange(f.anchor,f.head))}return{text:b,ranges:c}}function ca(a){a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false")}function da(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ze,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ea(){var a=Me("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),b=Me("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pf?a.style.width="1000px":a.setAttribute("wrap","off"),wf&&(a.style.border="1px solid black"),ca(a),b}function fa(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ze,this.gracePeriod=!1}function ga(a,b){var c=$a(a,b.line);if(!c||c.hidden)return null;var d=Vd(a.doc,b.line),e=Xa(c,d,b.line),f=ae(d),g="left";if(f){var h=ff(f,b.ch);g=h%2?"right":"left"}var i=bb(e.map,b.ch,g);return i.offset="right"==i.collapse?i.end:i.start,i}function ha(a,b){return b&&(a.bad=!0),a}function ia(a,b,c){var d;if(b==a.display.lineDiv){if(d=a.display.lineDiv.childNodes[c],!d)return ha(a.clipPos(Ff(a.display.viewTo-1)),!0);b=null,c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=a.display.view[e];if(f.node==d)return ja(f,b,c)}}function ja(a,b,c){function d(b,c,d){for(var e=-1;e<(k?k.length:0);e++)for(var f=e<0?j.map:k[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==c){var i=Zd(e<0?a.line:a.rest[e]),l=f[g]+d;return(d<0||h!=b)&&(l=f[g+(d?1:0)]),Ff(i,l)}}}var e=a.text.firstChild,f=!1;if(!b||!Ng(e,b))return ha(Ff(Zd(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b)){var g=a.rest?Ce(a.rest):a.line;return ha(Ff(Zd(g),g.text.length),f)}var h=3==b.nodeType?b:null,i=b;for(h||1!=b.childNodes.length||3!=b.firstChild.nodeType||(h=b.firstChild,c&&(c=h.nodeValue.length));i.parentNode!=e;)i=i.parentNode;var j=a.measure,k=j.maps,l=d(h,i,c);if(l)return ha(l,f);for(var m=i.nextSibling,n=h?h.nodeValue.length-c:0;m;m=m.nextSibling){if(l=d(m,m.firstChild,0))return ha(Ff(l.line,l.ch-n),f);n+=m.textContent.length}for(var o=i.previousSibling,n=c;o;o=o.previousSibling){if(l=d(o,o.firstChild,-1))return ha(Ff(l.line,l.ch+n),f);n+=m.textContent.length}}function ka(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return""==c&&(c=b.textContent.replace(/\u200b/g,"")),void(h+=c);var j,k=b.getAttribute("cm-marker");if(k){var l=a.findMarks(Ff(d,0),Ff(e+1,0),f(+k));return void(l.length&&(j=l[0].find())&&(h+=Wd(a.doc,j.from,j.to).join("\n")))}if("false"==b.getAttribute("contenteditable"))return;for(var m=0;m<b.childNodes.length;m++)g(b.childNodes[m]);/^(pre|div|p)$/i.test(b.nodeName)&&(i=!0)}else if(3==b.nodeType){var n=b.nodeValue;if(!n)return;i&&(h+="\n",i=!1),h+=n}}for(var h="",i=!1;g(b),b!=c;)b=b.nextSibling;return h}function la(a,b){this.ranges=a,this.primIndex=b}function ma(a,b){this.anchor=a,this.head=b}function na(a,b){var c=a[b];a.sort(function(a,b){return Gf(a.from(),b.from())}),b=De(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(Gf(f.to(),e.from())>=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;d<=b&&--b,a.splice(--d,2,new ma(i?h:g,i?g:h))}}return new la(a,b)}function oa(a,b){return new la([new ma(a,b||a)],0)}function pa(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function qa(a,b){if(b.line<a.first)return Ff(a.first,0);var c=a.first+a.size-1;return b.line>c?Ff(c,Vd(a,c).text.length):ra(b,Vd(a,b.line).text.length)}function ra(a,b){var c=a.ch;return null==c||c>b?Ff(a.line,b):c<0?Ff(a.line,0):a}function sa(a,b){return b>=a.first&&b<a.first+a.size}function ta(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=qa(a,b[d]);return c}function ua(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=Gf(c,e)<0;f!=Gf(d,e)<0?(e=c,c=d):f!=Gf(c,d)<0&&(c=d)}return new ma(e,c)}return new ma(d||c,c)}function va(a,b,c,d){Ba(a,new la([ua(a,a.sel.primary(),b,c)],0),d)}function wa(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=ua(a,a.sel.ranges[e],b[e],null);var f=na(d,a.sel.primIndex);Ba(a,f,c)}function xa(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,Ba(a,na(e,a.sel.primIndex),d)}function ya(a,b,c,d){Ba(a,oa(b,c),d)}function za(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new ma(qa(a,b[c].anchor),qa(a,b[c].head))}};return zg(a,"beforeSelectionChange",a,c),a.cm&&zg(a.cm,"beforeSelectionChange",a.cm,c),c.ranges!=b.ranges?na(c.ranges,c.ranges.length-1):b}function Aa(a,b,c){var d=a.history.done,e=Ce(d);e&&e.ranges?(d[d.length-1]=b,Ca(a,b,c)):Ba(a,b,c)}function Ba(a,b,c){Ca(a,b,c),he(a,a.sel,a.cm?a.cm.curOp.id:NaN,c)}function Ca(a,b,c){(xe(a,"beforeSelectionChange")||a.cm&&xe(a.cm,"beforeSelectionChange"))&&(b=za(a,b));var d=c&&c.bias||(Gf(b.primary().head,a.sel.primary().head)<0?-1:1);Da(a,Fa(a,b,d,!0)),c&&c.scroll===!1||!a.cm||Ic(a.cm)}function Da(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,we(a.cm)),te(a,"cursorActivity",a))}function Ea(a){Da(a,Fa(a,a.sel,null,!1),Dg)}function Fa(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Ga(a,g.anchor,c,d),i=Ga(a,g.head,c,d);(e||h!=g.anchor||i!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new ma(h,i))}return e?na(e,b.primIndex):b}function Ga(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=Vd(a,f.line);if(h.markedSpans)for(var i=0;i<h.markedSpans.length;++i){var j=h.markedSpans[i],k=j.marker;if((null==j.from||(k.inclusiveLeft?j.from<=f.ch:j.from<f.ch))&&(null==j.to||(k.inclusiveRight?j.to>=f.ch:j.to>f.ch))){if(d&&(zg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(g<0?-1:1);if(0==Gf(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?qa(a,Ff(l.line-1)):null:l.ch>h.text.length&&(l=l.line<a.first+a.size-1?Ff(l.line+1,0):null),!l)){if(e)return d?(a.cantEdit=!0,Ff(a.first,0)):Ga(a,b,c,!0);e=!0,l=b,g=-g}f=l;continue a}}return f}}function Ha(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ia(a,b){for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(b!==!1||g!=c.sel.primIndex){var h=c.sel.ranges[g],i=h.empty();(i||a.options.showCursorWhenSelecting)&&Ja(a,h,e),i||Ka(a,h,f)}return d}function Ja(a,b,c){var d=mb(a,b.head,"div",null,null,!a.options.singleCursorHeightPerLine),e=c.appendChild(Me("div"," ","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Me("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Ka(a,b,c){function d(a,b,c,d){b<0&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Me("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return lb(a,Ff(b,c),"div",l,d)}var h,i,l=Vd(g,b),m=l.text.length;return Ye(ae(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottom<l.top&&d(n,p.bottom,null,l.top)),null==e&&b==m&&(o=k),(!h||p.top<h.top||p.top==h.top&&p.left<h.left)&&(h=p),(!i||l.bottom>i.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),n<j+1&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Sa(a.display),j=i.left,k=Math.max(f.sizerWidth,Ua(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Vd(g,l.line),o=Vd(g,m.line),p=od(n)==od(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(d(q.right,q.top,null,q.bottom),d(j,r.top,r.left,r.bottom)):d(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&d(j,q.bottom,null,r.top)}c.appendChild(h)}function La(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ma(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Ie(Na,a))}function Na(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=bg(b.mode,Pa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=Ed(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&l<g.length;++l)k=g[l]!=f.styles[l];k&&e.push(b.frontier),f.stateAfter=bg(b.mode,d)}else Gd(a,f.text,d),f.stateAfter=b.frontier%5==0?bg(b.mode,d):null;if(++b.frontier,+new Date>c)return Ma(a,a.options.workDelay),!0}),e.length&&Cb(a,function(){for(var b=0;b<e.length;b++)Jb(a,e[b],"text")})}}function Oa(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Vd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Gg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Pa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Oa(a,b,c),g=f>d.first&&Vd(d,f-1).stateAfter;return g=g?bg(d.mode,g):cg(d.mode),d.iter(f,b,function(c){Gd(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?bg(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Qa(a){return a.lineSpace.offsetTop}function Ra(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Sa(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Oe(a.measure,Me("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function Ta(a){return Bg-a.display.nativeBarWidth}function Ua(a){return a.display.scroller.clientWidth-Ta(a)-a.display.barWidth}function Va(a){return a.display.scroller.clientHeight-Ta(a)-a.display.barHeight}function Wa(a,b,c){var d=a.options.lineWrapping,e=d&&Ua(a);if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Xa(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(Zd(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Ya(a,b){b=od(b);var c=Zd(b),d=a.display.externalMeasured=new Gb(a.doc,b,c);d.lineN=c;var e=d.built=Id(a,d);return d.text=e.pre,Oe(a.display.lineMeasure,e.pre),d}function Za(a,b,c,d){return ab(a,_a(a,b),c,d)}function $a(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Lb(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function _a(a,b){var c=Zd(b),d=$a(a,c);d&&!d.text?d=null:d&&d.changes&&J(a,d,c,H(a)),d||(d=Ya(a,b));var e=Xa(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function ab(a,b,c,d,e){b.before&&(c=-1);var f,g=c+(d||"");return b.cache.hasOwnProperty(g)?f=b.cache[g]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(Wa(a,b.view,b.rect),b.hasHeights=!0),f=cb(a,b,c,d),f.bogus||(b.cache[g]=f)),{left:f.left,right:f.right,top:e?f.rtop:f.top,bottom:e?f.rbottom:f.bottom}}function bb(a,b,c){for(var d,e,f,g,h=0;h<a.length;h+=3){var i=a[h],j=a[h+1];if(b<i?(e=0,f=1,g="left"):b<j?(e=b-i,f=e+1):(h==a.length-3||b==j&&a[h+3]>b)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;h<a.length-3&&a[h+3]==a[h+4]&&!a[h+5].insertLeft;)d=a[(h+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:i,coverEnd:j}}function cb(a,b,c,d){var e,f=bb(b.map,c,d),g=f.node,h=f.start,i=f.end,j=f.collapse;if(3==g.nodeType){for(var k=0;k<4;k++){for(;h&&Le(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+i<f.coverEnd&&Le(b.line.text.charAt(f.coverStart+i));)++i;if(nf&&of<9&&0==h&&i==f.coverEnd-f.coverStart)e=g.parentNode.getBoundingClientRect();else if(nf&&a.options.lineWrapping){var l=Jg(g,h,i).getClientRects();e=l.length?l["right"==d?l.length-1:0]:Lf}else e=Jg(g,h,i).getBoundingClientRect()||Lf;if(e.left||e.right||0==h)break;i=h,h-=1,j="right"}nf&&of<11&&(e=db(a.display.measure,e))}else{h>0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(nf&&of<9&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+sb(a.display),top:m.top,bottom:m.bottom}:Lf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;k<q.length-1&&!(p<q[k]);k++);var r=k?q[k-1]:0,s=q[k],t={left:("right"==j?e.right:e.left)-b.rect.left,right:("left"==j?e.left:e.right)-b.rect.left,top:r,bottom:s};return e.left||e.right||(t.bogus=!0),a.options.singleCursorHeightPerLine||(t.rtop=n,t.rbottom=o),t}function db(a,b){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Xe(a))return b;var c=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*c,right:b.right*c,top:b.top*d,bottom:b.bottom*d}}function eb(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function fb(a){a.display.externalMeasure=null,Ne(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)eb(a.display.view[b])}function gb(a){fb(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function hb(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ib(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function jb(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=vd(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=_d(b);if("local"==d?g+=Qa(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:ib());var i=h.left+("window"==d?0:hb());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function kb(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=hb(),e-=ib();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function lb(a,b,c,d,e){return d||(d=Vd(a.doc,b.line)),jb(a,d,Za(a,d,b.ch,e),c)}function mb(a,b,c,d,e,f){function g(b,g){var h=ab(a,e,b,g?"right":"left",f);return g?h.left=h.right:h.right=h.left,jb(a,d,h,c)}function h(a,b){var c=i[b],d=c.level%2;return a==Ze(c)&&b&&c.level<i[b-1].level?(c=i[--b],a=$e(c)-(c.level%2?0:1),d=!0):a==$e(c)&&b<i.length-1&&c.level<i[b+1].level&&(c=i[++b],a=Ze(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||Vd(a.doc,b.line),e||(e=_a(a,d));var i=ae(d),j=b.ch;if(!i)return g(j);var k=ff(i,j),l=h(j,k);return null!=Zg&&(l.other=h(j,Zg)),l}function nb(a,b){var c=0,b=qa(a.doc,b);a.options.lineWrapping||(c=sb(a.display)*b.ch);var d=Vd(a.doc,b.line),e=_d(d)+Qa(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function ob(a,b,c,d){var e=Ff(a,b);return e.xRel=d,c&&(e.outside=!0),e}function pb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,c<0)return ob(d.first,0,!0,-1);var e=$d(d,c),f=d.first+d.size-1;if(e>f)return ob(d.first+d.size-1,Vd(d,f).text.length,!0,1);b<0&&(b=0);for(var g=Vd(d,e);;){var h=qb(a,g,e,b,c),i=md(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Zd(g=j.to.line)}}function qb(a,b,c,d,e){function f(d){var e=mb(a,Ff(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:g<e.top?e.left+i:(h=!1,e.left)}var g=e-_d(b),h=!1,i=2*a.display.wrapper.clientWidth,j=_a(a,b),k=ae(b),l=b.text.length,m=_e(b),n=af(b),o=f(m),p=h,q=f(n),r=h;if(d>q)return ob(c,n,r,1);for(;;){if(k?n==m||n==hf(b,m,1):n-m<=1){for(var s=d<o||d-o<=q-d?m:n,t=d-(s==m?o:q);Le(b.text.charAt(s));)++s;var u=ob(c,s,s==m?p:r,t<-1?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;x<v;++x)w=hf(b,w,1)}var y=f(w);y>d?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function rb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==If){If=Me("pre");for(var b=0;b<49;++b)If.appendChild(document.createTextNode("x")),If.appendChild(Me("br"));If.appendChild(document.createTextNode("x"))}Oe(a.measure,If);var c=If.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Ne(a.measure),c||1}function sb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Me("span","xxxxxxxxxx"),c=Me("pre",[b]);Oe(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function tb(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Nf},Mf?Mf.ops.push(a.curOp):a.curOp.ownsGroup=Mf={ops:[a.curOp],delayedCallbacks:[]}}function ub(a){var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c]();for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++](e.cm)}}while(c<b.length)}function vb(a){var b=a.curOp,c=b.ownsGroup;if(c)try{ub(c)}finally{Mf=null;for(var d=0;d<c.ops.length;d++)c.ops[d].cm.curOp=null;wb(c)}}function wb(a){for(var b=a.ops,c=0;c<b.length;c++)xb(b[c]);for(var c=0;c<b.length;c++)yb(b[c]);for(var c=0;c<b.length;c++)zb(b[c]);for(var c=0;c<b.length;c++)Ab(b[c]);for(var c=0;c<b.length;c++)Bb(b[c])}function xb(a){var b=a.cm,c=b.display;A(b),a.updateMaxLine&&m(b),a.mustUpdate=a.viewChanged||a.forceUpdate||null!=a.scrollTop||a.scrollToPos&&(a.scrollToPos.from.line<c.viewFrom||a.scrollToPos.to.line>=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function yb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function zb(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=Za(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ta(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Ua(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection())}function Ab(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&bc(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1),a.preparedSelection&&b.display.input.showSelection(a.preparedSelection),a.updatedDisplay&&E(b,a.barMeasure),(a.updatedDisplay||a.startHeight!=b.doc.height)&&s(b,a.barMeasure),a.selectionChanged&&La(b),b.state.focused&&a.updateInput&&b.display.input.reset(a.typing),a.focus&&a.focus==Pe()&&Y(a.cm)}function Bb(a){var b=a.cm,c=b.display,d=b.doc;if(a.updatedDisplay&&C(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null==a.scrollTop||c.scroller.scrollTop==a.scrollTop&&!a.forceScroll||(d.scrollTop=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop)),c.scrollbars.setScrollTop(d.scrollTop),c.scroller.scrollTop=d.scrollTop),null==a.scrollLeft||c.scroller.scrollLeft==a.scrollLeft&&!a.forceScroll||(d.scrollLeft=Math.max(0,Math.min(c.scroller.scrollWidth-Ua(b),a.scrollLeft)),c.scrollbars.setScrollLeft(d.scrollLeft),c.scroller.scrollLeft=d.scrollLeft,v(b)),a.scrollToPos){var e=Ec(b,qa(d,a.scrollToPos.from),qa(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Dc(b,e)}var f=a.maybeHiddenMarkers,g=a.maybeUnhiddenMarkers;if(f)for(var h=0;h<f.length;++h)f[h].lines.length||zg(f[h],"hide");if(g)for(var h=0;h<g.length;++h)g[h].lines.length&&zg(g[h],"unhide");c.wrapper.offsetHeight&&(d.scrollTop=b.display.scroller.scrollTop),a.changeObjs&&zg(b,"changes",b,a.changeObjs),a.update&&a.update.finish()}function Cb(a,b){if(a.curOp)return b();tb(a);try{return b()}finally{vb(a)}}function Db(a,b){return function(){if(a.curOp)return b.apply(a,arguments);tb(a);try{return b.apply(a,arguments); +}finally{vb(a)}}}function Eb(a){return function(){if(this.curOp)return a.apply(this,arguments);tb(this);try{return a.apply(this,arguments)}finally{vb(this)}}}function Fb(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);tb(b);try{return a.apply(this,arguments)}finally{vb(b)}}}function Gb(a,b,c){this.line=b,this.rest=pd(b),this.size=this.rest?Zd(Ce(this.rest))-c+1:1,this.node=this.text=null,this.hidden=sd(a,b)}function Hb(a,b,c){for(var d,e=[],f=b;f<c;f=d){var g=new Gb(a.doc,Vd(a.doc,f),f);d=f+g.size,e.push(g)}return e}function Ib(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)Ef&&qd(a.doc,b)<e.viewTo&&Kb(a);else if(c<=e.viewFrom)Ef&&rd(a.doc,c+d)>e.viewFrom?Kb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Kb(a);else if(b<=e.viewFrom){var f=Mb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Kb(a)}else if(c>=e.viewTo){var f=Mb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Kb(a)}else{var g=Mb(a,b,b,-1),h=Mb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Hb(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Kb(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Jb(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Lb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);De(g,c)==-1&&g.push(c)}}}function Kb(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Lb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,b<0)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,b<0)return d}function Mb(a,b,c,d){var e,f=Lb(a,b),g=a.display.view;if(!Ef||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=0,i=a.display.viewFrom;h<f;h++)i+=g[h].size;if(i!=b){if(d>0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;qd(a.doc,c)!=c;){if(f==(d<0?0:g.length-1))return null;c+=d*g[f-(d<0?1:0)].size,f+=d}return{index:f,lineN:c}}function Nb(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Hb(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Hb(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Lb(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Hb(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Lb(a,c)))),d.viewTo=c}function Ob(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Pb(a){function b(){e.activeTouch&&(f=setTimeout(function(){e.activeTouch=null},1e3),g=e.activeTouch,g.end=+new Date)}function c(a){if(1!=a.touches.length)return!1;var b=a.touches[0];return b.radiusX<=1&&b.radiusY<=1}function d(a,b){if(null==b.left)return!0;var c=b.left-a.left,d=b.top-a.top;return c*c+d*d>400}var e=a.display;xg(e.scroller,"mousedown",Db(a,Ub)),nf&&of<11?xg(e.scroller,"dblclick",Db(a,function(b){if(!ve(a,b)){var c=Tb(a,b);if(c&&!Zb(a,b)&&!Sb(a.display,b)){ug(b);var d=a.findWordAt(c);va(a.doc,d.anchor,d.head)}}})):xg(e.scroller,"dblclick",function(b){ve(a,b)||ug(b)}),Cf||xg(e.scroller,"contextmenu",function(b){pc(a,b)});var f,g={end:0};xg(e.scroller,"touchstart",function(a){if(!c(a)){clearTimeout(f);var b=+new Date;e.activeTouch={start:b,moved:!1,prev:b-g.end<=300?g:null},1==a.touches.length&&(e.activeTouch.left=a.touches[0].pageX,e.activeTouch.top=a.touches[0].pageY)}}),xg(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),xg(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Sb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new ma(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new ma(Ff(h.line,0),qa(a.doc,Ff(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),ug(c)}b()}),xg(e.scroller,"touchcancel",b),xg(e.scroller,"scroll",function(){e.scroller.clientHeight&&(ac(a,e.scroller.scrollTop),bc(a,e.scroller.scrollLeft,!0),zg(a,"scroll",a))}),xg(e.scroller,"mousewheel",function(b){cc(a,b)}),xg(e.scroller,"DOMMouseScroll",function(b){cc(a,b)}),xg(e.wrapper,"scroll",function(){e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={simple:function(b){ve(a,b)||wg(b)},start:function(b){_b(a,b)},drop:Db(a,$b)};var h=e.input.getField();xg(h,"keyup",function(b){kc.call(a,b)}),xg(h,"keydown",Db(a,ic)),xg(h,"keypress",Db(a,lc)),xg(h,"focus",Ie(nc,a)),xg(h,"blur",Ie(oc,a))}function Qb(b,c,d){var e=d&&d!=a.Init;if(!c!=!e){var f=b.display.dragFunctions,g=c?xg:yg;g(b.display.scroller,"dragstart",f.start),g(b.display.scroller,"dragenter",f.simple),g(b.display.scroller,"dragover",f.simple),g(b.display.scroller,"drop",f.drop)}}function Rb(a){var b=a.display;b.lastWrapHeight==b.wrapper.clientHeight&&b.lastWrapWidth==b.wrapper.clientWidth||(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize())}function Sb(a,b){for(var c=re(b);c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Tb(a,b,c,d){var e=a.display;if(!c&&"true"==re(b).getAttribute("cm-not-content"))return null;var f,g,h=e.lineSpace.getBoundingClientRect();try{f=b.clientX-h.left,g=b.clientY-h.top}catch(b){return null}var i,j=pb(a,f,g);if(d&&1==j.xRel&&(i=Vd(a.doc,j.line).text).length==j.ch){var k=Gg(i,i.length,a.options.tabSize)-i.length;j=Ff(j.line,Math.max(0,Math.round((f-Sa(a.display).left)/sb(a.display))-k))}return j}function Ub(a){var b=this,c=b.display;if(!(c.activeTouch&&c.input.supportsTouch()||ve(b,a))){if(c.shift=a.shiftKey,Sb(c,a))return void(pf||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)));if(!Zb(b,a)){var d=Tb(b,a);switch(window.focus(),se(a)){case 1:d?Vb(b,a,d):re(a)==c.scroller&&ug(a);break;case 2:pf&&(b.state.lastMiddleDown=+new Date),d&&va(b.doc,d),setTimeout(function(){c.input.focus()},20),ug(a);break;case 3:Cf?pc(b,a):mc(b)}}}}function Vb(a,b,c){nf?setTimeout(Ie(Y,a),0):a.curOp.focus=Pe();var d,e=+new Date;Kf&&Kf.time>e-400&&0==Gf(Kf.pos,c)?d="triple":Jf&&Jf.time>e-400&&0==Gf(Jf.pos,c)?(d="double",Kf={time:e,pos:c}):(d="single",Jf={time:e,pos:c});var f,g=a.doc.sel,h=yf?b.metaKey:b.ctrlKey;a.options.dragDrop&&Tg&&!Z(a)&&"single"==d&&(f=g.contains(c))>-1&&(Gf((f=g.ranges[f]).from(),c)<0||c.xRel>0)&&(Gf(f.to(),c)>0||c.xRel<0)?Wb(a,b,c,h):Xb(a,b,c,d,h)}function Wb(a,b,c,d){var e=a.display,f=+new Date,g=Db(a,function(h){pf&&(e.scroller.draggable=!1),a.state.draggingText=!1,yg(document,"mouseup",g),yg(e.scroller,"drop",g),Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)<10&&(ug(h),!d&&+new Date-200<f&&va(a.doc,c),pf||nf&&9==of?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});pf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),xg(document,"mouseup",g),xg(e.scroller,"drop",g)}function Xb(a,b,c,d,e){function f(b){if(0!=Gf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Gg(Vd(j,c.line).text,c.ch,f),h=Gg(Vd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));o<=p;o++){var r=Vd(j,o).text,s=Ae(r,i,f);i==n?e.push(new ma(Ff(o,s),Ff(o,s))):r.length>s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.line<h.from)&&setTimeout(Db(a,function(){s==c&&g(b)}),150)}else{var k=b.clientY<r.top?-20:b.clientY>r.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j<a.options.gutters.length;++j){var k=h.gutters.childNodes[j];if(k&&k.getBoundingClientRect().right>=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i<e;++i)h(d[i],i);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;i<j.length;++i)Cc(b.doc,"",j[i].anchor,j[i].head,"drag");b.replaceSelection(f,"around","paste"),b.display.input.focus()}}catch(a){}}}}function _b(a,b){if(nf&&(!a.state.draggingText||+new Date-Of<100))return void wg(b);if(!ve(a,b)&&!Sb(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.setDragImage&&!tf)){var c=Me("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",sf&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop),b.dataTransfer.setDragImage(c,0,0),sf&&c.parentNode.removeChild(c)}}function ac(a,b){Math.abs(a.doc.scrollTop-b)<2||(a.doc.scrollTop=b,kf||D(a,{top:b}),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbars.setScrollTop(b),kf&&D(a),Ma(a,100))}function bc(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,v(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function cc(a,b){var c=Rf(b),d=c.x,e=c.y,f=a.display,g=f.scroller;if(d&&g.scrollWidth>g.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j<i.length;j++)if(i[j].node==h){a.display.currentWheelTarget=h;break a}if(d&&!kf&&!sf&&null!=Qf)return e&&ac(a,Math.max(0,Math.min(g.scrollTop+e*Qf,g.scrollHeight-g.clientHeight))),bc(a,Math.max(0,Math.min(g.scrollLeft+d*Qf,g.scrollWidth-g.clientWidth))),ug(b),void(f.wheelStartX=null);if(e&&null!=Qf){var k=e*Qf,l=a.doc.scrollTop,m=l+f.wrapper.clientHeight;k<0?l=Math.max(0,l+k-50):m=Math.min(a.doc.height,m+k+50),D(a,{top:l,bottom:m})}Pf<20&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=d,f.wheelDY=e,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,c=b&&f.wheelDY&&b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;f.wheelStartX=f.wheelStartY=null,c&&(Qf=(Qf*Pf+c)/(Pf+1),++Pf)}},200)):(f.wheelDX+=d,f.wheelDY+=e))}}function dc(a,b,c){if("string"==typeof b&&(b=dg[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{Z(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Cg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function ec(a,b,c){for(var d=0;d<a.state.keyMaps.length;d++){var e=fg(b,a.state.keyMaps[d],c,a);if(e)return e}return a.options.extraKeys&&fg(b,a.options.extraKeys,c,a)||fg(b,a.options.keyMap,c,a)}function fc(a,b,c,d){var e=a.state.keySeq;if(e){if(gg(b))return"handled";Sf.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())}),b=e+" "+b}var f=ec(a,b,d);return"multi"==f&&(a.state.keySeq=b),"handled"==f&&te(a,"keyHandled",a,b,c),"handled"!=f&&"multi"!=f||(ug(c),La(a)),e&&!f&&/\'$/.test(b)?(ug(c),!0):!!f}function gc(a,b){var c=hg(b,!0);return!!c&&(b.shiftKey&&!a.state.keySeq?fc(a,"Shift-"+c,b,function(b){return dc(a,b,!0)})||fc(a,c,b,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return dc(a,b)}):fc(a,c,b,function(b){return dc(a,b)}))}function hc(a,b,c){return fc(a,"'"+c+"'",b,function(b){return dc(a,b,!0)})}function ic(a){var b=this;if(b.curOp.focus=Pe(),!ve(b,a)){nf&&of<11&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var d=gc(b,a);sf&&(Tf=d?c:null,!d&&88==c&&!Wg&&(yf?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||jc(b)}}function jc(a){function b(a){18!=a.keyCode&&a.altKey||(Qg(c,"CodeMirror-crosshair"),yg(document,"keyup",b),yg(document,"mouseover",b))}var c=a.display.lineDiv;Rg(c,"CodeMirror-crosshair"),xg(document,"keyup",b),xg(document,"mouseover",b)}function kc(a){16==a.keyCode&&(this.doc.sel.shift=!1),ve(this,a)}function lc(a){var b=this;if(!(Sb(b.display,a)||ve(b,a)||a.ctrlKey&&!a.altKey||yf&&a.metaKey)){var c=a.keyCode,d=a.charCode;if(sf&&c==Tf)return Tf=null,void ug(a);if(!sf||a.which&&!(a.which<10)||!gc(b,a)){var e=String.fromCharCode(null==d?c:d);hc(b,a,e)||b.display.input.onKeyPress(a)}}}function mc(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,oc(a))},100)}function nc(a){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),"nocursor"!=a.options.readOnly&&(a.state.focused||(zg(a,"focus",a),a.state.focused=!0,Rg(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),pf&&setTimeout(function(){a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),La(a))}function oc(a){a.state.delayingBlurEvent||(a.state.focused&&(zg(a,"blur",a),a.state.focused=!1,Qg(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function pc(a,b){Sb(a.display,b)||qc(a,b)||a.display.input.onContextMenu(b)}function qc(a,b){return!!xe(a,"gutterContextMenu")&&Yb(a,b,"gutterContextMenu",!1,zg)}function rc(a,b){if(Gf(a,b.from)<0)return a;if(Gf(a,b.to)<=0)return Uf(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Uf(b).ch-b.to.ch),Ff(c,d)}function sc(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new ma(rc(e.anchor,b),rc(e.head,b)))}return na(c,a.sel.primIndex)}function tc(a,b,c){return a.line==b.line?Ff(c.line,a.ch-b.ch+c.ch):Ff(c.line+(a.line-b.line),a.ch)}function uc(a,b,c){for(var d=[],e=Ff(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=tc(h.from,e,f),j=tc(Uf(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=Gf(k.head,k.anchor)<0;d[g]=new ma(l?j:i,l?i:j)}else d[g]=new ma(i,i)}return new la(d,a.sel.primIndex)}function vc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=qa(a,b)),c&&(this.to=qa(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),zg(a,"beforeChange",a,d),a.cm&&zg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function wc(a,b,c){if(a.cm){if(!a.cm.curOp)return Db(a.cm,wc)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(xe(a,"beforeChange")||a.cm&&xe(a.cm,"beforeChange"))||(b=vc(a,b,!0))){var d=Df&&!c&&ed(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i<g.length&&(d=g[i],c?!d.ranges||d.equals(a.sel):d.ranges);i++);if(i!=g.length){for(e.lastOrigin=e.lastSelOrigin=null;d=g.pop(),d.ranges;){if(ie(d,h),c&&!d.equals(a.sel))return void Ba(a,d,{clearRedo:!1});f=d}var j=[];ie(f,h),h.push({changes:j,generation:e.generation}),e.generation=d.generation||++e.maxGeneration;for(var k=xe(a,"beforeChange")||a.cm&&xe(a.cm,"beforeChange"),i=d.changes.length-1;i>=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Jb(a.cm,d,"gutter")}}function Ac(a,b,c,d){if(a.cm&&!a.cm.curOp)return Db(a.cm,Ac)(a,b,c,d);if(b.to.line<a.first)return void zc(a,b.text.length-1-(b.to.line-b.from.line));if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);zc(a,e),b={from:Ff(a.first,0),to:Ff(b.to.line+e,b.to.ch),text:[Ce(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=c<g,m=e>k-g;if(c<h)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:b<o?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m<j&&(l+=Be(j-m)),l!=k)return Cc(f,l,Ff(b,0),Ff(b,k.length),"+input"),h.stateAfter=null,!0;for(var n=0;n<f.sel.ranges.length;n++){var o=f.sel.ranges[n];if(o.head.line==b&&o.head.ch<k.length){var m=Ff(b,k.length);xa(f,n,new ma(m,m));break}}}function Lc(a,b,c,d){var e=b,f=b;return"number"==typeof b?f=Vd(a,pa(a,b)):e=Zd(b),null==e?null:(d(f,e)&&a.cm&&Jb(a.cm,e,c),f)}function Mc(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&Gf(f.from,Ce(d).to)<=0;){var g=d.pop();if(Gf(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Cb(a,function(){for(var b=d.length-1;b>=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b<a.first||b>=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g<f.length-1;g++){var h=f[g];if(/^(cmd|meta|m)$/i.test(h))e=!0;else if(/^a(lt)?$/i.test(h))b=!0;else if(/^(c|ctrl|control)$/i.test(h))c=!0;else{if(!/^s(hift)$/i.test(h))throw new Error("Unrecognized modifier name: "+h);d=!0}}return b&&(a="Alt-"+a),c&&(a="Ctrl-"+a),e&&(a="Cmd-"+a),d&&(a="Shift-"+a),a}function Rc(a){return"string"==typeof a?eg[a]:a}function Sc(a,b,c,d,e){if(d&&d.shared)return Tc(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Db(a.cm,Sc)(a,b,c,d,e);var f=new kg(a,e),g=Gf(b,c);if(d&&He(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Ce(f)}),new lg(f,g)}function Uc(a){return a.findMarks(Ff(a.first,0),a.clipPos(Ff(a.lastLine())),function(a){return a.parent})}function Vc(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(Gf(f,g)){var h=Sc(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function Wc(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Td(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];De(d,f.doc)==-1&&(f.parent=null,c.markers.splice(e--,1))}}}function Xc(a,b,c){this.marker=a,this.from=b,this.to=c}function Yc(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function Zc(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function $c(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function _c(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(d||(d=[])).push(new Xc(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return d}function bd(a,b){if(b.full)return null;var c=sa(a,b.from.line)&&Vd(a,b.from.line).markedSpans,d=sa(a,b.to.line)&&Vd(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==Gf(b.from,b.to),h=_c(c,e,g),i=ad(d,f,g),j=1==b.text.length,k=Ce(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=Yc(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=Yc(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=cd(h)),i&&i!=h&&(i=cd(i));var o=[h];if(!j){var p,q=b.text.length-2;if(q>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(p||(p=[])).push(new Xc(h[l].marker,null,null));for(var l=0;l<q;++l)o.push(p);o.push(i)}return o}function cd(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function dd(a,b){var c=le(a,b),d=bd(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function ed(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&De(d,c)!=-1||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(Gf(j.to,h.from)<0||Gf(j.from,h.to)>0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function gd(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function hd(a){return a.inclusiveLeft?-1:0}function id(a){return a.inclusiveRight?1:0}function jd(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=Gf(d.from,e.from)||hd(a)-hd(b);if(f)return-f;var g=Gf(d.to,e.to)||id(a)-id(b);return g?g:b.id-a.id}function kd(a,b){var c,d=Ef&&a.markedSpans;if(d)for(var e,f=0;f<d.length;++f)e=d[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!c||jd(c,e.marker)<0)&&(c=e.marker);return c}function ld(a){return kd(a,!0)}function md(a){return kd(a,!1)}function nd(a,b,c,d,e){var f=Vd(a,b),g=Ef&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=Gf(j.from,c)||hd(i.marker)-hd(e),l=Gf(j.to,d)||id(i.marker)-id(e);if(!(k>=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&td(a,b,d))return!0}}function td(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return td(a,d.line,Yc(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&td(a,b,e))return!0}function ud(a,b,c){_d(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Hc(a,null,c)}function vd(a){if(null!=a.height)return a.height; +var b=a.doc.cm;if(!b)return 0;if(!Ng(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;"),a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;"),Oe(b.display.measure,Me("div",[a.node],null,c))}return a.height=a.node.offsetHeight}function wd(a,b,c,d){var e=new mg(a,c,d),f=a.cm;return f&&e.noHScroll&&(f.display.alignWidgets=!0),Lc(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,f&&!sd(a,b)){var d=_d(b)<a.scrollTop;Yd(b,b.height+vd(e)),d&&Hc(f,null,e.height),f.curOp.forceUpdate=!0}return!0}),e}function xd(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),fd(a),gd(a,c);var e=d?d(a):1;e!=a.height&&Yd(a,e)}function yd(a){a.parent=null,fd(a)}function zd(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function Ad(b,c){if(b.blankLine)return b.blankLine(c);if(b.innerMode){var d=a.innerMode(b,c);return d.mode.blankLine?d.mode.blankLine(d.state):void 0}}function Bd(b,c,d,e){for(var f=0;f<10;f++){e&&(e[0]=a.innerMode(b,d).mode);var g=b.token(c,d);if(c.pos>c.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.pos<b.ch)&&!l.eol();)l.start=l.pos,f=Bd(h,l,k),d&&i.push(e(!0));return d?i:e()}function Dd(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var i,j=0,k=null,l=new ig(b,a.options.tabSize),m=a.options.addModeClass&&[null];for(""==b&&zd(Ad(c,d),f);!l.eol();){if(l.pos>a.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;j<l.start;)j=Math.min(l.start,j+5e4),e(j,k);k=i}l.start=l.pos}for(;j<l.pos;){var o=Math.min(l.pos,j+5e4);e(o,k),j=o}}function Ed(a,b,c,d){var e=[a.state.modeGen],f={};Dd(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;Dd(a,b.text,h.mode,!0,function(a,b){for(var c=i;j<a;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;c<i;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function Fd(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=Ed(a,b,b.stateAfter=Pa(a,Zd(b)));b.styles=d.styles,d.classes?b.styleClasses=d.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function Gd(a,b,c,d){var e=a.doc.mode,f=new ig(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&Ad(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)Bd(e,f,c),f.start=f.pos}function Hd(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?pg:og;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function Id(a,b){var c=Me("span",null,null,pf?"padding-right: .1px":null),d={pre:Me("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,splitSpaces:(nf||pf)&&a.getOption("lineWrapping")};b.measure={};for(var e=0;e<=(b.rest?b.rest.length:0);e++){var f,g=e?b.rest[e-1]:b.line;d.pos=0,d.addToken=Kd,We(a.display.measure)&&(f=ae(g))&&(d.addToken=Md(d.addToken,f)),d.map=[];var h=b!=a.display.externalMeasured&&Zd(g);Od(g,d,Fd(a,g,h)),g.styleClasses&&(g.styleClasses.bgClass&&(d.bgClass=Re(g.styleClasses.bgClass,d.bgClass||"")),g.styleClasses.textClass&&(d.textClass=Re(g.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild(Ve(a.display.measure))),0==e?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return pf&&/\bcm-tab\b/.test(d.content.lastChild.className)&&(d.content.className="cm-tab-wrap-hack"),zg(a,"renderLine",a,b.line,d.pre),d.pre.className&&(d.textClass=Re(d.pre.className,d.textClass||"")),d}function Jd(a){var b=Me("span","•","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function Kd(a,b,c,d,e,f,g){if(b){var h=a.splitSpaces?b.replace(/ {3,}/g,Ld):b,i=a.cm.state.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(h.slice(l,l+n));nf&&of<9?k.appendChild(Me("span",[o])):k.appendChild(o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1,"\t"==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Me("span",Be(q),"cm-tab"));o.setAttribute("role","presentation"),o.setAttribute("cm-text","\t"),a.col+=q}else{var o=a.cm.options.specialCharPlaceholder(m[0]);o.setAttribute("cm-text",m[0]),nf&&of<9?k.appendChild(Me("span",[o])):k.appendChild(o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(h);a.map.push(a.pos,a.pos+b.length,k),nf&&of<9&&(j=!0),a.pos+=b.length}if(c||d||e||j||g){var r=c||"";d&&(r+=d),e&&(r+=e);var s=Me("span",[k],r,g);return f&&(s.title=f),a.content.appendChild(s)}a.content.appendChild(k)}}function Ld(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":" ";return b+=" "}function Md(a,b){return function(c,d,e,f,g,h,i){e=e?e+" cm-force-border":"cm-force-border";for(var j=c.pos,k=j+d.length;;){for(var l=0;l<b.length;l++){var m=b[l];if(m.to>j&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;t<d.length;++t){var u=d[t],v=u.marker;"bookmark"==v.type&&u.from==o&&v.widgetNode?s.push(v):u.from<=o&&(null==u.to||u.to>o||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return;m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t<s.length;++t)Nd(b,0,s[t])}if(o>=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p<c.length;p+=2)b.addToken(b,e.slice(f,f=c[p]),Hd(c[p+1],b.cm.options))}function Pd(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Ce(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Qd(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){xd(a,c,e,d),te(a,"change",a,b)}function g(a,b){for(var c=a,f=[];c<b;++c)f.push(new ng(j[c],e(c),d));return f}var h=b.from,i=b.to,j=b.text,k=Vd(a,h.line),l=Vd(a,i.line),m=Ce(j),n=e(j.length-1),o=i.line-h.line;if(b.full)a.insert(0,g(0,j.length)),a.remove(j.length,a.size-j.length);else if(Pd(a,b)){var p=g(0,j.length-1);f(l,l.text,n),o&&a.remove(h.line,o),p.length&&a.insert(h.line,p)}else if(k==l)if(1==j.length)f(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{var p=g(1,j.length-1);p.push(new ng(m+k.text.slice(i.ch),n,d)),f(k,k.text.slice(0,h.ch)+j[0],e(0)),a.insert(h.line+1,p)}else if(1==j.length)f(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),e(0)),a.remove(h.line+1,o);else{f(k,k.text.slice(0,h.ch)+j[0],e(0)),f(l,m+l.text.slice(i.ch),n);var p=g(1,j.length-1);o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Sd(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Td(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;c&&!i||(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Ud(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,g(a),c(a),a.options.lineWrapping||m(a),a.options.mode=b.modeOption,Ib(a)}function Vd(a,b){if(b-=a.first,b<0||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b<f){c=e;break}b-=f}return c.lines[b]}function Wd(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Xd(a,b,c,d){var e=[];return a.iter(b,c,function(a){var b=a.text;d&&(b=d(a)),e.push(b)}),e}function Yd(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function Zd(a){if(null==a.parent)return null;for(var b=a.parent,c=De(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function $d(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(b<f){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(b<h)break;b-=h}return c+d}function _d(a){a=od(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function ae(a){var b=a.order;return null==b&&(b=a.order=$g(a.text)),b}function be(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ce(a,b){var c={from:V(b.from),to:Uf(b),text:Wd(a,b.from,b.to)};return je(a,c,b.from.line,b.to.line+1),Td(a,function(a){je(a,c,b.from.line,b.to.line+1)},!0),c}function de(a){for(;a.length;){var b=Ce(a);if(!b.ranges)break;a.pop()}}function ee(a,b){return b?(de(a.done),Ce(a.done)):a.done.length&&!Ce(a.done).ranges?Ce(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function le(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(ke(c[d]));return e}function me(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?la.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var j,k=g[i];if(h.push({from:k.from,to:k.to,text:k.text}),b)for(var l in k)(j=l.match(/^spans_(\d+)$/))&&De(b,Number(j[1]))>-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function oe(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)ne(f.ranges[h].anchor,b,c,d),ne(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=Ff(i.from.line+d,i.from.ch),i.to=Ff(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function pe(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;oe(a.done,c,d,e),oe(a.undone,c,d,e)}function qe(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function re(a){return a.target||a.srcElement}function se(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),yf&&a.ctrlKey&&1==b&&(b=3),b}function te(a,b){function c(a){return function(){a.apply(null,f)}}var d=a._handlers&&a._handlers[b];if(d){var e,f=Array.prototype.slice.call(arguments,2);Mf?e=Mf.delayedCallbacks:Ag?e=Ag:(e=Ag=[],setTimeout(ue,0));for(var g=0;g<d.length;++g)e.push(c(d[g]))}}function ue(){var a=Ag;Ag=null;for(var b=0;b<a.length;++b)a[b]()}function ve(a,b,c){return"string"==typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}}),zg(a,c||b.type,a,b),qe(b)||b.codemirrorIgnore}function we(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)De(c,b[d])==-1&&c.push(b[d])}function xe(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Ee(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Fe(){}function Ge(a,b){var c;return Object.create?c=Object.create(a):(Fe.prototype=a,c=new Fe),b&&He(b,c),c}function He(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Ie(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Je(a,b){return b?!!(b.source.indexOf("\\w")>-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Ne(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Qe(c[d]).test(b)&&(b+=" "+c[d]);return b}function Se(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Te(){Sg||(Ue(),Sg=!0)}function Ue(){var a;xg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,Se(Rb)},100))}),xg(window,"blur",function(){Se(oc)})}function Ve(a){if(null==Og){var b=Me("span","​");Oe(a,Me("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Og=b.offsetWidth<=1&&b.offsetHeight>2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&b<c}function ff(a,b){Zg=null;for(var c,d=0;d<a.length;++d){var e=a[d];if(e.from<b&&e.to>b)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return ff(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a<this.events.length;a++)zg.apply(null,this.events[a])};var Ff=a.Pos=function(a,b){return this instanceof Ff?(this.line=a,void(this.ch=b)):new Ff(a,b)},Gf=a.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},Hf=null;da.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,f.value=Hf.join("\n"),Ig(f));else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type?d.setSelections(b.ranges,null,Dg):(c.prevInput="",f.value=b.text.join("\n"),Ig(f))}"cut"==a.type&&(d.state.cutIncoming=!0)}var c=this,d=this.cm,e=this.wrapper=ea(),f=this.textarea=e.firstChild;a.wrapper.insertBefore(e,a.wrapper.firstChild),wf&&(f.style.width="0px"),xg(f,"input",function(){nf&&of>=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f<g&&c.charCodeAt(f)==d.charCodeAt(f);)++f;var h=this;return Cb(a,function(){$(a,d.slice(f),c.length-f,null,h.composing?"*compose":null),d.length>1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n<r&&p.charCodeAt(n)==q.charCodeAt(n);)++n; +for(var s=Ce(l),t=Ce(m),u=Math.min(s.length-(1==l.length?n:0),t.length-(1==m.length?n:0));o<u&&s.charCodeAt(s.length-o-1)==t.charCodeAt(t.length-o-1);)++o;l[l.length-1]=s.slice(0,s.length-o),l[0]=l[0].slice(n);var v=Ff(g,n),w=Ff(j,m.length?Ce(m).length-o:0);return l.length>1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Db(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Fe,resetPosition:Fe,needsContentAttribute:!0},fa.prototype),a.inputStyles={textarea:da,contenteditable:fa},la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=Gf(c.anchor,d.anchor)||0!=Gf(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new ma(V(this.ranges[b].anchor),V(this.ranges[b].head));return new la(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(Gf(b,d.from())>=0&&Gf(a,d.to())<=0)return c}return-1}},ma.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var If,Jf,Kf,Lf={left:0,right:0,top:0,bottom:0},Mf=null,Nf=0,Of=0,Pf=0,Qf=null;nf?Qf=-.53:kf?Qf=15:rf?Qf=-.7:tf&&(Qf=-1/3);var Rf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Rf(a);return b.x*=Qf,b.y*=Qf,b};var Sf=new ze,Tf=null,Uf=a.changeEnd=function(a){return a.text?Ff(a.from.line+a.text.length-1,Ce(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,Wf.hasOwnProperty(a)&&Db(this,Wf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Rc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:Eb(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:d,modeSpec:b,opaque:c&&c.opaque}),this.state.modeGen++,Ib(this)}),removeOverlay:Eb(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,void Ib(this)}}),indentLine:Eb(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),sa(this.doc,a)&&Kc(this,a,b,c)}),indentSelection:Eb(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(Kc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Ic(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;i<c;++i)Kc(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&xa(this.doc,d,new ma(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return Cd(this,a,b)},getLineTokens:function(a,b){return Cd(this,Ff(a),b,!0)},getTokenTypeAt:function(a){a=qa(this.doc,a);var b,c=Fd(this,Vd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]<f)){b=c[2*g+2];break}d=g+1}}var h=b?b.indexOf("cm-overlay "):-1;return h<0?b:0==h?null:b.slice(0,h-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!ag.hasOwnProperty(b))return c;var d=ag[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&De(c,h.val)==-1&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=pa(c,null==a?c.first+c.size-1:a),Pa(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?qa(this.doc,a):a?d.from():d.to(),mb(this,c,b||"page")},charCoords:function(a,b){return lb(this,qa(this.doc,a),b||"page")},coordsChar:function(a,b){return a=kb(this,a,b||"page"),pb(this,a.left,a.top)},lineAtHeight:function(a,b){return a=kb(this,{top:a,left:0},b||"page").top,$d(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c,d=!1;if("number"==typeof a){var e=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0),c=Vd(this.doc,a)}else c=a;return jb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-_d(c):0)},defaultTextHeight:function(){return rb(this.display)},defaultCharWidth:function(){return sb(this.display)},setGutterMarker:Eb(function(a,b,c){return Lc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ke(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Eb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Jb(b,d,"gutter"),Ke(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!sa(this.doc,a))return null;var b=a;if(a=Vd(this.doc,a),!a)return null}else{var b=Zd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=mb(this,qa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b),f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Fc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Eb(ic),triggerOnKeyPress:Eb(lc),triggerOnKeyUp:kc,execCommand:function(a){if(dg.hasOwnProperty(a))return dg[a](this)},triggerElectric:Eb(function(a){aa(this,a)}),findPosH:function(a,b,c,d){var e=1;b<0&&(e=-1,b=-b);for(var f=0,g=qa(this.doc,a);f<b&&(g=Nc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Eb(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Nc(c.doc,d.head,a,b,c.options.rtlMoveVisually):a<0?d.from():d.to()},Fg)}),deleteH:Eb(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):Mc(this,function(c){var e=Nc(d,c.head,a,b,!1);return a<0?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;b<0&&(e=-1,b=-b);for(var g=0,h=qa(this.doc,a);g<b;++g){var i=mb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Oc(this,i,e,c),h.hitSide)break}return h},moveV:Eb(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return a<0?g.from():g.to();var h=mb(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=Oc(c,h,a,b);return"page"==b&&g==d.sel.primary()&&Hc(c,null,lb(c,i,"div").top-h.top),i},Fg),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=this.doc,c=Vd(b,a.line).text,d=a.ch,e=a.ch;if(c){var f=this.getHelper(a,"wordChars");(a.xRel<0||e==c.length)&&d?--d:++e;for(var g=c.charAt(d),h=Je(g,f)?function(a){return Je(a,f)}:/\s/.test(g)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Je(a)};d>0&&h(c.charAt(d-1));)--d;for(;e<c.length&&h(c.charAt(e));)++e}return new ma(Ff(a.line,d),Ff(a.line,e))},toggleOverwrite:function(a){null!=a&&a==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Rg(this.display.cursorDiv,"CodeMirror-overwrite"):Qg(this.display.cursorDiv,"CodeMirror-overwrite"),zg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Pe()},scrollTo:Eb(function(a,b){null==a&&null==b||Jc(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Ta(this)-this.display.barHeight,width:a.scrollWidth-Ta(this)-this.display.barWidth,clientHeight:Va(this),clientWidth:Ua(this)}},scrollIntoView:Eb(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:Ff(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)Jc(this),this.curOp.scrollToPos=a;else{var c=Gc(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Eb(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var d=this;null!=a&&(d.display.wrapper.style.width=c(a)),null!=b&&(d.display.wrapper.style.height=c(b)),d.options.lineWrapping&&fb(this);var e=d.display.viewFrom;d.doc.iter(e,d.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Jb(d,e,"widget");break}++e}),d.curOp.forceUpdate=!0,zg(d,"refresh",this)}),operation:function(a){return Cb(this,a)},refresh:Eb(function(){var a=this.display.cachedTextHeight;Ib(this),this.curOp.forceUpdate=!0,gb(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),k(this),(null==a||Math.abs(a-rb(this.display))>.5)&&g(this),zg(this,"refresh",this)}),swapDoc:Eb(function(a){var b=this.doc;return b.cm=null,Ud(this,a),gb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,te(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(a);var Vf=a.defaults={},Wf=a.optionHandlers={},Xf=a.Init={toString:function(){return"CodeMirror.Init"}};Pc("value","",function(a,b){a.setValue(b)},!0),Pc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Pc("indentUnit",2,c,!0),Pc("indentWithTabs",!1),Pc("smartIndent",!0),Pc("tabSize",4,function(a){d(a),gb(a),Ib(a)},!0),Pc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test("\t")?"":"|\t"),"g"),d!=a.Init&&b.refresh()}),Pc("specialCharPlaceholder",Jd,function(a){a.refresh()},!0),Pc("electricChars",!0),Pc("inputStyle",xf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Pc("rtlMoveVisually",!zf),Pc("wholeLineUpdateBefore",!0),Pc("theme","default",function(a){h(a),i(a)},!0),Pc("keyMap","default",function(b,c,d){var e=Rc(c),f=d!=a.Init&&Rc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Pc("extraKeys",null),Pc("lineWrapping",!1,e,!0),Pc("gutters",[],function(a){n(a.options),i(a)},!0),Pc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Pc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Pc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Pc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Pc("firstLineNumber",1,i,!0),Pc("lineNumberFormatter",function(a){return a},i,!0),Pc("showCursorWhenSelecting",!1,Ha,!0),Pc("resetSelectionOnContextMenu",!0),Pc("lineWiseCopyCut",!0),Pc("readOnly",!1,function(a,b){"nocursor"==b?(oc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Pc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Pc("dragDrop",!0,Qb),Pc("cursorBlinkRate",530),Pc("cursorScrollMargin",0),Pc("cursorHeight",1,Ha,!0),Pc("singleCursorHeightPerLine",!0,Ha,!0),Pc("workTime",100),Pc("workDelay",100),Pc("flattenSpans",!0,d,!0),Pc("addModeClass",!1,d,!0),Pc("pollInterval",100),Pc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Pc("historyEventDelay",1250),Pc("viewportMargin",10,function(a){a.refresh()},!0),Pc("maxHighlightLength",1e4,d,!0),Pc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Pc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Pc("autofocus",null);var Yf=a.modes={},Zf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Yf[b]=c},a.defineMIME=function(a,b){Zf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Zf.hasOwnProperty(b))b=Zf[b];else if(b&&"string"==typeof b.name&&Zf.hasOwnProperty(b.name)){var c=Zf[b.name];"string"==typeof c&&(c={name:c}),b=Ge(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Yf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if($f.hasOwnProperty(c.name)){var f=$f[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var $f=a.modeExtensions={};a.extendMode=function(a,b){var c=$f.hasOwnProperty(a)?$f[a]:$f[a]={};He(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){rg.prototype[a]=b},a.defineOption=Pc;var _f=[];a.defineInitHook=function(a){_f.push(a)};var ag=a.helpers={};a.registerHelper=function(b,c,d){ag.hasOwnProperty(b)||(ag[b]=a[b]={_global:[]}),ag[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),ag[b]._global.push({pred:d,val:e})};var bg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},cg=a.startState=function(a,b,c){return!a.startState||a.startState(b,c)};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var dg=a.commands={selectAll:function(a){a.setSelection(Ff(a.firstLine(),0),Ff(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){Mc(a,function(b){if(b.empty()){var c=Vd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:Ff(b.head.line+1,0)}:{from:b.head,to:Ff(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Mc(a,function(b){return{from:Ff(b.from().line,0),to:qa(a.doc,Ff(b.to().line+1,0))}})},delLineLeft:function(a){Mc(a,function(a){return{from:Ff(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Mc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){Mc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(Ff(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(Ff(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return bf(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return df(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return cf(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Fg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Fg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?df(a,b.head):d},Fg)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("\t")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Gg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Cb(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Vd(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new Ff(e.line,e.ch-1)),e.ch>0)e=new Ff(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Ff(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Vd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Ff(e.line-1,g.length-1),Ff(e.line,1),"+transpose")}c.push(new ma(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Cb(a,function(){for(var b=a.listSelections().length,c=0;c<b;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),Ic(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},eg=a.keyMap={};eg.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},eg.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},eg.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},eg.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},eg["default"]=yf?eg.macDefault:eg.pcDefault,a.normalizeKeyMap=function(a){var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(/^(name|fallthrough|(de|at)tach)$/.test(c))continue;if("..."==d){delete a[c];continue}for(var e=Ee(c.split(" "),Qc),f=0;f<e.length;f++){var g,h;f==e.length-1?(h=e.join(" "),g=d):(h=e.slice(0,f+1).join(" "),g="...");var i=b[h];if(i){if(i!=g)throw new Error("Inconsistent bindings for "+h)}else b[h]=g}delete a[c]}for(var j in b)a[j]=b[j];return a};var fg=a.lookupKey=function(a,b,c,d){b=Rc(b);var e=b.call?b.call(a,d):b[a];if(e===!1)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=Object.prototype.toString.call(b.fallthrough))return fg(a,b.fallthrough,c,d);for(var f=0;f<b.fallthrough.length;f++){var g=fg(a,b.fallthrough[f],c,d);if(g)return g}}},gg=a.isModifierKey=function(a){var b="string"==typeof a?a:Yg[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},hg=a.keyName=function(a,b){if(sf&&34==a.keyCode&&a["char"])return!1;var c=Yg[a.keyCode],d=c;return null!=d&&!a.altGraphKey&&(a.altKey&&"Alt"!=c&&(d="Alt-"+d),(Bf?a.metaKey:a.ctrlKey)&&"Ctrl"!=c&&(d="Ctrl-"+d),(Bf?a.ctrlKey:a.metaKey)&&"Cmd"!=c&&(d="Cmd-"+d),!b&&a.shiftKey&&"Shift"!=c&&(d="Shift-"+d),d)};a.fromTextArea=function(b,c){function d(){b.value=j.getValue()}if(c=c?He(c):{},c.value=b.value,!c.tabindex&&b.tabIndex&&(c.tabindex=b.tabIndex),!c.placeholder&&b.placeholder&&(c.placeholder=b.placeholder),null==c.autofocus){var e=Pe();c.autofocus=e==b||null!=b.getAttribute("autofocus")&&e==document.body}if(b.form&&(xg(b.form,"submit",d),!c.leaveSubmitMethodAlone)){var f=b.form,g=f.submit;try{var h=f.submit=function(){d(),f.submit=g,f.submit(),f.submit=h}}catch(i){}}c.finishInit=function(a){a.save=d,a.getTextArea=function(){return b},a.toTextArea=function(){a.toTextArea=isNaN,d(),b.parentNode.removeChild(a.getWrapperElement()),b.style.display="",b.form&&(yg(b.form,"submit",d),"function"==typeof b.form.submit&&(b.form.submit=g))}},b.style.display="none";var j=a(function(a){b.parentNode.insertBefore(a,b.nextSibling)},c);return j};var ig=a.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ig.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));if(c)return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Gg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Gg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Gg(this.string,null,this.tabSize)-(this.lineStart?Gg(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var jg=0,kg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++jg};ye(kg),kg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&tb(a),xe(this,"clear")){var c=this.find();c&&te(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=Yc(g.markedSpans,this);a&&!this.collapsed?Jb(a,Zd(g),"text"):a&&(null!=h.to&&(e=Zd(g)),null!=h.from&&(d=Zd(g))),g.markedSpans=Zc(g.markedSpans,h),null==h.from&&this.collapsed&&!sd(this.doc,g)&&a&&Yd(g,rb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=od(this.lines[f]),j=l(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Ib(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ea(a.doc)),a&&te(a,"markerCleared",a,this),b&&vb(a),this.parent&&this.parent.clear()}},kg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=Yc(f.markedSpans,this);if(null!=g.from&&(c=Ff(b?f:Zd(f),g.from),a==-1))return c;if(null!=g.to&&(d=Ff(b?f:Zd(f),g.to),1==a))return d}return c&&{from:c,to:d}},kg.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Cb(c,function(){var d=a.line,e=Zd(a.line),f=$a(c,e);if(f&&(eb(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!sd(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=vd(b)-g;h&&Yd(d,d.height+h)}})},kg.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&De(b.maybeHiddenMarkers,this)!=-1||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},kg.prototype.detachLine=function(a){if(this.lines.splice(De(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var jg=0,lg=a.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};ye(lg),lg.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();te(this,"clear")}},lg.prototype.find=function(a,b){return this.primary.find(a,b)};var mg=a.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a,this.node=b};ye(mg),mg.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=Zd(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=vd(this);Yd(c,Math.max(0,c.height-f)),a&&Cb(a,function(){ud(a,c,-f),Jb(a,d,"widget")})}},mg.prototype.changed=function(){var a=this.height,b=this.doc.cm,c=this.line;this.height=null;var d=vd(this)-a;d&&(Yd(c,c.height+d),b&&Cb(b,function(){b.curOp.forceUpdate=!0,ud(b,c,d)}))};var ng=a.Line=function(a,b,c){this.text=a,gd(this,b),this.height=c?c(this):1};ye(ng),ng.prototype.lineNo=function(){return Zd(this)};var og={},pg={};Rd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];this.height-=e.height,yd(e),te(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;a<d;++a)if(c(this.lines[a]))return!0}},Sd.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Rd))){var h=[];this.collapse(h),this.children=[new Rd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<=f){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Rd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Sd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=De(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Sd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<f){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var qg=0,rg=a.Doc=function(a,b,c){if(!(this instanceof rg))return new rg(a,b,c);null==c&&(c=0),Sd.call(this,[new Rd([new ng("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=Ff(c,0);this.sel=oa(d),this.history=new be(null),this.id=++qg,this.modeOption=b,"string"==typeof a&&(a=Ug(a)),Qd(this,{from:d,to:d,text:a}),Ba(this,oa(d),Dg)};rg.prototype=Ge(Sd.prototype,{constructor:rg,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height; +this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a,b){var c=Xd(this,this.first,this.first+this.size,b);return a===!1?c:c.join(a||"\n")},setValue:Fb(function(a){var b=Ff(this.first,0),c=this.first+this.size-1;wc(this,{from:b,to:Ff(c,Vd(this,c).text.length),text:Ug(a),origin:"setValue",full:!0},!0),Ba(this,oa(b))}),replaceRange:function(a,b,c,d){b=qa(this,b),c=c?qa(this,c):b,Cc(this,a,b,c,d)},getRange:function(a,b,c){var d=Wd(this,qa(this,a),qa(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){if(sa(this,a))return Vd(this,a)},getLineNumber:function(a){return Zd(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Vd(this,a)),od(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return qa(this,a)},getCursor:function(a){var b,c=this.sel.primary();return b=null==a||"head"==a?c.head:"anchor"==a?c.anchor:"end"==a||"to"==a||a===!1?c.to():c.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fb(function(a,b,c){ya(this,qa(this,"number"==typeof a?Ff(a,b||0):a),null,c)}),setSelection:Fb(function(a,b,c){ya(this,qa(this,a),qa(this,b||a),c)}),extendSelection:Fb(function(a,b,c){va(this,qa(this,a),b&&qa(this,b),c)}),extendSelections:Fb(function(a,b){wa(this,ta(this,a,b))}),extendSelectionsBy:Fb(function(a,b){wa(this,Ee(this.sel.ranges,a),b)}),setSelections:Fb(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new ma(qa(this,a[d].anchor),qa(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),Ba(this,na(e,b),c)}}),addSelection:Fb(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new ma(qa(this,a),qa(this,b||a))),Ba(this,na(d,d.length-1),c)}),getSelection:function(a){for(var b,c=this.sel.ranges,d=0;d<c.length;d++){var e=Wd(this,c[d].from(),c[d].to());b=b?b.concat(e):e}return a===!1?b:b.join(a||"\n")},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Wd(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||"\n")),b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:Fb(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:Ug(a[f]),origin:c}}for(var h=b&&"end"!=b&&uc(this,d,b),f=d.length-1;f>=0;f--)wc(this,d[f]);h?Aa(this,h):this.cm&&Ic(this.cm)}),undo:Fb(function(){yc(this,"undo")}),redo:Fb(function(){yc(this,"redo")}),undoSelection:Fb(function(){yc(this,"undo",!0)}),redoSelection:Fb(function(){yc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new be(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:me(this.history.done),undone:me(this.history.undone)}},setHistory:function(a){var b=this.history=new be(this.history.maxGeneration);b.done=me(a.done.slice(0),null,!0),b.undone=me(a.undone.slice(0),null,!0)},addLineClass:Fb(function(a,b,c){return Lc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(Qe(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Fb(function(a,b,c){return Lc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(Qe(c));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Fb(function(a,b,c){return wd(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return Sc(this,qa(this,a),qa(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};return a=qa(this,a),Sc(this,a,a,c,"bookmark")},findMarksAt:function(a){a=qa(this,a);var b=[],c=Vd(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=qa(this,a),b=qa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];e==a.line&&a.ch>i.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){var e=d.text.length+1;return e>a?(b=a,!0):(a-=e,void++c)}),qa(this,Ff(c,b))},indexFromPos:function(a){a=qa(this,a);var b=a.ch;return a.line<this.first||a.ch<0?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new rg(Xd(this,this.first,this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to);var d=new rg(Xd(this,b,c),a.mode||this.modeOption,b);return a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],Vc(d,Uc(this)),d},unlinkDoc:function(b){if(b instanceof a&&(b=b.doc),this.linked)for(var c=0;c<this.linked.length;++c){var d=this.linked[c];if(d.doc==b){this.linked.splice(c,1),b.unlinkDoc(this),Wc(Uc(this));break}}if(b.history==this.history){var e=[b.id];Td(b,function(a){e.push(a.id)},!0),b.history=new be(null),b.history.done=me(this.history.done,e),b.history.undone=me(this.history.undone,e)}},iterLinkedDocs:function(a){Td(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),rg.prototype.eachLine=rg.prototype.iter;var sg="iter insert remove copy getEditor constructor".split(" ");for(var tg in rg.prototype)rg.prototype.hasOwnProperty(tg)&&De(sg,tg)<0&&(a.prototype[tg]=function(a){return function(){return a.apply(this.doc,arguments)}}(rg.prototype[tg]));ye(rg);var ug=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},vg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},wg=a.e_stop=function(a){ug(a),vg(a)},xg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},yg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}}},zg=a.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},Ag=null,Bg=30,Cg=a.Pass={toString:function(){return"CodeMirror.Pass"}},Dg={scroll:!1},Eg={origin:"*mouse"},Fg={origin:"+move"};ze.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var Gg=a.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),b==-1&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf("\t",f);if(h<0||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;m<k;++m)l.push(d=a(c.charCodeAt(m)));for(var m=0,n=j;m<k;++m){var d=l[m];"m"==d?l[m]=n:n=d}for(var m=0,o=j;m<k;++m){var d=l[m];"1"==d&&"r"==o?l[m]="n":g.test(d)&&(o=d,"r"==d&&(l[m]="R"))}for(var m=1,n=l[0];m<k-1;++m){var d=l[m];"+"==d&&"1"==n&&"1"==l[m+1]?l[m]="1":","!=d||n!=l[m+1]||"1"!=n&&"n"!=n||(l[m]=n),n=d}for(var m=0;m<k;++m){var d=l[m];if(","==d)l[m]="N";else if("%"==d){for(var p=m+1;p<k&&"%"==l[p];++p);for(var q=m&&"!"==l[m-1]||p<k&&"1"==l[p]?"1":"N",r=m;r<p;++r)l[r]=q;m=p-1}}for(var m=0,o=j;m<k;++m){var d=l[m];"L"==o&&"1"==d?l[m]="L":g.test(d)&&(o=d)}for(var m=0;m<k;++m)if(f.test(l[m])){for(var p=m+1;p<k&&f.test(l[p]);++p);for(var s="L"==(m?l[m-1]:j),t="L"==(p<k?l[p]:j),q=s||t?"L":"R",r=m;r<p;++r)l[r]=q;m=p-1}for(var u,v=[],m=0;m<k;)if(h.test(l[m])){var w=m;for(++m;m<k&&h.test(l[m]);++m);v.push(new b(0,w,m))}else{var x=m,y=v.length;for(++m;m<k&&"L"!=l[m];++m);for(var r=x;r<m;)if(i.test(l[r])){x<r&&v.splice(y,0,new b(1,x,r));var z=r;for(++r;r<m&&i.test(l[r]);++r);v.splice(y,0,new b(2,z,r)),x=r}else++r;x<m&&v.splice(y,0,new b(1,x,m))}return 1==v[0].level&&(u=c.match(/^\s+/))&&(v[0].from=u[0].length,v.unshift(new b(0,0,u[0].length))),1==Ce(v).level&&(u=c.match(/\s+$/))&&(Ce(v).to-=u[0].length,v.push(new b(0,k-u[0].length,k))),2==v[0].level&&v.unshift(new b(1,v[0].to,v[0].to)),v[0].level!=Ce(v).level&&v.push(new b(v[0].level,k,k)),v}}();return a.version="5.4.1",a}),function(a){a(CodeMirror)}(function(a){function b(a,b){for(var c=0,d=a.length;c<d;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return a.indexOf(b)!=-1}function d(b,c,d,e){var f=b.getCursor(),i=d(b,f);if(!/\b(?:string)\b/.test(i.type)){i.state=a.innerMode(b.getMode(),i.state).state,/^[\w$_]*$/.test(i.string)?i.end>f.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c<d;++c)b[a[c]]=!0;return b}function b(a,b){if(a.eatSpace())return null;var d=a.next();if('"'===d||"'"===d)return c(a,d),"string";if(/[\[\],\(\)]/.test(d))return"bracket";a.eatWhile(/[\w-]/);var g=a.current();return e.hasOwnProperty(g)?"atom":f.hasOwnProperty(g)?"keyword":null}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(c===b&&!d)return!1;d=!d&&"\\"===c}return d}function d(a,c){return(c.tokens[0]||b)(a,c)}var e=a(["false","true"]),f=a(BI.FormulaCollections);return{startState:function(){return{tokens:[]}},token:function(a,b){return d(a,b)},fold:"brace"}}),a.defineMIME("text/fx-formula","formula")}),function(a){a(CodeMirror)}(function(a){"use strict";function b(a,b){this.cm=a,this.options=this.buildOptions(b),this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor(),this.startLen=this.cm.getLine(this.startPos.line).length;var c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}function c(a){return"string"==typeof a?a:a.text}function d(a,b){function c(a,c){var e;e="string"!=typeof c?function(a){return c(a,b)}:d.hasOwnProperty(c)?d[c]:c,f[a]=e}var d={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},e=a.options.customKeys,f=e?{}:d;if(e)for(var g in e)e.hasOwnProperty(g)&&c(g,e[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&c(g,h[g]);return f}function e(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function f(b,f){this.completion=b,this.data=f,this.picked=!1;var i=this,j=b.cm,k=this.hints=document.createElement("ul");k.className="CodeMirror-hints",this.selectedHint=f.selectedHint||0;for(var l=f.list,m=0;m<l.length;++m){var n=k.appendChild(document.createElement("li")),o=l[m],p=g+(m!=this.selectedHint?"":" "+h);null!=o.className&&(p=o.className+" "+p),n.className=p,o.render?o.render(n,f,o):n.appendChild(document.createTextNode(o.displayText||c(o))),n.hintId=m}var q=j.cursorCoords(b.options.alignWithWord?f.from:null),r=q.left,s=q.bottom,t=!0;k.style.left=r+"px",k.style.top=s+"px";var u=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),v=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(b.options.container||document.body).appendChild(k);var w=k.getBoundingClientRect(),x=w.bottom-v;if(x>0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else{this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete");var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-1)))this.close();else{var c=this;this.debounce=i(function(){c.update()}),this.widget&&this.widget.disable()}},update:function(b){if(null!=this.tick)if(this.data&&a.signal(this.data,"update"),this.options.hint.async){var c=++this.tick,d=this;this.options.hint(this.cm,function(a){d.tick==c&&d.finishUpdate(a,b)},this.options)}else this.finishUpdate(this.options.hint(this.cm,this.options),b)},finishUpdate:function(b,c){this.data=b;var d=this.widget&&this.widget.picked||c&&this.options.completeSingle;this.widget&&this.widget.close(),b&&b.list.length&&(d&&1==b.list.length?this.pick(b,0):(this.widget=new f(this,b),a.signal(b,"shown")))},buildOptions:function(a){var b=this.cm.options.hintOptions,c={};for(var d in k)c[d]=k[d];if(b)for(var d in b)void 0!==b[d]&&(c[d]=b[d]);if(a)for(var d in a)void 0!==a[d]&&(c[d]=a[d]);return c}},f.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus)),a.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(b,c){if(b>=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTop<this.hints.scrollTop?this.hints.scrollTop=d.offsetTop-3:d.offsetTop+d.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f<e.length;f++){var g=e[f](b,c);if(g&&g.list.length)return g}else if(d=b.getHelper(b.getCursor(),"hintWords")){if(d)return a.hint.fromList(b,{words:d})}else if(a.hint.anyword)return a.hint.anyword(b,c)}),a.registerHelper("hint","fromList",function(b,c){for(var d=b.getCursor(),e=b.getTokenAt(d),f=[],g=0;g<c.words.length;g++){var h=c.words[g];h.slice(0,e.string.length)==e.string&&f.push(h)}if(f.length)return{list:f,from:a.Pos(d.line,e.start),to:a.Pos(d.line,e.end)}}),a.commands.autocomplete=a.showHint;var k={hint:a.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),BI.FormulaCollections=["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","ADD2ARRAY","and","AND","array","ARRAY","asin","ASIN","asinh","ASINH","atan","ATAN","atan2","ATAN2","atanh","ATANH","average","AVERAGE","bitnot","BITNOT","bitoperation","BITOPERATION","ceiling","CEILING","char","CHAR","circular","CIRCULAR","class","CLASS","cnmoney","CNMONEY","code","CODE","col","COL","colcount","COLCOUNT","colname","COLNAME","combin","COMBIN","concatenate","CONCATENATE","correl","CORREL","cos","COS","cosh","COSH","count","COUNT","crosslayertotal","CROSSLAYERTOTAL","date","DATE","datedelta","DATEDELTA","datedif","DATEDIF","dateinmonth","DATEINMONTH","dateinquarter","DATEINQUARTER","dateinweek","DATEINWEEK","dateinyear","DATEINYEAR","datesubdate","DATESUBDATE","datetime","DATETIME","datetonumber","DATETONUMBER","day","DAY","days360","DAYS360","daysofmonth","DAYSOFMONTH","daysofquarter","DAYSOFQUARTER","daysofyear","DAYSOFYEAR","dayvalue","DAYVALUE","decimal","DECIMAL","decode","DECODE","degrees","DEGREES","encode","ENCODE","endwith","ENDWITH","enmoney","ENMONEY","ennumber","ENNUMBER","eval","EVAL","even","EVEN","exact","EXACT","exp","EXP","fact","FACT","fields","FIELDS","filename","FILENAME","filesize","FILESIZE","filetype","FILETYPE","find","FIND","floor","FLOOR","format","FORMAT","getuserdepartments","GETUSERDEPARTMENTS","getuserjobtitles","GETUSERJOBTITLES","greparray","GREPARRAY","hierarchy","HIERARCHY","hour","HOUR","i18n","I18N","if","IF","inarray","INARRAY","index","INDEX","indexof","INDEXOF","indexofarray","INDEXOFARRAY","int","INT","isnull","ISNULL","joinarray","JOINARRAY","jvm","JVM","layertotal","LAYERTOTAL","left","LEFT","len","LEN","let","LET","ln","LN","log","LOG","log10","LOG10","lower","LOWER","lunar","LUNAR","map","MAP","maparray","MAPARRAY","max","MAX","median","MEDIAN","mid","MID","min","MIN","minute","MINUTE","mod","MOD","mom","MOM","month","MONTH","monthdelta","MONTHDELTA","now","NOW","numto","NUMTO","nvl","NVL","odd","ODD","or","OR","pi","PI","power","POWER","product","PRODUCT","promotion","PROMOTION","proper","PROPER","proportion","PROPORTION","radians","RADIANS","rand","RAND","randbetween","RANDBETWEEN","range","RANGE","rank","RANK","records","RECORDS","regexp","REGEXP","removearray","REMOVEARRAY","repeat","REPEAT","replace","REPLACE","reverse","REVERSE","reversearray","REVERSEARRAY","right","RIGHT","round","ROUND","round5","ROUND5","rounddown","ROUNDDOWN","roundup","ROUNDUP","row","ROW","rowcount","ROWCOUNT","second","SECOND","seq","SEQ","sign","SIGN","sin","SIN","sinh","SINH","slicearray","SLICEARRAY","sort","SORT","sortarray","SORTARRAY","split","SPLIT","sql","SQL","sqrt","SQRT","startwith","STARTWITH","stdev","STDEV","substitute","SUBSTITUTE","sum","SUM","sumsq","SUMSQ","switch","SWITCH","tabledatafields","TABLEDATAFIELDS","tabledatas","TABLEDATAS","tables","TABLES","tan","TAN","tanh","TANH","time","TIME","tobigdecimal","TOBIGDECIMAL","tobinary","TOBINARY","todate","TODATE","today","TODAY","todouble","TODOUBLE","tohex","TOHEX","toimage","TOIMAGE","tointeger","TOINTEGER","tooctal","TOOCTAL","totext","TOTEXT","treelayer","TREELAYER","trim","TRIM","trunc","TRUNC","uniquearray","UNIQUEARRAY","upper","UPPER","uuid","UUID","value","VALUE","webimage","WEBIMAGE","week","WEEK","weekdate","WEEKDATE","weekday","WEEKDAY","weightedaverage","WEIGHTEDAVERAGE","year","YEAR","yeardelta","YEARDELTA"],BI.FormulaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-formula-editor bi-card",watermark:"",value:"",fieldTextValueMap:{},showHint:!0,lineHeight:2})},_init:function(){BI.FormulaEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;if(this.editor=CodeMirror(this.element[0],{textWrapping:!0,lineWrapping:!0,lineNumbers:!1,mode:"formula"}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.formulaHint,{completeSingle:!1}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),BI.isKey(a.value)&&b.setValue(a.value),BI.isKey(this.options.watermark)){var b=this;this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,whiteSpace:"nowrap",textAlign:"left"}),BI.createWidget({type:"bi.absolute",element:b,items:[{el:b.watermark,left:0,top:0}]}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),this.watermark.element.css({position:"absolute",left:3,right:3,top:6,bottom:0})}},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},focus:function(){this.editor.focus()},insertField:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"fieldName",atomic:!0,startStyle:"start",endStyle:"end"}),this.editor.replaceSelection(" "),this.editor.focus()},insertFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0}),this.editor.replaceSelection("() "),c=this.editor.getCursor(),c.ch=c.ch-2,this.editor.setCursor(c),this.editor.focus()},insertOperator:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"%operator",atomic:!0}),this.editor.replaceSelection(" "),this.editor.focus()},setFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getFormulaString:function(){return this.editor.getValue()},getUsedFields:function(){var a=this.options.fieldTextValueMap,b=[];return this.editor.getValue(!0,function(c){var d=c.text;_.forEach(c.markedSpans,function(c,e){switch(c.marker.className){case"fieldName":var f=a[d.substr(c.from,c.to-c.from)];b.contains(f)||b.push(f)}})}),b},getCheckString:function(){return this.editor.getValue(!0,function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(a.markedSpans,function(a,b){switch(a.marker.className){case"fieldName":var e=a.to-a.from;c=c.substr(0,a.from+d)+"$a"+c.substr(a.to+d,c.length),d=d+2-e}}),c})},getValue:function(){var a=this.options.fieldTextValueMap; +return this.editor.getValue("\n",function(b){var c=b.text,d=b.text,e=0;return d.text=c,_.forEach(b.markedSpans,function(b,c){switch(b.marker.className){case"fieldName":var f=b.to-b.from,g=a[d.substr(b.from+e,f)];d=d.substr(0,b.from+e)+"${"+a[d.substr(b.from+e,f)]+"}"+d.substr(b.to+e,d.length),e+=g.length-f+3}}),d})},setValue:function(a){this.editor.setValue(a)},setFieldTextValueMap:function(a){this.options.fieldTextValueMap=a},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.FormulaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.FormulaEditor.EVENT_BLUR="EVENT_BLUR",BI.FormulaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.formula_editor",BI.FormulaEditor),$.extend(BI,{Msg:function(){var a,b,c;return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){c=c||$("body");var d=BI.createWidget({type:"bi.toast",level:b,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:d,left:"50%",top:0}]}),d.element.outerWidth()>c.outerWidth()&&d.setWidth(c.width()),d.element.css({"margin-left":-1*d.element.outerWidth()/2}),d.invisible(),d.element.slideDown(500,function(){BI.delay(function(){d.element.slideUp(500,function(){d.destroy()})},5e3)})},_show:function(d,e,f,g){b=$('<div class="bi-z-index-mask">').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('<div class="bi-message-depend">').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),height:30,level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),height:30,handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,type:"bi.center_adapt",items:[{type:"bi.border",cls:"bi-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};a=BI.createWidget(j)}}}()}),BI.GridView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-view",overflowX:!0,overflowY:!0,overscanColumnCount:0,overscanRowCount:0,rowHeightGetter:BI.emptyFn,columnWidthGetter:BI.emptyFn,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.GridView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B=[],C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=[I,K],N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=BI.deepIndexOf(this.renderedKeys,M);O>-1?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l})),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B.push(M),C[H++]=L}var P={},Q={},R=[];BI.each(B,function(b,c){BI.deepContains(a.renderedKeys,c)?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(P,b)||BI.deepContains(Q,b)||R.push(a)}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a){S.push(A[a])}),this.container.addItems(S),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getMaxScrollLeft:function(){return Math.max(0,this._columnSizeAndPositionManager.getTotalSize()-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._rowSizeAndPositionManager.getTotalSize()-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a),b.items.length>0?(this.columnCount=b.items[0].length,this.rowCount=b.items.length):(this.rowCount=0,this.columnCount=0),this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},setEstimatedColumnSize:function(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.FloatBox=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-float-box bi-card",width:600,height:500})},_init:function(){BI.FloatBox.superclass._init.apply(this,arguments);var a=this,b=this.options;this.showAction=new BI.ShowAction({tar:this}),this._center=BI.createWidget(),this._north=BI.createWidget(),this.element.draggable&&this.element.draggable({handle:".bi-message-title",drag:function(a,c){var d=$("body").width(),e=$("body").height();c.position.left+b.width>d&&(c.position.left=d-b.width),c.position.top+b.height>e&&(c.position.top=e-b.height),c.position.left<0&&(c.position.left=0),c.position.top<0&&(c.position.top=0)}}),this._south=BI.createWidget(),BI.createWidget({type:"bi.border",element:this,items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.absolute",items:[{el:this._north,left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:50,handler:function(){a.currentSectionProvider.close()}},width:60}}},height:50},center:{el:{type:"bi.absolute",items:[{el:this._center,left:10,top:10,right:10,bottom:10}]}},south:{el:{type:"bi.absolute",items:[{el:this._south,left:10,top:0,right:10,bottom:0}]},height:60}}})},populate:function(a){var b=this;this.currentSectionProvider&&this.currentSectionProvider!==a&&this.currentSectionProvider.destroy(),this.currentSectionProvider=a,a.rebuildNorth(this._north),a.rebuildCenter(this._center),a.rebuildSouth(this._south),a.on(BI.PopoverSection.EVENT_CLOSE,function(){b.close()})},show:function(){this.showAction.actionPerformed()},hide:function(){this.showAction.actionBack()},open:function(){this.show(),this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_OPEN)},close:function(){this.hide(),this.fireEvent(BI.FloatBox.EVENT_FLOAT_BOX_CLOSED)},setZindex:function(a){this.element.css({"z-index":a})},destroyed:function(){this.currentSectionProvider&&this.currentSectionProvider.destroy()}}),BI.shortcut("bi.float_box",BI.FloatBox),BI.FloatBox.EVENT_FLOAT_BOX_CLOSED="EVENT_FLOAT_BOX_CLOSED",BI.FloatBox.EVENT_FLOAT_BOX_OPEN="EVENT_FLOAT_BOX_CLOSED",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popup-view",maxWidth:"auto",minWidth:100,minHeight:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,direction:BI.Direction.Top,stopEvent:!1,stopPropagation:!1,logic:{dynamic:!0},tool:!1,tabs:[],buttons:[],el:{type:"bi.button_group",items:[],chooseType:0,behaviors:{},layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.PopupView.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card bi-border"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group"}),this.button_group.element.css({"min-height":a.minHeight+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-background"}]}),this.searcher=BI.createWidget(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())<e&&f<c.items.length;){var i=c.items.slice(f,f+c.blockSize);this.container.addItems(i);var j=h()-a;this.cache[g]={index:f,scrollTop:a,height:j},this.renderedIndex=g,g++,f+=c.blockSize}},_calculateBlocksToRender:function(){this.options;this._renderMoreIf()},_populate:function(a){var b=this.options;a&&this.options.items!==a&&(this.options.items=a),this._calculateBlocksToRender(),this.element.scrollTop(b.scrollTop)},restore:function(){this.renderedIndex=-1,this.container.empty(),this.cache={}},populate:function(a){a&&this.options.items!==a&&this.restore(),this._populate()},destroyed:function(){this.restore()}}),BI.shortcut("bi.list_view",BI.ListView),BI.VirtualList=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-virtual-list",overscanHeight:100,blockSize:10,scrollTop:0,items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var a=this;this.options;return{type:"bi.vertical",items:[{type:"bi.layout",ref:function(){a.topBlank=this}},{type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},{type:"bi.layout",ref:function(){a.bottomBlank=this}}],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()+b.topBlank.element.height()+b.bottomBlank.element.height()};(a=h())<e&&f<c.items.length;){var i=c.items.slice(f,f+c.blockSize);this.container.addItems(i);var j=h()-a;this.cache[g]={index:f,scrollTop:a,height:j},this.tree.set(g,j),this.renderedIndex=g,g++,f+=c.blockSize}},_calculateBlocksToRender:function(){var a=this.options;this._renderMoreIf();for(var b=this.element.height(),c=a.scrollTop-a.overscanHeight,d=a.scrollTop+b+a.overscanHeight,e=this.tree.greatestLowerBound(c),f=this.tree.leastUpperBound(d),g=[],h=0;h<e;h++){var i=this.cache[h].index;if(!this.cache[h].destroyed){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++)g.push(this.container._children[j]),this.container._children[j]=null;this.cache[h].destroyed=!0}}for(var h=f+1;h<=this.renderedIndex;h++){var i=this.cache[h].index;if(!this.cache[h].destroyed){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++)g.push(this.container._children[j]),this.container._children[j]=null;this.cache[h].destroyed=!0}}for(var k=document.createDocumentFragment(),l=document.createDocumentFragment(),m=k,h=e<0?0:e;h<=f&&h<=this.renderedIndex;h++){var i=this.cache[h].index;if(this.cache[h].destroyed||(m=l),this.cache[h].destroyed===!0){for(var j=i;j<i+a.blockSize&&j<a.items.length;j++){var n=this.container._addElement(j,BI.extend({root:!0},BI.stripEL(a.items[j])));m.appendChild(n.element[0])}this.cache[h].destroyed=!1}}this.container.element.prepend(k),this.container.element.append(l),this.topBlank.setHeight(this.cache[e<0?0:e].scrollTop);var o=this.cache[Math.min(f,this.renderedIndex)];this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex)-o.scrollTop-o.height),BI.each(g,function(a,b){b&&b._destroy()})},_populate:function(a){var b=this.options;a&&this.options.items!==a&&(this.options.items=a),this.tree=BI.PrefixIntervalTree.empty(Math.ceil(b.items.length/b.blockSize)),this._calculateBlocksToRender(),this.element.scrollTop(b.scrollTop)},_clearChildren:function(){BI.each(this.container._children,function(a,b){b&&b.el._destroy()}),this.container._children={},this.container.attr("items",[])},restore:function(){this.renderedIndex=-1,this._clearChildren(),this.cache={},this.options.scrollTop=0},populate:function(a){a&&this.options.items!==a&&this.restore(),this._populate()},destroyed:function(){this.restore()}}),BI.shortcut("bi.virtual_list",BI.VirtualList),BI.Pager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.Pager.superclass._init.apply(this,arguments);this.currPage=BI.result(this.options,"curr"),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start<g-1&&(d.start=d.end-g+1);var l=d.start,m=d.end;for(h&&i&&d.index>1&&0!==g&&e>g&&d.end<e&&0!==g&&(l++,m--);l<=m;l++)l===f?c.push({text:l,value:l,selected:!0}):c.push({text:l,value:l});(!b.dynamicShow&&!b.dynamicShowFirstLast||e>g&&d.end<e&&0!==g)&&i&&(e>g&&d.end<e&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),c.push({text:i,value:"last",disabled:!(e>g&&d.end<e&&0!==g)})),d.flow=!j&&0===g,(!b.dynamicShow&&!b.dynamicShowPrevNext&&k||f!==e&&k||d.flow)&&c.push(function(){return BI.isKey(k)?e===!1?{text:k,value:"next",disabled:b.hasNext(f)===!1}:d.flow&&f===e?{text:k,value:"next",disabled:!0}:{text:k,value:"next",disabled:!(f!==e&&k||d.flow)}:BI.extend({disabled:e===!1?b.hasNext(f)===!1:!(f!==e&&k||d.flow)},k)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(c,{cls:"bi-list-item-select",height:23,hgap:10}),behaviors:b.behaviors,layouts:b.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(c,d,f){if(c===BI.Events.CLICK){var g=a.button_group.getValue()[0];switch(g){case"first":a.currPage=1;break;case"last":a.currPage=e;break;case"prev":a.currPage--;break;case"next":a.currPage++;break;default:a.currPage=g}b.jump.apply(a,[{pages:e,curr:a.currPage}]),a._populate(),a.fireEvent(BI.Pager.EVENT_CHANGE,f)}a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(a){this.options.pages=a},hasPrev:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasPrev(a):a>1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):a<c},setValue:function(a){var b=this.options;if(a=0|a,a=a<1?1:a,b.pages===!1){var c=BI.result(b,"lastPage"),d=1;this.currPage=a>c?c:(d=BI.result(b,"firstPage"),a<d?d:a)}else a=a>b.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.Pager.EVENT_CHANGE="EVENT_CHANGE",BI.Pager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.pager",BI.Pager),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,element:"<a/>"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{consts:{loadedText:BI.i18nText("BI-Load_More"),endText:BI.i18nText("BI-No_More_Data")},_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=this;this.loaded=BI.createWidget({type:"bi.text_button",cls:"loading-text bi-list-item-simple",text:this.consts.loadedText,width:120,handler:this.options.handler}),this.loaded.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.loading=BI.createWidget({type:"bi.layout",width:this.options.height,height:this.options.height,cls:"loading-background cursor-default"});var b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,cardName:"loading"}]}),this.invisible()},_reset:function(){this.visible(),this.loaded.setText(this.consts.loadedText),this.loaded.enable()},setLoaded:function(){this._reset(),this.cardLayout.showCardByName("loaded")},setEnd:function(){this.setLoaded(),this.loaded.setText(this.consts.endText),this.loaded.disable()},setLoading:function(){this._reset(),this.cardLayout.showCardByName("loading")}}),BI.shortcut("bi.loading_bar",BI.LoadingBar),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]})},doClick:function(){BI.IconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconButton.EVENT_CHANGE,this)}}),BI.IconButton.EVENT_CHANGE="IconButton.EVENT_CHANGE",BI.shortcut("bi.icon_button",BI.IconButton),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.iconHeight)?BI.createWidget({type:"bi.center_adapt",element:this,items:[this.image]}):BI.createWidget({type:"bi.adaptive",element:this,items:[this.image],scrollable:!1})},setWidth:function(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},getSrc:function(){return this.image.getSrc()},doClick:function(){BI.ImageButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageButton.EVENT_CHANGE,this)}}),BI.ImageButton.EVENT_CHANGE="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button",minWidth:a.block===!0||a.clear===!0?0:90,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconClass:"",level:"common",block:!1,clear:!1,textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height+"px"}),BI.isKey(a.iconClass)?(this.icon=BI.createWidget({type:"bi.icon",width:18}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value}),BI.createWidget({type:"bi.horizontal_auto",cls:"button-"+a.level+" "+a.iconClass,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",cls:"button-"+a.level,textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this); +},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},destroy:function(){BI.Button.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.button",BI.Button),BI.Button.EVENT_CHANGE="EVENT_CHANGE"}(jQuery),BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,forceCenter:a.forceCenter,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py})},doClick:function(){BI.TextButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextButton.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconIconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const,c=BI.createWidget({type:"bi.layout",width:a.blankWidth});this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:b.commonWidth}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:b.commonWidth}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.icon1,this.icon2,this.text)}))))},doClick:function(){BI.BlankIconIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_icon_text_item",BI.BlankIconIconTextItem),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},c,this.text,{type:"bi.layout",width:b.commonWidth})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},cls:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const,c=BI.createWidget({type:"bi.layout",width:a.blankWidth});this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),d=BI.createWidget({type:"bi.layout",width:b.commonWidth});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.text,d)}))))},doClick:function(){BI.IconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_item",BI.IconTextIconItem),BI.IconTextItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-item",direction:BI.Direction.Left,logic:{dynamic:!1},iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.IconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_item",BI.IconTextItem),BI.TextIconItem=BI.inherit(BI.BasicButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-icon-item",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-item",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.py})},doClick:function(){BI.TextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_item",BI.TextItem),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-icon-node",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var c=BI.createWidget({type:"bi.center_adapt",cls:a.iconCls1,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),d=BI.createWidget({type:"bi.layout",width:b.commonWidth});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",c,this.text,d)}))))},doClick:function(){BI.IconTextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_node",BI.IconTextIconNode),BI.IconTextNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-text-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.IconTextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_node",BI.IconTextNode),BI.TextIconNode=BI.inherit(BI.NodeButton,{_const:{commonWidth:25},_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-icon-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconNode.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:b.commonWidth,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconNode.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.TextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_node",BI.TextIconNode),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-node",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextNode.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.py})},doClick:function(){BI.TextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_node",BI.TextNode),BI.CodeEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-code-editor bi-card",value:"",watermark:"",lineHeight:2,readOnly:!1,paramFormatter:function(a){return a}})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.editor=CodeMirror(this.element[0],{textWrapping:!0,lineWrapping:!0,lineNumbers:!1,readOnly:a.readOnly}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(a,c){BI.nextTick(function(){b.fireEvent(BI.CodeEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b.watermark.setVisible(!1),b.fireEvent(BI.CodeEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.watermark.setVisible(BI.isEmptyString(b.getValue())),b.fireEvent(BI.CodeEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:a.watermark,cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:5}]}),BI.isKey(a.value)&&BI.nextTick(function(){b.setValue(a.value)})},_setEnable:function(a){BI.CodeEditor.superclass._setEnable.apply(this,arguments),this.editor.setOption("readOnly",a!==!0&&"nocursor")},_checkWaterMark:function(){var a=this.options;BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},insertParam:function(a){var b=a;a=this.options.paramFormatter(a);var c=this.editor.getCursor();this.editor.replaceSelection(a);var d=this.editor.getCursor(),e={className:"param",atomic:!0};BI.isNotNull(a.match(/^<!.*!>$/))&&(e.className="error-param"),e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getValue:function(){return this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(a.markedSpans,function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c})},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g;return a.match(b)},setValue:function(a){var b,c=this;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var d=/\$[\{][^\}]*[\}]/,e=b.match(d);BI.isNotEmptyArray(e)?c.insertParam(e[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},focus:function(){this.editor.focus()},blur:function(){this.editor.getInputField().blur()},setStyle:function(a){this.style=a,this.element.css(a)},getStyle:function(){return this.style},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.CodeEditor.EVENT_CHANGE="EVENT_CHANGE",BI.CodeEditor.EVENT_BLUR="EVENT_BLUR",BI.CodeEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.code_editor",BI.CodeEditor),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,tipType:"warning",inputType:"text",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){BI.Editor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"<input type='"+b.inputType+"'/>",root:!0,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,forceCenter:!0,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}),this.watermark.element.css({position:"absolute",left:"3px",right:"3px",top:"0px",bottom:"0px"}));var c=[{el:{type:"bi.default",items:this.watermark?[this.editor,this.watermark]:[this.editor]},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:c}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a.setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a.setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a.setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a.setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?this.setValue(this.options.value):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this.setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(this.editor.getValue())),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,this),this._checkToolTip(),BI.Bubbles.get(this.getName())},disableError:function(){this.disabledError=!0,this._checkError()},enableError:function(){this.disabledError=!1,this._checkError()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},enableWaterMark:function(){this.disabledWaterMark=!1,this._checkWaterMark()},focus:function(){this.element.addClass("text-editor-focus"),this.editor.focus()},blur:function(){this.element.removeClass("text-editor-focus"),this.editor.blur()},selectAll:function(){this.editor.selectAll()},onKeyDown:function(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),this._checkError(),this._checkWaterMark()},getLastValidValue:function(){return this.editor.getLastValidValue()},resetLastValidValue:function(){this.editor.resetLastValidValue()},getValue:function(){return this.isValid()?BI.trim(this.editor.getValue()):BI.trim(this.editor.getLastValidValue())},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.Editor.EVENT_CHANGE="EVENT_CHANGE",BI.Editor.EVENT_FOCUS="EVENT_FOCUS",BI.Editor.EVENT_BLUR="EVENT_BLUR",BI.Editor.EVENT_CLICK="EVENT_CLICK",BI.Editor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Editor.EVENT_SPACE="EVENT_SPACE",BI.Editor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Editor.EVENT_START="EVENT_START",BI.Editor.EVENT_PAUSE="EVENT_PAUSE",BI.Editor.EVENT_STOP="EVENT_STOP",BI.Editor.EVENT_CONFIRM="EVENT_CONFIRM",BI.Editor.EVENT_VALID="EVENT_VALID",BI.Editor.EVENT_ERROR="EVENT_ERROR",BI.Editor.EVENT_ENTER="EVENT_ENTER",BI.Editor.EVENT_RESTRICT="EVENT_RESTRICT",BI.Editor.EVENT_REMOVE="EVENT_REMOVE",BI.Editor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.editor",BI.Editor),BI.MultifileEditor=BI.inherit(BI.Single,{_defaultConfig:function(){ +var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADED,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",scrollable:!1,items:[this.file]},top:0,right:0,left:0,bottom:0}]})},select:function(){this.file.select()},getValue:function(){return this.file.getValue()},upload:function(){this.file.upload()},reset:function(){this.file.reset()}}),BI.MultifileEditor.EVENT_CHANGE="MultifileEditor.EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="MultifileEditor.EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="MultifileEditor.EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="MultifileEditor.EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="MultifileEditor.EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor bi-card",value:""})},_init:function(){BI.TextAreaEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.content=BI.createWidget({type:"bi.layout",tagName:"textarea",width:"100%",height:"100%",cls:"bi-textarea textarea-editor-content display-block"}),this.content.element.css({resize:"none"}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",items:[this.content]},left:0,right:3,top:0,bottom:5}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),$(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&($(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),$(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&b.setValue(a.value),BI.isNotNull(a.style)&&b.setValue(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark",textAlign:"left",height:30,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)}}),BI.TextAreaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextAreaEditor.EVENT_BLUR="EVENT_BLUR",BI.TextAreaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.textarea_editor",BI.TextAreaEditor),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.baseCls||"")+" x-icon b-font horizon-center display-block"})},_init:function(){BI.Icon.superclass._init.apply(this,arguments),BI.isIE9Below()&&this.element.addClass("hack")}}),BI.shortcut("bi.icon",BI.Icon),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-iframe",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("<iframe frameborder='0' src='"+a.src+"'>"),BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name},getWidth:function(){return this.options.width},getHeight:function(){return this.options.height}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-img display-block",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("<img src='"+a.src+"'>"),BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.Checkbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Checkbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.Checkbox.superclass._init.apply(this,arguments)},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)}}),BI.Checkbox.EVENT_CHANGE="Checkbox.EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',BI.cjkEncode(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1<b&&b<a.file.fileSize)return void(isFunction(a.onerror)&&a.onerror());for(var e=new XMLHttpRequest,f=e.upload||{addEventListener:function(a,b){this["on"+a]=b}},g=0;g<length;g++)f.addEventListener(split[g].substring(2),function(b){return function(c){isFunction(a[b])&&a[b](c,e)}}(split[g]),!1);if(f.addEventListener("load",function(b){a.onreadystatechange===!1?isFunction(a.onload)&&a.onload(b,e):setTimeout(function(){4===e.readyState?isFunction(a.onload)&&a.onload(b,e):setTimeout(arguments.callee,15)},15)},!1),e.open("post",a.url+"&filename="+window.encodeURIComponent(a.file.fileName),!0),e.upload)e.onreadystatechange=function(){switch(e.readyState){case 4:var b=BI.jsonDecode(e.responseText);a.file.type.indexOf("image")!=-1&&(b.attach_type="image"),b.filename=a.file.fileName,1==a.maxlength?a.attach_array[0]=b:a.attach_array.push(b)}};else{var h={loaded:0,total:a.file.fileSize||a.file.size,simulation:!0};h.interval=setInterval(function(){h.loaded+=256,h.total<=h.loaded&&(h.loaded=h.total),f.onprogress(h)},100),e.onabort=function(){f.onabort({})},e.onerror=function(){f.onerror({})},e.onreadystatechange=function(){switch(e.readyState){case 2:case 3:h.total<=h.loaded&&(h.loaded=h.total),f.onprogress(h);break;case 4:if(clearInterval(h.interval),h.interval=0,h.loaded=h.total,f.onprogress(h),199<e.status&&e.status<400){f.onload({});var b=BI.jsonDecode(e.responseText);b.filename=a.file.fileName,a.file.type.indexOf("image")!=-1&&(b.attach_type="image"),a.attach_array.push(b)}else f.onerror({})}},f.onloadstart(h)}var i="AjaxUploadBoundary"+(new Date).getTime();if(e.setRequestHeader("Content-Type","multipart/form-data; boundary="+i),a.file.getAsBinary)e[e.sendAsBinary?"sendAsBinary":"send"](multipart(i,a.name,a.file));else{e.setRequestHeader("Content-Type","multipart/form-data");var j=new FormData;j.append("FileData",a.file),e.send(j)}return a}:function(handler,maxSize,width,height){var url=handler.url.concat(-1===handler.url.indexOf("?")?"?":"&","AjaxUploadFrame=true"),rpe={loaded:1,total:100,simulation:!0,interval:setInterval(function(){rpe.loaded<rpe.total&&++rpe.loaded,isFunction(handler.onprogress)&&handler.onprogress(rpe,{})},100)},onload=function(){iframe.onreadystatechange=iframe.onload=iframe.onerror=null,form.parentNode.removeChild(form),form=null,clearInterval(rpe.interval);try{var a=(iframe.contentWindow.document||iframe.contentWindow.contentDocument).body.innerHTML,b=BI.jsonDecode(a);handler.file.type.indexOf("image")!=-1&&(b.attach_type="image"),b.filename=BI.cjkDecode(handler.file.fileName),1==handler.maxlength?handler.attach_array[0]=b:handler.attach_array.push(b)}catch(c){isFunction(handler.onerror)&&handler.onerror(rpe,event||window.event)}isFunction(handler.onload)&&handler.onload(rpe,{responseText:a})},target=["AjaxUpload",(new Date).getTime(),String(Math.random()).substring(2)].join("_");try{var form=document.createElement('<form enctype="multipart/form-data"></form>'),iframe=handler.iframe||(handler.iframe=document.createElement('<iframe id="'+target+'" name="'+target+'" src="'+url+'"></iframe>'))}catch(e){var form=document.createElement("form"),iframe=handler.iframe||(handler.iframe=document.createElement("iframe"));form.setAttribute("enctype","multipart/form-data"),iframe.setAttribute("name",iframe.id=target),iframe.setAttribute("src",url)}with(iframe.style.position="absolute",iframe.style.left=iframe.style.top="-10000px",iframe.onload=onload,iframe.onerror=function(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||window.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded<rpe.total&&++rpe.loaded,handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(a,b,c,d){var e=a.files.length,f=a.onload,g=a.onloadstart;for(a.current=0,a.total=0,a.sent=0;a.current<e;)a.total+=a.files[a.current].fileSize||a.files[a.current].size,a.current++;return a.current=0,e&&a.files[0].fileSize!==-1?(a.file=a.files[a.current],sendFile(a,b,c,d).onload=function(h,i){a.onloadstart=null,a.sent+=a.files[a.current].fileSize||a.files[a.current].size,++a.current<e?(a.file=a.files[a.current],sendFile(a,b,c,d).onload=arguments.callee):f&&(a.onloadstart=g,a.onload=f,a.onload(h,i))}):e&&(a.total=100*e,a.file=a.files[a.current],sendFile(a,b,c,d).onload=function(h,i){var j=arguments.callee;a.onloadstart=null,a.sent+=100,++a.current<e?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(a.iframe.parentNode.removeChild(a.iframe),a.iframe=null),setTimeout(function(){a.file=a.files[a.current],sendFile(a,b,c,d).onload=j},15)):f&&setTimeout(function(){a.iframe.parentNode.removeChild(a.iframe),a.iframe=null,a.onloadstart=g,a.onload=f,a.onload(h,i)},15)}),a};BI.File=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-file display-block",element:"<input type='file'>",name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var a=this,b=this.options;BI.File.superclass._init.apply(this,arguments),b.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",b.name||this.getName()),BI.nextTick(function(){var c=a.wrap=a._wrap(a.element[0],b.maxSize);c.onloadstart=function(b,c){a.fireEvent(BI.File.EVENT_UPLOADSTART)},c.onprogress=function(b,c){this.file.fileSize!==-1&&b.simulation,a.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:b.total,loaded:b.loaded,simulation:b.simulation})},c.onerror=function(){a.fireEvent(BI.File.EVENT_ERROR)},c.onload=function(b,c){var d=this;setTimeout(function(){d.clean(),d.hide(),a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url?b.url:BI.servletURL+"?op=fr_attach&cmd=ah_upload",c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0})},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d<e.length;d++){var f=e.item(d),g=f.value||f.name,h=f.fileName||(f.fileName=g.split("\\").pop()),i=-1!==h.indexOf(".")?h.split(".").pop().toLowerCase():"unknown",j=f.fileSize||f.size;a.fileType&&-1===a.fileType.indexOf("*."+i)?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")),b.fireEvent(BI.File.EVENT_ERROR,{errorType:0,file:f})):a.maxSize!==-1&&j&&a.maxSize<j?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")),b.fireEvent(BI.File.EVENT_ERROR,{errorType:1,file:f})):(a.files.unshift(f),b.fireEvent(BI.File.EVENT_CHANGE,{file:f}))}c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){this.dom.disabled||(this.dom.disabled=!0,this.dom.input.setAttribute("disabled","disabled"))}})},select:function(){$(this.wrap.dom.input).click()},upload:function(a){this.wrap.upload(a)},getValue:function(){return this.wrap.attach_array},reset:function(){this.wrap.attach_array=[],this.wrap.attach_names=[],this.wrap.attachNum=0},_setEnable:function(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?this.element.attr("disabled","disabled"):this.element.removeAttr("disabled")}}),BI.File.EVENT_CHANGE="BI.File.EVENT_CHANGE",BI.File.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.File.EVENT_ERROR="EVENT_ERROR",BI.File.EVENT_PROGRESS="EVENT_PROGRESS",BI.File.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.file",BI.File)}(),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-input display-block",element:"<input/>",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var a=this,b=!1,c=!1,d=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),e=BI.debounce(BI.bind(this._click,this),BI.EVENT_RESPONSE_TIME,!0);this._blurDebounce=BI.debounce(BI.bind(this._blur,this),BI.EVENT_RESPONSE_TIME,!0),this.element.keydown(function(d){c=!1,b=d.ctrlKey,a.fireEvent(BI.Input.EVENT_QUICK_DOWN)}).keyup(function(b){c&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,d(b.keyCode))}).on("input propertychange",function(b){c=!0,a._keydown_=!0,d(b.keyCode)}).click(function(a){a.stopPropagation(),e()}).mousedown(function(b){a.element.val(a.element.val())}).focusout(function(b){a._blurDebounce()})},_focus:function(){this.element.addClass("bi-input-focus"),this._checkValidationOnValueChange(),this._isEditing=!0,""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this.fireEvent(BI.Input.EVENT_FOCUS)},_blur:function(){function a(){b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM)),b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this._focus(),this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){this.isValid()&&BI.trim(this._lastValidValue)===BI.trim(this.getValue())||this._checkValidationOnValueChange(),this.isValid()&&""!==BI.trim(this.getValue())&&((BI.trim(this.getValue())===this._lastValue||this._start&&null!=this._lastValue&&""!==this._lastValue)&&(this._pause!==!0||/(\s|\u00A0)$/.test(this.getValue()))||(this._start=!0,this._pause=!1,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STARTEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_START))),b===!0&&86===a?this._valueChange():(a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE)),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_defaultState:function(){""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue(),this._lastSubmitValue=null},_valueChange:function(){this.isValid()&&BI.trim(this.getValue())!==this._lastSubmitValue&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,this.getValue(),this),this.fireEvent(BI.Input.EVENT_CHANGE),this._lastSubmitValue=BI.trim(this.getValue())),""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue()},_checkValidationOnValueChange:function(){var a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastValidValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this._focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(this.element.blur(),this._blurDebounce())},selectAll:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能select");this.element.select(),this._isEditing=!0},setValue:function(a){this.element.val(a),BI.nextTick(BI.bind(function(){this._checkValidationOnValueChange(),this._defaultState(),this.isValid()&&(this._lastSubmitValue=this.getValue())},this))},getValue:function(){return this.element.val()||""},isEditing:function(){return this._isEditing},getLastValidValue:function(){return this._lastValidValue},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this._lastValidValue=this.getValue(),this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastValidValue===this.getValue()&&(this._lastValidValue=null),this.element.addClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_ERROR,BI.trim(this.getValue()),this))},_setEnable:function(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),BI.Input.EVENT_CHANGE="EVENT_CHANGE",BI.Input.EVENT_FOCUS="EVENT_FOCUS",BI.Input.EVENT_CLICK="EVENT_CLICK",BI.Input.EVENT_BLUR="EVENT_BLUR",BI.Input.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Input.EVENT_QUICK_DOWN="EVENT_QUICK_DOWN",BI.Input.EVENT_SPACE="EVENT_SPACE",BI.Input.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Input.EVENT_START="EVENT_START",BI.Input.EVENT_PAUSE="EVENT_PAUSE",BI.Input.EVENT_STOP="EVENT_STOP",BI.Input.EVENT_CONFIRM="EVENT_CONFIRM",BI.Input.EVENT_REMOVE="EVENT_REMOVE",BI.Input.EVENT_EMPTY="EVENT_EMPTY",BI.Input.EVENT_VALID="EVENT_VALID",BI.Input.EVENT_ERROR="EVENT_ERROR",BI.Input.EVENT_ENTER="EVENT_ENTER",BI.Input.EVENT_RESTRICT="EVENT_RESTRICT",BI.shortcut("bi.input",BI.Input),BI.Radio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Radio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-radio radio-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.Radio.superclass._init.apply(this,arguments)},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)}}),BI.Radio.EVENT_CHANGE="Radio.EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio),BI.Label=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Label.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-label",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:"",keyword:""})},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword}},_init:function(){BI.Label.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();if(BI.isNumber(a.width)&&a.width>0){if(BI.isNumber(a.textWidth)&&a.textWidth>0){if(BI.isNumber(a.height)&&a.height>0){var c=(a.width-a.textWidth)/2;return BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:c+a.hgap+a.lgap,right:c+a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})}return b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})}return"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}))}return BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_createNotCenterEl:function(){var a=this.options,b=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?BI.isNumber(a.height)&&a.height>0?(BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})):(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.Label.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.Label.superclass.populate.apply(this,arguments)}}),BI.shortcut("bi.label",BI.Label),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),BI.Bubble=BI.inherit(BI.Tip,{_defaultConfig:function(){return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble",direction:"top",text:"",height:35})},_init:function(){BI.Bubble.superclass._init.apply(this,arguments);var a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text",text:this.options.text,hgap:10,height:30})},_top:function(){return BI.createWidget({type:"bi.vertical",items:[{el:this._createBubbleText(),height:30},{el:{type:"bi.layout"},height:3}]})},_bottom:function(){return BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout"},height:3},{el:this._createBubbleText(),height:30}]})},_left:function(){return BI.createWidget({type:"bi.right",items:[{el:{type:"bi.layout",width:3,height:30}},{el:this._createBubbleText()}]})},_right:function(){return BI.createWidget({type:"bi.left",items:[{el:{type:"bi.layout",width:3,height:30}},{el:this._createBubbleText()}]})},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble), +BI.Toast=BI.inherit(BI.Tip,{_const:{minWidth:200,hgap:20},_defaultConfig:function(){return BI.extend(BI.Toast.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-toast",text:"",level:"success",height:30})},_init:function(){BI.Toast.superclass._init.apply(this,arguments);var a=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+a.level);var b=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b}),this.text=BI.createWidget({type:"bi.label",element:this,text:a.text,height:30,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:10},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:20})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:16}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,textHeight:20,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger cursor-pointer",height:30})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),function(a,b){"function"==typeof define&&define.amd?define("eve",function(){return b()}):"object"==typeof exports?module.exports=b():a.eve=b()}(this,function(){var a,b,c="0.4.2",d="hasOwnProperty",e=/[\.\/]/,f="*",g=function(){},h=function(a,b){return a-b},i={n:{}},j=function(c,d){c=String(c);var e,f=b,g=Array.prototype.slice.call(arguments,2),i=j.listeners(c),k=0,l=[],m={},n=[],o=a;a=c,b=0;for(var p=0,q=i.length;p<q;p++)"zIndex"in i[p]&&(l.push(i[p].zIndex),i[p].zIndex<0&&(m[i[p].zIndex]=i[p]));for(l.sort(h);l[k]<0;)if(e=m[l[k++]],n.push(e.apply(d,g)),b)return b=f,n;for(p=0;p<q;p++)if(e=i[p],"zIndex"in e)if(e.zIndex==l[k]){if(n.push(e.apply(d,g)),b)break;do if(k++,e=m[l[k]],e&&n.push(e.apply(d,g)),b)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),b)break;return b=f,a=o,n.length?n:null};return j._events=i,j.listeners=function(a){var b,c,d,g,h,j,k,l,m=a.split(e),n=i,o=[n],p=[];for(g=0,h=m.length;g<h;g++){for(l=[],j=0,k=o.length;j<k;j++)for(n=o[j].n,c=[n[m[g]],n[f]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},j.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(e),d=i,f=0,h=c.length;f<h;f++)d=d.n,d=d.hasOwnProperty(c[f])&&d[c[f]]||(d[c[f]]={n:{}});for(d.f=d.f||[],f=0,h=d.f.length;f<h;f++)if(d.f[f]==b)return g;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},j.f=function(a){var b=[].slice.call(arguments,1);return function(){j.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},j.stop=function(){b=1},j.nt=function(b){return b?new RegExp("(?:\\.|\\/|^)"+b+"(?:\\.|\\/|$)").test(a):a},j.nts=function(){return a.split(e)},j.off=j.unbind=function(a,b){if(!a)return void(j._events=i={n:{}});var c,g,h,k,l,m,n,o=a.split(e),p=[i];for(k=0,l=o.length;k<l;k++)for(m=0;m<p.length;m+=h.length-2){if(h=[m,1],c=p[m].n,o[k]!=f)c[o[k]]&&h.push(c[o[k]]);else for(g in c)c[d](g)&&h.push(c[g]);p.splice.apply(p,h)}for(k=0,l=p.length;k<l;k++)for(c=p[k];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;m<n;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(g in c.n)if(c.n[d](g)&&c.n[g].f){var q=c.n[g].f;for(m=0,n=q.length;m<n;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[g].f}}else{delete c.f;for(g in c.n)c.n[d](g)&&c.n[g].f&&delete c.n[g].f}c=c.n}},j.once=function(a,b){var c=function(){return j.unbind(a,c),b.apply(this,arguments)};return j.on(a,c)},j.version=c,j.toString=function(){return"You are running Eve "+c},j}),function(a,b){"function"==typeof define&&define.amd?define("raphael.core",["eve"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("eve")):a.Raphael=b(a.eve)}(this,function(a){function b(c){if(b.is(c,"function"))return t?c():a.on("raphael.DOMload",c);if(b.is(c,U))return b._engine.create[C](b,c.splice(0,3+b.is(c[0],S))).add(c);var d=Array.prototype.slice.call(arguments,0);if(b.is(d[d.length-1],"function")){var e=d.pop();return t?e.call(b._engine.create[C](b,d)):a.on("raphael.DOMload",function(){e.call(b._engine.create[C](b,d))})}return b._engine.create[C](b,arguments)}function c(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var d in a)a[y](d)&&(b[d]=c(a[d]));return b}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function e(a,b,c){function e(){var f=Array.prototype.slice.call(arguments,0),g=f.join("␀"),h=e.cache=e.cache||{},i=e.count=e.count||[];return h[y](g)?(d(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[C](b,f),c?c(h[g]):h[g])}return e}function f(){return this.hex}function g(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function h(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function i(a,b,c,d,e,f,g,i,j){null==j&&(j=1),j=j>1?1:j<0?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;p<l;p++){var q=k*m[p]+k,r=h(q,a,c,e,g),s=h(q,b,d,f,i),t=r*r+s*s;o+=n[p]*M.sqrt(t)}return k*o}function j(a,b,c,d,e,f,g,h,j){if(!(j<0||i(a,b,c,d,e,f,g,h)<j)){var k,l=1,m=l/2,n=l-m,o=.01;for(k=i(a,b,c,d,e,f,g,h,n);P(k-j)>o;)m/=2,n+=(k<j?1:-1)*m,k=i(a,b,c,d,e,f,g,h,n);return n}}function k(a,b,c,d,e,f,g,h){if(!(N(a,c)<O(e,g)||O(a,c)>N(e,g)||N(b,d)<O(f,h)||O(b,d)>N(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+O(a,c).toFixed(2)||n>+N(a,c).toFixed(2)||n<+O(e,g).toFixed(2)||n>+N(e,g).toFixed(2)||o<+O(b,d).toFixed(2)||o>+N(b,d).toFixed(2)||o<+O(f,h).toFixed(2)||o>+N(f,h).toFixed(2)))return{x:l,y:m}}}}function l(a,c,d){var e=b.bezierBBox(a),f=b.bezierBBox(c);if(!b.isBBoxIntersect(e,f))return d?0:[];for(var g=i.apply(0,a),h=i.apply(0,c),j=N(~~(g/5),1),l=N(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;q<j+1;q++){var r=b.findDotsAtSegment.apply(b,a.concat(q/j));m.push({x:r.x,y:r.y,t:q/j})}for(q=0;q<l+1;q++)r=b.findDotsAtSegment.apply(b,c.concat(q/l)),n.push({x:r.x,y:r.y,t:q/l});for(q=0;q<j;q++)for(var s=0;s<l;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=P(u.x-t.x)<.001?"y":"x",y=P(w.x-v.x)<.001?"y":"x",z=k(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+P((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+P((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&A<=1.001&&B>=0&&B<=1.001&&(d?p++:p.push({x:z.x,y:z.y,t1:O(A,1),t2:O(B,1)}))}}return p}function m(a,c,d){a=b._path2curve(a),c=b._path2curve(c);for(var e,f,g,h,i,j,k,m,n,o,p=d?0:[],q=0,r=a.length;q<r;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=c.length;t<u;t++){var v=c[t];if("M"==v[0])g=k=v[1],h=m=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,m,k,m],g=k,h=m);var w=l(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;x<y;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function n(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function o(){return this.x+G+this.y+G+this.width+" × "+this.height}function p(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;i<8;i++){if(f=g(e)-a,P(f)<b)return e;if(h=(3*l*e+2*k)*e+j,P(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,e<c)return c;if(e>d)return d;for(;c<d;){if(f=g(e),P(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function q(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[y](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(ka)}this.anim=d,this.top=c[c.length-1],this.percents=c}function r(c,d,e,f,g,h){e=$(e);var i,j,k,l,m,o,q=c.ms,r={},s={},t={};if(f)for(w=0,x=fb.length;w<x;w++){var u=fb[w];if(u.el.id==d.id&&u.anim==c){u.percent!=e?(fb.splice(w,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var w=0,x=c.percents.length;w<x;w++){if(c.percents[w]==e||c.percents[w]>f*c.top){e=c.percents[w],m=c.percents[w-1]||0,q=q/c.top*(e-m),l=c.percents[w+1],i=c.anim[e];break}f&&d.attr(c.anim[c.percents[w]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var z in i)if(i[y](z)&&(ca[y](z)||d.paper.customAttributes[y](z)))switch(r[z]=d.attr(z),null==r[z]&&(r[z]=ba[z]),s[z]=i[z],ca[z]){case S:t[z]=(s[z]-r[z])/q;break;case"colour":r[z]=b.getRGB(r[z]);var A=b.getRGB(s[z]);t[z]={r:(A.r-r[z].r)/q,g:(A.g-r[z].g)/q,b:(A.b-r[z].b)/q};break;case"path":var B=Ia(r[z],s[z]),C=B[1];for(r[z]=B[0],t[z]=[],w=0,x=r[z].length;w<x;w++){t[z][w]=[0];for(var E=1,F=r[z][w].length;E<F;E++)t[z][w][E]=(C[w][E]-r[z][w][E])/q}break;case"transform":var G=d._,J=Na(G[z],s[z]);if(J)for(r[z]=J.from,s[z]=J.to,t[z]=[],t[z].real=!0,w=0,x=r[z].length;w<x;w++)for(t[z][w]=[r[z][w][0]],E=1,F=r[z][w].length;E<F;E++)t[z][w][E]=(s[z][w][E]-r[z][w][E])/q;else{var K=d.matrix||new n,L={_:{transform:G.transform},getBBox:function(){return d.getBBox(1)}};r[z]=[K.a,K.b,K.c,K.d,K.e,K.f],La(L,s[z]),s[z]=L._.transform,t[z]=[(L.matrix.a-K.a)/q,(L.matrix.b-K.b)/q,(L.matrix.c-K.c)/q,(L.matrix.d-K.d)/q,(L.matrix.e-K.e)/q,(L.matrix.f-K.f)/q]}break;case"csv":var M=H(i[z])[I](v),N=H(r[z])[I](v);if("clip-rect"==z)for(r[z]=N,t[z]=[],w=N.length;w--;)t[z][w]=(M[w]-r[z][w])/q;s[z]=M;break;default:for(M=[][D](i[z]),N=[][D](r[z]),t[z]=[],w=d.paper.customAttributes[z].length;w--;)t[z][w]=((M[w]||0)-(N[w]||0))/q}var O=i.easing,P=b.easing_formulas[O];if(!P)if(P=H(O).match(Y),P&&5==P.length){var Q=P;P=function(a){return p(a,+Q[1],+Q[2],+Q[3],+Q[4],q)}}else P=la;if(o=i.start||c.start||+new Date,u={anim:c,percent:e,timestamp:o,start:o+(c.del||0),status:0,initstatus:f||0,stop:!1,ms:q,easing:P,from:r,diff:t,to:s,el:d,callback:i.callback,prev:m,next:l,repeat:h||c.times,origin:d.attr(),totalOrigin:g},fb.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-q*f,1==fb.length))return hb();k&&(u.start=new Date-u.ms*f),1==fb.length&&gb(hb)}a("raphael.anim.start."+d.id,d,c)}}function s(a){for(var b=0;b<fb.length;b++)fb[b].el.paper==a&&fb.splice(b--,1)}b.version="2.1.4",b.eve=a;var t,u,v=/[, ]+/,w={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},x=/\{(\d+)\}/g,y="hasOwnProperty",z={doc:document,win:window},A={was:Object.prototype[y].call(z.win,"Raphael"),is:z.win.Raphael},B=function(){this.ca=this.customAttributes={}},C="apply",D="concat",E="ontouchstart"in z.win||z.win.DocumentTouch&&z.doc instanceof DocumentTouch,F="",G=" ",H=String,I="split",J="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[I](G),K={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},L=H.prototype.toLowerCase,M=Math,N=M.max,O=M.min,P=M.abs,Q=M.pow,R=M.PI,S="number",T="string",U="array",V=Object.prototype.toString,W=(b._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),X={NaN:1,Infinity:1,"-Infinity":1},Y=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Z=M.round,$=parseFloat,_=parseInt,aa=H.prototype.toUpperCase,ba=b._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},ca=b._availableAnimAttrs={blur:S,"clip-rect":"csv",cx:S,cy:S,fill:"colour","fill-opacity":S,"font-size":S,height:S,opacity:S,path:"path",r:S,rx:S,ry:S,stroke:"colour","stroke-opacity":S,"stroke-width":S,transform:"transform",width:S,x:S,y:S},da=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,ea={hs:1,rg:1},fa=/,?([achlmqrstvxz]),?/gi,ga=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ha=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ia=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ja=(b._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ka=function(a,b){return $(a)-$(b)},la=function(a){return a},ma=b._rectPath=function(a,b,c,d,e){return e?[["M",a+e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]]:[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},na=function(a,b,c,d){return null==d&&(d=c),[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},oa=b._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return na(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return na(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return ma(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return ma(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return ma(b.x,b.y,b.width,b.height)},set:function(a){var b=a._getBBox();return ma(b.x,b.y,b.width,b.height)}},pa=b.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=Ia(a),e=0,g=a.length;e<g;e++)for(i=a[e],f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(b._g=z,b.type=z.win.SVGAngle||z.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==b.type){var qa,ra=z.doc.createElement("div");if(ra.innerHTML='<v:shape adj="1"/>',qa=ra.firstChild,qa.style.behavior="url(#default#VML)",!qa||"object"!=typeof qa.adj)return b.type=F;ra=null}b.svg=!(b.vml="VML"==b.type),b._Paper=B,b.fn=u=B.prototype=b.prototype,b._id=0,b._oid=0,b.is=function(a,b){return b=L.call(b),"finite"==b?!X[y](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||V.call(a).slice(8,-1).toLowerCase()==b},b.angle=function(a,c,d,e,f,g){if(null==f){var h=a-d,i=c-e;return h||i?(180+180*M.atan2(-i,-h)/R+360)%360:0}return b.angle(a,c,f,g)-b.angle(d,e,f,g)},b.rad=function(a){return a%360*R/180},b.deg=function(a){return Math.round(180*a/R%360*1e3)/1e3},b.snapTo=function(a,c,d){if(d=b.is(d,"finite")?d:10,b.is(a,U)){for(var e=a.length;e--;)if(P(a[e]-c)<=d)return a[e]}else{a=+a;var f=c%a;if(f<d)return c-f;if(f>a-d)return c-f+a}return c};b.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*M.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});b.setWindow=function(c){a("raphael.setWindow",b,z.win,c),z.win=c,z.doc=z.win.document,b._engine.initWin&&b._engine.initWin(z.win)};var sa=function(a){if(b.vml){var c,d=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write("<body>"),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sa=e(function(a){try{c.style.color=H(a).replace(d,F);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=z.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",z.doc.body.appendChild(i),sa=e(function(a){return i.style.color=a,z.doc.defaultView.getComputedStyle(i,F).getPropertyValue("color")})}return sa(a)},ta=function(){return"hsb("+[this.h,this.s,this.b]+")"},ua=function(){return"hsl("+[this.h,this.s,this.l]+")"},va=function(){return this.hex},wa=function(a,c,d){if(null==c&&b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,c=a.g,a=a.r),null==c&&b.is(a,T)){var e=b.getRGB(a);a=e.r,c=e.g,d=e.b}return(a>1||c>1||d>1)&&(a/=255,c/=255,d/=255),[a,c,d]},xa=function(a,c,d,e){a*=255,c*=255,d*=255;var f={r:a,g:c,b:d,hex:b.rgb(a,c,d),toString:va};return b.is(e,"finite")&&(f.opacity=e),f};b.color=function(a){var c;return b.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(c=b.hsb2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):b.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(c=b.hsl2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):(b.is(a,"string")&&(a=b.getRGB(a)),b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(c=b.rgb2hsl(a),a.h=c.h,a.s=c.s,a.l=c.l,c=b.rgb2hsb(a),a.v=c.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=va,a},b.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-P(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-P(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.rgb2hsb=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=N(a,b,c),g=f-O(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:ta}},b.rgb2hsl=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=N(a,b,c),h=O(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:f<.5?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ua}},b._path2string=function(){return this.join(",").replace(fa,"$1")};b._preload=function(a,b){var c=z.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,z.doc.body.removeChild(this)},c.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(c),c.src=a};b.getRGB=e(function(a){if(!a||(a=H(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:f};!(ea[y](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=sa(a));var c,d,e,g,h,i,j=a.match(W);return j?(j[2]&&(e=_(j[2].substring(5),16),d=_(j[2].substring(3,5),16),c=_(j[2].substring(1,3),16)),j[3]&&(e=_((h=j[3].charAt(3))+h,16),d=_((h=j[3].charAt(2))+h,16),c=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsb2rgb(c,d,e,g)):j[6]?(i=j[6][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsl2rgb(c,d,e,g)):(j={r:c,g:d,b:e,toString:f},j.hex="#"+(16777216|e|d<<8|c<<16).toString(16).slice(1),b.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f}},b),b.hsb=e(function(a,c,d){return b.hsb2rgb(a,c,d).hex}),b.hsl=e(function(a,c,d){return b.hsl2rgb(a,c,d).hex}),b.rgb=e(function(a,b,c){function d(a){return a+.5|0}return"#"+(16777216|d(c)|d(b)<<8|d(a)<<16).toString(16).slice(1)}),b.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},b.getColor.reset=function(){delete this.start},b.parsePathString=function(a){if(!a)return null;var c=ya(a);if(c.arr)return Aa(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return b.is(a,U)&&b.is(a[0],U)&&(e=Aa(a)),e.length||H(a).replace(ga,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ia,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][D](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][D](f));else for(;f.length>=d[g]&&(e.push([b][D](f.splice(0,d[g]))),d[g]););}),e.toString=b._path2string,c.arr=Aa(e),e},b.parseTransformString=e(function(a){if(!a)return null;var c=[];return b.is(a,U)&&b.is(a[0],U)&&(c=Aa(a)),c.length||H(a).replace(ha,function(a,b,d){var e=[];L.call(b);d.replace(ia,function(a,b){b&&e.push(+b)}),c.push([b][D](e))}),c.toString=b._path2string,c});var ya=function(a){var b=ya.ps=ya.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[y](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};b.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=Q(j,3),l=Q(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*M.atan2(q-s,r-t)/R;return(q>s||r<t)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},b.bezierBBox=function(a,c,d,e,f,g,h,i){b.is(a,"array")||(a=[a,c,d,e,f,g,h,i]);var j=Ha.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},b.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},b.isBBoxIntersect=function(a,c){var d=b.isPointInsideBBox;return d(c,a.x,a.y)||d(c,a.x2,a.y)||d(c,a.x,a.y2)||d(c,a.x2,a.y2)||d(a,c.x,c.y)||d(a,c.x2,c.y)||d(a,c.x,c.y2)||d(a,c.x2,c.y2)||(a.x<c.x2&&a.x>c.x||c.x<a.x2&&c.x>a.x)&&(a.y<c.y2&&a.y>c.y||c.y<a.y2&&c.y>a.y)},b.pathIntersection=function(a,b){return m(a,b)},b.pathIntersectionNumber=function(a,b){return m(a,b,1)},b.isPointInsidePath=function(a,c,d){var e=b.pathBBox(a);return b.isPointInsideBBox(e,c,d)&&m(a,[["M",c,d],["H",e.x2+10]],1)%2==1},b._removedFactory=function(b){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var za=b.pathBBox=function(a){var b=ya(a);if(b.bbox)return c(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ia(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;i<j;i++)if(d=a[i],"M"==d[0])e=d[1],f=d[2],g.push(e),h.push(f);else{var k=Ha(e,f,d[1],d[2],d[3],d[4],d[5],d[6]);g=g[D](k.min.x,k.max.x),h=h[D](k.min.y,k.max.y),e=d[5],f=d[6]}var l=O[C](0,g),m=O[C](0,h),n=N[C](0,g),o=N[C](0,h),p=n-l,q=o-m,r={x:l,y:m,x2:n,y2:o,width:p,height:q,cx:l+p/2,cy:m+q/2};return b.bbox=c(r),r},Aa=function(a){var d=c(a);return d.toString=b._path2string,d},Ba=b._pathToRelative=function(a){var c=ya(a);if(c.rel)return Aa(c.rel);b.is(a,U)&&b.is(a&&a[0],U)||(a=b.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;j<k;j++){var l=d[j]=[],m=a[j];if(m[0]!=L.call(m[0]))switch(l[0]=L.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;n<o;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;p<q;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=b._path2string,c.rel=Aa(d),d},Ca=b._pathToAbsolute=function(a){var c=ya(a);if(c.abs)return Aa(c.abs);if(b.is(a,U)&&b.is(a&&a[0],U)||(a=b.parsePathString(a)),!a||!a.length)return[["M",0,0]];var d=[],e=0,f=0,h=0,i=0,j=0;"M"==a[0][0]&&(e=+a[0][1],f=+a[0][2],h=e,i=f,j++,d[0]=["M",e,f]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;n<o;n++){if(d.push(k=[]),l=a[n],l[0]!=aa.call(l[0]))switch(k[0]=aa.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,f][D](l.slice(1)),q=2,r=p.length;q<r;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[D](g(p,m));break;case"M":h=+l[1]+e,i=+l[2]+f;default:for(q=1,r=l.length;q<r;q++)k[q]=+l[q]+(q%2?e:f)}else if("R"==l[0])p=[e,f][D](l.slice(1)),d.pop(),d=d[D](g(p,m)),k=["R"][D](l.slice(-2));else for(var s=0,t=l.length;s<t;s++)k[s]=l[s];switch(k[0]){case"Z":e=h,f=i;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":h=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}return d.toString=b._path2string,c.abs=Aa(d),d},Da=function(a,b,c,d){return[a,b,c,d,c,d]},Ea=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Fa=function(a,b,c,d,f,g,h,i,j,k){var l,m=120*R/180,n=R/180*(+f||0),o=[],p=e(function(a,b,c){var d=a*M.cos(c)-b*M.sin(c),e=a*M.sin(c)+b*M.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(a,b,-n),a=l.x,b=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(M.cos(R/180*f),M.sin(R/180*f),(a-i)/2),r=(b-j)/2,s=q*q/(c*c)+r*r/(d*d);s>1&&(s=M.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*M.sqrt(P((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=M.asin(((b-x)/d).toFixed(9)),z=M.asin(((j-x)/d).toFixed(9));y=a<w?R-y:y,z=i<w?R-z:z,y<0&&(y=2*R+y),z<0&&(z=2*R+z),h&&y>z&&(y-=2*R),!h&&z>y&&(z-=2*R)}var A=z-y;if(P(A)>m){var B=z,C=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*M.cos(z),j=x+d*M.sin(z),o=Fa(i,j,c,d,f,0,h,C,E,[z,B,w,x])}A=z-y;var F=M.cos(y),G=M.sin(y),H=M.cos(z),J=M.sin(z),K=M.tan(A/4),L=4/3*c*K,N=4/3*d*K,O=[a,b],Q=[a+L*G,b-N*F],S=[i+L*J,j-N*H],T=[i,j];if(Q[0]=2*O[0]-Q[0],Q[1]=2*O[1]-Q[1],k)return[Q,S,T][D](o);o=[Q,S,T][D](o).join()[I](",");for(var U=[],V=0,W=o.length;V<W;V++)U[V]=V%2?p(o[V-1],o[V],n).y:p(o[V],o[V+1],n).x;return U},Ga=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:Q(j,3)*a+3*Q(j,2)*i*c+3*j*i*i*e+Q(i,3)*g,y:Q(j,3)*b+3*Q(j,2)*i*d+3*j*i*i*f+Q(i,3)*h}},Ha=e(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:O[C](0,p),y:O[C](0,o)},max:{x:N[C](0,p),y:N[C](0,o)}}}),Ia=b._path2curve=e(function(a,b){var c=!b&&ya(a);if(!b&&c.curve)return Aa(c.curve);for(var d=Ca(a),e=b&&Ca(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][D](Fa[C](0,[b.x,b.y][D](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][D](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][D](Ea(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][D](Ea(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][D](Da(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][D](Da(b.x,b.y,a[1],b.y));break;case"V":a=["C"][D](Da(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][D](Da(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)k[b]="A",e&&(l[b]="A"),a.splice(b++,0,["C"][D](c.splice(0,6)));a.splice(b,1),p=N(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],p=N(d.length,e&&e.length||0))},k=[],l=[],m="",n="",o=0,p=N(d.length,e&&e.length||0);o<p;o++){d[o]&&(m=d[o][0]),"C"!=m&&(k[o]=m,o&&(n=k[o-1])),d[o]=h(d[o],f,n),"A"!=k[o]&&"C"==m&&(k[o]="C"),i(d,o),e&&(e[o]&&(m=e[o][0]),"C"!=m&&(l[o]=m,o&&(n=l[o-1])),e[o]=h(e[o],g,n),"A"!=l[o]&&"C"==m&&(l[o]="C"),i(e,o)),j(d,e,f,g,o),j(e,d,g,f,o);var q=d[o],r=e&&e[o],s=q.length,t=e&&r.length;f.x=q[s-2],f.y=q[s-1],f.bx=$(q[s-4])||f.x,f.by=$(q[s-3])||f.y,g.bx=e&&($(r[t-4])||g.x),g.by=e&&($(r[t-3])||g.y),g.x=e&&r[t-2],g.y=e&&r[t-1]}return e||(c.curve=Aa(d)),e?[d,e]:d},null,Aa),Ja=(b._parseDots=e(function(a){for(var c=[],d=0,e=a.length;d<e;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=b.getRGB(g[1]),f.color.error)return null; +f.opacity=f.color.opacity,f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){for(var h=$(c[d-1].offset||0),i=0,j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=$(i);for(var k=(i-h)/(j-d+1);d<j;d++)h+=k,c[d].offset=h+"%"}return c}),b._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Ka=(b._tofront=function(a,b){b.top!==a&&(Ja(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},b._toback=function(a,b){b.bottom!==a&&(Ja(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},b._insertafter=function(a,b,c){Ja(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},b._insertbefore=function(a,b,c){Ja(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},b.toMatrix=function(a,b){var c=za(a),d={_:{transform:F},getBBox:function(){return c}};return La(d,b),d.matrix}),La=(b.transformPath=function(a,b){return pa(a,Ka(a,b))},b._extractTransform=function(a,c){if(null==c)return a._.transform;c=H(c).replace(/\.{3}|\u2026/g,a._.transform||F);var d=b.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=a._,k=new n;if(j.transform=d||[],d)for(var l=0,m=d.length;l<m;l++){var o,p,q,r,s,t=d[l],u=t.length,v=H(t[0]).toLowerCase(),w=t[0]!=v,x=w?k.invert():0;"t"==v&&3==u?w?(o=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),k.translate(q-o,r-p)):k.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),k.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==v&&7==u&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),Ma=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Na=b._equaliseTransform=function(a,c){c=H(c).replace(/\.{3}|\u2026/g,a),a=b.parseTransformString(a)||[],c=b.parseTransformString(c)||[];for(var d,e,f,g,h=N(a.length,c.length),i=[],j=[],k=0;k<h;k++){if(f=a[k]||Ma(c[k]),g=c[k]||Ma(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=N(f.length,g.length);d<e;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};b._getContainer=function(a,c,d,e){var f;if(f=null!=e||b.is(a,"object")?a:z.doc.getElementById(a),null!=f)return f.tagName?null==c?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}:{container:1,x:a,y:c,width:d,height:e}},b.pathToRelative=Ba,b._engine={},b.path2curve=Ia,b.matrix=function(a,b,c,d,e,f){return new n(a,b,c,d,e,f)},function(a){function c(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var b=M.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof n&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;g<3;g++)for(h=0;h<3;h++){for(j=0,i=0;i<3;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new n(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new n(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,c,d){a=b.rad(a),c=c||0,d=d||0;var e=+M.cos(a).toFixed(9),f=+M.sin(a).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[H.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return b.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=M.sqrt(c(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=M.sqrt(c(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return g<0?(a.rotate=b.deg(M.acos(g)),f<0&&(a.rotate=360-a.rotate)):a.rotate=b.deg(M.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[I]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:F)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:F)+(b.rotate?"r"+[b.rotate,0,0]:F)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(n.prototype);for(var Oa=function(){this.returnValue=!1},Pa=function(){return this.originalEvent.preventDefault()},Qa=function(){this.cancelBubble=!0},Ra=function(){return this.originalEvent.stopPropagation()},Sa=function(a){var b=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,c=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;return{x:a.clientX+c,y:a.clientY+b}},Ta=function(){return z.doc.addEventListener?function(a,b,c,d){var e=function(a){var b=Sa(a);return c.call(d,a,b.x,b.y)};if(a.addEventListener(b,e,!1),E&&K[b]){var f=function(b){for(var e=Sa(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;g<h;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=Pa,b.stopPropagation=Ra;break}return c.call(d,b,e.x,e.y)};a.addEventListener(K[b],f,!1)}return function(){return a.removeEventListener(b,e,!1),E&&K[b]&&a.removeEventListener(K[b],f,!1),!0}}:z.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||z.win.event;var b=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,e=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||Oa,a.stopPropagation=a.stopPropagation||Qa,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),Ua=[],Va=function(b){for(var c,d=b.clientX,e=b.clientY,f=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,g=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,h=Ua.length;h--;){if(c=Ua[h],E&&b.touches){for(var i,j=b.touches.length;j--;)if(i=b.touches[j],i.identifier==c.el._drag.id){d=i.clientX,e=i.clientY,(b.originalEvent?b.originalEvent:b).preventDefault();break}}else b.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;z.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(d,e),l.style.display=o,z.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&a("raphael.drag.over."+c.el.id,c.el,k),d+=g,e+=f,a("raphael.drag.move."+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,b)}},Wa=function(c){b.unmousemove(Va).unmouseup(Wa);for(var d,e=Ua.length;e--;)d=Ua[e],d.el._drag={},a("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,c);Ua=[]},Xa=b.el={},Ya=J.length;Ya--;)!function(a){b[a]=Xa[a]=function(c,d){return b.is(c,"function")&&(this.events=this.events||[],this.events.push({name:a,f:c,unbind:Ta(this.shape||this.node||z.doc,a,c,d||this)})),this},b["un"+a]=Xa["un"+a]=function(c){for(var d=this.events||[],e=d.length;e--;)d[e].name!=a||!b.is(c,"undefined")&&d[e].f!=c||(d[e].unbind(),d.splice(e,1),!d.length&&delete this.events);return this}}(J[Ya]);Xa.data=function(c,d){var e=ja[this.id]=ja[this.id]||{};if(0==arguments.length)return e;if(1==arguments.length){if(b.is(c,"object")){for(var f in c)c[y](f)&&this.data(f,c[f]);return this}return a("raphael.data.get."+this.id,this,e[c],c),e[c]}return e[c]=d,a("raphael.data.set."+this.id,this,d,c),this},Xa.datum=function(){return 0==arguments.length?this._bindData:(this._bindData=arguments[0],this)},Xa.removeData=function(a){return null==a?ja[this.id]={}:ja[this.id]&&delete ja[this.id][a],this},Xa.getData=function(){return c(ja[this.id]||{})},Xa.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},Xa.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var Za=[];Xa.drag=function(c,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=i.clientX,k=i.clientY,l=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,m=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;if(this._drag.id=i.identifier,E&&i.touches)for(var n,o=i.touches.length;o--;)if(n=i.touches[o],this._drag.id=n.identifier,n.identifier==this._drag.id){j=n.clientX,k=n.clientY;break}this._drag.x=j+m,this._drag.y=k+l,!Ua.length&&b.mousemove(Va).mouseup(Wa),Ua.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&a.on("raphael.drag.start."+this.id,d),c&&a.on("raphael.drag.move."+this.id,c),e&&a.on("raphael.drag.end."+this.id,e),a("raphael.drag.start."+this.id,g||f||this,i.clientX+m,i.clientY+l,i)}return this._drag={},Za.push({el:this,start:i}),this.mousedown(i),this},Xa.onDragOver=function(b){b?a.on("raphael.drag.over."+this.id,b):a.unbind("raphael.drag.over."+this.id)},Xa.undrag=function(){for(var c=Za.length;c--;)Za[c].el==this&&(this.unmousedown(Za[c].start),Za.splice(c,1),a.unbind("raphael.drag.*."+this.id));!Za.length&&b.unmousemove(Va).unmouseup(Wa),Ua=[]},u.circle=function(a,c,d){var e=b._engine.circle(this,a||0,c||0,d||0);return this.__set__&&this.__set__.push(e),e},u.rect=function(a,c,d,e,f){var g=b._engine.rect(this,a||0,c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},u.ellipse=function(a,c,d,e){var f=b._engine.ellipse(this,a||0,c||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},u.path=function(a){a&&!b.is(a,T)&&!b.is(a[0],U)&&(a+=F);var c=b._engine.path(b.format[C](b,arguments),this);return this.__set__&&this.__set__.push(c),c},u.image=function(a,c,d,e,f){var g=b._engine.image(this,a||"about:blank",c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},u.text=function(a,c,d){var e=b._engine.text(this,a||0,c||0,H(d));return this.__set__&&this.__set__.push(e),e},u.set=function(a){!b.is(a,"array")&&(a=Array.prototype.splice.call(arguments,0,arguments.length));var c=new jb(a);return this.__set__&&this.__set__.push(c),c.paper=this,c.type="set",c},u.setStart=function(a){this.__set__=a||this.set()},u.setFinish=function(a){var b=this.__set__;return delete this.__set__,b},u.getSize=function(){var a=this.canvas.parentNode;return{width:a.offsetWidth,height:a.offsetHeight}},u.setSize=function(a,c){return b._engine.setSize.call(this,a,c)},u.setViewBox=function(a,c,d,e,f){return b._engine.setViewBox.call(this,a,c,d,e,f)},u.top=u.bottom=null,u.raphael=b;var $a=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(z.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(z.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}};u.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=z.doc.elementFromPoint(a,b);if(z.win.opera&&"svg"==e.tagName){var f=$a(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},u.getElementsByBBox=function(a){var c=this.set();return this.forEach(function(d){b.isBBoxIntersect(d.getBBox(),a)&&c.push(d)}),c},u.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},u.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},u.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},Xa.isPointInside=function(a,c){var d=this.realPath=oa[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=b.transformPath(d,this.attr("transform"))),b.isPointInsidePath(d,a,c)},Xa.getBBox=function(a){if(this.removed)return{};var b=this._;return a?(!b.dirty&&b.bboxwt||(this.realPath=oa[this.type](this),b.bboxwt=za(this.realPath),b.bboxwt.toString=o,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&(!b.dirty&&this.realPath||(b.bboxwt=0,this.realPath=oa[this.type](this)),b.bbox=za(pa(this.realPath,this.matrix)),b.bbox.toString=o,b.dirty=b.dirtyT=0),b.bbox)},Xa.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},Xa.glow=function(a){if("text"==this.type)return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:null==a.opacity?.5:a.opacity,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||oa[this.type](this);f=this.matrix?pa(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var _a=function(a,c,d,e,f,g,h,k,l){return null==l?i(a,c,d,e,f,g,h,k):b.findDotsAtSegment(a,c,d,e,f,g,h,k,j(a,c,d,e,f,g,h,k,l))},ab=function(a,c){return function(d,e,f){d=Ia(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;o<p;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(c&&!m.start){if(k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!c)return k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:c?m:b.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},bb=ab(1),cb=ab(),db=ab(0,1);b.getTotalLength=bb,b.getPointAtLength=cb,b.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return db(a,b).end;var d=db(a,c,1);return b?db(d,b).end:d},Xa.getTotalLength=function(){var a=this.getPath();if(a)return this.node.getTotalLength?this.node.getTotalLength():bb(a)},Xa.getPointAtLength=function(a){var b=this.getPath();if(b)return cb(b,a)},Xa.getPath=function(){var a,c=b._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return c&&(a=c(this)),a},Xa.getSubpath=function(a,c){var d=this.getPath();if(d)return b.getSubpath(d,a,c)};var eb=b.easing_formulas={linear:function(a){return a},"<":function(a){return Q(a,1.7)},">":function(a){return Q(a,.48)},"<>":function(a){var b=.48-a/1.04,c=M.sqrt(.1734+b*b),d=c-b,e=Q(P(d),1/3)*(d<0?-1:1),f=-c-b,g=Q(P(f),1/3)*(f<0?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:Q(2,-10*a)*M.sin((a-.075)*(2*R)/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return a<1/d?b=c*a*a:a<2/d?(a-=1.5/d,b=c*a*a+.75):a<2.5/d?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};eb.easeIn=eb["ease-in"]=eb["<"],eb.easeOut=eb["ease-out"]=eb[">"],eb.easeInOut=eb["ease-in-out"]=eb["<>"],eb["back-in"]=eb.backIn,eb["back-out"]=eb.backOut;var fb=[],gb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},hb=function(){for(var c=+new Date,d=0;d<fb.length;d++){var e=fb[d];if(!e.el.removed&&!e.paused){var f,g,h=c-e.start,i=e.ms,j=e.easing,k=e.from,l=e.diff,m=e.to,n=(e.t,e.el),o={},p={};if(e.initstatus?(h=(e.initstatus*e.anim.top-e.prev)/(e.percent-e.prev)*i,e.status=e.initstatus,delete e.initstatus,e.stop&&fb.splice(d--,1)):e.status=(e.prev+(e.percent-e.prev)*(h/i))/e.anim.top,!(h<0))if(h<i){var q=j(h/i);for(var s in k)if(k[y](s)){switch(ca[s]){case S:f=+k[s]+q*i*l[s];break;case"colour":f="rgb("+[ib(Z(k[s].r+q*i*l[s].r)),ib(Z(k[s].g+q*i*l[s].g)),ib(Z(k[s].b+q*i*l[s].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[s].length;t<u;t++){f[t]=[k[s][t][0]];for(var v=1,w=k[s][t].length;v<w;v++)f[t][v]=+k[s][t][v]+q*i*l[s][t][v];f[t]=f[t].join(G)}f=f.join(G);break;case"transform":if(l[s].real)for(f=[],t=0,u=k[s].length;t<u;t++)for(f[t]=[k[s][t][0]],v=1,w=k[s][t].length;v<w;v++)f[t][v]=k[s][t][v]+q*i*l[s][t][v];else{var x=function(a){return+k[s][a]+q*i*l[s][a]};f=[["m",x(0),x(1),x(2),x(3),x(4),x(5)]]}break;case"csv":if("clip-rect"==s)for(f=[],t=4;t--;)f[t]=+k[s][t]+q*i*l[s][t];break;default:var z=[][D](k[s]);for(f=[],t=n.paper.customAttributes[s].length;t--;)f[t]=+z[t]+q*i*l[s][t]}o[s]=f}n.attr(o),function(b,c,d){setTimeout(function(){a("raphael.anim.frame."+b,c,d)})}(n.id,n,e.anim)}else{if(function(c,d,e){setTimeout(function(){a("raphael.anim.frame."+d.id,d,e),a("raphael.anim.finish."+d.id,d,e),b.is(c,"function")&&c.call(d)})}(e.callback,n,e.anim),n.attr(m),fb.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[y](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),r(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&r(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}fb.length&&gb(hb)},ib=function(a){return a>255?255:a<0?0:a};Xa.animateWith=function(a,c,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof q?d:b.animation(d,e,f,g);r(i,h,i.percents[0],null,h.attr());for(var j=0,k=fb.length;j<k;j++)if(fb[j].anim==c&&fb[j].el==a){fb[k-1].start=fb[j].start;break}return h},Xa.onAnimation=function(b){return b?a.on("raphael.anim.frame."+this.id,b):a.unbind("raphael.anim.frame."+this.id),this},q.prototype.delay=function(a){var b=new q(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},q.prototype.repeat=function(a){var b=new q(this.anim,this.ms);return b.del=this.del,b.times=M.floor(N(a,0))||1,b},b.animation=function(a,c,d,e){if(a instanceof q)return a;!b.is(d,"function")&&d||(e=e||d||null,d=null),a=Object(a),c=+c||0;var f,g,h={};for(g in a)a[y](g)&&$(g)!=g&&$(g)+"%"!=g&&(f=!0,h[g]=a[g]);if(f)return d&&(h.easing=d),e&&(h.callback=e),new q({100:h},c);if(e){var i=0;for(var j in a){var k=_(j);a[y](j)&&k>i&&(i=k)}i+="%",!a[i].callback&&(a[i].callback=e)}return new q(a,c)},Xa.animate=function(a,c,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof q?a:b.animation(a,c,d,e);return r(g,f,g.percents[0],null,f.attr()),f},Xa.setTime=function(a,b){return a&&null!=b&&this.status(a,O(b,a.ms)/a.ms),this},Xa.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return r(a,this,-1,O(b,1)),this;for(c=fb.length;f<c;f++)if(d=fb[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},Xa.pause=function(b){for(var c=0;c<fb.length;c++)fb[c].el.id!=this.id||b&&fb[c].anim!=b||a("raphael.anim.pause."+this.id,this,fb[c].anim)!==!1&&(fb[c].paused=!0);return this},Xa.resume=function(b){for(var c=0;c<fb.length;c++)if(fb[c].el.id==this.id&&(!b||fb[c].anim==b)){var d=fb[c];a("raphael.anim.resume."+this.id,this,d.anim)!==!1&&(delete d.paused,this.status(d.anim,d.status))}return this},Xa.stop=function(b){for(var c=0;c<fb.length;c++)fb[c].el.id!=this.id||b&&fb[c].anim!=b||a("raphael.anim.stop."+this.id,this,fb[c].anim)!==!1&&fb.splice(c--,1);return this},a.on("raphael.remove",s),a.on("raphael.clear",s),Xa.toString=function(){return"Raphaël’s object"};var jb=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;b<c;b++)!a[b]||a[b].constructor!=Xa.constructor&&a[b].constructor!=jb||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},kb=jb.prototype;kb.push=function(){for(var a,b,c=0,d=arguments.length;c<d;c++)a=arguments[c],!a||a.constructor!=Xa.constructor&&a.constructor!=jb||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},kb.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},kb.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var lb in Xa)Xa[y](lb)&&(kb[lb]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][C](c,b)})}}(lb));return kb.attr=function(a,c){if(a&&b.is(a,U)&&b.is(a[0],"object"))for(var d=0,e=a.length;d<e;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(a,c);return this},kb.clear=function(){for(;this.length;)this.pop()},kb.splice=function(a,b,c){a=a<0?N(this.length+a,0):a,b=N(0,O(this.length-a,b));var d,e=[],f=[],g=[];for(d=2;d<arguments.length;d++)g.push(arguments[d]);for(d=0;d<b;d++)f.push(this[a+d]);for(;d<this.length-a;d++)e.push(this[a+d]);var h=g.length;for(d=0;d<h+e.length;d++)this.items[a+d]=this[a+d]=d<h?g[d]:e[d-h];for(d=this.items.length=this.length-=b-h;this[d];)delete this[d++];return new jb(f)},kb.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a)return this.splice(b,1),!0},kb.animate=function(a,c,d,e){(b.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=b.is(d,T)?d:g;var k=b.animation(a,c,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k),this.items[i]&&!this.items[i].removed||h--;return this},kb.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},kb.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=O[C](0,a),b=O[C](0,b),c=N[C](0,c),d=N[C](0,d),{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},kb.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},kb.toString=function(){return"Raphaël‘s set"},kb.glow=function(a){var b=this.paper.set();return this.forEach(function(c,d){var e=c.glow(a);null!=e&&e.forEach(function(a,c){b.push(a)})}),b},kb.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){if(d.isPointInside(a,b))return c=!0,!1}),c},b.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[y](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=_(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[y](e)){var f=a.glyphs[e];if(b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[y](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},u.getFont=function(a,c,d,e){if(e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400,b.fonts){var f=b.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,F)+"(\\s|$)","i");for(var h in b.fonts)if(b.fonts[y](h)&&g.test(h)){f=b.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;j<k&&(i=f[j],i.face["font-weight"]!=c||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},u.print=function(a,c,d,e,f,g,h,i){g=g||"middle",h=N(O(h||0,1),-1),i=N(O(i||1,3),1);var j,k=H(d)[I](F),l=0,m=0,n=F;if(b.is(e,"string")&&(e=this.getFont(e)),e){j=(f||16)/e.face["units-per-em"];for(var o=e.face.bbox[I](v),p=+o[0],q=o[3]-o[1],r=0,s=+o[1]+("baseline"==g?q+ +e.face.descent:q/2),t=0,u=k.length;t<u;t++){if("\n"==k[t])l=0,x=0,m=0,r+=q*i;else{var w=m&&e.glyphs[k[t-1]]||{},x=e.glyphs[k[t]];l+=m?(w.w||e.w)+(w.k&&w.k[k[t]]||0)+e.w*h:0,m=1}x&&x.d&&(n+=b.transformPath(x.d,["t",l*j,r*j,"s",j,j,p,s,"t",(a-p)/j,(c-s)/j]))}}return this.path(n).attr({fill:"#000",stroke:"none"})},u.add=function(a){if(b.is(a,"array"))for(var c,d=this.set(),e=0,f=a.length;e<f;e++)c=a[e]||{},w[y](c.type)&&d.push(this[c.type]().attr(c));return d},b.format=function(a,c){var d=b.is(c,U)?[0][D](c):arguments;return a&&b.is(a,T)&&d.length-1&&(a=a.replace(x,function(a,b){return null==d[++b]?F:d[b]})),a||F},b.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),b.ninja=function(){return A.was?z.win.Raphael=A.is:delete Raphael,b},b.st=kb,a.on("raphael.DOMload",function(){t=!0}),function(a,c,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):b.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(c,d=function(){a.removeEventListener(c,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b}),function(a,b){"function"==typeof define&&define.amd?define("raphael.svg",["raphael.core"],function(a){return b(a)}):b("object"==typeof exports?require("raphael.core"):a.Raphael)}(this,function(a){if(!a||a.svg){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){"string"==typeof d&&(d=q(d));for(var f in e)e[b](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){if(e=c(e).replace(a._radial_gradient,function(a,b,c){if(j="radial",b&&c){m=d(b),n=d(c);var e=2*(n>.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,"radial"==j?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff","stop-opacity":isFinite(w[x].opacity)?w[x].opacity:1}))}}return q(o,{fill:"url('"+document.location.origin+document.location.pathname+"#"+k+"')",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1,1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,m=c(e).toLowerCase().split("-"),n=d.paper,r=f?"end":"start",s=d.node,t=d.attrs,u=t["stroke-width"],v=m.length,w="classic",x=3,y=3,z=5;v--;)switch(m[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=m[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={fill:"none",stroke:t.stroke}):(j=i=x/2,k={fill:t.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+r+w+x+y+"-obj"+d.id;a._g.doc.getElementById(A)?p[A]++:(n.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[w],id:A})),p[A]=1);var C,D=a._g.doc.getElementById(B);D?(p[B]++,C=D.getElementsByTagName("use")[0]):(D=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:j,refY:y/2}),C=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),n.defs.appendChild(D),p[B]=1),q(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-E*u):(g=E*u,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+r]="url(#"+B+")",(h||g)&&(k.d=a.getSubpath(t.path,g,h)),q(s,k),d._.arrows[r+"Path"]=A,d._.arrows[r+"Marker"]=B,d._.arrows[r+"dx"]=E,d._.arrows[r+"Type"]=w,d._.arrows[r+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-g):(g=0,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),d._.arrows[r+"Path"]&&q(s,{d:a.getSubpath(t.path,g,h)}),delete d._.arrows[r+"Path"],delete d._.arrows[r+"Marker"],delete d._.arrows[r+"dx"],delete d._.arrows[r+"Type"],delete d._.arrows[r+"String"];for(k in p)if(p[b](k)&&!p[k]){var F=a._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},u={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){if(b=u[c(b).toLowerCase()]){for(var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;h--;)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}else q(a.node,{"stroke-dasharray":"none"})},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];switch(k[o]=p,o){case"blur":d.blur(p);break;case"title":var u=i.getElementsByTagName("title");if(u.length&&(u=u[0]))u.firstChild.nodeValue=p;else{u=q("title");var w=a._g.doc.createTextNode(p);u.appendChild(w),i.appendChild(u)}break;case"href":case"target":var x=i.parentNode;if("a"!=x.tagName.toLowerCase()){var z=q("a");x.insertBefore(z,i),z.appendChild(i),x=z}"target"==o?x.setAttributeNS(n,"show","blank"==p?"new":p):x.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var A=c(p).split(j);if(4==A.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var B=q("clipPath"),C=q("rect");B.id=a.createUUID(),q(C,{x:A[0],y:A[1],width:A[2],height:A[3]}),B.appendChild(C),d.paper.defs.appendChild(B),q(i,{"clip-path":"url(#"+B.id+")"}),d.clip=C}if(!p){var D=i.getAttribute("clip-path");if(D){var E=a._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g,l));E&&E.parentNode.removeChild(E),q(i,{"clip-path":l}),delete d.clip}}break;case"path":"path"==d.type&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1))); +break;case"width":if(i.setAttribute(o,p),d._.dirty=1,!k.fx)break;o="x",p=k.x;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if("rx"==o&&"rect"==d.type)break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":if(i.setAttribute(o,p),d._.dirty=1,!k.fy)break;o="y",p=k.y;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if("ry"==o&&"rect"==d.type)break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":"rect"==d.type?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(n,"href",p);break;case"stroke-width":1==d._.sx&&1==d._.sy||(p/=g(h(d._.sx),h(d._.sy))||1),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var F=c(p).match(a._ISURL);if(F){B=q("pattern");var G=q("image");B.id=a.createUUID(),q(B,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(G,{x:0,y:0,"xlink:href":F[1]}),B.appendChild(G),function(b){a._preload(F[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(G,{width:a,height:c})})}(B),d.paper.defs.appendChild(B),q(i,{fill:"url(#"+B.id+")"}),d.pattern=B,d.pattern&&s(d);break}var H=a.getRGB(p);if(H.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(I){var J=I.getElementsByTagName("stop");q(J[J.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}}else delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});H[b]("opacity")&&q(i,{"fill-opacity":H.opacity>1?H.opacity/100:H.opacity});case"stroke":H=a.getRGB(p),i.setAttribute(o,H.hex),"stroke"==o&&H[b]("opacity")&&q(i,{"stroke-opacity":H.opacity>1?H.opacity/100:H.opacity}),"stroke"==o&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),I&&(J=I.getElementsByTagName("stop"),q(J[J.length-1],{"stop-opacity":p}));break}default:"font-size"==o&&(p=e(p,10)+"px");var K=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[K]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if("text"==d.type&&(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var j,k=c(f.text).split("\n"),m=[],n=0,o=k.length;n<o;n++)j=q("tspan"),n&&q(j,{dy:i*x,x:g.x}),j.appendChild(a._g.doc.createTextNode(k[n])),h.appendChild(j),m[n]=j}else for(m=h.getElementsByTagName("tspan"),n=0,o=m.length;n<o;n++)n?q(m[n],{dy:i*x,x:g.x}):q(m[0],{dy:0});q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(m[0],{dy:r})}},z=function(a){return a.parentNode&&"a"===a.parentNode.tagName.toLowerCase()?a.parentNode:a},A=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},B=a.el;A.prototype=B,B.constructor=A,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new A(c,b);return d.type="path",w(d,{fill:"none",stroke:"#000",path:a}),d},B.rotate=function(a,b,e){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this.transform(this._.transform.concat([["r",a,b,e]])),this},B.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this},B.translate=function(a,b){return this.removed?this:(a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this)},B.transform=function(c){var d=this._;if(null==c)return d.transform;if(a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix}),1!=d.sx||1!=d.sy){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},B.hide=function(){return this.removed||(this.node.style.display="none"),this},B.show=function(){return this.removed||(this.node.style.display=""),this},B.remove=function(){var b=z(this.node);if(!this.removed&&b.parentNode){var c=this.paper;c.__set__&&c.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&c.defs.removeChild(this.gradient),a._tear(this,c),b.parentNode.removeChild(b),this.removeData();for(var d in this)this[d]="function"==typeof this[d]?a._removedFactory(d):null;this.removed=!0}},B._getBBox=function(){if("none"==this.node.style.display){this.show();var a=!0}var b,c=!1;this.paper.canvas.parentElement?b=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(b=this.paper.canvas.parentNode.style),b&&"none"==b.display&&(c=!0,b.display="");var d={};try{d=this.node.getBBox()}catch(e){d={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{d=d||{},c&&(b.display="none")}return a&&this.hide(),d},B.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if("fill"==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==c)return this._.transform;for(var g=c.split(j),h={},i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(null==d&&a.is(c,"array")){for(h={},i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(null!=d){var m={};m[c]=d}else null!=c&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}return w(this,m),this},B.toFront=function(){if(this.removed)return this;var b=z(this.node);b.parentNode.appendChild(b);var c=this.paper;return c.top!=this&&a._tofront(this,c),this},B.toBack=function(){if(this.removed)return this;var b=z(this.node),c=b.parentNode;c.insertBefore(b,c.firstChild),a._toback(this,this.paper);this.paper;return this},B.insertAfter=function(b){if(this.removed||!b)return this;var c=z(this.node),d=z(b.node||b[b.length-1].node);return d.nextSibling?d.parentNode.insertBefore(c,d.nextSibling):d.parentNode.appendChild(c),a._insertafter(this,b,this.paper),this},B.insertBefore=function(b){if(this.removed||!b)return this;var c=z(this.node),d=z(b.node||b[0].node);return d.parentNode.insertBefore(c,d),a._insertbefore(this,b,this.paper),this},B.blur=function(b){var c=this;if(0!==+b){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter");return c},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new A(e,a);return f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs),f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new A(g,a);return h.attrs={x:b,y:c,width:d,height:e,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs),h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new A(f,a);return g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs),g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new A(g,a);return h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image",h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new A(f,b);return g.attrs={x:c,y:d,"text-anchor":"middle",text:e,"font-family":a._availableAttrs["font-family"],"font-size":a._availableAttrs["font-size"],stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs),g},a._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h,i=q("svg"),j="overflow:hidden;";return d=d||0,e=e||0,f=f||512,g=g||342,q(i,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==c?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i)),c=new a._Paper,c.width=f,c.height=g,c.canvas=i,c.clear(),c._left=c._top=0,h&&(c.renderfix=function(){}),c.renderfix(),c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=this.getSize(),j=g(c/i.width,d/i.height),l=this.top,n=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(j=1),delete this._vbSize,f="0 0 "+this.width+m+this.height):(this._vbSize=j,f=a+m+b+m+c+m+d),q(this.canvas,{viewBox:f,preserveAspectRatio:n});j&&l;)h="stroke-width"in l.attrs?l.attrs["stroke-width"]:1,l.attr({"stroke-width":h}),l._.dirty=1,l._.dirtyT=1,l=l.prev;return this._viewBox=[a,b,c,d,!!e],this},a.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},a.prototype.clear=function(){a.eve("raphael.clear",this);for(var b=this.canvas;b.firstChild;)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null};var C=a.st;for(var D in B)B[b](D)&&!C[b](D)&&(C[D]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(D))}}),function(a,b){"function"==typeof define&&define.amd?define("raphael.vml",["raphael.core"],function(a){return b(a)}):b("object"==typeof exports?require("raphael"):a.Raphael)}(this,function(a){if(!a||a.vml){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/gi,e=a._pathToAbsolute;if(c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g,e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=p[b];return c.replace(s,function(a){e&&2==d.length&&(g+=d+p["m"==b?"l":"L"],d=[]),d.push(f(a*u))}),g+d});return g}var h,i,j=e(b);g=[];for(var k=0,l=j.length;k<l;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,r=h.length;m<r;m++)i+=f(h[m]*u)+(m!=r-1?",":o);g.push(i)}return g.join(n)},y=function(b,c,d){var e=a.matrix();return e.rotate(-b,.5,.5),{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q=u/b,r=u/c;if(m.visibility="hidden",b&&c){if(l.coordsize=i(q)+n+i(r),m.rotation=f*(b*c<0?-1:1),f){var s=y(f,d,e);d=s.dx,e=s.dy}if(b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-q+n+e*-r,k||g.fillsize){var t=l.getElementsByTagName(j);t=t&&t[0],l.removeChild(t),k&&(s=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),t.position=s.dx*o+n+s.dy*o),g.fillsize&&(t.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(t)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){for(var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s=e;for(var t in i)i[b](t)&&(m[t]=i[t]);if(q&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e._.dirty=1,"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),r){var y=+m.cx,B=+m.cy,D=+m.rx||+m.r||0,E=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-D)*u),f((B-E)*u),f((y+D)*u),f((B+E)*u),f(y*u)),e._.dirty=1}if("clip-rect"in i){var G=c(i["clip-rect"]).split(k);if(4==G.length){G[2]=+G[2]+ +G[0],G[3]=+G[3]+ +G[1];var H=l.clipRect||a._g.doc.createElement("div"),I=H.style;I.clip=a.format("rect({1}px {2}px {3}px {0}px)",G),l.clipRect||(I.position="absolute",I.top=0,I.left=0,I.width=e.paper.width+"px",I.height=e.paper.height+"px",l.parentNode.insertBefore(H,l),H.appendChild(l),l.clipRect=H)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var J=e.textpath.style;i.font&&(J.font=i.font),i["font-family"]&&(J.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(J.fontSize=i["font-size"]),i["font-weight"]&&(J.fontWeight=i["font-weight"]),i["font-style"]&&(J.fontStyle=i["font-style"])}if("arrow-start"in i&&A(s,i["arrow-start"]),"arrow-end"in i&&A(s,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var K=l.getElementsByTagName(j),L=!1;if(K=K&&K[0],!K&&(L=K=F(j)),"image"==e.type&&i.src&&(K.src=i.src),i.fill&&(K.on=!0),null!=K.on&&"none"!=i.fill&&null!==i.fill||(K.on=!1),K.on&&i.fill){var M=c(i.fill).match(a._ISURL);if(M){K.parentNode==l&&l.removeChild(K),K.rotate=!0,K.src=M[1],K.type="tile";var N=e.getBBox(1);K.position=N.x+n+N.y,e._.fillpos=[N.x,N.y],a._preload(M[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else K.color=a.getRGB(i.fill).hex,K.src=o,K.type="solid",a.getRGB(i.fill).error&&(s.type in{circle:1,ellipse:1}||"r"!=c(i.fill).charAt())&&C(s,i.fill,K)&&(m.fill="none",m.gradient=i.fill,K.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var O=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);O=h(g(O,0),1),K.opacity=O,K.src&&(K.color="none")}l.appendChild(K);var P=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],Q=!1;!P&&(Q=P=F("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(P.on=!0),("none"==i.stroke||null===i.stroke||null==P.on||0==i.stroke||0==i["stroke-width"])&&(P.on=!1);var R=a.getRGB(i.stroke);P.on&&i.stroke&&(P.color=R.hex),O=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+R.o+1||2)-1);var S=.75*(d(i["stroke-width"])||1);if(O=h(g(O,0),1),null==i["stroke-width"]&&(S=m["stroke-width"]),i["stroke-width"]&&(P.weight=S),S&&S<1&&(O*=S)&&(P.weight=1),P.opacity=O,i["stroke-linejoin"]&&(P.joinstyle=i["stroke-linejoin"]||"miter"),P.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(P.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),"stroke-dasharray"in i){var T={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};P.dashstyle=T[b](i["stroke-dasharray"])?T[i["stroke-dasharray"]]:o}Q&&l.appendChild(P)}if("text"==s.type){s.paper.canvas.style.display=o;var U=s.paper.span,V=100,W=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=U.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),W=d(m["font-size"]||W&&W[0])||10,p.fontSize=W*V+"px",s.textpath.string&&(U.innerHTML=c(s.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();s.W=m.w=(X.right-X.left)/V,s.H=m.h=(X.bottom-X.top)/V,s.X=m.x,s.Y=m.y+s.H/2,("x"in i||"y"in i)&&(s.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));for(var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,$=Y.length;Z<$;Z++)if(Y[Z]in i){s._.dirty=1;break}switch(m["text-anchor"]){case"start":s.textpath.style["v-text-align"]="left",s.bbx=s.W/2;break;case"end":s.textpath.style["v-text-align"]="right",s.bbx=-s.W/2;break;default:s.textpath.style["v-text-align"]="center",s.bbx=0}s.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=(b.attrs,Math.pow),i="linear",j=".5 .5";if(b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){return i="radial",b&&c&&(b=d(b),c=d(c),h(b-.5,2)+h(c-.5,2)>.25&&(c=e.sqrt(.25-h(b-.5,2))*(2*(c>.5)-1)+.5),j=b+n+c),o}),f=f.split(/\s*\-\s*/),"linear"==i){var k=f.shift();if(k=-d(k),isNaN(k))return null}var l=a._parseDots(f);if(!l)return null;if(b=b.shape||b.node,l.length){b.removeChild(g),g.on=!0,g.method="none",g.color=l[0].color,g.color2=l[l.length-1].color;for(var m=[],p=0,q=l.length;p<q;p++)l[p].offset&&m.push(l[p].offset+n+l[p].color);g.colors=m.length?m.join():"0% "+g.color,"radial"==i?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=j,g.angle=0):(g.type="gradient",g.angle=(270-k)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(null==b)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:o;e&&(d=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,f+b);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;j.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else j.style.filter=o,z(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=o,i.matrix=c(h),i.offset=h.offset();return null!==d&&(this._.transform=d,a._extractTransform(this,d)),this},E.rotate=function(a,b,e){if(this.removed)return this;if(null!=a){if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]])),this}},E.translate=function(a,b){return this.removed?this:(a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this)},E.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=o),this},E.auxGetBBox=a.el.getBBox,E.getBBox=function(){var a=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var b={},c=1/this.paper._viewBoxShift.scale;return b.x=a.x-this.paper._viewBoxShift.dx,b.x*=c,b.y=a.y-this.paper._viewBoxShift.dy,b.y*=c,b.width=a.width*c,b.height=a.height*c,b.x2=b.x+b.width,b.y2=b.y+b.height,b}return a},E._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if(c==j&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var g=c.split(k),h={},i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&null==d&&a.is(c,"array")){for(h={},i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;null!=d&&(n={},n[c]=d),null==d&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&"text"==this.type&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper)),this)},E.insertAfter=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this)},E.insertBefore=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper),this)},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;return d=d.replace(r,o),0!==+b?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur),this},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");return f.on=!0,c.appendChild(f),d.skew=f,d.transform(o),d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;return i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e}),f},a._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",B(e,{cx:b,cy:c,r:d}),e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];return k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0),i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");return m.on=!0,h.appendChild(m),k.skew=m,k.transform(o),k},a._engine.setSize=function(b,c){var d=this.canvas.style;return this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox),this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var g,h,i=this.getSize(),j=i.width,k=i.height;return f&&(g=k/e,h=j/d,d*g<j&&(b-=(j-d*g)/2/g),e*h<k&&(c-=(k-e*h)/2/h)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:i},this.forEach(function(a){a.transform("...")}),this};var F;a._engine.initWin=function(a){var b=a.document;b.styleSheets.length<31?b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):b.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e=b.width,f=b.x,g=b.y;if(!c)throw new Error("VML container not found.");var h=new a._Paper,i=h.canvas=a._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*u+n+1e3*u,h.coordorigin="0 0",h.span=a._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=a.format("top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);",e,d),1==c?(a._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i),h.renderfix=function(){},h},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}}),function(a,b){if("function"==typeof define&&define.amd)define("raphael",["raphael.core","raphael.svg","raphael.vml"],function(a){return b(a)});else if("object"==typeof exports){var c=require("raphael.core");require("raphael.svg"),require("raphael.vml"),module.exports=b(c)}}(this,function(a){return a.ninja()}),BI.Svg=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Svg.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-svg"})},_init:function(){BI.Svg.superclass._init.apply(this,arguments),this.paper=Raphael(this.element[0]),this.element.css("overflow","hidden"),$(this.paper.canvas).width("100%").height("100%").css({left:"0",top:"0"}).appendTo(this.element),this.top=this.paper.top,this.bottom=this.paper.bottom,this.customAttributes=this.paper.customAttributes,this.ca=this.paper.ca,this.raphael=this.paper.raphael},add:function(){return this.paper.add.apply(this.paper,arguments)},path:function(){return this.paper.path.apply(this.paper,arguments)},image:function(){return this.paper.image.apply(this.paper,arguments)},rect:function(){return this.paper.rect.apply(this.paper,arguments)},circle:function(){return this.paper.circle.apply(this.paper,arguments)},ellipse:function(){return this.paper.ellipse.apply(this.paper,arguments)},text:function(){return this.paper.text.apply(this.paper,arguments)},print:function(){return this.paper.print.apply(this.paper,arguments)},setStart:function(){return this.paper.setStart.apply(this.paper,arguments)},setFinish:function(){return this.paper.setFinish.apply(this.paper,arguments)},setSize:function(){return this.paper.setSize.apply(this.paper,arguments)},setViewBox:function(){return this.paper.setViewBox.apply(this.paper,arguments)},getById:function(){return this.paper.getById.apply(this.paper,arguments)},getElementByPoint:function(){return this.paper.getElementByPoint.apply(this.paper,arguments)},getElementsByPoint:function(){return this.paper.getElementsByPoint.apply(this.paper,arguments)},getFont:function(){return this.paper.getFont.apply(this.paper,arguments)},set:function(){return this.paper.set.apply(this.paper,arguments)},remove:function(){return this.paper.remove.apply(this.paper,arguments); +},clear:function(){return this.paper.clear.apply(this.paper,arguments)}}),BI.shortcut("bi.svg",BI.Svg),BI.NativeTableScrollbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NativeTableScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,defaultPosition:0,position:0,size:0})},render:function(){var a=this;this.options;this.element.width(36);var b=BI.throttle(function(){a.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL,a.element.scrollTop())},150,{leading:!1});return this.element.scroll(function(){b()}),{type:"bi.default",scrolly:!0,items:[{type:"bi.layout",width:1,ref:function(b){a.inner=b}}]}},mounted:function(){this._populate()},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);try{this.element.scrollTop(a.position)}catch(b){}this.inner.element.height(a.contentSize)},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.setHeight(a),this.options.size=a},populate:function(){this._populate()}}),BI.NativeTableScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.native_table_scrollbar",BI.NativeTableScrollbar),BI.NativeTableHorizontalScrollbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NativeTableHorizontalScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,position:0,size:0})},render:function(){var a=this;this.options;this.element.height(36);var b=BI.throttle(function(){a.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL,a.element.scrollLeft())},150,{leading:!1});return this.element.scroll(function(){b()}),{type:"bi.default",scrollx:!0,items:[{type:"bi.layout",height:1,ref:function(b){a.inner=b}}]}},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.setWidth(a),this.options.size=a},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);try{this.element.scrollLeft(a.position)}catch(b){}this.inner.element.width(a.contentSize)},populate:function(){this._populate()}}),BI.NativeTableHorizontalScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.native_table_horizontal_scrollbar",BI.NativeTableHorizontalScrollbar),BI.TableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-cell",textAlign:"left",text:""})},_init:function(){BI.TableCell.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.label",element:this,whiteSpace:"nowrap",textAlign:this.options.textAlign,height:this.options.height,text:this.options.text,value:this.options.value,lgap:5})}}),BI.shortcut("bi.table_cell",BI.TableCell),BI.CollectionTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection-table-cell bi-border-right bi-border-bottom",width:0,height:0,_left:0,_top:0,cell:{}})},_init:function(){BI.CollectionTableCell.superclass._init.apply(this,arguments);var a=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},a.cell,{cls:(a.cell.cls||"")+" collection-table-cell-wrapper",width:a.width-(0===a._left?1:0)-1,height:a.height-(0===a._top?1:0)-1})),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.CollectionTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width-(0===b._left?1:0)-1)},setHeight:function(a){BI.CollectionTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height-(0===b._top?1:0)-1)}}),BI.shortcut("bi.collection_table_cell",BI.CollectionTableCell),BI.CollectionTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection-table",headerRowSize:25,rowSize:25,columnSize:[],isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,header:[],items:[],regionColumnSize:[]})},render:function(){var a=this,b=this.options;this._width=0,this._height=0,this._scrollBarSize=BI.DOM.getScrollWidth(),this.topLeftCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.topLeftItems[b]}}),this.topLeftCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topRightCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.topRightItems[b]}}),this.topRightCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomRightCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomLeftCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.bottomLeftItems[b]}}),this.bottomLeftCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomRightCollection.setScrollTop(b.scrollTop),a.topLeftCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomRightCollection=BI.createWidget({type:"bi.collection_view",cellSizeAndPositionGetter:function(b){return a.bottomRightItems[b]}}),this.bottomRightCollection.on(BI.CollectionView.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollTop(b.scrollTop),a.topRightCollection.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topLeftCollection]}),this.topRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topRightCollection]}),this.bottomLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomLeftCollection]}),this.bottomRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomRightCollection]}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topLeft,top:0,left:0},{el:this.topRight,top:0},{el:this.bottomLeft,left:0},{el:this.bottomRight}]}),this.topScrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",width:BI.GridTableScrollbar.SIZE}),this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.bottomLeftCollection.setScrollTop(b),a.bottomRightCollection.setScrollTop(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.leftScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.leftScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.topLeftCollection.setScrollLeft(b),a.bottomLeftCollection.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.rightScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.rightScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.topRightCollection.setScrollLeft(b),a.bottomRightCollection.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.scrollBarLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topScrollbar,right:0,top:0},{el:this.leftScrollbar,left:0},{el:this.rightScrollbar}]}),this._width=b.width-BI.GridTableScrollbar.SIZE,this._height=b.height-BI.GridTableScrollbar.SIZE},mounted:function(){var a=this.options;(a.items.length>0||a.header.length>0)&&(this._digest(),this._populate())},_getFreezeColLength:function(){return this.options.isNeedFreeze?this.options.freezeCols.length:0},_getFreezeHeaderHeight:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?0:a.header.length*a.headerRowSize},_getActualItems:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?a.header.concat(a.items):a.items},_populateScrollbar:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g}),this.topScrollbar.setContentSize(this._getActualItems().length*a.rowSize),this.topScrollbar.setSize(this._height-this._getFreezeHeaderHeight()),this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop()),this.topScrollbar.populate(),this.leftScrollbar.setContentSize(c),this.leftScrollbar.setSize(b),this.leftScrollbar.setPosition(this.bottomLeftCollection.getScrollLeft()),this.leftScrollbar.populate(),this.rightScrollbar.setContentSize(d),this.rightScrollbar.setSize(this._width-b),this.rightScrollbar.setPosition(this.bottomRightCollection.getScrollLeft()),this.rightScrollbar.populate();var g=this.scrollBarLayout.attr("items");g[0].top=this._getFreezeHeaderHeight(),g[1].top=this._height,g[2].top=this._height,g[2].left=b,this.scrollBarLayout.attr("items",g),this.scrollBarLayout.resize()},_populateTable:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g});var g=b,h=this._getFreezeHeaderHeight(),i=this._width-b,j=this._getFreezeHeaderHeight(),k=b,l=this._height-h,m=this._width-b,n=this._height-j,o=g+this._scrollBarSize,p=h+this._scrollBarSize,q=i+this._scrollBarSize,r=j+this._scrollBarSize,s=k+this._scrollBarSize,t=l+this._scrollBarSize,u=m+this._scrollBarSize,v=n+this._scrollBarSize,w=function(a){a.element.css({overflow:"scroll",overflowX:"scroll",overflowY:"scroll"})};this.topLeft.setWidth(g),this.topLeft.setHeight(h),this.topRight.setWidth(i),this.topRight.setHeight(j),this.bottomLeft.setWidth(k),this.bottomLeft.setHeight(l),this.bottomRight.setWidth(m),this.bottomRight.setHeight(n),this.topLeftCollection.setWidth(o),this.topLeftCollection.setHeight(p),this.topRightCollection.setWidth(q),this.topRightCollection.setHeight(r),this.bottomLeftCollection.setWidth(s),this.bottomLeftCollection.setHeight(t),this.bottomRightCollection.setWidth(u),this.bottomRightCollection.setHeight(v),w(this.topLeftCollection),w(this.topRightCollection),w(this.bottomLeftCollection),w(this.bottomRightCollection);var x=this.contextLayout.attr("items");x[1].left=b,x[2].top=this._getFreezeHeaderHeight(),x[3].left=b,x[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",x),this.contextLayout.resize();var y=[],z=[],A=[],B=[],C=function(a,b,c){BI.each(a,function(a,d){var e={type:"bi.collection_table_cell",cell:b[d.row][d.col]};c.push(e)})};C(this.topLeftItems,a.header,y),C(this.topRightItems,a.header,z),C(this.bottomLeftItems,this._getActualItems(),A),C(this.bottomRightItems,this._getActualItems(),B),this.topLeftCollection._populate(y),this.topRightCollection._populate(z),this.bottomLeftCollection._populate(A),this.bottomRightCollection._populate(B)},_digest:function(){var a=this.options,b=this._getFreezeColLength();this._getFreezeHeaderHeight()<=0?(this.topLeftItems=[],this.topRightItems=[],this.bottomLeftItems=this._serialize(this._getActualItems(),0,b,a.rowSize,a.columnSize,a.mergeCols,BI.range(a.header.length)),this.bottomRightItems=this._serialize(this._getActualItems(),b,a.columnSize.length,a.rowSize,a.columnSize,a.mergeCols,BI.range(a.header.length))):(this.topLeftItems=this._serialize(a.header,0,b,a.headerRowSize,a.columnSize,a.mergeCols),this.topRightItems=this._serialize(a.header,b,a.columnSize.length,a.headerRowSize,a.columnSize,!0),this.bottomLeftItems=this._serialize(a.items,0,b,a.rowSize,a.columnSize,a.mergeCols),this.bottomRightItems=this._serialize(a.items,b,a.columnSize.length,a.rowSize,a.columnSize,a.mergeCols))},_serialize:function(a,b,c,d,e,f,g){f=f||[],g=g||[];for(var h=this.options,i=[],j={},k={},l={},m={},n=[],o=b;o<c;o++)o===b?n[o]=e[o]:n[o]=n[o-1]+e[o];var p=function(a,b){k[b]._height+=d,k[b].__mergeRows.push(a)},q=function(a,b){l[a]._width+=e[b],l[a].__mergeCols.push(b)},r=function(a,b){var c=e[b],f=d;m[a][b]._row=a,m[a][b]._col=b,m[a][b]._width=c,m[a][b]._height=f,k[b]=m[a][b],k[b].__mergeRows=[a],l[a]=m[a][b],l[a].__mergeCols=[b],i.push({x:n[b]-e[b],y:+a*d,item:m[a][b]})};return BI.each(a,function(a,d){for(var e=b;e<c;e++)if(j[a]||(j[a]={}),m[a]||(m[a]={}),j[a][e]=d[e],m[a][e]={},f===!0||f.indexOf(e)>-1||g===!0||g.indexOf(a)>-1)if(0===a&&e===b)r(0,b);else if(e===b&&a>0){var i=h.mergeRule(j[a][e],j[a-1][e]);i===!0?(p(a,e),l[a]=k[e]):r(a,e)}else if(0===a&&e>b){var n=h.mergeRule(j[a][e],j[a][e-1]);n===!0?(q(a,e),k[e]=l[a]):r(a,e)}else{var i=h.mergeRule(j[a][e],j[a-1][e]),n=h.mergeRule(j[a][e],j[a][e-1]);if(n&&i)continue;n&&q(a,e),i&&p(a,e),n||i||r(a,e)}else r(a,e)}),BI.map(i,function(a,b){return{x:b.x,y:b.y,row:b.item._row,col:b.item._col,width:b.item._width,height:b.item._height}})},_populate:function(){this._width<=0||this._height<=0||(this._isNeedDigest===!0&&this._digest(),this._isNeedDigest=!1,this._populateTable(),this._populateScrollbar())},getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},setVerticalScroll:function(a){this.bottomLeftCollection.setScrollTop(a),this.bottomRightCollection.setScrollTop(a)},setLeftHorizontalScroll:function(a){this.topLeftCollection.setScrollLeft(a),this.bottomLeftCollection.setScrollLeft(a)},setRightHorizontalScroll:function(a){this.topRightCollection.setScrollLeft(a),this.bottomRightCollection.setScrollLeft(a)},getVerticalScroll:function(){return this.bottomRightCollection.getScrollTop()},getLeftHorizontalScroll:function(){return this.bottomLeftCollection.getScrollLeft()},getRightHorizontalScroll:function(){return this.bottomRightCollection.getScrollLeft()},setWidth:function(a){BI.CollectionTable.superclass.setWidth.apply(this,arguments),this._width=this.options.width-BI.GridTableScrollbar.SIZE},setHeight:function(a){BI.CollectionTable.superclass.setHeight.apply(this,arguments),this._height=this.options.height-BI.GridTableScrollbar.SIZE},setColumnSize:function(a){this._isNeedDigest=!0,this.options.columnSize=a},setRegionColumnSize:function(a){this._isNeedDigest=!0,this.options.regionColumnSize=a},getColumnSize:function(){return this.options.columnSize},getRegionColumnSize:function(){return this.options.regionColumnSize},populate:function(a,b){a&&a!==this.options.items&&(this._isNeedDigest=!0,this.options.items=a,this._restore()),b&&b!==this.options.header&&(this._isNeedDigest=!0,this.options.header=b,this._restore()),this._populate()},_restore:function(){this.topLeftCollection.restore(),this.topRightCollection.restore(),this.bottomLeftCollection.restore(),this.bottomRightCollection.restore()},restore:function(){this._restore()}}),BI.shortcut("bi.collection_table",BI.CollectionTable),BI.QuickCollectionTable=BI.inherit(BI.CollectionTable,{_defaultConfig:function(){return BI.extend(BI.QuickCollectionTable.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quick-collection-table"})},render:function(){BI.QuickCollectionTable.superclass.render.apply(this,arguments);this.options;this.topLeftCollection.setOverflowX(!1),this.topLeftCollection.setOverflowY(!1),this.topRightCollection.setOverflowX(!1),this.topRightCollection.setOverflowY(!1),this.bottomLeftCollection.setOverflowX(!1),this.bottomLeftCollection.setOverflowY(!1),this.bottomRightCollection.setOverflowX(!1),this.bottomRightCollection.setOverflowY(!1)},mounted:function(){BI.QuickCollectionTable.superclass.mounted.apply(this,arguments);var a=this;this._topLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._topRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this._bottomLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._bottomRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this.topLeftCollection.element.mousewheel(function(b){a._topLeftWheelHandler.onWheel(b.originalEvent)}),this.topRightCollection.element.mousewheel(function(b){a._topRightWheelHandler.onWheel(b.originalEvent)}),this.bottomLeftCollection.element.mousewheel(function(b){a._bottomLeftWheelHandler.onWheel(b.originalEvent)}),this.bottomRightCollection.element.mousewheel(function(b){a._bottomRightWheelHandler.onWheel(b.originalEvent)})},_shouldHandleLeftX:function(a){return a>0?this.bottomLeftCollection.getScrollLeft()<this.bottomLeftCollection.getMaxScrollLeft():this.bottomLeftCollection.getScrollLeft()>0},_shouldHandleRightX:function(a){return a>0?this.bottomRightCollection.getScrollLeft()<this.bottomRightCollection.getMaxScrollLeft():this.bottomRightCollection.getScrollLeft()>0},_shouldHandleY:function(a){return a>0?this.bottomRightCollection.getScrollTop()<this.bottomRightCollection.getMaxScrollTop():this.bottomRightCollection.getScrollTop()>0},_onWheelLeft:function(a,b){var c=this,d=this.bottomLeftCollection.getScrollTop(),e=this.bottomLeftCollection.getScrollLeft();d+=b,e+=a,this.bottomLeftCollection.setScrollTop(d),this.bottomRightCollection.setScrollTop(d),this.topLeftCollection.setScrollLeft(e),this.bottomLeftCollection.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_onWheelRight:function(a,b){var c=this,d=this.bottomRightCollection.getScrollTop(),e=this.bottomRightCollection.getScrollLeft();d+=b,e+=a,this.bottomLeftCollection.setScrollTop(d),this.bottomRightCollection.setScrollTop(d),this.topRightCollection.setScrollLeft(e),this.bottomRightCollection.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_populateTable:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g});var g=b,h=this._getFreezeHeaderHeight(),i=this._width-b,j=this._getFreezeHeaderHeight(),k=b,l=this._height-h,m=this._width-b,n=this._height-j;this.topLeft.setWidth(g),this.topLeft.setHeight(h),this.topRight.setWidth(i),this.topRight.setHeight(j),this.bottomLeft.setWidth(k),this.bottomLeft.setHeight(l),this.bottomRight.setWidth(m),this.bottomRight.setHeight(n),this.topLeftCollection.setWidth(g),this.topLeftCollection.setHeight(h),this.topRightCollection.setWidth(i),this.topRightCollection.setHeight(j),this.bottomLeftCollection.setWidth(k),this.bottomLeftCollection.setHeight(l),this.bottomRightCollection.setWidth(m),this.bottomRightCollection.setHeight(n);var o=this.contextLayout.attr("items");o[1].left=b,o[2].top=this._getFreezeHeaderHeight(),o[3].left=b,o[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",o),this.contextLayout.resize();var p=[],q=[],r=[],s=[],t=function(a,b,c){BI.each(a,function(a,d){var e={type:"bi.collection_table_cell",cell:b[d.row][d.col]};c.push(e)})};t(this.topLeftItems,a.header,p),t(this.topRightItems,a.header,q),t(this.bottomLeftItems,this._getActualItems(),r),t(this.bottomRightItems,this._getActualItems(),s),this.topLeftCollection.populate(p),this.topRightCollection.populate(q),this.bottomLeftCollection.populate(r),this.bottomRightCollection.populate(s)}}),BI.shortcut("bi.quick_collection_table",BI.QuickCollectionTable),BI.GridTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-table-cell bi-border-right bi-border-bottom",width:0,height:0,_rowIndex:0,_columnIndex:0,_left:0,_top:0,cell:{}})},_init:function(){BI.GridTableCell.superclass._init.apply(this,arguments);var a=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},a.cell,{cls:(a.cell.cls||"")+"grid-table-cell-wrapper",width:a.width-(0===a._columnIndex?1:0)-1,height:a.height-(0===a._rowIndex?1:0)-1})),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.GridTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width-(0===b._columnIndex?1:0)-1)},setHeight:function(a){BI.GridTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height-(0===b._rowIndex?1:0)-1)}}),BI.shortcut("bi.grid_table_cell",BI.GridTableCell),BI.GridTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-table",headerRowSize:25,rowSize:25,columnSize:[],isNeedFreeze:!1,freezeCols:[],header:[],items:[],regionColumnSize:[]})},render:function(){var a=this,b=this.options;this._width=0,this._height=0,this._scrollBarSize=BI.DOM.getScrollWidth();var c=function(){return b.rowSize},d=function(a){return b.columnSize[a]},e=function(c){return b.columnSize[c+a._getFreezeColLength()]};this.topLeftGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:d}),this.topLeftGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topRightGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:e}),this.topRightGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomRightGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomLeftGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:d}),this.bottomLeftGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomRightGrid.setScrollTop(b.scrollTop),a.topLeftGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.bottomRightGrid=BI.createWidget({type:"bi.grid_view",rowHeightGetter:c,columnWidthGetter:e}),this.bottomRightGrid.on(BI.GridView.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollTop(b.scrollTop),a.topRightGrid.setScrollLeft(b.scrollLeft),a._populateScrollbar(),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.topLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topLeftGrid]}),this.topRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.topRightGrid]}),this.bottomLeft=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomLeftGrid]}),this.bottomRight=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.bottomRightGrid]}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topLeft,top:0,left:0},{el:this.topRight,top:0},{el:this.bottomLeft,left:0},{el:this.bottomRight}]}),this.topScrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",width:BI.GridTableScrollbar.SIZE}),this.topScrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(b){a.bottomLeftGrid.setScrollTop(b),a.bottomRightGrid.setScrollTop(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.leftScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.leftScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,function(b){a.topLeftGrid.setScrollLeft(b),a.bottomLeftGrid.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.rightScrollbar=BI.createWidget({type:"bi.grid_table_horizontal_scrollbar",height:BI.GridTableScrollbar.SIZE}),this.rightScrollbar.on(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,function(b){a.topRightGrid.setScrollLeft(b),a.bottomRightGrid.setScrollLeft(b),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.scrollBarLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.topScrollbar,right:0,top:0},{el:this.leftScrollbar,left:0},{el:this.rightScrollbar}]}),this._width=b.width-BI.GridTableScrollbar.SIZE,this._height=b.height-BI.GridTableScrollbar.SIZE,this.header=this._getHeader(),this.items=this._getItems()},mounted:function(){var a=this.options;(a.items.length>0||a.header.length>0)&&this._populate()},_getFreezeColLength:function(){return this.options.isNeedFreeze?this.options.freezeCols.length:0},_getFreezeHeaderHeight:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?0:a.header.length*a.headerRowSize},_getActualItems:function(){var a=this.options;return a.header.length*a.headerRowSize>=this._height?a.header.concat(a.items):a.items},_populateScrollbar:function(){var a=this.options,b=this.getRegionSize(),c=0,d=0,e=0,f=[];BI.each(a.columnSize,function(b,g){a.isNeedFreeze===!0&&a.freezeCols.contains(b)?c+=g:d+=g,e+=g,0===b?f[b]=g:f[b]=f[b-1]+g}),this.topScrollbar.setContentSize(this._getActualItems().length*a.rowSize),this.topScrollbar.setSize(this._height-this._getFreezeHeaderHeight()),this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(),this.bottomRightGrid.getScrollTop())),this.topScrollbar.populate(),this.leftScrollbar.setContentSize(c),this.leftScrollbar.setSize(b),this.leftScrollbar.setPosition(this.bottomLeftGrid.getScrollLeft()),this.leftScrollbar.populate(),this.rightScrollbar.setContentSize(d),this.rightScrollbar.setSize(this._width-b),this.rightScrollbar.setPosition(this.bottomRightGrid.getScrollLeft()),this.rightScrollbar.populate();var g=this.scrollBarLayout.attr("items");g[0].top=this._getFreezeHeaderHeight(),g[1].top=this._height,g[2].top=this._height,g[2].left=b,this.scrollBarLayout.attr("items",g),this.scrollBarLayout.resize()},_getHeader:function(){var a=this.options,b=this._getFreezeColLength(),c=[],d=[];return BI.each(a.header,function(a,e){c[a]=[],d[a]=[],BI.each(e,function(e,f){var g={type:"bi.grid_table_cell",cell:f};e<b?c[a].push(g):d[a].push(g)})}),[c,d]},_getItems:function(){var a=(this.options,this._getFreezeColLength()),b=[],c=[];return BI.each(this._getActualItems(),function(d,e){b[d]=[],c[d]=[],BI.each(e,function(e,f){var g={type:"bi.grid_table_cell",cell:f};e<a?b[d].push(g):c[d].push(g)})}),[b,c]},_populateTable:function(){function a(a,b,c,d,e){var f=c/d,g=b/e;(g*(120/d)>=60||f*(120/e)>=60)&&(a.attr("overscanRowCount",100),a.attr("overscanColumnCount",100))}var b=this.options,c=this.getRegionSize(),d=0,e=0,f=0,g=[],h=this._getFreezeColLength();BI.each(b.columnSize,function(a,c){b.isNeedFreeze===!0&&b.freezeCols.contains(a)?d+=c:e+=c,f+=c,0===a?g[a]=c:g[a]=g[a-1]+c});var i=c,j=this._getFreezeHeaderHeight(),k=this._width-c,l=this._getFreezeHeaderHeight(),m=c,n=this._height-j,o=this._width-c,p=this._height-l,q=i+this._scrollBarSize,r=j+this._scrollBarSize,s=k+this._scrollBarSize,t=l+this._scrollBarSize,u=m+this._scrollBarSize,v=n+this._scrollBarSize,w=o+this._scrollBarSize,x=p+this._scrollBarSize,y=function(a){a.element.css({overflow:"scroll",overflowX:"scroll",overflowY:"scroll"})};this.topLeft.setWidth(i),this.topLeft.setHeight(j),this.topRight.setWidth(k),this.topRight.setHeight(l),this.bottomLeft.setWidth(m),this.bottomLeft.setHeight(n),this.bottomRight.setWidth(o),this.bottomRight.setHeight(p),this.topLeftGrid.setWidth(q),this.topLeftGrid.setHeight(r),this.topRightGrid.setWidth(s),this.topRightGrid.setHeight(t),this.bottomLeftGrid.setWidth(u),this.bottomLeftGrid.setHeight(v),this.bottomRightGrid.setWidth(w),this.bottomRightGrid.setHeight(x),y(this.topLeftGrid),y(this.topRightGrid),y(this.bottomLeftGrid),y(this.bottomRightGrid),this.topLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.topLeftGrid.setEstimatedRowSize(b.headerRowSize),this.topRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.topRightGrid.setEstimatedRowSize(b.headerRowSize),this.bottomLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.bottomLeftGrid.setEstimatedRowSize(b.rowSize),this.bottomRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.bottomRightGrid.setEstimatedRowSize(b.rowSize);var z=this.contextLayout.attr("items");z[1].left=c,z[2].top=this._getFreezeHeaderHeight(),z[3].left=c,z[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",z),this.contextLayout.resize(),this.topLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.topRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),h>0&&(a(this.topLeftGrid,q,r,b.headerRowSize,d/h),a(this.bottomLeftGrid,u,v,b.rowSize,d/h)),b.columnSize.length-h>0&&(a(this.topRight,s,t,b.headerRowSize,e/(b.columnSize.length-h)),a(this.bottomRightGrid,w,x,b.rowSize,e/(b.columnSize.length-h))),this.topLeftGrid._populate(this.header[0]),this.topRightGrid._populate(this.header[1]),this.bottomLeftGrid._populate(this.items[0]),this.bottomRightGrid._populate(this.items[1])},_populate:function(){this._width<=0||this._height<=0||(this._populateTable(),this._populateScrollbar())},getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},setVerticalScroll:function(a){this.bottomLeftGrid.setScrollTop(a),this.bottomRightGrid.setScrollTop(a)},setLeftHorizontalScroll:function(a){this.topLeftGrid.setScrollLeft(a),this.bottomLeftGrid.setScrollLeft(a)},setRightHorizontalScroll:function(a){this.topRightGrid.setScrollLeft(a),this.bottomRightGrid.setScrollLeft(a)},getVerticalScroll:function(){return this.bottomRightGrid.getScrollTop()},getLeftHorizontalScroll:function(){return this.bottomLeftGrid.getScrollLeft()},getRightHorizontalScroll:function(){return this.bottomRightGrid.getScrollLeft()},setWidth:function(a){BI.GridTable.superclass.setWidth.apply(this,arguments),this._width=this.options.width-BI.GridTableScrollbar.SIZE},setHeight:function(a){BI.GridTable.superclass.setHeight.apply(this,arguments),this._height=this.options.height-BI.GridTableScrollbar.SIZE},setColumnSize:function(a){this.options.columnSize=a,this._isNeedDigest=!0},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this._isNeedDigest=!0},getColumnSize:function(){return this.options.columnSize},getRegionColumnSize:function(){return this.options.regionColumnSize},populate:function(a,b){a&&this.options.items!==a&&(this.options.items=a,this.items=this._getItems(),this._restore()),b&&this.options.header!==b&&(this.options.header=b,this.header=this._getHeader(),this._restore()),this._populate()},_restore:function(){this.topLeftGrid.restore(),this.topRightGrid.restore(),this.bottomLeftGrid.restore(),this.bottomRightGrid.restore()},restore:function(){this._restore()}}),BI.shortcut("bi.grid_table",BI.GridTable),BI.QuickGridTable=BI.inherit(BI.GridTable,{_defaultConfig:function(){return BI.extend(BI.QuickGridTable.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quick-grid-table"})},render:function(){BI.QuickGridTable.superclass.render.apply(this,arguments);this.options;this.topLeftGrid.setOverflowX(!1),this.topLeftGrid.setOverflowY(!1),this.topRightGrid.setOverflowX(!1),this.topRightGrid.setOverflowY(!1),this.bottomLeftGrid.setOverflowX(!1),this.bottomLeftGrid.setOverflowY(!1),this.bottomRightGrid.setOverflowX(!1),this.bottomRightGrid.setOverflowY(!1)},mounted:function(){BI.QuickGridTable.superclass.mounted.apply(this,arguments);var a=this;this._topLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._topRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)),this._bottomLeftWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelLeft,this),BI.bind(this._shouldHandleLeftX,this),BI.bind(this._shouldHandleY,this)),this._bottomRightWheelHandler=new BI.WheelHandler(BI.bind(this._onWheelRight,this),BI.bind(this._shouldHandleRightX,this),BI.bind(this._shouldHandleY,this)), +this.topLeftGrid.element.mousewheel(function(b){a._topLeftWheelHandler.onWheel(b.originalEvent)}),this.topRightGrid.element.mousewheel(function(b){a._topRightWheelHandler.onWheel(b.originalEvent)}),this.bottomLeftGrid.element.mousewheel(function(b){a._bottomLeftWheelHandler.onWheel(b.originalEvent)}),this.bottomRightGrid.element.mousewheel(function(b){a._bottomRightWheelHandler.onWheel(b.originalEvent)})},_shouldHandleLeftX:function(a){return a>0?this.bottomLeftGrid.getScrollLeft()<this.bottomLeftGrid.getMaxScrollLeft():this.bottomLeftGrid.getScrollLeft()>0},_shouldHandleRightX:function(a){return a>0?this.bottomRightGrid.getScrollLeft()<this.bottomRightGrid.getMaxScrollLeft():this.bottomRightGrid.getScrollLeft()>0},_shouldHandleY:function(a){return a>0?this.bottomRightGrid.getScrollTop()<this.bottomRightGrid.getMaxScrollTop():this.bottomRightGrid.getScrollTop()>0},_onWheelLeft:function(a,b){var c=this,d=this.bottomLeftGrid.getScrollTop(),e=this.bottomLeftGrid.getScrollLeft();d+=b,e+=a,this.bottomLeftGrid.setScrollTop(d),this.bottomRightGrid.setScrollTop(d),this.topLeftGrid.setScrollLeft(e),this.bottomLeftGrid.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_onWheelRight:function(a,b){var c=this,d=this.bottomRightGrid.getScrollTop(),e=this.bottomRightGrid.getScrollLeft();d+=b,e+=a,this.bottomLeftGrid.setScrollTop(d),this.bottomRightGrid.setScrollTop(d),this.topRightGrid.setScrollLeft(e),this.bottomRightGrid.setScrollLeft(e),c._populateScrollbar(),this.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)},_populateTable:function(){function a(a,b,c,d,e){var f=c/d,g=b/e;(g*(120/d)>=60||f*(120/e)>=60)&&(a.attr("overscanRowCount",100),a.attr("overscanColumnCount",100))}var b=this.options,c=this.getRegionSize(),d=0,e=0,f=0,g=[],h=this._getFreezeColLength();BI.each(b.columnSize,function(a,c){b.isNeedFreeze===!0&&b.freezeCols.contains(a)?d+=c:e+=c,f+=c,0===a?g[a]=c:g[a]=g[a-1]+c});var i=c,j=this._getFreezeHeaderHeight(),k=this._width-c,l=this._getFreezeHeaderHeight(),m=c,n=this._height-j,o=this._width-c,p=this._height-l;this.topLeft.setWidth(i),this.topLeft.setHeight(j),this.topRight.setWidth(k),this.topRight.setHeight(l),this.bottomLeft.setWidth(m),this.bottomLeft.setHeight(n),this.bottomRight.setWidth(o),this.bottomRight.setHeight(p),this.topLeftGrid.setWidth(i),this.topLeftGrid.setHeight(j),this.topRightGrid.setWidth(k),this.topRightGrid.setHeight(l),this.bottomLeftGrid.setWidth(m),this.bottomLeftGrid.setHeight(n),this.bottomRightGrid.setWidth(o),this.bottomRightGrid.setHeight(p),this.topLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.topLeftGrid.setEstimatedRowSize(b.headerRowSize),this.topRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.topRightGrid.setEstimatedRowSize(b.headerRowSize),this.bottomLeftGrid.setEstimatedColumnSize(h>0?d/h:0),this.bottomLeftGrid.setEstimatedRowSize(b.rowSize),this.bottomRightGrid.setEstimatedColumnSize(b.columnSize.length-h>0?e/(b.columnSize.length-h):0),this.bottomRightGrid.setEstimatedRowSize(b.rowSize);var q=this.contextLayout.attr("items");q[1].left=c,q[2].top=this._getFreezeHeaderHeight(),q[3].left=c,q[3].top=this._getFreezeHeaderHeight(),this.contextLayout.attr("items",q),this.contextLayout.resize();var r=[],s=[],t=[],u=[];BI.each(b.header,function(a,b){r[a]=[],s[a]=[],BI.each(b,function(b,c){var d={type:"bi.grid_table_cell",cell:c};b<h?r[a].push(d):s[a].push(d)})}),BI.each(this._getActualItems(),function(a,b){t[a]=[],u[a]=[],BI.each(b,function(b,c){var d={type:"bi.grid_table_cell",cell:c};b<h?t[a].push(d):u[a].push(d)})}),this.topLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.topRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomLeftGrid.attr({overscanColumnCount:0,overscanRowCount:0}),this.bottomRightGrid.attr({overscanColumnCount:0,overscanRowCount:0}),h>0&&(a(this.topLeftGrid,i,j,b.headerRowSize,d/h),a(this.bottomLeftGrid,m,n,b.rowSize,d/h)),b.columnSize.length-h>0&&(a(this.topRight,k,l,b.headerRowSize,e/(b.columnSize.length-h)),a(this.bottomRightGrid,o,p,b.rowSize,e/(b.columnSize.length-h))),this.topLeftGrid.populate(r),this.topRightGrid.populate(s),this.bottomLeftGrid.populate(t),this.bottomRightGrid.populate(u)}}),BI.shortcut("bi.quick_grid_table",BI.QuickGridTable),BI.GridTableScrollbar=BI.inherit(BI.Widget,{_const:{FACE_MARGIN:4,FACE_MARGIN_2:8,FACE_SIZE_MIN:30,KEYBOARD_SCROLL_AMOUNT:40},_defaultConfig:function(){return BI.extend(BI.GridTableScrollbar.superclass._defaultConfig.apply(this,arguments),{baseCls:"scrollbar-layout-main public-scrollbar-main",attributes:{tabIndex:0},contentSize:0,defaultPosition:0,isOpaque:!1,orientation:"vertical",position:0,size:0})},render:function(){this.options;this.focused=!1,this.isDragging=!1,this.face=BI.createWidget({type:"bi.layout",cls:"scrollbar-layout-face public-scrollbar-face "+(this._isHorizontal()?"scrollbar-layout-face-horizontal":"scrollbar-layout-face-vertical")}),this.contextLayout=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.face,left:0,top:0}]})},mounted:function(){var a=this,b=this.options,c="horizontal"===b.orientation?this._onWheelX:this._onWheelY;this._wheelHandler=new BI.WheelHandler(BI.bind(c,this),BI.bind(this._shouldHandleX,this),BI.bind(this._shouldHandleY,this)),this._mouseMoveTracker=new BI.MouseMoveTracker(BI.bind(this._onMouseMove,this),BI.bind(this._onMouseMoveEnd,this),document),this.element.on("mousedown",BI.bind(this._onMouseDown,this)),this.element.on("mousewheel",function(b){a._wheelHandler.onWheel(b.originalEvent)}),this.element.on("keydown",BI.bind(this._onKeyDown,this)),this.element.on("focus",function(){a.focused=!0,a._populate()}),this.element.on("blur",function(){a.focused=!1,a._populate()}),this._isHorizontal()?this.element.addClass("scrollbar-layout-main-horizontal"):this.element.addClass("scrollbar-layout-main-vertical"),this._populate()},_isHorizontal:function(){return"horizontal"===this.options.orientation},_getScale:function(){var a=this.options,b=a.size/a.contentSize,c=a.size*b;return c<this._const.FACE_SIZE_MIN&&(b=(a.size-this._const.FACE_SIZE_MIN)/(a.contentSize-a.size)),b},_getFaceSize:function(){var a=this.options,b=a.size/a.contentSize,c=a.size*b;return c<this._const.FACE_SIZE_MIN&&(c=this._const.FACE_SIZE_MIN),c},_shouldHandleX:function(a){return"horizontal"===this.options.orientation&&this._shouldHandleChange(a)},_shouldHandleY:function(a){return"horizontal"!==this.options.orientation&&this._shouldHandleChange(a)},_shouldHandleChange:function(a){return this.options.position+a!==this.options.position},_onWheelY:function(a,b){this._onWheel(b)},_onWheelX:function(a,b){this._onWheel(a)},_onWheel:function(a){var b=this.options.contentSize-this.options.size;this.options.position+=a,this.options.position<0?this.options.position=0:this.options.position>b&&(this.options.position=b),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)},_onMouseDown:function(a){if(a.target!==this.face.element[0]){var b=this._isHorizontal()?a.offsetX:a.offsetY;b/=this._getScale(),this.options.position=BI.clamp(b-.5*this._getFaceSize()/this._getScale(),0,this.options.contentSize-this.options.size),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)}else this._mouseMoveTracker.captureMouseMoves(a);try{this.element[0].focus()}catch(a){}},_onMouseMove:function(a,b){var c=this._isHorizontal()?a:b;c/=this._getScale(),this.options.position=BI.clamp(this.options.position+c,0,this.options.contentSize-this.options.size),this.isDragging=this._mouseMoveTracker.isDragging(),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)},_onMouseMoveEnd:function(a){this._mouseMoveTracker.releaseMouseMoves(),this.isDragging===!0&&(this.isDragging=!1,this._populate())},_onKeyDown:function(a){var b={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105},c=a.keyCode;if(c!==b.TAB){var d=40,e=0;if(this._isHorizontal())switch(c){case b.HOME:e=-1,d=this.options.contentSize;break;case b.LEFT:e=-1;break;case b.RIGHT:e=1;break;default:return}if(!this._isHorizontal())switch(c){case b.SPACE:e=a.shiftKey?-1:1;break;case b.HOME:e=-1,d=this.options.contentSize;break;case b.UP:e=-1;break;case b.DOWN:e=1;break;case b.PAGE_UP:e=-1,d=this.options.size;break;case b.PAGE_DOWN:e=1,d=this.options.size;break;default:return}this.options.position=BI.clamp(this.options.position+d*e,0,this.options.contentSize-this.options.size),a.preventDefault(),this._populate(),this.fireEvent(BI.GridTableScrollbar.EVENT_SCROLL,this.options.position)}},_populate:function(){var a=this.options;if(a.size<1||a.contentSize<=a.size)return void this.setVisible(!1);this.setVisible(!0);var b=a.size,c=this._isHorizontal(),d=this.focused||this.isDragging,e=this._getFaceSize(),f=a.isOpaque;this.element[f===!0?"addClass":"removeClass"]("public-scrollbar-main-opaque"),this.element[d===!0?"addClass":"removeClass"]("public-scrollbar-main-active"),this.face.element[d===!0?"addClass":"removeClass"]("public-scrollbar-face-active");var g=a.position*this._getScale()+this._const.FACE_MARGIN,h=this.contextLayout.attr("items");c?(this.setWidth(b),this.face.setWidth(e-this._const.FACE_MARGIN_2),h[0].left=g,h[0].top=0):(this.setHeight(b),this.face.setHeight(e-this._const.FACE_MARGIN_2),h[0].left=0,h[0].top=g),this.contextLayout.attr("items",h),this.contextLayout.resize()},setContentSize:function(a){this.options.contentSize=a},setPosition:function(a){this.options.position=a},setSize:function(a){this.options.size=a},populate:function(){this._populate()}}),BI.GridTableScrollbar.SIZE=10,BI.GridTableScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_table_scrollbar",BI.GridTableScrollbar),BI.GridTableHorizontalScrollbar=BI.inherit(BI.Widget,{_const:{FACE_MARGIN:4,FACE_MARGIN_2:8,FACE_SIZE_MIN:30,KEYBOARD_SCROLL_AMOUNT:40},_defaultConfig:function(){return BI.extend(BI.GridTableHorizontalScrollbar.superclass._defaultConfig.apply(this,arguments),{attributes:{tabIndex:0},contentSize:0,position:0,size:0})},_init:function(){BI.GridTableHorizontalScrollbar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.scrollbar=BI.createWidget({type:"bi.grid_table_scrollbar",orientation:"horizontal",isOpaque:!0,position:b.position,contentSize:b.contentSize,size:b.size}),this.scrollbar.on(BI.GridTableScrollbar.EVENT_SCROLL,function(){a.fireEvent(BI.GridTableHorizontalScrollbar.EVENT_SCROLL,arguments)}),BI.createWidget({type:"bi.absolute",cls:"horizontal-scrollbar",element:this,width:b.size,height:BI.GridTableScrollbar.SIZE,items:[{el:{type:"bi.absolute",scrollable:!1,height:BI.GridTableScrollbar.SIZE,items:[{el:this.scrollbar,left:0,top:0}]},top:0,left:0,right:0}]})},setContentSize:function(a){this.options.contentSize=a,this.scrollbar.setContentSize(a)},setPosition:function(a){this.options.position=a,this.scrollbar.setPosition(a)},setSize:function(a){this.setWidth(a),this.options.size=a,this.scrollbar.setSize(a)},populate:function(){this.scrollbar.populate();var a=this.options;return a.size<1||a.contentSize<=a.size?void this.setVisible(!1):void this.setVisible(!0)}}),BI.GridTableHorizontalScrollbar.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_table_horizontal_scrollbar",BI.GridTableHorizontalScrollbar),BI.TableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-header-cell",text:""})},_init:function(){BI.TableHeaderCell.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.label",element:this,textAlign:"center",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.table_header_cell",BI.TableHeaderCell),BI.Table=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Table.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table",logic:{dynamic:!1},isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[]})},_calculateWidth:function(a){return a&&"0"!==a?(a=BI.parseFloat(a),a<0&&(a=0),a>1.01?a:100*a+"%"):""},_calculateHeight:function(a){return a?a:""},_isRightFreeze:function(){return BI.isNotEmptyArray(this.options.freezeCols)&&0!==BI.first(this.options.freezeCols)},_createTopLeft:function(){var a=this.options,b=this._isRightFreeze();this.topLeftColGroupTds={},this.topLeftBodyTds={},this.topLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.topLeftColGroupTds),e=this.topLeftBody=this._body();if(e.element.append(this._createHeaderCells(this.topLeftItems,this.columnLeft,this.mergeLeft,this.topLeftBodyTds,this.topLeftBodyItems)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createTopRight:function(){var a=this.options,b=this._isRightFreeze();this.topRightColGroupTds={},this.topRightBodyTds={},this.topRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.topRightColGroupTds),e=this.topRightBody=this._body();if(e.element.append(this._createHeaderCells(this.topRightItems,this.columnRight,this.mergeRight,this.topRightBodyTds,this.topRightBodyItems,this.columnLeft.length)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topRightContainer=BI.createWidget({type:"bi.adaptive",width:f||void 0,items:[c]})},_createBottomLeft:function(){var a=this.options,b=this._isRightFreeze();this.bottomLeftColGroupTds={},this.bottomLeftBodyTds={},this.bottomLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.bottomLeftColGroupTds),e=this._createBottomLeftBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomLeftBody:function(){var a=this.bottomLeftBody=this._body();return a.element.append(this._createCells(this.bottomLeftItems,this.columnLeft,this.mergeLeft,this.bottomLeftBodyTds,this.bottomLeftBodyItems)),a},_createBottomRight:function(){var a=this.options,b=this._isRightFreeze();this.bottomRightColGroupTds={},this.bottomRightBodyTds={},this.bottomRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.bottomRightColGroupTds),e=this._createBottomRightBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomRightContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomRightBody:function(){var a=this.bottomRightBody=this._body();return a.element.append(this._createCells(this.bottomRightItems,this.columnRight,this.mergeRight,this.bottomRightBodyTds,this.bottomRightBodyItems,this.columnLeft.length)),a},_createFreezeTable:function(){var a=this,b=this.options,c=this._isRightFreeze(),d=this._split(b.header);this.topLeftItems=d.left,this.topRightItems=d.right,d=this._split(b.items),this.bottomLeftItems=d.left,this.bottomRightItems=d.right,this.columnLeft=[],this.columnRight=[],BI.each(b.columnSize,function(d,e){b.freezeCols.contains(d)?a[c?"columnRight":"columnLeft"].push(e):a[c?"columnLeft":"columnRight"].push(e)}),this.mergeLeft=[],this.mergeRight=[],BI.each(b.mergeCols,function(d,e){b.freezeCols.contains(e)?a[c?"mergeRight":"mergeLeft"].push(e):a[c?"mergeLeft":"mergeRight"].push(e)});var e=this._createTopLeft(),f=this._createTopRight(),g=this._createBottomLeft(),h=this._createBottomRight();this.scrollTopLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-left",width:"100%",height:"100%",scrollable:!1,items:[e]}),this.scrollTopRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-right",width:"100%",height:"100%",scrollable:!1,items:[f]}),this.scrollBottomLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-left",width:"100%",height:"100%",scrollable:c||null,scrollx:!c,items:[g]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-right",width:"100%",height:"100%",scrollable:!c||null,scrollx:c,items:[h]}),this.topLeft=BI.createWidget({type:"bi.adaptive",cls:"top-left",scrollable:!1,items:[this.scrollTopLeft]}),this.topRight=BI.createWidget({type:"bi.adaptive",cls:"top-right",scrollable:!1,items:[this.scrollTopRight]}),this.bottomLeft=BI.createWidget({type:"bi.adaptive",cls:"bottom-left",items:[this.scrollBottomLeft]}),this.bottomRight=BI.createWidget({type:"bi.adaptive",cls:"bottom-right",scrollable:!1,items:[this.scrollBottomRight]});var i=b.header.length*((b.headerRowSize||b.rowSize)+1)+1,j=BI.sum(b.freezeCols,function(a,c){return b.columnSize[c]>1?b.columnSize[c]+1:b.columnSize[c]});this._resize=function(){a.scrollBottomLeft.element.is(":visible")&&(a.scrollBottomLeft.element.css({"overflow-x":"auto"}),a.scrollBottomRight.element.css({"overflow-x":"auto"}),a.setColumnSize(b.columnSize),c?a.scrollBottomLeft.element.css({"overflow-y":"auto"}):a.scrollBottomRight.element.css({"overflow-y":"auto"}),(a.scrollBottomLeft.element.hasHorizonScroll()||a.scrollBottomRight.element.hasHorizonScroll())&&(a.scrollBottomLeft.element.css("overflow-x","scroll"),a.scrollBottomRight.element.css("overflow-x","scroll")),a.scrollBottomRight.element.hasVerticalScroll()?a.scrollTopRight.element.css("overflow-y","scroll"):a.scrollTopRight.element.css("overflow-y","hidden"),a.scrollBottomLeft.element.hasVerticalScroll()?a.scrollTopLeft.element.css("overflow-y","scroll"):a.scrollTopLeft.element.css("overflow-y","hidden"),a.scrollTopLeft.element[0].scrollLeft=a.scrollBottomLeft.element[0].scrollLeft,a.scrollTopRight.element[0].scrollLeft=a.scrollBottomRight.element[0].scrollLeft,a.scrollBottomLeft.element[0].scrollTop=a.scrollBottomRight.element[0].scrollTop)};var k=b.regionColumnSize;0===b.freezeCols.length?k=c?["fill",0]:[0,"fill"]:b.freezeCols.length>=b.columnSize.length&&(k=c?[0,"fill"]:["fill",0]),this.partitions=BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{rows:2,columns:2,columnSize:k||(c?["fill",j]:[j,"fill"]),rowSize:[i,"fill"],items:[[{el:this.topLeft},{el:this.topRight}],[{el:this.bottomLeft},{el:this.bottomRight}]]})))),this._initFreezeScroll(),BI.nextTick(function(){a.element.is(":visible")&&(a._resize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT))}),BI.ResizeDetector.addResizeListener(this,function(){a._resize(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE)})},_initFreezeScroll:function(){function a(a,c,d){a.scroll(function(e){d.scrollTop(a.scrollTop()),c.scrollLeft(a.scrollLeft()),b.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})}var b=this;this.options;a(this.scrollBottomRight.element,this.scrollTopRight.element,this.scrollBottomLeft.element)},resize:function(){this._resize&&this._resize()},_createCells:function(a,b,c,d,e,f,g){var h=this,i=this.options,j={},k={},l={},m={},n={};b=b||i.columnSize,c=c||i.mergeCols,d=d||{},e=e||{},f=f||0,g||(g=i.rowSize);var o=document.createDocumentFragment();return BI.each(a,function(a,p){function q(a,b){var c=(0|j[b].attr("height"))+g+1;j[b].attr("height",c).css("height",c);var f=(0|(j[b].attr("rowspan")||1))+1;j[b].attr("rowspan",f),j[b].__mergeRows.pushDistinct(a),d[a][b]=j[b],e[a][b]=m[b]}function r(a,c){if(b[c]){var f=0|k[a].attr("width");f>1.05&&b[c]?(f=f+b[c]+1,c===b.length-1&&f--):f+=b[c],f=h._calculateWidth(f),k[a].attr("width",f).css("width",f),l[a].element.width(f)}var g=(0|(k[a].attr("colspan")||1))+1;k[a].attr("colspan",g),k[a].__mergeCols.pushDistinct(c),d[a][c]=k[a],e[a][c]=l[a]}function s(a,c){var i=h._calculateWidth(b[c]);i>1.05&&c===b.length-1&&i--;var o=h._calculateHeight(g),q=$("<td>").attr("height",o).attr("width",i).css({width:i,height:o,position:"relative"}).addClass(0===(1&c)?"odd-col":"even-col").addClass(0===a?"first-row":"").addClass(0===c?"first-col":"").addClass(c===p.length-1?"last-col":""),r=BI.createWidget(n[a][c],{type:"bi.table_cell",textAlign:"left",width:BI.isNumeric(i)?i:"",height:BI.isNumeric(o)?o:"",_row:a,_col:c+f});h.addWidget(r.getName(),r),r._mount(),r.element.css("position","relative"),q.append(r.element),t.append(q),j[c]=q,j[c].__mergeRows=[a],m[c]=r,k[a]=q,k[a].__mergeCols=[c],l[a]=r,d[a][c]=q,e[a][c]=r}var t=$("<tr>").addClass(0===(1&a)?"odd":"even");BI.each(p,function(b,f){if(n[a]||(n[a]={}),d[a]||(d[a]={}),e[a]||(e[a]={}),n[a][b]=f,i.isNeedMerge&&c.contains(b))if(0===a&&0===b)s(0,0);else if(0===b&&a>0){var g=i.mergeRule(n[a][b],n[a-1][b]);g===!0?(q(a,b),k[a]=j[b],l[a]=m[b]):s(a,b)}else if(0===a&&b>0){var h=i.mergeRule(n[a][b],n[a][b-1]);h===!0?(r(a,b),j[b]=k[a],m[b]=l[a]):s(a,b)}else{var g=i.mergeRule(n[a][b],n[a-1][b]),h=i.mergeRule(n[a][b],n[a][b-1]);if(h&&g)return;h&&r(a,b),g&&q(a,b),h||g||s(a,b)}else s(a,b)}),o.appendChild(t[0])}),o},_createColGroupCells:function(a,b){var c=this,d=this.options;a=a||d.columnSize,b=b||{};var e=document.createDocumentFragment();return BI.each(a,function(a,d){var f=c._calculateWidth(d),g=$("<col>").attr("width",f).css("width",f);b[a]=g,e.appendChild(g[0])}),e},_createHeaderCells:function(a,b,c,d,e,f){var g=this.options;f||(f=0);var h=this._createCells(a,b,BI.range(g.columnSize.length),d,e,f,g.headerRowSize||g.rowSize);return h},_createFooterCells:function(a,b,c,d){var e=(this.options,this._createCells(a,b,[],c,d,0));return e},_createColGroup:function(a,b,c){this.options;return this.colgroup=this._colgroup(),this.colgroup.element.append(this._createColGroupCells(a,b,c)),this.colgroup},_createHeader:function(){var a=this.options;if(a.header!==!1)return this.header=this._header(),this.header.element.append(this._createHeaderCells(a.header,null,null,this.headerTds,this.headerItems)),this.header},_createFooter:function(a,b,c){var d=this.options;if(d.footer!==!1)return this.footer=this._footer(),this.footer.element.append(this._createFooterCells(d.footer,null,this.footerTds,this.footerItems)),this.footer},_createBody:function(){var a=this.options;return this.body=this._body(),this.body.element.append(this._createCells(a.items,null,null,this.bodyTds,this.bodyItems)),this.body},_createNormalTable:function(){var a=this,b=this.options,c=this._table();this.colgroupTds={},this.headerTds={},this.footerTds={},this.bodyTds={},this.headerItems={},this.footerItems={},this.bodyItems={};var d=this._createColGroup(null,this.colgroupTds),e=this._createHeader(),f=this._createFooter(),g=this._createBody();BI.createWidget({type:"bi.adaptive",element:c,items:[d,e,f,g]});var h=BI.sum(this.options.columnSize)||void 0;h=this._calculateWidth(h),BI.isNumeric(h)&&h>1&&(h+=b.columnSize.length),this.tableContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(h),items:[c]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",cls:"scroll-bottom-right",scrollable:!0,items:[this.tableContainer]}),BI.createWidget({type:"bi.adaptive",cls:"bottom-right",element:this,scrollable:!1,items:[this.scrollBottomRight]}),this._initNormalScroll(),BI.nextTick(function(){a.element.is(":visible")&&a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT)})},_initNormalScroll:function(){var a=this;this.scrollBottomRight.element.scroll(function(b){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})},_split:function(a){var b=this.options,c=[],d=[],e=this._isRightFreeze();return BI.each(a,function(a,f){c.push([]),d.push([]),BI.each(f,function(f,g){b.freezeCols.contains(f)?(e?d:c)[a].push(g):(e?c:d)[a].push(g)})}),{left:c,right:d}},_table:function(){return BI.createWidget({type:"bi.layout",tagName:"table",cls:"table",attribute:{cellspacing:0,cellpadding:0}})},_header:function(){return BI.createWidget({type:"bi.layout",cls:"header",tagName:"thead"})},_footer:function(){return BI.createWidget({type:"bi.layout",cls:"footer",tagName:"tfoot"})},_body:function(){return BI.createWidget({type:"bi.layout",tagName:"tbody",cls:"body"})},_colgroup:function(){return BI.createWidget({type:"bi.layout",tagName:"colgroup"})},_init:function(){BI.Table.superclass._init.apply(this,arguments),this.populate(this.options.items)},setColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.columnSize=a||[],c.isNeedFreeze){var e=[],f=[];BI.each(c.columnSize,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=2,j=3,k=function(a){var c,d,k,l;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,k=b.topLeftBodyItems,l=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,k=b.topRightBodyItems,l=f;break;case i:c=b.bottomLeftColGroupTds,d=b.bottomLeftBodyTds,k=b.bottomLeftBodyItems,l=e;break;case j:c=b.bottomRightColGroupTds,d=b.bottomRightBodyTds,k=b.bottomRightBodyItems,l=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(""!==l[a]&&e!==l[a]){var f=b._calculateWidth(l[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(l,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(k,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(l,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};k(g),k(h),k(i),k(j);var l=0,m=0;this.columnLeft=[],this.columnRight=[],BI.each(c.columnSize,function(a,e){c.freezeCols.contains(a)?(l+=e,b[d?"columnRight":"columnLeft"].push(e)):(m+=e,b[d?"columnLeft":"columnRight"].push(e))}),l=this._calculateWidth(l),m=this._calculateWidth(m),BI.isNumeric(l)&&(l=BI.parseFloat(l)+c.freezeCols.length),BI.isNumeric(m)&&(m=BI.parseFloat(m)+c.columnSize.length-c.freezeCols.length),this.topLeftContainer.element.width(d?m:l),this.bottomLeftContainer.element.width(d?m:l),this.topRightContainer.element.width(d?l:m),this.bottomRightContainer.element.width(d?l:m),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(a,d){var e=0|d.attr("width");if(""!==c.columnSize[a]&&e!==c.columnSize[a]){var f=b._calculateWidth(c.columnSize[a]);d.attr("width",f).css("width",f),BI.each(b.bodyTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.headerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.footerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.bodyItems,function(d,e){if(e[a])if(b.bodyTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.bodyTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.bodyTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.headerItems,function(d,e){if(e[a])if(b.headerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.headerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.footerItems,function(d,e){if(e[a])if(b.footerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.footerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.footerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}});var n=this._calculateWidth(BI.sum(c.columnSize));n>1.05&&(n+=c.columnSize.length),n>1.05&&this.tableContainer.element.width(n)}},getColumnSize:function(){return this.options.columnSize},getCalculateColumnSize:function(){var a=this,b=this.options,c=[];if(b.isNeedFreeze===!0){if(BI.size(this.bottomLeftBodyTds)>0||BI.size(this.bottomRightBodyTds)>0)return BI.any(this.bottomLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomLeftBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomLeftBodyTds[0])-1&&e++,c.push(e)}),BI.any(this.bottomRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomRightBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomRightBodyTds[0])-1&&e++,c.push(e)}),c;BI.any(this.topLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e); +}),!0})||BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.topLeftBodyTds[BI.size(a.topLeftBodyTds)-1])-1&&e++,c.push(e)}),BI.any(this.topRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.topRightBodyTds[BI.size(a.topRightBodyTds)-1])-1&&e++,c.push(e)})}else BI.each(this.headerTds[BI.size(this.headerTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.headerTds[BI.size(a.headerTds)-1])-1&&e++,c.push(e)});return c},setHeaderColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.isNeedFreeze){var e=[],f=[];BI.each(a,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=function(a){var c,d,i,j;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,i=b.topLeftBodyItems,j=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,i=b.topRightBodyItems,j=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(e!==j[a]){var f=b._calculateWidth(j[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(j,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(i,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(j,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};i(g),i(h);var j=0,k=0;BI.each(a,function(a,b){c.freezeCols.contains(a)?j+=b:k+=b}),j=this._calculateWidth(j),k=this._calculateWidth(k),BI.isNumeric(j)&&(j=BI.parseFloat(j)+c.freezeCols.length),BI.isNumeric(k)&&(k=BI.parseFloat(k)+a.length-c.freezeCols.length),this.topLeftContainer.element.width(d?k:j),this.topRightContainer.element.width(d?j:k),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(c,d){var e=0|d.attr("width");if(e!==a[c]){var f=b._calculateWidth(a[c]);d.attr("width",f).css("width",f),BI.each(b.headerTds,function(d,e){if(e[c])if(e[c].__mergeCols.length>1){var g=0;BI.each(a,function(a,b){e[c].__mergeCols.contains(a)&&(g+=b)}),g=b._calculateWidth(g),g>1&&(g+=e[c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].attr("width","").css("width","")}else c==BI.size(e)-1?e[c].attr("width",f-1).css("width",f-1):e[c].attr("width",f).css("width",f)}),BI.each(b.headerItems,function(d,e){if(e[c])if(b.headerTds[d][c].__mergeCols.length>1){var g=0;BI.each(a,function(a,e){b.headerTds[d][c].__mergeCols.contains(a)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].element.attr("width","").css("width","")}else BI.isNumeric(f)?c==BI.size(e)-1?e[c].element.attr("width",f-1).css("width",f-1):e[c].element.attr("width",f).css("width",f):e[c].element.attr("width","").css("width","")})}});var l=this._calculateWidth(BI.sum(a));l>1.05&&(l+=a.length),this.tableContainer.element.width(l)}},setRegionColumnSize:function(a){var b=this.options;b.regionColumnSize=a,0===b.freezeCols.length?b.isNeedFreeze?(this.partitions.attr("columnSize",this._isRightFreeze()?["fill",0]:[0,"fill"]),this.partitions.resize()):this.tableContainer.element.width(a[0]):b.freezeCols.length>0&&b.freezeCols.length<b.columnSize.length?b.isNeedFreeze?(this.partitions.attr("columnSize",a),this.partitions.resize()):this.tableContainer.element.width(a[0]):b.isNeedFreeze?(this.partitions.attr("columnSize",this._isRightFreeze()?[0,"fill"]:["fill",0]),this.partitions.resize()):this.tableContainer.element.width(a[0])},getRegionColumnSize:function(){return this.options.regionColumnSize},getCalculateRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element.width(),this.scrollBottomRight.element.width()]:[this.scrollBottomRight.element.width()]},getCalculateRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollTopRight.element.height(),this.scrollBottomRight.element.height()]:[this.scrollBottomRight.element.height()]},getClientRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].clientWidth,this.scrollBottomRight.element[0].clientWidth]:[this.scrollBottomRight.element[0].clientWidth]},getClientRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].clientHeight,this.scrollBottomRight.element[0].clientHeight]:[this.scrollBottomRight.element[0].clientHeight]},getScrollRegionColumnSize:function(){var a=this.options;return a.isNeedFreeze?[this.scrollBottomLeft.element[0].scrollWidth,this.scrollBottomRight.element[0].scrollWidth]:[this.scrollBottomRight.element[0].scrollWidth]},getScrollRegionRowSize:function(){var a=this.options;return a.isNeedFreeze?a.freezeCols.length<a.columnSize.length?[this.scrollTopRight.element[0].scrollHeight,this.scrollBottomRight.element[0].scrollHeight]:[this.scrollTopLeft.element[0].scrollHeight,this.scrollBottomLeft.element[0].scrollHeight]:[this.scrollBottomRight.element[0].scrollHeight]},hasVerticalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element.hasVerticalScroll()||this.scrollBottomLeft.element.hasVerticalScroll():this.scrollBottomRight.element.hasVerticalScroll()},setVerticalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomRight.element[0].scrollTop!==a&&(this.scrollBottomRight.element[0].scrollTop=a),this.scrollBottomLeft.element[0].scrollTop!==a&&(this.scrollBottomLeft.element[0].scrollTop=a)):this.scrollBottomRight.element[0].scrollTop!==a&&(this.scrollBottomRight.element[0].scrollTop=a)},setLeftHorizontalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomLeft.element[0].scrollLeft!==a&&(this.scrollBottomLeft.element[0].scrollLeft=a),this.scrollTopLeft.element[0].scrollLeft!==a&&(this.scrollTopLeft.element[0].scrollLeft=a)):this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a)},setRightHorizontalScroll:function(a){var b=this.options;b.isNeedFreeze?(this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a),this.scrollTopRight.element[0].scrollLeft!==a&&(this.scrollTopRight.element[0].scrollLeft=a)):this.scrollBottomRight.element[0].scrollLeft!==a&&(this.scrollBottomRight.element[0].scrollLeft=a)},getVerticalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element[0].scrollTop||this.scrollBottomLeft.element[0].scrollTop:this.scrollBottomRight.element[0].scrollTop},getLeftHorizontalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomLeft.element[0].scrollLeft:this.scrollBottomRight.element[0].scrollLeft},getRightHorizontalScroll:function(){var a=this.options;return a.isNeedFreeze?this.scrollBottomRight.element[0].scrollLeft:this.scrollBottomRight.element[0].scrollLeft},getColumns:function(){var a=this.options;return a.isNeedFreeze?{topLeft:this.topLeftBodyItems,topRight:this.topRightBodyItems,bottomLeft:this.bottomLeftBodyItems,bottomRight:this.bottomRightBodyItems}:{header:this.headerItems,body:this.bodyItems,footer:this.footerItems}},populate:function(a,b){this.options.items=a||[],b&&(this.options.header=b),this.empty(),this.options.isNeedFreeze?this._createFreezeTable():this._createNormalTable()}}),BI.Table.EVENT_TABLE_AFTER_INIT="EVENT_TABLE_AFTER_INIT",BI.Table.EVENT_TABLE_RESIZE="EVENT_TABLE_RESIZE",BI.Table.EVENT_TABLE_SCROLL="EVENT_TABLE_SCROLL",BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE="EVENT_TABLE_BEFORE_COLUMN_RESIZE",BI.Table.EVENT_TABLE_COLUMN_RESIZE="EVENT_TABLE_COLUMN_RESIZE",BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE="EVENT_TABLE_AFTER_COLUMN_RESIZE",BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE="EVENT_TABLE_BEFORE_REGION_RESIZE",BI.Table.EVENT_TABLE_REGION_RESIZE="EVENT_TABLE_REGION_RESIZE",BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE="EVENT_TABLE_AFTER_REGION_RESIZE",BI.shortcut("bi.table_view",BI.Table),BI.ResizableTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ResizableTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-resizable-table-cell",cell:{},minSize:15,maxSize:Number.MAX_VALUE,start:BI.emptyFn,resize:BI.emptyFn,stop:BI.emptyFn})},_init:function(){function a(a){var b=BI.clamp(a,c.minSize,c.maxSize||Number.MAX_VALUE);return b}BI.ResizableTableCell.superclass._init.apply(this,arguments);var b=this,c=this.options;this.cell=BI.createWidget(BI.extend({type:"bi.label"},c.cell,{width:c.width,height:c.height}));var d=!1,e=0,f=0,g=c.width,h=new BI.MouseMoveTracker(function(i,j){h.isDragging()&&(d=!0,f+=i,e=a(g+f),b.handler.element.addClass("dragging"),c.resize(e))},function(){d===!0&&(e=a(e),c.stop(e),e=0,f=0,g=c.width,d=!1),b.handler.element.removeClass("dragging"),b.handler.element.removeClass("suitable"),h.releaseMouseMoves()},document);this.handler=BI.createWidget({type:"bi.absolute",cls:"resizable-table-cell-resizer-container",width:6,items:[{el:{type:"bi.layout",cls:"resizable-table-cell-resizer-knob",width:4},right:0,top:0,bottom:0}]}),this.handler.element.on("mousedown",function(b){g=c.width,a(g),h.captureMouseMoves(b)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.cell,left:0,right:0,top:0,bottom:0},{el:this.handler,right:0,top:0,bottom:0}]})},setWidth:function(a){BI.ResizableTableCell.superclass.setWidth.apply(this,arguments);var b=this.options;this.cell.setWidth(b.width)},setHeight:function(a){BI.ResizableTableCell.superclass.setHeight.apply(this,arguments);var b=this.options;this.cell.setHeight(b.height)}}),BI.shortcut("bi.resizable_table_cell",BI.ResizableTableCell),BI.ResizableTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ResizableTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-resizable-table",el:{type:"bi.grid_table"},isNeedFreeze:!1,isNeedResize:!0,isResizeAdapt:!1,headerRowSize:25,rowSize:25,isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],freezeCols:[],header:[],items:[],regionColumnSize:[]})},_init:function(){BI.ResizableTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.resizer=BI.createWidget({type:"bi.layout",cls:"resizable-table-resizer",invisible:!0,width:2}),this.regionResizerHandler=this._createResizerHandler(),this.table=BI.createWidget(b.el,{type:"bi.grid_table",element:this,width:b.width,height:b.height,headerRowSize:b.headerRowSize,rowSize:b.rowSize,columnSize:b.columnSize,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:BI.bind(this._mergeRule,this),header:this._formatHeader(b.header),items:b.items,regionColumnSize:b.regionColumnSize}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.regionResizerHandler,left:0,top:0,bottom:0},{el:this.resizer,left:0,top:0}]}),this._populate()},_mergeRule:function(a,b){var c=this.options;return"bi.resizable_table_cell"===a.type&&(a=a.cell),"bi.resizable_table_cell"===b.type&&(b=b.cell),c.mergeRule(a,b)},_createResizerHandler:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.absolute",cls:"resizable-table-region-resizer",invisible:!0,width:6,items:[{el:{type:"bi.layout",width:2,cls:"resizable-table-region-resizer-knob"},left:2,top:0,bottom:0}]}),d=0,e=0,f=0,g=!1,h=new BI.MouseMoveTracker(function(c,i){h.isDragging()&&(g=!0,e+=c,d=BI.clamp(f+e,15,b.width-15),a.regionResizerHandler.element.addClass("dragging"),a._setRegionResizerHandlerPosition(d-3,0))},function(){if(g===!0){if(b.regionColumnSize[0]=BI.clamp(d,15,b.width-15),a.table.setRegionColumnSize(b.regionColumnSize),b.isResizeAdapt===!0){var c=a._getFreezeColumnSize();b.columnSize[a._getFreezeColLength()-1]+=b.regionColumnSize[0]-c,a.table.setColumnSize(b.columnSize)}a.table.populate(),a._populate(),a.regionResizerHandler.element.removeClass("dragging"),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE),g=!1}h.releaseMouseMoves()},document);return c.element.on("mousedown",function(b){f=d=a._getRegionSize(),e=0,a._setResizerPosition(0,0),h.captureMouseMoves(b)}),c},_setResizerPosition:function(a,b){this.resizer.element.css({left:a+"px",top:b+"px"})},_setRegionResizerHandlerPosition:function(a,b){this.regionResizerHandler.element.css({left:a+"px",top:b+"px"})},_getRegionSize:function(){var a=this.options,b=a.regionColumnSize[0]||0;return a.isNeedFreeze===!1||0===a.freezeCols.length?0:(b||BI.each(a.freezeCols,function(c,d){b+=a.columnSize[d]}),b)},_getRegionRowSize:function(){var a=this.options;return[a.header.length*a.headerRowSize,Math.min(a.height-a.header.length*a.headerRowSize,a.items.length*a.rowSize)]},_getFreezeColLength:function(){return this.options.freezeCols.length},_getFreezeColumnSize:function(){for(var a=this.options.columnSize,b=0,c=0,d=this._getFreezeColLength();c<d;c++)b+=a[c];return b},_getResizerLeft:function(a){for(var b=0,c=this.options.columnSize,d=this._getFreezeColLength(),e=a>=d?d:0;e<a;e++)b+=c[e]||0;return a>=d?(b+=this.table.getRegionSize(),b-=this.table.getRightHorizontalScroll()):b-=this.table.getLeftHorizontalScroll(),b},_formatHeader:function(a){var b=this,c=this.options,d=[],e=function(a,d){b.resizer.setVisible(!0);var e=c.headerRowSize+b._getRegionRowSize()[1];b.resizer.setHeight(e),b._setResizerPosition(b._getResizerLeft(a)+d,(c.header.length-1)*c.headerRowSize)},f=function(a,d){b.resizer.setVisible(!1);var e=c.columnSize.slice();e[a]=d,c.columnSize=e,b.table.setColumnSize(e),b.table.populate(),b._populate(),b.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE)};return BI.each(a,function(g,h){g===a.length-1?(d[g]=[],BI.each(h,function(a,i){if(a===b._getFreezeColLength()-1||a===h.length-1)d[g][a]=i;else if(d[g][a]={type:"bi.resizable_table_cell",cell:i,suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},c.isNeedMerge)for(var j=g;j>0&&b._mergeRule(d[j][a],d[j-1][a]);)d[j-1][a]={type:"bi.resizable_table_cell",cell:d[j-1][a],suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},j--})):d.push(h)}),d},_populate:function(){var a=(this.options,this._getRegionSize());a>0?(this.regionResizerHandler.setVisible(!0),this._setRegionResizerHandlerPosition(a-3,0)):this.regionResizerHandler.setVisible(!1)},setWidth:function(a){BI.ResizableTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.ResizableTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.ResizableTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b){a&&(this.options.items=a),b&&(this.options.header=b,this.options.isNeedResize&&(b=this._formatHeader(b))),this.table.populate(a,b),this._populate()}}),BI.shortcut("bi.resizable_table",BI.ResizableTable),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId,value:e.value}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},getValue:function(){return this.tree?this.tree.getValue():[]},getAllButtons:function(){return this.tree?this.tree.getAllButtons():[]},getAllLeaves:function(){return this.tree?this.tree.getAllLeaves():[]},getNodeById:function(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d<e;d++)_init.afterA[d].apply(this,arguments)},getBeforeA:function(a,b,c){for(var d=0,e=_init.beforeA.length;d<e;d++)_init.beforeA[d].apply(this,arguments)},getInnerAfterA:function(a,b,c){for(var d=0,e=_init.innerAfterA.length;d<e;d++)_init.innerAfterA[d].apply(this,arguments)},getInnerBeforeA:function(a,b,c){for(var d=0,e=_init.innerBeforeA.length;d<e;d++)_init.innerBeforeA[d].apply(this,arguments)},getCache:function(a){return caches[a.treeId]},getNextNode:function(a,b){if(!b)return null;for(var c=a.data.key.children,d=b.parentTId?b.getParentNode():data.getRoot(a),e=0,f=d[c].length-1;e<=f;e++)if(d[c][e]===b)return e==f?null:d[c][e+1];return null},getNodeByParam:function(a,b,c,d){if(!b||!c)return null;for(var e=a.data.key.children,f=0,g=b.length;f<g;f++){if(b[f][c]==d)return b[f];var h=data.getNodeByParam(a,b[f][e],c,d);if(h)return h}return null},getNodeCache:function(a,b){if(!b)return null;var c=caches[a.treeId].nodes[data.getNodeCacheId(b)];return c?c:null},getNodeName:function(a,b){var c=a.data.key.name;return""+b[c]},getNodeTitle:function(a,b){var c=""===a.data.key.title?a.data.key.name:a.data.key.title;return""+b[c]},getNodes:function(a){return data.getRoot(a)[a.data.key.children]},getNodesByParam:function(a,b,c,d){if(!b||!c)return[];for(var e=a.data.key.children,f=[],g=0,h=b.length;g<h;g++)b[g][c]==d&&f.push(b[g]),f=f.concat(data.getNodesByParam(a,b[g][e],c,d));return f},getNodesByParamFuzzy:function(a,b,c,d){if(!b||!c)return[];var e=a.data.key.children,f=[];d=d.toLowerCase();for(var g=0,h=b.length;g<h;g++)"string"==typeof b[g][c]&&b[g][c].toLowerCase().indexOf(d)>-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h<i;h++){if(tools.apply(c,[b[h],e],!1)){if(d)return b[h];g.push(b[h])}var j=data.getNodesByFilter(a,b[h][f],c,d,e);if(d&&j)return j;g=d?j:g.concat(j)}return g},getPreNode:function(a,b){if(!b)return null;for(var c=a.data.key.children,d=b.parentTId?b.getParentNode():data.getRoot(a),e=0,f=d[c].length;e<f;e++)if(d[c][e]===b)return 0==e?null:d[c][e-1];return null},getRoot:function(a){return a?roots[a.treeId]:null},getRoots:function(){return roots},getSetting:function(a){return settings[a]},getSettings:function(){return settings},getZTreeTools:function(a){var b=this.getRoot(this.getSetting(a));return b?b.treeTools:null},initCache:function(a){for(var b=0,c=_init.caches.length;b<c;b++)_init.caches[b].apply(this,arguments)},initNode:function(a,b,c,d,e,f){for(var g=0,h=_init.nodes.length;g<h;g++)_init.nodes[g].apply(this,arguments)},initRoot:function(a){for(var b=0,c=_init.roots.length;b<c;b++)_init.roots[b].apply(this,arguments)},isSelectedNode:function(a,b){for(var c=data.getRoot(a),d=0,e=c.curSelectedList.length;d<e;d++)if(b===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(a,b){var c=a.data.key.children;if(b[c])for(var d=0,e=b[c].length;d<e;d++)arguments.callee(a,b[c][d]);data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=null},removeSelectedNode:function(a,b){for(var c=data.getRoot(a),d=0,e=c.curSelectedList.length;d<e;d++)b!==c.curSelectedList[d]&&data.getNodeCache(a,c.curSelectedList[d].tId)||(c.curSelectedList.splice(d,1),d--,e--)},setCache:function(a,b){caches[a.treeId]=b},setRoot:function(a,b){roots[a.treeId]=b},setZTreeTools:function(a,b){for(var c=0,d=_init.zTreeTools.length;c<d;c++)_init.zTreeTools[c].apply(this,arguments)},transformToArrayFormat:function(a,b){if(!b)return[];var c=a.data.key.children,d=[];if(tools.isArray(b))for(var e=0,f=b.length;e<f;e++)d.push(b[e]),b[e][c]&&(d=d.concat(data.transformToArrayFormat(a,b[e][c])));else d.push(b),b[c]&&(d=d.concat(data.transformToArrayFormat(a,b[c])));return d},transformTozTreeFormat:function(a,b){var c,d,e=a.data.simpleData.idKey,f=a.data.simpleData.pIdKey,g=a.data.key.children;if(!e||""==e||!b)return[];if(tools.isArray(b)){var h=[],i=[];for(c=0,d=b.length;c<d;c++)i[b[c][e]]=b[c];for(c=0,d=b.length;c<d;c++)i[b[c][f]]&&b[c][e]!=b[c][f]?(i[b[c][f]][g]||(i[b[c][f]][g]=[]),i[b[c][f]][g].push(b[c])):h.push(b[c]);return h}return[b]}},event={bindEvent:function(a){for(var b=0,c=_init.bind.length;b<c;b++)_init.bind[b].apply(this,arguments)},unbindEvent:function(a){for(var b=0,c=_init.unbind.length;b<c;b++)_init.unbind[b].apply(this,arguments)},bindTree:function(a){var b={treeId:a.treeId},c=a.treeObj;a.view.txtSelectedEnable||c.bind("selectstart",function(a){var b=a.originalEvent.srcElement.nodeName.toLowerCase();return"input"===b||"textarea"===b}).css({"-moz-user-select":"-moz-none"}),c.bind("click",b,event.proxy),c.bind("dblclick",b,event.proxy),c.bind("mouseover",b,event.proxy),c.bind("mouseout",b,event.proxy),c.bind("mousedown",b,event.proxy),c.bind("mouseup",b,event.proxy),c.bind("contextmenu",b,event.proxy)},unbindTree:function(a){var b=a.treeObj;b.unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(a){for(var b=[],c=0,d=_init.proxys.length;c<d;c++){var e=_init.proxys[c].apply(this,arguments);if(b.push(e),e.stop)break}return b},proxy:function(a){var b=data.getSetting(a.data.treeId);if(!tools.uCanDo(b,a))return!0;for(var c=event.doProxy(a),d=!0,e=!1,f=0,g=c.length;f<g;f++){var h=c[f];h.nodeEventCallback&&(e=!0,d=h.nodeEventCallback.apply(h,[a,h.node])&&d),h.treeEventCallback&&(e=!0,d=h.treeEventCallback.apply(h,[a,h.node])&&d)}return d}},handler={onSwitchNode:function(a,b){var c=data.getSetting(a.data.treeId);if(b.open){if(0==tools.apply(c.callback.beforeCollapse,[c.treeId,b],!0))return!0;data.getRoot(c).expandTriggerFlag=!0,view.switchNode(c,b)}else{if(0==tools.apply(c.callback.beforeExpand,[c.treeId,b],!0))return!0;data.getRoot(c).expandTriggerFlag=!0,view.switchNode(c,b)}return!0},onClickNode:function(a,b){var c=data.getSetting(a.data.treeId),d=c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&data.isSelectedNode(c,b)?0:c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&c.view.selectedMulti?2:1;return 0==tools.apply(c.callback.beforeClick,[c.treeId,b,d],!0)||(0===d?view.cancelPreSelectedNode(c,b):view.selectNode(c,b,2===d), +c.treeObj.trigger(consts.event.CLICK,[a,c.treeId,b,d]),!0)},onZTreeMousedown:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeMouseDown,[c.treeId,b],!0)&&tools.apply(c.callback.onMouseDown,[a,c.treeId,b]),!0},onZTreeMouseup:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeMouseUp,[c.treeId,b],!0)&&tools.apply(c.callback.onMouseUp,[a,c.treeId,b]),!0},onZTreeDblclick:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeDblClick,[c.treeId,b],!0)&&tools.apply(c.callback.onDblClick,[a,c.treeId,b]),!0},onZTreeContextmenu:function(a,b){var c=data.getSetting(a.data.treeId);return tools.apply(c.callback.beforeRightClick,[c.treeId,b],!0)&&tools.apply(c.callback.onRightClick,[a,c.treeId,b]),"function"!=typeof c.callback.onRightClick}},tools={apply:function(a,b,c){return"function"==typeof a?a.apply(zt,b?b:[]):c},canAsync:function(a,b){var c=a.data.key.children;return a.async.enable&&b&&b.isParent&&!(b.zAsync||b[c]&&b[c].length>0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d<e;d++)if(tools.eqs(b.tagName,c[d].tagName)&&null!==b.getAttribute(c[d].attrName))return b;b=b.parentNode}return null},getNodeMainDom:function(a){return $(a).parent("li").get(0)||$(a).parentsUntil("li").parent().get(0)},isChildOrSelf:function(a,b){return $(a).closest("#"+b).length>0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i<j;i++){var k=c[i];if(e){var l=d?d:data.getRoot(a),m=l[h],n=m.length==c.length&&0==i,o=i==c.length-1;data.initNode(a,b,k,d,n,o,f),data.addNodeCache(a,k)}var p=[];k[h]&&k[h].length>0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i<l;i++){var pKey=setting.async.autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i<l;i+=2)tmpParam[setting.async.otherParam[i]]=setting.async.otherParam[i+1];else for(var p in setting.async.otherParam)tmpParam[p]=setting.async.otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:tmpParam,dataType:setting.async.dataType,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(err){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(a,b,c){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,a,b,c]))}}),!0},cancelPreSelectedNode:function(a,b,c){var d,e,f=data.getRoot(a).curSelectedList;for(d=f.length-1;d>=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k<l;k++)h[k]&&view.expandCollapseSonNode(a,h[k],c,i);data.getRoot(a).expandTriggerFlag=j,view.expandCollapseNode(a,b,c,d,e)},isSelectedNode:function(a,b){if(!b)return!1;var c,d=data.getRoot(a).curSelectedList;for(c=d.length-1;c>=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push("<span id='",c.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(b,c),"' style='",view.makeNodeIcoStyle(b,c),"'></span><span id='",c.tId,consts.id.SPAN,"'>",e,"</span>")},makeDOMNodeLine:function(a,b,c){a.push("<span id='",c.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(b,c),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(a,b,c){a.push("</li>")},makeDOMNodeMainBefore:function(a,b,c){a.push("<li id='",c.tId,"' class='",consts.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(a,b,c){a.push("</a>")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("<a id='",c.tId,consts.id.A,"' class='",consts.className.LEVEL,c.level,"' treeNode",consts.id.A,' onclick="',c.click||"",'" ',null!=e&&e.length>0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("<ul id='",b.tId,consts.id.UL,"' class='",consts.className.LEVEL,b.level," ",view.makeUlLineClass(a,b),"' style='display:",b.open?"block":"none","'>"),c.push(d),c.push("</ul>")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e<f;e++)data.removeNodeCache(a,d[e]);if(data.removeSelectedNode(a),delete b[c],a.data.keep.parent)$$(b,consts.id.UL,a).empty();else{b.isParent=!1,b.open=!1;var g=$$(b,consts.id.SWITCH,a),h=$$(b,consts.id.ICON,a);view.replaceSwitchClass(b,g,consts.folder.DOCU),view.replaceIcoClass(b,h,consts.folder.DOCU),$$(b,consts.id.UL,a).remove()}}}},setFirstNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f<g;f++)if(e[d][f].tId==b.tId){e[d].splice(f,1);break}view.setFirstNode(a,e),view.setLastNode(a,e);var h,i,j,k=e[d].length;if(a.data.keep.parent||0!=k){if(a.view.showLine&&k>0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e<f;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=data.getRoot(d).curSelectedList,c=0,e=b.length;c<e;c++)a.push(b[c]);return a},isSelectedNode:function(a){return data.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var e=!a;if(e&&(a=data.getRoot(d)),"refresh"==b){for(var f=this.setting.data.key.children,g=0,h=a[f]?a[f].length:0;g<h;g++)data.removeNodeCache(d,a[f][g]);if(data.removeSelectedNode(d),a[f]=[],e)this.setting.treeObj.empty();else{var i=$$(a,consts.id.UL,d);i.empty()}}view.asyncNode(this.setting,e?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=data.getRoot(d),b=a[d.data.key.children];data.initRoot(d),a[d.data.key.children]=b,data.initCache(d),view.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=d.data.key.children,c=a[b];return view.removeChildNodes(d,a),c?c:null},removeNode:function(a,b){a&&(b=!!b,b&&0==tools.apply(d.callback.beforeRemove,[d.treeId,a],!0)||(view.removeNode(d,a),b&&this.setting.treeObj.trigger(consts.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&tools.uCanDo(d)){if(b=d.view.selectedMulti&&b,a.parentTId)view.expandCollapseParentNode(d,a.getParentNode(),!0,!1,function(){try{$$(a,d).focus().blur()}catch(b){}});else try{$$(a,d).focus().blur()}catch(c){}view.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return data.transformTozTreeFormat(d,a)},transformToArray:function(a){return data.transformToArrayFormat(d,a)},updateNode:function(a,b){if(a){var c=$$(a,d);c.get(0)&&tools.uCanDo(d)&&(view.setNodeName(d,a),view.setNodeTarget(d,a),view.setNodeUrl(d,a),view.setNodeLineIcos(d,a),view.setNodeFontCss(d,a))}}};return e.treeTools=g,data.setZTreeTools(d,g),e[f]&&e[f].length>0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push("<span ID='",b.tId,t.id.CHECK,"' class='",u.makeChkClass(a,b),"' treeNode",t.id.CHECK,b.nocheck===!0?" style='display:none;'":"","></span>"))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c<d;c++)v.getNodeCache(a,b[c].tId)||(b.splice(c,1),c--,d--);return b},getCheckStatus:function(a,b){if(!a.check.enable||b.nocheck||b.chkDisabled)return null;var c=a.data.key.checked,d={checked:b[c],half:b.halfCheck?b.halfCheck:a.check.chkStyle==t.radio.STYLE?2===b.check_Child_State:b[c]?b.check_Child_State>-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h<i&&(b[h].nocheck===!0||b[h].chkDisabled===!0||b[h][f]!=c||(d.push(b[h]),!g))&&(v.getTreeCheckedNodes(a,b[h][e],c,d),!(g&&d.length>0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f<g;f++)b[f].nocheck!==!0&&b[f].chkDisabled!==!0&&b[f][e]!=b[f].checkedOld&&c.push(b[f]),v.getTreeChangeCheckedNodes(a,b[f][d],c);return c},makeChkFlag:function(a,b){if(b){var c=a.data.key.children,d=a.data.key.checked,e=-1;if(b[c])for(var f=0,g=b[c].length;f<g;f++){var h=b[c][f],i=-1;if(a.check.chkStyle==t.radio.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?2:h[d]?2:h.check_Child_State>0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d<e;d++)c=j[f][d],c[g]&&c!=b&&(c[g]=!1,u.setChkClass(a,w(c,t.id.CHECK,a),c))}else if(a.check.radioType==h.TYPE_ALL)for(d=0,e=i.length;d<e;d++)if(b==i[d]){i.splice(d,1);break}}else b[g]&&(!b[f]||0==b[f].length||a.check.chkboxType.Y.indexOf("s")>-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f="";f=b.chkDisabled===!0?d.DISABLED:b.halfCheck?d.PART:a.check.chkStyle==e.STYLE?b.check_Child_State<1?d.FULL:d.PART:b[c]?2===b.check_Child_State||b.check_Child_State===-1?d.FULL:d.PART:b.check_Child_State<1?d.FULL:d.PART;var g=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+f;return g=b.check_Focus&&b.chkDisabled!==!0?g+"_"+d.FOCUS:g,t.className.BUTTON+" "+d.DEFAULT+" "+g},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f<g;f++){var h=e[d][f];h.nocheck!==!0&&h.chkDisabled!==!0&&(h[c]=b),u.setSonNodeCheckBox(a,h,b)}},repairChkClass:function(a,b){if(b&&(v.makeChkFlag(a,b),b.nocheck!==!0)){var c=w(b,t.id.CHECK,a);u.setChkClass(a,c,b)}},repairParentChkClass:function(a,b){if(b&&b.parentTId){var c=b.getParentNode();u.repairChkClass(a,c),u.repairParentChkClass(a,c)}},repairParentChkClassWithSelf:function(a,b){if(b){var c=a.data.key.children;b[c]&&b[c].length>0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f<g;f++){var h=b[e][f];u.repairSonChkDisabled(a,h,c,d)}}},repairParentChkDisabled:function(a,b,c,d){b&&(b.chkDisabled!=c&&d&&(b.chkDisabled=c),u.repairChkClass(a,b),u.repairParentChkDisabled(a,b.getParentNode(),c,d))},setChkClass:function(a,b,c){b&&(c.nocheck===!0?b.hide():b.show(),b.attr("class",u.makeChkClass(a,c)))},setParentNodeCheckBox:function(a,b,c,d){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);if(d||(d=b),v.makeChkFlag(a,b),b.nocheck!==!0&&b.chkDisabled!==!0&&(b[f]=c,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b])),b.parentTId){var h=!0;if(!c)for(var i=b.getParentNode()[e],j=0,k=i.length;j<k;j++)if(i[j].nocheck!==!0&&i[j].chkDisabled!==!0&&i[j][f]||(i[j].nocheck===!0||i[j].chkDisabled===!0)&&i[j].check_Child_State>0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i<j&&b.chkDisabled!==!0;i++){var k=b[e][i];u.setSonNodeCheckBox(a,k,c,d),k.chkDisabled===!0&&(h=!0)}b!=v.getRoot(a)&&b.chkDisabled!==!0&&(h&&b.nocheck!==!0&&v.makeChkFlag(a,b),b.nocheck!==!0&&b.chkDisabled!==!0?(b[f]=c,h||(b.check_Child_State=b[e]&&b[e].length>0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-icon-change-button",iconClass:"",iconWidth:null,iconHeight:null,stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.IconChangeButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconClass,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()}, +setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconClass!==a&&(this.element.removeClass(b.iconClass).addClass(a),b.iconClass=a)}}),BI.IconChangeButton.EVENT_CHANGE="IconChangeButton.EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})},_init:function(){BI.HalfIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.HalfIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfIconButton.EVENT_CHANGE)}}),BI.HalfIconButton.EVENT_CHANGE="HalfIconButton.EVENT_CHANGE",BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})},_init:function(){BI.TriggerIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.TriggerIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE,this)}}),BI.TriggerIconButton.EVENT_CHANGE="TriggerIconButton.EVENT_CHANGE",BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:25,logic:{dynamic:!1}})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MultiSelectItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconClass:"",hgap:10,height:25})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconClass,once:b.once,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem),BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:25,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.single_select_item",BI.SingleSelectItem),BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item bi-list-item-active",logic:{dynamic:!1},hgap:10,height:25})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(!a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected())},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){var a=this,b=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_tree_group_node_checkbox",iconWidth:13,iconHeight:13}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setValue:function(a){this.text.setValue(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.FirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_group_node_checkbox",width:23,stopPropagation:!0});var c=BI.createWidget({type:"bi.center_adapt",cls:b.iconCls,width:23,items:[{type:"bi.icon",height:b.iconHeight,width:b.iconWidth}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},{width:23,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MidPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-icon-arrow-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.MultiLayerIconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.PlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.PlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.TriangleGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TriangleGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-triangle-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.TriangleGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({iconWidth:13,iconHeight:13,type:"bi.tree_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.TriangleGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setOpened:function(a){BI.TriangleGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)},setText:function(a){BI.TriangleGroupNode.superclass.setText.apply(this,arguments),this.text.setText(a)}}),BI.shortcut("bi.triangle_group_node",BI.TriangleGroupNode),BI.FirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.FirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),BI.IconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},height:25,iconWidth:16,iconHeight:16,iconCls:""})},_init:function(){BI.IconTreeLeafItem.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:23,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:23,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),BI.LastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.LastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),BI.MidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.MidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),BI.MultiLayerIconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-icon-tree-leaf-item bi-list-item-active",layer:0,height:25,iconCls:"",iconHeight:14,iconWidth:12})},_init:function(){BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),BI.TreeTextLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tree-text-leaf-item bi-list-item-active",id:"",pId:"",height:25,hgap:0,lgap:0,rgap:0})},_init:function(){BI.TreeTextLeafItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.py}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text}]})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.tree_text_leaf_item",BI.TreeTextLeafItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:7,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=new Date,g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=Date._MD.slice(0);i[1]=Date.isLeap(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay(),e.PDay=i[0===b?11:b-1]-e.FDay+1,e.NDay=1;var j=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a<e.FDay?(c.lastMonth=!0,b=a+e.PDay,1===f&&(d-=1),f=1===f?12:f-1):a>=e.FDay&&a<e.FDay+i[e.ymd[1]]?(b=a-e.FDay+1,a-e.FDay+1===e.ymd[2]&&(c.currentDay=!0)):(c.nextMonth=!0,b=e.NDay++,12===f&&(d+=1),f=12===f?1:f+1),Date.checkVoid(d,f,b,g,h)[0]&&(c.disabled=!0),c.text=b,j.push(c)}),j},_init:function(){BI.Calendar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=BI.map(Date._SDN.slice(0,7),function(a,b){return{type:"bi.label",height:25,text:b}}),d=BI.createWidget({type:"bi.button_group",height:25,items:c}),e=this._dateCreator(b.year,b.month,b.day);c=[],c.push(e.slice(0,7)),c.push(e.slice(7,14)),c.push(e.slice(14,21)),c.push(e.slice(21,28)),c.push(e.slice(28,35)),c.push(e.slice(35,42)),c=BI.map(c,function(a,c){return BI.map(c,function(a,c){return BI.extend(c,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:25,value:b.year+"-"+b.month+"-"+c.text,disabled:c.lastMonth||c.nextMonth||c.disabled})})}),this.days=BI.createWidget({type:"bi.button_group",items:BI.createItems(c,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:7,rows:6,columnSize:[1/7,1/7,1/7,1/7,1/7,1/7,1/7],rowSize:25}))]}),this.days.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",d,this.days)}))))},isFrontDate:function(){var a=this.options,b=(this._const,a.year),c=a.month,d=new Date,e=d.getDay();b=0|b,d.setFullYear(b,c,1);var f=d.getOffsetDate(-1*(e+1));return!!Date.checkVoid(f.getFullYear(),f.getMonth(),f.getDate(),a.min,a.max)[0]},isFinalDate:function(){var a=this.options,b=(this._const,a.year),c=a.month,d=new Date,e=d.getDay();b=0|b,d.setFullYear(b,c,1);var f=d.getOffsetDate(42-e);return!!Date.checkVoid(f.getFullYear(),f.getMonth(),f.getDate(),a.min,a.max)[0]},setValue:function(a){this.days.setValue([a.year+"-"+a.month+"-"+a.day])},getValue:function(){var a=this.days.getValue()[0].match(/\d+/g);return{year:0|a[0],month:0|a[1],day:0|a[2]}}}),BI.extend(BI.Calendar,{getPageByDateJSON:function(a){var b=(new Date).getFullYear(),c=(new Date).getMonth(),d=12*(a.year-b);return d+=a.month-c},getDateJSONByPage:function(a){var b=(new Date).getMonth(),c=a;c+=b;var d=BI.parseInt(c/12);c<0&&c%12!==0&&d--;var e=c>=0?c%12:(12+c%12)%12;return{year:(new Date).getFullYear()+d, +month:e}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[];return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var e={};Date.checkVoid(c+a,1,1,b.min,b.max)[0]&&(e.disabled=!0),e.text=c+a,d.push(e)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=(new Date).getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:23,width:38,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!Date.checkVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!Date.checkVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=(new Date).getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL},getPageByYear:function(a){var b=(new Date).getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),BI.ComplexCanvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-complex-canvas"})},_init:function(){BI.ComplexCanvas.superclass._init.apply(this,arguments);var a=this.options;this.canvas=BI.createWidget({type:"bi.canvas",element:this,width:a.width,height:a.height})},branch:function(a,b,c,d,e,f){var g=this,h=[].slice.call(arguments);if(h.length<=5)return this.canvas.line.apply(this.canvas,arguments);var i;BI.isOdd(h.length)&&(i=BI.last(h),h=BI.initial(h)),h=[].slice.call(h,2);var j=BI.filter(h,function(a){return a%2===0}),k=BI.filter(h,function(a){return a%2!==0});i||(i={});var l=i.offset||20;if(b>d&&b>f||b<d&&b<f){if(b>d&&b>f)var m=Math.max.apply(this,k)+l;else var m=Math.min.apply(this,k)-l;var n=Math.min.apply(this,j),o=BI.indexOf(j,n),p=Math.max.apply(this,j),q=BI.indexOf(j,p);return this.canvas.line(n,k[o],n,m,p,m,p,k[q],i),BI.each(j,function(a,b){a!==q&&a!==o&&g.canvas.line(b,k[a],b,m,i)}),void this.canvas.line(a,m,a,b,i)}if(a>c&&a>e||a<c&&a<e){if(a>c&&a>e)var r=Math.max.apply(this,j)+l;else var r=Math.min.apply(this,j)-l;var s=Math.min.apply(this,k),t=BI.indexOf(k,s),u=Math.max.apply(this,k),v=BI.indexOf(k,u);return this.canvas.line(j[t],s,r,s,r,u,j[v],u,i),BI.each(k,function(a,b){a!==t&&a!==v&&g.canvas.line(j[a],b,r,b,i)}),void this.canvas.line(r,b,a,b,i)}},stroke:function(a){this.canvas.stroke(a)}}),BI.shortcut("bi.complex_canvas",BI.ComplexCanvas),BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-tree-group-node",iconWidth:13,iconHeight:13})},_init:function(){BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"):this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font")}}),BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font",iconWidth:13,iconHeight:13})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:25,iconHeight:25})},_init:function(){BI.FirstTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:25,iconHeight:25})},_init:function(){BI.LastTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:25,iconHeight:25})},_init:function(){BI.MidTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),BI.TreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-node-triangle-collapse-font",iconWidth:13,iconHeight:13})},_init:function(){BI.TreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"):this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font")}}),BI.shortcut("bi.tree_group_node_checkbox",BI.TreeGroupNodeCheckbox),BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:25,iconHeight:25})},_init:function(){BI.TreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox);try{!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Clipboard=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b){for(;a&&a.nodeType!==e;){if(a.matches(b))return a;a=a.parentNode}}var e=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var f=Element.prototype;f.matches=f.matchesSelector||f.mozMatchesSelector||f.msMatchesSelector||f.oMatchesSelector||f.webkitMatchesSelector}b.exports=d},{}],2:[function(a,b,c){function d(a,b,c,d,f){var g=e.apply(this,arguments);return a.addEventListener(c,g,f),{destroy:function(){a.removeEventListener(c,g,f)}}}function e(a,b,c,d){return function(c){c.delegateTarget=f(c.target,b),c.delegateTarget&&d.call(a,c)}}var f=a("./closest");b.exports=d},{"./closest":1}],3:[function(a,b,c){c.node=function(a){return void 0!==a&&a instanceof HTMLElement&&1===a.nodeType},c.nodeList=function(a){var b=Object.prototype.toString.call(a);return void 0!==a&&("[object NodeList]"===b||"[object HTMLCollection]"===b)&&"length"in a&&(0===a.length||c.node(a[0]))},c.string=function(a){return"string"==typeof a||a instanceof String},c.fn=function(a){var b=Object.prototype.toString.call(a);return"[object Function]"===b}},{}],4:[function(a,b,c){function d(a,b,c){if(!a&&!b&&!c)throw new Error("Missing required arguments");if(!h.string(b))throw new TypeError("Second argument must be a String");if(!h.fn(c))throw new TypeError("Third argument must be a Function");if(h.node(a))return e(a,b,c);if(h.nodeList(a))return f(a,b,c);if(h.string(a))return g(a,b,c);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function e(a,b,c){return a.addEventListener(b,c),{destroy:function(){a.removeEventListener(b,c)}}}function f(a,b,c){return Array.prototype.forEach.call(a,function(a){a.addEventListener(b,c)}),{destroy:function(){Array.prototype.forEach.call(a,function(a){a.removeEventListener(b,c)})}}}function g(a,b,c){return i(document.body,a,b,c)}var h=a("./is"),i=a("delegate");b.exports=d},{"./is":3,delegate:2}],5:[function(a,b,c){function d(a){var b;if("SELECT"===a.nodeName)a.focus(),b=a.value;else if("INPUT"===a.nodeName||"TEXTAREA"===a.nodeName){var c=a.hasAttribute("readonly");c||a.setAttribute("readonly",""),a.select(),a.setSelectionRange(0,a.value.length),c||a.removeAttribute("readonly"),b=a.value}else{a.hasAttribute("contenteditable")&&a.focus();var d=window.getSelection(),e=document.createRange();e.selectNodeContents(a),d.removeAllRanges(),d.addRange(e),b=d.toString()}return b}b.exports=d},{}],6:[function(a,b,c){function d(){}d.prototype={on:function(a,b,c){var d=this.e||(this.e={});return(d[a]||(d[a]=[])).push({fn:b,ctx:c}),this},once:function(a,b,c){function d(){e.off(a,d),b.apply(c,arguments)}var e=this;return d._=b,this.on(a,d,c)},emit:function(a){var b=[].slice.call(arguments,1),c=((this.e||(this.e={}))[a]||[]).slice(),d=0,e=c.length;for(d;d<e;d++)c[d].fn.apply(c[d].ctx,b);return this},off:function(a,b){var c=this.e||(this.e={}),d=c[a],e=[];if(d&&b)for(var f=0,g=d.length;f<g;f++)d[f].fn!==b&&d[f].fn._!==b&&e.push(d[f]);return e.length?c[a]=e:delete c[a],this}},b.exports=d},{}],7:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","select"],f);else if("undefined"!=typeof d)f(c,b("select"));else{var g={exports:{}};f(g,e.select),e.clipboardAction=g.exports}}(this,function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=c(b),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(){function a(b){d(this,a),this.resolveOptions(b),this.initSelection()}return g(a,[{key:"resolveOptions",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=a.action,this.emitter=a.emitter,this.target=a.target,this.text=a.text,this.trigger=a.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var a=this,b="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return a.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[b?"right":"left"]="-9999px";var c=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=c+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,e["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,e["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var a=void 0;try{a=document.execCommand(this.action)}catch(b){a=!1}this.handleResult(a)}},{key:"handleResult",value:function(a){this.emitter.emit(a?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=a,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==("undefined"==typeof a?"undefined":f(a))||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}]),a}();a.exports=h})},{select:5}],8:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","./clipboard-action","tiny-emitter","good-listener"],f);else if("undefined"!=typeof d)f(c,b("./clipboard-action"),b("tiny-emitter"),b("good-listener"));else{var g={exports:{}};f(g,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=g.exports}}(this,function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c="data-clipboard-"+a;if(b.hasAttribute(c))return b.getAttribute(c)}var j=e(b),k=e(c),l=e(d),m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return d.resolveOptions(c),d.listenClick(a),d}return h(b,a),m(b,[{key:"resolveOptions",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof a.action?a.action:this.defaultAction,this.target="function"==typeof a.target?a.target:this.defaultTarget,this.text="function"==typeof a.text?a.text:this.defaultText}},{key:"listenClick",value:function(a){var b=this;this.listener=(0,l["default"])(a,"click",function(a){return b.onClick(a)})}},{key:"onClick",value:function(a){var b=a.delegateTarget||a.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new j["default"]({action:this.action(b),target:this.target(b),text:this.text(b),trigger:b,emitter:this})}},{key:"defaultAction",value:function(a){return i("action",a)}},{key:"defaultTarget",value:function(a){var b=i("target",a);if(b)return document.querySelector(b)}},{key:"defaultText",value:function(a){return i("text",a)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],b="string"==typeof a?[a]:a,c=!!document.queryCommandSupported;return b.forEach(function(a){c=c&&!!document.queryCommandSupported(a)}),c}}]),b}(k["default"]);a.exports=n})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)})}catch(e){!function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var c=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof c.copy||a.isFunction(c.copy))){ZeroClipboard.setMoviePath(c.path);var d=new ZeroClipboard.Client;a.isFunction(c.copy)&&b.bind("zClip_copy",c.copy),a.isFunction(c.beforeCopy)&&b.bind("zClip_beforeCopy",c.beforeCopy),a.isFunction(c.afterCopy)&&b.bind("zClip_afterCopy",c.afterCopy),d.setHandCursor(c.setHandCursor),d.setCSSEffects(c.setCSSEffects),d.addEventListener("mouseOver",function(a){b.trigger("mouseenter")}),d.addEventListener("mouseOut",function(a){b.trigger("mouseleave")}),d.addEventListener("mouseDown",function(e){b.trigger("mousedown"),a.isFunction(c.copy)?d.setText(b.triggerHandler("zClip_copy")):d.setText(c.copy),a.isFunction(c.beforeCopy)&&b.trigger("zClip_beforeCopy")}),d.addEventListener("complete",function(d,e){a.isFunction(c.afterCopy)?b.trigger("zClip_afterCopy"):(e.length>500&&(e=e.substr(0,500)+"...\n\n("+(e.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+e)),c.clickAfter&&b.trigger("click")}),d.glue(b[0],b.parent()[0]),a(window).bind("load resize",function(){d.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),e=a("#"+d+".zclip");"remove"==b?(e.remove(),c.removeClass("active hover")):"hide"==b?(e.hide(),c.removeClass("active hover")):"show"==b&&e.show()})}}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a),this.className+=" "+a},a.removeClass=function(a){for(var b=this.className.split(/\s+/),c=-1,d=0;d<b.length;d++)b[d]==a&&(c=d,d=b.length);return c>-1&&(b.splice(c,1),this.className=b.join(" ")),this},a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}),a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){var d=this.clients[a];d&&d.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var c={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};return a&&a!=b&&(c.left+=a.offsetLeft,c.top+=a.offsetTop),c},Client:function(a){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,c){this.domElement=ZeroClipboard.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1),"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var e=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div"),this.div.className="zclip",this.div.id="zclip-"+this.movieId,$(this.domElement).data("zclipId","zclip-"+this.movieId);var f=this.div.style;if(f.position="absolute",f.left=""+e.left+"px",f.top=""+e.top+"px",f.width=""+e.width+"px",f.height=""+e.height+"px",f.zIndex=d,"object"==typeof c)for(addedStyle in c)f[addedStyle]=c[addedStyle];b.appendChild(this.div),this.div.innerHTML=this.getHTML(e.width,e.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>'}else c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null,this.div=null}},reposition:function(a){if(a&&(this.domElement=ZeroClipboard.$(a),this.domElement||this.hide()),this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement),c=this.div.style;c.left=""+b.left+"px",c.top=""+b.top+"px"}},setText:function(a){this.clipText=a,this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=[]),this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a,this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){switch(a=a.toString().toLowerCase().replace(/^on/,"")){case"load":if(this.movie=document.getElementById(this.movieId),!this.movie){var c=this;return void setTimeout(function(){c.receiveEvent("load",null)},1)}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;return setTimeout(function(){c.receiveEvent("load",null)},100),void(this.ready=!0)}this.ready=!0;try{this.movie.setText(this.clipText)}catch(d){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(d){}break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var e=0,f=this.handlers[a].length;e<f;e++){var g=this.handlers[a][e];"function"==typeof g?g(this,b):"object"==typeof g&&2==g.length?g[0][g[1]](this,b):"string"==typeof g&&window[g](this,b)}}}}BI.ClipBoard=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-clipboard",copy:BI.emptyFn,afterCopy:BI.emptyFn})},_init:function(){BI.ClipBoard.superclass._init.apply(this,arguments)},mounted:function(){var a=this.options;window.Clipboard?(this.clipboard=new Clipboard(this.element[0],{text:function(){return BI.isFunction(a.copy)?a.copy():a.copy}}),this.clipboard.on("success",a.afterCopy)):this.element.zclip({path:BI.resourceURL+"/ZeroClipboard.swf",copy:a.copy,beforeCopy:a.beforeCopy,afterCopy:a.afterCopy})},destroyed:function(){this.clipboard&&this.clipboard.destroy()}}),BI.shortcut("bi.clipboard",BI.ClipBoard),BI.CustomColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-color-chooser",width:227,height:245})},_init:function(){BI.CustomColorChooser.superclass._init.apply(this,arguments);var a=this;this.editor=BI.createWidget({type:"bi.color_picker_editor",width:195}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.setValue(this.getValue())}),BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.absolute",items:[{el:this.editor,left:15,top:10,right:15}],height:30},{type:"bi.absolute",items:[{el:this.farbtastic,left:15,right:15,top:10}],height:215}]})},setValue:function(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="CustomColorChooser.EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",el:{}})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.color_chooser_trigger",width:b.width,height:b.height},b.el)),this.colorPicker=BI.createWidget({type:"bi.color_chooser_popup"}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:1,el:this.trigger,popup:{el:this.colorPicker,stopPropagation:!1,minWidth:202}});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b);var c=BI.string2Array(BI.Cache.getItem("colors")||""),d=new BI.Queue(8);d.fromArray(c),d.remove(b),d.unshift(b),BI.Cache.setItem("colors",BI.array2String(d.toArray()))};this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){c()}),this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){c(),a.combo.hideView()}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors")||""))}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.colorPicker.getValue()}}),BI.ColorChooser.EVENT_CHANGE="ColorChooser.EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser-popup",height:145})},_init:function(){BI.ColorChooserPopup.superclass._init.apply(this,arguments);var a=this;this.options;this.colorEditor=BI.createWidget({type:"bi.color_picker_editor"}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,arguments)}),this.storeColors=BI.createWidget({type:"bi.color_picker",items:[[{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0},{value:"",disabled:!0}]],width:190,height:25}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:190,height:50}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser"});var b=BI.createWidget({type:"bi.popup_panel",buttons:[BI.i18nText("BI-Basic_Cancel"),BI.i18nText("BI-Basic_Save")],title:BI.i18nText("BI-Custom_Color"),el:this.customColorChooser,stopPropagation:!1,bgap:-1,rgap:1,lgap:1,minWidth:227});this.more=BI.createWidget({type:"bi.combo",direction:"right,top",isNeedAdjustHeight:!1,el:{type:"bi.text_item",cls:"color-chooser-popup-more bi-list-item",textAlign:"center",height:20,text:BI.i18nText("BI-Basic_More")+"..."},popup:b}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),b.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a.more.hideView(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:{type:"bi.absolute",cls:"bi-background bi-border-bottom",items:[{el:this.colorEditor,left:0,right:0,top:5}]},height:30},{el:{type:"bi.absolute",items:[{el:this.storeColors,left:5,right:5,top:5}]},height:30},{el:{type:"bi.absolute",items:[{el:this.colorPicker,left:5,right:5,top:5}]},height:65},{el:this.more,height:20}]})},setStoreColors:function(a){if(BI.isArray(a)){var b=BI.map(a,function(a,b){return{value:b}});BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),this.storeColors.populate([b])}},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},getValue:function(){return this.colorEditor.getValue()}}),BI.ColorChooserPopup.EVENT_VALUE_CHANGE="ColorChooserPopup.EVENT_VALUE_CHANGE",BI.ColorChooserPopup.EVENT_CHANGE="ColorChooserPopup.EVENT_CHANGE", +BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger",height:30})},_init:function(){BI.ColorChooserTrigger.superclass._init.apply(this,arguments),this.colorContainer=BI.createWidget({type:"bi.layout",cls:"bi-card color-chooser-trigger-content"});var a=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:a,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="ColorChooserTrigger.EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="ColorPickerButton.EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),BI.ColorPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker",items:null})},_items:[[{value:"#ffffff"},{value:"#f2f2f2"},{value:"#e5e5e5"},{value:"#d9d9d9"},{value:"#cccccc"},{value:"#bfbfbf"},{value:"#b2b2b2"},{value:"#a6a6a6"},{value:"#999999"},{value:"#8c8c8c"},{value:"#808080"},{value:"#737373"},{value:"#666666"},{value:"#4d4d4d"},{value:"#333333"},{value:"#000000"}],[{value:"#d8b5a6"},{value:"#ff9e9a"},{value:"#ffc17d"},{value:"#f5e56b"},{value:"#d8e698"},{value:"#e0ebaf"},{value:"#c3d825"},{value:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{value:"#a0d8ef"},{value:"#89c3eb"},{value:"#bbc8e6"},{value:"#bbbcde"},{value:"#d6b4cc"},{value:"#fbc0d3"}],[{value:"#bb9581"},{value:"#f37d79"},{value:"#fba74f"},{value:"#ffdb4f"},{value:"#c7dc68"},{value:"#b0ca71"},{value:"#99ab4e"},{value:"#84b9cb"},{value:"#00a3af"},{value:"#2ca9e1"},{value:"#0095d9"},{value:"#4c6cb3"},{value:"#8491c3"},{value:"#a59aca"},{value:"#cc7eb1"},{value:"#e89bb4"}],[{value:"#9d775f"},{value:"#dd4b4b"},{value:"#ef8b07"},{value:"#fcc800"},{value:"#aacf53"},{value:"#82ae46"},{value:"#69821b"},{value:"#59b9c6"},{value:"#2a83a2"},{value:"#007bbb"},{value:"#19448e"},{value:"#274a78"},{value:"#4a488e"},{value:"#7058a3"},{value:"#884898"},{value:"#d47596"}]],_init:function(){BI.ColorPicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}]}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="ColorPicker.EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),BI.ColorPickerEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",width:200,height:20})},_init:function(){BI.ColorPickerEditor.superclass._init.apply(this,arguments);var a=this;this.options;this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card",height:20});var b=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:10,height:20})),c=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},d=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:c,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:32,height:20});BI.each(d,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=d[0],this.G=d[1],this.B=d[2],this.none=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("transparent")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.colorShow,width:"fill"},{el:b[0],lgap:10,width:16},{el:this.R,width:32},{el:b[1],lgap:10,width:16},{el:this.G,width:32},{el:b[2],lgap:10,width:16},{el:this.B,width:32},{el:{type:"bi.center_adapt",items:[this.none]},width:18},{el:{type:"bi.center_adapt",items:[this.transparent]},width:18}]})},setValue:function(a){if("transparent"===a)return this.transparent.setSelected(!0),this.none.setSelected(!1),this.R.setValue(""),this.G.setValue(""),void this.B.setValue("");a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this.colorShow.element.css("background-color",a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.b)},getValue:function(){return this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.ColorPickerEditor.EVENT_CHANGE="ColorPickerEditor.EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor),BI.Farbtastic=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-farbtastic",width:195,height:195})},_init:function(){BI.Farbtastic.superclass._init.apply(this,arguments)},mounted:function(){var a=this;this.farbtastic=$.farbtastic(this.element,function(b){a.fireEvent(BI.Farbtastic.EVENT_CHANGE,a.getValue(),a)})},setValue:function(a){this.farbtastic.setColor(a)},getValue:function(){return this.farbtastic.color}}),BI.Farbtastic.EVENT_CHANGE="Farbtastic.EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),jQuery.fn.farbtastic=function(a){return $.farbtastic(this,a),this},jQuery.farbtastic=function(a,b){var a=$(a).get(0);return a.farbtastic||(a.farbtastic=new jQuery._farbtastic(a,b))},jQuery._farbtastic=function(a,b){var c=this;$(a).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var d=$(".farbtastic",a);c.wheel=$(".wheel",a).get(0),c.radius=84,c.square=100,c.width=194,navigator.appVersion.match(/MSIE [0-6]\./)&&$("*",d).each(function(){if("none"!=this.currentStyle.backgroundImage){var a=this.currentStyle.backgroundImage;a=this.currentStyle.backgroundImage.substring(5,a.length-2),$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"})}}),c.linkTo=function(a){return"object"==typeof c.callback&&$(c.callback).unbind("keyup",c.updateValue),c.color=null,"function"==typeof a?c.callback=a:"object"!=typeof a&&"string"!=typeof a||(c.callback=$(a),c.callback.bind("keyup",c.updateValue),c.callback.get(0).value&&c.setColor(c.callback.get(0).value)),this},c.updateValue=function(a){this.value&&this.value!=c.color&&c.setColor(this.value)},c.setColor=function(a){var b=c.unpack(a);return c.color!=a&&b&&(c.color=a,c.rgb=b,c.hsl=c.RGBToHSL(c.rgb),c.updateDisplay()),this},c.setHSL=function(a){return c.hsl=a,c.rgb=c.HSLToRGB(a),c.color=c.pack(c.rgb),c.updateDisplay(),this},c.widgetCoords=function(a){var b,d,e=a.target||a.srcElement,f=c.wheel;if("undefined"!=typeof a.offsetX){for(var g={x:a.offsetX,y:a.offsetY},h=e;h;)h.mouseX=g.x,h.mouseY=g.y,g.x+=h.offsetLeft,g.y+=h.offsetTop,h=h.offsetParent;for(var h=f,i={x:0,y:0};h;){if("undefined"!=typeof h.mouseX){b=h.mouseX-i.x,d=h.mouseY-i.y;break}i.x+=h.offsetLeft,i.y+=h.offsetTop,h=h.offsetParent}for(h=e;h;)h.mouseX=void 0,h.mouseY=void 0,h=h.offsetParent}else{var g=c.absolutePosition(f);b=(a.pageX||0*(a.clientX+$("html").get(0).scrollLeft))-g.x,d=(a.pageY||0*(a.clientY+$("html").get(0).scrollTop))-g.y}return{x:b-c.width/2,y:d-c.width/2}},c.mousedown=function(a){document.dragging||($(document).bind("mousemove",c.mousemove).bind("mouseup",c.mouseup),document.dragging=!0);var b=c.widgetCoords(a);return c.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>c.square,c.mousemove(a),!1},c.mousemove=function(a){var b=c.widgetCoords(a);if(c.circleDrag){var d=Math.atan2(b.x,-b.y)/6.28;d<0&&(d+=1),c.setHSL([d,c.hsl[1],c.hsl[2]])}else{var e=Math.max(0,Math.min(1,-(b.x/c.square)+.5)),f=Math.max(0,Math.min(1,-(b.y/c.square)+.5));c.setHSL([c.hsl[0],e,f])}return!1},c.mouseup=function(){$(document).unbind("mousemove",c.mousemove),$(document).unbind("mouseup",c.mouseup),document.dragging=!1},c.updateDisplay=function(){var a=6.28*c.hsl[0];$(".h-marker",d).css({left:Math.round(Math.sin(a)*c.radius+c.width/2)+"px",top:Math.round(-Math.cos(a)*c.radius+c.width/2)+"px"}),$(".sl-marker",d).css({left:Math.round(c.square*(.5-c.hsl[1])+c.width/2)+"px",top:Math.round(c.square*(.5-c.hsl[2])+c.width/2)+"px"}),$(".color",d).css("backgroundColor",c.pack(c.HSLToRGB([c.hsl[0],1,.5]))),"object"==typeof c.callback?($(c.callback).css({backgroundColor:c.color,color:c.hsl[2]>.5?"#000":"#fff"}),$(c.callback).each(function(){this.value&&this.value!=c.color&&(this.value=c.color)})):"function"==typeof c.callback&&c.callback.call(c,c.color)},c.absolutePosition=function(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var d=c.absolutePosition(a.offsetParent);b.x+=d.x,b.y+=d.y}return b},c.pack=function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},c.unpack=function(a){return 7==a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4==a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},c.HSLToRGB=function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this.hueToRGB(b,c,d+.33333),this.hueToRGB(b,c,d),this.hueToRGB(b,c,d-.33333)]},c.hueToRGB=function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},c.RGBToHSL=function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},$("*",d).mousedown(c.mousedown),c.setColor("#000000"),b&&c.linkTo(b)},BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a+" bi-high-light-border"}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.dir){case"left,top":case"left,bottom":this._createLeftTriangle(),this.combo.getView().showLine("right");break;case"right,top":case"right,bottom":this._createRightTriangle(),this.combo.getView().showLine("left");break;case"top,left":case"top,right":this._createTopTriangle(),this.combo.getView().showLine("bottom");break;case"bottom,left":case"bottom,right":this._createBottomTriangle(),this.combo.getView().showLine("top")}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null,this.combo.getView()&&this.combo.getView().hideLine()},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.baseCls+" bi-bubble-popup-view"})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)},showLine:function(a){var b={},c={};switch(a){case"left":b={top:0,bottom:0,left:-1},c={width:3};break;case"right":b={top:0,bottom:0,right:-1},c={width:3};break;case"top":b={left:0,right:0,top:-1},c={height:3};break;case"bottom":b={left:0,right:0,bottom:-1},c={height:3}}this.line=BI.createWidget(c,{type:"bi.layout",cls:"bubble-popup-line bi-high-light-background"}),b.el=this.line,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},hideLine:function(){this.line&&this.line.destroy()}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:BI.i18nText(BI.i18nText("BI-Basic_Sure"))},{value:BI.i18nText("BI-Basic_Cancel"),level:"ignore"}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this,c=[];return BI.each(a.buttons.reverse(),function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:30,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.right_vertical_adapt",height:40,hgap:10,bgap:10,items:c})}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),BI.FormulaCombo=BI.inherit(BI.Widget,{_constant:{POPUP_HEIGHT:450,POPUP_WIDTH:600,POPUP_V_GAP:10,POPUP_H_GAP:10,ADJUST_LENGTH:2,HEIGHT_MAX:1e4,MAX_HEIGHT:500,MAX_WIDTH:600,COMBO_TRIGGER_WIDTH:300},_defaultConfig:function(){return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-combo",height:30,items:[]})},_init:function(){BI.FormulaCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.formula_ids=[],this.input=BI.createWidget({type:"bi.formula_combo_trigger",height:b.height,items:b.items}),this.formulaPopup=BI.createWidget({type:"bi.formula_combo_popup",fieldItems:b.items}),this.formulaInputCombo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!0,isNeedAdjustWidth:!1,adjustLength:this._constant.ADJUST_LENGTH,el:this.input,popup:{el:{type:"bi.absolute",height:this._constant.HEIGHT_MAX,width:this._constant.POPUP_WIDTH,items:[{el:this.formulaPopup,top:this._constant.POPUP_V_GAP,left:this._constant.POPUP_H_GAP,right:this._constant.POPUP_V_GAP,bottom:0}]},stopPropagation:!1,maxHeight:this._constant.MAX_HEIGHT,width:this._constant.MAX_WIDTH}}),this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.formulaPopup.setValue(a.input.getValue())}),this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE,function(){a.setValue(a.formulaPopup.getValue()),a.formulaInputCombo.hideView(),a.fireEvent(BI.FormulaCombo.EVENT_CHANGE)}),this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL,function(){a.formulaInputCombo.hideView()})},setValue:function(a){this.formulaInputCombo.isViewVisible()&&this.formulaInputCombo.hideView(),this.input.setValue(a),this.input.setText(BI.Func.getFormulaStringFromFormulaValue(a)),this.formulaPopup.setValue(this.input.getValue())},getFormulaTargetIds:function(){return this.formulaPopup.getFormulaTargetIds()},getValue:function(){return this.input.getValue()}}),BI.FormulaCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.formula_combo",BI.FormulaCombo),BI.FormulaComboPopup=BI.inherit(BI.Widget,{_constant:{BUTTON_HEIGHT:30,SOUTH_HEIGHT:60,SOUTH_H_GAP:10},_defaultConfig:function(){return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-pane-popup"})},_init:function(){BI.FormulaComboPopup.superclass._init.apply(this,arguments),this.populate()},populate:function(){var a=this,b=this.options.fieldItems;this.formula=BI.createWidget({type:"bi.formula_insert"}),this.formula.populate(b);var c=BI.createWidget({type:"bi.button",level:"common",height:this._constant.BUTTON_HEIGHT,text:BI.i18nText("BI-Basic_OK")}),d=BI.createWidget({type:"bi.button",level:"ignore",height:this._constant.BUTTON_HEIGHT,text:BI.i18nText("BI-Basic_Cancel")});this.formula.on(BI.FormulaInsert.EVENT_CHANGE,function(){c.setEnable(a.formula.checkValidation())}),c.on(BI.Button.EVENT_CHANGE,function(){a.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE)}),d.on(BI.Button.EVENT_CHANGE,function(){a.setValue(a.oldValue),a.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL)}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.formula,height:"fill"},{el:{type:"bi.right_vertical_adapt",height:this._constant.SOUTH_HEIGHT,items:[d,c],hgap:this._constant.SOUTH_H_GAP},height:this._constant.SOUTH_HEIGHT}]})},getFormulaTargetIds:function(){return this.formula.getUsedFields()},getValue:function(){return this.formula.getValue()},setValue:function(a){this.oldValue=a,this.formula.setValue(a)}}),BI.FormulaComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.FormulaComboPopup.EVENT_VALUE_CANCEL="EVENT_VALUE_CANCEL",BI.shortcut("bi.formula_combo_popup",BI.FormulaComboPopup),BI.FormulaComboTrigger=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-formula-combo-trigger",height:30,items:[]})},_init:function(){BI.FormulaComboTrigger.superclass._init.apply(this,arguments);this.options;this.label=BI.createWidget({type:"bi.label",element:this,textAlign:"left",textHeight:this.options.height,lgap:10})},_getTextFromFormulaValue:function(a){var b=this,c="",d=/\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g,e=a.match(d);return BI.each(e,function(a,d){var e=/\$[\{][^\}]*[\}]/,f=d.match(e);if(BI.isNotEmptyArray(f)){var g=f[0].substring(2,d.length-1),d=BI.find(BI.flatten(b.options.items),function(a,b){return g===b.value});c+=d.text}else c+=d}),c},getValue:function(){return this.options.value},setValue:function(a){this.options.value=a,this.label.setText(this._getTextFromFormulaValue(a))}}),BI.shortcut("bi.formula_combo_trigger",BI.FormulaComboTrigger),BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,iconClass:"",el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconClass:b.iconClass,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.iconCombo.setValue(a)},getValue:function(){return this.iconCombo.getValue()},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconClass:"",width:25,height:25,isShowDown:!0})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var a=this.options;this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+a.iconClass,disableSelected:!0,width:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8}),this.down.setVisible(a.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:0,bottom:0}]}),BI.isKey(a.value)&&this.setValue(a.value)},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c="";a=BI.isArray(a)?a[0]:a,BI.any(this.options.items,function(b,d){if(a===d.value)return c=d.iconClass,!0})?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),BI.StaticCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-static-combo",height:30,text:"",el:{},items:[],chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.StaticCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.text_icon_item",cls:"bi-select-text-trigger bi-border pull-down-font",text:b.text,readonly:!0,textLgap:5,height:b.height-2}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",textAlign:b.textAlign,chooseType:b.chooseType,items:b.items}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.StaticCombo.EVENT_CHANGE,arguments)}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}})},populate:function(a){this.combo.populate(a)},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.StaticCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_combo",BI.StaticCombo),BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-check-combo",width:100,height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE); +}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.textIconCheckCombo.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30,text:""})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:30,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:30,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:30})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor] +}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:30})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.BarFloatSection=BI.inherit(BI.FloatSection,{_defaultConfig:function(){return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText("BI-Basic_Cancel")]})},_init:function(){BI.BarFloatSection.superclass._init.apply(this,arguments);var a=this,b=["_init","_defaultConfig","_vessel","_render","getName","listenEnd","local","refresh","load","change"];b=BI.makeObject(b,!0),BI.each(this.constructor.caller.caller.caller.caller.prototype,function(c){if(!b[c]){var d=a[c];BI.isFunction(d)&&(a[c]=BI.bind(function(){return this.model._start===!0?void this._F.push({f:d,arg:arguments}):d.apply(this,arguments)},a))}})},rebuildSouth:function(a){var b=this;this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})}}),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){var e=this.isSelected();b===BI.Events.CLICK&&(a.setAllSelected(e),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.toolbar.isSelected()},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count<c}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(b){a.fireEvent(BI.LazyLoader.EVENT_CHANGE,b)})},_getNextItems:function(a){var b=this.options,c=b.items.length-this._const.PAGE*(a.times-1),d=BI.last(b.items,c),e=BI.first(d,this._const.PAGE);return e},populate:function(a){this.loader.populate(a)},addItems:function(a){this.loader.addItems(a)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){ +return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader),BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.next=!1),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",element:this,chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListLoader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasNext:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasNext.apply(this,[{times:this.times,count:this.count}])},addItems:function(a){this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(a),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments),this.next.element.appendTo(this.element)},populate:function(a){var b=this,c=this.options;return 0===arguments.length&&BI.isFunction(c.itemsCreator)?void c.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments),c.onLoaded()}]):(this.options.items=a,this.times=1,this.count=0,this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.DOM.hang([this.next]),this.button_group.populate.apply(this.button_group,arguments),void this.next.element.appendTo(this.element))},empty:function(){BI.DOM.hang([this.next]),this.button_group.empty(),this.next.element.appendTo(this.element),BI.each([this.next],function(a,b){b&&b.setVisible(!1)})},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_loader",BI.ListLoader),BI.SortList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SortList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sort-list",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_init:function(){BI.SortList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.list_loader",element:this,isDefaultInit:b.isDefaultInit,el:b.el,items:this._formatItems(b.items),itemsCreator:function(c,d){b.itemsCreator(c,function(b){d(a._formatItems(b))})},onLoaded:b.onLoaded,count:b.count,next:b.next,hasNext:b.hasNext}),this.loader.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SortList.EVENT_CHANGE,c,d)}),this.loader.element.sortable({containment:b.containment||this.element,connectWith:b.connectWith||".bi-sort-list",items:".sort-item",cursor:b.cursor||"drag",tolerance:b.tolerance||"intersect",placeholder:{element:function(a){var b=BI.createWidget({type:"bi.layout",cls:"bi-sortable-holder",height:a.outerHeight()});return b.element.css({"margin-left":a.css("margin-left"),"margin-right":a.css("margin-right"),"margin-top":a.css("margin-top"),"margin-bottom":a.css("margin-bottom"),margin:a.css("margin")}),b.element},update:function(){}},start:function(a,b){},stop:function(b,c){a.fireEvent(BI.SortList.EVENT_CHANGE)},over:function(a,b){}})},_formatItems:function(a){return BI.each(a,function(a,b){b=BI.stripEL(b),b.cls=b.cls?b.cls+" sort-item":"sort-item",b.attributes={sorted:b.value}}),a},hasNext:function(){return this.loader.hasNext()},addItems:function(a){this.loader.addItems(a)},populate:function(a){a&&(arguments[0]=this._formatItems(a)),this.loader.populate.apply(this.loader,arguments)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue()},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)},getSortedValues:function(){return this.loader.element.sortable("toArray",{attribute:"sorted"})}}),BI.SortList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.sort_list",BI.SortList),BI.AllCountPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-all-count-pager",height:30,pages:1,curr:1,count:1})},_init:function(){BI.AllCountPager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.small_text_editor",cls:"pager-editor",validationChecker:function(b){return 0===a.rowCount.getValue()&&"0"===b||BI.isPositiveInteger(b)},hgap:4,vgap:0,value:b.curr,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),width:35,height:20}),this.pager=BI.createWidget({type:"bi.pager",width:36,layouts:[{type:"bi.horizontal",hgap:1,vgap:1}],dynamicShow:!1,pages:b.pages,curr:b.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Previous_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,cls:"all-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Next_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,cls:"all-pager-next column-next-page-h-font"},hasPrev:b.hasPrev,hasNext:b.hasNext,firstPage:b.firstPage,lastPage:b.lastPage}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.pager.setValue(BI.parseInt(a.editor.getValue())),a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.editor.setValue(a.pager.getCurrentPage())}),this.allPages=BI.createWidget({type:"bi.label",width:30,title:b.pages,text:"/"+b.pages}),this.rowCount=BI.createWidget({type:"bi.label",height:b.height,hgap:5,text:b.count,title:b.count});var c=BI.createWidget({type:"bi.left",height:b.height,scrollable:!1,items:[{type:"bi.label",height:b.height,text:BI.i18nText("BI-Basic_Total"),width:15},this.rowCount,{type:"bi.label",height:b.height,text:BI.i18nText("BI-Tiao_Data"),width:50,textAlign:"left"}]});BI.createWidget({type:"bi.center_adapt",element:this,columnSize:["",35,40,36],items:[c,this.editor,this.allPages,this.pager]})},alwaysShowPager:!0,setAllPages:function(a){this.allPages.setText("/"+a),this.allPages.setTitle(a),this.pager.setAllPages(a),this.editor.setEnable(a>=1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate()}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:30,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var a=this.options;a.vertical,a.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev row-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[74,111,-9,28],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager),BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start<g-1&&(d.start=d.end-g+1);var l=d.start,m=d.end;for(h&&i&&d.index>1&&0!==g&&e>g&&d.end<e&&0!==g&&(l++,m--);l<=m;l++)l===f?c.push({text:l,value:l,selected:!0}):c.push({text:l,value:l});(!b.dynamicShow&&!b.dynamicShowFirstLast||e>g&&d.end<e&&0!==g)&&i&&(e>g&&d.end<e&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),c.push({text:i,value:"last",disabled:!(e>g&&d.end<e&&0!==g)})),d.flow=!j&&0===g,(!b.dynamicShow&&!b.dynamicShowPrevNext&&k||f!==e&&k||d.flow)&&c.push(function(){return BI.isKey(k)?e===!1?{text:k,value:"next",disabled:b.hasNext(f)===!1}:d.flow&&f===e?{text:k,value:"next",disabled:!0}:{text:k,value:"next",disabled:!(f!==e&&k||d.flow)}:BI.extend({disabled:e===!1?b.hasNext(f)===!1:!(f!==e&&k||d.flow)},k)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(c,{cls:"page-item bi-border bi-list-item-active",height:23,hgap:10}),behaviors:b.behaviors,layouts:b.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(c,d,f){if(a._lock!==!0){if(a._lock=!0,a._debouce(),c===BI.Events.CLICK){var g=a.button_group.getValue()[0];switch(g){case"first":a.currPage=1;break;case"last":a.currPage=e;break;case"prev":a.currPage--;break;case"next":a.currPage++;break;default:a.currPage=g}b.jump.apply(a,[{pages:e,curr:a.currPage}]),a._populate(),a.fireEvent(BI.DetailPager.EVENT_CHANGE,f)}a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(a){this.options.pages=a},hasPrev:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasPrev(a):a>1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):a<c},setValue:function(a){var b=this.options;if(a=0|a,a=a<1?1:a,b.pages===!1){var c=BI.result(b,"lastPage"),d=1;this.currPage=a>c?c:(d=BI.result(b,"firstPage"),a<d?d:a)}else a=a>b.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-active",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height-2,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:30})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){return this.options.isNeedFreeze===!0?this.options.freezeCols.length:0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a<f&&(g+=b),h+=b}),f>0&&(b[f-1]=BI.clamp(e-(g-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(h-g-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_recomputeColumnSize:function(){var a=this.options;a.regionColumnSize=this.table.getRegionColumnSize();var b=this.table.getColumnSize().slice();if(a.freezeCols.length>1)for(var c=0;c<a.freezeCols.length-1;c++)b.splice(1,0,0);a.columnSize=b},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=this._createHeader(c),e=this._formatItems(a.items,d,b),f=a.columnSize.slice(),g=a.minColumnSize.slice(),h=a.maxColumnSize.slice();return BI.removeAt(f,e.deletedCols),BI.removeAt(g,e.deletedCols),BI.removeAt(h,e.deletedCols),{header:e.header,items:e.items,columnSize:this._formatColumnSize(f,b),minColumnSize:this._formatColumns(g,b),maxColumnSize:this._formatColumns(h,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.attr("freezeCols",f.freezeCols),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.dynamic_summary_layer_tree_table",BI.DynamicSummaryLayerTreeTable),BI.DynamicSummaryTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.DynamicSummaryTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.DynamicSummaryTreeTable.formatHorizontalItems(a.items,b,!1,a.summaryCellStyleGetter),f=BI.DynamicSummaryTreeTable.formatSummaryItems(e,d,a.crossItems,b),g=a.columnSize.slice(),h=a.minColumnSize.slice(),i=a.maxColumnSize.slice(); +return BI.removeAt(g,f.deletedCols),BI.removeAt(h,f.deletedCols),BI.removeAt(i,f.deletedCols),{header:f.header,items:f.items,columnSize:g,minColumnSize:h,maxColumnSize:i}},setWidth:function(a){BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a){switch(BI.DynamicSummaryTreeTable.superclass.attr.apply(this,arguments),a){case"minColumnSize":case"maxColumnSize":return}this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryTreeTable.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.DynamicSummaryTreeTable,{formatHorizontalItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],(a==-1||g.children.length>1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatSummaryItems:function(a,b,c,d){function e(a){if(BI.isArray(a.children)){if(BI.each(a.children,function(a,b){e(b)}),BI.isNotEmptyArray(a.values)){if(1===a.children.length)for(var b=0;b<a.values.length;b++)f.push(g+b+d);g+=a.values.length}}else a.values&&a.values.length>1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep();return{header:this._createHeader(c),items:this._formatItems(a.items),columnSize:this._formatColumnSize(a.columnSize,b),minColumnSize:this._formatColumns(a.minColumnSize,b),maxColumnSize:this._formatColumns(a.maxColumnSize,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.LayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.LayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.LayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){var a=this.table.getColumnSize(),b=this._getHDeep(),c=[];return b>0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i<e;i++){for(var j=[],k=0;k<d;k++)j.push(b[i]);h.push(j.concat(g[i]||[]))}return a&&a.length>0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatCrossItems:function(a,b,c){var d=BI.TableTree.formatItems(a,b,!0,c);return BI.unzip(d)},maxDeep:function(a){function b(a,c){var d=a;return BI.isNotEmptyArray(c.children)&&BI.each(c.children,function(c,e){d=Math.max(d,b(a+1,e))}),d}var c=1;return BI.isObject(a)&&BI.each(a,function(a,d){c=Math.max(c,b(1,d))}),c}}),BI.shortcut("bi.tree_table",BI.TableTree),BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(a){return a.length>0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){ +this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j<k&&h<e.length;)d.push(h),i+=e[h].height,j+=e[h].height,h++;BI.each(d,function(d,f){var g=BI.deepIndexOf(a.renderedKeys,f);if(g>-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return a<b&&!this._isEqual(a,b)},_isMoreThan:function(a,b){return a>b&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c<d;c++)for(var e=c+1;e<d;e++){var f={left:b[c].x,top:b[c].y,width:b[c].w,height:b[c].h},g={left:b[e].x,top:b[e].y,width:b[e].w,height:b[e].h};if(b[c].isIntersects(b[e])&&this._getCrossArea(f,g)>1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;k<l;k++){var m=j[k];m.moved||b.y>m.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c<d;c++)if(this._collides(a[c],b))return a[c]},_moveElementAwayFromCollision:function(a,b,c,d){if(d){var e={x:c.x,y:c.y,w:c.w,h:c.h,i:"-1"};if(e.y=Math.max(b.y-c.h,0),!this._getFirstCollision(a,e))return this._moveElement(a,c,void 0,e.y)}return this._moveElement(a,c,void 0,c.y+1)},_compactItem:function(a,b,c){if(c)for(;b.y>0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g<h;g++){var i=e[g];i._static||(i=this._compactItem(d,i,b),d.push(i)),f[a.indexOf(i)]=i,i.moved=!1}return f},getRegionByName:function(a){var b={};return b[a]=this.regions[a],this._cloneRegion(b)[a]},getAllRegions:function(){return BI.toArray(this._cloneRegion())},getHelper:function(){var a=BI.createWidget({type:"bi.layout",width:18,height:18,cls:"arrangement-helper bi-border"});return BI.createWidget({type:"bi.absolute",element:this,items:[a]}),a},_start:function(){this.options.layoutType===BI.Arrangement.LAYOUT_TYPE.GRID?this.block.setVisible(!0):this.arrangement.setVisible(!0)},_stop:function(){this.arrangement.setVisible(!1),this.block.setVisible(!1)},setLayoutType:function(a){var b=this.options;if(a!==b.layoutType)switch(b.layoutType=a,b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.relayout()}},getLayoutType:function(){return this.options.layoutType},getLayoutRatio:function(){var a=this._getRegionOccupied(),b=this.getClientWidth(),c=this.getClientHeight();return{x:BI.parseFloat(BI.contentFormat((a.left+a.width)/b,"#.##;-#.##")),y:BI.parseFloat(BI.contentFormat((a.top+a.height)/c,"#.##;-#.##"))}},addRegion:function(a,b){b&&this.setPosition(b,a);this.options;if(!this.position)return!1;var c=this._cloneRegion();BI.each(this.position.regions,function(a,b){c[b.id].left=b.left,c[b.id].top=b.top,c[b.id].width=b.width,c[b.id].height=b.height});var d=BI.extend({},a,{left:this.position.insert.left,top:this.position.insert.top,width:this.position.insert.width,height:this.position.insert.height}),e=this._createOneRegion(d);return c[e.id]=e,!!this._test(c)&&(delete c[e.id],this._modifyRegion(c),this._addRegion(d),this._populate(this.getAllRegions()),!0)},deleteRegion:function(a){if(!this.regions[a])return!1;var b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),!0;case BI.Arrangement.LAYOUT_TYPE.GRID:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),this.resize(),!0}return!1},setRegionSize:function(a,b){var c=this.options,d=!1;switch(c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._cloneRegion();BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)&&(this._modifyRegion(e),d=!0);break;case BI.Arrangement.LAYOUT_TYPE.GRID:var e=this._cloneRegion();if(BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)){var f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),d=!0}}return this._applyRegion(),d},setPosition:function(a,b){var c,d,e=this.options,f=[];if(a.left<0||a.top<0){switch(e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.resize()}return this._stop(),this.position=null,null}var g=this._getScrollOffset();switch(a={left:a.left+g.left,top:a.top+g.top},e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var c={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this.position={insert:c},this._setArrangeSize(c),this._start();break;case BI.Arrangement.LAYOUT_TYPE.GRID:var h={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this._setArrangeSize(h);var d=this._getGridPositionAndSize(h),i=[{x:0,y:BI.MAX,w:d.w,h:d.h,i:d.i}].concat(this._getLayoutsByRegions());i=this._moveElement(i,i[0],d.x,d.y,!0),i=this.compact(i,!0);var f=this._setRegionsByLayout(this._cloneRegion(),i),c=this._getBlockPositionAndSize(i[0]);this.position={insert:c,regions:f},this._applyRegion(f),this._setBlockPositionAndSize(c),this._start()}return this.position},setRegionPosition:function(a,b){var c=this.options,d=this._getScrollOffset();switch(b=BI.extend(b,{left:b.left+d.left,top:b.top+d.top}),c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top}),this._applyRegion();break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(b.stop){BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this.block.setVisible(!1)}else{BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),h=this._getGridPositionAndSize(BI.extend(e[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top})),i=h.x,j=h.y;h=BI.extend(h,{x:0,y:BI.MAX,i:-1}),delete e[a];var f=this._getLayoutsByRegions(e);f=this._moveElement([h].concat(f),h,i,j,!0),f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this._setBlockPositionAndSize(this._getBlockPositionAndSize(h)),this.block.setVisible(!0)}}},setDropPosition:function(a,b){var c=this;this.arrangement.setVisible(!0);var d=this._getScrollOffset();return this._setArrangeSize(BI.extend({},b,{left:a.left+d.left,top:a.top+d.top})),function(){c.arrangement.setVisible(!1)}},scrollTo:function(a){this.scrollContainer.element.scrollTop(a.top),this.scrollContainer.element.scrollLeft(a.left)},zoom:function(a){var b=this;this.options;if(a){var c=this._applyContainer();switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:if(this._isArrangeFine()){var d=this.getClientWidth(),e=(a.x||1)*d/(c.left+c.width),f=this._cloneRegion();BI.each(f,function(a,b){b.left=b.left*e,b.width=b.width*e}),this._test(f)&&(this._modifyRegion(f),this._applyRegion()),this.resize(),this.relayout()}break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine()){var d=this.getClientWidth(),g=this.getClientHeight(),e=(a.x||1)*d/(c.left+c.width),h=(a.y||1)*g/(c.top+c.height),f=this._cloneRegion();if(BI.each(f,function(a,c){c.left=c.left*e,c.width=c.width*e,c.top=c.top*h,c.height=c.height*h;var d=b._getOneWidthPortion(),f=Math.round(c.width/d),g=Math.round(c.left/d),i=Math.round((c.width+c.left)/d);g+f!==i&&(c.left=g*d,c.width=i*d-c.left)}),this._test(f)){var i=this._getLayoutsByRegions(f);i=this.compact(i,!0),f=this._getRegionsByLayout(i),this._modifyRegion(f),this._applyRegion()}}else this.relayout()}}},resize:function(){var a=this.options;switch(a.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.zoom(this.ratio);var b=this._cloneRegion(),c=this._getLayoutsByRegions(b);c=this.compact(c,!0),b=this._getRegionsByLayout(c),this._modifyRegion(b),this._applyRegion()}},relayout:function(){var a=this,b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine())this.resize();else{var c=this._getOneHeightPortion(),d=this.getClientWidth(),e=(this.getClientHeight(),this._cloneRegion()),f=BI.toArray(e);f.sort(function(b,c){return a._isEqual(b.top,c.top)?b.left-c.left:b.top-c.top});var g=f.length,h=4,i=(Math.floor((g-1)/4+1),d/h),j={};if(BI.each(f,function(a,b){var d=Math.floor(a/4),e=a%4;BI.extend(b,{top:d*c*6,left:e*i,width:i,height:6*c}),j[d]||(j[d]={}),j[d][e]=b}),this._test(f)){var k=this._getLayoutsByRegions(e);k=this.compact(k,!0),e=this._getRegionsByLayout(k),this._modifyRegion(e),this._populate(f)}}}},_populate:function(a){this._stop(),this._calculateRegions(a),this._applyRegion()},populate:function(a){var b=this;BI.each(this.regions,function(a,c){b.regions[a].el.setVisible(!1),delete b.regions[a]}),this._populate(a),this._renderRegion()}}),BI.Arrangement.EVENT_SCROLL="EVENT_SCROLL",BI.extend(BI.Arrangement,{PORTION:36,H_PORTION:18,LAYOUT_TYPE:{GRID:0,FREE:1}}),BI.shortcut("bi.arrangement",BI.Arrangement),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.leaf=!0,h.width=g.width,h.height=g.height,h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id]; +d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b<c;b++)e[a[b].id]=a[b];for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!=a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(a[b])):d.push(a[b]);return d}return[a]},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=this._transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:25})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a+1),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker bi-background",height:25,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this._year=(new Date).getFullYear(),this._month=(new Date).getMonth(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){0===a._month?a.setValue({year:a.year.getValue()-1,month:11}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){11===a._month?a.setValue({year:a.year.getValue()+1,month:0}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo"}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.left,width:25},{type:"bi.center_adapt",items:[{type:"bi.horizontal",width:100,items:[this.year,this.month]}]},{el:this.right,width:25}]}),this.setValue({year:this._year,month:this._month})},setValue:function(a){this._year=a.year,this._month=a.month,this.year.setValue(a.year),this.month.setValue(a.month)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:30})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.DateTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&Date.checkLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]})},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return Date.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),BI.parseInt(a)},_alertInEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),a=a<10?"0"+a:a},_finetuning:function(a){var b=BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));this.editor.setValue(this._alertInEditorValue(b+a))},getValue:function(){var a=this.editor.getValue();return this._alertOutEditorValue(a)},setValue:function(a){this.editor.setValue(this._alertInEditorValue(a)),this._finetuning(0)}}),BI.DateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.date_time_select",BI.DateTimeSelect),BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:b.triggerWidth},{el:this.text}]})},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=new Date,b=c.print("%Y-%X-%d %H:%M:%S");else{var d=new Date(c.year,c.month,c.day,c.hour,c.minute,c.second);b=d.print("%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.DirectionPathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#808080",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.DirectionPathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",items:[]})},_init:function(){BI.DirectionPathChooser.superclass._init.apply(this,arguments);var a=this,b=this.options; +this.pathChooser=BI.createWidget({type:"bi.path_chooser",element:this,items:b.items}),this.pathChooser.on(BI.PathChooser.EVENT_CHANGE,function(b,c){a._setValue(b,c),a.fireEvent(BI.DirectionPathChooser.EVENT_CHANGE)}),this._drawArrows()},_unselectAllArrows:function(){var a=this._const.lineColor;BI.each(this.arrows,function(b,c){BI.each(c,function(b,c){BI.each(c,function(b,c){c.attr({fill:a,stroke:a})})})})},_drawOneArrow:function(a,b){var c=this._const.lineColor,d=(this._const.selectLineColor,this.pathChooser.svg),e="";switch(b){case 0:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y+5)+"L"+(a.x+3)+","+(a.y+5)+"L"+a.x+","+a.y;break;case 1:e="M"+a.x+","+a.y+"L"+(a.x-5)+","+(a.y-3)+"L"+(a.x-5)+","+(a.y+3)+"L"+a.x+","+a.y;break;case 2:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y-5)+"L"+(a.x+3)+","+(a.y-5)+"L"+a.x+","+a.y;break;case 3:e="M"+a.x+","+a.y+"L"+(a.x+5)+","+(a.y-3)+"L"+(a.x+5)+","+(a.y+3)+"L"+a.x+","+a.y}return d.path(e).attr({fill:c,stroke:c})},_drawArrows:function(){function a(a,b){return b===-1?100*(a+1)-20:100*a+20}function b(a,b){var c=BI.find(a,function(c,d){if(c>0&&a[c-1].x<b&&a[c].x>b)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a<i.length-1){var e;b.y===i[a-1].y?i[a+1].y!=b.y&&(f[h[h.length-2]].direction===-1?a-1>0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a<b-1},_createChildValue:function(a,b){return a+"_"+b},populate:function(a){BI.DownListPopup.superclass.populate.apply(this,arguments);var b=this;b.childValueMap={},b.fatherValueMap={},b.singleValues=[];var c=b._createChildren(a),d=BI.createItems(c,{},{adjustLength:-2});b.popup.populate(d)},setValue:function(a){var b=this,c=[];BI.each(a,function(a,d){var e;e=BI.isNotNull(d.childValue)?b._createChildValue(d.value,d.childValue):d.value,c.push(e)}),this.popup.setValue(c)},getValue:function(){var a=this,b=[],c=this.popup.getValue();return BI.each(c,function(c,d){var e={};if(BI.isNotNull(a.childValueMap[d])){var f=a.fatherValueMap[d];e.childValue=a.childValueMap[d],e.value=f}else e.value=d;b.push(e)}),b}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),BI.ExcelTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-cell",text:""})},_init:function(){BI.ExcelTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_cell",BI.ExcelTableCell),BI.ExcelTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-header-cell bi-background",text:""})},_init:function(){BI.ExcelTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:BI.HorizontalAlign.Center,whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_header_cell",BI.ExcelTableHeaderCell),BI.ExcelTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",el:{type:"bi.responsive_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:37,footerRowSize:37,rowSize:37,regionColumnSize:!1,items:[]})},_init:function(){BI.ExcelTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[];BI.each(b.mergeCols,function(a,b){c.push(b+1)}),this.table=BI.createWidget(b.el,{type:"bi.table_view",element:this,isNeedFreeze:!1,isNeedMerge:b.isNeedMerge,mergeCols:c,mergeRule:b.mergeRule,columnSize:[""].concat(b.columnSize),headerRowSize:18,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize||[82,""]}),BI.isNotEmptyArray(b.items)&&this.populate(b.items),BI.nextTick(function(){a.setRegionColumnSize(b.regionColumnSize||[82,""])})},resize:function(){this.table.resize()},setColumnSize:function(a){this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},resizeHeader:function(){this.table.resize(),this.table._resizeHeader&&this.table._resizeHeader()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.ExcelTable.superclass.attr.apply(this,arguments),a){case"mergeCols":var d=[];BI.each(b,function(a,b){d.push(b+1)}),b=d}this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this.getColumnSize(),c=[],d=[{type:"bi.excel_table_header_cell"}];BI.isNotNull(a)&&(BI.each(b,function(a,b){d.push({type:"bi.excel_table_header_cell",text:BI.int2Abc(a+1)})}),BI.each(a,function(a,b){c.push([{type:"bi.excel_table_header_cell",text:a+1}].concat(b))})),this.table.populate(c,[d])},destroy:function(){this.table.destroy(),BI.ExcelTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.excel_table",BI.ExcelTable),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){ +var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({ +year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill", +el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)), +void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0), +this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d<a.length;d++){var e=a[d],f=b.getRegionIndexById(e);c.push(f);var g=b.regions[f];if(d===a.length-1){g.hasItem(e)||g.addItem(e,b.texts[e]);break}(d>0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d<BI.last(c);d++)BI.contains(c,d)||b.regions[d].addItem("")},_createNodes:function(){var a=this,b=this.options;this.store={},this.texts={},this.start=[],this.end=[],BI.each(b.items,function(b,c){a.start.push(BI.first(c).value),a.end.push(BI.last(c).value)}),this.start=BI.uniq(this.start),this.end=BI.uniq(this.end);var c=[],d=new BI.Tree,e={},f=0;BI.each(b.items,function(b,c){BI.each(c,function(b,g){BI.has(e,g.value)||(e[g.value]=0),e[g.value]++,f=Math.max(f,e[g.value]);var h={};b>0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h<e;h++)c[h]=c[h+1];c[e]=g}}else c.push(d.get("region"))})}),this._createRegions(c),BI.each(e,function(a,b){b<f&&delete e[a]});for(var g=[],h=d.getRoot();h&&1===h.getChildrenLength();)BI.has(e,h.getChildren()[0].id)?(delete e[h.getChildren()[0].id],h=h.getChildren()[0]):h=null;d.traverse(function(a){BI.has(e,a.id)&&(g.push(a.id),delete e[a.id])});for(var i,j,k={},l=0,m=g.length;l<m+1;l++)0===m?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):l===m?(i=j,j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):0===l?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[d.search(g[l])]):(i=[d.search(j[0]||d.getRoot(),g[l-1])],j=[d.search(i[0],g[l])]),BI.each(i,function(b,c){d._recursion(c,[c.id],function(b,d){if(BI.contains(j,b)&&(k[c.id]||(k[c.id]=[]),k[c.id].push(d),a._pushNodes(d),j.length<=1))return!0})});this.routes=k,this._drawLines(k)},_unselectAllPath:function(){var a=this;BI.each(this.radios,function(a,b){BI.each(b,function(a,b){b.setSelected(!1)})}),BI.each(this.lines,function(b,c){BI.each(c,function(b,c){c.attr("stroke",a._const.lineColor)})}),BI.each(this.regions,function(a,b){b.reset()})},populate:function(a){this.options.items=a||[];this.empty(),this.options.items.length<=0||(this.svg=BI.createWidget({type:"bi.svg"}),this._createNodes(),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}))},setValue:function(a){this._unselectAllPath();var b=BI.keys(this.routes),c=this,d=[],e=[];BI.each(a,function(a,c){BI.contains(b,c)&&e.length>0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width(); +if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.length<a.columnSize.length){var e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]<e.left[e.left.length-1]&&(h[h.length-1]=e.left[e.left.length-1]),i[i.length-1]<e.right[e.right.length-1]&&(i[i.length-1]=e.right[e.right.length-1]),a.table.setColumnSize(h.concat(i))}else if(!this._isAdaptiveColumn()){var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),l=e.sum,m=e.size;m[m.length-1]+=d[0]-l;var n=BI.clone(m);n[n.length-1]="",this.table.setColumnSize(n),e=this._getBlockSize(),m[m.length-1]<e.size[e.size.length-1]&&(m[m.length-1]=e.size[e.size.length-1]),this.table.setColumnSize(m)}},_resizeBody:function(){if(this._isAdaptiveColumn()){var a=this.table.getCalculateColumnSize();this.setColumnSize(a)}},_adjustRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this._getBlockSize(),d=c.sumLeft,e=c.sumRight;(d<b[0]||b[0]>=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this.table.element.width();if(b[0]<15||b[1]<15){var d=a.freezeCols,e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h<b.items.length;h++,i++){var j=BI.deepIndexOf(this.renderedKeys,this.start+h),k=h*b.rowSize;if(j>-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b; +},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;b<c;b++)if(i._isMatch(a.slice(0,a.length-1),a[b],l))return!0;return!1}function g(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(c=c[e],null==c)return!1}return!0}function h(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(!BI.has(c,e))return!1;if(c=c[e],BI.isEmpty(c))return!0}return!1}var i=this,j=BI.deepClone(a.selectedValues),k=a.notSelectedValue||{},l=a.keyword||"",m=a.parentValues||[];return null==j||BI.isEmpty(j)?void b({}):(c(j),void b(j))},_reqAdjustTreeNode:function(a,b){function c(a,b){if(null==a||BI.isEmpty(a))return!0;var e=!0;return BI.each(a,function(d,g){var h=BI.clone(b);h.push(d),c(a[d],h)||(BI.each(a[d],function(a,b){var c=BI.clone(h);c.push(a),f.push(c)}),e=!1)}),e&&d(a,b)}function d(a,b){return BI.isEmpty(a)||e._getChildCount(b)===BI.size(a)}var e=this,f=[],g=a.selectedValues;if(null==g||BI.isEmpty(g))return void b({});BI.each(g,function(a,b){f.push([a])}),c(g,[]);var h={};BI.each(f,function(a,b){e._buildTree(h,b)}),b(h)},_reqInitTreeNode:function(a,b){function c(){var a=j._getChildren([]),b=a.length;if(""!==n){for(var c=0,e=b;c<e;c++)if(a[c].value===n){b=c+1;break}}else b=0;for(var f=[],g=b,e=a.length;g<e;g++){if(f.length<j._const.perPage)var h=d(1,[],a[g].value,!1,k);else if(f.length===j._const.perPage)var h=d(1,[],a[g].value,!1,[]);if(h[0]===!0&&f.push(a[g].value),f.length>j._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m<g*this._const.perPage;m++){var n=d(l[m].value,i,k,h);f.push({id:l[m].id,pId:l[m].pId,value:l[m].value,text:l[m].text,times:1,isParent:l[m].getChildrenLength()>0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d<e;d++){if(null==c)return null;c=c[b[d]]}return c},_deleteNode:function(a,b){var c=b[b.length-1],d=b.slice(0,b.length-1),e=this._getNode(a,d);if(null!=e&&e[c])for(delete e[c];d.length>0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d<b*this._const.perPage;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return b*this._const.perPage<a.length},_itemsCreator:function(a,b){function c(c){var e=(a.keywords||[]).slice();if(a.keyword&&e.push(a.keyword),BI.each(e,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var f=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!f[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:d._getItemsByTimes(c,a.times),hasNext:d._hasNextByTimes(c,a.times)})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){var a=this.combo.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_CONFIRM="ValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo),BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this.items=b.items,this.populate())},setValue:function(a){this.list.setValue(a)},getValue:function(){var a=this.list.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="ValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane); \ No newline at end of file diff --git a/dist/widget.css b/dist/widget.css index 08bf6b8b8..401e34c4d 100644 --- a/dist/widget.css +++ b/dist/widget.css @@ -433,7 +433,7 @@ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 4b20149d7..ed6cf8536 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -126,6 +126,9 @@ BI.Combo = BI.inherit(BI.Widget, { var debounce = BI.debounce(function (e) { if (self.combo.element.__isMouseInBounds__(e)) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (!o.toggle && self.isViewVisible()) { + return; + } o.toggle ? self._toggle() : self._popupView(); if (self.isViewVisible()) { self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); @@ -142,6 +145,33 @@ BI.Combo = BI.inherit(BI.Widget, { st(e); }); break; + case "click-hover": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (self.isViewVisible()) { + return; + } + self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; } }); }, From 73150dcb939079d4df083a508490473819c66866 Mon Sep 17 00:00:00 2001 From: guy <guy@finereport.com> Date: Tue, 12 Sep 2017 17:48:03 +0800 Subject: [PATCH 10/14] add --- bi/case.js | 25316 +++++++++++++++++++++---------------------- dist/bundle.min.js | 22 +- dist/demo.js | 216 +- 3 files changed, 12777 insertions(+), 12777 deletions(-) diff --git a/bi/case.js b/bi/case.js index 7f196ca75..c5d73ef20 100644 --- a/bi/case.js +++ b/bi/case.js @@ -1,12444 +1,12444 @@ -/** - * 可以改变图标的button - * - * Created by GUY on 2016/2/2. - * - * @class BI.IconChangeButton - * @extends BI.Single - */ -BI.IconChangeButton = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-icon-change-button", - iconClass: "", - iconWidth: null, - iconHeight: null, - - stopEvent: false, - stopPropagation: false, - selected: false, - once: false, //点击一次选中有效,再点无效 - forceSelected: false, //点击即选中, 选中了就不会被取消 - forceNotSelected: false, //无论怎么点击都不会被选中 - disableSelected: false, //使能选中 - - shadow: false, - isShadowShowingOnSelected: false, //选中状态下是否显示阴影 - trigger: null, - handler: BI.emptyFn - }) - }, - - _init: function () { - BI.IconChangeButton.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.button = BI.createWidget({ - type: "bi.icon_button", - element: this, - cls: o.iconClass, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight, - - stopEvent: o.stopEvent, - stopPropagation: o.stopPropagation, - selected: o.selected, - once: o.once, - forceSelected: o.forceSelected, - forceNotSelected: o.forceNotSelected, - disableSelected: o.disableSelected, - - shadow: o.shadow, - isShadowShowingOnSelected: o.isShadowShowingOnSelected, - trigger: o.trigger, - handler: o.handler - }); - - this.button.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.button.on(BI.IconButton.EVENT_CHANGE, function () { - self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments); - }); - }, - - isSelected: function () { - return this.button.isSelected(); - }, - - setSelected: function (b) { - this.button.setSelected(b); - }, - - setIcon: function (cls) { - var o = this.options; - if (o.iconClass !== cls) { - this.element.removeClass(o.iconClass).addClass(cls); - o.iconClass = cls; - } - } -}); -BI.IconChangeButton.EVENT_CHANGE = "IconChangeButton.EVENT_CHANGE"; -BI.shortcut("bi.icon_change_button", BI.IconChangeButton);/** - * guy - * @extends BI.Single - * @type {*|void|Object} - */ -BI.HalfIconButton = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments); - return BI.extend(conf, { - extraCls: "bi-half-icon-button check-half-select-icon", - height: 16, - width: 16, - iconWidth: 16, - iconHeight: 16, - selected: false - }) - }, - - _init : function() { - BI.HalfIconButton.superclass._init.apply(this, arguments); - }, - - doClick: function(){ - BI.HalfIconButton.superclass.doClick.apply(this, arguments); - if(this.isValid()){ - this.fireEvent(BI.HalfIconButton.EVENT_CHANGE); - } - } -}); -BI.HalfIconButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE"; - -BI.shortcut("bi.half_icon_button", BI.HalfIconButton);/** - * 统一的trigger图标按钮 - * - * Created by GUY on 2015/9/16. - * @class BI.TriggerIconButton - * @extends BI.IconButton - */ -BI.TriggerIconButton = BI.inherit(BI.IconButton, { - - _defaultConfig: function () { - var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", - extraCls: "pull-down-font" - }); - }, - - _init: function () { - BI.TriggerIconButton.superclass._init.apply(this, arguments); - }, - - doClick: function () { - BI.TriggerIconButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this); - } - } -}); -BI.TriggerIconButton.EVENT_CHANGE = "TriggerIconButton.EVENT_CHANGE"; -BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.MultiSelectItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multi-select-item", - height: 25, - logic: { - dynamic: false - } - }) - }, - _init: function () { - BI.MultiSelectItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - rgap: o.rgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.center_adapt", - items: [this.checkbox], - width: 36 - }, this.text) - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.MultiSelectItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - if (this.isValid()) { - this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this); - } - }, - - setSelected: function (v) { - BI.MultiSelectItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); -BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);/** - * Created by GUY on 2016/2/2. - * - * @class BI.SingleSelectIconTextItem - * @extends BI.BasicButton - */ -BI.SingleSelectIconTextItem = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-icon-text-item bi-list-item-active", - iconClass: "", - hgap: 10, - height: 25 - }) - }, - _init: function () { - BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.icon_text_item", - element: this, - cls: o.iconClass, - once: o.once, - selected: o.selected, - height: o.height, - iconHeight: o.iconHeight, - iconWidth: o.iconWidth, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - isSelected: function () { - return this.text.isSelected(); - }, - - setSelected: function (b) { - this.text.setSelected(b); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments); - } -}); - -BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.SingleSelectItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-item bi-list-item-active", - hgap: 10, - height: 25, - textAlign: "left", - }) - }, - _init: function () { - BI.SingleSelectItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: o.textAlign, - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectItem.superclass.doClick.apply(this, arguments); - }, - - setSelected: function (v) { - BI.SingleSelectItem.superclass.setSelected.apply(this, arguments); - } -}); - -BI.shortcut("bi.single_select_item", BI.SingleSelectItem);/** - * guy - * 单选框item - * @type {*|void|Object} - */ -BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-radio-item bi-list-item-active", - logic: { - dynamic: false - }, - hgap: 10, - height: 25 - }) - }, - _init: function () { - BI.SingleSelectRadioItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radio = BI.createWidget({ - type: "bi.radio" - }); - this.radio.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(!self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.center_adapt", - items: [this.radio], - width: 36 - }, this.text) - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments); - this.radio.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments); - this.radio.setSelected(v); - - } -}); - -BI.shortcut("bi.single_select_radio_item", BI.SingleSelectRadioItem);/** - * Created by roy on 15/10/16. - */ -BI.ArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-arrow-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }); - }, - _init: function () { - var self = this, o = this.options; - BI.ArrowNode.superclass._init.apply(this, arguments); - this.checkbox = BI.createWidget({ - type: "bi.arrow_tree_group_node_checkbox", - iconWidth: 13, - iconHeight: 13 - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.ArrowNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isOpened()); - }, - setValue: function (v) { - this.text.setValue(v); - }, - - setOpened: function (v) { - BI.ArrowNode.superclass.setOpened.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.arrow_group_node", BI.ArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.FirstPlusGroupNode - * @extends BI.NodeButton - */ -BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-first-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.FirstPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.first_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.first_plus_group_node", BI.FirstPlusGroupNode);/** - * Created by User on 2016/3/31. - */ -/** - * > + icon + 文本 - * @class BI.IconArrowNode - * @extends BI.NodeButton - */ -BI.IconArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-icon-arrow-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25, - iconHeight: 13, - iconWidth: 13, - iconCls: "" - }) - }, - _init: function () { - BI.IconArrowNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.tree_group_node_checkbox", - width: 23, - stopPropagation: true - }); - - var icon = BI.createWidget({ - type: "bi.center_adapt", - cls: o.iconCls, - width: 23, - items: [{ - type: "bi.icon", - height: o.iconHeight, - width: o.iconWidth - }] - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, { - width: 23, - el: icon - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.IconArrowNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.IconArrowNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.icon_arrow_node", BI.IconArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.LastPlusGroupNode - * @extends BI.NodeButton - */ -BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-last-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.LastPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.last_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if(type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.last_plus_group_node", BI.LastPlusGroupNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.MidPlusGroupNode - * @extends BI.NodeButton - */ -BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-mid-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.MidPlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.mid_tree_node_checkbox", - stopPropagation: true - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments); - if (BI.isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.mid_plus_group_node", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - extraCls: "bi-multilayer-icon-arrow-node bi-list-item", - layer: 0,//第几层级 - id: "", - pId: "", - open: false, - height: 25, - iconHeight: 13, - iconWidth: 13, - iconCls: "" - }) - }, - _init: function () { - BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.node = BI.createWidget({ - type: "bi.icon_arrow_node", - iconCls: o.iconCls, - //logic: { - // dynamic: true - //}, - id: o.id, - pId: o.pId, - open: o.open, - height: o.height, - iconHeight: o.iconHeight, - iconWidth: o.iconWidth, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.node.on(BI.Controller.EVENT_CHANGE, function (type) { - self.setSelected(self.isSelected()); - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var items = []; - BI.count(0, o.layer, function () { - items.push({ - type: "bi.layout", - width: 13, - height: o.height - }) - }); - items.push(this.node); - BI.createWidget({ - type: "bi.td", - element: this, - columnSize: BI.makeArray(o.layer, 13), - items: [items] - }) - }, - - isOnce: function () { - return true; - }, - - doRedMark: function () { - this.node.doRedMark.apply(this.node, arguments); - }, - - unRedMark: function () { - this.node.unRedMark.apply(this.node, arguments); - }, - - isSelected: function () { - return this.node.isSelected(); - }, - - setSelected: function (b) { - BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments); - this.node.setSelected(b); - }, - - doClick: function () { - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.node.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments); - this.node.setOpened(v); - } -}); - -BI.shortcut("bi.multilayer_icon_arrow_node", BI.MultiLayerIconArrowNode);/** - * 加号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.PlusGroupNode - * @extends BI.NodeButton - */ -BI.PlusGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-plus-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.PlusGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.tree_node_checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.PlusGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setOpened: function (v) { - BI.PlusGroupNode.superclass.setOpened.apply(this, arguments); - if (this.checkbox) { - this.checkbox.setSelected(v); - } - } -}); - -BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/** - * 三角号表示的组节点 - * Created by GUY on 2015/9/6. - * @class BI.TriangleGroupNode - * @extends BI.NodeButton - */ -BI.TriangleGroupNode = BI.inherit(BI.NodeButton, { - _defaultConfig: function () { - var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item", - logic: { - dynamic: false - }, - id: "", - pId: "", - open: false, - height: 25 - }) - }, - _init: function () { - BI.TriangleGroupNode.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - iconWidth: 13, - iconHeight: 13, - type: "bi.tree_group_node_checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py, - keyword: o.keyword - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 25, - el: this.checkbox - }, this.text); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.TriangleGroupNode.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isOpened()); - }, - - setOpened: function (v) { - BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments); - this.checkbox.setSelected(v); - }, - - setText: function(text){ - BI.TriangleGroupNode.superclass.setText.apply(this, arguments); - this.text.setText(text); - } -}); - -BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-first-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.FirstTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.FirstTreeLeafItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.FirstTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - height: 25, - iconWidth: 16, - iconHeight: 16, - iconCls: "" - }) - }, - - _init: function () { - BI.IconTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var icon = BI.createWidget({ - type: "bi.center_adapt", - width: 23, - cls: o.iconCls, - items: [{ - type: "bi.icon", - width: o.iconWidth, - height: o.iconHeight - }] - }); - - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { - width: 23, - el: icon - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.IconTreeLeafItem.superclass.doClick.apply(this, arguments); - }, - - setSelected: function (v) { - BI.IconTreeLeafItem.superclass.setSelected.apply(this, arguments); - } -}); - -BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-last-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.LastTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.LastTreeLeafItem.superclass.doClick.apply(this, arguments); - // this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.LastTreeLeafItem.superclass.setSelected.apply(this, arguments); - // this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** - * guy - * 复选框item - * @type {*|void|Object} - */ -BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-mid-tree-leaf-item bi-list-item-active", - logic: { - dynamic: false - }, - id: "", - pId: "", - layer: 0, - height: 25 - }) - }, - _init: function () { - BI.MidTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox" - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self.setSelected(self.isSelected()); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); - var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { - width: 13, - el: { - type: "bi.layout", - cls: "base-line-conn-background", - width: 13, - height: o.height - } - }), { - width: 25, - el: { - type: "bi.layout", - cls: "mid-line-conn-background", - width: 25, - height: o.height - } - }, { - el: this.text - }); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { - items: items - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.MidTreeLeafItem.superclass.doClick.apply(this, arguments); - this.checkbox.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.MidTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.checkbox.setSelected(v); - } -}); - -BI.shortcut("bi.mid_tree_leaf_item", BI.MidTreeLeafItem);/** - * @class BI.MultiLayerIconTreeLeafItem - * @extends BI.BasicButton - */ -BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multilayer-icon-tree-leaf-item bi-list-item-active", - layer: 0, - height: 25, - iconCls: "", - iconHeight: 14, - iconWidth: 12 - }) - }, - _init: function () { - BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.item = BI.createWidget({ - type: "bi.icon_tree_leaf_item", - cls: "bi-list-item-none", - iconCls: o.iconCls, - id: o.id, - pId: o.pId, - isFront: true, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - py: o.py, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.item.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) {//本身实现click功能 - return; - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - var items = []; - BI.count(0, o.layer, function () { - items.push({ - type: "bi.layout", - width: 13, - height: o.height - }) - }); - items.push(this.item); - BI.createWidget({ - type: "bi.td", - element: this, - columnSize: BI.makeArray(o.layer, 13), - items: [items] - }); - }, - - doRedMark: function () { - this.item.doRedMark.apply(this.item, arguments); - }, - - unRedMark: function () { - this.item.unRedMark.apply(this.item, arguments); - }, - - doHighLight: function () { - this.item.doHighLight.apply(this.item, arguments); - }, - - unHighLight: function () { - this.item.unHighLight.apply(this.item, arguments); - }, - - getId: function () { - return this.options.id; - }, - - getPId: function () { - return this.options.pId; - }, - - doClick: function () { - BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments); - this.item.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments); - this.item.setSelected(v); - }, - - getValue: function(){ - return this.options.value; - } -}); - -BI.shortcut("bi.multilayer_icon_tree_leaf_item", BI.MultiLayerIconTreeLeafItem);/** - * 树叶子节点 - * Created by GUY on 2015/9/6. - * @class BI.TreeTextLeafItem - * @extends BI.BasicButton - */ -BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function() { - return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-tree-text-leaf-item bi-list-item-active", - id: "", - pId: "", - height: 25, - hgap: 0, - lgap: 0, - rgap: 0 - }) - }, - _init : function() { - BI.TreeTextLeafItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - lgap: o.lgap, - rgap: o.hgap, - text: o.text, - value: o.value, - py: o.py - }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.text - }] - }) - }, - - doRedMark: function(){ - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function(){ - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function(){ - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function(){ - this.text.unHighLight.apply(this.text, arguments); - }, - - getId: function(){ - return this.options.id; - }, - - getPId: function(){ - return this.options.pId; - } -}); - -BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** - * Created by GUY on 2015/8/28. - * @class BI.Calendar - * @extends BI.Widget - */ -BI.Calendar = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-calendar", - logic: { - dynamic: false - }, - min: '1900-01-01', //最小日期 - max: '2099-12-31', //最大日期 - year: 2015, - month: 7, //7表示八月 - day: 25 - }) - }, - - _dateCreator: function (Y, M, D) { - var self = this, o = this.options, log = {}, De = new Date(); - var mins = o.min.match(/\d+/g); - var maxs = o.max.match(/\d+/g); - Y < (mins[0] | 0) && (Y = (mins[0] | 0)); - Y > (maxs[0] | 0) && (Y = (maxs[0] | 0)); - - De.setFullYear(Y, M, D); - log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()]; - - var MD = Date._MD.slice(0); - MD[1] = Date.isLeap(log.ymd[0]) ? 29 : 28; - - De.setFullYear(log.ymd[0], log.ymd[1], 1); - log.FDay = De.getDay(); - - log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; - log.NDay = 1; - - var items = []; - BI.each(BI.range(42), function (i) { - var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; - if (i < log.FDay) { - td.lastMonth = true; - DD = i + log.PDay; - MM === 1 && (YY -= 1); - MM = MM === 1 ? 12 : MM - 1; - } else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { - DD = i - log.FDay + 1; - if (i - log.FDay + 1 === log.ymd[2]) { - td.currentDay = true; - } - } else { - td.nextMonth = true; - DD = log.NDay++; - MM === 12 && (YY += 1); - MM = MM === 12 ? 1 : MM + 1; - } - if (Date.checkVoid(YY, MM, DD, mins, maxs)[0]) { - td.disabled = true; - } - td.text = DD; - items.push(td); - }) - return items; - }, - - _init: function () { - BI.Calendar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var items = BI.map(Date._SDN.slice(0, 7), function (i, value) { - return { - type: "bi.label", - height: 25, - text: value - } - }) - var title = BI.createWidget({ - type: "bi.button_group", - height: 25, - items: items - }) - var days = this._dateCreator(o.year, o.month, o.day); - items = []; - items.push(days.slice(0, 7)); - items.push(days.slice(7, 14)); - items.push(days.slice(14, 21)); - items.push(days.slice(21, 28)); - items.push(days.slice(28, 35)); - items.push(days.slice(35, 42)); - - items = BI.map(items, function (i, item) { - return BI.map(item, function (j, td) { - return BI.extend(td, { - type: "bi.text_item", - cls: "bi-list-item-active", - textAlign: "center", - whiteSpace: "normal", - once: false, - forceSelected: true, - height: 25, - value: o.year + "-" + o.month + "-" + td.text, - disabled: td.lastMonth || td.nextMonth || td.disabled - //selected: td.currentDay - }); - }); - }); - - this.days = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(items, {}), - layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - columns: 7, - rows: 6, - columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], - rowSize: 25 - }))] - }); - this.days.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }) - BI.createWidget(BI.extend({ - element: this - - }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", title, this.days) - })))); - }, - - isFrontDate: function () { - var o = this.options, c = this._const; - var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); - Y = Y | 0; - De.setFullYear(Y, M, 1); - var newDate = De.getOffsetDate(-1 * (day + 1)); - return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; - }, - - isFinalDate: function () { - var o = this.options, c = this._const; - var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); - Y = Y | 0; - De.setFullYear(Y, M, 1); - var newDate = De.getOffsetDate(42 - day); - return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; - }, - - setValue: function (ob) { - this.days.setValue([ob.year + "-" + ob.month + "-" + ob.day]); - }, - - getValue: function () { - var date = this.days.getValue()[0].match(/\d+/g); - return { - year: date[0] | 0, - month: date[1] | 0, - day: date[2] | 0 - } - } -}); - -BI.extend(BI.Calendar, { - getPageByDateJSON: function (json) { - var year = new Date().getFullYear(); - var month = new Date().getMonth(); - var page = (json.year - year) * 12; - page += json.month - month; - return page; - }, - getDateJSONByPage: function(v){ - var months = new Date().getMonth(); - var page = v; - - //对当前page做偏移,使到当前年初 - page = page + months; - - var year = BI.parseInt(page / 12); - if(page < 0 && page % 12 !== 0){ - year--; - } - var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12); - return { - year: new Date().getFullYear() + year, - month: month - } - } -}); - -BI.shortcut("bi.calendar", BI.Calendar);/** - * Created by GUY on 2015/8/28. - * @class BI.YearCalendar - * @extends BI.Widget - */ -BI.YearCalendar = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-year-calendar", - behaviors: {}, - logic: { - dynamic: false - }, - min: '1900-01-01', //最小日期 - max: '2099-12-31', //最大日期 - year: null - }) - }, - - _yearCreator: function (Y) { - var o = this.options; - Y = Y | 0; - var start = BI.YearCalendar.getStartYear(Y); - var items = []; - BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) { - var td = {}; - if (Date.checkVoid(start + i, 1, 1, o.min, o.max)[0]) { - td.disabled = true; - } - td.text = start + i; - items.push(td); - }); - return items; - }, - - _init: function () { - BI.YearCalendar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.currentYear = new Date().getFullYear(); - var years = this._yearCreator(o.year || this.currentYear); - - //纵向排列年 - var len = years.length, tyears = BI.makeArray(len, ""); - var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; - BI.each(years, function (i, y) { - tyears[i] = years[map[i]]; - }); - var items = []; - items.push(tyears.slice(0, 2)); - items.push(tyears.slice(2, 4)); - items.push(tyears.slice(4, 6)); - items.push(tyears.slice(6, 8)); - items.push(tyears.slice(8, 10)); - items.push(tyears.slice(10, 12)); - - items = BI.map(items, function (i, item) { - return BI.map(item, function (j, td) { - return BI.extend(td, { - type: "bi.text_item", - cls: "bi-list-item-active", - textAlign: "center", - whiteSpace: "normal", - once: false, - forceSelected: true, - height: 23, - width: 38, - value: td.text, - disabled: td.disabled - }); - }); - }); - - this.years = BI.createWidget({ - type: "bi.button_group", - behaviors: o.behaviors, - items: BI.createItems(items, {}), - layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { - columns: 2, - rows: 6, - columnSize: [1 / 2, 1 / 2], - rowSize: 25 - })), { - type: "bi.center_adapt", - vgap: 1 - }] - }); - this.years.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - BI.createWidget(BI.extend({ - element: this - - }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this.years) - })))); - }, - - isFrontYear: function () { - var o = this.options; - var Y = o.year; - Y = Y | 0; - return !!Date.checkVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0]; - }, - - isFinalYear: function () { - var o = this.options, c = this._const; - var Y = o.year; - Y = Y | 0; - return !!Date.checkVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0]; - }, - - setValue: function (val) { - this.years.setValue([val]); - }, - - getValue: function () { - return this.years.getValue()[0]; - } -}); -//类方法 -BI.extend(BI.YearCalendar, { - INTERVAL: 12, - - //获取显示的第一年 - getStartYear: function (year) { - var cur = new Date().getFullYear(); - return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL; - }, - - getEndYear: function (year) { - return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; - }, - - getPageByYear: function (year) { - var cur = new Date().getFullYear(); - year = BI.YearCalendar.getStartYear(year); - return (year - cur + 3) / BI.YearCalendar.INTERVAL; - } -}); - -BI.shortcut("bi.year_calendar", BI.YearCalendar);/** - * 绘制一些较复杂的canvas - * - * Created by GUY on 2015/11/24. - * @class BI.ComplexCanvas - * @extends BI.Widget - */ -BI.ComplexCanvas = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-complex-canvas" - }) - }, - - - _init: function () { - BI.ComplexCanvas.superclass._init.apply(this, arguments); - var o = this.options; - this.canvas = BI.createWidget({ - type: "bi.canvas", - element: this, - width: o.width, - height: o.height - }); - }, - - //绘制树枝节点 - branch: function (x0, y0, x1, y1, x2, y2) { - var self = this, args = [].slice.call(arguments); - if (args.length <= 5) { - return this.canvas.line.apply(this.canvas, arguments); - } - var options; - if (BI.isOdd(args.length)) { - options = BI.last(args); - args = BI.initial(args); - } - args = [].slice.call(args, 2); - var odd = BI.filter(args, function (i) { - return i % 2 === 0; - }); - var even = BI.filter(args, function (i) { - return i % 2 !== 0; - }); - options || (options = {}); - var offset = options.offset || 20; - if ((y0 > y1 && y0 > y2) || (y0 < y1 && y0 < y2)) { - if (y0 > y1 && y0 > y2) { - var y = Math.max.apply(this, even) + offset; - } else { - var y = Math.min.apply(this, even) - offset; - } - var minx = Math.min.apply(this, odd); - var minix = BI.indexOf(odd, minx); - var maxx = Math.max.apply(this, odd); - var maxix = BI.indexOf(odd, maxx); - this.canvas.line(minx, even[minix], minx, y, maxx, y, maxx, even[maxix], options); - BI.each(odd, function (i, dot) { - if (i !== maxix && i !== minix) { - self.canvas.line(dot, even[i], dot, y, options); - } - }); - this.canvas.line(x0, y, x0, y0, options); - return; - } - if ((x0 > x1 && x0 > x2) || (x0 < x1 && x0 < x2)) { - if (x0 > x1 && x0 > x2) { - var x = Math.max.apply(this, odd) + offset; - } else { - var x = Math.min.apply(this, odd) - offset; - } - var miny = Math.min.apply(this, even); - var miniy = BI.indexOf(even, miny); - var maxy = Math.max.apply(this, even); - var maxiy = BI.indexOf(even, maxy); - this.canvas.line(odd[miniy], miny, x, miny, x, maxy, odd[maxiy], maxy, options); - BI.each(even, function (i, dot) { - if (i !== miniy && i !== maxiy) { - self.canvas.line(odd[i], dot, x, dot, options); - } - }); - this.canvas.line(x, y0, x0, y0, options); - return; - } - }, - - stroke: function (callback) { - this.canvas.stroke(callback); - } -}); - -BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/** - * Created by roy on 15/10/16. - * 上箭头与下箭头切换的树节点 - */ -BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{ - _defaultConfig:function(){ - return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{ - extraCls:"bi-arrow-tree-group-node", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function(){ - BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments); - }, - setSelected: function(v){ - BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"); - } else { - this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font"); - } - } -}); -BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox);/** - * 十字型的树节点 - * @class BI.CheckingMarkNode - * @extends BI.IconButton - */ -BI.CheckingMarkNode = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), { - extraCls: "check-mark-font", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function() { - BI.CheckingMarkNode.superclass._init.apply(this, arguments); - this.setSelected(this.options.selected); - - }, - setSelected: function(v){ - BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("check-mark-font"); - } else { - this.element.removeClass("check-mark-font"); - } - } -}); -BI.shortcut("bi.checking_mark_node", BI.CheckingMarkNode);/** - * 十字型的树节点 - * @class BI.FirstTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type2", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type2"); - } else { - this.element.removeClass("tree-expand-icon-type2"); - } - } -}); -BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox);/** - * 十字型的树节点 - * @class BI.LastTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type4", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type3"); - } else { - this.element.removeClass("tree-expand-icon-type3"); - } - } -}); -BI.shortcut("bi.last_tree_node_checkbox", BI.LastTreeNodeCheckbox);/** - * 十字型的树节点 - * @class BI.MidTreeNodeCheckbox - * @extends BI.IconButton - */ -BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type3", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v===true) { - this.element.addClass("tree-expand-icon-type3"); - } else { - this.element.removeClass("tree-expand-icon-type3"); - } - } -}); -BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/** - * 三角形的树节点 - * Created by GUY on 2015/9/6. - * @class BI.TreeGroupNodeCheckbox - * @extends BI.IconButton - */ -BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-node-triangle-collapse-font", - iconWidth: 13, - iconHeight: 13 - }); - }, - _init:function() { - BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"); - } else { - this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font"); - } - } -}); -BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/** - * 十字型的树节点 - * @class BI.TreeNodeCheckbox - * @extends BI.IconButton - */ -BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, { - _defaultConfig: function() { - return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "tree-collapse-icon-type1", - iconWidth: 25, - iconHeight: 25 - }); - }, - _init:function() { - BI.TreeNodeCheckbox.superclass._init.apply(this, arguments); - - }, - setSelected: function(v){ - BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); - if(v) { - this.element.addClass("tree-expand-icon-type1"); - } else { - this.element.removeClass("tree-expand-icon-type1"); - } - } -}); -BI.shortcut("bi.tree_node_checkbox", BI.TreeNodeCheckbox);/*! - * clipboard.js v1.6.1 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -try {//IE8下会抛错 - (function (f) { - if (typeof exports === "object" && typeof module !== "undefined") { - module.exports = f() - } else if (typeof define === "function" && define.amd) { - define([], f) - } else { - var g; - if (typeof window !== "undefined") { - g = window - } else if (typeof global !== "undefined") { - g = global - } else if (typeof self !== "undefined") { - g = self - } else { - g = this - } - g.Clipboard = f() - } - })(function () { - var define, module, exports; - return (function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require; - if (!u && a)return a(o, !0); - if (i)return i(o, !0); - var f = new Error("Cannot find module '" + o + "'"); - throw f.code = "MODULE_NOT_FOUND", f - } - var l = n[o] = {exports: {}}; - t[o][0].call(l.exports, function (e) { - var n = t[o][1][e]; - return s(n ? n : e) - }, l, l.exports, e, t, n, r) - } - return n[o].exports - } - - var i = typeof require == "function" && require; - for (var o = 0; o < r.length; o++)s(r[o]); - return s - })({ - 1: [function (require, module, exports) { - var DOCUMENT_NODE_TYPE = 9; - - /** - * A polyfill for Element.matches() - */ - if (typeof Element !== 'undefined' && !Element.prototype.matches) { - var proto = Element.prototype; - - proto.matches = proto.matchesSelector || - proto.mozMatchesSelector || - proto.msMatchesSelector || - proto.oMatchesSelector || - proto.webkitMatchesSelector; - } - - /** - * Finds the closest parent that matches a selector. - * - * @param {Element} element - * @param {String} selector - * @return {Function} - */ - function closest(element, selector) { - while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { - if (element.matches(selector)) return element; - element = element.parentNode; - } - } - - module.exports = closest; - - }, {}], 2: [function (require, module, exports) { - var closest = require('./closest'); - - /** - * Delegates event to a selector. - * - * @param {Element} element - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @param {Boolean} useCapture - * @return {Object} - */ - function delegate(element, selector, type, callback, useCapture) { - var listenerFn = listener.apply(this, arguments); - - element.addEventListener(type, listenerFn, useCapture); - - return { - destroy: function () { - element.removeEventListener(type, listenerFn, useCapture); - } - } - } - - /** - * Finds closest match and invokes callback. - * - * @param {Element} element - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @return {Function} - */ - function listener(element, selector, type, callback) { - return function (e) { - e.delegateTarget = closest(e.target, selector); - - if (e.delegateTarget) { - callback.call(element, e); - } - } - } - - module.exports = delegate; - - }, {"./closest": 1}], 3: [function (require, module, exports) { - /** - * Check if argument is a HTML element. - * - * @param {Object} value - * @return {Boolean} - */ - exports.node = function (value) { - return value !== undefined - && value instanceof HTMLElement - && value.nodeType === 1; - }; - - /** - * Check if argument is a list of HTML elements. - * - * @param {Object} value - * @return {Boolean} - */ - exports.nodeList = function (value) { - var type = Object.prototype.toString.call(value); - - return value !== undefined - && (type === '[object NodeList]' || type === '[object HTMLCollection]') - && ('length' in value) - && (value.length === 0 || exports.node(value[0])); - }; - - /** - * Check if argument is a string. - * - * @param {Object} value - * @return {Boolean} - */ - exports.string = function (value) { - return typeof value === 'string' - || value instanceof String; - }; - - /** - * Check if argument is a function. - * - * @param {Object} value - * @return {Boolean} - */ - exports.fn = function (value) { - var type = Object.prototype.toString.call(value); - - return type === '[object Function]'; - }; - - }, {}], 4: [function (require, module, exports) { - var is = require('./is'); - var delegate = require('delegate'); - - /** - * Validates all params and calls the right - * listener function based on its target type. - * - * @param {String|HTMLElement|HTMLCollection|NodeList} target - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listen(target, type, callback) { - if (!target && !type && !callback) { - throw new Error('Missing required arguments'); - } - - if (!is.string(type)) { - throw new TypeError('Second argument must be a String'); - } - - if (!is.fn(callback)) { - throw new TypeError('Third argument must be a Function'); - } - - if (is.node(target)) { - return listenNode(target, type, callback); - } - else if (is.nodeList(target)) { - return listenNodeList(target, type, callback); - } - else if (is.string(target)) { - return listenSelector(target, type, callback); - } - else { - throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); - } - } - - /** - * Adds an event listener to a HTML element - * and returns a remove listener function. - * - * @param {HTMLElement} node - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenNode(node, type, callback) { - node.addEventListener(type, callback); - - return { - destroy: function () { - node.removeEventListener(type, callback); - } - } - } - - /** - * Add an event listener to a list of HTML elements - * and returns a remove listener function. - * - * @param {NodeList|HTMLCollection} nodeList - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenNodeList(nodeList, type, callback) { - Array.prototype.forEach.call(nodeList, function (node) { - node.addEventListener(type, callback); - }); - - return { - destroy: function () { - Array.prototype.forEach.call(nodeList, function (node) { - node.removeEventListener(type, callback); - }); - } - } - } - - /** - * Add an event listener to a selector - * and returns a remove listener function. - * - * @param {String} selector - * @param {String} type - * @param {Function} callback - * @return {Object} - */ - function listenSelector(selector, type, callback) { - return delegate(document.body, selector, type, callback); - } - - module.exports = listen; - - }, {"./is": 3, "delegate": 2}], 5: [function (require, module, exports) { - function select(element) { - var selectedText; - - if (element.nodeName === 'SELECT') { - element.focus(); - - selectedText = element.value; - } - else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { - var isReadOnly = element.hasAttribute('readonly'); - - if (!isReadOnly) { - element.setAttribute('readonly', ''); - } - - element.select(); - element.setSelectionRange(0, element.value.length); - - if (!isReadOnly) { - element.removeAttribute('readonly'); - } - - selectedText = element.value; - } - else { - if (element.hasAttribute('contenteditable')) { - element.focus(); - } - - var selection = window.getSelection(); - var range = document.createRange(); - - range.selectNodeContents(element); - selection.removeAllRanges(); - selection.addRange(range); - - selectedText = selection.toString(); - } - - return selectedText; - } - - module.exports = select; - - }, {}], 6: [function (require, module, exports) { - function E() { - // Keep this empty so it's easier to inherit from - // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) - } - - E.prototype = { - on: function (name, callback, ctx) { - var e = this.e || (this.e = {}); - - (e[name] || (e[name] = [])).push({ - fn: callback, - ctx: ctx - }); - - return this; - }, - - once: function (name, callback, ctx) { - var self = this; - - function listener() { - self.off(name, listener); - callback.apply(ctx, arguments); - }; - - listener._ = callback - return this.on(name, listener, ctx); - }, - - emit: function (name) { - var data = [].slice.call(arguments, 1); - var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); - var i = 0; - var len = evtArr.length; - - for (i; i < len; i++) { - evtArr[i].fn.apply(evtArr[i].ctx, data); - } - - return this; - }, - - off: function (name, callback) { - var e = this.e || (this.e = {}); - var evts = e[name]; - var liveEvents = []; - - if (evts && callback) { - for (var i = 0, len = evts.length; i < len; i++) { - if (evts[i].fn !== callback && evts[i].fn._ !== callback) - liveEvents.push(evts[i]); - } - } - - // Remove event from queue to prevent memory leak - // Suggested by https://github.com/lazd - // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 - - (liveEvents.length) - ? e[name] = liveEvents - : delete e[name]; - - return this; - } - }; - - module.exports = E; - - }, {}], 7: [function (require, module, exports) { - (function (global, factory) { - if (typeof define === "function" && define.amd) { - define(['module', 'select'], factory); - } else if (typeof exports !== "undefined") { - factory(module, require('select')); - } else { - var mod = { - exports: {} - }; - factory(mod, global.select); - global.clipboardAction = mod.exports; - } - })(this, function (module, _select) { - 'use strict'; - - var _select2 = _interopRequireDefault(_select); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - } - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - var ClipboardAction = function () { - /** - * @param {Object} options - */ - function ClipboardAction(options) { - _classCallCheck(this, ClipboardAction); - - this.resolveOptions(options); - this.initSelection(); - } - - /** - * Defines base properties passed from constructor. - * @param {Object} options - */ - - - _createClass(ClipboardAction, [{ - key: 'resolveOptions', - value: function resolveOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = options.action; - this.emitter = options.emitter; - this.target = options.target; - this.text = options.text; - this.trigger = options.trigger; - - this.selectedText = ''; - } - }, { - key: 'initSelection', - value: function initSelection() { - if (this.text) { - this.selectFake(); - } else if (this.target) { - this.selectTarget(); - } - } - }, { - key: 'selectFake', - value: function selectFake() { - var _this = this; - - var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; - - this.removeFake(); - - this.fakeHandlerCallback = function () { - return _this.removeFake(); - }; - this.fakeHandler = document.body.addEventListener('click', this.fakeHandlerCallback) || true; - - this.fakeElem = document.createElement('textarea'); - // Prevent zooming on iOS - this.fakeElem.style.fontSize = '12pt'; - // Reset box model - this.fakeElem.style.border = '0'; - this.fakeElem.style.padding = '0'; - this.fakeElem.style.margin = '0'; - // Move element out of screen horizontally - this.fakeElem.style.position = 'absolute'; - this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; - // Move element to the same position vertically - var yPosition = window.pageYOffset || document.documentElement.scrollTop; - this.fakeElem.style.top = yPosition + 'px'; - - this.fakeElem.setAttribute('readonly', ''); - this.fakeElem.value = this.text; - - document.body.appendChild(this.fakeElem); - - this.selectedText = (0, _select2["default"])(this.fakeElem); - this.copyText(); - } - }, { - key: 'removeFake', - value: function removeFake() { - if (this.fakeHandler) { - document.body.removeEventListener('click', this.fakeHandlerCallback); - this.fakeHandler = null; - this.fakeHandlerCallback = null; - } - - if (this.fakeElem) { - document.body.removeChild(this.fakeElem); - this.fakeElem = null; - } - } - }, { - key: 'selectTarget', - value: function selectTarget() { - this.selectedText = (0, _select2["default"])(this.target); - this.copyText(); - } - }, { - key: 'copyText', - value: function copyText() { - var succeeded = void 0; - - try { - succeeded = document.execCommand(this.action); - } catch (err) { - succeeded = false; - } - - this.handleResult(succeeded); - } - }, { - key: 'handleResult', - value: function handleResult(succeeded) { - this.emitter.emit(succeeded ? 'success' : 'error', { - action: this.action, - text: this.selectedText, - trigger: this.trigger, - clearSelection: this.clearSelection.bind(this) - }); - } - }, { - key: 'clearSelection', - value: function clearSelection() { - if (this.target) { - this.target.blur(); - } - - window.getSelection().removeAllRanges(); - } - }, { - key: 'destroy', - value: function destroy() { - this.removeFake(); - } - }, { - key: 'action', - set: function set() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; - - this._action = action; - - if (this._action !== 'copy' && this._action !== 'cut') { - throw new Error('Invalid "action" value, use either "copy" or "cut"'); - } - }, - get: function get() { - return this._action; - } - }, { - key: 'target', - set: function set(target) { - if (target !== undefined) { - if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { - if (this.action === 'copy' && target.hasAttribute('disabled')) { - throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); - } - - if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { - throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); - } - - this._target = target; - } else { - throw new Error('Invalid "target" value, use a valid Element'); - } - } - }, - get: function get() { - return this._target; - } - }]); - - return ClipboardAction; - }(); - - module.exports = ClipboardAction; - }); - - }, {"select": 5}], 8: [function (require, module, exports) { - (function (global, factory) { - if (typeof define === "function" && define.amd) { - define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); - } else if (typeof exports !== "undefined") { - factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); - } else { - var mod = { - exports: {} - }; - factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); - global.clipboard = mod.exports; - } - })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { - 'use strict'; - - var _clipboardAction2 = _interopRequireDefault(_clipboardAction); - - var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); - - var _goodListener2 = _interopRequireDefault(_goodListener); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - function _possibleConstructorReturn(self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - } - - var Clipboard = function (_Emitter) { - _inherits(Clipboard, _Emitter); - - /** - * @param {String|HTMLElement|HTMLCollection|NodeList} trigger - * @param {Object} options - */ - function Clipboard(trigger, options) { - _classCallCheck(this, Clipboard); - - var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); - - _this.resolveOptions(options); - _this.listenClick(trigger); - return _this; - } - - /** - * Defines if attributes would be resolved using internal setter functions - * or custom functions that were passed in the constructor. - * @param {Object} options - */ - - - _createClass(Clipboard, [{ - key: 'resolveOptions', - value: function resolveOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = typeof options.action === 'function' ? options.action : this.defaultAction; - this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; - this.text = typeof options.text === 'function' ? options.text : this.defaultText; - } - }, { - key: 'listenClick', - value: function listenClick(trigger) { - var _this2 = this; - - this.listener = (0, _goodListener2["default"])(trigger, 'click', function (e) { - return _this2.onClick(e); - }); - } - }, { - key: 'onClick', - value: function onClick(e) { - var trigger = e.delegateTarget || e.currentTarget; - - if (this.clipboardAction) { - this.clipboardAction = null; - } - - this.clipboardAction = new _clipboardAction2["default"]({ - action: this.action(trigger), - target: this.target(trigger), - text: this.text(trigger), - trigger: trigger, - emitter: this - }); - } - }, { - key: 'defaultAction', - value: function defaultAction(trigger) { - return getAttributeValue('action', trigger); - } - }, { - key: 'defaultTarget', - value: function defaultTarget(trigger) { - var selector = getAttributeValue('target', trigger); - - if (selector) { - return document.querySelector(selector); - } - } - }, { - key: 'defaultText', - value: function defaultText(trigger) { - return getAttributeValue('text', trigger); - } - }, { - key: 'destroy', - value: function destroy() { - this.listener.destroy(); - - if (this.clipboardAction) { - this.clipboardAction.destroy(); - this.clipboardAction = null; - } - } - }], [{ - key: 'isSupported', - value: function isSupported() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; - - var actions = typeof action === 'string' ? [action] : action; - var support = !!document.queryCommandSupported; - - actions.forEach(function (action) { - support = support && !!document.queryCommandSupported(action); - }); - - return support; - } - }]); - - return Clipboard; - }(_tinyEmitter2["default"]); - - /** - * Helper function to retrieve attribute value. - * @param {String} suffix - * @param {Element} element - */ - function getAttributeValue(suffix, element) { - var attribute = 'data-clipboard-' + suffix; - - if (!element.hasAttribute(attribute)) { - return; - } - - return element.getAttribute(attribute); - } - - module.exports = Clipboard; - }); - - }, {"./clipboard-action": 7, "good-listener": 4, "tiny-emitter": 6}] - }, {}, [8])(8) - }); -} catch (e) { - /* - * zClip :: jQuery ZeroClipboard v1.1.1 - * http://steamdev.com/zclip - * - * Copyright 2011, SteamDev - * Released under the MIT license. - * http://www.opensource.org/licenses/mit-license.php - * - * Date: Wed Jun 01, 2011 - */ - - - (function ($) { - - $.fn.zclip = function (params) { - - if (typeof params == "object" && !params.length) { - - var settings = $.extend({ - - path: 'ZeroClipboard.swf', - copy: null, - beforeCopy: null, - afterCopy: null, - clickAfter: true, - setHandCursor: true, - setCSSEffects: true - - }, params); - - - return this.each(function () { - - var o = $(this); - - if (o.is(':visible') && (typeof settings.copy == 'string' || $.isFunction(settings.copy))) { - - ZeroClipboard.setMoviePath(settings.path); - var clip = new ZeroClipboard.Client(); - - if ($.isFunction(settings.copy)) { - o.bind('zClip_copy', settings.copy); - } - if ($.isFunction(settings.beforeCopy)) { - o.bind('zClip_beforeCopy', settings.beforeCopy); - } - if ($.isFunction(settings.afterCopy)) { - o.bind('zClip_afterCopy', settings.afterCopy); - } - - clip.setHandCursor(settings.setHandCursor); - clip.setCSSEffects(settings.setCSSEffects); - clip.addEventListener('mouseOver', function (client) { - o.trigger('mouseenter'); - }); - clip.addEventListener('mouseOut', function (client) { - o.trigger('mouseleave'); - }); - clip.addEventListener('mouseDown', function (client) { - - o.trigger('mousedown'); - - if (!$.isFunction(settings.copy)) { - clip.setText(settings.copy); - } else { - clip.setText(o.triggerHandler('zClip_copy')); - } - - if ($.isFunction(settings.beforeCopy)) { - o.trigger('zClip_beforeCopy'); - } - - }); - - clip.addEventListener('complete', function (client, text) { - - if ($.isFunction(settings.afterCopy)) { - - o.trigger('zClip_afterCopy'); - - } else { - if (text.length > 500) { - text = text.substr(0, 500) + "...\n\n(" + (text.length - 500) + " characters not shown)"; - } - - o.removeClass('hover'); - alert("Copied text to clipboard:\n\n " + text); - } - - if (settings.clickAfter) { - o.trigger('click'); - } - - }); - - - clip.glue(o[0], o.parent()[0]); - - $(window).bind('load resize', function () { - clip.reposition(); - }); - - - } - - }); - - } else if (typeof params == "string") { - - return this.each(function () { - - var o = $(this); - - params = params.toLowerCase(); - var zclipId = o.data('zclipId'); - var clipElm = $('#' + zclipId + '.zclip'); - - if (params == "remove") { - - clipElm.remove(); - o.removeClass('active hover'); - - } else if (params == "hide") { - - clipElm.hide(); - o.removeClass('active hover'); - - } else if (params == "show") { - - clipElm.show(); - - } - - }); - - } - - } - - - })(jQuery); - - -// ZeroClipboard -// Simple Set Clipboard System -// Author: Joseph Huckaby - var ZeroClipboard = { - - version: "1.0.7", - clients: {}, - // registered upload clients on page, indexed by id - moviePath: 'ZeroClipboard.swf', - // URL to movie - nextId: 1, - // ID of next movie - $: function (thingy) { - // simple DOM lookup utility function - if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); - if (!thingy.addClass) { - // extend element with a few useful methods - thingy.hide = function () { - this.style.display = 'none'; - }; - thingy.show = function () { - this.style.display = ''; - }; - thingy.addClass = function (name) { - this.removeClass(name); - this.className += ' ' + name; - }; - thingy.removeClass = function (name) { - var classes = this.className.split(/\s+/); - var idx = -1; - for (var k = 0; k < classes.length; k++) { - if (classes[k] == name) { - idx = k; - k = classes.length; - } - } - if (idx > -1) { - classes.splice(idx, 1); - this.className = classes.join(' '); - } - return this; - }; - thingy.hasClass = function (name) { - return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); - }; - } - return thingy; - }, - - setMoviePath: function (path) { - // set path to ZeroClipboard.swf - this.moviePath = path; - }, - - dispatch: function (id, eventName, args) { - // receive event from flash movie, send to client - var client = this.clients[id]; - if (client) { - client.receiveEvent(eventName, args); - } - }, - - register: function (id, client) { - // register new client to receive events - this.clients[id] = client; - }, - - getDOMObjectPosition: function (obj, stopObj) { - // get absolute coordinates for dom element - var info = { - left: 0, - top: 0, - width: obj.width ? obj.width : obj.offsetWidth, - height: obj.height ? obj.height : obj.offsetHeight - }; - - if (obj && (obj != stopObj)) { - info.left += obj.offsetLeft; - info.top += obj.offsetTop; - } - - return info; - }, - - Client: function (elem) { - // constructor for new simple upload client - this.handlers = {}; - - // unique ID - this.id = ZeroClipboard.nextId++; - this.movieId = 'ZeroClipboardMovie_' + this.id; - - // register client with singleton to receive flash events - ZeroClipboard.register(this.id, this); - - // create movie - if (elem) this.glue(elem); - } - }; - - ZeroClipboard.Client.prototype = { - - id: 0, - // unique ID for us - ready: false, - // whether movie is ready to receive events or not - movie: null, - // reference to movie object - clipText: '', - // text to copy to clipboard - handCursorEnabled: true, - // whether to show hand cursor, or default pointer cursor - cssEffects: true, - // enable CSS mouse effects on dom container - handlers: null, - // user event handlers - glue: function (elem, appendElem, stylesToAdd) { - // glue to DOM element - // elem can be ID or actual DOM element object - this.domElement = ZeroClipboard.$(elem); - - // float just above object, or zIndex 99 if dom element isn't set - var zIndex = 99; - if (this.domElement.style.zIndex) { - zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; - } - - if (typeof(appendElem) == 'string') { - appendElem = ZeroClipboard.$(appendElem); - } else if (typeof(appendElem) == 'undefined') { - appendElem = document.getElementsByTagName('body')[0]; - } - - // find X/Y position of domElement - var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); - - // create floating DIV above element - this.div = document.createElement('div'); - this.div.className = "zclip"; - this.div.id = "zclip-" + this.movieId; - $(this.domElement).data('zclipId', 'zclip-' + this.movieId); - var style = this.div.style; - style.position = 'absolute'; - style.left = '' + box.left + 'px'; - style.top = '' + box.top + 'px'; - style.width = '' + box.width + 'px'; - style.height = '' + box.height + 'px'; - style.zIndex = zIndex; - - if (typeof(stylesToAdd) == 'object') { - for (addedStyle in stylesToAdd) { - style[addedStyle] = stylesToAdd[addedStyle]; - } - } - - // style.backgroundColor = '#f00'; // debug - appendElem.appendChild(this.div); - - this.div.innerHTML = this.getHTML(box.width, box.height); - }, - - getHTML: function (width, height) { - // return HTML for movie - var html = ''; - var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; - - if (navigator.userAgent.match(/MSIE/)) { - // IE gets an OBJECT tag - var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; - html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; - } else { - // all other browsers get an EMBED tag - html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; - } - return html; - }, - - hide: function () { - // temporarily hide floater offscreen - if (this.div) { - this.div.style.left = '-2000px'; - } - }, - - show: function () { - // show ourselves after a call to hide() - this.reposition(); - }, - - destroy: function () { - // destroy control and floater - if (this.domElement && this.div) { - this.hide(); - this.div.innerHTML = ''; - - var body = document.getElementsByTagName('body')[0]; - try { - body.removeChild(this.div); - } catch (e) { - ; - } - - this.domElement = null; - this.div = null; - } - }, - - reposition: function (elem) { - // reposition our floating div, optionally to new container - // warning: container CANNOT change size, only position - if (elem) { - this.domElement = ZeroClipboard.$(elem); - if (!this.domElement) this.hide(); - } - - if (this.domElement && this.div) { - var box = ZeroClipboard.getDOMObjectPosition(this.domElement); - var style = this.div.style; - style.left = '' + box.left + 'px'; - style.top = '' + box.top + 'px'; - } - }, - - setText: function (newText) { - // set text to be copied to clipboard - this.clipText = newText; - if (this.ready) { - this.movie.setText(newText); - } - }, - - addEventListener: function (eventName, func) { - // add user event listener for event - // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel - eventName = eventName.toString().toLowerCase().replace(/^on/, ''); - if (!this.handlers[eventName]) { - this.handlers[eventName] = []; - } - this.handlers[eventName].push(func); - }, - - setHandCursor: function (enabled) { - // enable hand cursor (true), or default arrow cursor (false) - this.handCursorEnabled = enabled; - if (this.ready) { - this.movie.setHandCursor(enabled); - } - }, - - setCSSEffects: function (enabled) { - // enable or disable CSS effects on DOM container - this.cssEffects = !!enabled; - }, - - receiveEvent: function (eventName, args) { - // receive event from flash - eventName = eventName.toString().toLowerCase().replace(/^on/, ''); - - // special behavior for certain events - switch (eventName) { - case 'load': - // movie claims it is ready, but in IE this isn't always the case... - // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function - this.movie = document.getElementById(this.movieId); - if (!this.movie) { - var self = this; - setTimeout(function () { - self.receiveEvent('load', null); - }, 1); - return; - } - - // firefox on pc needs a "kick" in order to set these in certain cases - if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { - var self = this; - setTimeout(function () { - self.receiveEvent('load', null); - }, 100); - this.ready = true; - return; - } - - this.ready = true; - try { - this.movie.setText(this.clipText); - } catch (e) { - } - try { - this.movie.setHandCursor(this.handCursorEnabled); - } catch (e) { - } - break; - - case 'mouseover': - if (this.domElement && this.cssEffects) { - this.domElement.addClass('hover'); - if (this.recoverActive) { - this.domElement.addClass('active'); - } - - - } - - - break; - - case 'mouseout': - if (this.domElement && this.cssEffects) { - this.recoverActive = false; - if (this.domElement.hasClass('active')) { - this.domElement.removeClass('active'); - this.recoverActive = true; - } - this.domElement.removeClass('hover'); - - } - break; - - case 'mousedown': - if (this.domElement && this.cssEffects) { - this.domElement.addClass('active'); - } - break; - - case 'mouseup': - if (this.domElement && this.cssEffects) { - this.domElement.removeClass('active'); - this.recoverActive = false; - } - break; - } // switch eventName - if (this.handlers[eventName]) { - for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { - var func = this.handlers[eventName][idx]; - - if (typeof(func) == 'function') { - // actual function reference - func(this, args); - } else if ((typeof(func) == 'object') && (func.length == 2)) { - // PHP style object + method, i.e. [myObject, 'myMethod'] - func[0][func[1]](this, args); - } else if (typeof(func) == 'string') { - // name of function - window[func](this, args); - } - } // foreach event handler defined - } // user defined handler for event - } - - }; -}/** - * 复制 - * Created by GUY on 2016/2/16. - * @class BI.ClipBoard - * @extends BI.BasicButton - */ -BI.ClipBoard = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-clipboard", - copy: BI.emptyFn, - afterCopy: BI.emptyFn - }) - }, - - _init: function () { - BI.ClipBoard.superclass._init.apply(this, arguments); - }, - - mounted: function () { - var self = this, o = this.options; - if (window.Clipboard) { - this.clipboard = new Clipboard(this.element[0], { - text: function () { - return BI.isFunction(o.copy) ? o.copy() : o.copy; - } - }); - this.clipboard.on("success", o.afterCopy) - } else { - this.element.zclip({ - path: BI.resourceURL + "/ZeroClipboard.swf", - copy: o.copy, - beforeCopy: o.beforeCopy, - afterCopy: o.afterCopy - }); - } - }, - - destroyed: function () { - this.clipboard && this.clipboard.destroy(); - } -}); - -BI.shortcut("bi.clipboard", BI.ClipBoard);/** - * 自定义选色 - * - * Created by GUY on 2015/11/17. - * @class BI.CustomColorChooser - * @extends BI.Widget - */ -BI.CustomColorChooser = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-custom-color-chooser", - width: 227, - height: 245 - }) - }, - - _init: function () { - BI.CustomColorChooser.superclass._init.apply(this, arguments); - var self = this; - this.editor = BI.createWidget({ - type: "bi.color_picker_editor", - width: 195 - }); - this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - }); - this.farbtastic = BI.createWidget({ - type: "bi.farbtastic" - }); - this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - type: "bi.absolute", - items: [{ - el: this.editor, - left: 15, - top: 10, - right: 15 - }], - height: 30 - }, { - type: "bi.absolute", - items: [{ - el: this.farbtastic, - left: 15, - right: 15, - top: 10 - }], - height: 215 - }] - }) - }, - - setValue: function (color) { - this.editor.setValue(color); - this.farbtastic.setValue(color); - }, - - getValue: function () { - return this.editor.getValue(); - } -}); -BI.CustomColorChooser.EVENT_CHANGE = "CustomColorChooser.EVENT_CHANGE"; -BI.shortcut("bi.custom_color_chooser", BI.CustomColorChooser);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooser - * @extends BI.Widget - */ -BI.ColorChooser = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-chooser", - el: {} - }) - }, - - _init: function () { - BI.ColorChooser.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(BI.extend({ - type: "bi.color_chooser_trigger", - width: o.width, - height: o.height - }, o.el)); - this.colorPicker = BI.createWidget({ - type: "bi.color_chooser_popup" - }); - - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 1, - el: this.trigger, - popup: { - el: this.colorPicker, - stopPropagation: false, - minWidth: 202 - } - }); - - var fn = function () { - var color = self.colorPicker.getValue(); - self.trigger.setValue(color); - var colors = BI.string2Array(BI.Cache.getItem("colors") || ""); - var que = new BI.Queue(8); - que.fromArray(colors); - que.remove(color); - que.unshift(color); - BI.Cache.setItem("colors", BI.array2String(que.toArray())); - }; - - this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () { - fn(); - }); - - this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { - fn(); - self.combo.hideView(); - }); - this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || "")); - }); - - this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { - self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); - }) - }, - - isViewVisible: function () { - return this.combo.isViewVisible(); - }, - - setValue: function (color) { - this.combo.setValue(color); - }, - - getValue: function () { - return this.colorPicker.getValue(); - } -}); -BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser", BI.ColorChooser);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooserPopup - * @extends BI.Widget - */ -BI.ColorChooserPopup = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-chooser-popup", - height: 145 - }) - }, - - _init: function () { - BI.ColorChooserPopup.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colorEditor = BI.createWidget({ - type: "bi.color_picker_editor" - }); - - this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { - self.setValue(this.getValue()); - self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); - }); - - this.storeColors = BI.createWidget({ - type: "bi.color_picker", - items: [[{ - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }, { - value: "", - disabled: true - }]], - width: 190, - height: 25 - }); - this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { - self.setValue(this.getValue()[0]); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - }); - - this.colorPicker = BI.createWidget({ - type: "bi.color_picker", - width: 190, - height: 50 - }); - - this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { - self.setValue(this.getValue()[0]); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - }); - - this.customColorChooser = BI.createWidget({ - type: "bi.custom_color_chooser" - }); - - var panel = BI.createWidget({ - type: "bi.popup_panel", - buttons: [BI.i18nText("BI-Basic_Cancel"), BI.i18nText("BI-Basic_Save")], - title: BI.i18nText("BI-Custom_Color"), - el: this.customColorChooser, - stopPropagation: false, - bgap: -1, - rgap: 1, - lgap: 1, - minWidth: 227 - }); - - this.more = BI.createWidget({ - type: "bi.combo", - direction: "right,top", - isNeedAdjustHeight: false, - el: { - type: "bi.text_item", - cls: "color-chooser-popup-more bi-list-item", - textAlign: "center", - height: 20, - text: BI.i18nText("BI-Basic_More") + "..." - }, - popup: panel - }); - - this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self.customColorChooser.setValue(self.getValue()); - }); - panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) { - switch (index) { - case 0: - self.more.hideView(); - break; - case 1: - self.setValue(self.customColorChooser.getValue()); - self.more.hideView(); - self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); - break; - } - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - el: { - type: "bi.absolute", - cls: "bi-background bi-border-bottom", - items: [{ - el: this.colorEditor, - left: 0, - right: 0, - top: 5 - }] - }, - height: 30 - }, { - el: { - type: "bi.absolute", - items: [{ - el: this.storeColors, - left: 5, - right: 5, - top: 5 - }] - }, - height: 30 - }, { - el: { - type: "bi.absolute", - items: [{ - el: this.colorPicker, - left: 5, - right: 5, - top: 5 - }] - }, - height: 65 - }, { - el: this.more, - height: 20 - }] - }) - }, - - setStoreColors: function (colors) { - if (BI.isArray(colors)) { - var items = BI.map(colors, function (i, color) { - return { - value: color - } - }); - BI.count(colors.length, 8, function (i) { - items.push({ - value: "", - disabled: true - }) - }); - this.storeColors.populate([items]); - } - }, - - setValue: function (color) { - this.colorEditor.setValue(color); - this.colorPicker.setValue(color); - this.storeColors.setValue(color); - }, - - getValue: function () { - return this.colorEditor.getValue(); - } -}); -BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE"; -BI.ColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);/** - * 选色控件 - * - * Created by GUY on 2015/11/17. - * @class BI.ColorChooserTrigger - * @extends BI.Trigger - */ -BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", - height: 30 - }) - }, - - _init: function () { - BI.ColorChooserTrigger.superclass._init.apply(this, arguments); - this.colorContainer = BI.createWidget({ - type: "bi.layout", - cls: "bi-card color-chooser-trigger-content" - }); - - var down = BI.createWidget({ - type: "bi.icon_button", - disableSelected: true, - cls: "icon-combo-down-icon trigger-triangle-font", - width: 12, - height: 8 - }); - - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.colorContainer, - left: 3, - right: 3, - top: 3, - bottom: 3 - }, { - el: down, - right: 3, - bottom: 3 - }] - }); - if (this.options.value) { - this.setValue(this.options.value); - } - }, - - setValue: function (color) { - BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments); - if (color === "") { - this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); - } else if (color === "transparent") { - this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background") - } else { - this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background"); - } - } -}); -BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE"; -BI.shortcut("bi.color_chooser_trigger", BI.ColorChooserTrigger);/** - * 简单选色控件按钮 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPickerButton - * @extends BI.BasicButton - */ -BI.ColorPickerButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-color-picker-button bi-background bi-border-top bi-border-left" - }) - }, - - _init: function () { - BI.ColorPickerButton.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.value) { - this.element.css("background-color", o.value); - var name = this.getName(); - this.element.hover(function () { - self._createMask(); - if (self.isEnabled()) { - BI.Maskers.show(name); - } - }, function () { - if (!self.isSelected()) { - BI.Maskers.hide(name); - } - }); - } - }, - - _createMask: function () { - var o = this.options, name = this.getName(); - if (this.isEnabled() && !BI.Maskers.has(name)) { - var w = BI.Maskers.make(name, this, { - offset: { - left: -1, - top: -1, - right: -1, - bottom: -1 - } - }); - w.element.addClass("color-picker-button-mask").css("background-color", o.value); - } - }, - - setSelected: function (b) { - BI.ColorPickerButton.superclass.setSelected.apply(this, arguments); - if (!!b) { - this._createMask(); - } - BI.Maskers[!!b ? "show" : "hide"](this.getName()); - } -}); -BI.ColorPickerButton.EVENT_CHANGE = "ColorPickerButton.EVENT_CHANGE"; -BI.shortcut("bi.color_picker_button", BI.ColorPickerButton);/** - * 简单选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPicker - * @extends BI.Widget - */ -BI.ColorPicker = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-picker", - items: null - }) - }, - - _items: [ - [{ - value: "#ffffff" - }, { - value: "#f2f2f2" - }, { - value: "#e5e5e5" - }, { - value: "#d9d9d9" - }, { - value: "#cccccc" - }, { - value: "#bfbfbf" - }, { - value: "#b2b2b2" - }, { - value: "#a6a6a6" - }, { - value: "#999999" - }, { - value: "#8c8c8c" - }, { - value: "#808080" - }, { - value: "#737373" - }, { - value: "#666666" - }, { - value: "#4d4d4d" - }, { - value: "#333333" - }, { - value: "#000000" - }], - [{ - value: "#d8b5a6" - }, { - value: "#ff9e9a" - }, { - value: "#ffc17d" - }, { - value: "#f5e56b" - }, { - value: "#d8e698" - }, { - value: "#e0ebaf" - }, { - value: "#c3d825" - }, { - value: "#bce2e8" - }, { - value: "#85d3cd" - }, { - value: "#bce2e8" - }, { - value: "#a0d8ef" - }, { - value: "#89c3eb" - }, { - value: "#bbc8e6" - }, { - value: "#bbbcde" - }, { - value: "#d6b4cc" - }, { - value: "#fbc0d3" - }], - [{ - value: "#bb9581" - }, { - value: "#f37d79" - }, { - value: "#fba74f" - }, { - value: "#ffdb4f" - }, { - value: "#c7dc68" - }, { - value: "#b0ca71" - }, { - value: "#99ab4e" - }, { - value: "#84b9cb" - }, { - value: "#00a3af" - }, { - value: "#2ca9e1" - }, { - value: "#0095d9" - }, { - value: "#4c6cb3" - }, { - value: "#8491c3" - }, { - value: "#a59aca" - }, { - value: "#cc7eb1" - }, { - value: "#e89bb4" - }], - [{ - value: "#9d775f" - }, { - value: "#dd4b4b" - }, { - value: "#ef8b07" - }, { - value: "#fcc800" - }, { - value: "#aacf53" - }, { - value: "#82ae46" - }, { - value: "#69821b" - }, { - value: "#59b9c6" - }, { - value: "#2a83a2" - }, { - value: "#007bbb" - }, { - value: "#19448e" - }, { - value: "#274a78" - }, { - value: "#4a488e" - }, { - value: "#7058a3" - }, { - value: "#884898" - }, { - value: "#d47596" - }] - ], - - _init: function () { - BI.ColorPicker.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colors = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(o.items || this._items, { - type: "bi.color_picker_button", - once: false - }), - layouts: [{ - type: "bi.grid" - }] - }); - this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () { - self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments); - }) - }, - - populate: function(items){ - var args =[].slice.call(arguments); - args[0] = BI.createItems(items, { - type: "bi.color_picker_button", - once: false - }); - this.colors.populate.apply(this.colors, args); - }, - - setValue: function (color) { - this.colors.setValue(color); - }, - - getValue: function () { - return this.colors.getValue(); - } -}); -BI.ColorPicker.EVENT_CHANGE = "ColorPicker.EVENT_CHANGE"; -BI.shortcut("bi.color_picker", BI.ColorPicker);/** - * 简单选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.ColorPickerEditor - * @extends BI.Widget - */ -BI.ColorPickerEditor = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-color-picker-editor", - width: 200, - height: 20 - }) - }, - - _init: function () { - BI.ColorPickerEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.colorShow = BI.createWidget({ - type: "bi.layout", - cls: "color-picker-editor-display bi-card", - height: 20 - }); - var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { - type: "bi.label", - cls: "color-picker-editor-label", - width: 10, - height: 20 - })); - - var checker = function (v) { - return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255; - }; - var Ws = BI.createWidgets([{}, {}, {}], { - type: "bi.small_text_editor", - cls: "color-picker-editor-input", - validationChecker: checker, - errorText: BI.i18nText("BI-Color_Picker_Error_Text"), - allowBlank: true, - value: 255, - width: 32, - height: 20 - }); - BI.each(Ws, function (i, w) { - w.on(BI.TextEditor.EVENT_CHANGE, function () { - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - }); - this.R = Ws[0]; - this.G = Ws[1]; - this.B = Ws[2]; - - this.none = BI.createWidget({ - type: "bi.checkbox", - title: BI.i18nText("BI-Basic_Auto") - }); - this.none.on(BI.Checkbox.EVENT_CHANGE, function () { - if (this.isSelected()) { - self.lastColor = self.getValue(); - self.setValue(""); - } else { - self.setValue(self.lastColor || "#000000"); - } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - - this.transparent = BI.createWidget({ - type: "bi.checkbox", - title: BI.i18nText("BI-Transparent_Color") - }); - this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () { - if (this.isSelected()) { - self.lastColor = self.getValue(); - self.setValue("transparent"); - } else { - self.setValue(self.lastColor || "#000000"); - } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { - self.colorShow.element.css("background-color", self.getValue()); - self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); - } - }); - - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.colorShow, - width: 'fill' - }, { - el: RGB[0], - lgap: 10, - width: 16 - }, { - el: this.R, - width: 32 - }, { - el: RGB[1], - lgap: 10, - width: 16 - }, { - el: this.G, - width: 32 - }, { - el: RGB[2], - lgap: 10, - width: 16 - }, { - el: this.B, - width: 32 - }, { - el: { - type: "bi.center_adapt", - items: [this.none] - }, - width: 18 - }, { - el: { - type: "bi.center_adapt", - items: [this.transparent] - }, - width: 18 - }] - }) - }, - - setValue: function (color) { - if (color === "transparent") { - this.transparent.setSelected(true); - this.none.setSelected(false); - this.R.setValue(""); - this.G.setValue(""); - this.B.setValue(""); - return; - } - if (!color) { - color = ""; - this.none.setSelected(true); - } else { - this.none.setSelected(false); - } - this.transparent.setSelected(false); - this.colorShow.element.css("background-color", color); - var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); - this.R.setValue(BI.isNull(json.r) ? "" : json.r); - this.G.setValue(BI.isNull(json.g) ? "" : json.g); - this.B.setValue(BI.isNull(json.b) ? "" : json.b); - }, - - getValue: function () { - if (this.transparent.isSelected()) { - return "transparent"; - } - return BI.DOM.rgb2hex(BI.DOM.json2rgb({ - r: this.R.getValue(), - g: this.G.getValue(), - b: this.B.getValue() - })) - } -}); -BI.ColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE"; -BI.shortcut("bi.color_picker_editor", BI.ColorPickerEditor);/** - * 选色控件 - * - * Created by GUY on 2015/11/16. - * @class BI.Farbtastic - * @extends BI.Widget - */ -BI.Farbtastic = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-farbtastic", - width: 195, - height: 195 - }) - }, - - _init: function () { - BI.Farbtastic.superclass._init.apply(this, arguments); - }, - - mounted: function () { - var self = this; - this.farbtastic = $.farbtastic(this.element, function (v) { - self.fireEvent(BI.Farbtastic.EVENT_CHANGE, self.getValue(), self); - }); - }, - - setValue: function (color) { - this.farbtastic.setColor(color); - }, - - getValue: function () { - return this.farbtastic.color; - } -}); -BI.Farbtastic.EVENT_CHANGE = "Farbtastic.EVENT_CHANGE"; -BI.shortcut("bi.farbtastic", BI.Farbtastic);/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -jQuery.fn.farbtastic = function (callback) { - $.farbtastic(this, callback); - return this; -}; - -jQuery.farbtastic = function (container, callback) { - var container = $(container).get(0); - return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); -} - -jQuery._farbtastic = function (container, callback) { - // Store farbtastic object - var fb = this; - - // Insert markup - $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>'); - var e = $('.farbtastic', container); - fb.wheel = $('.wheel', container).get(0); - // Dimensions - fb.radius = 84; - fb.square = 100; - fb.width = 194; - - // Fix background PNGs in IE6 - if (navigator.appVersion.match(/MSIE [0-6]\./)) { - $('*', e).each(function () { - if (this.currentStyle.backgroundImage != 'none') { - var image = this.currentStyle.backgroundImage; - image = this.currentStyle.backgroundImage.substring(5, image.length - 2); - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }); - } - }); - } - - /** - * Link to the given element(s) or callback. - */ - fb.linkTo = function (callback) { - // Unbind previous nodes - if (typeof fb.callback == 'object') { - $(fb.callback).unbind('keyup', fb.updateValue); - } - - // Reset color - fb.color = null; - - // Bind callback or elements - if (typeof callback == 'function') { - fb.callback = callback; - } - else if (typeof callback == 'object' || typeof callback == 'string') { - fb.callback = $(callback); - fb.callback.bind('keyup', fb.updateValue); - if (fb.callback.get(0).value) { - fb.setColor(fb.callback.get(0).value); - } - } - return this; - } - fb.updateValue = function (event) { - if (this.value && this.value != fb.color) { - fb.setColor(this.value); - } - } - - /** - * Change color with HTML syntax #123456 - */ - fb.setColor = function (color) { - var unpack = fb.unpack(color); - if (fb.color != color && unpack) { - fb.color = color; - fb.rgb = unpack; - fb.hsl = fb.RGBToHSL(fb.rgb); - fb.updateDisplay(); - } - return this; - } - - /** - * Change color with HSL triplet [0..1, 0..1, 0..1] - */ - fb.setHSL = function (hsl) { - fb.hsl = hsl; - fb.rgb = fb.HSLToRGB(hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - ///////////////////////////////////////////////////// - - /** - * Retrieve the coordinates of the given event relative to the center - * of the widget. - */ - fb.widgetCoords = function (event) { - var x, y; - var el = event.target || event.srcElement; - var reference = fb.wheel; - - if (typeof event.offsetX != 'undefined') { - // Use offset coordinates and find common offsetParent - var pos = { x: event.offsetX, y: event.offsetY }; - - // Send the coordinates upwards through the offsetParent chain. - var e = el; - while (e) { - e.mouseX = pos.x; - e.mouseY = pos.y; - pos.x += e.offsetLeft; - pos.y += e.offsetTop; - e = e.offsetParent; - } - - // Look for the coordinates starting from the wheel widget. - var e = reference; - var offset = { x: 0, y: 0 } - while (e) { - if (typeof e.mouseX != 'undefined') { - x = e.mouseX - offset.x; - y = e.mouseY - offset.y; - break; - } - offset.x += e.offsetLeft; - offset.y += e.offsetTop; - e = e.offsetParent; - } - - // Reset stored coordinates - e = el; - while (e) { - e.mouseX = undefined; - e.mouseY = undefined; - e = e.offsetParent; - } - } - else { - // Use absolute coordinates - var pos = fb.absolutePosition(reference); - x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; - y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; - } - // Subtract distance to middle - return { x: x - fb.width / 2, y: y - fb.width / 2 }; - } - - /** - * Mousedown handler - */ - fb.mousedown = function (event) { - // Capture mouse - if (!document.dragging) { - $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); - document.dragging = true; - } - - // Check which area is being dragged - var pos = fb.widgetCoords(event); - fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; - - // Process - fb.mousemove(event); - return false; - } - - /** - * Mousemove handler - */ - fb.mousemove = function (event) { - // Get coordinates relative to color picker center - var pos = fb.widgetCoords(event); - - // Set new HSL parameters - if (fb.circleDrag) { - var hue = Math.atan2(pos.x, -pos.y) / 6.28; - if (hue < 0) hue += 1; - fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); - } - else { - var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); - var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); - fb.setHSL([fb.hsl[0], sat, lum]); - } - return false; - } - - /** - * Mouseup handler - */ - fb.mouseup = function () { - // Uncapture mouse - $(document).unbind('mousemove', fb.mousemove); - $(document).unbind('mouseup', fb.mouseup); - document.dragging = false; - } - - /** - * Update the markers and styles - */ - fb.updateDisplay = function () { - // Markers - var angle = fb.hsl[0] * 6.28; - $('.h-marker', e).css({ - left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', - top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' - }); - - $('.sl-marker', e).css({ - left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', - top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' - }); - - // Saturation/Luminance gradient - $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); - - // Linked elements or callback - if (typeof fb.callback == 'object') { - // Set background/foreground color - $(fb.callback).css({ - backgroundColor: fb.color, - color: fb.hsl[2] > 0.5 ? '#000' : '#fff' - }); - - // Change linked value - $(fb.callback).each(function() { - if (this.value && this.value != fb.color) { - this.value = fb.color; - } - }); - } - else if (typeof fb.callback == 'function') { - fb.callback.call(fb, fb.color); - } - } - - /** - * Get absolute position of element - */ - fb.absolutePosition = function (el) { - var r = { x: el.offsetLeft, y: el.offsetTop }; - // Resolve relative to offsetParent - if (el.offsetParent) { - var tmp = fb.absolutePosition(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; - }; - - /* Various color utility functions */ - fb.pack = function (rgb) { - var r = Math.round(rgb[0] * 255); - var g = Math.round(rgb[1] * 255); - var b = Math.round(rgb[2] * 255); - return '#' + (r < 16 ? '0' : '') + r.toString(16) + - (g < 16 ? '0' : '') + g.toString(16) + - (b < 16 ? '0' : '') + b.toString(16); - } - - fb.unpack = function (color) { - if (color.length == 7) { - return [parseInt('0x' + color.substring(1, 3)) / 255, - parseInt('0x' + color.substring(3, 5)) / 255, - parseInt('0x' + color.substring(5, 7)) / 255]; - } - else if (color.length == 4) { - return [parseInt('0x' + color.substring(1, 2)) / 15, - parseInt('0x' + color.substring(2, 3)) / 15, - parseInt('0x' + color.substring(3, 4)) / 15]; - } - } - - fb.HSLToRGB = function (hsl) { - var m1, m2, r, g, b; - var h = hsl[0], s = hsl[1], l = hsl[2]; - m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; - m1 = l * 2 - m2; - return [this.hueToRGB(m1, m2, h+0.33333), - this.hueToRGB(m1, m2, h), - this.hueToRGB(m1, m2, h-0.33333)]; - } - - fb.hueToRGB = function (m1, m2, h) { - h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); - if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; - if (h * 2 < 1) return m2; - if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; - return m1; - } - - fb.RGBToHSL = function (rgb) { - var min, max, delta, h, s, l; - var r = rgb[0], g = rgb[1], b = rgb[2]; - min = Math.min(r, Math.min(g, b)); - max = Math.max(r, Math.max(g, b)); - delta = max - min; - l = (min + max) / 2; - s = 0; - if (l > 0 && l < 1) { - s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); - } - h = 0; - if (delta > 0) { - if (max == r && max != g) h += (g - b) / delta; - if (max == g && max != b) h += (2 + (b - r) / delta); - if (max == b && max != r) h += (4 + (r - g) / delta); - h /= 6; - } - return [h, s, l]; - } - - // Install mousedown handler (the others are set on the document on-demand) - $('*', e).mousedown(fb.mousedown); - - // Init color - fb.setColor('#000000'); - - // Set linked elements/callback - if (callback) { - fb.linkTo(callback); - } -}/** - * Created by GUY on 2017/2/8. +/** + * 可以改变图标的button * - * @class BI.BubbleCombo - * @extends BI.Widget + * Created by GUY on 2016/2/2. + * + * @class BI.IconChangeButton + * @extends BI.Single */ -BI.BubbleCombo = BI.inherit(BI.Widget, { - _const: { - TRIANGLE_LENGTH: 6 - }, +BI.IconChangeButton = BI.inherit(BI.Single, { _defaultConfig: function () { - return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bubble-combo", - trigger: "click", - toggle: true, - direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right - isDefaultInit: false, - destroyWhenHide: false, - isNeedAdjustHeight: true,//是否需要高度调整 - isNeedAdjustWidth: true, + var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-icon-change-button", + iconClass: "", + iconWidth: null, + iconHeight: null, + + stopEvent: false, stopPropagation: false, - adjustLength: 0,//调整的距离 - // adjustXOffset: 0, - // adjustYOffset: 10, - hideChecker: BI.emptyFn, - offsetStyle: "left", //left,right,center - el: {}, - popup: {}, + selected: false, + once: false, //点击一次选中有效,再点无效 + forceSelected: false, //点击即选中, 选中了就不会被取消 + forceNotSelected: false, //无论怎么点击都不会被选中 + disableSelected: false, //使能选中 + + shadow: false, + isShadowShowingOnSelected: false, //选中状态下是否显示阴影 + trigger: null, + handler: BI.emptyFn }) }, + _init: function () { - BI.BubbleCombo.superclass._init.apply(this, arguments); + BI.IconChangeButton.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.combo = BI.createWidget({ - type: "bi.combo", + this.button = BI.createWidget({ + type: "bi.icon_button", element: this, - trigger: o.trigger, - toggle: o.toggle, - direction: o.direction, - isDefaultInit: o.isDefaultInit, - destroyWhenHide: o.destroyWhenHide, - isNeedAdjustHeight: o.isNeedAdjustHeight, - isNeedAdjustWidth: o.isNeedAdjustWidth, - adjustLength: this._getAdjustLength(), + cls: o.iconClass, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight, + + stopEvent: o.stopEvent, stopPropagation: o.stopPropagation, - adjustXOffset: 0, - adjustYOffset: 0, - hideChecker: o.hideChecker, - offsetStyle: o.offsetStyle, - el: o.el, - popup: BI.extend({ - type: "bi.bubble_popup_view" - }, o.popup), + selected: o.selected, + once: o.once, + forceSelected: o.forceSelected, + forceNotSelected: o.forceNotSelected, + disableSelected: o.disableSelected, + + shadow: o.shadow, + isShadowShowingOnSelected: o.isShadowShowingOnSelected, + trigger: o.trigger, + handler: o.handler }); - this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments); + + this.button.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); - this.combo.on(BI.Combo.EVENT_CHANGE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments); + this.button.on(BI.IconButton.EVENT_CHANGE, function () { + self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments); }); - this.combo.on(BI.Combo.EVENT_EXPAND, function () { - self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments); + }, + + isSelected: function () { + return this.button.isSelected(); + }, + + setSelected: function (b) { + this.button.setSelected(b); + }, + + setIcon: function (cls) { + var o = this.options; + if (o.iconClass !== cls) { + this.element.removeClass(o.iconClass).addClass(cls); + o.iconClass = cls; + } + } +}); +BI.IconChangeButton.EVENT_CHANGE = "IconChangeButton.EVENT_CHANGE"; +BI.shortcut("bi.icon_change_button", BI.IconChangeButton);/** + * guy + * @extends BI.Single + * @type {*|void|Object} + */ +BI.HalfIconButton = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments); + return BI.extend(conf, { + extraCls: "bi-half-icon-button check-half-select-icon", + height: 16, + width: 16, + iconWidth: 16, + iconHeight: 16, + selected: false + }) + }, + + _init : function() { + BI.HalfIconButton.superclass._init.apply(this, arguments); + }, + + doClick: function(){ + BI.HalfIconButton.superclass.doClick.apply(this, arguments); + if(this.isValid()){ + this.fireEvent(BI.HalfIconButton.EVENT_CHANGE); + } + } +}); +BI.HalfIconButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE"; + +BI.shortcut("bi.half_icon_button", BI.HalfIconButton);/** + * 统一的trigger图标按钮 + * + * Created by GUY on 2015/9/16. + * @class BI.TriggerIconButton + * @extends BI.IconButton + */ +BI.TriggerIconButton = BI.inherit(BI.IconButton, { + + _defaultConfig: function () { + var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", + extraCls: "pull-down-font" }); - this.combo.on(BI.Combo.EVENT_COLLAPSE, function () { - self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments); + }, + + _init: function () { + BI.TriggerIconButton.superclass._init.apply(this, arguments); + }, + + doClick: function () { + BI.TriggerIconButton.superclass.doClick.apply(this, arguments); + if (this.isValid()) { + this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this); + } + } +}); +BI.TriggerIconButton.EVENT_CHANGE = "TriggerIconButton.EVENT_CHANGE"; +BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.MultiSelectItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multi-select-item", + height: 25, + logic: { + dynamic: false + } + }) + }, + _init: function () { + BI.MultiSelectItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" }); - this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () { - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments); + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + rgap: o.rgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py }); - this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } }); - this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self._showTriangle(); - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.center_adapt", + items: [this.checkbox], + width: 36 + }, this.text) + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.MultiSelectItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + if (this.isValid()) { + this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this); + } + }, + + setSelected: function (v) { + BI.MultiSelectItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); +BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);/** + * Created by GUY on 2016/2/2. + * + * @class BI.SingleSelectIconTextItem + * @extends BI.BasicButton + */ +BI.SingleSelectIconTextItem = BI.inherit(BI.Single, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-icon-text-item bi-list-item-active", + iconClass: "", + hgap: 10, + height: 25 + }) + }, + _init: function () { + BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.icon_text_item", + element: this, + cls: o.iconClass, + once: o.once, + selected: o.selected, + height: o.height, + iconHeight: o.iconHeight, + iconWidth: o.iconWidth, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py }); - this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { - self._hideTriangle(); - self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); - this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { - self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments); + }, + + isSelected: function () { + return this.text.isSelected(); + }, + + setSelected: function (b) { + this.text.setSelected(b); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments); + } +}); + +BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.SingleSelectItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-item bi-list-item-active", + hgap: 10, + height: 25, + textAlign: "left", + }) + }, + _init: function () { + BI.SingleSelectItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: o.textAlign, + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py }); }, - _getAdjustLength: function () { - return this._const.TRIANGLE_LENGTH + this.options.adjustLength; + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); }, - _createTriangle: function (direction) { - var pos = {}, op = {}; - var adjustLength = this.options.adjustLength; - var offset = this.element.offset(); - var left = offset.left, right = offset.left + this.element.outerWidth(); - var top = offset.top, bottom = offset.top + this.element.outerHeight(); - switch (direction) { - case "left": - pos = { - top: top, - height: this.element.outerHeight(), - left: left - adjustLength - this._const.TRIANGLE_LENGTH - }; - op = {width: this._const.TRIANGLE_LENGTH}; - break; - case "right": - pos = { - top: top, - height: this.element.outerHeight(), - left: right + adjustLength - }; - op = {width: this._const.TRIANGLE_LENGTH}; - break; - case "top": - pos = { - left: left, - width: this.element.outerWidth(), - top: top - adjustLength - this._const.TRIANGLE_LENGTH - }; - op = {height: this._const.TRIANGLE_LENGTH}; - break; - case "bottom": - pos = { - left: left, - width: this.element.outerWidth(), - top: bottom + adjustLength - }; - op = {height: this._const.TRIANGLE_LENGTH}; - break; - default: - break; - } - this.triangle && this.triangle.destroy(); - this.triangle = BI.createWidget(op, { - type: "bi.center_adapt", - cls: "button-combo-triangle-wrapper", - items: [{ - type: "bi.layout", - cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" - }] + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectItem.superclass.doClick.apply(this, arguments); + }, + + setSelected: function (v) { + BI.SingleSelectItem.superclass.setSelected.apply(this, arguments); + } +}); + +BI.shortcut("bi.single_select_item", BI.SingleSelectItem);/** + * guy + * 单选框item + * @type {*|void|Object} + */ +BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-single-select-radio-item bi-list-item-active", + logic: { + dynamic: false + }, + hgap: 10, + height: 25 + }) + }, + _init: function () { + BI.SingleSelectRadioItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.radio = BI.createWidget({ + type: "bi.radio" + }); + this.radio.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(!self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("left", { + type: "bi.center_adapt", + items: [this.radio], + width: 36 + }, this.text) + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments); + this.radio.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments); + this.radio.setSelected(v); + + } +}); + +BI.shortcut("bi.single_select_radio_item", BI.SingleSelectRadioItem);/** + * Created by roy on 15/10/16. + */ +BI.ArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-arrow-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }); + }, + _init: function () { + var self = this, o = this.options; + BI.ArrowNode.superclass._init.apply(this, arguments); + this.checkbox = BI.createWidget({ + type: "bi.arrow_tree_group_node_checkbox", + iconWidth: 13, + iconHeight: 13 + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.ArrowNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isOpened()); + }, + setValue: function (v) { + this.text.setValue(v); + }, + + setOpened: function (v) { + BI.ArrowNode.superclass.setOpened.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.arrow_group_node", BI.ArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.FirstPlusGroupNode + * @extends BI.NodeButton + */ +BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-first-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.FirstPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.first_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.first_plus_group_node", BI.FirstPlusGroupNode);/** + * Created by User on 2016/3/31. + */ +/** + * > + icon + 文本 + * @class BI.IconArrowNode + * @extends BI.NodeButton + */ +BI.IconArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-icon-arrow-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25, + iconHeight: 13, + iconWidth: 13, + iconCls: "" + }) + }, + _init: function () { + BI.IconArrowNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.tree_group_node_checkbox", + width: 23, + stopPropagation: true + }); + + var icon = BI.createWidget({ + type: "bi.center_adapt", + cls: o.iconCls, + width: 23, + items: [{ + type: "bi.icon", + height: o.iconHeight, + width: o.iconWidth + }] + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, { + width: 23, + el: icon + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.IconArrowNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.IconArrowNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.icon_arrow_node", BI.IconArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.LastPlusGroupNode + * @extends BI.NodeButton + */ +BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-last-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.LastPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.last_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if(type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.last_plus_group_node", BI.LastPlusGroupNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.MidPlusGroupNode + * @extends BI.NodeButton + */ +BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-mid-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.MidPlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.mid_tree_node_checkbox", + stopPropagation: true + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + if (this.isSelected()) { + self.triggerExpand(); + } else { + self.triggerCollapse(); + } + } + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments); + if (BI.isNotNull(this.checkbox)) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.mid_plus_group_node", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-multilayer-icon-arrow-node bi-list-item", + layer: 0,//第几层级 + id: "", + pId: "", + open: false, + height: 25, + iconHeight: 13, + iconWidth: 13, + iconCls: "" + }) + }, + _init: function () { + BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.node = BI.createWidget({ + type: "bi.icon_arrow_node", + iconCls: o.iconCls, + //logic: { + // dynamic: true + //}, + id: o.id, + pId: o.pId, + open: o.open, + height: o.height, + iconHeight: o.iconHeight, + iconWidth: o.iconWidth, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.node.on(BI.Controller.EVENT_CHANGE, function (type) { + self.setSelected(self.isSelected()); + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var items = []; + BI.count(0, o.layer, function () { + items.push({ + type: "bi.layout", + width: 13, + height: o.height + }) + }); + items.push(this.node); + BI.createWidget({ + type: "bi.td", + element: this, + columnSize: BI.makeArray(o.layer, 13), + items: [items] + }) + }, + + isOnce: function () { + return true; + }, + + doRedMark: function () { + this.node.doRedMark.apply(this.node, arguments); + }, + + unRedMark: function () { + this.node.unRedMark.apply(this.node, arguments); + }, + + isSelected: function () { + return this.node.isSelected(); + }, + + setSelected: function (b) { + BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments); + this.node.setSelected(b); + }, + + doClick: function () { + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.node.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments); + this.node.setOpened(v); + } +}); + +BI.shortcut("bi.multilayer_icon_arrow_node", BI.MultiLayerIconArrowNode);/** + * 加号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.PlusGroupNode + * @extends BI.NodeButton + */ +BI.PlusGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-plus-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.PlusGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.tree_node_checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.PlusGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setOpened: function (v) { + BI.PlusGroupNode.superclass.setOpened.apply(this, arguments); + if (this.checkbox) { + this.checkbox.setSelected(v); + } + } +}); + +BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/** + * 三角号表示的组节点 + * Created by GUY on 2015/9/6. + * @class BI.TriangleGroupNode + * @extends BI.NodeButton + */ +BI.TriangleGroupNode = BI.inherit(BI.NodeButton, { + _defaultConfig: function () { + var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item", + logic: { + dynamic: false + }, + id: "", + pId: "", + open: false, + height: 25 + }) + }, + _init: function () { + BI.TriangleGroupNode.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + iconWidth: 13, + iconHeight: 13, + type: "bi.tree_group_node_checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py, + keyword: o.keyword + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 25, + el: this.checkbox + }, this.text); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doClick: function () { + BI.TriangleGroupNode.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isOpened()); + }, + + setOpened: function (v) { + BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments); + this.checkbox.setSelected(v); + }, + + setText: function(text){ + BI.TriangleGroupNode.superclass.setText.apply(this, arguments); + this.text.setText(text); + } +}); + +BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-first-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.FirstTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.FirstTreeLeafItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.FirstTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + height: 25, + iconWidth: 16, + iconHeight: 16, + iconCls: "" + }) + }, + + _init: function () { + BI.IconTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var icon = BI.createWidget({ + type: "bi.center_adapt", + width: 23, + cls: o.iconCls, + items: [{ + type: "bi.icon", + width: o.iconWidth, + height: o.iconHeight + }] + }); + + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { + width: 23, + el: icon + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.IconTreeLeafItem.superclass.doClick.apply(this, arguments); + }, + + setSelected: function (v) { + BI.IconTreeLeafItem.superclass.setSelected.apply(this, arguments); + } +}); + +BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-last-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.LastTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.LastTreeLeafItem.superclass.doClick.apply(this, arguments); + // this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.LastTreeLeafItem.superclass.setSelected.apply(this, arguments); + // this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** + * guy + * 复选框item + * @type {*|void|Object} + */ +BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-mid-tree-leaf-item bi-list-item-active", + logic: { + dynamic: false + }, + id: "", + pId: "", + layer: 0, + height: 25 + }) + }, + _init: function () { + BI.MidTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox" + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); + var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : { + width: 13, + el: { + type: "bi.layout", + cls: "base-line-conn-background", + width: 13, + height: o.height + } + }), { + width: 25, + el: { + type: "bi.layout", + cls: "mid-line-conn-background", + width: 25, + height: o.height + } + }, { + el: this.text + }); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, { + items: items + })))); + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.MidTreeLeafItem.superclass.doClick.apply(this, arguments); + this.checkbox.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.MidTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.checkbox.setSelected(v); + } +}); + +BI.shortcut("bi.mid_tree_leaf_item", BI.MidTreeLeafItem);/** + * @class BI.MultiLayerIconTreeLeafItem + * @extends BI.BasicButton + */ +BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multilayer-icon-tree-leaf-item bi-list-item-active", + layer: 0, + height: 25, + iconCls: "", + iconHeight: 14, + iconWidth: 12 + }) + }, + _init: function () { + BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.item = BI.createWidget({ + type: "bi.icon_tree_leaf_item", + cls: "bi-list-item-none", + iconCls: o.iconCls, + id: o.id, + pId: o.pId, + isFront: true, + height: o.height, + hgap: o.hgap, + text: o.text, + value: o.value, + py: o.py, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.item.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) {//本身实现click功能 + return; + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + var items = []; + BI.count(0, o.layer, function () { + items.push({ + type: "bi.layout", + width: 13, + height: o.height + }) + }); + items.push(this.item); + BI.createWidget({ + type: "bi.td", + element: this, + columnSize: BI.makeArray(o.layer, 13), + items: [items] + }); + }, + + doRedMark: function () { + this.item.doRedMark.apply(this.item, arguments); + }, + + unRedMark: function () { + this.item.unRedMark.apply(this.item, arguments); + }, + + doHighLight: function () { + this.item.doHighLight.apply(this.item, arguments); + }, + + unHighLight: function () { + this.item.unHighLight.apply(this.item, arguments); + }, + + getId: function () { + return this.options.id; + }, + + getPId: function () { + return this.options.pId; + }, + + doClick: function () { + BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments); + this.item.setSelected(this.isSelected()); + }, + + setSelected: function (v) { + BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments); + this.item.setSelected(v); + }, + + getValue: function(){ + return this.options.value; + } +}); + +BI.shortcut("bi.multilayer_icon_tree_leaf_item", BI.MultiLayerIconTreeLeafItem);/** + * 树叶子节点 + * Created by GUY on 2015/9/6. + * @class BI.TreeTextLeafItem + * @extends BI.BasicButton + */ +BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, { + _defaultConfig: function() { + return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-tree-text-leaf-item bi-list-item-active", + id: "", + pId: "", + height: 25, + hgap: 0, + lgap: 0, + rgap: 0 + }) + }, + _init : function() { + BI.TreeTextLeafItem.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + lgap: o.lgap, + rgap: o.hgap, + text: o.text, + value: o.value, + py: o.py + }); + BI.createWidget({ + type: "bi.htape", + element: this, + items: [{ + el: this.text + }] + }) + }, + + doRedMark: function(){ + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function(){ + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function(){ + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function(){ + this.text.unHighLight.apply(this.text, arguments); + }, + + getId: function(){ + return this.options.id; + }, + + getPId: function(){ + return this.options.pId; + } +}); + +BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** + * Created by GUY on 2015/8/28. + * @class BI.Calendar + * @extends BI.Widget + */ +BI.Calendar = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-calendar", + logic: { + dynamic: false + }, + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + year: 2015, + month: 7, //7表示八月 + day: 25 + }) + }, + + _dateCreator: function (Y, M, D) { + var self = this, o = this.options, log = {}, De = new Date(); + var mins = o.min.match(/\d+/g); + var maxs = o.max.match(/\d+/g); + Y < (mins[0] | 0) && (Y = (mins[0] | 0)); + Y > (maxs[0] | 0) && (Y = (maxs[0] | 0)); + + De.setFullYear(Y, M, D); + log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()]; + + var MD = Date._MD.slice(0); + MD[1] = Date.isLeap(log.ymd[0]) ? 29 : 28; + + De.setFullYear(log.ymd[0], log.ymd[1], 1); + log.FDay = De.getDay(); + + log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; + log.NDay = 1; + + var items = []; + BI.each(BI.range(42), function (i) { + var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; + if (i < log.FDay) { + td.lastMonth = true; + DD = i + log.PDay; + MM === 1 && (YY -= 1); + MM = MM === 1 ? 12 : MM - 1; + } else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { + DD = i - log.FDay + 1; + if (i - log.FDay + 1 === log.ymd[2]) { + td.currentDay = true; + } + } else { + td.nextMonth = true; + DD = log.NDay++; + MM === 12 && (YY += 1); + MM = MM === 12 ? 1 : MM + 1; + } + if (Date.checkVoid(YY, MM, DD, mins, maxs)[0]) { + td.disabled = true; + } + td.text = DD; + items.push(td); + }) + return items; + }, + + _init: function () { + BI.Calendar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var items = BI.map(Date._SDN.slice(0, 7), function (i, value) { + return { + type: "bi.label", + height: 25, + text: value + } + }) + var title = BI.createWidget({ + type: "bi.button_group", + height: 25, + items: items + }) + var days = this._dateCreator(o.year, o.month, o.day); + items = []; + items.push(days.slice(0, 7)); + items.push(days.slice(7, 14)); + items.push(days.slice(14, 21)); + items.push(days.slice(21, 28)); + items.push(days.slice(28, 35)); + items.push(days.slice(35, 42)); + + items = BI.map(items, function (i, item) { + return BI.map(item, function (j, td) { + return BI.extend(td, { + type: "bi.text_item", + cls: "bi-list-item-active", + textAlign: "center", + whiteSpace: "normal", + once: false, + forceSelected: true, + height: 25, + value: o.year + "-" + o.month + "-" + td.text, + disabled: td.lastMonth || td.nextMonth || td.disabled + //selected: td.currentDay + }); + }); + }); + + this.days = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(items, {}), + layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + columns: 7, + rows: 6, + columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], + rowSize: 25 + }))] + }); + this.days.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }) + BI.createWidget(BI.extend({ + element: this + + }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", title, this.days) + })))); + }, + + isFrontDate: function () { + var o = this.options, c = this._const; + var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); + Y = Y | 0; + De.setFullYear(Y, M, 1); + var newDate = De.getOffsetDate(-1 * (day + 1)); + return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; + }, + + isFinalDate: function () { + var o = this.options, c = this._const; + var Y = o.year, M = o.month, De = new Date(), day = De.getDay(); + Y = Y | 0; + De.setFullYear(Y, M, 1); + var newDate = De.getOffsetDate(42 - day); + return !!Date.checkVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0]; + }, + + setValue: function (ob) { + this.days.setValue([ob.year + "-" + ob.month + "-" + ob.day]); + }, + + getValue: function () { + var date = this.days.getValue()[0].match(/\d+/g); + return { + year: date[0] | 0, + month: date[1] | 0, + day: date[2] | 0 + } + } +}); + +BI.extend(BI.Calendar, { + getPageByDateJSON: function (json) { + var year = new Date().getFullYear(); + var month = new Date().getMonth(); + var page = (json.year - year) * 12; + page += json.month - month; + return page; + }, + getDateJSONByPage: function(v){ + var months = new Date().getMonth(); + var page = v; + + //对当前page做偏移,使到当前年初 + page = page + months; + + var year = BI.parseInt(page / 12); + if(page < 0 && page % 12 !== 0){ + year--; + } + var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12); + return { + year: new Date().getFullYear() + year, + month: month + } + } +}); + +BI.shortcut("bi.calendar", BI.Calendar);/** + * Created by GUY on 2015/8/28. + * @class BI.YearCalendar + * @extends BI.Widget + */ +BI.YearCalendar = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-year-calendar", + behaviors: {}, + logic: { + dynamic: false + }, + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + year: null + }) + }, + + _yearCreator: function (Y) { + var o = this.options; + Y = Y | 0; + var start = BI.YearCalendar.getStartYear(Y); + var items = []; + BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) { + var td = {}; + if (Date.checkVoid(start + i, 1, 1, o.min, o.max)[0]) { + td.disabled = true; + } + td.text = start + i; + items.push(td); + }); + return items; + }, + + _init: function () { + BI.YearCalendar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.currentYear = new Date().getFullYear(); + var years = this._yearCreator(o.year || this.currentYear); + + //纵向排列年 + var len = years.length, tyears = BI.makeArray(len, ""); + var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; + BI.each(years, function (i, y) { + tyears[i] = years[map[i]]; + }); + var items = []; + items.push(tyears.slice(0, 2)); + items.push(tyears.slice(2, 4)); + items.push(tyears.slice(4, 6)); + items.push(tyears.slice(6, 8)); + items.push(tyears.slice(8, 10)); + items.push(tyears.slice(10, 12)); + + items = BI.map(items, function (i, item) { + return BI.map(item, function (j, td) { + return BI.extend(td, { + type: "bi.text_item", + cls: "bi-list-item-active", + textAlign: "center", + whiteSpace: "normal", + once: false, + forceSelected: true, + height: 23, + width: 38, + value: td.text, + disabled: td.disabled + }); + }); + }); + + this.years = BI.createWidget({ + type: "bi.button_group", + behaviors: o.behaviors, + items: BI.createItems(items, {}), + layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, { + columns: 2, + rows: 6, + columnSize: [1 / 2, 1 / 2], + rowSize: 25 + })), { + type: "bi.center_adapt", + vgap: 1 + }] + }); + this.years.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + BI.createWidget(BI.extend({ + element: this + + }, BI.LogicFactory.createLogic("vertical", BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", this.years) + })))); + }, + + isFrontYear: function () { + var o = this.options; + var Y = o.year; + Y = Y | 0; + return !!Date.checkVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0]; + }, + + isFinalYear: function () { + var o = this.options, c = this._const; + var Y = o.year; + Y = Y | 0; + return !!Date.checkVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0]; + }, + + setValue: function (val) { + this.years.setValue([val]); + }, + + getValue: function () { + return this.years.getValue()[0]; + } +}); +//类方法 +BI.extend(BI.YearCalendar, { + INTERVAL: 12, + + //获取显示的第一年 + getStartYear: function (year) { + var cur = new Date().getFullYear(); + return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL; + }, + + getEndYear: function (year) { + return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; + }, + + getPageByYear: function (year) { + var cur = new Date().getFullYear(); + year = BI.YearCalendar.getStartYear(year); + return (year - cur + 3) / BI.YearCalendar.INTERVAL; + } +}); + +BI.shortcut("bi.year_calendar", BI.YearCalendar);/** + * 绘制一些较复杂的canvas + * + * Created by GUY on 2015/11/24. + * @class BI.ComplexCanvas + * @extends BI.Widget + */ +BI.ComplexCanvas = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-complex-canvas" + }) + }, + + + _init: function () { + BI.ComplexCanvas.superclass._init.apply(this, arguments); + var o = this.options; + this.canvas = BI.createWidget({ + type: "bi.canvas", + element: this, + width: o.width, + height: o.height + }); + }, + + //绘制树枝节点 + branch: function (x0, y0, x1, y1, x2, y2) { + var self = this, args = [].slice.call(arguments); + if (args.length <= 5) { + return this.canvas.line.apply(this.canvas, arguments); + } + var options; + if (BI.isOdd(args.length)) { + options = BI.last(args); + args = BI.initial(args); + } + args = [].slice.call(args, 2); + var odd = BI.filter(args, function (i) { + return i % 2 === 0; + }); + var even = BI.filter(args, function (i) { + return i % 2 !== 0; + }); + options || (options = {}); + var offset = options.offset || 20; + if ((y0 > y1 && y0 > y2) || (y0 < y1 && y0 < y2)) { + if (y0 > y1 && y0 > y2) { + var y = Math.max.apply(this, even) + offset; + } else { + var y = Math.min.apply(this, even) - offset; + } + var minx = Math.min.apply(this, odd); + var minix = BI.indexOf(odd, minx); + var maxx = Math.max.apply(this, odd); + var maxix = BI.indexOf(odd, maxx); + this.canvas.line(minx, even[minix], minx, y, maxx, y, maxx, even[maxix], options); + BI.each(odd, function (i, dot) { + if (i !== maxix && i !== minix) { + self.canvas.line(dot, even[i], dot, y, options); + } + }); + this.canvas.line(x0, y, x0, y0, options); + return; + } + if ((x0 > x1 && x0 > x2) || (x0 < x1 && x0 < x2)) { + if (x0 > x1 && x0 > x2) { + var x = Math.max.apply(this, odd) + offset; + } else { + var x = Math.min.apply(this, odd) - offset; + } + var miny = Math.min.apply(this, even); + var miniy = BI.indexOf(even, miny); + var maxy = Math.max.apply(this, even); + var maxiy = BI.indexOf(even, maxy); + this.canvas.line(odd[miniy], miny, x, miny, x, maxy, odd[maxiy], maxy, options); + BI.each(even, function (i, dot) { + if (i !== miniy && i !== maxiy) { + self.canvas.line(odd[i], dot, x, dot, options); + } + }); + this.canvas.line(x, y0, x0, y0, options); + return; + } + }, + + stroke: function (callback) { + this.canvas.stroke(callback); + } +}); + +BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/** + * Created by roy on 15/10/16. + * 上箭头与下箭头切换的树节点 + */ +BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{ + _defaultConfig:function(){ + return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{ + extraCls:"bi-arrow-tree-group-node", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function(){ + BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments); + }, + setSelected: function(v){ + BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"); + } else { + this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font"); + } + } +}); +BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox);/** + * 十字型的树节点 + * @class BI.CheckingMarkNode + * @extends BI.IconButton + */ +BI.CheckingMarkNode = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), { + extraCls: "check-mark-font", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function() { + BI.CheckingMarkNode.superclass._init.apply(this, arguments); + this.setSelected(this.options.selected); + + }, + setSelected: function(v){ + BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("check-mark-font"); + } else { + this.element.removeClass("check-mark-font"); + } + } +}); +BI.shortcut("bi.checking_mark_node", BI.CheckingMarkNode);/** + * 十字型的树节点 + * @class BI.FirstTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type2", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type2"); + } else { + this.element.removeClass("tree-expand-icon-type2"); + } + } +}); +BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox);/** + * 十字型的树节点 + * @class BI.LastTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type4", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type3"); + } else { + this.element.removeClass("tree-expand-icon-type3"); + } + } +}); +BI.shortcut("bi.last_tree_node_checkbox", BI.LastTreeNodeCheckbox);/** + * 十字型的树节点 + * @class BI.MidTreeNodeCheckbox + * @extends BI.IconButton + */ +BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type3", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v===true) { + this.element.addClass("tree-expand-icon-type3"); + } else { + this.element.removeClass("tree-expand-icon-type3"); + } + } +}); +BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/** + * 三角形的树节点 + * Created by GUY on 2015/9/6. + * @class BI.TreeGroupNodeCheckbox + * @extends BI.IconButton + */ +BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-node-triangle-collapse-font", + iconWidth: 13, + iconHeight: 13 + }); + }, + _init:function() { + BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"); + } else { + this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font"); + } + } +}); +BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/** + * 十字型的树节点 + * @class BI.TreeNodeCheckbox + * @extends BI.IconButton + */ +BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, { + _defaultConfig: function() { + return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { + extraCls: "tree-collapse-icon-type1", + iconWidth: 25, + iconHeight: 25 + }); + }, + _init:function() { + BI.TreeNodeCheckbox.superclass._init.apply(this, arguments); + + }, + setSelected: function(v){ + BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); + if(v) { + this.element.addClass("tree-expand-icon-type1"); + } else { + this.element.removeClass("tree-expand-icon-type1"); + } + } +}); +BI.shortcut("bi.tree_node_checkbox", BI.TreeNodeCheckbox);/*! + * clipboard.js v1.6.1 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +try {//IE8下会抛错 + (function (f) { + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f() + } else if (typeof define === "function" && define.amd) { + define([], f) + } else { + var g; + if (typeof window !== "undefined") { + g = window + } else if (typeof global !== "undefined") { + g = global + } else if (typeof self !== "undefined") { + g = self + } else { + g = this + } + g.Clipboard = f() + } + })(function () { + var define, module, exports; + return (function e(t, n, r) { + function s(o, u) { + if (!n[o]) { + if (!t[o]) { + var a = typeof require == "function" && require; + if (!u && a)return a(o, !0); + if (i)return i(o, !0); + var f = new Error("Cannot find module '" + o + "'"); + throw f.code = "MODULE_NOT_FOUND", f + } + var l = n[o] = {exports: {}}; + t[o][0].call(l.exports, function (e) { + var n = t[o][1][e]; + return s(n ? n : e) + }, l, l.exports, e, t, n, r) + } + return n[o].exports + } + + var i = typeof require == "function" && require; + for (var o = 0; o < r.length; o++)s(r[o]); + return s + })({ + 1: [function (require, module, exports) { + var DOCUMENT_NODE_TYPE = 9; + + /** + * A polyfill for Element.matches() + */ + if (typeof Element !== 'undefined' && !Element.prototype.matches) { + var proto = Element.prototype; + + proto.matches = proto.matchesSelector || + proto.mozMatchesSelector || + proto.msMatchesSelector || + proto.oMatchesSelector || + proto.webkitMatchesSelector; + } + + /** + * Finds the closest parent that matches a selector. + * + * @param {Element} element + * @param {String} selector + * @return {Function} + */ + function closest(element, selector) { + while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + if (element.matches(selector)) return element; + element = element.parentNode; + } + } + + module.exports = closest; + + }, {}], 2: [function (require, module, exports) { + var closest = require('./closest'); + + /** + * Delegates event to a selector. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ + function delegate(element, selector, type, callback, useCapture) { + var listenerFn = listener.apply(this, arguments); + + element.addEventListener(type, listenerFn, useCapture); + + return { + destroy: function () { + element.removeEventListener(type, listenerFn, useCapture); + } + } + } + + /** + * Finds closest match and invokes callback. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Function} + */ + function listener(element, selector, type, callback) { + return function (e) { + e.delegateTarget = closest(e.target, selector); + + if (e.delegateTarget) { + callback.call(element, e); + } + } + } + + module.exports = delegate; + + }, {"./closest": 1}], 3: [function (require, module, exports) { + /** + * Check if argument is a HTML element. + * + * @param {Object} value + * @return {Boolean} + */ + exports.node = function (value) { + return value !== undefined + && value instanceof HTMLElement + && value.nodeType === 1; + }; + + /** + * Check if argument is a list of HTML elements. + * + * @param {Object} value + * @return {Boolean} + */ + exports.nodeList = function (value) { + var type = Object.prototype.toString.call(value); + + return value !== undefined + && (type === '[object NodeList]' || type === '[object HTMLCollection]') + && ('length' in value) + && (value.length === 0 || exports.node(value[0])); + }; + + /** + * Check if argument is a string. + * + * @param {Object} value + * @return {Boolean} + */ + exports.string = function (value) { + return typeof value === 'string' + || value instanceof String; + }; + + /** + * Check if argument is a function. + * + * @param {Object} value + * @return {Boolean} + */ + exports.fn = function (value) { + var type = Object.prototype.toString.call(value); + + return type === '[object Function]'; + }; + + }, {}], 4: [function (require, module, exports) { + var is = require('./is'); + var delegate = require('delegate'); + + /** + * Validates all params and calls the right + * listener function based on its target type. + * + * @param {String|HTMLElement|HTMLCollection|NodeList} target + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listen(target, type, callback) { + if (!target && !type && !callback) { + throw new Error('Missing required arguments'); + } + + if (!is.string(type)) { + throw new TypeError('Second argument must be a String'); + } + + if (!is.fn(callback)) { + throw new TypeError('Third argument must be a Function'); + } + + if (is.node(target)) { + return listenNode(target, type, callback); + } + else if (is.nodeList(target)) { + return listenNodeList(target, type, callback); + } + else if (is.string(target)) { + return listenSelector(target, type, callback); + } + else { + throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); + } + } + + /** + * Adds an event listener to a HTML element + * and returns a remove listener function. + * + * @param {HTMLElement} node + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenNode(node, type, callback) { + node.addEventListener(type, callback); + + return { + destroy: function () { + node.removeEventListener(type, callback); + } + } + } + + /** + * Add an event listener to a list of HTML elements + * and returns a remove listener function. + * + * @param {NodeList|HTMLCollection} nodeList + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenNodeList(nodeList, type, callback) { + Array.prototype.forEach.call(nodeList, function (node) { + node.addEventListener(type, callback); + }); + + return { + destroy: function () { + Array.prototype.forEach.call(nodeList, function (node) { + node.removeEventListener(type, callback); + }); + } + } + } + + /** + * Add an event listener to a selector + * and returns a remove listener function. + * + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Object} + */ + function listenSelector(selector, type, callback) { + return delegate(document.body, selector, type, callback); + } + + module.exports = listen; + + }, {"./is": 3, "delegate": 2}], 5: [function (require, module, exports) { + function select(element) { + var selectedText; + + if (element.nodeName === 'SELECT') { + element.focus(); + + selectedText = element.value; + } + else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { + var isReadOnly = element.hasAttribute('readonly'); + + if (!isReadOnly) { + element.setAttribute('readonly', ''); + } + + element.select(); + element.setSelectionRange(0, element.value.length); + + if (!isReadOnly) { + element.removeAttribute('readonly'); + } + + selectedText = element.value; + } + else { + if (element.hasAttribute('contenteditable')) { + element.focus(); + } + + var selection = window.getSelection(); + var range = document.createRange(); + + range.selectNodeContents(element); + selection.removeAllRanges(); + selection.addRange(range); + + selectedText = selection.toString(); + } + + return selectedText; + } + + module.exports = select; + + }, {}], 6: [function (require, module, exports) { + function E() { + // Keep this empty so it's easier to inherit from + // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) + } + + E.prototype = { + on: function (name, callback, ctx) { + var e = this.e || (this.e = {}); + + (e[name] || (e[name] = [])).push({ + fn: callback, + ctx: ctx + }); + + return this; + }, + + once: function (name, callback, ctx) { + var self = this; + + function listener() { + self.off(name, listener); + callback.apply(ctx, arguments); + }; + + listener._ = callback + return this.on(name, listener, ctx); + }, + + emit: function (name) { + var data = [].slice.call(arguments, 1); + var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var i = 0; + var len = evtArr.length; + + for (i; i < len; i++) { + evtArr[i].fn.apply(evtArr[i].ctx, data); + } + + return this; + }, + + off: function (name, callback) { + var e = this.e || (this.e = {}); + var evts = e[name]; + var liveEvents = []; + + if (evts && callback) { + for (var i = 0, len = evts.length; i < len; i++) { + if (evts[i].fn !== callback && evts[i].fn._ !== callback) + liveEvents.push(evts[i]); + } + } + + // Remove event from queue to prevent memory leak + // Suggested by https://github.com/lazd + // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 + + (liveEvents.length) + ? e[name] = liveEvents + : delete e[name]; + + return this; + } + }; + + module.exports = E; + + }, {}], 7: [function (require, module, exports) { + (function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', 'select'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('select')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.select); + global.clipboardAction = mod.exports; + } + })(this, function (module, _select) { + 'use strict'; + + var _select2 = _interopRequireDefault(_select); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + var ClipboardAction = function () { + /** + * @param {Object} options + */ + function ClipboardAction(options) { + _classCallCheck(this, ClipboardAction); + + this.resolveOptions(options); + this.initSelection(); + } + + /** + * Defines base properties passed from constructor. + * @param {Object} options + */ + + + _createClass(ClipboardAction, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = options.action; + this.emitter = options.emitter; + this.target = options.target; + this.text = options.text; + this.trigger = options.trigger; + + this.selectedText = ''; + } + }, { + key: 'initSelection', + value: function initSelection() { + if (this.text) { + this.selectFake(); + } else if (this.target) { + this.selectTarget(); + } + } + }, { + key: 'selectFake', + value: function selectFake() { + var _this = this; + + var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; + + this.removeFake(); + + this.fakeHandlerCallback = function () { + return _this.removeFake(); + }; + this.fakeHandler = document.body.addEventListener('click', this.fakeHandlerCallback) || true; + + this.fakeElem = document.createElement('textarea'); + // Prevent zooming on iOS + this.fakeElem.style.fontSize = '12pt'; + // Reset box model + this.fakeElem.style.border = '0'; + this.fakeElem.style.padding = '0'; + this.fakeElem.style.margin = '0'; + // Move element out of screen horizontally + this.fakeElem.style.position = 'absolute'; + this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; + // Move element to the same position vertically + var yPosition = window.pageYOffset || document.documentElement.scrollTop; + this.fakeElem.style.top = yPosition + 'px'; + + this.fakeElem.setAttribute('readonly', ''); + this.fakeElem.value = this.text; + + document.body.appendChild(this.fakeElem); + + this.selectedText = (0, _select2["default"])(this.fakeElem); + this.copyText(); + } + }, { + key: 'removeFake', + value: function removeFake() { + if (this.fakeHandler) { + document.body.removeEventListener('click', this.fakeHandlerCallback); + this.fakeHandler = null; + this.fakeHandlerCallback = null; + } + + if (this.fakeElem) { + document.body.removeChild(this.fakeElem); + this.fakeElem = null; + } + } + }, { + key: 'selectTarget', + value: function selectTarget() { + this.selectedText = (0, _select2["default"])(this.target); + this.copyText(); + } + }, { + key: 'copyText', + value: function copyText() { + var succeeded = void 0; + + try { + succeeded = document.execCommand(this.action); + } catch (err) { + succeeded = false; + } + + this.handleResult(succeeded); + } + }, { + key: 'handleResult', + value: function handleResult(succeeded) { + this.emitter.emit(succeeded ? 'success' : 'error', { + action: this.action, + text: this.selectedText, + trigger: this.trigger, + clearSelection: this.clearSelection.bind(this) + }); + } + }, { + key: 'clearSelection', + value: function clearSelection() { + if (this.target) { + this.target.blur(); + } + + window.getSelection().removeAllRanges(); + } + }, { + key: 'destroy', + value: function destroy() { + this.removeFake(); + } + }, { + key: 'action', + set: function set() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; + + this._action = action; + + if (this._action !== 'copy' && this._action !== 'cut') { + throw new Error('Invalid "action" value, use either "copy" or "cut"'); + } + }, + get: function get() { + return this._action; + } + }, { + key: 'target', + set: function set(target) { + if (target !== undefined) { + if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { + if (this.action === 'copy' && target.hasAttribute('disabled')) { + throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); + } + + if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { + throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); + } + + this._target = target; + } else { + throw new Error('Invalid "target" value, use a valid Element'); + } + } + }, + get: function get() { + return this._target; + } + }]); + + return ClipboardAction; + }(); + + module.exports = ClipboardAction; + }); + + }, {"select": 5}], 8: [function (require, module, exports) { + (function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); + global.clipboard = mod.exports; + } + })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { + 'use strict'; + + var _clipboardAction2 = _interopRequireDefault(_clipboardAction); + + var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); + + var _goodListener2 = _interopRequireDefault(_goodListener); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + + var Clipboard = function (_Emitter) { + _inherits(Clipboard, _Emitter); + + /** + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + * @param {Object} options + */ + function Clipboard(trigger, options) { + _classCallCheck(this, Clipboard); + + var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); + + _this.resolveOptions(options); + _this.listenClick(trigger); + return _this; + } + + /** + * Defines if attributes would be resolved using internal setter functions + * or custom functions that were passed in the constructor. + * @param {Object} options + */ + + + _createClass(Clipboard, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = typeof options.action === 'function' ? options.action : this.defaultAction; + this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; + this.text = typeof options.text === 'function' ? options.text : this.defaultText; + } + }, { + key: 'listenClick', + value: function listenClick(trigger) { + var _this2 = this; + + this.listener = (0, _goodListener2["default"])(trigger, 'click', function (e) { + return _this2.onClick(e); + }); + } + }, { + key: 'onClick', + value: function onClick(e) { + var trigger = e.delegateTarget || e.currentTarget; + + if (this.clipboardAction) { + this.clipboardAction = null; + } + + this.clipboardAction = new _clipboardAction2["default"]({ + action: this.action(trigger), + target: this.target(trigger), + text: this.text(trigger), + trigger: trigger, + emitter: this + }); + } + }, { + key: 'defaultAction', + value: function defaultAction(trigger) { + return getAttributeValue('action', trigger); + } + }, { + key: 'defaultTarget', + value: function defaultTarget(trigger) { + var selector = getAttributeValue('target', trigger); + + if (selector) { + return document.querySelector(selector); + } + } + }, { + key: 'defaultText', + value: function defaultText(trigger) { + return getAttributeValue('text', trigger); + } + }, { + key: 'destroy', + value: function destroy() { + this.listener.destroy(); + + if (this.clipboardAction) { + this.clipboardAction.destroy(); + this.clipboardAction = null; + } + } + }], [{ + key: 'isSupported', + value: function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; + + var actions = typeof action === 'string' ? [action] : action; + var support = !!document.queryCommandSupported; + + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + + return support; + } + }]); + + return Clipboard; + }(_tinyEmitter2["default"]); + + /** + * Helper function to retrieve attribute value. + * @param {String} suffix + * @param {Element} element + */ + function getAttributeValue(suffix, element) { + var attribute = 'data-clipboard-' + suffix; + + if (!element.hasAttribute(attribute)) { + return; + } + + return element.getAttribute(attribute); + } + + module.exports = Clipboard; + }); + + }, {"./clipboard-action": 7, "good-listener": 4, "tiny-emitter": 6}] + }, {}, [8])(8) + }); +} catch (e) { + /* + * zClip :: jQuery ZeroClipboard v1.1.1 + * http://steamdev.com/zclip + * + * Copyright 2011, SteamDev + * Released under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + * Date: Wed Jun 01, 2011 + */ + + + (function ($) { + + $.fn.zclip = function (params) { + + if (typeof params == "object" && !params.length) { + + var settings = $.extend({ + + path: 'ZeroClipboard.swf', + copy: null, + beforeCopy: null, + afterCopy: null, + clickAfter: true, + setHandCursor: true, + setCSSEffects: true + + }, params); + + + return this.each(function () { + + var o = $(this); + + if (o.is(':visible') && (typeof settings.copy == 'string' || $.isFunction(settings.copy))) { + + ZeroClipboard.setMoviePath(settings.path); + var clip = new ZeroClipboard.Client(); + + if ($.isFunction(settings.copy)) { + o.bind('zClip_copy', settings.copy); + } + if ($.isFunction(settings.beforeCopy)) { + o.bind('zClip_beforeCopy', settings.beforeCopy); + } + if ($.isFunction(settings.afterCopy)) { + o.bind('zClip_afterCopy', settings.afterCopy); + } + + clip.setHandCursor(settings.setHandCursor); + clip.setCSSEffects(settings.setCSSEffects); + clip.addEventListener('mouseOver', function (client) { + o.trigger('mouseenter'); + }); + clip.addEventListener('mouseOut', function (client) { + o.trigger('mouseleave'); + }); + clip.addEventListener('mouseDown', function (client) { + + o.trigger('mousedown'); + + if (!$.isFunction(settings.copy)) { + clip.setText(settings.copy); + } else { + clip.setText(o.triggerHandler('zClip_copy')); + } + + if ($.isFunction(settings.beforeCopy)) { + o.trigger('zClip_beforeCopy'); + } + + }); + + clip.addEventListener('complete', function (client, text) { + + if ($.isFunction(settings.afterCopy)) { + + o.trigger('zClip_afterCopy'); + + } else { + if (text.length > 500) { + text = text.substr(0, 500) + "...\n\n(" + (text.length - 500) + " characters not shown)"; + } + + o.removeClass('hover'); + alert("Copied text to clipboard:\n\n " + text); + } + + if (settings.clickAfter) { + o.trigger('click'); + } + + }); + + + clip.glue(o[0], o.parent()[0]); + + $(window).bind('load resize', function () { + clip.reposition(); + }); + + + } + + }); + + } else if (typeof params == "string") { + + return this.each(function () { + + var o = $(this); + + params = params.toLowerCase(); + var zclipId = o.data('zclipId'); + var clipElm = $('#' + zclipId + '.zclip'); + + if (params == "remove") { + + clipElm.remove(); + o.removeClass('active hover'); + + } else if (params == "hide") { + + clipElm.hide(); + o.removeClass('active hover'); + + } else if (params == "show") { + + clipElm.show(); + + } + + }); + + } + + } + + + })(jQuery); + + +// ZeroClipboard +// Simple Set Clipboard System +// Author: Joseph Huckaby + var ZeroClipboard = { + + version: "1.0.7", + clients: {}, + // registered upload clients on page, indexed by id + moviePath: 'ZeroClipboard.swf', + // URL to movie + nextId: 1, + // ID of next movie + $: function (thingy) { + // simple DOM lookup utility function + if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); + if (!thingy.addClass) { + // extend element with a few useful methods + thingy.hide = function () { + this.style.display = 'none'; + }; + thingy.show = function () { + this.style.display = ''; + }; + thingy.addClass = function (name) { + this.removeClass(name); + this.className += ' ' + name; + }; + thingy.removeClass = function (name) { + var classes = this.className.split(/\s+/); + var idx = -1; + for (var k = 0; k < classes.length; k++) { + if (classes[k] == name) { + idx = k; + k = classes.length; + } + } + if (idx > -1) { + classes.splice(idx, 1); + this.className = classes.join(' '); + } + return this; + }; + thingy.hasClass = function (name) { + return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); + }; + } + return thingy; + }, + + setMoviePath: function (path) { + // set path to ZeroClipboard.swf + this.moviePath = path; + }, + + dispatch: function (id, eventName, args) { + // receive event from flash movie, send to client + var client = this.clients[id]; + if (client) { + client.receiveEvent(eventName, args); + } + }, + + register: function (id, client) { + // register new client to receive events + this.clients[id] = client; + }, + + getDOMObjectPosition: function (obj, stopObj) { + // get absolute coordinates for dom element + var info = { + left: 0, + top: 0, + width: obj.width ? obj.width : obj.offsetWidth, + height: obj.height ? obj.height : obj.offsetHeight + }; + + if (obj && (obj != stopObj)) { + info.left += obj.offsetLeft; + info.top += obj.offsetTop; + } + + return info; + }, + + Client: function (elem) { + // constructor for new simple upload client + this.handlers = {}; + + // unique ID + this.id = ZeroClipboard.nextId++; + this.movieId = 'ZeroClipboardMovie_' + this.id; + + // register client with singleton to receive flash events + ZeroClipboard.register(this.id, this); + + // create movie + if (elem) this.glue(elem); + } + }; + + ZeroClipboard.Client.prototype = { + + id: 0, + // unique ID for us + ready: false, + // whether movie is ready to receive events or not + movie: null, + // reference to movie object + clipText: '', + // text to copy to clipboard + handCursorEnabled: true, + // whether to show hand cursor, or default pointer cursor + cssEffects: true, + // enable CSS mouse effects on dom container + handlers: null, + // user event handlers + glue: function (elem, appendElem, stylesToAdd) { + // glue to DOM element + // elem can be ID or actual DOM element object + this.domElement = ZeroClipboard.$(elem); + + // float just above object, or zIndex 99 if dom element isn't set + var zIndex = 99; + if (this.domElement.style.zIndex) { + zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; + } + + if (typeof(appendElem) == 'string') { + appendElem = ZeroClipboard.$(appendElem); + } else if (typeof(appendElem) == 'undefined') { + appendElem = document.getElementsByTagName('body')[0]; + } + + // find X/Y position of domElement + var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); + + // create floating DIV above element + this.div = document.createElement('div'); + this.div.className = "zclip"; + this.div.id = "zclip-" + this.movieId; + $(this.domElement).data('zclipId', 'zclip-' + this.movieId); + var style = this.div.style; + style.position = 'absolute'; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + style.width = '' + box.width + 'px'; + style.height = '' + box.height + 'px'; + style.zIndex = zIndex; + + if (typeof(stylesToAdd) == 'object') { + for (addedStyle in stylesToAdd) { + style[addedStyle] = stylesToAdd[addedStyle]; + } + } + + // style.backgroundColor = '#f00'; // debug + appendElem.appendChild(this.div); + + this.div.innerHTML = this.getHTML(box.width, box.height); + }, + + getHTML: function (width, height) { + // return HTML for movie + var html = ''; + var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; + + if (navigator.userAgent.match(/MSIE/)) { + // IE gets an OBJECT tag + var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; + html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; + } else { + // all other browsers get an EMBED tag + html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; + } + return html; + }, + + hide: function () { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function () { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function () { + // destroy control and floater + if (this.domElement && this.div) { + this.hide(); + this.div.innerHTML = ''; + + var body = document.getElementsByTagName('body')[0]; + try { + body.removeChild(this.div); + } catch (e) { + ; + } + + this.domElement = null; + this.div = null; + } + }, + + reposition: function (elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard.$(elem); + if (!this.domElement) this.hide(); + } + + if (this.domElement && this.div) { + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + setText: function (newText) { + // set text to be copied to clipboard + this.clipText = newText; + if (this.ready) { + this.movie.setText(newText); + } + }, + + addEventListener: function (eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(func); + }, + + setHandCursor: function (enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) { + this.movie.setHandCursor(enabled); + } + }, + + setCSSEffects: function (enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !!enabled; + }, + + receiveEvent: function (eventName, args) { + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 1); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 100); + this.ready = true; + return; + } + + this.ready = true; + try { + this.movie.setText(this.clipText); + } catch (e) { + } + try { + this.movie.setHandCursor(this.handCursorEnabled); + } catch (e) { + } + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('hover'); + if (this.recoverActive) { + this.domElement.addClass('active'); + } + + + } + + + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + this.domElement.removeClass('hover'); + + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][func[1]](this, args); + } else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } + + }; +}/** + * 复制 + * Created by GUY on 2016/2/16. + * @class BI.ClipBoard + * @extends BI.BasicButton + */ +BI.ClipBoard = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-clipboard", + copy: BI.emptyFn, + afterCopy: BI.emptyFn + }) + }, + + _init: function () { + BI.ClipBoard.superclass._init.apply(this, arguments); + }, + + mounted: function () { + var self = this, o = this.options; + if (window.Clipboard) { + this.clipboard = new Clipboard(this.element[0], { + text: function () { + return BI.isFunction(o.copy) ? o.copy() : o.copy; + } + }); + this.clipboard.on("success", o.afterCopy) + } else { + this.element.zclip({ + path: BI.resourceURL + "/ZeroClipboard.swf", + copy: o.copy, + beforeCopy: o.beforeCopy, + afterCopy: o.afterCopy + }); + } + }, + + destroyed: function () { + this.clipboard && this.clipboard.destroy(); + } +}); + +BI.shortcut("bi.clipboard", BI.ClipBoard);/** + * 自定义选色 + * + * Created by GUY on 2015/11/17. + * @class BI.CustomColorChooser + * @extends BI.Widget + */ +BI.CustomColorChooser = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-custom-color-chooser", + width: 227, + height: 245 + }) + }, + + _init: function () { + BI.CustomColorChooser.superclass._init.apply(this, arguments); + var self = this; + this.editor = BI.createWidget({ + type: "bi.color_picker_editor", + width: 195 + }); + this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + }); + this.farbtastic = BI.createWidget({ + type: "bi.farbtastic" + }); + this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + type: "bi.absolute", + items: [{ + el: this.editor, + left: 15, + top: 10, + right: 15 + }], + height: 30 + }, { + type: "bi.absolute", + items: [{ + el: this.farbtastic, + left: 15, + right: 15, + top: 10 + }], + height: 215 + }] + }) + }, + + setValue: function (color) { + this.editor.setValue(color); + this.farbtastic.setValue(color); + }, + + getValue: function () { + return this.editor.getValue(); + } +}); +BI.CustomColorChooser.EVENT_CHANGE = "CustomColorChooser.EVENT_CHANGE"; +BI.shortcut("bi.custom_color_chooser", BI.CustomColorChooser);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooser + * @extends BI.Widget + */ +BI.ColorChooser = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-chooser", + el: {} + }) + }, + + _init: function () { + BI.ColorChooser.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(BI.extend({ + type: "bi.color_chooser_trigger", + width: o.width, + height: o.height + }, o.el)); + this.colorPicker = BI.createWidget({ + type: "bi.color_chooser_popup" + }); + + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 1, + el: this.trigger, + popup: { + el: this.colorPicker, + stopPropagation: false, + minWidth: 202 + } + }); + + var fn = function () { + var color = self.colorPicker.getValue(); + self.trigger.setValue(color); + var colors = BI.string2Array(BI.Cache.getItem("colors") || ""); + var que = new BI.Queue(8); + que.fromArray(colors); + que.remove(color); + que.unshift(color); + BI.Cache.setItem("colors", BI.array2String(que.toArray())); + }; + + this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () { + fn(); + }); + + this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { + fn(); + self.combo.hideView(); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || "")); + }); + + this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); + }) + }, + + isViewVisible: function () { + return this.combo.isViewVisible(); + }, + + setValue: function (color) { + this.combo.setValue(color); + }, + + getValue: function () { + return this.colorPicker.getValue(); + } +}); +BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser", BI.ColorChooser);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooserPopup + * @extends BI.Widget + */ +BI.ColorChooserPopup = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-chooser-popup", + height: 145 + }) + }, + + _init: function () { + BI.ColorChooserPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colorEditor = BI.createWidget({ + type: "bi.color_picker_editor" + }); + + this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { + self.setValue(this.getValue()); + self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); + }); + + this.storeColors = BI.createWidget({ + type: "bi.color_picker", + items: [[{ + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }, { + value: "", + disabled: true + }]], + width: 190, + height: 25 + }); + this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { + self.setValue(this.getValue()[0]); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + }); + + this.colorPicker = BI.createWidget({ + type: "bi.color_picker", + width: 190, + height: 50 + }); + + this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { + self.setValue(this.getValue()[0]); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + }); + + this.customColorChooser = BI.createWidget({ + type: "bi.custom_color_chooser" + }); + + var panel = BI.createWidget({ + type: "bi.popup_panel", + buttons: [BI.i18nText("BI-Basic_Cancel"), BI.i18nText("BI-Basic_Save")], + title: BI.i18nText("BI-Custom_Color"), + el: this.customColorChooser, + stopPropagation: false, + bgap: -1, + rgap: 1, + lgap: 1, + minWidth: 227 + }); + + this.more = BI.createWidget({ + type: "bi.combo", + direction: "right,top", + isNeedAdjustHeight: false, + el: { + type: "bi.text_item", + cls: "color-chooser-popup-more bi-list-item", + textAlign: "center", + height: 20, + text: BI.i18nText("BI-Basic_More") + "..." + }, + popup: panel + }); + + this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self.customColorChooser.setValue(self.getValue()); + }); + panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) { + switch (index) { + case 0: + self.more.hideView(); + break; + case 1: + self.setValue(self.customColorChooser.getValue()); + self.more.hideView(); + self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); + break; + } + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: { + type: "bi.absolute", + cls: "bi-background bi-border-bottom", + items: [{ + el: this.colorEditor, + left: 0, + right: 0, + top: 5 + }] + }, + height: 30 + }, { + el: { + type: "bi.absolute", + items: [{ + el: this.storeColors, + left: 5, + right: 5, + top: 5 + }] + }, + height: 30 + }, { + el: { + type: "bi.absolute", + items: [{ + el: this.colorPicker, + left: 5, + right: 5, + top: 5 + }] + }, + height: 65 + }, { + el: this.more, + height: 20 + }] + }) + }, + + setStoreColors: function (colors) { + if (BI.isArray(colors)) { + var items = BI.map(colors, function (i, color) { + return { + value: color + } + }); + BI.count(colors.length, 8, function (i) { + items.push({ + value: "", + disabled: true + }) + }); + this.storeColors.populate([items]); + } + }, + + setValue: function (color) { + this.colorEditor.setValue(color); + this.colorPicker.setValue(color); + this.storeColors.setValue(color); + }, + + getValue: function () { + return this.colorEditor.getValue(); + } +}); +BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE"; +BI.ColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);/** + * 选色控件 + * + * Created by GUY on 2015/11/17. + * @class BI.ColorChooserTrigger + * @extends BI.Trigger + */ +BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", + height: 30 + }) + }, + + _init: function () { + BI.ColorChooserTrigger.superclass._init.apply(this, arguments); + this.colorContainer = BI.createWidget({ + type: "bi.layout", + cls: "bi-card color-chooser-trigger-content" + }); + + var down = BI.createWidget({ + type: "bi.icon_button", + disableSelected: true, + cls: "icon-combo-down-icon trigger-triangle-font", + width: 12, + height: 8 + }); + + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.colorContainer, + left: 3, + right: 3, + top: 3, + bottom: 3 + }, { + el: down, + right: 3, + bottom: 3 + }] + }); + if (this.options.value) { + this.setValue(this.options.value); + } + }, + + setValue: function (color) { + BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments); + if (color === "") { + this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); + } else if (color === "transparent") { + this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background") + } else { + this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background"); + } + } +}); +BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE"; +BI.shortcut("bi.color_chooser_trigger", BI.ColorChooserTrigger);/** + * 简单选色控件按钮 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPickerButton + * @extends BI.BasicButton + */ +BI.ColorPickerButton = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-color-picker-button bi-background bi-border-top bi-border-left" + }) + }, + + _init: function () { + BI.ColorPickerButton.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.value) { + this.element.css("background-color", o.value); + var name = this.getName(); + this.element.hover(function () { + self._createMask(); + if (self.isEnabled()) { + BI.Maskers.show(name); + } + }, function () { + if (!self.isSelected()) { + BI.Maskers.hide(name); + } + }); + } + }, + + _createMask: function () { + var o = this.options, name = this.getName(); + if (this.isEnabled() && !BI.Maskers.has(name)) { + var w = BI.Maskers.make(name, this, { + offset: { + left: -1, + top: -1, + right: -1, + bottom: -1 + } + }); + w.element.addClass("color-picker-button-mask").css("background-color", o.value); + } + }, + + setSelected: function (b) { + BI.ColorPickerButton.superclass.setSelected.apply(this, arguments); + if (!!b) { + this._createMask(); + } + BI.Maskers[!!b ? "show" : "hide"](this.getName()); + } +}); +BI.ColorPickerButton.EVENT_CHANGE = "ColorPickerButton.EVENT_CHANGE"; +BI.shortcut("bi.color_picker_button", BI.ColorPickerButton);/** + * 简单选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPicker + * @extends BI.Widget + */ +BI.ColorPicker = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-picker", + items: null + }) + }, + + _items: [ + [{ + value: "#ffffff" + }, { + value: "#f2f2f2" + }, { + value: "#e5e5e5" + }, { + value: "#d9d9d9" + }, { + value: "#cccccc" + }, { + value: "#bfbfbf" + }, { + value: "#b2b2b2" + }, { + value: "#a6a6a6" + }, { + value: "#999999" + }, { + value: "#8c8c8c" + }, { + value: "#808080" + }, { + value: "#737373" + }, { + value: "#666666" + }, { + value: "#4d4d4d" + }, { + value: "#333333" + }, { + value: "#000000" + }], + [{ + value: "#d8b5a6" + }, { + value: "#ff9e9a" + }, { + value: "#ffc17d" + }, { + value: "#f5e56b" + }, { + value: "#d8e698" + }, { + value: "#e0ebaf" + }, { + value: "#c3d825" + }, { + value: "#bce2e8" + }, { + value: "#85d3cd" + }, { + value: "#bce2e8" + }, { + value: "#a0d8ef" + }, { + value: "#89c3eb" + }, { + value: "#bbc8e6" + }, { + value: "#bbbcde" + }, { + value: "#d6b4cc" + }, { + value: "#fbc0d3" + }], + [{ + value: "#bb9581" + }, { + value: "#f37d79" + }, { + value: "#fba74f" + }, { + value: "#ffdb4f" + }, { + value: "#c7dc68" + }, { + value: "#b0ca71" + }, { + value: "#99ab4e" + }, { + value: "#84b9cb" + }, { + value: "#00a3af" + }, { + value: "#2ca9e1" + }, { + value: "#0095d9" + }, { + value: "#4c6cb3" + }, { + value: "#8491c3" + }, { + value: "#a59aca" + }, { + value: "#cc7eb1" + }, { + value: "#e89bb4" + }], + [{ + value: "#9d775f" + }, { + value: "#dd4b4b" + }, { + value: "#ef8b07" + }, { + value: "#fcc800" + }, { + value: "#aacf53" + }, { + value: "#82ae46" + }, { + value: "#69821b" + }, { + value: "#59b9c6" + }, { + value: "#2a83a2" + }, { + value: "#007bbb" + }, { + value: "#19448e" + }, { + value: "#274a78" + }, { + value: "#4a488e" + }, { + value: "#7058a3" + }, { + value: "#884898" + }, { + value: "#d47596" + }] + ], + + _init: function () { + BI.ColorPicker.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colors = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(o.items || this._items, { + type: "bi.color_picker_button", + once: false + }), + layouts: [{ + type: "bi.grid" + }] + }); + this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () { + self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments); + }) + }, + + populate: function(items){ + var args =[].slice.call(arguments); + args[0] = BI.createItems(items, { + type: "bi.color_picker_button", + once: false + }); + this.colors.populate.apply(this.colors, args); + }, + + setValue: function (color) { + this.colors.setValue(color); + }, + + getValue: function () { + return this.colors.getValue(); + } +}); +BI.ColorPicker.EVENT_CHANGE = "ColorPicker.EVENT_CHANGE"; +BI.shortcut("bi.color_picker", BI.ColorPicker);/** + * 简单选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.ColorPickerEditor + * @extends BI.Widget + */ +BI.ColorPickerEditor = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-color-picker-editor", + width: 200, + height: 20 + }) + }, + + _init: function () { + BI.ColorPickerEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.colorShow = BI.createWidget({ + type: "bi.layout", + cls: "color-picker-editor-display bi-card", + height: 20 + }); + var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { + type: "bi.label", + cls: "color-picker-editor-label", + width: 10, + height: 20 + })); + + var checker = function (v) { + return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255; + }; + var Ws = BI.createWidgets([{}, {}, {}], { + type: "bi.small_text_editor", + cls: "color-picker-editor-input", + validationChecker: checker, + errorText: BI.i18nText("BI-Color_Picker_Error_Text"), + allowBlank: true, + value: 255, + width: 32, + height: 20 + }); + BI.each(Ws, function (i, w) { + w.on(BI.TextEditor.EVENT_CHANGE, function () { + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + }); + this.R = Ws[0]; + this.G = Ws[1]; + this.B = Ws[2]; + + this.none = BI.createWidget({ + type: "bi.checkbox", + title: BI.i18nText("BI-Basic_Auto") + }); + this.none.on(BI.Checkbox.EVENT_CHANGE, function () { + if (this.isSelected()) { + self.lastColor = self.getValue(); + self.setValue(""); + } else { + self.setValue(self.lastColor || "#000000"); + } + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + + this.transparent = BI.createWidget({ + type: "bi.checkbox", + title: BI.i18nText("BI-Transparent_Color") + }); + this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () { + if (this.isSelected()) { + self.lastColor = self.getValue(); + self.setValue("transparent"); + } else { + self.setValue(self.lastColor || "#000000"); + } + if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + self.colorShow.element.css("background-color", self.getValue()); + self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); + } + }); + + BI.createWidget({ + type: "bi.htape", + element: this, + items: [{ + el: this.colorShow, + width: 'fill' + }, { + el: RGB[0], + lgap: 10, + width: 16 + }, { + el: this.R, + width: 32 + }, { + el: RGB[1], + lgap: 10, + width: 16 + }, { + el: this.G, + width: 32 + }, { + el: RGB[2], + lgap: 10, + width: 16 + }, { + el: this.B, + width: 32 + }, { + el: { + type: "bi.center_adapt", + items: [this.none] + }, + width: 18 + }, { + el: { + type: "bi.center_adapt", + items: [this.transparent] + }, + width: 18 + }] + }) + }, + + setValue: function (color) { + if (color === "transparent") { + this.transparent.setSelected(true); + this.none.setSelected(false); + this.R.setValue(""); + this.G.setValue(""); + this.B.setValue(""); + return; + } + if (!color) { + color = ""; + this.none.setSelected(true); + } else { + this.none.setSelected(false); + } + this.transparent.setSelected(false); + this.colorShow.element.css("background-color", color); + var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); + this.R.setValue(BI.isNull(json.r) ? "" : json.r); + this.G.setValue(BI.isNull(json.g) ? "" : json.g); + this.B.setValue(BI.isNull(json.b) ? "" : json.b); + }, + + getValue: function () { + if (this.transparent.isSelected()) { + return "transparent"; + } + return BI.DOM.rgb2hex(BI.DOM.json2rgb({ + r: this.R.getValue(), + g: this.G.getValue(), + b: this.B.getValue() + })) + } +}); +BI.ColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE"; +BI.shortcut("bi.color_picker_editor", BI.ColorPickerEditor);/** + * 选色控件 + * + * Created by GUY on 2015/11/16. + * @class BI.Farbtastic + * @extends BI.Widget + */ +BI.Farbtastic = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-farbtastic", + width: 195, + height: 195 + }) + }, + + _init: function () { + BI.Farbtastic.superclass._init.apply(this, arguments); + }, + + mounted: function () { + var self = this; + this.farbtastic = $.farbtastic(this.element, function (v) { + self.fireEvent(BI.Farbtastic.EVENT_CHANGE, self.getValue(), self); + }); + }, + + setValue: function (color) { + this.farbtastic.setColor(color); + }, + + getValue: function () { + return this.farbtastic.color; + } +}); +BI.Farbtastic.EVENT_CHANGE = "Farbtastic.EVENT_CHANGE"; +BI.shortcut("bi.farbtastic", BI.Farbtastic);/** + * Farbtastic Color Picker 1.2 + * © 2008 Steven Wittens + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +jQuery.fn.farbtastic = function (callback) { + $.farbtastic(this, callback); + return this; +}; + +jQuery.farbtastic = function (container, callback) { + var container = $(container).get(0); + return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); +} + +jQuery._farbtastic = function (container, callback) { + // Store farbtastic object + var fb = this; + + // Insert markup + $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>'); + var e = $('.farbtastic', container); + fb.wheel = $('.wheel', container).get(0); + // Dimensions + fb.radius = 84; + fb.square = 100; + fb.width = 194; + + // Fix background PNGs in IE6 + if (navigator.appVersion.match(/MSIE [0-6]\./)) { + $('*', e).each(function () { + if (this.currentStyle.backgroundImage != 'none') { + var image = this.currentStyle.backgroundImage; + image = this.currentStyle.backgroundImage.substring(5, image.length - 2); + $(this).css({ + 'backgroundImage': 'none', + 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" + }); + } + }); + } + + /** + * Link to the given element(s) or callback. + */ + fb.linkTo = function (callback) { + // Unbind previous nodes + if (typeof fb.callback == 'object') { + $(fb.callback).unbind('keyup', fb.updateValue); + } + + // Reset color + fb.color = null; + + // Bind callback or elements + if (typeof callback == 'function') { + fb.callback = callback; + } + else if (typeof callback == 'object' || typeof callback == 'string') { + fb.callback = $(callback); + fb.callback.bind('keyup', fb.updateValue); + if (fb.callback.get(0).value) { + fb.setColor(fb.callback.get(0).value); + } + } + return this; + } + fb.updateValue = function (event) { + if (this.value && this.value != fb.color) { + fb.setColor(this.value); + } + } + + /** + * Change color with HTML syntax #123456 + */ + fb.setColor = function (color) { + var unpack = fb.unpack(color); + if (fb.color != color && unpack) { + fb.color = color; + fb.rgb = unpack; + fb.hsl = fb.RGBToHSL(fb.rgb); + fb.updateDisplay(); + } + return this; + } + + /** + * Change color with HSL triplet [0..1, 0..1, 0..1] + */ + fb.setHSL = function (hsl) { + fb.hsl = hsl; + fb.rgb = fb.HSLToRGB(hsl); + fb.color = fb.pack(fb.rgb); + fb.updateDisplay(); + return this; + } + + ///////////////////////////////////////////////////// + + /** + * Retrieve the coordinates of the given event relative to the center + * of the widget. + */ + fb.widgetCoords = function (event) { + var x, y; + var el = event.target || event.srcElement; + var reference = fb.wheel; + + if (typeof event.offsetX != 'undefined') { + // Use offset coordinates and find common offsetParent + var pos = { x: event.offsetX, y: event.offsetY }; + + // Send the coordinates upwards through the offsetParent chain. + var e = el; + while (e) { + e.mouseX = pos.x; + e.mouseY = pos.y; + pos.x += e.offsetLeft; + pos.y += e.offsetTop; + e = e.offsetParent; + } + + // Look for the coordinates starting from the wheel widget. + var e = reference; + var offset = { x: 0, y: 0 } + while (e) { + if (typeof e.mouseX != 'undefined') { + x = e.mouseX - offset.x; + y = e.mouseY - offset.y; + break; + } + offset.x += e.offsetLeft; + offset.y += e.offsetTop; + e = e.offsetParent; + } + + // Reset stored coordinates + e = el; + while (e) { + e.mouseX = undefined; + e.mouseY = undefined; + e = e.offsetParent; + } + } + else { + // Use absolute coordinates + var pos = fb.absolutePosition(reference); + x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; + y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; + } + // Subtract distance to middle + return { x: x - fb.width / 2, y: y - fb.width / 2 }; + } + + /** + * Mousedown handler + */ + fb.mousedown = function (event) { + // Capture mouse + if (!document.dragging) { + $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); + document.dragging = true; + } + + // Check which area is being dragged + var pos = fb.widgetCoords(event); + fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; + + // Process + fb.mousemove(event); + return false; + } + + /** + * Mousemove handler + */ + fb.mousemove = function (event) { + // Get coordinates relative to color picker center + var pos = fb.widgetCoords(event); + + // Set new HSL parameters + if (fb.circleDrag) { + var hue = Math.atan2(pos.x, -pos.y) / 6.28; + if (hue < 0) hue += 1; + fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); + } + else { + var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); + var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); + fb.setHSL([fb.hsl[0], sat, lum]); + } + return false; + } + + /** + * Mouseup handler + */ + fb.mouseup = function () { + // Uncapture mouse + $(document).unbind('mousemove', fb.mousemove); + $(document).unbind('mouseup', fb.mouseup); + document.dragging = false; + } + + /** + * Update the markers and styles + */ + fb.updateDisplay = function () { + // Markers + var angle = fb.hsl[0] * 6.28; + $('.h-marker', e).css({ + left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', + top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' + }); + + $('.sl-marker', e).css({ + left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', + top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' + }); + + // Saturation/Luminance gradient + $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); + + // Linked elements or callback + if (typeof fb.callback == 'object') { + // Set background/foreground color + $(fb.callback).css({ + backgroundColor: fb.color, + color: fb.hsl[2] > 0.5 ? '#000' : '#fff' + }); + + // Change linked value + $(fb.callback).each(function() { + if (this.value && this.value != fb.color) { + this.value = fb.color; + } + }); + } + else if (typeof fb.callback == 'function') { + fb.callback.call(fb, fb.color); + } + } + + /** + * Get absolute position of element + */ + fb.absolutePosition = function (el) { + var r = { x: el.offsetLeft, y: el.offsetTop }; + // Resolve relative to offsetParent + if (el.offsetParent) { + var tmp = fb.absolutePosition(el.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; + }; + + /* Various color utility functions */ + fb.pack = function (rgb) { + var r = Math.round(rgb[0] * 255); + var g = Math.round(rgb[1] * 255); + var b = Math.round(rgb[2] * 255); + return '#' + (r < 16 ? '0' : '') + r.toString(16) + + (g < 16 ? '0' : '') + g.toString(16) + + (b < 16 ? '0' : '') + b.toString(16); + } + + fb.unpack = function (color) { + if (color.length == 7) { + return [parseInt('0x' + color.substring(1, 3)) / 255, + parseInt('0x' + color.substring(3, 5)) / 255, + parseInt('0x' + color.substring(5, 7)) / 255]; + } + else if (color.length == 4) { + return [parseInt('0x' + color.substring(1, 2)) / 15, + parseInt('0x' + color.substring(2, 3)) / 15, + parseInt('0x' + color.substring(3, 4)) / 15]; + } + } + + fb.HSLToRGB = function (hsl) { + var m1, m2, r, g, b; + var h = hsl[0], s = hsl[1], l = hsl[2]; + m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; + m1 = l * 2 - m2; + return [this.hueToRGB(m1, m2, h+0.33333), + this.hueToRGB(m1, m2, h), + this.hueToRGB(m1, m2, h-0.33333)]; + } + + fb.hueToRGB = function (m1, m2, h) { + h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); + if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; + if (h * 2 < 1) return m2; + if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; + return m1; + } + + fb.RGBToHSL = function (rgb) { + var min, max, delta, h, s, l; + var r = rgb[0], g = rgb[1], b = rgb[2]; + min = Math.min(r, Math.min(g, b)); + max = Math.max(r, Math.max(g, b)); + delta = max - min; + l = (min + max) / 2; + s = 0; + if (l > 0 && l < 1) { + s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); + } + h = 0; + if (delta > 0) { + if (max == r && max != g) h += (g - b) / delta; + if (max == g && max != b) h += (2 + (b - r) / delta); + if (max == b && max != r) h += (4 + (r - g) / delta); + h /= 6; + } + return [h, s, l]; + } + + // Install mousedown handler (the others are set on the document on-demand) + $('*', e).mousedown(fb.mousedown); + + // Init color + fb.setColor('#000000'); + + // Set linked elements/callback + if (callback) { + fb.linkTo(callback); + } +}/** + * Created by GUY on 2017/2/8. + * + * @class BI.BubbleCombo + * @extends BI.Widget + */ +BI.BubbleCombo = BI.inherit(BI.Widget, { + _const: { + TRIANGLE_LENGTH: 6 + }, + _defaultConfig: function () { + return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-bubble-combo", + trigger: "click", + toggle: true, + direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right + isDefaultInit: false, + destroyWhenHide: false, + isNeedAdjustHeight: true,//是否需要高度调整 + isNeedAdjustWidth: true, + stopPropagation: false, + adjustLength: 0,//调整的距离 + // adjustXOffset: 0, + // adjustYOffset: 10, + hideChecker: BI.emptyFn, + offsetStyle: "left", //left,right,center + el: {}, + popup: {}, + }) + }, + _init: function () { + BI.BubbleCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + trigger: o.trigger, + toggle: o.toggle, + direction: o.direction, + isDefaultInit: o.isDefaultInit, + destroyWhenHide: o.destroyWhenHide, + isNeedAdjustHeight: o.isNeedAdjustHeight, + isNeedAdjustWidth: o.isNeedAdjustWidth, + adjustLength: this._getAdjustLength(), + stopPropagation: o.stopPropagation, + adjustXOffset: 0, + adjustYOffset: 0, + hideChecker: o.hideChecker, + offsetStyle: o.offsetStyle, + el: o.el, + popup: BI.extend({ + type: "bi.bubble_popup_view" + }, o.popup), + }); + this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments); + }); + this.combo.on(BI.Combo.EVENT_CHANGE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments); + }); + this.combo.on(BI.Combo.EVENT_EXPAND, function () { + self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments); + }); + this.combo.on(BI.Combo.EVENT_COLLAPSE, function () { + self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () { + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self._showTriangle(); + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { + self._hideTriangle(); + self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments); + }); + this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments); + }); + }, + + _getAdjustLength: function () { + return this._const.TRIANGLE_LENGTH + this.options.adjustLength; + }, + + _createTriangle: function (direction) { + var pos = {}, op = {}; + var adjustLength = this.options.adjustLength; + var offset = this.element.offset(); + var left = offset.left, right = offset.left + this.element.outerWidth(); + var top = offset.top, bottom = offset.top + this.element.outerHeight(); + switch (direction) { + case "left": + pos = { + top: top, + height: this.element.outerHeight(), + left: left - adjustLength - this._const.TRIANGLE_LENGTH + }; + op = {width: this._const.TRIANGLE_LENGTH}; + break; + case "right": + pos = { + top: top, + height: this.element.outerHeight(), + left: right + adjustLength + }; + op = {width: this._const.TRIANGLE_LENGTH}; + break; + case "top": + pos = { + left: left, + width: this.element.outerWidth(), + top: top - adjustLength - this._const.TRIANGLE_LENGTH + }; + op = {height: this._const.TRIANGLE_LENGTH}; + break; + case "bottom": + pos = { + left: left, + width: this.element.outerWidth(), + top: bottom + adjustLength + }; + op = {height: this._const.TRIANGLE_LENGTH}; + break; + default: + break; + } + this.triangle && this.triangle.destroy(); + this.triangle = BI.createWidget(op, { + type: "bi.center_adapt", + cls: "button-combo-triangle-wrapper", + items: [{ + type: "bi.layout", + cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" + }] + }); + pos.el = this.triangle; + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [pos] + }) + }, + + _createLeftTriangle: function () { + this._createTriangle("left"); + }, + + _createRightTriangle: function () { + this._createTriangle("right"); + }, + + _createTopTriangle: function () { + this._createTriangle("top"); + }, + + _createBottomTriangle: function () { + this._createTriangle("bottom"); + }, + + _showTriangle: function () { + var pos = this.combo.getPopupPosition(); + switch (pos.dir) { + case "left,top": + case "left,bottom": + this._createLeftTriangle(); + this.combo.getView().showLine("right"); + break; + case "right,top": + case "right,bottom": + this._createRightTriangle(); + this.combo.getView().showLine("left"); + break; + case "top,left": + case "top,right": + this._createTopTriangle(); + this.combo.getView().showLine("bottom"); + break; + case "bottom,left": + case "bottom,right": + this._createBottomTriangle(); + this.combo.getView().showLine("top"); + break; + } + }, + + _hideTriangle: function () { + this.triangle && this.triangle.destroy(); + this.triangle = null; + this.combo.getView() && this.combo.getView().hideLine(); + }, + + hideView: function () { + this._hideTriangle(); + this.combo && this.combo.hideView(); + }, + + showView: function () { + this.combo && this.combo.showView(); + }, + + isViewVisible: function () { + return this.combo.isViewVisible(); + } +}); + +BI.BubbleCombo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; +BI.BubbleCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.BubbleCombo.EVENT_EXPAND = "EVENT_EXPAND"; +BI.BubbleCombo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; +BI.BubbleCombo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + + +BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.BubbleCombo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; +BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; +BI.BubbleCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; +BI.shortcut("bi.bubble_combo", BI.BubbleCombo);/** + * Created by GUY on 2017/2/8. + * + * @class BI.BubblePopupView + * @extends BI.PopupView + */ +BI.BubblePopupView = BI.inherit(BI.PopupView, { + _defaultConfig: function () { + var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(config, { + baseCls: config.baseCls + " bi-bubble-popup-view" + }) + }, + _init: function () { + BI.BubblePopupView.superclass._init.apply(this, arguments); + }, + + showLine: function (direction) { + var pos = {}, op = {}; + switch (direction) { + case "left": + pos = { + top: 0, + bottom: 0, + left: -1 + }; + op = {width: 3}; + break; + case "right": + pos = { + top: 0, + bottom: 0, + right: -1 + }; + op = {width: 3}; + break; + case "top": + pos = { + left: 0, + right: 0, + top: -1 + }; + op = {height: 3}; + break; + case "bottom": + pos = { + left: 0, + right: 0, + bottom: -1 + }; + op = {height: 3}; + break; + default: + break; + } + this.line = BI.createWidget(op, { + type: "bi.layout", + cls: "bubble-popup-line bi-high-light-background" + }); + pos.el = this.line; + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [pos] + }) + }, + + hideLine: function () { + this.line && this.line.destroy(); + } +}); + +BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); + +/** + * Created by GUY on 2017/2/8. + * + * @class BI.BubblePopupBarView + * @extends BI.BubblePopupView + */ +BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { + _defaultConfig: function () { + return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-bubble-bar-popup-view", + buttons: [{value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}, {value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}] + }) + }, + _init: function () { + BI.BubblePopupBarView.superclass._init.apply(this, arguments); + }, + _createToolBar: function () { + var o = this.options, self = this; + + var items = []; + BI.each(o.buttons.reverse(), function (i, buttonOpt) { + if(BI.isWidget(buttonOpt)){ + items.push(buttonOpt); + }else{ + items.push(BI.extend({ + type: 'bi.button', + height: 30, + handler: function (v) { + self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); + } + }, buttonOpt)) + } + }); + return BI.createWidget({ + type: 'bi.right_vertical_adapt', + height: 40, + hgap: 10, + bgap: 10, + items: items + }); + } +}); +BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; +BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/** + * Created by Young's on 2016/4/28. + */ +BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-check-editor-combo", + width: 100, + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "" + }) + }, + + _init: function () { + BI.EditorIconCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.editor_trigger", + items: o.items, + height: o.height, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () { + self.popup.setValue(this.getValue()); + self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.editorIconCheckCombo.hideView(); + self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editorIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.editorIconCheckCombo.setValue(v); + }, + + getValue: function () { + return this.trigger.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.editorIconCheckCombo.populate(items); + } +}); +BI.EditorIconCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.editor_icon_check_combo", BI.EditorIconCheckCombo);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaCombo + * @extend BI.Widget + */ +BI.FormulaCombo = BI.inherit(BI.Widget, { + + _constant: { + POPUP_HEIGHT: 450, + POPUP_WIDTH: 600, + POPUP_V_GAP: 10, + POPUP_H_GAP: 10, + ADJUST_LENGTH: 2, + HEIGHT_MAX: 10000, + MAX_HEIGHT: 500, + MAX_WIDTH: 600, + COMBO_TRIGGER_WIDTH: 300 + }, + + _defaultConfig: function () { + return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-combo", + height: 30, + items: [] + }) + }, + + _init: function () { + BI.FormulaCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.formula_ids = []; + this.input = BI.createWidget({ + type: "bi.formula_combo_trigger", + height: o.height, + items: o.items + }); + this.formulaPopup = BI.createWidget({ + type: "bi.formula_combo_popup", + fieldItems: o.items + }); + + this.formulaInputCombo = BI.createWidget({ + type: "bi.combo", + element: this, + isNeedAdjustHeight: true, + isNeedAdjustWidth: false, + adjustLength: this._constant.ADJUST_LENGTH, + el: this.input, + popup: { + el: { + type: "bi.absolute", + height: this._constant.HEIGHT_MAX, + width: this._constant.POPUP_WIDTH, + items: [{ + el: this.formulaPopup, + top: this._constant.POPUP_V_GAP, + left: this._constant.POPUP_H_GAP, + right: this._constant.POPUP_V_GAP, + bottom: 0 + }] + }, + stopPropagation: false, + maxHeight: this._constant.MAX_HEIGHT, + width: this._constant.MAX_WIDTH + } + }); + this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { + self.formulaPopup.setValue(self.input.getValue()); + }); + this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE, function () { + self.setValue(self.formulaPopup.getValue()); + self.formulaInputCombo.hideView(); + self.fireEvent(BI.FormulaCombo.EVENT_CHANGE); + }); + this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL, function () { + self.formulaInputCombo.hideView(); + }); + }, + + setValue: function (v) { + if (this.formulaInputCombo.isViewVisible()) { + this.formulaInputCombo.hideView(); + } + this.input.setValue(v); + this.input.setText(BI.Func.getFormulaStringFromFormulaValue(v)); + this.formulaPopup.setValue(this.input.getValue()); + }, + + getFormulaTargetIds: function() { + return this.formulaPopup.getFormulaTargetIds(); + }, + + getValue: function () { + return this.input.getValue(); + } +}); +BI.FormulaCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.formula_combo", BI.FormulaCombo);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaComboPopup + * @extend BI.Widget + */ +BI.FormulaComboPopup = BI.inherit(BI.Widget, { + + _constant: { + BUTTON_HEIGHT: 30, + SOUTH_HEIGHT: 60, + SOUTH_H_GAP: 10 + }, + + _defaultConfig: function () { + return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-pane-popup" + }) + }, + + _init: function () { + BI.FormulaComboPopup.superclass._init.apply(this, arguments); + this.populate(); + }, + + populate: function () { + var self = this, fieldItems = this.options.fieldItems; + this.formula = BI.createWidget({ + type: "bi.formula_insert" + }); + this.formula.populate(fieldItems); + var confirmButton = BI.createWidget({ + type: "bi.button", + level: "common", + height: this._constant.BUTTON_HEIGHT, + text: BI.i18nText("BI-Basic_OK") + }); + var cancelButton = BI.createWidget({ + type: "bi.button", + level: "ignore", + height: this._constant.BUTTON_HEIGHT, + text: BI.i18nText("BI-Basic_Cancel") + }); + + this.formula.on(BI.FormulaInsert.EVENT_CHANGE, function () { + confirmButton.setEnable(self.formula.checkValidation()); + }); + confirmButton.on(BI.Button.EVENT_CHANGE, function () { + self.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE); + }); + cancelButton.on(BI.Button.EVENT_CHANGE, function () { + self.setValue(self.oldValue); + self.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL); + }); + + BI.createWidget({ + type: "bi.vtape", + element: this, + items: [{ + el: this.formula, + height: "fill" + }, { + el: { + type: "bi.right_vertical_adapt", + height: this._constant.SOUTH_HEIGHT, + items: [cancelButton, confirmButton], + hgap: this._constant.SOUTH_H_GAP + }, + height: this._constant.SOUTH_HEIGHT + }] + }) + }, + + getFormulaTargetIds: function(){ + return this.formula.getUsedFields(); + }, + + getValue: function () { + return this.formula.getValue(); + }, + + setValue: function (v) { + this.oldValue = v; + this.formula.setValue(v); + } +}); +BI.FormulaComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.FormulaComboPopup.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; +BI.shortcut("bi.formula_combo_popup", BI.FormulaComboPopup);/** + * Created by GUY on 2016/4/25. + * + * @class BI.FormulaComboTrigger + * @extend BI.Widget + */ +BI.FormulaComboTrigger = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-formula-combo-trigger", + height: 30, + items: [] + }) + }, + + _init: function () { + BI.FormulaComboTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.label = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + textHeight: this.options.height, + lgap: 10 + }); + }, + + _getTextFromFormulaValue: function (formulaValue) { + var self = this; + var formulaString = ""; + var regx = /\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g; + var result = formulaValue.match(regx); + BI.each(result, function (i, item) { + var fieldRegx = /\$[\{][^\}]*[\}]/; + var str = item.match(fieldRegx); + if (BI.isNotEmptyArray(str)) { + var id = str[0].substring(2, item.length - 1); + var item = BI.find(BI.flatten(self.options.items), function (i, item) { + return id === item.value; + }); + formulaString = formulaString + item.text; + } else { + formulaString = formulaString + item; + } + }); + return formulaString; + }, + + getValue: function () { + return this.options.value; + }, + + setValue: function (v) { + this.options.value = v; + this.label.setText(this._getTextFromFormulaValue(v)); + } +}); +BI.shortcut("bi.formula_combo_trigger", BI.FormulaComboTrigger);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconCombo + * @extend BI.Widget + */ +BI.IconCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-icon-combo", + width: 24, + height: 24, + iconClass: "", + el: {}, + popup: {}, + minWidth: 100, + maxWidth: 'auto', + maxHeight: 300, + direction: "bottom", + adjustLength: 3,//调整的距离 + adjustXOffset: 0, + adjustYOffset: 0, + offsetStyle: "left", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }) + }, + + _init: function () { + BI.IconCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.icon_combo_trigger", + iconClass: o.iconClass, + title: o.title, + items: o.items, + width: o.width, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.popup = BI.createWidget(o.popup, { + type: "bi.icon_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.iconCombo.hideView(); + self.fireEvent(BI.IconCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.iconCombo = BI.createWidget({ + type: "bi.combo", + element: this, + direction: o.direction, + adjustLength: o.adjustLength, + adjustXOffset: o.adjustXOffset, + adjustYOffset: o.adjustYOffset, + offsetStyle: o.offsetStyle, + el: this.trigger, + popup: { + el: this.popup, + maxWidth: o.maxWidth, + maxHeight: o.maxHeight, + minWidth: o.minWidth + } + }); + }, + + showView: function () { + this.iconCombo.showView(); + }, + + hideView: function () { + this.iconCombo.hideView(); + }, + + setValue: function (v) { + this.iconCombo.setValue(v); + }, + + getValue: function () { + return this.iconCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.iconCombo.populate(items); + } +}); +BI.IconCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo", BI.IconCombo);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconComboPopup + * @extend BI.Pane + */ +BI.IconComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi.icon-combo-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.IconComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.single_select_icon_text_item", + height: 30 + }), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + populate: function (items) { + BI.IconComboPopup.superclass.populate.apply(this, arguments); + items = BI.createItems(items, { + type: "bi.single_select_icon_text_item", + height: 30 + }); + this.popup.populate(items); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.IconComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo_popup", BI.IconComboPopup);/** + * Created by GUY on 2016/2/2. + * + * @class BI.IconComboTrigger + * @extend BI.Widget + */ +BI.IconComboTrigger = BI.inherit(BI.Trigger, { + _defaultConfig: function () { + return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-combo-trigger", + el: {}, + items: [], + iconClass: "", + width: 25, + height: 25, + isShowDown: true + }); + }, + + _init: function () { + BI.IconComboTrigger.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.button = BI.createWidget(o.el, { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + disableSelected: true, + width: o.width, + height: o.height, + iconWidth: o.iconWidth, + iconHeight: o.iconHeight + }); + this.down = BI.createWidget({ + type: "bi.icon_button", + disableSelected: true, + cls: "icon-combo-down-icon trigger-triangle-font", + width: 12, + height: 8 + }); + this.down.setVisible(o.isShowDown); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.button, + left: 0, + right: 0, + top: 0, + bottom: 0 + }, { + el: this.down, + right: 0, + bottom: 0 + }] + }); + if (BI.isKey(o.value)) { + this.setValue(o.value); + } + }, + + populate: function (items) { + var o = this.options; + this.options.items = items || []; + this.button.setIcon(o.iconClass); + this.button.setSelected(false); + this.down.setSelected(false); + }, + + setValue: function (v) { + BI.IconComboTrigger.superclass.setValue.apply(this, arguments); + var o = this.options; + var iconClass = ""; + v = BI.isArray(v) ? v[0] : v; + if (BI.any(this.options.items, function (i, item) { + if (v === item.value) { + iconClass = item.iconClass; + return true; + } + })) { + this.button.setIcon(iconClass); + this.button.setSelected(true); + this.down.setSelected(true); + } else { + this.button.setIcon(o.iconClass); + this.button.setSelected(false); + this.down.setSelected(false); + } + } +}); +BI.IconComboTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.icon_combo_trigger", BI.IconComboTrigger);/** + * 单选combo + * + * @class BI.StaticCombo + * @extend BI.Widget + */ +BI.StaticCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-static-combo", + height: 30, + text: "", + el: {}, + items: [], + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }) + }, + + _init: function () { + BI.StaticCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.text_icon_item", + cls: "bi-select-text-trigger bi-border pull-down-font", + text: o.text, + readonly: true, + textLgap: 5, + height: o.height - 2 + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + textAlign: o.textAlign, + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.combo.hideView(); + self.fireEvent(BI.StaticCombo.EVENT_CHANGE, arguments); + }); + this.combo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup + } + }); + }, + + populate: function (items) { + this.combo.populate(items); + }, + + setValue: function (v) { + this.combo.setValue(v); + }, + + getValue: function () { + return this.combo.getValue(); + } +}); +BI.StaticCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.static_combo", BI.StaticCombo);/** + * @class BI.TextValueCheckCombo + * @extend BI.Widget + * combo : text + icon, popup : check + text + */ +BI.TextValueCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-text-value-check-combo", + width: 100, + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "" + }) + }, + + _init: function () { + BI.TextValueCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.textIconCheckCombo.hideView(); + self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.textIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setTitle: function (title) { + this.trigger.setTitle(title); + }, + + setValue: function (v) { + this.textIconCheckCombo.setValue(v); + }, + + setWarningTitle: function (title) { + this.trigger.setWarningTitle(title); + }, + + getValue: function () { + return this.textIconCheckCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.textIconCheckCombo.populate(items); + } +}); +BI.TextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo);/** + * @class BI.SmallTextValueCheckCombo + * @extend BI.Widget + * combo : text + icon, popup : check + text + */ +BI.SmallTextValueCheckCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { + width: 100, + height: 24, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "" + }) + }, + + _init: function () { + BI.SmallTextValueCheckCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.small_select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_check_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.SmallTextIconCheckCombo.hideView(); + self.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.SmallTextIconCheckCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.SmallTextIconCheckCombo.setValue(v); + }, + + getValue: function () { + return this.SmallTextIconCheckCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.SmallTextIconCheckCombo.populate(items); + } +}); +BI.SmallTextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.small_text_value_check_combo", BI.SmallTextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-icon-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: this._formatItems(o.items), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + _formatItems: function (items) { + return BI.map(items, function (i, item) { + return BI.extend({ + type: "bi.icon_text_item", + cls: "item-check-font bi-list-item", + height: 30 + }, item); + }); + }, + + populate: function (items) { + BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments); + this.popup.populate(this._formatItems(items)); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.TextValueCheckComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/** + * @class BI.TextValueCombo + * @extend BI.Widget + * combo : text + icon, popup : text + * 参见场景dashboard布局方式选择 + */ +BI.TextValueCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "bi-text-value-combo", + height: 30, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + text: "", + el: {} + }) + }, + + _init: function () { + BI.TextValueCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.textIconCombo.hideView(); + self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.textIconCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.textIconCombo.setValue(v); + }, + + getValue: function () { + return this.textIconCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.textIconCombo.populate(items); + } +}); +BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** + * @class BI.SmallTextValueCombo + * @extend BI.Widget + * combo : text + icon, popup : text + * 参见场景dashboard布局方式选择 + */ +BI.SmallTextValueCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), { + width: 100, + height: 24, + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + el: {}, + text: "" + }) + }, + + _init: function () { + BI.SmallTextValueCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget(o.el, { + type: "bi.small_select_text_trigger", + items: o.items, + height: o.height, + text: o.text + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + chooseType: o.chooseType, + items: o.items + }); + this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.SmallTextValueCombo.hideView(); + self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.SmallTextValueCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.SmallTextValueCombo.setValue(v); + }, + + getValue: function () { + return this.SmallTextValueCombo.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.SmallTextValueCombo.populate(items); + } +}); +BI.SmallTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, { + _defaultConfig: function () { + return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-icon-popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }); + }, + + _init: function () { + BI.TextValueComboPopup.superclass._init.apply(this, arguments); + var o = this.options, self = this; + this.popup = BI.createWidget({ + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.single_select_item", + textAlign: o.textAlign, + height: 30 + }), + chooseType: o.chooseType, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); + } + }); + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.popup] + }); + }, + + populate: function (items) { + BI.TextValueComboPopup.superclass.populate.apply(this, arguments); + items = BI.createItems(items, { + type: "bi.single_select_item", + height: 30 + }); + this.popup.populate(items); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + this.popup.setValue(v); + } + +}); +BI.TextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_combo_popup", BI.TextValueComboPopup);/** + * @class BI.TextValueDownListCombo + * @extend BI.Widget + */ +BI.TextValueDownListCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-text-value-down-list-combo", + height: 30, + text: "" + }) + }, + + _init: function () { + BI.TextValueDownListCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this._createValueMap(); + + this.trigger = BI.createWidget({ + type: "bi.down_list_select_text_trigger", + height: o.height, + items: o.items + }); + + this.combo = BI.createWidget({ + type: "bi.down_list_combo", + element: this, + chooseType: BI.Selection.Single, + adjustLength: 2, + height: o.height, + el: this.trigger, + items: BI.deepClone(o.items) + }); + + this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () { + self.setValue(self.combo.getValue()[0].value); + self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); + }); + + this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () { + self.setValue(self.combo.getValue()[0].childValue); + self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); + }); + }, + + _createValueMap: function () { + var self = this; + this.valueMap = {}; + BI.each(BI.flatten(this.options.items), function (idx, item) { + if (BI.has(item, "el")) { + BI.each(item.children, function (id, it) { + self.valueMap[it.value] = {value: item.el.value, childValue: it.value} + }); + } else { + self.valueMap[item.value] = {value: item.value}; + } + }); + }, + + setValue: function (v) { + v = this.valueMap[v]; + this.combo.setValue([v]); + this.trigger.setValue(v.childValue || v.value); + }, + + getValue: function () { + var v = this.combo.getValue()[0]; + return [v.childValue || v.value]; + }, + + populate: function (items) { + this.options.items = BI.flatten(items); + this.combo.populate(items); + this._createValueMap(); + } +}); +BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);/** + * 选择字段trigger, downlist专用 + * 显示形式为 父亲值(儿子值) + * + * @class BI.DownListSelectTextTrigger + * @extends BI.Trigger + */ +BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-down-list-select-text-trigger", + height: 24, + text: "" + }); + }, + + _init: function () { + BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments); + var o = this.options; + this.trigger = BI.createWidget({ + type: "bi.select_text_trigger", + element: this, + height: o.height, + items: this._formatItemArray(o.items), + text: o.text + }); + }, + + _formatItemArray: function(){ + var sourceArray = BI.flatten(BI.deepClone(this.options.items)); + var targetArray = []; + BI.each(sourceArray, function(idx, item){ + if(BI.has(item, "el")){ + BI.each(item.children, function(id, it){ + it.text = item.el.text + "(" + it.text + ")"; + }); + targetArray = BI.concat(targetArray, item.children); + }else{ + targetArray.push(item); + } + }); + return targetArray; + }, + + setValue: function (vals) { + this.trigger.setValue(vals); + }, + + populate: function (items) { + this.trigger.populate(this._formatItemArray(items)); + } +}); +BI.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** + * 有清楚按钮的文本框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.ClearEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-clear-editor", + height: 30, + errorText: "", + watermark: "", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + BI.ClearEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.ClearEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: this.editor + }, + { + el: this.clear, + width: 25 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ClearEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ClearEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ClearEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ClearEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.ClearEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ClearEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.ClearEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ClearEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ClearEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ClearEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.ClearEditor.EVENT_START = "EVENT_START"; +BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; +BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; +BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.shortcut("bi.clear_editor", BI.ClearEditor);/** + * Created by roy on 15/9/14. + */ +BI.SearchEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-search-editor bi-border", + height: 30, + errorText: "", + watermark: BI.i18nText("BI-Basic_Search"), + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + this.options.height -= 2; + BI.SearchEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.SearchEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: { + type: "bi.center_adapt", + cls: "search-font", + items: [{ + el: { + type: "bi.icon" + } + }] + }, + width: 25 + }, + { + el: self.editor + }, + { + el: this.clear, + width: 25 + } + ] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SearchEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SearchEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SearchEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SearchEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SearchEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SearchEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.SearchEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SearchEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SearchEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SearchEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.SearchEditor.EVENT_START = "EVENT_START"; +BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; +BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; +BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.shortcut("bi.search_editor", BI.SearchEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallSearchEditor + * @extends BI.SearchEditor + */ +BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { + _defaultConfig: function () { + var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-search-editor", + height: 24 + }); + }, + + _init: function () { + BI.SmallSearchEditor.superclass._init.apply(this, arguments); + } +}); +BI.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** + * 带标记的文本框 + * Created by GUY on 2016/1/25. + * @class BI.ShelterEditor + * @extends BI.Widget + */ +BI.ShelterEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-shelter-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30, + textAlign: "left" + }) + }, + + _init: function () { + BI.ShelterEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "shelter-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: o.textAlign, + height: o.height, + hgap: 4 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + arguments[2] = self; + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setTextStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.ShelterEditor.EVENT_START = "EVENT_START"; +BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; +BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; +BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.shelter_editor", BI.ShelterEditor);/** + * Created by User on 2017/7/28. + */ +BI.SignInitialEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + value: "", + text: "", + height: 30 + }) + }, + + _init: function () { + BI.SignInitialEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "sign-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: "left", + height: o.height, + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL) + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.SignInitialEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + var v = this.editor.getValue(); + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.text.setValue(v); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + var o = this.options; + this.editor.setValue(v.value); + o.text = v.text || o.text; + this._checkText(); + }, + + getValue: function () { + return { + value: this.editor.getValue(), + text: this.options.text + } + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + var o = this.options; + this._showHint(); + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.text.setValue(v); + } +}); +BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignInitialEditor.EVENT_START = "EVENT_START"; +BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** + * 带标记的文本框 + * Created by GUY on 2015/8/28. + * @class BI.SignEditor + * @extends BI.Widget + */ +BI.SignEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.SignEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "sign-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: "left", + height: o.height, + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SignEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignEditor.EVENT_START = "EVENT_START"; +BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.sign_editor", BI.SignEditor);/** + * guy + * 记录状态的输入框 + * @class BI.StateEditor + * @extends BI.Single + */ +BI.StateEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-state-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.StateEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "state-editor-infinite-text bi-disabled", + textAlign: "left", + height: o.height, + text: BI.i18nText("BI-Basic_Unrestricted"), + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.setValue(""); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.StateEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.StateEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.StateEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + focus: function () { + if (this.options.disabled === false) { + this._showInput(); + this.editor.focus(); + } + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getValue().match(/[^\s]+/g); + }, + + setState: function (v) { + BI.StateEditor.superclass.setValue.apply(this, arguments); + if (BI.isNumber(v)) { + if (v === BI.Selection.All) { + this.text.setText(BI.i18nText("BI-Select_All")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (v === BI.Selection.Multi) { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.setTitle(""); + this.text.element.addClass("state-editor-infinite-text"); + } + return; + } + if (BI.isString(v)) { + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } + return; + } + if (BI.isArray(v)) { + if (BI.isEmpty(v)) { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } else if (v.length === 1) { + this.text.setText(v[0]); + this.text.setTitle(v[0]); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } + } + } +}); +BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.StateEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.StateEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.StateEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.StateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.StateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.StateEditor.EVENT_START = "EVENT_START"; +BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.StateEditor.EVENT_STOP = "EVENT_STOP"; +BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.StateEditor.EVENT_VALID = "EVENT_VALID"; +BI.StateEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.StateEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.StateEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.state_editor", BI.StateEditor);/** + * 无限制-已选择状态输入框 + * Created by GUY on 2016/5/18. + * @class BI.SimpleStateEditor + * @extends BI.Single + */ +BI.SimpleStateEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-simple-state-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.SimpleStateEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "state-editor-infinite-text bi-disabled", + textAlign: "left", + height: o.height, + text: BI.i18nText("BI-Basic_Unrestricted"), + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.setValue(""); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getValue().match(/[^\s]+/g); + }, + + setState: function (v) { + BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); + if (BI.isNumber(v)) { + if (v === BI.Selection.All) { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (v === BI.Selection.Multi) { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } + return; + } + if (!BI.isArray(v) || v.length === 1) { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (BI.isEmpty(v)) { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Already_Selected")); + this.text.element.removeClass("state-editor-infinite-text"); + } + } +}); +BI.SimpleStateEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SimpleStateEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SimpleStateEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SimpleStateEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SimpleStateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SimpleStateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SimpleStateEditor.EVENT_START = "EVENT_START"; +BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP"; +BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID"; +BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SimpleStateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** + * guy + * @class BI.TextEditor + * @extends BI.Single + */ +BI.TextEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-text-editor bi-border", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: false, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.TextEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isNumber(o.height)) { + this.element.css({height: o.height - 2}); + } + if (BI.isNumber(o.width)) { + this.element.css({width: o.width - 2}); + } + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height - 2, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.TextEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.TextEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.TextEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.TextEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_SPACE); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.TextEditor.EVENT_VALID); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.TextEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_REMOVE); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.TextEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.TextEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.TextEditor.EVENT_STOP); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.TextEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.TextEditor.EVENT_EMPTY); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setValue: function (v) { + this.editor.setValue(v); + }, + + getValue: function () { + return this.editor.getValue(); + } +}); +BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.TextEditor.EVENT_START = "EVENT_START"; +BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.TextEditor.EVENT_STOP = "EVENT_STOP"; +BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.TextEditor.EVENT_VALID = "EVENT_VALID"; +BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +BI.shortcut("bi.text_editor", BI.TextEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.SmallTextEditor = BI.inherit(BI.TextEditor, { + _defaultConfig: function () { + var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-text-editor", + height: 25 + }); + }, + + _init: function () { + BI.SmallTextEditor.superclass._init.apply(this, arguments); + } +}); +BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** + * 有确定取消按钮的弹出层 + * @class BI.BarFloatSection + * @extends BI.FloatSection + * @abstract + */ +BI.BarFloatSection = BI.inherit(BI.FloatSection, { + _defaultConfig: function () { + return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this, arguments), { + btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText("BI-Basic_Cancel")] + }) + }, + + _init: function () { + BI.BarFloatSection.superclass._init.apply(this, arguments); + var self = this; + var flatten = ["_init", "_defaultConfig", "_vessel", "_render", "getName", "listenEnd", "local", "refresh", "load", "change"]; + flatten = BI.makeObject(flatten, true); + BI.each(this.constructor.caller.caller.caller.caller.prototype, function (key) { + if (flatten[key]) { + return; + } + var f = self[key]; + if (BI.isFunction(f)) { + self[key] = BI.bind(function () { + if (this.model._start === true) { + this._F.push({f: f, arg: arguments}); + return; + } + return f.apply(this, arguments); + }, self); + } + }) + }, + + rebuildSouth: function (south) { + var self = this, o = this.options; + this.sure = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[0], + height: 30, + value: 0, + handler: function (v) { + self.end(); + self.close(v); + } + }); + this.cancel = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[1], + height: 30, + value: 1, + level: 'ignore', + handler: function (v) { + self.close(v); + } + }); + BI.createWidget({ + type: 'bi.right_vertical_adapt', + element: south, + hgap: 5, + items: [this.cancel, this.sure] + }); + } +}); + +/** + * 有确定取消按钮的弹出层 + * @class BI.BarPopoverSection + * @extends BI.PopoverSection + * @abstract + */ +BI.BarPopoverSection = BI.inherit(BI.PopoverSection, { + _defaultConfig: function () { + return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this, arguments), { + btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] + }) + }, + + _init: function () { + BI.BarPopoverSection.superclass._init.apply(this, arguments); + }, + + rebuildSouth: function (south) { + var self = this, o = this.options; + this.sure = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[0], + warningTitle: o.warningTitle, + height: 30, + value: 0, + handler: function (v) { + self.end(); + self.close(v); + } + }); + this.cancel = BI.createWidget({ + type: 'bi.button', + text: this.options.btns[1], + height: 30, + value: 1, + level: 'ignore', + handler: function (v) { + self.close(v); + } + }); + BI.createWidget({ + type: 'bi.right_vertical_adapt', + element: south, + hgap: 5, + items: [this.cancel, this.sure] + }); + }, + + setConfirmButtonEnable: function(v){ + this.sure.setEnable(!!v); + } +});/** + * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w + * @class BI.MultiPopupView + * @extends BI.Widget + */ + +BI.MultiPopupView = BI.inherit(BI.PopupView, { + + _defaultConfig: function () { + var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-multi-list-view", + buttons: [BI.i18nText("BI-Basic_Sure")] + }) + }, + + _init: function () { + BI.MultiPopupView.superclass._init.apply(this, arguments); + }, + + _createToolBar: function () { + var o = this.options, self = this; + if (o.buttons.length === 0) { + return; + } + + var text = []; //构造[{text:content},……] + BI.each(o.buttons, function (idx, item) { + text.push({ + text: item, + value: idx + }) + }); + + this.buttongroup = BI.createWidget({ + type: "bi.button_group", + cls: "list-view-toolbar bi-high-light bi-border-top", + height: 30, + items: BI.createItems(text, { + type: "bi.text_button", + once: false, + shadow: true, + isShadowShowingOnSelected: true + }), + layouts: [{ + type: "bi.center", + hgap: 0, + vgap: 0 + }] + }); + + this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { + self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj); + }); + + return this.buttongroup; + } + +}); + +BI.MultiPopupView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; + +BI.shortcut("bi.multi_popup_view", BI.MultiPopupView);/** + * 可以理解为MultiPopupView和Panel两个面板的结合体 + * @class BI.PopupPanel + * @extends BI.MultiPopupView + */ + +BI.PopupPanel = BI.inherit(BI.MultiPopupView, { + + _defaultConfig: function () { + var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-popup-panel", + title: "" + }) + }, + + _init: function () { + BI.PopupPanel.superclass._init.apply(this, arguments); + }, + + _createTool: function () { + var self = this, o = this.options; + var close = BI.createWidget({ + type: "bi.icon_button", + cls: "close-h-font", + width: 25, + height: 25 + }); + close.on(BI.IconButton.EVENT_CHANGE, function () { + self.setVisible(false); + self.fireEvent(BI.PopupPanel.EVENT_CLOSE); + }); + return BI.createWidget({ + type: "bi.htape", + cls: "popup-panel-title bi-background bi-border", + height: 25, + items: [{ + el: { + type: "bi.label", + textAlign: "left", + text: o.title, + height: 25, + lgap: 10 + } + }, { + el: close, + width: 25 + }] + }); + } +}); + +BI.PopupPanel.EVENT_CHANGE = "EVENT_CHANGE"; +BI.PopupPanel.EVENT_CLOSE = "EVENT_CLOSE"; +BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; + +BI.shortcut("bi.popup_panel", BI.PopupPanel);/** + * list面板 + * + * Created by GUY on 2015/10/30. + * @class BI.ListPane + * @extends BI.Pane + */ +BI.ListPane = BI.inherit(BI.Pane, { + + _defaultConfig: function () { + var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-list-pane", + logic: { + dynamic: true + }, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + vgap: 0, + hgap: 0, + items: [], + itemsCreator: BI.emptyFn, + hasNext: BI.emptyFn, + onLoaded: BI.emptyFn, + el: { + type: "bi.button_group" + } + }) + }, + _init: function () { + BI.ListPane.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + behaviors: {}, + items: o.items, + itemsCreator: function (op, calback) { + if (op.times === 1) { + self.empty(); + BI.nextTick(function () { + self.loading() + }); + } + o.itemsCreator(op, function () { + calback.apply(self, arguments); + op.times === 1 && BI.nextTick(function () { + self.loaded(); + }); + }); + }, + hasNext: o.hasNext, + layouts: [{ + type: "bi.vertical" + }] + }); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj); + } + }); + this.check(); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ + scrolly: true, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + vgap: o.vgap, + hgap: o.hgap + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) + })))); + }, + + hasPrev: function () { + return this.button_group.hasPrev && this.button_group.hasPrev(); + }, + + hasNext: function () { + return this.button_group.hasNext && this.button_group.hasNext(); + }, + + prependItems: function (items) { + this.options.items = items.concat(this.options.items); + this.button_group.prependItems.apply(this.button_group, arguments); + this.check(); + }, + + addItems: function (items) { + this.options.items = this.options.items.concat(items); + this.button_group.addItems.apply(this.button_group, arguments); + this.check(); + }, + + removeItemAt: function (indexes) { + indexes = indexes || []; + BI.removeAt(this.options.items, indexes); + this.button_group.removeItemAt.apply(this.button_group, arguments); + this.check(); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法 + this.button_group.attr("itemsCreator").apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("参数不能为空"); + } + self.populate.apply(self, arguments); + }]); + return; + } + BI.ListPane.superclass.populate.apply(this, arguments); + this.button_group.populate.apply(this.button_group, arguments); + }, + + empty: function () { + this.button_group.empty(); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + } +}); +BI.ListPane.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.list_pane", BI.ListPane);/** + * 带有标题栏的pane + * @class BI.Panel + * @extends BI.Widget + */ +BI.Panel = BI.inherit(BI.Widget,{ + _defaultConfig : function(){ + return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{ + baseCls: "bi-panel bi-border", + title:"", + titleButtons:[], + el:{}, + logic:{ + dynamic: false + } + }); + }, + + _init:function(){ + BI.Panel.superclass._init.apply(this,arguments); + var o = this.options; + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() + ,this.options.el) + })))); + }, + + _createTitle:function(){ + var self = this, o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + cls: "panel-title-text", + text: o.title, + height: 30 + }); + + this.button_group = BI.createWidget({ + type:"bi.button_group", + items: o.titleButtons, + layouts: [{ + type: "bi.center_adapt", + lgap:10 + }] + }); + + this.button_group.on(BI.Controller.EVENT_CHANGE, function(){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function(value, obj){ + self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj); + }); + + return { + el: { + type: "bi.left_right_vertical_adapt", + cls: "panel-title bi-tips bi-border-bottom bi-background", + height: 30, + items: { + left: [this.text], + right: [this.button_group] + }, + lhgap: 10, + rhgap: 10 + }, + height: 30 + }; + }, + + setTitle: function(title){ + this.text.setValue(title); + } +}); +BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE"; + +BI.shortcut("bi.panel",BI.Panel);/** + * 选择列表 + * + * Created by GUY on 2015/11/1. + * @class BI.SelectList + * @extends BI.Widget + */ +BI.SelectList = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-select-list", + direction: BI.Direction.Top,//toolbar的位置 + logic: { + dynamic: true + }, + items: [], + itemsCreator: BI.emptyFn, + hasNext: BI.emptyFn, + onLoaded: BI.emptyFn, + toolbar: { + type: "bi.multi_select_bar" + }, + el: { + type: "bi.list_pane" + } + }) + }, + _init: function () { + BI.SelectList.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + //全选 + this.toolbar = BI.createWidget(o.toolbar); + this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + var isAllSelected = this.isSelected(); + if (type === BI.Events.CLICK) { + self.setAllSelected(isAllSelected); + self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.list = BI.createWidget(o.el, { + type: "bi.list_pane", + items: o.items, + itemsCreator: function (op, callback) { + op.times === 1 && self.toolbar.setVisible(false); + o.itemsCreator(op, function (items) { + callback.apply(self, arguments); + if (op.times === 1) { + self.toolbar.setVisible(items && items.length > 0); + self.toolbar.setEnable(items && items.length > 0); + } + self._checkAllSelected(); + }); + }, + onLoaded: o.onLoaded, + hasNext: o.hasNext + }); + + this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + self._checkAllSelected(); + self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ + scrolly: true + }, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list) + })))); + + if (o.items.length <= 0) { + this.toolbar.setVisible(false); + this.toolbar.setEnable(false); + } + }, + + _checkAllSelected: function () { + var selectLength = this.list.getValue().length; + var notSelectLength = this.getAllLeaves().length - selectLength; + var hasNext = this.list.hasNext(); + var isAlreadyAllSelected = this.toolbar.isSelected(); + var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext)); + isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected); + this.toolbar.setHalfSelected(isHalf); + !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected)); + }, + + setAllSelected: function (v) { + BI.each(this.getAllButtons(), function (i, btn) { + (btn.setSelected || btn.setAllSelected).apply(btn, [v]); + }); + this.toolbar.setSelected(v); + this.toolbar.setHalfSelected(false); + }, + + setToolBarVisible: function (b) { + this.toolbar.setVisible(b); + }, + + isAllSelected: function () { + return this.toolbar.isSelected(); + }, + + hasPrev: function () { + return this.list.hasPrev(); + }, + + hasNext: function () { + return this.list.hasNext(); + }, + + prependItems: function (items) { + this.list.prependItems.apply(this.list, arguments); + }, + + addItems: function (items) { + this.list.addItems.apply(this.list, arguments); + }, + + setValue: function (data) { + var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL; + this.setAllSelected(selectAll); + this.list[selectAll ? "setNotSelectedValue" : "setValue"](data.value); + this._checkAllSelected(); + }, + + getValue: function () { + if (this.isAllSelected() === false) { + return { + type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + value: this.list.getValue(), + assist: this.list.getNotSelectedValue() + }; + } else { + return { + type: BI.ButtonGroup.CHOOSE_TYPE_ALL, + value: this.list.getNotSelectedValue(), + assist: this.list.getValue() + }; + } + }, + + empty: function () { + this.list.empty(); + }, + + populate: function (items) { + this.toolbar.setVisible(!BI.isEmptyArray(items)); + this.toolbar.setEnable(!BI.isEmptyArray(items)); + this.list.populate.apply(this.list, arguments); + this._checkAllSelected(); + }, + + _setEnable: function (enable) { + BI.SelectList.superclass._setEnable.apply(this, arguments); + this.toolbar.setEnable(enable); + }, + + resetHeight: function (h) { + var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); + this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : + this.list.element.css({"max-height": h - toolHeight + "px"}) + }, + + setNotSelectedValue: function () { + this.list.setNotSelectedValue.apply(this.list, arguments); + this._checkAllSelected(); + }, + + getNotSelectedValue: function () { + return this.list.getNotSelectedValue(); + }, + + getAllButtons: function () { + return this.list.getAllButtons(); + }, + + getAllLeaves: function () { + return this.list.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.list.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.list.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.list.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.list.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.list.getNodeByValue(value); + } +}); +BI.SelectList.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.select_list", BI.SelectList);/** + * Created by roy on 15/11/6. + */ +BI.LazyLoader = BI.inherit(BI.Widget, { + _const: { + PAGE: 100 + }, + _defaultConfig: function () { + return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-lazy-loader", + el: {} + }) + }, + + _init: function () { + var self = this, o = this.options; + BI.LazyLoader.superclass._init.apply(this, arguments); + var all = o.items.length; + this.loader = BI.createWidget({ + type: "bi.loader", + element: this, + //下面是button_group的属性 + el: o.el, + + itemsCreator: function (options, populate) { + populate(self._getNextItems(options)); + }, + hasNext: function (option) { + return option.count < all; + } + }); + + this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) { + self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj) + }) + }, + _getNextItems: function (options) { + var self = this, o = this.options; + var lastNum = o.items.length - this._const.PAGE * (options.times - 1); + var lastItems = BI.last(o.items, lastNum); + var nextItems = BI.first(lastItems, this._const.PAGE); + return nextItems; + }, + + populate: function (items) { + this.loader.populate(items); + }, + + addItems: function (items) { + this.loader.addItems(items); + }, + + empty: function () { + this.loader.empty(); + }, + + setNotSelectedValue: function () { + this.loader.setNotSelectedValue.apply(this.loader, arguments); + }, + + getNotSelectedValue: function () { + return this.loader.getNotSelectedValue(); + }, + + setValue: function () { + this.loader.setValue.apply(this.loader, arguments); + }, + + getValue: function () { + return this.loader.getValue.apply(this.loader, arguments); + }, + + getAllButtons: function () { + return this.loader.getAllButtons(); + }, + + getAllLeaves: function () { + return this.loader.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.loader.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.loader.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.loader.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.loader.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.loader.getNodeByValue(value); + } +}); +BI.LazyLoader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.lazy_loader", BI.LazyLoader);/** + * 恶心的加载控件, 为解决排序问题引入的控件 + * + * Created by GUY on 2015/11/12. + * @class BI.ListLoader + * @extends BI.Widget + */ +BI.ListLoader = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-list-loader", + + isDefaultInit: true,//是否默认初始化数据 + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + next: {}, + hasNext: BI.emptyFn + }) + }, + + _nextLoad: function () { + var self = this, o = this.options; + this.next.setLoading(); + o.itemsCreator.apply(this, [{times: ++this.times}, function () { + self.next.setLoaded(); + self.addItems.apply(self, arguments); + }]); + }, + + _init: function () { + BI.ListLoader.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (o.itemsCreator === false) { + o.next = false; + } + + this.button_group = BI.createWidget(o.el, { + type: "bi.button_group", + element: this, + chooseType: 0, + items: o.items, + behaviors: {}, + layouts: [{ + type: "bi.vertical" + }] + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj); + } + }); + + if (o.next !== false) { + this.next = BI.createWidget(BI.extend({ + type: "bi.loading_bar" + }, o.next)); + this.next.on(BI.Controller.EVENT_CHANGE, function (type) { + if (type === BI.Events.CLICK) { + self._nextLoad(); + } + }) + } + + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.next] + }); + + o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { + this.populate(); + }, this)); + if (BI.isNotEmptyArray(o.items)) { + this.populate(o.items); + } + }, + + hasNext: function () { + var o = this.options; + if (BI.isNumber(o.count)) { + return this.count < o.count; + } + return !!o.hasNext.apply(this, [{ + times: this.times, + count: this.count + }]) + }, + + addItems: function (items) { + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.options.items = this.options.items.concat(items); + this.next.setLoaded(); + } else { + this.next.setEnd(); + } + } + this.button_group.addItems.apply(this.button_group, arguments); + this.next.element.appendTo(this.element); + }, + + populate: function (items) { + var self = this, o = this.options; + if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { + o.itemsCreator.apply(this, [{times: 1}, function () { + if (arguments.length === 0) { + throw new Error("参数不能为空"); + } + self.populate.apply(self, arguments); + o.onLoaded(); + }]); + return; + } + this.options.items = items; + this.times = 1; + this.count = 0; + this.count += items.length; + if (BI.isObject(this.next)) { + if (this.hasNext()) { + this.next.setLoaded(); + } else { + this.next.invisible(); + } + } + BI.DOM.hang([this.next]); + this.button_group.populate.apply(this.button_group, arguments); + this.next.element.appendTo(this.element); + }, + + empty: function () { + BI.DOM.hang([this.next]); + this.button_group.empty(); + this.next.element.appendTo(this.element); + BI.each([this.next], function (i, ob) { + ob && ob.setVisible(false); + }); + }, + + setNotSelectedValue: function () { + this.button_group.setNotSelectedValue.apply(this.button_group, arguments); + }, + + getNotSelectedValue: function () { + return this.button_group.getNotSelectedValue(); + }, + + setValue: function () { + this.button_group.setValue.apply(this.button_group, arguments); + }, + + getValue: function () { + return this.button_group.getValue.apply(this.button_group, arguments); + }, + + getAllButtons: function () { + return this.button_group.getAllButtons(); + }, + + getAllLeaves: function () { + return this.button_group.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.button_group.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.button_group.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.button_group.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.button_group.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.button_group.getNodeByValue(value); + } +}); +BI.ListLoader.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.list_loader", BI.ListLoader);/** + * Created by GUY on 2016/4/29. + * + * @class BI.SortList + * @extends BI.Widget + */ +BI.SortList = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-sort-list", + + isDefaultInit: true,//是否默认初始化数据 + + //下面是button_group的属性 + el: { + type: "bi.button_group" + }, + + items: [], + itemsCreator: BI.emptyFn, + onLoaded: BI.emptyFn, + + //下面是分页信息 + count: false, + next: {}, + hasNext: BI.emptyFn + + //containment: this.element, + //connectWith: ".bi-sort-list", + }) + }, + + _init: function () { + BI.SortList.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.loader = BI.createWidget({ + type: "bi.list_loader", + element: this, + isDefaultInit: o.isDefaultInit, + el: o.el, + items: this._formatItems(o.items), + itemsCreator: function (op, callback) { + o.itemsCreator(op, function (items) { + callback(self._formatItems(items)); + }); + }, + onLoaded: o.onLoaded, + count: o.count, + next: o.next, + hasNext: o.hasNext + }); + this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj); + } + }); + + this.loader.element.sortable({ + containment: o.containment || this.element, + connectWith: o.connectWith || ".bi-sort-list", + items: ".sort-item", + cursor: o.cursor || "drag", + tolerance: o.tolerance || "intersect", + placeholder: { + element: function ($currentItem) { + var holder = BI.createWidget({ + type: "bi.layout", + cls: "bi-sortable-holder", + height: $currentItem.outerHeight() + }); + holder.element.css({ + "margin-left": $currentItem.css("margin-left"), + "margin-right": $currentItem.css("margin-right"), + "margin-top": $currentItem.css("margin-top"), + "margin-bottom": $currentItem.css("margin-bottom"), + "margin": $currentItem.css("margin") + }); + return holder.element; + }, + update: function () { + + } + }, + start: function (event, ui) { + + }, + stop: function (event, ui) { + self.fireEvent(BI.SortList.EVENT_CHANGE); + }, + over: function (event, ui) { + + } + }); + }, + + _formatItems: function (items) { + BI.each(items, function (i, item) { + item = BI.stripEL(item); + item.cls = item.cls ? item.cls + " sort-item" : "sort-item"; + item.attributes = { + sorted: item.value + }; + }); + return items; + }, + + hasNext: function () { + return this.loader.hasNext(); + }, + + addItems: function (items) { + this.loader.addItems(items); + }, + + populate: function (items) { + if (items) { + arguments[0] = this._formatItems(items); + } + this.loader.populate.apply(this.loader, arguments); + }, + + empty: function () { + this.loader.empty(); + }, + + setNotSelectedValue: function () { + this.loader.setNotSelectedValue.apply(this.loader, arguments); + }, + + getNotSelectedValue: function () { + return this.loader.getNotSelectedValue(); + }, + + setValue: function () { + this.loader.setValue.apply(this.loader, arguments); + }, + + getValue: function () { + return this.loader.getValue(); + }, + + getAllButtons: function () { + return this.loader.getAllButtons(); + }, + + getAllLeaves: function () { + return this.loader.getAllLeaves(); + }, + + getSelectedButtons: function () { + return this.loader.getSelectedButtons(); + }, + + getNotSelectedButtons: function () { + return this.loader.getNotSelectedButtons(); + }, + + getIndexByValue: function (value) { + return this.loader.getIndexByValue(value); + }, + + getNodeById: function (id) { + return this.loader.getNodeById(id); + }, + + getNodeByValue: function (value) { + return this.loader.getNodeByValue(value); + }, + + getSortedValues: function () { + return this.loader.element.sortable("toArray", {attribute: "sorted"}); + } +}); +BI.SortList.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.sort_list", BI.SortList);/** + * 有总页数和总行数的分页控件 + * Created by Young's on 2016/10/13. + */ +BI.AllCountPager = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-all-count-pager", + height: 30, + pages: 1, //必选项 + curr: 1, //初始化当前页, pages为数字时可用, + count: 1 //总行数 + }) + }, + _init: function () { + BI.AllCountPager.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.small_text_editor", + cls: "pager-editor", + validationChecker: function (v) { + return (self.rowCount.getValue() === 0 && v === "0") || BI.isPositiveInteger(v); + }, + hgap: 4, + vgap: 0, + value: o.curr, + errorText: BI.i18nText("BI-Please_Input_Positive_Integer"), + width: 35, + height: 20 + }); + + this.pager = BI.createWidget({ + type: "bi.pager", + width: 36, + layouts: [{ + type: "bi.horizontal", + hgap: 1, + vgap: 1 + }], + + dynamicShow: false, + pages: o.pages, + curr: o.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Previous_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + cls: "all-pager-prev column-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Next_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + cls: "all-pager-next column-next-page-h-font" + }, + + hasPrev: o.hasPrev, + hasNext: o.hasNext, + firstPage: o.firstPage, + lastPage: o.lastPage + }); + + this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () { + self.pager.setValue(BI.parseInt(self.editor.getValue())); + self.fireEvent(BI.AllCountPager.EVENT_CHANGE); + }); + this.pager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.AllCountPager.EVENT_CHANGE); + }); + this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.editor.setValue(self.pager.getCurrentPage()); + }); + + this.allPages = BI.createWidget({ + type: "bi.label", + width: 30, + title: o.pages, + text: "/" + o.pages + }); + + this.rowCount = BI.createWidget({ + type: "bi.label", + height: o.height, + hgap: 5, + text: o.count, + title: o.count + }); + + var count = BI.createWidget({ + type: "bi.left", + height: o.height, + scrollable: false, + items: [{ + type: "bi.label", + height: o.height, + text: BI.i18nText("BI-Basic_Total"), + width: 15 + }, this.rowCount, { + type: "bi.label", + height: o.height, + text: BI.i18nText("BI-Tiao_Data"), + width: 50, + textAlign: "left" + }] + }); + BI.createWidget({ + type: "bi.center_adapt", + element: this, + columnSize: ["", 35, 40, 36], + items: [count, this.editor, this.allPages, this.pager] + }) + }, + + alwaysShowPager: true, + + setAllPages: function (v) { + this.allPages.setText("/" + v); + this.allPages.setTitle(v); + this.pager.setAllPages(v); + this.editor.setEnable(v >= 1); + }, + + setValue: function (v) { + this.pager.setValue(v); + }, + + setVPage: function (v) { + this.pager.setValue(v); + }, + + setCount: function (count) { + this.rowCount.setText(count); + this.rowCount.setTitle(count); + }, + + getCurrentPage: function () { + return this.pager.getCurrentPage(); + }, + + hasPrev: function () { + return this.pager.hasPrev(); + }, + + hasNext: function () { + return this.pager.hasNext(); + }, + + setPagerVisible: function (b) { + this.editor.setVisible(b); + this.allPages.setVisible(b); + this.pager.setVisible(b); + }, + + populate: function () { + this.pager.populate(); + } +}); +BI.AllCountPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.all_count_pager", BI.AllCountPager);/** + * 显示页码的分页控件 + * + * Created by GUY on 2016/6/30. + * @class BI.DirectionPager + * @extends BI.Widget + */ +BI.DirectionPager = BI.inherit(BI.Widget, { + + _defaultConfig: function () { + return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-direction-pager", + height: 30, + horizontal: { + pages: false, //总页数 + curr: 1, //初始化当前页, pages为数字时可用 + + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn, + firstPage: 1, + lastPage: BI.emptyFn + }, + vertical: { + pages: false, //总页数 + curr: 1, //初始化当前页, pages为数字时可用 + + hasPrev: BI.emptyFn, + hasNext: BI.emptyFn, + firstPage: 1, + lastPage: BI.emptyFn + } + }) + }, + _init: function () { + BI.DirectionPager.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var v = o.vertical, h = o.horizontal; + this._createVPager(); + this._createHPager(); + this.layout = BI.createWidget({ + type: "bi.absolute", + scrollable: false, + element: this, + items: [{ + el: this.vpager, + top: 5, + right: 74 + }, { + el: this.vlabel, + top: 5, + right: 111 + }, { + el: this.hpager, + top: 5, + right: -9 + }, { + el: this.hlabel, + top: 5, + right: 28 + }] + }); + }, + + _createVPager: function () { + var self = this, o = this.options; + var v = o.vertical; + this.vlabel = BI.createWidget({ + type: "bi.label", + width: 24, + height: 20, + value: v.curr, + title: v.curr + }); + this.vpager = BI.createWidget({ + type: "bi.pager", + width: 76, + layouts: [{ + type: "bi.horizontal", + scrollx: false, + rgap: 24, + vgap: 1 + }], + + dynamicShow: false, + pages: v.pages, + curr: v.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Up_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-prev column-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Down_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-next column-next-page-h-font" + }, + + hasPrev: v.hasPrev, + hasNext: v.hasNext, + firstPage: v.firstPage, + lastPage: v.lastPage + }); + + this.vpager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.DirectionPager.EVENT_CHANGE); + }); + this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.vlabel.setValue(this.getCurrentPage()); + self.vlabel.setTitle(this.getCurrentPage()); + }); + }, + + _createHPager: function () { + var self = this, o = this.options; + var h = o.horizontal; + this.hlabel = BI.createWidget({ + type: "bi.label", + width: 24, + height: 20, + value: h.curr, + title: h.curr + }); + this.hpager = BI.createWidget({ + type: "bi.pager", + width: 76, + layouts: [{ + type: "bi.horizontal", + scrollx: false, + rgap: 24, + vgap: 1 + }], + + dynamicShow: false, + pages: h.pages, + curr: h.curr, + groups: 0, + + first: false, + last: false, + prev: { + type: "bi.icon_button", + value: "prev", + title: BI.i18nText("BI-Left_Page"), + warningTitle: BI.i18nText("BI-Current_Is_First_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-prev row-pre-page-h-font" + }, + next: { + type: "bi.icon_button", + value: "next", + title: BI.i18nText("BI-Right_Page"), + warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), + height: 20, + iconWidth: 16, + iconHeight: 16, + cls: "direction-pager-next row-next-page-h-font" + }, + + hasPrev: h.hasPrev, + hasNext: h.hasNext, + firstPage: h.firstPage, + lastPage: h.lastPage + }); + + this.hpager.on(BI.Pager.EVENT_CHANGE, function () { + self.fireEvent(BI.DirectionPager.EVENT_CHANGE); + }); + this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { + self.hlabel.setValue(this.getCurrentPage()); + self.hlabel.setTitle(this.getCurrentPage()); + }); + }, + + getVPage: function () { + return this.vpager.getCurrentPage(); + }, + + getHPage: function () { + return this.hpager.getCurrentPage(); + }, + + setVPage: function (v) { + this.vpager.setValue(v); + this.vlabel.setValue(v); + this.vlabel.setTitle(v); + }, + + setHPage: function (v) { + this.hpager.setValue(v); + this.hlabel.setValue(v); + this.hlabel.setTitle(v); + }, + + hasVNext: function () { + return this.vpager.hasNext(); + }, + + hasHNext: function () { + return this.hpager.hasNext(); + }, + + hasVPrev: function () { + return this.vpager.hasPrev(); + }, + + hasHPrev: function () { + return this.hpager.hasPrev(); + }, + + setHPagerVisible: function (b) { + this.hpager.setVisible(b); + this.hlabel.setVisible(b); + }, + + setVPagerVisible: function (b) { + this.vpager.setVisible(b); + this.vlabel.setVisible(b); + }, + + populate: function () { + this.vpager.populate(); + this.hpager.populate(); + var vShow = false, hShow = false; + if (!this.hasHNext() && !this.hasHPrev()) { + this.setHPagerVisible(false); + } else { + this.setHPagerVisible(true); + hShow = true; + } + if (!this.hasVNext() && !this.hasVPrev()) { + this.setVPagerVisible(false); + } else { + this.setVPagerVisible(true); + vShow = true; + } + this.setVisible(hShow || vShow); + var num = [74, 111, -9, 28]; + var items = this.layout.attr("items"); + + if (vShow === true && hShow === true) { + items[0].right = num[0]; + items[1].right = num[1]; + items[2].right = num[2]; + items[3].right = num[3]; + } else if (vShow === true) { + items[0].right = num[2]; + items[1].right = num[3]; + } else if (hShow === true) { + items[2].right = num[2]; + items[3].right = num[3]; + } + this.layout.attr("items", items); + this.layout.resize(); + }, + + clear: function () { + this.vpager.attr("curr", 1); + this.hpager.attr("curr", 1); + } +}); +BI.DirectionPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.direction_pager", BI.DirectionPager);/** + * 分页控件 + * + * Created by GUY on 2015/8/31. + * @class BI.DetailPager + * @extends BI.Widget + */ +BI.DetailPager = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-detail-pager", + behaviors: {}, + layouts: [{ + type: "bi.horizontal", + hgap: 10, + vgap: 0 + }], + + dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 + //dynamicShow为false时以下两个有用 + dynamicShowFirstLast: false,//是否动态显示首页、尾页 + dynamicShowPrevNext: false,//是否动态显示上一页、下一页 + pages: false, //总页数 + curr: function () { + return 1; + }, //初始化当前页 + groups: 0, //连续显示分页数 + jump: BI.emptyFn, //分页的回调函数 + + first: false, //是否显示首页 + last: false, //是否显示尾页 + prev: "上一页", + next: "下一页", + + firstPage: 1, + lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 + return 1; + }, + hasPrev: BI.emptyFn, //pages不可用时有效 + hasNext: BI.emptyFn //pages不可用时有效 + }) + }, + _init: function () { + BI.DetailPager.superclass._init.apply(this, arguments); + var self = this; + this.currPage = BI.result(this.options, "curr"); + //翻页太灵敏 + this._lock = false; + this._debouce = BI.debounce(function () { + self._lock = false; + }, 300); + this._populate(); + }, + + _populate: function () { + var self = this, o = this.options, view = [], dict = {}; + this.empty(); + var pages = BI.result(o, "pages"); + var curr = BI.result(this, "currPage"); + var groups = BI.result(o, "groups"); + var first = BI.result(o, "first"); + var last = BI.result(o, "last"); + var prev = BI.result(o, "prev"); + var next = BI.result(o, "next"); + + if (pages === false) { + groups = 0; + first = false; + last = false; + } else { + groups > pages && (groups = pages); + } + + //计算当前组 + dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); + + //当前页非首页,则输出上一页 + if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { + if (BI.isKey(prev)) { + view.push({ + text: prev, + value: "prev", + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }) + } else { + view.push(BI.extend({ + disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) + }, prev)); + } + } + + //当前组非首组,则输出首页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { + view.push({ + text: first, + value: "first", + disabled: !(dict.index > 1 && groups !== 0) + }); + if (dict.index > 1 && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + } + + //输出当前页组 + dict.poor = Math.floor((groups - 1) / 2); + dict.start = dict.index > 1 ? curr - dict.poor : 1; + dict.end = dict.index > 1 ? (function () { + var max = curr + (groups - dict.poor - 1); + return max > pages ? pages : max; + }()) : groups; + if (dict.end - dict.start < groups - 1) { //最后一组状态 + dict.start = dict.end - groups + 1; + } + var s = dict.start, e = dict.end; + if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { + s++; + e--; + } + for (; s <= e; s++) { + if (s === curr) { + view.push({ + text: s, + value: s, + selected: true + }) + } else { + view.push({ + text: s, + value: s + }) + } + } + + //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 + if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { + if (pages > groups && dict.end < pages && groups !== 0) { + view.push({ + type: "bi.label", + cls: "page-ellipsis", + text: "\u2026" + }); + } + view.push({ + text: last, + value: "last", + disabled: !(pages > groups && dict.end < pages && groups !== 0) + }) + } + + //当前页不为尾页时,输出下一页 + dict.flow = !prev && groups === 0; + if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { + view.push((function () { + if (BI.isKey(next)) { + if (pages === false) { + return {text: next, value: "next", disabled: o.hasNext(curr) === false} + } + return (dict.flow && curr === pages) + ? + {text: next, value: "next", disabled: true} + : + {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; + } else { + return BI.extend({ + disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) + }, next); + } + }())); + } + + this.button_group = BI.createWidget({ + type: "bi.button_group", + element: this, + items: BI.createItems(view, { + cls: "page-item bi-border bi-list-item-active", + height: 23, + hgap: 10 + }), + behaviors: o.behaviors, + layouts: o.layouts + }); + this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (self._lock === true) { + return; + } + self._lock = true; + self._debouce(); + if (type === BI.Events.CLICK) { + var v = self.button_group.getValue()[0]; + switch (v) { + case "first": + self.currPage = 1; + break; + case "last": + self.currPage = pages; + break; + case "prev": + self.currPage--; + break; + case "next": + self.currPage++; + break; + default: + self.currPage = v; + break; + } + o.jump.apply(self, [{ + pages: pages, + curr: self.currPage + }]); + self._populate(); + self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE); + }, + + getCurrentPage: function () { + return this.currPage; + }, + + setAllPages: function (pages) { + this.options.pages = pages; + }, + + hasPrev: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasPrev(v) : v > 1; + }, + + hasNext: function (v) { + v || (v = 1); + var o = this.options; + var pages = this.options.pages; + return pages === false ? o.hasNext(v) : v < pages; + }, + + setValue: function (v) { + var o = this.options; + v = v | 0; + v = v < 1 ? 1 : v; + if (o.pages === false) { + var lastPage = BI.result(o, "lastPage"), firstPage = 1; + this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); + } else { + v = v > o.pages ? o.pages : v; + this.currPage = v; + } + this._populate(); + }, + + getValue: function () { + var val = this.button_group.getValue()[0]; + switch (val) { + case "prev": + return -1; + case "next": + return 1; + case "first": + return BI.MIN; + case "last": + return BI.MAX; + default : + return val; + } + }, + + attr: function (key, value) { + BI.DetailPager.superclass.attr.apply(this, arguments); + if (key === "curr") { + this.currPage = BI.result(this.options, "curr"); + } + }, + + populate: function () { + this._populate(); + } +}); +BI.DetailPager.EVENT_CHANGE = "EVENT_CHANGE"; +BI.DetailPager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; +BI.shortcut("bi.detail_pager", BI.DetailPager);/** + * 分段控件使用的button + * + * Created by GUY on 2015/9/7. + * @class BI.SegmentButton + * @extends BI.BasicButton + */ +BI.SegmentButton = BI.inherit(BI.BasicButton, { + + _defaultConfig: function () { + var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active', + shadow: true, + readonly: true, + hgap: 5 + }) + }, + + _init: function () { + BI.SegmentButton.superclass._init.apply(this, arguments); + var opts = this.options, self = this; + //if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) { + // this.element.css({lineHeight : (opts.height - 2) + 'px'}); + //} + this.text = BI.createWidget({ + type: "bi.label", + element: this, + height: opts.height - 2, + whiteSpace: opts.whiteSpace, + text: opts.text, + value: opts.value, + hgap: opts.hgap + }) + }, + + setSelected: function () { + BI.SegmentButton.superclass.setSelected.apply(this, arguments); + }, + + setText: function (text) { + BI.SegmentButton.superclass.setText.apply(this, arguments); + this.text.setText(text); + }, + + destroy: function () { + BI.SegmentButton.superclass.destroy.apply(this, arguments); + } +}); +BI.shortcut('bi.segment_button', BI.SegmentButton);/** + * 单选按钮组 + * + * Created by GUY on 2015/9/7. + * @class BI.Segment + * @extends BI.Widget + */ +BI.Segment = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-segment", + items: [], + height: 30 + }); + }, + _init: function () { + BI.Segment.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.buttonGroup = BI.createWidget({ + element: this, + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "bi.segment_button", + height: o.height - 2, + whiteSpace: o.whiteSpace + }), + layout: [ + { + type: "bi.center" + } + ] + }) + this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) + }); + this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { + self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj) + }) + }, + + setValue: function (v) { + this.buttonGroup.setValue(v); + }, + + setEnabledValue: function (v) { + this.buttonGroup.setEnabledValue(v); + }, + + getValue: function () { + return this.buttonGroup.getValue(); + } +}); +BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut('bi.segment', BI.Segment);/** + * 自适应宽度的表格 + * + * Created by GUY on 2016/2/3. + * @class BI.AdaptiveTable + * @extends BI.Widget + */ +BI.AdaptiveTable = BI.inherit(BI.Widget, { + + _const: { + perColumnSize: 100 + }, + + _defaultConfig: function () { + return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-adaptive-table", + el: { + type: "bi.resizable_table" + }, + isNeedResize: true, + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 + + isNeedMerge: false,//是否需要合并单元格 + mergeCols: [], //合并的单元格列号 + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + header: [], + items: [], //二维数组 + + //交叉表头 + crossHeader: [], + crossItems: [] + }); + }, + + _init: function () { + BI.AdaptiveTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: false, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: data.columnSize, + + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: data.regionColumnSize, + + header: o.header, + items: o.items, + //交叉表头 + crossHeader: o.crossHeader, + crossItems: o.crossItems + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + self._populate(); + self.table.populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.columnSize = this.getColumnSize(); + self._populate(); + self.table.populate(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _getFreezeColLength: function () { + return this.options.isNeedFreeze === true ? this.options.freezeCols.length : 0; + }, + + _digest: function () { + var o = this.options; + var columnSize = o.columnSize.slice(); + var regionColumnSize = o.regionColumnSize.slice(); + var freezeCols = o.freezeCols.slice(); + var regionSize = o.regionColumnSize[0]; + var freezeColLength = this._getFreezeColLength(); + if (!regionSize || regionSize > o.width - 10 || regionSize < 10) { + regionSize = (freezeColLength > o.columnSize.length / 2 ? 2 / 3 : 1 / 3) * o.width; + } + if (freezeColLength === 0) { + regionSize = 0; + } + if (freezeCols.length >= columnSize.length) { + freezeCols = []; + } + if (!BI.isNumber(columnSize[0])) { + columnSize = o.minColumnSize.slice(); + } + var summaryFreezeColumnSize = 0, summaryColumnSize = 0; + BI.each(columnSize, function (i, size) { + if (i < freezeColLength) { + summaryFreezeColumnSize += size; + } + summaryColumnSize += size; + }); + if (freezeColLength > 0) { + columnSize[freezeColLength - 1] = BI.clamp(regionSize - (summaryFreezeColumnSize - columnSize[freezeColLength - 1]), + o.minColumnSize[freezeColLength - 1] || 10, o.maxColumnSize[freezeColLength - 1] || Number.MAX_VALUE); + } + if (columnSize.length > 0) { + columnSize[columnSize.length - 1] = BI.clamp(o.width - BI.GridTableScrollbar.SIZE - regionSize - (summaryColumnSize - summaryFreezeColumnSize - columnSize[columnSize.length - 1]), + o.minColumnSize[columnSize.length - 1] || 10, o.maxColumnSize[columnSize.length - 1] || Number.MAX_VALUE); + } + regionColumnSize[0] = regionSize; + + return { + freezeCols: freezeCols, + columnSize: columnSize, + regionColumnSize: regionColumnSize + } + }, + + _populate: function () { + var o = this.options; + var data = this._digest(); + o.regionColumnSize = data.regionColumnSize; + o.columnSize = data.columnSize; + this.table.setColumnSize(data.columnSize); + this.table.setRegionColumnSize(data.regionColumnSize); + this.table.attr("freezeCols", data.freezeCols); + }, + + setWidth: function (width) { + BI.AdaptiveTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.AdaptiveTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (regionColumnSize) { + this.options.regionColumnSize = regionColumnSize; + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var v = BI.AdaptiveTable.superclass.attr.apply(this, arguments); + if (key === "freezeCols") { + return v; + } + return this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items) { + var self = this, o = this.options; + this._populate(); + this.table.populate.apply(this.table, arguments); + }, + + destroy: function () { + this.table.destroy(); + BI.AdaptiveTable.superclass.destroy.apply(this, arguments); + } +}); +BI.shortcut('bi.adaptive_table', BI.AdaptiveTable);/** + * + * 层级树状结构的表格 + * + * Created by GUY on 2016/8/12. + * @class BI.DynamicSummaryLayerTreeTable + * @extends BI.Widget + */ +BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-dynamic-summary-layer-tree-table", + + el: { + type: "bi.resizable_table" + }, + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + //行表头 + rowHeaderCreator: null, + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + footer: false, + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _createHeader: function (vDeep) { + var self = this, o = this.options; + var header = o.header || [], crossHeader = o.crossHeader || []; + var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); + var result = []; + BI.each(items, function (row, node) { + var c = [crossHeader[row]]; + result.push(c.concat(node || [])); + }); + if (header && header.length > 0) { + var newHeader = this._formatColumns(header); + var deep = this._getHDeep(); + if (deep <= 0) { + newHeader.unshift(o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }); + } else { + newHeader[0] = o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }; + } + result.push(newHeader); + } + return result; + }, + + _formatItems: function (nodes, header, deep) { + var self = this, o = this.options; + var result = []; + + function track(node, layer) { + node.type || (node.type = "bi.layer_tree_table_cell"); + node.layer = layer; + var next = [node]; + next = next.concat(node.values || []); + if (next.length > 0) { + result.push(next); + } + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child, layer + 1); + }); + } + } + + BI.each(nodes, function (i, node) { + BI.each(node.children, function (j, c) { + track(c, 0); + }); + if (BI.isArray(node.values)) { + var next = [{ + type: "bi.table_style_cell", + text: BI.i18nText("BI-Summary_Values"), + styleGetter: function () { + return o.summaryCellStyleGetter(true); + } + }].concat(node.values); + result.push(next) + } + }); + return BI.DynamicSummaryTreeTable.formatSummaryItems(result, header, o.crossItems, 1); + }, + + _formatColumns: function (columns, deep) { + if (BI.isNotEmptyArray(columns)) { + deep = deep || this._getHDeep(); + return columns.slice(Math.max(0, deep - 1)); + } + return columns; + }, + + _formatFreezeCols: function () { + if (this.options.freezeCols.length > 0) { + return [0]; + } + return []; + }, + + _formatColumnSize: function (columnSize, deep) { + if (columnSize.length <= 0) { + return []; + } + var result = [0]; + deep = deep || this._getHDeep(); + BI.each(columnSize, function (i, size) { + if (i < deep) { + result[0] += size; + return; + } + result.push(size); + }); + return result; + }, + + _recomputeColumnSize: function () { + var o = this.options; + o.regionColumnSize = this.table.getRegionColumnSize(); + var columnSize = this.table.getColumnSize().slice(); + if (o.freezeCols.length > 1) { + for (var i = 0; i < o.freezeCols.length - 1; i++) { + columnSize.splice(1, 0, 0); + } + } + o.columnSize = columnSize; + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = this._createHeader(vDeep); + var data = this._formatItems(o.items, header, deep); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); + return { + header: data.header, + items: data.items, + columnSize: this._formatColumnSize(columnSize, deep), + minColumnSize: this._formatColumns(minColumnSize, deep), + maxColumnSize: this._formatColumns(maxColumnSize, deep), + freezeCols: this._formatFreezeCols() + } + }, + + _init: function () { + BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: [], + mergeRule: o.mergeRule, + columnSize: data.columnSize, + minColumnSize: data.minColumnSize, + maxColumnSize: data.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + regionColumnSize: o.regionColumnSize, + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + self._recomputeColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + self._recomputeColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + setWidth: function (width) { + BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var self = this; + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self.attr(k, v); + }); + return; + } + BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "columnSize": + case "minColumnSize": + case "maxColumnSize": + case "freezeCols": + case "mergeCols": + return; + } + this.table.attr.apply(this.table, [key, value]); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.attr("freezeCols", data.freezeCols); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.shortcut("bi.dynamic_summary_layer_tree_table", BI.DynamicSummaryLayerTreeTable);/** + * + * 树状结构的表格 + * + * Created by GUY on 2015/8/12. + * @class BI.DynamicSummaryTreeTable + * @extends BI.Widget + */ +BI.DynamicSummaryTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-dynamic-summary-tree-table", + el: { + type: "bi.resizable_table" + }, + + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + footerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + footer: false, + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _init: function () { + BI.DynamicSummaryTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: o.columnSize, + minColumnSize: o.minColumnSize, + maxColumnSize: o.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: o.regionColumnSize, + + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + var columnSize = this.getColumnSize(); + var length = o.columnSize.length - columnSize.length; + o.columnSize = columnSize.slice(); + o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + var columnSize = this.getColumnSize(); + var length = o.columnSize.length - columnSize.length; + o.columnSize = columnSize.slice(); + o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); + var items = BI.DynamicSummaryTreeTable.formatHorizontalItems(o.items, deep, false, o.summaryCellStyleGetter); + var data = BI.DynamicSummaryTreeTable.formatSummaryItems(items, header, o.crossItems, deep); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); + return { + header: data.header, + items: data.items, + columnSize: columnSize, + minColumnSize: minColumnSize, + maxColumnSize: maxColumnSize + }; + }, + + setWidth: function (width) { + BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + return this.options.columnSize; + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key) { + BI.DynamicSummaryTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "minColumnSize": + case "maxColumnSize": + return; + } + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.DynamicSummaryTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.extend(BI.DynamicSummaryTreeTable, { + + formatHorizontalItems: function (nodes, deep, isCross, styleGetter) { + var result = []; + + function track(store, node) { + var next; + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + var next; + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + track(next, child); + }); + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + if ((store == -1 || node.children.length > 1) && BI.isNotEmptyArray(node.values)) { + var summary = { + text: BI.i18nText("BI-Summary_Values"), + type: "bi.table_style_cell", + styleGetter: function () { + return styleGetter(store === -1) + } + }; + for (var i = next.length; i < deep; i++) { + next.push(summary); + } + if (!isCross) { + next = next.concat(node.values); + } + if (next.length > 0) { + if (!isCross) { + result.push(next); + } else { + for (var k = 0, l = node.values.length; k < l; k++) { + result.push(next); + } + } + } + } + return; + } + if (store != -1) { + next = store.slice(); + for (var i = next.length; i < deep; i++) { + next.push(node); + } + } else { + next = []; + } + if (!isCross && BI.isArray(node.values)) { + next = next.concat(node.values); + } + if (isCross && BI.isArray(node.values)) { + for (var i = 0, len = node.values.length; i < len - 1; i++) { + if (next.length > 0) { + result.push(next); + } + } + } + if (next.length > 0) { + result.push(next); + } + } + + BI.each(nodes, function (i, node) { + track(-1, node); + }); + //填充空位 + BI.each(result, function (i, line) { + var last = BI.last(line); + for (var j = line.length; j < deep; j++) { + line.push(last); + } + }); + return result; + }, + + formatSummaryItems: function (items, header, crossItems, deep) { + //求纵向需要去除的列 + var cols = []; + var leaf = 0; + + function track(node) { + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child); + }); + if (BI.isNotEmptyArray(node.values)) { + if (node.children.length === 1) { + for (var i = 0; i < node.values.length; i++) { + cols.push(leaf + i + deep); + } + } + leaf += node.values.length; + } + return; + } + if (node.values && node.values.length > 1) { + leaf += node.values.length; + } else { + leaf++; + } + } + + BI.each(crossItems, function (i, node) { + track(node); + }); + + if (cols.length > 0) { + var nHeader = [], nItems = []; + BI.each(header, function (i, node) { + var nNode = node.slice(); + BI.removeAt(nNode, cols); + nHeader.push(nNode); + }); + BI.each(items, function (i, node) { + var nNode = node.slice(); + BI.removeAt(nNode, cols); + nItems.push(nNode);; + }); + header = nHeader; + items = nItems; + } + return {items: items, header: header, deletedCols: cols}; + } +}); + +BI.shortcut("bi.dynamic_summary_tree_table", BI.DynamicSummaryTreeTable);/** + * Created by GUY on 2016/5/7. + * @class BI.LayerTreeTableCell + * @extends BI.Single + */ +BI.LayerTreeTableCell = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-layer-tree-table-cell", + layer: 0, + text: "" + }) + }, + + _init: function () { + BI.LayerTreeTableCell.superclass._init.apply(this, arguments); + var o = this.options; + BI.createWidget({ + type: "bi.label", + element: this.element, + textAlign: "left", + whiteSpace: "nowrap", + height: o.height, + text: o.text, + value: o.value, + lgap: 5 + 30 * o.layer, + rgap: 5 + }) + } +}); + +BI.shortcut("bi.layer_tree_table_cell", BI.LayerTreeTableCell);/** + * + * 层级树状结构的表格 + * + * Created by GUY on 2016/5/7. + * @class BI.LayerTreeTable + * @extends BI.Widget + */ +BI.LayerTreeTable = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-layer-tree-table", + el: { + type: "bi.resizable_table" + }, + + isNeedResize: false,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + isNeedFreeze: false,//是否需要冻结单元格 + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + rowHeaderCreator: null, + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _createHeader: function (vDeep) { + var self = this, o = this.options; + var header = o.header || [], crossHeader = o.crossHeader || []; + var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); + var result = []; + BI.each(items, function (row, node) { + var c = [crossHeader[row]]; + result.push(c.concat(node || [])); + }); + if (header && header.length > 0) { + var newHeader = this._formatColumns(header); + var deep = this._getHDeep(); + if (deep <= 0) { + newHeader.unshift(o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }); + } else { + newHeader[0] = o.rowHeaderCreator || { + type: "bi.table_style_cell", + text: BI.i18nText("BI-Row_Header"), + styleGetter: o.headerCellStyleGetter + }; + } + result.push(newHeader); + } + return result; + }, + + _formatItems: function (nodes) { + var self = this, o = this.options; + var result = []; + + function track(node, layer) { + node.type || (node.type = "bi.layer_tree_table_cell"); + node.layer = layer; + var next = [node]; + next = next.concat(node.values || []); + if (next.length > 0) { + result.push(next); + } + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + track(child, layer + 1); + }); + } + } + + BI.each(nodes, function (i, node) { + BI.each(node.children, function (j, c) { + track(c, 0); + }); + if (BI.isArray(node.values)) { + var next = [{ + type: "bi.table_style_cell", text: BI.i18nText("BI-Summary_Values"), styleGetter: function () { + return o.summaryCellStyleGetter(true); + } + }].concat(node.values); + result.push(next) + } + }); + return result; + }, + + _formatColumns: function (columns, deep) { + if (BI.isNotEmptyArray(columns)) { + deep = deep || this._getHDeep(); + return columns.slice(Math.max(0, deep - 1)); + } + return columns; + }, + + _formatFreezeCols: function () { + if (this.options.freezeCols.length > 0) { + return [0]; + } + return []; + }, + + _formatColumnSize: function (columnSize, deep) { + if (columnSize.length <= 0) { + return []; + } + var result = [0]; + deep = deep || this._getHDeep(); + BI.each(columnSize, function (i, size) { + if (i < deep) { + result[0] += size; + return; + } + result.push(size); + }); + return result; + }, + + _digest: function () { + var o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + return { + header: this._createHeader(vDeep), + items: this._formatItems(o.items), + columnSize: this._formatColumnSize(o.columnSize, deep), + minColumnSize: this._formatColumns(o.minColumnSize, deep), + maxColumnSize: this._formatColumns(o.maxColumnSize, deep), + freezeCols: this._formatFreezeCols() + } + }, + + _init: function () { + BI.LayerTreeTable.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + isNeedFreeze: o.isNeedFreeze, + freezeCols: data.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: [], + mergeRule: o.mergeRule, + columnSize: data.columnSize, + minColumnSize: data.minColumnSize, + maxColumnSize: data.maxColumnSize, + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + regionColumnSize: o.regionColumnSize, + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + setWidth: function (width) { + BI.LayerTreeTable.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.LayerTreeTable.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + }, + + getColumnSize: function () { + var columnSize = this.table.getColumnSize(); + var deep = this._getHDeep(); + var pre = []; + if (deep > 0) { + pre = BI.makeArray(deep, columnSize[0] / deep); + } + return pre.concat(columnSize.slice(1)); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function (key, value) { + var self = this; + if (BI.isObject(key)) { + BI.each(key, function (k, v) { + self.attr(k, v); + }); + return; + } + BI.LayerTreeTable.superclass.attr.apply(this, arguments); + switch (key) { + case "columnSize": + case "minColumnSize": + case "maxColumnSize": + case "freezeCols": + case "mergeCols": + return; + } + this.table.attr.apply(this.table, [key, value]); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + o.items = items || []; + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.setColumnSize(data.columnSize); + this.table.attr("freezeCols", data.freezeCols); + this.table.attr("minColumnSize", data.minColumnSize); + this.table.attr("maxColumnSize", data.maxColumnSize); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.LayerTreeTable.superclass.destroy.apply(this, arguments); + } +}); + +BI.shortcut("bi.layer_tree_table", BI.LayerTreeTable);/** + * + * Created by GUY on 2016/5/26. + * @class BI.TableStyleCell + * @extends BI.Single + */ +BI.TableStyleCell = BI.inherit(BI.Single, { + + _defaultConfig: function () { + return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-style-cell", + styleGetter: BI.emptyFn + }); + }, + + _init: function () { + BI.TableStyleCell.superclass._init.apply(this, arguments); + var o = this.options; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + textAlign: "left", + forceCenter: true, + hgap: 5, + text: o.text + }); + this._digestStyle(); + }, + + _digestStyle: function () { + var o = this.options; + var style = o.styleGetter(); + if (style) { + this.text.element.css(style); + } + }, + + setText: function (text) { + this.text.setText(text); + }, + + populate: function () { + this._digestStyle(); + } +}); +BI.shortcut('bi.table_style_cell', BI.TableStyleCell);/** + * + * 树状结构的表格 + * + * Created by GUY on 2015/9/22. + * @class BI.TableTree + * @extends BI.Widget + */ +BI.TableTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-table-tree", + el: { + type: "bi.resizable_table" + }, + isNeedResize: true,//是否需要调整列宽 + isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 + + freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 + + isNeedMerge: true,//是否需要合并单元格 + mergeCols: [], + mergeRule: BI.emptyFn, + + columnSize: [], + minColumnSize: [], + maxColumnSize: [], + headerRowSize: 25, + rowSize: 25, + + regionColumnSize: [], + + headerCellStyleGetter: BI.emptyFn, + summaryCellStyleGetter: BI.emptyFn, + sequenceCellStyleGetter: BI.emptyFn, + + header: [], + items: [], + + //交叉表头 + crossHeader: [], + crossItems: [] + }) + }, + + _getVDeep: function () { + return this.options.crossHeader.length;//纵向深度 + }, + + _getHDeep: function () { + var o = this.options; + return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); + }, + + _init: function () { + BI.TableTree.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var data = this._digest(); + this.table = BI.createWidget(o.el, { + type: "bi.resizable_table", + element: this, + width: o.width, + height: o.height, + isNeedResize: o.isNeedResize, + isResizeAdapt: o.isResizeAdapt, + + isNeedFreeze: o.isNeedFreeze, + freezeCols: o.freezeCols, + isNeedMerge: o.isNeedMerge, + mergeCols: o.mergeCols, + mergeRule: o.mergeRule, + + columnSize: o.columnSize, + minColumnSize: o.minColumnSize, + maxColumnSize: o.maxColumnSize, + + headerRowSize: o.headerRowSize, + rowSize: o.rowSize, + + regionColumnSize: o.regionColumnSize, + + header: data.header, + items: data.items + }); + this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { + self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); + }); + this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { + o.regionColumnSize = this.getRegionColumnSize(); + o.columnSize = this.getColumnSize(); + self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); + }); + }, + + _digest: function () { + var self = this, o = this.options; + var deep = this._getHDeep(); + var vDeep = this._getVDeep(); + var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); + var items = BI.TableTree.formatItems(o.items, deep, false, o.summaryCellStyleGetter); + return { + header: header, + items: items + } + }, + + setWidth: function (width) { + BI.TableTree.superclass.setWidth.apply(this, arguments); + this.table.setWidth(width); + }, + + setHeight: function (height) { + BI.TableTree.superclass.setHeight.apply(this, arguments); + this.table.setHeight(height); + }, + + setColumnSize: function (columnSize) { + this.options.columnSize = columnSize; + this.table.setColumnSize(columnSize); + }, + + getColumnSize: function () { + return this.table.getColumnSize(); + }, + + setRegionColumnSize: function (columnSize) { + this.options.regionColumnSize = columnSize; + this.table.setRegionColumnSize(columnSize); + }, + + getRegionColumnSize: function () { + return this.table.getRegionColumnSize(); + }, + + setVerticalScroll: function (scrollTop) { + this.table.setVerticalScroll(scrollTop); + }, + + setLeftHorizontalScroll: function (scrollLeft) { + this.table.setLeftHorizontalScroll(scrollLeft); + }, + + setRightHorizontalScroll: function (scrollLeft) { + this.table.setRightHorizontalScroll(scrollLeft); + }, + + getVerticalScroll: function () { + return this.table.getVerticalScroll(); + }, + + getLeftHorizontalScroll: function () { + return this.table.getLeftHorizontalScroll(); + }, + + getRightHorizontalScroll: function () { + return this.table.getRightHorizontalScroll(); + }, + + attr: function () { + BI.TableTree.superclass.attr.apply(this, arguments); + this.table.attr.apply(this.table, arguments); + }, + + restore: function () { + this.table.restore(); + }, + + populate: function (items, header, crossItems, crossHeader) { + var o = this.options; + if (items) { + o.items = items || []; + } + if (header) { + o.header = header; + } + if (crossItems) { + o.crossItems = crossItems; + } + if (crossHeader) { + o.crossHeader = crossHeader; + } + var data = this._digest(); + this.table.populate(data.items, data.header); + }, + + destroy: function () { + this.table.destroy(); + BI.TableTree.superclass.destroy.apply(this, arguments); + } +}); + +BI.extend(BI.TableTree, { + formatHeader: function (header, crossHeader, crossItems, hDeep, vDeep, styleGetter) { + var items = BI.TableTree.formatCrossItems(crossItems, vDeep, styleGetter); + var result = []; + for (var i = 0; i < vDeep; i++) { + var c = []; + for (var j = 0; j < hDeep; j++) { + c.push(crossHeader[i]); + } + result.push(c.concat(items[i] || [])); + } + if (header && header.length > 0) { + result.push(header); + } + return result; + }, + + formatItems: function (nodes, deep, isCross, styleGetter) { + var self = this; + var result = []; + + function track(store, node) { + var next; + if (BI.isArray(node.children)) { + BI.each(node.children, function (index, child) { + var next; + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + track(next, child); + }); + if (store != -1) { + next = store.slice(); + next.push(node); + } else { + next = []; + } + if (/**(store == -1 || node.children.length > 1) &&**/ BI.isNotEmptyArray(node.values)) { + var summary = { + text: BI.i18nText("BI-Summary_Values"), + type: "bi.table_style_cell", + styleGetter: function () { + return styleGetter(store === -1) + } + }; + for (var i = next.length; i < deep; i++) { + next.push(summary); + } + if (!isCross) { + next = next.concat(node.values); + } + if (next.length > 0) { + if (!isCross) { + result.push(next); + } else { + for (var k = 0, l = node.values.length; k < l; k++) { + result.push(next); + } + } + } + } + + return; + } + if (store != -1) { + next = store.slice(); + for (var i = next.length; i < deep; i++) { + next.push(node); + } + } else { + next = []; + } + if (!isCross && BI.isArray(node.values)) { + next = next.concat(node.values); + } + if (isCross && BI.isArray(node.values)) { + for (var i = 0, len = node.values.length; i < len - 1; i++) { + if (next.length > 0) { + result.push(next); + } + } + } + if (next.length > 0) { + result.push(next); + } + } + + BI.each(nodes, function (i, node) { + track(-1, node); + }); + //填充空位 + BI.each(result, function (i, line) { + var last = BI.last(line); + for (var j = line.length; j < deep; j++) { + line.push(last); + } + }); + return result; + }, + + formatCrossItems: function (nodes, deep, styleGetter) { + var items = BI.TableTree.formatItems(nodes, deep, true, styleGetter); + return BI.unzip(items); + }, + + maxDeep: function (nodes) { + function track(deep, node) { + var d = deep; + if (BI.isNotEmptyArray(node.children)) { + BI.each(node.children, function (index, child) { + d = Math.max(d, track(deep + 1, child)); + }); + } + return d; + } + + var deep = 1; + if (BI.isObject(nodes)) { + BI.each(nodes, function (i, node) { + deep = Math.max(deep, track(1, node)); + }); + } + return deep; + } +}); + +BI.shortcut("bi.tree_table", BI.TableTree);/** + * guy + * 复选导航条 + * Created by GUY on 2015/8/25. + * @class BI.MultiSelectBar + * @extends BI.BasicButton + */ +BI.MultiSelectBar = BI.inherit(BI.BasicButton, { + _defaultConfig: function () { + return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-multi-select-bar", + height: 25, + text: BI.i18nText('BI-Select_All'), + isAllCheckedBySelectedValue: BI.emptyFn, + //手动控制选中 + disableSelected: true, + isHalfCheckedBySelectedValue: function (selectedValues) { + return selectedValues.length > 0; + } + }) + }, + _init: function () { + BI.MultiSelectBar.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.checkbox = BI.createWidget({ + type: "bi.checkbox", + stopPropagation: true, + handler: function () { + self.setSelected(self.isSelected()); + } + }); + this.half = BI.createWidget({ + type: "bi.half_icon_button", + stopPropagation: true, + handler: function () { + self.setSelected(true); + } + }); + this.checkbox.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); + }); + this.half.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); + }); + this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); + }); + this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); + }); + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + whiteSpace: "nowrap", + textHeight: o.height, + height: o.height, + hgap: o.hgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py }); - pos.el = this.triangle; BI.createWidget({ - type: "bi.absolute", + type: "bi.htape", element: this, - items: [pos] - }) + items: [{ + width: 36, + el: { + type: "bi.center_adapt", + items: [this.checkbox, this.half] + } + }, { + el: this.text + }] + }); + this.half.invisible(); }, - _createLeftTriangle: function () { - this._createTriangle("left"); + //自己手动控制选中 + beforeClick: function () { + var isHalf = this.isHalfSelected(), isSelected = this.isSelected(); + if (isHalf === true) { + this.setSelected(true); + } else { + this.setSelected(!isSelected); + } }, - _createRightTriangle: function () { - this._createTriangle("right"); + setSelected: function (v) { + this.checkbox.setSelected(v); + this.setHalfSelected(false); }, - _createTopTriangle: function () { - this._createTriangle("top"); + setHalfSelected: function (b) { + this._half = !!b; + if (b === true) { + this.half.visible(); + this.checkbox.invisible(); + } else { + this.half.invisible(); + this.checkbox.visible(); + } }, - _createBottomTriangle: function () { - this._createTriangle("bottom"); + isHalfSelected: function () { + return !!this._half; }, - _showTriangle: function () { - var pos = this.combo.getPopupPosition(); - switch (pos.dir) { - case "left,top": - case "left,bottom": - this._createLeftTriangle(); - this.combo.getView().showLine("right"); - break; - case "right,top": - case "right,bottom": - this._createRightTriangle(); - this.combo.getView().showLine("left"); - break; - case "top,left": - case "top,right": - this._createTopTriangle(); - this.combo.getView().showLine("bottom"); - break; - case "bottom,left": - case "bottom,right": - this._createBottomTriangle(); - this.combo.getView().showLine("top"); - break; - } + isSelected: function () { + return this.checkbox.isSelected(); }, - _hideTriangle: function () { - this.triangle && this.triangle.destroy(); - this.triangle = null; - this.combo.getView() && this.combo.getView().hideLine(); + setValue: function (selectedValues) { + BI.MultiSelectBar.superclass.setValue.apply(this, arguments); + var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments); + this.setSelected(isAllChecked); + !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments)); + } +}); +BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE"; +BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);/** + * 倒立的Branch + * @class BI.HandStandBranchExpander + * @extend BI.Widget + * create by young + */ +BI.HandStandBranchExpander = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-handstand-branch-expander", + direction: BI.Direction.Top, + logic: { + dynamic: true + }, + el: {type: "bi.label"}, + popup: {} + }) }, - hideView: function () { - this._hideTriangle(); - this.combo && this.combo.hideView(); + _init: function () { + BI.HandStandBranchExpander.superclass._init.apply(this, arguments); + var o = this.options; + this._initExpander(); + this._initBranchView(); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, { + type: "bi.center_adapt", + items: [this.expander] + }, this.branchView) + })))); }, - showView: function () { - this.combo && this.combo.showView(); + _initExpander: function () { + var self = this, o = this.options; + this.expander = BI.createWidget(o.el); + this.expander.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); }, - isViewVisible: function () { - return this.combo.isViewVisible(); - } -}); - -BI.BubbleCombo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; -BI.BubbleCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.BubbleCombo.EVENT_EXPAND = "EVENT_EXPAND"; -BI.BubbleCombo.EVENT_COLLAPSE = "EVENT_COLLAPSE"; -BI.BubbleCombo.EVENT_AFTER_INIT = "EVENT_AFTER_INIT"; + _initBranchView: function () { + var self = this, o = this.options; + this.branchView = BI.createWidget(o.popup, {}); + this.branchView.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + populate: function (items) { + this.branchView.populate.apply(this.branchView, arguments); + }, -BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.BubbleCombo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW"; -BI.BubbleCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; -BI.shortcut("bi.bubble_combo", BI.BubbleCombo);/** - * Created by GUY on 2017/2/8. - * - * @class BI.BubblePopupView - * @extends BI.PopupView - */ -BI.BubblePopupView = BI.inherit(BI.PopupView, { - _defaultConfig: function () { - var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(config, { - baseCls: config.baseCls + " bi-bubble-popup-view" - }) - }, - _init: function () { - BI.BubblePopupView.superclass._init.apply(this, arguments); - }, - - showLine: function (direction) { - var pos = {}, op = {}; - switch (direction) { - case "left": - pos = { - top: 0, - bottom: 0, - left: -1 - }; - op = {width: 3}; - break; - case "right": - pos = { - top: 0, - bottom: 0, - right: -1 - }; - op = {width: 3}; - break; - case "top": - pos = { - left: 0, - right: 0, - top: -1 - }; - op = {height: 3}; - break; - case "bottom": - pos = { - left: 0, - right: 0, - bottom: -1 - }; - op = {height: 3}; - break; - default: - break; - } - this.line = BI.createWidget(op, { - type: "bi.layout", - cls: "bubble-popup-line bi-high-light-background" - }); - pos.el = this.line; - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [pos] - }) - }, - - hideLine: function () { - this.line && this.line.destroy(); - } -}); - -BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); - -/** - * Created by GUY on 2017/2/8. - * - * @class BI.BubblePopupBarView - * @extends BI.BubblePopupView - */ -BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { - _defaultConfig: function () { - return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-bubble-bar-popup-view", - buttons: [{value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}, {value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}] - }) - }, - _init: function () { - BI.BubblePopupBarView.superclass._init.apply(this, arguments); - }, - _createToolBar: function () { - var o = this.options, self = this; - - var items = []; - BI.each(o.buttons.reverse(), function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)){ - items.push(buttonOpt); - }else{ - items.push(BI.extend({ - type: 'bi.button', - height: 30, - handler: function (v) { - self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); - } - }, buttonOpt)) - } - }); - return BI.createWidget({ - type: 'bi.right_vertical_adapt', - height: 40, - hgap: 10, - bgap: 10, - items: items - }); - } -}); -BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; -BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/** - * Created by Young's on 2016/4/28. - */ -BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-check-editor-combo", - width: 100, - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "" - }) - }, - - _init: function () { - BI.EditorIconCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.editor_trigger", - items: o.items, - height: o.height, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () { - self.popup.setValue(this.getValue()); - self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.editorIconCheckCombo.hideView(); - self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editorIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.editorIconCheckCombo.setValue(v); - }, - - getValue: function () { - return this.trigger.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.editorIconCheckCombo.populate(items); - } -}); -BI.EditorIconCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.editor_icon_check_combo", BI.EditorIconCheckCombo);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaCombo - * @extend BI.Widget - */ -BI.FormulaCombo = BI.inherit(BI.Widget, { - - _constant: { - POPUP_HEIGHT: 450, - POPUP_WIDTH: 600, - POPUP_V_GAP: 10, - POPUP_H_GAP: 10, - ADJUST_LENGTH: 2, - HEIGHT_MAX: 10000, - MAX_HEIGHT: 500, - MAX_WIDTH: 600, - COMBO_TRIGGER_WIDTH: 300 - }, - - _defaultConfig: function () { - return BI.extend(BI.FormulaCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-combo", - height: 30, - items: [] - }) - }, - - _init: function () { - BI.FormulaCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.formula_ids = []; - this.input = BI.createWidget({ - type: "bi.formula_combo_trigger", - height: o.height, - items: o.items - }); - this.formulaPopup = BI.createWidget({ - type: "bi.formula_combo_popup", - fieldItems: o.items - }); - - this.formulaInputCombo = BI.createWidget({ - type: "bi.combo", - element: this, - isNeedAdjustHeight: true, - isNeedAdjustWidth: false, - adjustLength: this._constant.ADJUST_LENGTH, - el: this.input, - popup: { - el: { - type: "bi.absolute", - height: this._constant.HEIGHT_MAX, - width: this._constant.POPUP_WIDTH, - items: [{ - el: this.formulaPopup, - top: this._constant.POPUP_V_GAP, - left: this._constant.POPUP_H_GAP, - right: this._constant.POPUP_V_GAP, - bottom: 0 - }] - }, - stopPropagation: false, - maxHeight: this._constant.MAX_HEIGHT, - width: this._constant.MAX_WIDTH - } - }); - this.formulaInputCombo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { - self.formulaPopup.setValue(self.input.getValue()); - }); - this.formulaPopup.on(BI.FormulaComboPopup.EVENT_CHANGE, function () { - self.setValue(self.formulaPopup.getValue()); - self.formulaInputCombo.hideView(); - self.fireEvent(BI.FormulaCombo.EVENT_CHANGE); - }); - this.formulaPopup.on(BI.FormulaComboPopup.EVENT_VALUE_CANCEL, function () { - self.formulaInputCombo.hideView(); - }); - }, - - setValue: function (v) { - if (this.formulaInputCombo.isViewVisible()) { - this.formulaInputCombo.hideView(); - } - this.input.setValue(v); - this.input.setText(BI.Func.getFormulaStringFromFormulaValue(v)); - this.formulaPopup.setValue(this.input.getValue()); - }, - - getFormulaTargetIds: function() { - return this.formulaPopup.getFormulaTargetIds(); - }, - - getValue: function () { - return this.input.getValue(); - } -}); -BI.FormulaCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.formula_combo", BI.FormulaCombo);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaComboPopup - * @extend BI.Widget - */ -BI.FormulaComboPopup = BI.inherit(BI.Widget, { - - _constant: { - BUTTON_HEIGHT: 30, - SOUTH_HEIGHT: 60, - SOUTH_H_GAP: 10 - }, - - _defaultConfig: function () { - return BI.extend(BI.FormulaComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-pane-popup" - }) - }, - - _init: function () { - BI.FormulaComboPopup.superclass._init.apply(this, arguments); - this.populate(); - }, - - populate: function () { - var self = this, fieldItems = this.options.fieldItems; - this.formula = BI.createWidget({ - type: "bi.formula_insert" - }); - this.formula.populate(fieldItems); - var confirmButton = BI.createWidget({ - type: "bi.button", - level: "common", - height: this._constant.BUTTON_HEIGHT, - text: BI.i18nText("BI-Basic_OK") - }); - var cancelButton = BI.createWidget({ - type: "bi.button", - level: "ignore", - height: this._constant.BUTTON_HEIGHT, - text: BI.i18nText("BI-Basic_Cancel") - }); - - this.formula.on(BI.FormulaInsert.EVENT_CHANGE, function () { - confirmButton.setEnable(self.formula.checkValidation()); - }); - confirmButton.on(BI.Button.EVENT_CHANGE, function () { - self.fireEvent(BI.FormulaComboPopup.EVENT_CHANGE); - }); - cancelButton.on(BI.Button.EVENT_CHANGE, function () { - self.setValue(self.oldValue); - self.fireEvent(BI.FormulaComboPopup.EVENT_VALUE_CANCEL); - }); - - BI.createWidget({ - type: "bi.vtape", - element: this, - items: [{ - el: this.formula, - height: "fill" - }, { - el: { - type: "bi.right_vertical_adapt", - height: this._constant.SOUTH_HEIGHT, - items: [cancelButton, confirmButton], - hgap: this._constant.SOUTH_H_GAP - }, - height: this._constant.SOUTH_HEIGHT - }] - }) - }, - - getFormulaTargetIds: function(){ - return this.formula.getUsedFields(); - }, - - getValue: function () { - return this.formula.getValue(); - }, - - setValue: function (v) { - this.oldValue = v; - this.formula.setValue(v); - } -}); -BI.FormulaComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.FormulaComboPopup.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; -BI.shortcut("bi.formula_combo_popup", BI.FormulaComboPopup);/** - * Created by GUY on 2016/4/25. - * - * @class BI.FormulaComboTrigger - * @extend BI.Widget - */ -BI.FormulaComboTrigger = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.FormulaComboTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-formula-combo-trigger", - height: 30, - items: [] - }) - }, - - _init: function () { - BI.FormulaComboTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.label = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - textHeight: this.options.height, - lgap: 10 - }); - }, - - _getTextFromFormulaValue: function (formulaValue) { - var self = this; - var formulaString = ""; - var regx = /\$[\{][^\}]*[\}]|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)/g; - var result = formulaValue.match(regx); - BI.each(result, function (i, item) { - var fieldRegx = /\$[\{][^\}]*[\}]/; - var str = item.match(fieldRegx); - if (BI.isNotEmptyArray(str)) { - var id = str[0].substring(2, item.length - 1); - var item = BI.find(BI.flatten(self.options.items), function (i, item) { - return id === item.value; - }); - formulaString = formulaString + item.text; - } else { - formulaString = formulaString + item; - } - }); - return formulaString; - }, - - getValue: function () { - return this.options.value; - }, - - setValue: function (v) { - this.options.value = v; - this.label.setText(this._getTextFromFormulaValue(v)); - } -}); -BI.shortcut("bi.formula_combo_trigger", BI.FormulaComboTrigger);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconCombo - * @extend BI.Widget - */ -BI.IconCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-icon-combo", - width: 24, - height: 24, - iconClass: "", - el: {}, - popup: {}, - minWidth: 100, - maxWidth: 'auto', - maxHeight: 300, - direction: "bottom", - adjustLength: 3,//调整的距离 - adjustXOffset: 0, - adjustYOffset: 0, - offsetStyle: "left", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }) - }, - - _init: function () { - BI.IconCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.icon_combo_trigger", - iconClass: o.iconClass, - title: o.title, - items: o.items, - width: o.width, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.popup = BI.createWidget(o.popup, { - type: "bi.icon_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.iconCombo.hideView(); - self.fireEvent(BI.IconCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.iconCombo = BI.createWidget({ - type: "bi.combo", - element: this, - direction: o.direction, - adjustLength: o.adjustLength, - adjustXOffset: o.adjustXOffset, - adjustYOffset: o.adjustYOffset, - offsetStyle: o.offsetStyle, - el: this.trigger, - popup: { - el: this.popup, - maxWidth: o.maxWidth, - maxHeight: o.maxHeight, - minWidth: o.minWidth - } - }); - }, - - showView: function () { - this.iconCombo.showView(); - }, - - hideView: function () { - this.iconCombo.hideView(); - }, - - setValue: function (v) { - this.iconCombo.setValue(v); - }, - - getValue: function () { - return this.iconCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.iconCombo.populate(items); - } -}); -BI.IconCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo", BI.IconCombo);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconComboPopup - * @extend BI.Pane - */ -BI.IconComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi.icon-combo-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.IconComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.single_select_icon_text_item", - height: 30 - }), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - populate: function (items) { - BI.IconComboPopup.superclass.populate.apply(this, arguments); - items = BI.createItems(items, { - type: "bi.single_select_icon_text_item", - height: 30 - }); - this.popup.populate(items); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.IconComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo_popup", BI.IconComboPopup);/** - * Created by GUY on 2016/2/2. - * - * @class BI.IconComboTrigger - * @extend BI.Widget - */ -BI.IconComboTrigger = BI.inherit(BI.Trigger, { - _defaultConfig: function () { - return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-combo-trigger", - el: {}, - items: [], - iconClass: "", - width: 25, - height: 25, - isShowDown: true - }); - }, - - _init: function () { - BI.IconComboTrigger.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.button = BI.createWidget(o.el, { - type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconClass, - disableSelected: true, - width: o.width, - height: o.height, - iconWidth: o.iconWidth, - iconHeight: o.iconHeight - }); - this.down = BI.createWidget({ - type: "bi.icon_button", - disableSelected: true, - cls: "icon-combo-down-icon trigger-triangle-font", - width: 12, - height: 8 - }); - this.down.setVisible(o.isShowDown); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.button, - left: 0, - right: 0, - top: 0, - bottom: 0 - }, { - el: this.down, - right: 0, - bottom: 0 - }] - }); - if (BI.isKey(o.value)) { - this.setValue(o.value); - } - }, - - populate: function (items) { - var o = this.options; - this.options.items = items || []; - this.button.setIcon(o.iconClass); - this.button.setSelected(false); - this.down.setSelected(false); - }, - - setValue: function (v) { - BI.IconComboTrigger.superclass.setValue.apply(this, arguments); - var o = this.options; - var iconClass = ""; - v = BI.isArray(v) ? v[0] : v; - if (BI.any(this.options.items, function (i, item) { - if (v === item.value) { - iconClass = item.iconClass; - return true; - } - })) { - this.button.setIcon(iconClass); - this.button.setSelected(true); - this.down.setSelected(true); - } else { - this.button.setIcon(o.iconClass); - this.button.setSelected(false); - this.down.setSelected(false); - } - } -}); -BI.IconComboTrigger.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_combo_trigger", BI.IconComboTrigger);/** - * 单选combo - * - * @class BI.StaticCombo - * @extend BI.Widget - */ -BI.StaticCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-static-combo", - height: 30, - text: "", - el: {}, - items: [], - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }) - }, - - _init: function () { - BI.StaticCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.text_icon_item", - cls: "bi-select-text-trigger bi-border pull-down-font", - text: o.text, - readonly: true, - textLgap: 5, - height: o.height - 2 - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - textAlign: o.textAlign, - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.combo.hideView(); - self.fireEvent(BI.StaticCombo.EVENT_CHANGE, arguments); - }); - this.combo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup - } - }); - }, - - populate: function (items) { - this.combo.populate(items); - }, - - setValue: function (v) { - this.combo.setValue(v); - }, - - getValue: function () { - return this.combo.getValue(); - } -}); -BI.StaticCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.static_combo", BI.StaticCombo);/** - * @class BI.TextValueCheckCombo - * @extend BI.Widget - * combo : text + icon, popup : check + text - */ -BI.TextValueCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-text-value-check-combo", - width: 100, - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "" - }) - }, - - _init: function () { - BI.TextValueCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.textIconCheckCombo.hideView(); - self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.textIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setTitle: function (title) { - this.trigger.setTitle(title); - }, - - setValue: function (v) { - this.textIconCheckCombo.setValue(v); - }, - - setWarningTitle: function (title) { - this.trigger.setWarningTitle(title); - }, - - getValue: function () { - return this.textIconCheckCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.textIconCheckCombo.populate(items); - } -}); -BI.TextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_check_combo", BI.TextValueCheckCombo);/** - * @class BI.SmallTextValueCheckCombo - * @extend BI.Widget - * combo : text + icon, popup : check + text - */ -BI.SmallTextValueCheckCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { - width: 100, - height: 24, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "" - }) - }, - - _init: function () { - BI.SmallTextValueCheckCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.small_select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_check_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.SmallTextIconCheckCombo.hideView(); - self.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.SmallTextIconCheckCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.SmallTextIconCheckCombo.setValue(v); - }, - - getValue: function () { - return this.SmallTextIconCheckCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.SmallTextIconCheckCombo.populate(items); - } -}); -BI.SmallTextValueCheckCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.small_text_value_check_combo", BI.SmallTextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-icon-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: this._formatItems(o.items), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - _formatItems: function (items) { - return BI.map(items, function (i, item) { - return BI.extend({ - type: "bi.icon_text_item", - cls: "item-check-font bi-list-item", - height: 30 - }, item); - }); - }, - - populate: function (items) { - BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments); - this.popup.populate(this._formatItems(items)); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.TextValueCheckComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/** - * @class BI.TextValueCombo - * @extend BI.Widget - * combo : text + icon, popup : text - * 参见场景dashboard布局方式选择 - */ -BI.TextValueCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { - baseClass: "bi-text-value-combo", - height: 30, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - text: "", - el: {} - }) - }, - - _init: function () { - BI.TextValueCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.textIconCombo.hideView(); - self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.textIconCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.textIconCombo.setValue(v); - }, - - getValue: function () { - return this.textIconCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.textIconCombo.populate(items); - } -}); -BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** - * @class BI.SmallTextValueCombo - * @extend BI.Widget - * combo : text + icon, popup : text - * 参见场景dashboard布局方式选择 - */ -BI.SmallTextValueCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), { - width: 100, - height: 24, - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - el: {}, - text: "" - }) - }, - - _init: function () { - BI.SmallTextValueCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget(o.el, { - type: "bi.small_select_text_trigger", - items: o.items, - height: o.height, - text: o.text - }); - this.popup = BI.createWidget({ - type: "bi.text_value_combo_popup", - chooseType: o.chooseType, - items: o.items - }); - this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () { - self.setValue(self.popup.getValue()); - self.SmallTextValueCombo.hideView(); - self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE); - }); - this.popup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.SmallTextValueCombo = BI.createWidget({ - type: "bi.combo", - element: this, - adjustLength: 2, - el: this.trigger, - popup: { - el: this.popup, - maxHeight: 300 - } - }); - }, - - setValue: function (v) { - this.SmallTextValueCombo.setValue(v); - }, - - getValue: function () { - return this.SmallTextValueCombo.getValue(); - }, - - populate: function (items) { - this.options.items = items; - this.SmallTextValueCombo.populate(items); - } -}); -BI.SmallTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, { - _defaultConfig: function () { - return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-icon-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE - }); - }, - - _init: function () { - BI.TextValueComboPopup.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.popup = BI.createWidget({ - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.single_select_item", - textAlign: o.textAlign, - height: 30 - }), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); - } - }); - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.popup] - }); - }, - - populate: function (items) { - BI.TextValueComboPopup.superclass.populate.apply(this, arguments); - items = BI.createItems(items, { - type: "bi.single_select_item", - height: 30 - }); - this.popup.populate(items); - }, - - getValue: function () { - return this.popup.getValue(); - }, - - setValue: function (v) { - this.popup.setValue(v); - } - -}); -BI.TextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_combo_popup", BI.TextValueComboPopup);/** - * @class BI.TextValueDownListCombo - * @extend BI.Widget - */ -BI.TextValueDownListCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-value-down-list-combo", - height: 30, - text: "" - }) - }, - - _init: function () { - BI.TextValueDownListCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this._createValueMap(); - - this.trigger = BI.createWidget({ - type: "bi.down_list_select_text_trigger", - height: o.height, - items: o.items - }); - - this.combo = BI.createWidget({ - type: "bi.down_list_combo", - element: this, - chooseType: BI.Selection.Single, - adjustLength: 2, - height: o.height, - el: this.trigger, - items: BI.deepClone(o.items) - }); - - this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () { - self.setValue(self.combo.getValue()[0].value); - self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); - }); - - this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () { - self.setValue(self.combo.getValue()[0].childValue); - self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE); - }); - }, - - _createValueMap: function () { - var self = this; - this.valueMap = {}; - BI.each(BI.flatten(this.options.items), function (idx, item) { - if (BI.has(item, "el")) { - BI.each(item.children, function (id, it) { - self.valueMap[it.value] = {value: item.el.value, childValue: it.value} - }); - } else { - self.valueMap[item.value] = {value: item.value}; - } - }); - }, - - setValue: function (v) { - v = this.valueMap[v]; - this.combo.setValue([v]); - this.trigger.setValue(v.childValue || v.value); - }, - - getValue: function () { - var v = this.combo.getValue()[0]; - return [v.childValue || v.value]; - }, - - populate: function (items) { - this.options.items = BI.flatten(items); - this.combo.populate(items); - this._createValueMap(); - } -}); -BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);/** - * 选择字段trigger, downlist专用 - * 显示形式为 父亲值(儿子值) - * - * @class BI.DownListSelectTextTrigger - * @extends BI.Trigger - */ -BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-down-list-select-text-trigger", - height: 24, - text: "" - }); - }, - - _init: function () { - BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments); - var o = this.options; - this.trigger = BI.createWidget({ - type: "bi.select_text_trigger", - element: this, - height: o.height, - items: this._formatItemArray(o.items), - text: o.text - }); - }, - - _formatItemArray: function(){ - var sourceArray = BI.flatten(BI.deepClone(this.options.items)); - var targetArray = []; - BI.each(sourceArray, function(idx, item){ - if(BI.has(item, "el")){ - BI.each(item.children, function(id, it){ - it.text = item.el.text + "(" + it.text + ")"; - }); - targetArray = BI.concat(targetArray, item.children); - }else{ - targetArray.push(item); - } - }); - return targetArray; - }, - - setValue: function (vals) { - this.trigger.setValue(vals); - }, - - populate: function (items) { - this.trigger.populate(this._formatItemArray(items)); - } -}); -BI.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** - * 有清楚按钮的文本框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.ClearEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-clear-editor", - height: 30, - errorText: "", - watermark: "", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - BI.ClearEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.ClearEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: this.editor - }, - { - el: this.clear, - width: 25 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ClearEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ClearEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ClearEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ClearEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.ClearEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ClearEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.ClearEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ClearEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ClearEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ClearEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); - } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); - } - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.ClearEditor.EVENT_START = "EVENT_START"; -BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; -BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; -BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.clear_editor", BI.ClearEditor);/** - * Created by roy on 15/9/14. - */ -BI.SearchEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-search-editor bi-border", - height: 30, - errorText: "", - watermark: BI.i18nText("BI-Basic_Search"), - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - this.options.height -= 2; - BI.SearchEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.SearchEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: { - type: "bi.center_adapt", - cls: "search-font", - items: [{ - el: { - type: "bi.icon" - } - }] - }, - width: 25 - }, - { - el: self.editor - }, - { - el: this.clear, - width: 25 - } - ] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SearchEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SearchEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SearchEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SearchEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SearchEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SearchEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.SearchEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SearchEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SearchEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SearchEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); - } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); - } - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - isValid: function () { - return this.editor.isValid(); - } -}); -BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.SearchEditor.EVENT_START = "EVENT_START"; -BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; -BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; -BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.search_editor", BI.SearchEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallSearchEditor - * @extends BI.SearchEditor - */ -BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { - _defaultConfig: function () { - var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-search-editor", - height: 24 - }); - }, - - _init: function () { - BI.SmallSearchEditor.superclass._init.apply(this, arguments); - } -}); -BI.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** - * 带标记的文本框 - * Created by GUY on 2016/1/25. - * @class BI.ShelterEditor - * @extends BI.Widget - */ -BI.ShelterEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-shelter-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30, - textAlign: "left" - }) - }, - - _init: function () { - BI.ShelterEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "shelter-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: o.textAlign, - height: o.height, - hgap: 4 - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - arguments[2] = self; - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setTextStyle: function (style) { - this.text.setStyle(style); - }, - - setValue: function (k) { - this.editor.setValue(k); - this._checkText(); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - this._showHint(); - this.text.setValue(v); - } -}); -BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.ShelterEditor.EVENT_START = "EVENT_START"; -BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; -BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; -BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.shelter_editor", BI.ShelterEditor);/** - * Created by User on 2017/7/28. - */ -BI.SignInitialEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - value: "", - text: "", - height: 30 - }) - }, - - _init: function () { - BI.SignInitialEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL) - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignInitialEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - var v = this.editor.getValue(); - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.text.setValue(v); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (v) { - var o = this.options; - this.editor.setValue(v.value); - o.text = v.text || o.text; - this._checkText(); - }, - - getValue: function () { - return { - value: this.editor.getValue(), - text: this.options.text - } - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - var o = this.options; - this._showHint(); - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.text.setValue(v); - } -}); -BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignInitialEditor.EVENT_START = "EVENT_START"; -BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** - * 带标记的文本框 - * Created by GUY on 2015/8/28. - * @class BI.SignEditor - * @extends BI.Widget - */ -BI.SignEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.SignEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-editor-text", - title: o.title, - warningTitle: o.warningTitle, - tipType: o.tipType, - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - self._checkText(); - }, - - _checkText: function () { - var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - setTitle: function (title) { - this.text.setTitle(title); - }, - - setWarningTitle: function (title) { - this.text.setWarningTitle(title); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - this._checkText(); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.text.getValue(); - }, - - setState: function (v) { - this._showHint(); - this.text.setValue(v); - } -}); -BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignEditor.EVENT_START = "EVENT_START"; -BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.sign_editor", BI.SignEditor);/** - * guy - * 记录状态的输入框 - * @class BI.StateEditor - * @extends BI.Single - */ -BI.StateEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-state-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.StateEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "state-editor-infinite-text bi-disabled", - textAlign: "left", - height: o.height, - text: BI.i18nText("BI-Basic_Unrestricted"), - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.setValue(""); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.StateEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.StateEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.StateEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - focus: function () { - if (this.options.disabled === false) { - this._showInput(); - this.editor.focus(); - } - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.editor.getValue().match(/[^\s]+/g); - }, - - setState: function (v) { - BI.StateEditor.superclass.setValue.apply(this, arguments); - if (BI.isNumber(v)) { - if (v === BI.Selection.All) { - this.text.setText(BI.i18nText("BI-Select_All")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (v === BI.Selection.Multi) { - this.text.setText(BI.i18nText("BI-Select_Part")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.setTitle(""); - this.text.element.addClass("state-editor-infinite-text"); - } - return; - } - if (BI.isString(v)) { - // if (BI.isEmpty(v)) { - // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - // this.text.setTitle(""); - // this.text.element.addClass("state-editor-infinite-text"); - // } else { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - // } - return; - } - if (BI.isArray(v)) { - if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } else if (v.length === 1) { - this.text.setText(v[0]); - this.text.setTitle(v[0]); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Select_Part")); - this.text.setTitle(""); - this.text.element.removeClass("state-editor-infinite-text"); - } - } - } -}); -BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.StateEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.StateEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.StateEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.StateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.StateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.StateEditor.EVENT_START = "EVENT_START"; -BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.StateEditor.EVENT_STOP = "EVENT_STOP"; -BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.StateEditor.EVENT_VALID = "EVENT_VALID"; -BI.StateEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.StateEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.StateEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.state_editor", BI.StateEditor);/** - * 无限制-已选择状态输入框 - * Created by GUY on 2016/5/18. - * @class BI.SimpleStateEditor - * @extends BI.Single - */ -BI.SimpleStateEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-simple-state-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.SimpleStateEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "state-editor-infinite-text bi-disabled", - textAlign: "left", - height: o.height, - text: BI.i18nText("BI-Basic_Unrestricted"), - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.setValue(""); - } - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL); - }); - }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments); - }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - }, - - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - }, - - _showInput: function () { - this.editor.visible(); - this.text.invisible(); - }, - - _showHint: function () { - this.editor.invisible(); - this.text.visible(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); - }, - - getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.editor.getValue().match(/[^\s]+/g); - }, - - setState: function (v) { - BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); - if (BI.isNumber(v)) { - if (v === BI.Selection.All) { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (v === BI.Selection.Multi) { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } - return; - } - if (!BI.isArray(v) || v.length === 1) { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - } else if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.element.addClass("state-editor-infinite-text"); - } else { - this.text.setText(BI.i18nText("BI-Already_Selected")); - this.text.element.removeClass("state-editor-infinite-text"); - } - } -}); -BI.SimpleStateEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SimpleStateEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SimpleStateEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SimpleStateEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SimpleStateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SimpleStateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SimpleStateEditor.EVENT_START = "EVENT_START"; -BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP"; -BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID"; -BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SimpleStateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** - * guy - * @class BI.TextEditor - * @extends BI.Single - */ -BI.TextEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - extraCls: "bi-text-editor bi-border", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 - }) - }, - - _init: function () { - BI.TextEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 2}); - } - if (BI.isNumber(o.width)) { - this.element.css({width: o.width - 2}); - } - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height - 2, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.TextEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.TextEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.TextEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.TextEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.TextEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.TextEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_REMOVE); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.TextEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.TextEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.TextEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.TextEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.TextEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.TextEditor.EVENT_EMPTY); - }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setValue: function (v) { - this.editor.setValue(v); - }, - - getValue: function () { - return this.editor.getValue(); - } -}); -BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.TextEditor.EVENT_START = "EVENT_START"; -BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.TextEditor.EVENT_STOP = "EVENT_STOP"; -BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.TextEditor.EVENT_VALID = "EVENT_VALID"; -BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -BI.shortcut("bi.text_editor", BI.TextEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.SmallTextEditor = BI.inherit(BI.TextEditor, { - _defaultConfig: function () { - var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-text-editor", - height: 25 - }); - }, - - _init: function () { - BI.SmallTextEditor.superclass._init.apply(this, arguments); - } -}); -BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** - * 有确定取消按钮的弹出层 - * @class BI.BarFloatSection - * @extends BI.FloatSection - * @abstract - */ -BI.BarFloatSection = BI.inherit(BI.FloatSection, { - _defaultConfig: function () { - return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this, arguments), { - btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText("BI-Basic_Cancel")] - }) - }, - - _init: function () { - BI.BarFloatSection.superclass._init.apply(this, arguments); - var self = this; - var flatten = ["_init", "_defaultConfig", "_vessel", "_render", "getName", "listenEnd", "local", "refresh", "load", "change"]; - flatten = BI.makeObject(flatten, true); - BI.each(this.constructor.caller.caller.caller.caller.prototype, function (key) { - if (flatten[key]) { - return; - } - var f = self[key]; - if (BI.isFunction(f)) { - self[key] = BI.bind(function () { - if (this.model._start === true) { - this._F.push({f: f, arg: arguments}); - return; - } - return f.apply(this, arguments); - }, self); - } - }) - }, - - rebuildSouth: function (south) { - var self = this, o = this.options; - this.sure = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[0], - height: 30, - value: 0, - handler: function (v) { - self.end(); - self.close(v); - } - }); - this.cancel = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[1], - height: 30, - value: 1, - level: 'ignore', - handler: function (v) { - self.close(v); - } - }); - BI.createWidget({ - type: 'bi.right_vertical_adapt', - element: south, - hgap: 5, - items: [this.cancel, this.sure] - }); - } -}); - -/** - * 有确定取消按钮的弹出层 - * @class BI.BarPopoverSection - * @extends BI.PopoverSection - * @abstract - */ -BI.BarPopoverSection = BI.inherit(BI.PopoverSection, { - _defaultConfig: function () { - return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this, arguments), { - btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] - }) - }, - - _init: function () { - BI.BarPopoverSection.superclass._init.apply(this, arguments); - }, - - rebuildSouth: function (south) { - var self = this, o = this.options; - this.sure = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[0], - warningTitle: o.warningTitle, - height: 30, - value: 0, - handler: function (v) { - self.end(); - self.close(v); - } - }); - this.cancel = BI.createWidget({ - type: 'bi.button', - text: this.options.btns[1], - height: 30, - value: 1, - level: 'ignore', - handler: function (v) { - self.close(v); - } - }); - BI.createWidget({ - type: 'bi.right_vertical_adapt', - element: south, - hgap: 5, - items: [this.cancel, this.sure] - }); - }, - - setConfirmButtonEnable: function(v){ - this.sure.setEnable(!!v); - } -});/** - * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w - * @class BI.MultiPopupView - * @extends BI.Widget - */ - -BI.MultiPopupView = BI.inherit(BI.PopupView, { - - _defaultConfig: function () { - var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-multi-list-view", - buttons: [BI.i18nText("BI-Basic_Sure")] - }) - }, - - _init: function () { - BI.MultiPopupView.superclass._init.apply(this, arguments); - }, - - _createToolBar: function () { - var o = this.options, self = this; - if (o.buttons.length === 0) { - return; - } - - var text = []; //构造[{text:content},……] - BI.each(o.buttons, function (idx, item) { - text.push({ - text: item, - value: idx - }) - }); - - this.buttongroup = BI.createWidget({ - type: "bi.button_group", - cls: "list-view-toolbar bi-high-light bi-border-top", - height: 30, - items: BI.createItems(text, { - type: "bi.text_button", - once: false, - shadow: true, - isShadowShowingOnSelected: true - }), - layouts: [{ - type: "bi.center", - hgap: 0, - vgap: 0 - }] - }); - - this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { - self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj); - }); - - return this.buttongroup; - } - -}); - -BI.MultiPopupView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; - -BI.shortcut("bi.multi_popup_view", BI.MultiPopupView);/** - * 可以理解为MultiPopupView和Panel两个面板的结合体 - * @class BI.PopupPanel - * @extends BI.MultiPopupView - */ - -BI.PopupPanel = BI.inherit(BI.MultiPopupView, { - - _defaultConfig: function () { - var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-popup-panel", - title: "" - }) - }, - - _init: function () { - BI.PopupPanel.superclass._init.apply(this, arguments); - }, - - _createTool: function () { - var self = this, o = this.options; - var close = BI.createWidget({ - type: "bi.icon_button", - cls: "close-h-font", - width: 25, - height: 25 - }); - close.on(BI.IconButton.EVENT_CHANGE, function () { - self.setVisible(false); - self.fireEvent(BI.PopupPanel.EVENT_CLOSE); - }); - return BI.createWidget({ - type: "bi.htape", - cls: "popup-panel-title bi-background bi-border", - height: 25, - items: [{ - el: { - type: "bi.label", - textAlign: "left", - text: o.title, - height: 25, - lgap: 10 - } - }, { - el: close, - width: 25 - }] - }); - } -}); - -BI.PopupPanel.EVENT_CHANGE = "EVENT_CHANGE"; -BI.PopupPanel.EVENT_CLOSE = "EVENT_CLOSE"; -BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; - -BI.shortcut("bi.popup_panel", BI.PopupPanel);/** - * list面板 - * - * Created by GUY on 2015/10/30. - * @class BI.ListPane - * @extends BI.Pane - */ -BI.ListPane = BI.inherit(BI.Pane, { - - _defaultConfig: function () { - var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-list-pane", - logic: { - dynamic: true - }, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - vgap: 0, - hgap: 0, - items: [], - itemsCreator: BI.emptyFn, - hasNext: BI.emptyFn, - onLoaded: BI.emptyFn, - el: { - type: "bi.button_group" - } - }) - }, - _init: function () { - BI.ListPane.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, - behaviors: {}, - items: o.items, - itemsCreator: function (op, calback) { - if (op.times === 1) { - self.empty(); - BI.nextTick(function () { - self.loading() - }); - } - o.itemsCreator(op, function () { - calback.apply(self, arguments); - op.times === 1 && BI.nextTick(function () { - self.loaded(); - }); - }); - }, - hasNext: o.hasNext, - layouts: [{ - type: "bi.vertical" - }] - }); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj); - } - }); - this.check(); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ - scrolly: true, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - vgap: o.vgap, - hgap: o.hgap - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) - })))); - }, - - hasPrev: function () { - return this.button_group.hasPrev && this.button_group.hasPrev(); - }, - - hasNext: function () { - return this.button_group.hasNext && this.button_group.hasNext(); - }, - - prependItems: function (items) { - this.options.items = items.concat(this.options.items); - this.button_group.prependItems.apply(this.button_group, arguments); - this.check(); - }, - - addItems: function (items) { - this.options.items = this.options.items.concat(items); - this.button_group.addItems.apply(this.button_group, arguments); - this.check(); - }, - - removeItemAt: function (indexes) { - indexes = indexes || []; - BI.removeAt(this.options.items, indexes); - this.button_group.removeItemAt.apply(this.button_group, arguments); - this.check(); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法 - this.button_group.attr("itemsCreator").apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("参数不能为空"); - } - self.populate.apply(self, arguments); - }]); - return; - } - BI.ListPane.superclass.populate.apply(this, arguments); - this.button_group.populate.apply(this.button_group, arguments); - }, - - empty: function () { - this.button_group.empty(); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - } -}); -BI.ListPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.list_pane", BI.ListPane);/** - * 带有标题栏的pane - * @class BI.Panel - * @extends BI.Widget - */ -BI.Panel = BI.inherit(BI.Widget,{ - _defaultConfig : function(){ - return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{ - baseCls: "bi-panel bi-border", - title:"", - titleButtons:[], - el:{}, - logic:{ - dynamic: false - } - }); - }, - - _init:function(){ - BI.Panel.superclass._init.apply(this,arguments); - var o = this.options; - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() - ,this.options.el) - })))); - }, - - _createTitle:function(){ - var self = this, o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - cls: "panel-title-text", - text: o.title, - height: 30 - }); - - this.button_group = BI.createWidget({ - type:"bi.button_group", - items: o.titleButtons, - layouts: [{ - type: "bi.center_adapt", - lgap:10 - }] - }); - - this.button_group.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function(value, obj){ - self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj); - }); - - return { - el: { - type: "bi.left_right_vertical_adapt", - cls: "panel-title bi-tips bi-border-bottom bi-background", - height: 30, - items: { - left: [this.text], - right: [this.button_group] - }, - lhgap: 10, - rhgap: 10 - }, - height: 30 - }; - }, - - setTitle: function(title){ - this.text.setValue(title); - } -}); -BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE"; - -BI.shortcut("bi.panel",BI.Panel);/** - * 选择列表 - * - * Created by GUY on 2015/11/1. - * @class BI.SelectList - * @extends BI.Widget - */ -BI.SelectList = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-select-list", - direction: BI.Direction.Top,//toolbar的位置 - logic: { - dynamic: true - }, - items: [], - itemsCreator: BI.emptyFn, - hasNext: BI.emptyFn, - onLoaded: BI.emptyFn, - toolbar: { - type: "bi.multi_select_bar" - }, - el: { - type: "bi.list_pane" - } - }) - }, - _init: function () { - BI.SelectList.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - //全选 - this.toolbar = BI.createWidget(o.toolbar); - this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - var isAllSelected = this.isSelected(); - if (type === BI.Events.CLICK) { - self.setAllSelected(isAllSelected); - self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.list = BI.createWidget(o.el, { - type: "bi.list_pane", - items: o.items, - itemsCreator: function (op, callback) { - op.times === 1 && self.toolbar.setVisible(false); - o.itemsCreator(op, function (items) { - callback.apply(self, arguments); - if (op.times === 1) { - self.toolbar.setVisible(items && items.length > 0); - self.toolbar.setEnable(items && items.length > 0); - } - self._checkAllSelected(); - }); - }, - onLoaded: o.onLoaded, - hasNext: o.hasNext - }); - - this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - self._checkAllSelected(); - self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ - scrolly: true - }, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list) - })))); - - if (o.items.length <= 0) { - this.toolbar.setVisible(false); - this.toolbar.setEnable(false); - } - }, - - _checkAllSelected: function () { - var selectLength = this.list.getValue().length; - var notSelectLength = this.getAllLeaves().length - selectLength; - var hasNext = this.list.hasNext(); - var isAlreadyAllSelected = this.toolbar.isSelected(); - var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext)); - isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected); - this.toolbar.setHalfSelected(isHalf); - !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected)); - }, - - setAllSelected: function (v) { - BI.each(this.getAllButtons(), function (i, btn) { - (btn.setSelected || btn.setAllSelected).apply(btn, [v]); - }); - this.toolbar.setSelected(v); - this.toolbar.setHalfSelected(false); - }, - - setToolBarVisible: function (b) { - this.toolbar.setVisible(b); - }, - - isAllSelected: function () { - return this.toolbar.isSelected(); - }, - - hasPrev: function () { - return this.list.hasPrev(); - }, - - hasNext: function () { - return this.list.hasNext(); - }, - - prependItems: function (items) { - this.list.prependItems.apply(this.list, arguments); - }, - - addItems: function (items) { - this.list.addItems.apply(this.list, arguments); - }, - - setValue: function (data) { - var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL; - this.setAllSelected(selectAll); - this.list[selectAll ? "setNotSelectedValue" : "setValue"](data.value); - this._checkAllSelected(); - }, - - getValue: function () { - if (this.isAllSelected() === false) { - return { - type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - value: this.list.getValue(), - assist: this.list.getNotSelectedValue() - }; - } else { - return { - type: BI.ButtonGroup.CHOOSE_TYPE_ALL, - value: this.list.getNotSelectedValue(), - assist: this.list.getValue() - }; - } - }, - - empty: function () { - this.list.empty(); - }, - - populate: function (items) { - this.toolbar.setVisible(!BI.isEmptyArray(items)); - this.toolbar.setEnable(!BI.isEmptyArray(items)); - this.list.populate.apply(this.list, arguments); - this._checkAllSelected(); - }, - - _setEnable: function (enable) { - BI.SelectList.superclass._setEnable.apply(this, arguments); - this.toolbar.setEnable(enable); - }, - - resetHeight: function (h) { - var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); - this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : - this.list.element.css({"max-height": h - toolHeight + "px"}) - }, - - setNotSelectedValue: function () { - this.list.setNotSelectedValue.apply(this.list, arguments); - this._checkAllSelected(); - }, - - getNotSelectedValue: function () { - return this.list.getNotSelectedValue(); - }, - - getAllButtons: function () { - return this.list.getAllButtons(); - }, - - getAllLeaves: function () { - return this.list.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.list.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.list.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.list.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.list.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.list.getNodeByValue(value); - } -}); -BI.SelectList.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.select_list", BI.SelectList);/** - * Created by roy on 15/11/6. - */ -BI.LazyLoader = BI.inherit(BI.Widget, { - _const: { - PAGE: 100 - }, - _defaultConfig: function () { - return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-lazy-loader", - el: {} - }) - }, - - _init: function () { - var self = this, o = this.options; - BI.LazyLoader.superclass._init.apply(this, arguments); - var all = o.items.length; - this.loader = BI.createWidget({ - type: "bi.loader", - element: this, - //下面是button_group的属性 - el: o.el, - - itemsCreator: function (options, populate) { - populate(self._getNextItems(options)); - }, - hasNext: function (option) { - return option.count < all; - } - }); - - this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj) - }) - }, - _getNextItems: function (options) { - var self = this, o = this.options; - var lastNum = o.items.length - this._const.PAGE * (options.times - 1); - var lastItems = BI.last(o.items, lastNum); - var nextItems = BI.first(lastItems, this._const.PAGE); - return nextItems; - }, - - populate: function (items) { - this.loader.populate(items); - }, - - addItems: function (items) { - this.loader.addItems(items); - }, - - empty: function () { - this.loader.empty(); - }, - - setNotSelectedValue: function () { - this.loader.setNotSelectedValue.apply(this.loader, arguments); - }, - - getNotSelectedValue: function () { - return this.loader.getNotSelectedValue(); - }, - - setValue: function () { - this.loader.setValue.apply(this.loader, arguments); - }, - - getValue: function () { - return this.loader.getValue.apply(this.loader, arguments); - }, - - getAllButtons: function () { - return this.loader.getAllButtons(); - }, - - getAllLeaves: function () { - return this.loader.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.loader.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.loader.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.loader.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.loader.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.loader.getNodeByValue(value); - } -}); -BI.LazyLoader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.lazy_loader", BI.LazyLoader);/** - * 恶心的加载控件, 为解决排序问题引入的控件 - * - * Created by GUY on 2015/11/12. - * @class BI.ListLoader - * @extends BI.Widget - */ -BI.ListLoader = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-list-loader", - - isDefaultInit: true,//是否默认初始化数据 - - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, - - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, - - //下面是分页信息 - count: false, - next: {}, - hasNext: BI.emptyFn - }) - }, - - _nextLoad: function () { - var self = this, o = this.options; - this.next.setLoading(); - o.itemsCreator.apply(this, [{times: ++this.times}, function () { - self.next.setLoaded(); - self.addItems.apply(self, arguments); - }]); - }, - - _init: function () { - BI.ListLoader.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.itemsCreator === false) { - o.next = false; - } - - this.button_group = BI.createWidget(o.el, { - type: "bi.button_group", - element: this, - chooseType: 0, - items: o.items, - behaviors: {}, - layouts: [{ - type: "bi.vertical" - }] - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj); - } - }); - - if (o.next !== false) { - this.next = BI.createWidget(BI.extend({ - type: "bi.loading_bar" - }, o.next)); - this.next.on(BI.Controller.EVENT_CHANGE, function (type) { - if (type === BI.Events.CLICK) { - self._nextLoad(); - } - }) - } - - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.next] - }); - - o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { - this.populate(); - }, this)); - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - hasNext: function () { - var o = this.options; - if (BI.isNumber(o.count)) { - return this.count < o.count; - } - return !!o.hasNext.apply(this, [{ - times: this.times, - count: this.count - }]) - }, - - addItems: function (items) { - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.options.items = this.options.items.concat(items); - this.next.setLoaded(); - } else { - this.next.setEnd(); - } - } - this.button_group.addItems.apply(this.button_group, arguments); - this.next.element.appendTo(this.element); - }, - - populate: function (items) { - var self = this, o = this.options; - if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { - o.itemsCreator.apply(this, [{times: 1}, function () { - if (arguments.length === 0) { - throw new Error("参数不能为空"); - } - self.populate.apply(self, arguments); - o.onLoaded(); - }]); - return; - } - this.options.items = items; - this.times = 1; - this.count = 0; - this.count += items.length; - if (BI.isObject(this.next)) { - if (this.hasNext()) { - this.next.setLoaded(); - } else { - this.next.invisible(); - } - } - BI.DOM.hang([this.next]); - this.button_group.populate.apply(this.button_group, arguments); - this.next.element.appendTo(this.element); - }, - - empty: function () { - BI.DOM.hang([this.next]); - this.button_group.empty(); - this.next.element.appendTo(this.element); - BI.each([this.next], function (i, ob) { - ob && ob.setVisible(false); - }); - }, - - setNotSelectedValue: function () { - this.button_group.setNotSelectedValue.apply(this.button_group, arguments); - }, - - getNotSelectedValue: function () { - return this.button_group.getNotSelectedValue(); - }, - - setValue: function () { - this.button_group.setValue.apply(this.button_group, arguments); - }, - - getValue: function () { - return this.button_group.getValue.apply(this.button_group, arguments); - }, - - getAllButtons: function () { - return this.button_group.getAllButtons(); - }, - - getAllLeaves: function () { - return this.button_group.getAllLeaves(); - }, - - getSelectedButtons: function () { - return this.button_group.getSelectedButtons(); - }, - - getNotSelectedButtons: function () { - return this.button_group.getNotSelectedButtons(); - }, - - getIndexByValue: function (value) { - return this.button_group.getIndexByValue(value); - }, - - getNodeById: function (id) { - return this.button_group.getNodeById(id); - }, - - getNodeByValue: function (value) { - return this.button_group.getNodeByValue(value); - } -}); -BI.ListLoader.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.list_loader", BI.ListLoader);/** - * Created by GUY on 2016/4/29. - * - * @class BI.SortList - * @extends BI.Widget + getValue: function () { + return this.branchView.getValue(); + } +}); +BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/** + * @class BI.BranchExpander + * @extend BI.Widget + * create by young */ -BI.SortList = BI.inherit(BI.Widget, { +BI.BranchExpander = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-sort-list", + return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-expander", + direction: BI.Direction.Left, + logic: { + dynamic: true + }, + el: {}, + popup: {} + }) + }, - isDefaultInit: true,//是否默认初始化数据 + _init: function () { + BI.BranchExpander.superclass._init.apply(this, arguments); + var o = this.options; + this._initExpander(); + this._initBranchView(); + BI.createWidget(BI.extend({ + element: this + }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { + items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView) + })))); + }, - //下面是button_group的属性 - el: { - type: "bi.button_group" - }, + _initExpander: function () { + var self = this, o = this.options; + this.expander = BI.createWidget(o.el, { + type: "bi.label", + width: 30, + height: "100%" + }); + this.expander.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, - items: [], - itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn, + _initBranchView: function () { + var self = this, o = this.options; + this.branchView = BI.createWidget(o.popup, {}); + this.branchView.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, - //下面是分页信息 - count: false, - next: {}, - hasNext: BI.emptyFn + populate: function (items) { + this.branchView.populate.apply(this.branchView, arguments); + }, - //containment: this.element, - //connectWith: ".bi-sort-list", + getValue: function () { + return this.branchView.getValue(); + } +}); +BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.branch_expander", BI.BranchExpander);/** + * @class BI.HandStandBranchTree + * @extends BI.Widget + * create by young + * 横向分支的树 + */ +BI.HandStandBranchTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-handstand-branch-tree", + expander: {}, + el: {}, + items: [] }) }, - _init: function () { - BI.SortList.superclass._init.apply(this, arguments); + BI.HandStandBranchTree.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.loader = BI.createWidget({ - type: "bi.list_loader", + this.branchTree = BI.createWidget({ + type: "bi.custom_tree", element: this, - isDefaultInit: o.isDefaultInit, - el: o.el, - items: this._formatItems(o.items), - itemsCreator: function (op, callback) { - o.itemsCreator(op, function (items) { - callback(self._formatItems(items)); - }); - }, - onLoaded: o.onLoaded, - count: o.count, - next: o.next, - hasNext: o.hasNext + expander: BI.extend({ + type: "bi.handstand_branch_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: BI.extend({ + type: "bi.button_tree", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + layouts: [{ + type: "bi.horizontal_adapt" + }] + }, o.el), + items: this.options.items }); - this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ + self.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE, arguments); + }); + this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj); - } }); + }, - this.loader.element.sortable({ - containment: o.containment || this.element, - connectWith: o.connectWith || ".bi-sort-list", - items: ".sort-item", - cursor: o.cursor || "drag", - tolerance: o.tolerance || "intersect", - placeholder: { - element: function ($currentItem) { - var holder = BI.createWidget({ - type: "bi.layout", - cls: "bi-sortable-holder", - height: $currentItem.outerHeight() - }); - holder.element.css({ - "margin-left": $currentItem.css("margin-left"), - "margin-right": $currentItem.css("margin-right"), - "margin-top": $currentItem.css("margin-top"), - "margin-bottom": $currentItem.css("margin-bottom"), - "margin": $currentItem.css("margin") - }); - return holder.element; - }, - update: function () { + populate: function () { + this.branchTree.populate.apply(this.branchTree, arguments); + }, + getValue: function () { + return this.branchTree.getValue(); + } +}); +BI.HandStandBranchTree.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.handstand_branch_tree", BI.HandStandBranchTree);/** + * @class BI.BranchTree + * @extends BI.Widget + * create by young + * 横向分支的树 + */ +BI.BranchTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-tree", + expander: {}, + el: {}, + items: [] + }) + }, + _init: function () { + BI.BranchTree.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.branchTree = BI.createWidget({ + type: "bi.custom_tree", + element: this, + expander: BI.extend({ + type: "bi.branch_expander", + el: {}, + popup: { + type: "bi.custom_tree" } - }, - start: function (event, ui) { + }, o.expander), + el: BI.extend({ + type: "bi.button_tree", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + layouts: [{ + type: "bi.vertical" + }] + }, o.el), + items: this.options.items + }); + this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ + self.fireEvent(BI.BranchTree.EVENT_CHANGE, arguments); + }); + this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + }, + + populate: function () { + this.branchTree.populate.apply(this.branchTree, arguments); + }, + + getValue: function () { + return this.branchTree.getValue(); + } +}); +BI.BranchTree.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.branch_tree", BI.BranchTree);/** + * guy + * 异步树 + * @class BI.DisplayTree + * @extends BI.TreeView + */ +BI.DisplayTree = BI.inherit(BI.TreeView, { + _defaultConfig: function () { + return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-display-tree" + }) + }, + _init: function () { + BI.DisplayTree.superclass._init.apply(this, arguments); + }, + //配置属性 + _configSetting: function () { + var setting = { + view: { + selectedMulti: false, + dblClickExpand: false, + showIcon: false, + showTitle: false }, - stop: function (event, ui) { - self.fireEvent(BI.SortList.EVENT_CHANGE); + data: { + key: { + title: "title", + name: "text" + }, + simpleData: { + enable: true + } }, - over: function (event, ui) { + callback: { + beforeCollapse: beforeCollapse + } + }; + + function beforeCollapse(treeId, treeNode) { + return false; + } + + return setting; + }, + _dealWidthNodes: function (nodes) { + nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); + var self = this, o = this.options; + BI.each(nodes, function (i, node) { + if (node.count > 0) { + node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; + } else { + node.text = node.value; } }); + return nodes; }, - _formatItems: function (items) { - BI.each(items, function (i, item) { - item = BI.stripEL(item); - item.cls = item.cls ? item.cls + " sort-item" : "sort-item"; - item.attributes = { - sorted: item.value - }; - }); - return items; + initTree: function (nodes, setting) { + var setting = setting || this._configSetting(); + this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); }, - hasNext: function () { - return this.loader.hasNext(); + destroy: function () { + BI.DisplayTree.superclass.destroy.apply(this, arguments); + } +}); +BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.display_tree", BI.DisplayTree);/** + * guy + * 二级树 + * @class BI.LevelTree + * @extends BI.Single + */ +BI.LevelTree = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-level-tree", + el: { + chooseType: 0 + }, + expander: {}, + items: [] + }) }, - addItems: function (items) { - this.loader.addItems(items); + _init: function () { + BI.LevelTree.superclass._init.apply(this, arguments); + + this.initTree(this.options.items); + }, + + _formatItems: function (nodes, layer) { + var self = this; + BI.each(nodes, function (i, node) { + var extend = {layer: layer}; + if (!BI.isKey(node.id)) { + node.id = BI.UUID(); + } + if (node.isParent === true || BI.isNotEmptyArray(node.children)) { + switch (i) { + case 0 : + extend.type = "bi.first_plus_group_node"; + break; + case nodes.length - 1 : + extend.type = "bi.last_plus_group_node"; + break; + default : + extend.type = "bi.mid_plus_group_node"; + break; + } + BI.defaults(node, extend); + self._formatItems(node.children, layer + 1); + } else { + switch (i) { + case nodes.length - 1: + extend.type = "bi.last_tree_leaf_item"; + break; + default : + extend.type = "bi.mid_tree_leaf_item"; + } + BI.defaults(node, extend); + } + }); + return nodes; }, - populate: function (items) { - if (items) { - arguments[0] = this._formatItems(items); - } - this.loader.populate.apply(this.loader, arguments); + _assertId: function (sNodes) { + BI.each(sNodes, function (i, node) { + if (!BI.isKey(node.id)) { + node.id = BI.UUID(); + } + }); }, - empty: function () { - this.loader.empty(); + //构造树结构, + initTree: function (nodes) { + var self = this, o = this.options; + this.empty(); + this._assertId(nodes); + this.tree = BI.createWidget({ + type: "bi.custom_tree", + element: this, + expander: BI.extend({ + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + + items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), + + el: BI.extend({ + type: "bi.button_tree", + chooseType: 0, + layouts: [{ + type: "bi.vertical" + }] + }, o.el) + }); + this.tree.on(BI.Controller.EVENT_CHANGE, function (type) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.LevelTree.EVENT_CHANGE, arguments); + } + }) }, - setNotSelectedValue: function () { - this.loader.setNotSelectedValue.apply(this.loader, arguments); + //生成树方法 + stroke: function (nodes) { + this.tree.stroke.apply(this.tree, arguments); }, - getNotSelectedValue: function () { - return this.loader.getNotSelectedValue(); + populate: function (items) { + items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0); + this.tree.populate(items); }, - setValue: function () { - this.loader.setValue.apply(this.loader, arguments); + setValue: function (v) { + this.tree.setValue(v); }, getValue: function () { - return this.loader.getValue(); + return this.tree.getValue(); }, - getAllButtons: function () { - return this.loader.getAllButtons(); + getAllLeaves: function () { + return this.tree.getAllLeaves(); }, - getAllLeaves: function () { - return this.loader.getAllLeaves(); + getNodeById: function (id) { + return this.tree.getNodeById(id); }, - getSelectedButtons: function () { - return this.loader.getSelectedButtons(); + getNodeByValue: function (id) { + return this.tree.getNodeByValue(id); + } +}); +BI.LevelTree.EVENT_CHANGE = "EVENT_CHANGE"; + +BI.shortcut("bi.level_tree", BI.LevelTree);/** + * 简单的多选树 + * + * Created by GUY on 2016/2/16. + * @class BI.SimpleTreeView + * @extends BI.Widget + */ +BI.SimpleTreeView = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-simple-tree", + itemsCreator: BI.emptyFn, + items: null + }) + }, + _init: function () { + BI.SimpleTreeView.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.structure = new BI.Tree(); + this.tree = BI.createWidget({ + type: "bi.tree_view", + element: this, + itemsCreator: function (op, callback) { + var fn = function (items) { + callback({ + items: items + }); + self.structure.initTree(BI.Tree.transformToTreeFormat(items)); + }; + if (BI.isNotNull(o.items)) { + fn(o.items); + } else { + o.itemsCreator(op, fn); + } + } + }); + this.tree.on(BI.TreeView.EVENT_CHANGE, function () { + self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments); + }); + if (BI.isNotEmptyArray(o.items)) { + this.populate(); + } }, - getNotSelectedButtons: function () { - return this.loader.getNotSelectedButtons(); + populate: function (items, keyword) { + if (items) { + this.options.items = items; + } + this.tree.stroke({ + keyword: keyword + }); }, - getIndexByValue: function (value) { - return this.loader.getIndexByValue(value); + setValue: function (v) { + v || (v = []); + var self = this, map = {}; + var selected = []; + BI.each(v, function (i, val) { + var node = self.structure.search(val, "value"); + if (node) { + var p = node; + p = p.getParent(); + if (p) { + if (!map[p.value]) { + map[p.value] = 0; + } + map[p.value]++; + } + + while (p && p.getChildrenLength() <= map[p.value]) { + selected.push(p.value); + p = p.getParent(); + if (p) { + if (!map[p.value]) { + map[p.value] = 0; + } + map[p.value]++; + } + } + } + }); + + this.tree.setValue(BI.makeObject(v.concat(selected))); }, - getNodeById: function (id) { - return this.loader.getNodeById(id); + _getValue: function () { + var self = this, result = [], val = this.tree.getValue(); + var track = function (nodes) { + BI.each(nodes, function (key, node) { + if (BI.isEmpty(node)) { + result.push(key); + } else { + track(node); + } + }) + }; + track(val); + return result; }, - getNodeByValue: function (value) { - return this.loader.getNodeByValue(value); + empty: function () { + this.tree.empty(); }, - getSortedValues: function () { - return this.loader.element.sortable("toArray", {attribute: "sorted"}); + getValue: function () { + var self = this, result = [], val = this._getValue(); + BI.each(val, function (i, key) { + var target = self.structure.search(key, "value"); + if (target) { + self.structure._traverse(target, function (node) { + if (node.isLeaf()) { + result.push(node.value); + } + }) + } + }); + return result; } }); -BI.SortList.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.sort_list", BI.SortList);/** - * 有总页数和总行数的分页控件 - * Created by Young's on 2016/10/13. - */ -BI.AllCountPager = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-all-count-pager", - height: 30, - pages: 1, //必选项 - curr: 1, //初始化当前页, pages为数字时可用, - count: 1 //总行数 - }) - }, - _init: function () { - BI.AllCountPager.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.small_text_editor", - cls: "pager-editor", - validationChecker: function (v) { - return (self.rowCount.getValue() === 0 && v === "0") || BI.isPositiveInteger(v); - }, - hgap: 4, - vgap: 0, - value: o.curr, - errorText: BI.i18nText("BI-Please_Input_Positive_Integer"), - width: 35, - height: 20 - }); - - this.pager = BI.createWidget({ - type: "bi.pager", - width: 36, - layouts: [{ - type: "bi.horizontal", - hgap: 1, - vgap: 1 - }], - - dynamicShow: false, - pages: o.pages, - curr: o.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Previous_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - cls: "all-pager-prev column-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Next_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - cls: "all-pager-next column-next-page-h-font" - }, - - hasPrev: o.hasPrev, - hasNext: o.hasNext, - firstPage: o.firstPage, - lastPage: o.lastPage - }); - - this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () { - self.pager.setValue(BI.parseInt(self.editor.getValue())); - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.editor.setValue(self.pager.getCurrentPage()); - }); - - this.allPages = BI.createWidget({ - type: "bi.label", - width: 30, - title: o.pages, - text: "/" + o.pages - }); - - this.rowCount = BI.createWidget({ - type: "bi.label", - height: o.height, - hgap: 5, - text: o.count, - title: o.count - }); - - var count = BI.createWidget({ - type: "bi.left", - height: o.height, - scrollable: false, - items: [{ - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Basic_Total"), - width: 15 - }, this.rowCount, { - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Tiao_Data"), - width: 50, - textAlign: "left" - }] - }); - BI.createWidget({ - type: "bi.center_adapt", - element: this, - columnSize: ["", 35, 40, 36], - items: [count, this.editor, this.allPages, this.pager] - }) - }, - - alwaysShowPager: true, - - setAllPages: function (v) { - this.allPages.setText("/" + v); - this.allPages.setTitle(v); - this.pager.setAllPages(v); - this.editor.setEnable(v >= 1); - }, - - setValue: function (v) { - this.pager.setValue(v); - }, - - setVPage: function (v) { - this.pager.setValue(v); - }, - - setCount: function (count) { - this.rowCount.setText(count); - this.rowCount.setTitle(count); - }, - - getCurrentPage: function () { - return this.pager.getCurrentPage(); - }, - - hasPrev: function () { - return this.pager.hasPrev(); - }, - - hasNext: function () { - return this.pager.hasNext(); - }, - - setPagerVisible: function (b) { - this.editor.setVisible(b); - this.allPages.setVisible(b); - this.pager.setVisible(b); - }, - - populate: function () { - this.pager.populate(); - } -}); -BI.AllCountPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.all_count_pager", BI.AllCountPager);/** - * 显示页码的分页控件 - * - * Created by GUY on 2016/6/30. - * @class BI.DirectionPager - * @extends BI.Widget - */ -BI.DirectionPager = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-direction-pager", - height: 30, - horizontal: { - pages: false, //总页数 - curr: 1, //初始化当前页, pages为数字时可用 - - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn, - firstPage: 1, - lastPage: BI.emptyFn - }, - vertical: { - pages: false, //总页数 - curr: 1, //初始化当前页, pages为数字时可用 - - hasPrev: BI.emptyFn, - hasNext: BI.emptyFn, - firstPage: 1, - lastPage: BI.emptyFn - } - }) - }, - _init: function () { - BI.DirectionPager.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var v = o.vertical, h = o.horizontal; - this._createVPager(); - this._createHPager(); - this.layout = BI.createWidget({ - type: "bi.absolute", - scrollable: false, - element: this, - items: [{ - el: this.vpager, - top: 5, - right: 74 - }, { - el: this.vlabel, - top: 5, - right: 111 - }, { - el: this.hpager, - top: 5, - right: -9 - }, { - el: this.hlabel, - top: 5, - right: 28 - }] - }); - }, - - _createVPager: function () { - var self = this, o = this.options; - var v = o.vertical; - this.vlabel = BI.createWidget({ - type: "bi.label", - width: 24, - height: 20, - value: v.curr, - title: v.curr - }); - this.vpager = BI.createWidget({ - type: "bi.pager", - width: 76, - layouts: [{ - type: "bi.horizontal", - scrollx: false, - rgap: 24, - vgap: 1 - }], - - dynamicShow: false, - pages: v.pages, - curr: v.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Up_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-prev column-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Down_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-next column-next-page-h-font" - }, - - hasPrev: v.hasPrev, - hasNext: v.hasNext, - firstPage: v.firstPage, - lastPage: v.lastPage - }); - - this.vpager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.DirectionPager.EVENT_CHANGE); - }); - this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.vlabel.setValue(this.getCurrentPage()); - self.vlabel.setTitle(this.getCurrentPage()); - }); - }, - - _createHPager: function () { - var self = this, o = this.options; - var h = o.horizontal; - this.hlabel = BI.createWidget({ - type: "bi.label", - width: 24, - height: 20, - value: h.curr, - title: h.curr - }); - this.hpager = BI.createWidget({ - type: "bi.pager", - width: 76, - layouts: [{ - type: "bi.horizontal", - scrollx: false, - rgap: 24, - vgap: 1 - }], - - dynamicShow: false, - pages: h.pages, - curr: h.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Left_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-prev row-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Right_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - iconWidth: 16, - iconHeight: 16, - cls: "direction-pager-next row-next-page-h-font" - }, - - hasPrev: h.hasPrev, - hasNext: h.hasNext, - firstPage: h.firstPage, - lastPage: h.lastPage - }); - - this.hpager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.DirectionPager.EVENT_CHANGE); - }); - this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.hlabel.setValue(this.getCurrentPage()); - self.hlabel.setTitle(this.getCurrentPage()); - }); - }, - - getVPage: function () { - return this.vpager.getCurrentPage(); - }, - - getHPage: function () { - return this.hpager.getCurrentPage(); - }, - - setVPage: function (v) { - this.vpager.setValue(v); - this.vlabel.setValue(v); - this.vlabel.setTitle(v); - }, - - setHPage: function (v) { - this.hpager.setValue(v); - this.hlabel.setValue(v); - this.hlabel.setTitle(v); - }, - - hasVNext: function () { - return this.vpager.hasNext(); - }, - - hasHNext: function () { - return this.hpager.hasNext(); - }, - - hasVPrev: function () { - return this.vpager.hasPrev(); - }, - - hasHPrev: function () { - return this.hpager.hasPrev(); - }, - - setHPagerVisible: function (b) { - this.hpager.setVisible(b); - this.hlabel.setVisible(b); - }, - - setVPagerVisible: function (b) { - this.vpager.setVisible(b); - this.vlabel.setVisible(b); - }, - - populate: function () { - this.vpager.populate(); - this.hpager.populate(); - var vShow = false, hShow = false; - if (!this.hasHNext() && !this.hasHPrev()) { - this.setHPagerVisible(false); - } else { - this.setHPagerVisible(true); - hShow = true; - } - if (!this.hasVNext() && !this.hasVPrev()) { - this.setVPagerVisible(false); - } else { - this.setVPagerVisible(true); - vShow = true; - } - this.setVisible(hShow || vShow); - var num = [74, 111, -9, 28]; - var items = this.layout.attr("items"); - - if (vShow === true && hShow === true) { - items[0].right = num[0]; - items[1].right = num[1]; - items[2].right = num[2]; - items[3].right = num[3]; - } else if (vShow === true) { - items[0].right = num[2]; - items[1].right = num[3]; - } else if (hShow === true) { - items[2].right = num[2]; - items[3].right = num[3]; - } - this.layout.attr("items", items); - this.layout.resize(); - }, - - clear: function () { - this.vpager.attr("curr", 1); - this.hpager.attr("curr", 1); - } -}); -BI.DirectionPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.direction_pager", BI.DirectionPager);/** - * 分页控件 - * - * Created by GUY on 2015/8/31. - * @class BI.DetailPager - * @extends BI.Widget - */ -BI.DetailPager = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-detail-pager", - behaviors: {}, - layouts: [{ - type: "bi.horizontal", - hgap: 10, - vgap: 0 - }], - - dynamicShow: true, //是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态 - //dynamicShow为false时以下两个有用 - dynamicShowFirstLast: false,//是否动态显示首页、尾页 - dynamicShowPrevNext: false,//是否动态显示上一页、下一页 - pages: false, //总页数 - curr: function () { - return 1; - }, //初始化当前页 - groups: 0, //连续显示分页数 - jump: BI.emptyFn, //分页的回调函数 - - first: false, //是否显示首页 - last: false, //是否显示尾页 - prev: "上一页", - next: "下一页", - - firstPage: 1, - lastPage: function () { //在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法 - return 1; - }, - hasPrev: BI.emptyFn, //pages不可用时有效 - hasNext: BI.emptyFn //pages不可用时有效 - }) - }, - _init: function () { - BI.DetailPager.superclass._init.apply(this, arguments); - var self = this; - this.currPage = BI.result(this.options, "curr"); - //翻页太灵敏 - this._lock = false; - this._debouce = BI.debounce(function () { - self._lock = false; - }, 300); - this._populate(); - }, - - _populate: function () { - var self = this, o = this.options, view = [], dict = {}; - this.empty(); - var pages = BI.result(o, "pages"); - var curr = BI.result(this, "currPage"); - var groups = BI.result(o, "groups"); - var first = BI.result(o, "first"); - var last = BI.result(o, "last"); - var prev = BI.result(o, "prev"); - var next = BI.result(o, "next"); - - if (pages === false) { - groups = 0; - first = false; - last = false; - } else { - groups > pages && (groups = pages); - } - - //计算当前组 - dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups)); - - //当前页非首页,则输出上一页 - if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) { - if (BI.isKey(prev)) { - view.push({ - text: prev, - value: "prev", - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }) - } else { - view.push(BI.extend({ - disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false) - }, prev)); - } - } - - //当前组非首组,则输出首页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) { - view.push({ - text: first, - value: "first", - disabled: !(dict.index > 1 && groups !== 0) - }); - if (dict.index > 1 && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - } - - //输出当前页组 - dict.poor = Math.floor((groups - 1) / 2); - dict.start = dict.index > 1 ? curr - dict.poor : 1; - dict.end = dict.index > 1 ? (function () { - var max = curr + (groups - dict.poor - 1); - return max > pages ? pages : max; - }()) : groups; - if (dict.end - dict.start < groups - 1) { //最后一组状态 - dict.start = dict.end - groups + 1; - } - var s = dict.start, e = dict.end; - if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) { - s++; - e--; - } - for (; s <= e; s++) { - if (s === curr) { - view.push({ - text: s, - value: s, - selected: true - }) - } else { - view.push({ - text: s, - value: s - }) - } - } - - //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 - if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) { - if (pages > groups && dict.end < pages && groups !== 0) { - view.push({ - type: "bi.label", - cls: "page-ellipsis", - text: "\u2026" - }); - } - view.push({ - text: last, - value: "last", - disabled: !(pages > groups && dict.end < pages && groups !== 0) - }) - } - - //当前页不为尾页时,输出下一页 - dict.flow = !prev && groups === 0; - if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) { - view.push((function () { - if (BI.isKey(next)) { - if (pages === false) { - return {text: next, value: "next", disabled: o.hasNext(curr) === false} - } - return (dict.flow && curr === pages) - ? - {text: next, value: "next", disabled: true} - : - {text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)}; - } else { - return BI.extend({ - disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow) - }, next); - } - }())); - } - - this.button_group = BI.createWidget({ - type: "bi.button_group", - element: this, - items: BI.createItems(view, { - cls: "page-item bi-border bi-list-item-active", - height: 23, - hgap: 10 - }), - behaviors: o.behaviors, - layouts: o.layouts - }); - this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (self._lock === true) { - return; - } - self._lock = true; - self._debouce(); - if (type === BI.Events.CLICK) { - var v = self.button_group.getValue()[0]; - switch (v) { - case "first": - self.currPage = 1; - break; - case "last": - self.currPage = pages; - break; - case "prev": - self.currPage--; - break; - case "next": - self.currPage++; - break; - default: - self.currPage = v; - break; - } - o.jump.apply(self, [{ - pages: pages, - curr: self.currPage - }]); - self._populate(); - self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE); - }, - - getCurrentPage: function () { - return this.currPage; - }, - - setAllPages: function (pages) { - this.options.pages = pages; - }, - - hasPrev: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasPrev(v) : v > 1; - }, - - hasNext: function (v) { - v || (v = 1); - var o = this.options; - var pages = this.options.pages; - return pages === false ? o.hasNext(v) : v < pages; - }, - - setValue: function (v) { - var o = this.options; - v = v | 0; - v = v < 1 ? 1 : v; - if (o.pages === false) { - var lastPage = BI.result(o, "lastPage"), firstPage = 1; - this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, "firstPage")), (v < firstPage ? firstPage : v)); - } else { - v = v > o.pages ? o.pages : v; - this.currPage = v; - } - this._populate(); - }, - - getValue: function () { - var val = this.button_group.getValue()[0]; - switch (val) { - case "prev": - return -1; - case "next": - return 1; - case "first": - return BI.MIN; - case "last": - return BI.MAX; - default : - return val; - } - }, - - attr: function (key, value) { - BI.DetailPager.superclass.attr.apply(this, arguments); - if (key === "curr") { - this.currPage = BI.result(this.options, "curr"); - } - }, - - populate: function () { - this._populate(); - } -}); -BI.DetailPager.EVENT_CHANGE = "EVENT_CHANGE"; -BI.DetailPager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE"; -BI.shortcut("bi.detail_pager", BI.DetailPager);/** - * 分段控件使用的button - * - * Created by GUY on 2015/9/7. - * @class BI.SegmentButton - * @extends BI.BasicButton - */ -BI.SegmentButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function () { - var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active', - shadow: true, - readonly: true, - hgap: 5 - }) - }, - - _init: function () { - BI.SegmentButton.superclass._init.apply(this, arguments); - var opts = this.options, self = this; - //if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) { - // this.element.css({lineHeight : (opts.height - 2) + 'px'}); - //} - this.text = BI.createWidget({ - type: "bi.label", - element: this, - height: opts.height - 2, - whiteSpace: opts.whiteSpace, - text: opts.text, - value: opts.value, - hgap: opts.hgap - }) - }, - - setSelected: function () { - BI.SegmentButton.superclass.setSelected.apply(this, arguments); - }, - - setText: function (text) { - BI.SegmentButton.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - destroy: function () { - BI.SegmentButton.superclass.destroy.apply(this, arguments); - } -}); -BI.shortcut('bi.segment_button', BI.SegmentButton);/** - * 单选按钮组 - * - * Created by GUY on 2015/9/7. - * @class BI.Segment - * @extends BI.Widget - */ -BI.Segment = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-segment", - items: [], - height: 30 - }); - }, - _init: function () { - BI.Segment.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.buttonGroup = BI.createWidget({ - element: this, - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.segment_button", - height: o.height - 2, - whiteSpace: o.whiteSpace - }), - layout: [ - { - type: "bi.center" - } - ] - }) - this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) - }); - this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { - self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj) - }) - }, - - setValue: function (v) { - this.buttonGroup.setValue(v); - }, - - setEnabledValue: function (v) { - this.buttonGroup.setEnabledValue(v); - }, - - getValue: function () { - return this.buttonGroup.getValue(); - } -}); -BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut('bi.segment', BI.Segment);/** - * 自适应宽度的表格 - * - * Created by GUY on 2016/2/3. - * @class BI.AdaptiveTable - * @extends BI.Widget - */ -BI.AdaptiveTable = BI.inherit(BI.Widget, { - - _const: { - perColumnSize: 100 - }, - - _defaultConfig: function () { - return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-adaptive-table", - el: { - type: "bi.resizable_table" - }, - isNeedResize: true, - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为true时生效 - - isNeedMerge: false,//是否需要合并单元格 - mergeCols: [], //合并的单元格列号 - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - header: [], - items: [], //二维数组 - - //交叉表头 - crossHeader: [], - crossItems: [] - }); - }, - - _init: function () { - BI.AdaptiveTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: false, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: data.columnSize, - - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: data.regionColumnSize, - - header: o.header, - items: o.items, - //交叉表头 - crossHeader: o.crossHeader, - crossItems: o.crossItems - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - self._populate(); - self.table.populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.columnSize = this.getColumnSize(); - self._populate(); - self.table.populate(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _getFreezeColLength: function () { - return this.options.isNeedFreeze === true ? this.options.freezeCols.length : 0; - }, - - _digest: function () { - var o = this.options; - var columnSize = o.columnSize.slice(); - var regionColumnSize = o.regionColumnSize.slice(); - var freezeCols = o.freezeCols.slice(); - var regionSize = o.regionColumnSize[0]; - var freezeColLength = this._getFreezeColLength(); - if (!regionSize || regionSize > o.width - 10 || regionSize < 10) { - regionSize = (freezeColLength > o.columnSize.length / 2 ? 2 / 3 : 1 / 3) * o.width; - } - if (freezeColLength === 0) { - regionSize = 0; - } - if (freezeCols.length >= columnSize.length) { - freezeCols = []; - } - if (!BI.isNumber(columnSize[0])) { - columnSize = o.minColumnSize.slice(); - } - var summaryFreezeColumnSize = 0, summaryColumnSize = 0; - BI.each(columnSize, function (i, size) { - if (i < freezeColLength) { - summaryFreezeColumnSize += size; - } - summaryColumnSize += size; - }); - if (freezeColLength > 0) { - columnSize[freezeColLength - 1] = BI.clamp(regionSize - (summaryFreezeColumnSize - columnSize[freezeColLength - 1]), - o.minColumnSize[freezeColLength - 1] || 10, o.maxColumnSize[freezeColLength - 1] || Number.MAX_VALUE); - } - if (columnSize.length > 0) { - columnSize[columnSize.length - 1] = BI.clamp(o.width - BI.GridTableScrollbar.SIZE - regionSize - (summaryColumnSize - summaryFreezeColumnSize - columnSize[columnSize.length - 1]), - o.minColumnSize[columnSize.length - 1] || 10, o.maxColumnSize[columnSize.length - 1] || Number.MAX_VALUE); - } - regionColumnSize[0] = regionSize; - - return { - freezeCols: freezeCols, - columnSize: columnSize, - regionColumnSize: regionColumnSize - } - }, - - _populate: function () { - var o = this.options; - var data = this._digest(); - o.regionColumnSize = data.regionColumnSize; - o.columnSize = data.columnSize; - this.table.setColumnSize(data.columnSize); - this.table.setRegionColumnSize(data.regionColumnSize); - this.table.attr("freezeCols", data.freezeCols); - }, - - setWidth: function (width) { - BI.AdaptiveTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.AdaptiveTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (regionColumnSize) { - this.options.regionColumnSize = regionColumnSize; - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var v = BI.AdaptiveTable.superclass.attr.apply(this, arguments); - if (key === "freezeCols") { - return v; - } - return this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items) { - var self = this, o = this.options; - this._populate(); - this.table.populate.apply(this.table, arguments); - }, - - destroy: function () { - this.table.destroy(); - BI.AdaptiveTable.superclass.destroy.apply(this, arguments); - } -}); -BI.shortcut('bi.adaptive_table', BI.AdaptiveTable);/** - * - * 层级树状结构的表格 - * - * Created by GUY on 2016/8/12. - * @class BI.DynamicSummaryLayerTreeTable - * @extends BI.Widget - */ -BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dynamic-summary-layer-tree-table", - - el: { - type: "bi.resizable_table" - }, - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - //行表头 - rowHeaderCreator: null, - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - footer: false, - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _createHeader: function (vDeep) { - var self = this, o = this.options; - var header = o.header || [], crossHeader = o.crossHeader || []; - var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); - var result = []; - BI.each(items, function (row, node) { - var c = [crossHeader[row]]; - result.push(c.concat(node || [])); - }); - if (header && header.length > 0) { - var newHeader = this._formatColumns(header); - var deep = this._getHDeep(); - if (deep <= 0) { - newHeader.unshift(o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }); - } else { - newHeader[0] = o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }; - } - result.push(newHeader); - } - return result; - }, - - _formatItems: function (nodes, header, deep) { - var self = this, o = this.options; - var result = []; - - function track(node, layer) { - node.type || (node.type = "bi.layer_tree_table_cell"); - node.layer = layer; - var next = [node]; - next = next.concat(node.values || []); - if (next.length > 0) { - result.push(next); - } - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child, layer + 1); - }); - } - } - - BI.each(nodes, function (i, node) { - BI.each(node.children, function (j, c) { - track(c, 0); - }); - if (BI.isArray(node.values)) { - var next = [{ - type: "bi.table_style_cell", - text: BI.i18nText("BI-Summary_Values"), - styleGetter: function () { - return o.summaryCellStyleGetter(true); - } - }].concat(node.values); - result.push(next) - } - }); - return BI.DynamicSummaryTreeTable.formatSummaryItems(result, header, o.crossItems, 1); - }, - - _formatColumns: function (columns, deep) { - if (BI.isNotEmptyArray(columns)) { - deep = deep || this._getHDeep(); - return columns.slice(Math.max(0, deep - 1)); - } - return columns; - }, - - _formatFreezeCols: function () { - if (this.options.freezeCols.length > 0) { - return [0]; - } - return []; - }, - - _formatColumnSize: function (columnSize, deep) { - if (columnSize.length <= 0) { - return []; - } - var result = [0]; - deep = deep || this._getHDeep(); - BI.each(columnSize, function (i, size) { - if (i < deep) { - result[0] += size; - return; - } - result.push(size); - }); - return result; - }, - - _recomputeColumnSize: function () { - var o = this.options; - o.regionColumnSize = this.table.getRegionColumnSize(); - var columnSize = this.table.getColumnSize().slice(); - if (o.freezeCols.length > 1) { - for (var i = 0; i < o.freezeCols.length - 1; i++) { - columnSize.splice(1, 0, 0); - } - } - o.columnSize = columnSize; - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = this._createHeader(vDeep); - var data = this._formatItems(o.items, header, deep); - var columnSize = o.columnSize.slice(); - var minColumnSize = o.minColumnSize.slice(); - var maxColumnSize = o.maxColumnSize.slice(); - BI.removeAt(columnSize, data.deletedCols); - BI.removeAt(minColumnSize, data.deletedCols); - BI.removeAt(maxColumnSize, data.deletedCols); - return { - header: data.header, - items: data.items, - columnSize: this._formatColumnSize(columnSize, deep), - minColumnSize: this._formatColumns(minColumnSize, deep), - maxColumnSize: this._formatColumns(maxColumnSize, deep), - freezeCols: this._formatFreezeCols() - } - }, - - _init: function () { - BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: [], - mergeRule: o.mergeRule, - columnSize: data.columnSize, - minColumnSize: data.minColumnSize, - maxColumnSize: data.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - regionColumnSize: o.regionColumnSize, - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - self._recomputeColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - self._recomputeColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - setWidth: function (width) { - BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var self = this; - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self.attr(k, v); - }); - return; - } - BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "columnSize": - case "minColumnSize": - case "maxColumnSize": - case "freezeCols": - case "mergeCols": - return; - } - this.table.attr.apply(this.table, [key, value]); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.attr("freezeCols", data.freezeCols); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.shortcut("bi.dynamic_summary_layer_tree_table", BI.DynamicSummaryLayerTreeTable);/** - * - * 树状结构的表格 - * - * Created by GUY on 2015/8/12. - * @class BI.DynamicSummaryTreeTable - * @extends BI.Widget - */ -BI.DynamicSummaryTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dynamic-summary-tree-table", - el: { - type: "bi.resizable_table" - }, - - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - footerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - footer: false, - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _init: function () { - BI.DynamicSummaryTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: o.columnSize, - minColumnSize: o.minColumnSize, - maxColumnSize: o.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: o.regionColumnSize, - - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - var columnSize = this.getColumnSize(); - var length = o.columnSize.length - columnSize.length; - o.columnSize = columnSize.slice(); - o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - var columnSize = this.getColumnSize(); - var length = o.columnSize.length - columnSize.length; - o.columnSize = columnSize.slice(); - o.columnSize = o.columnSize.concat(BI.makeArray(length, 0)); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); - var items = BI.DynamicSummaryTreeTable.formatHorizontalItems(o.items, deep, false, o.summaryCellStyleGetter); - var data = BI.DynamicSummaryTreeTable.formatSummaryItems(items, header, o.crossItems, deep); - var columnSize = o.columnSize.slice(); - var minColumnSize = o.minColumnSize.slice(); - var maxColumnSize = o.maxColumnSize.slice(); - BI.removeAt(columnSize, data.deletedCols); - BI.removeAt(minColumnSize, data.deletedCols); - BI.removeAt(maxColumnSize, data.deletedCols); - return { - header: data.header, - items: data.items, - columnSize: columnSize, - minColumnSize: minColumnSize, - maxColumnSize: maxColumnSize - }; - }, - - setWidth: function (width) { - BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - return this.options.columnSize; - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key) { - BI.DynamicSummaryTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "minColumnSize": - case "maxColumnSize": - return; - } - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.DynamicSummaryTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.extend(BI.DynamicSummaryTreeTable, { - - formatHorizontalItems: function (nodes, deep, isCross, styleGetter) { - var result = []; - - function track(store, node) { - var next; - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - var next; - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - track(next, child); - }); - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - if ((store == -1 || node.children.length > 1) && BI.isNotEmptyArray(node.values)) { - var summary = { - text: BI.i18nText("BI-Summary_Values"), - type: "bi.table_style_cell", - styleGetter: function () { - return styleGetter(store === -1) - } - }; - for (var i = next.length; i < deep; i++) { - next.push(summary); - } - if (!isCross) { - next = next.concat(node.values); - } - if (next.length > 0) { - if (!isCross) { - result.push(next); - } else { - for (var k = 0, l = node.values.length; k < l; k++) { - result.push(next); - } - } - } - } - return; - } - if (store != -1) { - next = store.slice(); - for (var i = next.length; i < deep; i++) { - next.push(node); - } - } else { - next = []; - } - if (!isCross && BI.isArray(node.values)) { - next = next.concat(node.values); - } - if (isCross && BI.isArray(node.values)) { - for (var i = 0, len = node.values.length; i < len - 1; i++) { - if (next.length > 0) { - result.push(next); - } - } - } - if (next.length > 0) { - result.push(next); - } - } - - BI.each(nodes, function (i, node) { - track(-1, node); - }); - //填充空位 - BI.each(result, function (i, line) { - var last = BI.last(line); - for (var j = line.length; j < deep; j++) { - line.push(last); - } - }); - return result; - }, - - formatSummaryItems: function (items, header, crossItems, deep) { - //求纵向需要去除的列 - var cols = []; - var leaf = 0; - - function track(node) { - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child); - }); - if (BI.isNotEmptyArray(node.values)) { - if (node.children.length === 1) { - for (var i = 0; i < node.values.length; i++) { - cols.push(leaf + i + deep); - } - } - leaf += node.values.length; - } - return; - } - if (node.values && node.values.length > 1) { - leaf += node.values.length; - } else { - leaf++; - } - } - - BI.each(crossItems, function (i, node) { - track(node); - }); - - if (cols.length > 0) { - var nHeader = [], nItems = []; - BI.each(header, function (i, node) { - var nNode = node.slice(); - BI.removeAt(nNode, cols); - nHeader.push(nNode); - }); - BI.each(items, function (i, node) { - var nNode = node.slice(); - BI.removeAt(nNode, cols); - nItems.push(nNode);; - }); - header = nHeader; - items = nItems; - } - return {items: items, header: header, deletedCols: cols}; - } -}); - -BI.shortcut("bi.dynamic_summary_tree_table", BI.DynamicSummaryTreeTable);/** - * Created by GUY on 2016/5/7. - * @class BI.LayerTreeTableCell - * @extends BI.Single - */ -BI.LayerTreeTableCell = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-layer-tree-table-cell", - layer: 0, - text: "" - }) - }, - - _init: function () { - BI.LayerTreeTableCell.superclass._init.apply(this, arguments); - var o = this.options; - BI.createWidget({ - type: "bi.label", - element: this.element, - textAlign: "left", - whiteSpace: "nowrap", - height: o.height, - text: o.text, - value: o.value, - lgap: 5 + 30 * o.layer, - rgap: 5 - }) - } -}); - -BI.shortcut("bi.layer_tree_table_cell", BI.LayerTreeTableCell);/** - * - * 层级树状结构的表格 - * - * Created by GUY on 2016/5/7. - * @class BI.LayerTreeTable - * @extends BI.Widget - */ -BI.LayerTreeTable = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-layer-tree-table", - el: { - type: "bi.resizable_table" - }, - - isNeedResize: false,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - isNeedFreeze: false,//是否需要冻结单元格 - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - rowHeaderCreator: null, - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _createHeader: function (vDeep) { - var self = this, o = this.options; - var header = o.header || [], crossHeader = o.crossHeader || []; - var items = BI.TableTree.formatCrossItems(o.crossItems, vDeep, o.headerCellStyleGetter); - var result = []; - BI.each(items, function (row, node) { - var c = [crossHeader[row]]; - result.push(c.concat(node || [])); - }); - if (header && header.length > 0) { - var newHeader = this._formatColumns(header); - var deep = this._getHDeep(); - if (deep <= 0) { - newHeader.unshift(o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }); - } else { - newHeader[0] = o.rowHeaderCreator || { - type: "bi.table_style_cell", - text: BI.i18nText("BI-Row_Header"), - styleGetter: o.headerCellStyleGetter - }; - } - result.push(newHeader); - } - return result; - }, - - _formatItems: function (nodes) { - var self = this, o = this.options; - var result = []; - - function track(node, layer) { - node.type || (node.type = "bi.layer_tree_table_cell"); - node.layer = layer; - var next = [node]; - next = next.concat(node.values || []); - if (next.length > 0) { - result.push(next); - } - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - track(child, layer + 1); - }); - } - } - - BI.each(nodes, function (i, node) { - BI.each(node.children, function (j, c) { - track(c, 0); - }); - if (BI.isArray(node.values)) { - var next = [{ - type: "bi.table_style_cell", text: BI.i18nText("BI-Summary_Values"), styleGetter: function () { - return o.summaryCellStyleGetter(true); - } - }].concat(node.values); - result.push(next) - } - }); - return result; - }, - - _formatColumns: function (columns, deep) { - if (BI.isNotEmptyArray(columns)) { - deep = deep || this._getHDeep(); - return columns.slice(Math.max(0, deep - 1)); - } - return columns; - }, - - _formatFreezeCols: function () { - if (this.options.freezeCols.length > 0) { - return [0]; - } - return []; - }, - - _formatColumnSize: function (columnSize, deep) { - if (columnSize.length <= 0) { - return []; - } - var result = [0]; - deep = deep || this._getHDeep(); - BI.each(columnSize, function (i, size) { - if (i < deep) { - result[0] += size; - return; - } - result.push(size); - }); - return result; - }, - - _digest: function () { - var o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - return { - header: this._createHeader(vDeep), - items: this._formatItems(o.items), - columnSize: this._formatColumnSize(o.columnSize, deep), - minColumnSize: this._formatColumns(o.minColumnSize, deep), - maxColumnSize: this._formatColumns(o.maxColumnSize, deep), - freezeCols: this._formatFreezeCols() - } - }, - - _init: function () { - BI.LayerTreeTable.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - isNeedFreeze: o.isNeedFreeze, - freezeCols: data.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: [], - mergeRule: o.mergeRule, - columnSize: data.columnSize, - minColumnSize: data.minColumnSize, - maxColumnSize: data.maxColumnSize, - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - regionColumnSize: o.regionColumnSize, - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - setWidth: function (width) { - BI.LayerTreeTable.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.LayerTreeTable.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - }, - - getColumnSize: function () { - var columnSize = this.table.getColumnSize(); - var deep = this._getHDeep(); - var pre = []; - if (deep > 0) { - pre = BI.makeArray(deep, columnSize[0] / deep); - } - return pre.concat(columnSize.slice(1)); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function (key, value) { - var self = this; - if (BI.isObject(key)) { - BI.each(key, function (k, v) { - self.attr(k, v); - }); - return; - } - BI.LayerTreeTable.superclass.attr.apply(this, arguments); - switch (key) { - case "columnSize": - case "minColumnSize": - case "maxColumnSize": - case "freezeCols": - case "mergeCols": - return; - } - this.table.attr.apply(this.table, [key, value]); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - o.items = items || []; - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.setColumnSize(data.columnSize); - this.table.attr("freezeCols", data.freezeCols); - this.table.attr("minColumnSize", data.minColumnSize); - this.table.attr("maxColumnSize", data.maxColumnSize); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.LayerTreeTable.superclass.destroy.apply(this, arguments); - } -}); - -BI.shortcut("bi.layer_tree_table", BI.LayerTreeTable);/** - * - * Created by GUY on 2016/5/26. - * @class BI.TableStyleCell - * @extends BI.Single - */ -BI.TableStyleCell = BI.inherit(BI.Single, { - - _defaultConfig: function () { - return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-style-cell", - styleGetter: BI.emptyFn - }); - }, - - _init: function () { - BI.TableStyleCell.superclass._init.apply(this, arguments); - var o = this.options; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - textAlign: "left", - forceCenter: true, - hgap: 5, - text: o.text - }); - this._digestStyle(); - }, - - _digestStyle: function () { - var o = this.options; - var style = o.styleGetter(); - if (style) { - this.text.element.css(style); - } - }, - - setText: function (text) { - this.text.setText(text); - }, - - populate: function () { - this._digestStyle(); - } -}); -BI.shortcut('bi.table_style_cell', BI.TableStyleCell);/** - * - * 树状结构的表格 - * - * Created by GUY on 2015/9/22. - * @class BI.TableTree - * @extends BI.Widget - */ -BI.TableTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-table-tree", - el: { - type: "bi.resizable_table" - }, - isNeedResize: true,//是否需要调整列宽 - isResizeAdapt: true,//是否需要在调整列宽或区域宽度的时候它们自适应变化 - - freezeCols: [], //冻结的列号,从0开始,isNeedFreeze为tree时生效 - - isNeedMerge: true,//是否需要合并单元格 - mergeCols: [], - mergeRule: BI.emptyFn, - - columnSize: [], - minColumnSize: [], - maxColumnSize: [], - headerRowSize: 25, - rowSize: 25, - - regionColumnSize: [], - - headerCellStyleGetter: BI.emptyFn, - summaryCellStyleGetter: BI.emptyFn, - sequenceCellStyleGetter: BI.emptyFn, - - header: [], - items: [], - - //交叉表头 - crossHeader: [], - crossItems: [] - }) - }, - - _getVDeep: function () { - return this.options.crossHeader.length;//纵向深度 - }, - - _getHDeep: function () { - var o = this.options; - return Math.max(o.mergeCols.length, o.freezeCols.length, BI.TableTree.maxDeep(o.items) - 1); - }, - - _init: function () { - BI.TableTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var data = this._digest(); - this.table = BI.createWidget(o.el, { - type: "bi.resizable_table", - element: this, - width: o.width, - height: o.height, - isNeedResize: o.isNeedResize, - isResizeAdapt: o.isResizeAdapt, - - isNeedFreeze: o.isNeedFreeze, - freezeCols: o.freezeCols, - isNeedMerge: o.isNeedMerge, - mergeCols: o.mergeCols, - mergeRule: o.mergeRule, - - columnSize: o.columnSize, - minColumnSize: o.minColumnSize, - maxColumnSize: o.maxColumnSize, - - headerRowSize: o.headerRowSize, - rowSize: o.rowSize, - - regionColumnSize: o.regionColumnSize, - - header: data.header, - items: data.items - }); - this.table.on(BI.Table.EVENT_TABLE_SCROLL, function () { - self.fireEvent(BI.Table.EVENT_TABLE_SCROLL, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE, arguments); - }); - this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, function () { - o.regionColumnSize = this.getRegionColumnSize(); - o.columnSize = this.getColumnSize(); - self.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE, arguments); - }); - }, - - _digest: function () { - var self = this, o = this.options; - var deep = this._getHDeep(); - var vDeep = this._getVDeep(); - var header = BI.TableTree.formatHeader(o.header, o.crossHeader, o.crossItems, deep, vDeep, o.headerCellStyleGetter); - var items = BI.TableTree.formatItems(o.items, deep, false, o.summaryCellStyleGetter); - return { - header: header, - items: items - } - }, - - setWidth: function (width) { - BI.TableTree.superclass.setWidth.apply(this, arguments); - this.table.setWidth(width); - }, - - setHeight: function (height) { - BI.TableTree.superclass.setHeight.apply(this, arguments); - this.table.setHeight(height); - }, - - setColumnSize: function (columnSize) { - this.options.columnSize = columnSize; - this.table.setColumnSize(columnSize); - }, - - getColumnSize: function () { - return this.table.getColumnSize(); - }, - - setRegionColumnSize: function (columnSize) { - this.options.regionColumnSize = columnSize; - this.table.setRegionColumnSize(columnSize); - }, - - getRegionColumnSize: function () { - return this.table.getRegionColumnSize(); - }, - - setVerticalScroll: function (scrollTop) { - this.table.setVerticalScroll(scrollTop); - }, - - setLeftHorizontalScroll: function (scrollLeft) { - this.table.setLeftHorizontalScroll(scrollLeft); - }, - - setRightHorizontalScroll: function (scrollLeft) { - this.table.setRightHorizontalScroll(scrollLeft); - }, - - getVerticalScroll: function () { - return this.table.getVerticalScroll(); - }, - - getLeftHorizontalScroll: function () { - return this.table.getLeftHorizontalScroll(); - }, - - getRightHorizontalScroll: function () { - return this.table.getRightHorizontalScroll(); - }, - - attr: function () { - BI.TableTree.superclass.attr.apply(this, arguments); - this.table.attr.apply(this.table, arguments); - }, - - restore: function () { - this.table.restore(); - }, - - populate: function (items, header, crossItems, crossHeader) { - var o = this.options; - if (items) { - o.items = items || []; - } - if (header) { - o.header = header; - } - if (crossItems) { - o.crossItems = crossItems; - } - if (crossHeader) { - o.crossHeader = crossHeader; - } - var data = this._digest(); - this.table.populate(data.items, data.header); - }, - - destroy: function () { - this.table.destroy(); - BI.TableTree.superclass.destroy.apply(this, arguments); - } -}); - -BI.extend(BI.TableTree, { - formatHeader: function (header, crossHeader, crossItems, hDeep, vDeep, styleGetter) { - var items = BI.TableTree.formatCrossItems(crossItems, vDeep, styleGetter); - var result = []; - for (var i = 0; i < vDeep; i++) { - var c = []; - for (var j = 0; j < hDeep; j++) { - c.push(crossHeader[i]); - } - result.push(c.concat(items[i] || [])); - } - if (header && header.length > 0) { - result.push(header); - } - return result; - }, - - formatItems: function (nodes, deep, isCross, styleGetter) { - var self = this; - var result = []; - - function track(store, node) { - var next; - if (BI.isArray(node.children)) { - BI.each(node.children, function (index, child) { - var next; - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - track(next, child); - }); - if (store != -1) { - next = store.slice(); - next.push(node); - } else { - next = []; - } - if (/**(store == -1 || node.children.length > 1) &&**/ BI.isNotEmptyArray(node.values)) { - var summary = { - text: BI.i18nText("BI-Summary_Values"), - type: "bi.table_style_cell", - styleGetter: function () { - return styleGetter(store === -1) - } - }; - for (var i = next.length; i < deep; i++) { - next.push(summary); - } - if (!isCross) { - next = next.concat(node.values); - } - if (next.length > 0) { - if (!isCross) { - result.push(next); - } else { - for (var k = 0, l = node.values.length; k < l; k++) { - result.push(next); - } - } - } - } - - return; - } - if (store != -1) { - next = store.slice(); - for (var i = next.length; i < deep; i++) { - next.push(node); - } - } else { - next = []; - } - if (!isCross && BI.isArray(node.values)) { - next = next.concat(node.values); - } - if (isCross && BI.isArray(node.values)) { - for (var i = 0, len = node.values.length; i < len - 1; i++) { - if (next.length > 0) { - result.push(next); - } - } - } - if (next.length > 0) { - result.push(next); - } - } - - BI.each(nodes, function (i, node) { - track(-1, node); - }); - //填充空位 - BI.each(result, function (i, line) { - var last = BI.last(line); - for (var j = line.length; j < deep; j++) { - line.push(last); - } - }); - return result; - }, - - formatCrossItems: function (nodes, deep, styleGetter) { - var items = BI.TableTree.formatItems(nodes, deep, true, styleGetter); - return BI.unzip(items); - }, - - maxDeep: function (nodes) { - function track(deep, node) { - var d = deep; - if (BI.isNotEmptyArray(node.children)) { - BI.each(node.children, function (index, child) { - d = Math.max(d, track(deep + 1, child)); - }); - } - return d; - } - - var deep = 1; - if (BI.isObject(nodes)) { - BI.each(nodes, function (i, node) { - deep = Math.max(deep, track(1, node)); - }); - } - return deep; - } -}); - -BI.shortcut("bi.tree_table", BI.TableTree);/** - * guy - * 复选导航条 - * Created by GUY on 2015/8/25. - * @class BI.MultiSelectBar - * @extends BI.BasicButton - */ -BI.MultiSelectBar = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-multi-select-bar", - height: 25, - text: BI.i18nText('BI-Select_All'), - isAllCheckedBySelectedValue: BI.emptyFn, - //手动控制选中 - disableSelected: true, - isHalfCheckedBySelectedValue: function (selectedValues) { - return selectedValues.length > 0; - } - }) - }, - _init: function () { - BI.MultiSelectBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.checkbox = BI.createWidget({ - type: "bi.checkbox", - stopPropagation: true, - handler: function () { - self.setSelected(self.isSelected()); - } - }); - this.half = BI.createWidget({ - type: "bi.half_icon_button", - stopPropagation: true, - handler: function () { - self.setSelected(true); - } - }); - this.checkbox.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); - }); - this.half.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self); - }); - this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () { - self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); - }); - this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () { - self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self); - }); - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - width: 36, - el: { - type: "bi.center_adapt", - items: [this.checkbox, this.half] - } - }, { - el: this.text - }] - }); - this.half.invisible(); - }, - - //自己手动控制选中 - beforeClick: function () { - var isHalf = this.isHalfSelected(), isSelected = this.isSelected(); - if (isHalf === true) { - this.setSelected(true); - } else { - this.setSelected(!isSelected); - } - }, - - setSelected: function (v) { - this.checkbox.setSelected(v); - this.setHalfSelected(false); - }, - - setHalfSelected: function (b) { - this._half = !!b; - if (b === true) { - this.half.visible(); - this.checkbox.invisible(); - } else { - this.half.invisible(); - this.checkbox.visible(); - } - }, - - isHalfSelected: function () { - return !!this._half; - }, - - isSelected: function () { - return this.checkbox.isSelected(); - }, - - setValue: function (selectedValues) { - BI.MultiSelectBar.superclass.setValue.apply(this, arguments); - var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments); - this.setSelected(isAllChecked); - !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments)); - } -}); -BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE"; -BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);/** - * 倒立的Branch - * @class BI.HandStandBranchExpander - * @extend BI.Widget - * create by young - */ -BI.HandStandBranchExpander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-handstand-branch-expander", - direction: BI.Direction.Top, - logic: { - dynamic: true - }, - el: {type: "bi.label"}, - popup: {} - }) - }, - - _init: function () { - BI.HandStandBranchExpander.superclass._init.apply(this, arguments); - var o = this.options; - this._initExpander(); - this._initBranchView(); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, { - type: "bi.center_adapt", - items: [this.expander] - }, this.branchView) - })))); - }, - - _initExpander: function () { - var self = this, o = this.options; - this.expander = BI.createWidget(o.el); - this.expander.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - _initBranchView: function () { - var self = this, o = this.options; - this.branchView = BI.createWidget(o.popup, {}); - this.branchView.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function (items) { - this.branchView.populate.apply(this.branchView, arguments); - }, - - getValue: function () { - return this.branchView.getValue(); - } -}); -BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/** - * @class BI.BranchExpander - * @extend BI.Widget - * create by young - */ -BI.BranchExpander = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-expander", - direction: BI.Direction.Left, - logic: { - dynamic: true - }, - el: {}, - popup: {} - }) - }, - - _init: function () { - BI.BranchExpander.superclass._init.apply(this, arguments); - var o = this.options; - this._initExpander(); - this._initBranchView(); - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView) - })))); - }, - - _initExpander: function () { - var self = this, o = this.options; - this.expander = BI.createWidget(o.el, { - type: "bi.label", - width: 30, - height: "100%" - }); - this.expander.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - _initBranchView: function () { - var self = this, o = this.options; - this.branchView = BI.createWidget(o.popup, {}); - this.branchView.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function (items) { - this.branchView.populate.apply(this.branchView, arguments); - }, - - getValue: function () { - return this.branchView.getValue(); - } -}); -BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.branch_expander", BI.BranchExpander);/** - * @class BI.HandStandBranchTree - * @extends BI.Widget - * create by young - * 横向分支的树 - */ -BI.HandStandBranchTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-handstand-branch-tree", - expander: {}, - el: {}, - items: [] - }) - }, - _init: function () { - BI.HandStandBranchTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.branchTree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - type: "bi.handstand_branch_expander", - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - el: BI.extend({ - type: "bi.button_tree", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - layouts: [{ - type: "bi.horizontal_adapt" - }] - }, o.el), - items: this.options.items - }); - this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ - self.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE, arguments); - }); - this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function () { - this.branchTree.populate.apply(this.branchTree, arguments); - }, - - getValue: function () { - return this.branchTree.getValue(); - } -}); -BI.HandStandBranchTree.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.handstand_branch_tree", BI.HandStandBranchTree);/** - * @class BI.BranchTree - * @extends BI.Widget - * create by young - * 横向分支的树 - */ -BI.BranchTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-tree", - expander: {}, - el: {}, - items: [] - }) - }, - _init: function () { - BI.BranchTree.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.branchTree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - type: "bi.branch_expander", - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - el: BI.extend({ - type: "bi.button_tree", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - layouts: [{ - type: "bi.vertical" - }] - }, o.el), - items: this.options.items - }); - this.branchTree.on(BI.CustomTree.EVENT_CHANGE, function(){ - self.fireEvent(BI.BranchTree.EVENT_CHANGE, arguments); - }); - this.branchTree.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - }, - - populate: function () { - this.branchTree.populate.apply(this.branchTree, arguments); - }, - - getValue: function () { - return this.branchTree.getValue(); - } -}); -BI.BranchTree.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.branch_tree", BI.BranchTree);/** - * guy - * 异步树 - * @class BI.DisplayTree - * @extends BI.TreeView - */ -BI.DisplayTree = BI.inherit(BI.TreeView, { - _defaultConfig: function () { - return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-display-tree" - }) - }, - _init: function () { - BI.DisplayTree.superclass._init.apply(this, arguments); - }, - - //配置属性 - _configSetting: function () { - var setting = { - view: { - selectedMulti: false, - dblClickExpand: false, - showIcon: false, - showTitle: false - }, - data: { - key: { - title: "title", - name: "text" - }, - simpleData: { - enable: true - } - }, - callback: { - beforeCollapse: beforeCollapse - } - }; - - function beforeCollapse(treeId, treeNode) { - return false; - } - - return setting; - }, - - _dealWidthNodes: function (nodes) { - nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); - var self = this, o = this.options; - BI.each(nodes, function (i, node) { - if (node.count > 0) { - node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; - } else { - node.text = node.value; - } - }); - return nodes; - }, - - initTree: function (nodes, setting) { - var setting = setting || this._configSetting(); - this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes); - }, - - destroy: function () { - BI.DisplayTree.superclass.destroy.apply(this, arguments); - } -}); -BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.display_tree", BI.DisplayTree);/** - * guy - * 二级树 - * @class BI.LevelTree - * @extends BI.Single - */ -BI.LevelTree = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-level-tree", - el: { - chooseType: 0 - }, - expander: {}, - items: [] - }) - }, - - _init: function () { - BI.LevelTree.superclass._init.apply(this, arguments); - - this.initTree(this.options.items); - }, - - _formatItems: function (nodes, layer) { - var self = this; - BI.each(nodes, function (i, node) { - var extend = {layer: layer}; - if (!BI.isKey(node.id)) { - node.id = BI.UUID(); - } - if (node.isParent === true || BI.isNotEmptyArray(node.children)) { - switch (i) { - case 0 : - extend.type = "bi.first_plus_group_node"; - break; - case nodes.length - 1 : - extend.type = "bi.last_plus_group_node"; - break; - default : - extend.type = "bi.mid_plus_group_node"; - break; - } - BI.defaults(node, extend); - self._formatItems(node.children, layer + 1); - } else { - switch (i) { - case nodes.length - 1: - extend.type = "bi.last_tree_leaf_item"; - break; - default : - extend.type = "bi.mid_tree_leaf_item"; - } - BI.defaults(node, extend); - } - }); - return nodes; - }, - - _assertId: function (sNodes) { - BI.each(sNodes, function (i, node) { - if (!BI.isKey(node.id)) { - node.id = BI.UUID(); - } - }); - }, - - //构造树结构, - initTree: function (nodes) { - var self = this, o = this.options; - this.empty(); - this._assertId(nodes); - this.tree = BI.createWidget({ - type: "bi.custom_tree", - element: this, - expander: BI.extend({ - el: {}, - popup: { - type: "bi.custom_tree" - } - }, o.expander), - - items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), - - el: BI.extend({ - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }] - }, o.el) - }); - this.tree.on(BI.Controller.EVENT_CHANGE, function (type) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.LevelTree.EVENT_CHANGE, arguments); - } - }) - }, - - //生成树方法 - stroke: function (nodes) { - this.tree.stroke.apply(this.tree, arguments); - }, - - populate: function (items) { - items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0); - this.tree.populate(items); - }, - - setValue: function (v) { - this.tree.setValue(v); - }, - - getValue: function () { - return this.tree.getValue(); - }, - - getAllLeaves: function () { - return this.tree.getAllLeaves(); - }, - - getNodeById: function (id) { - return this.tree.getNodeById(id); - }, - - getNodeByValue: function (id) { - return this.tree.getNodeByValue(id); - } -}); -BI.LevelTree.EVENT_CHANGE = "EVENT_CHANGE"; - -BI.shortcut("bi.level_tree", BI.LevelTree);/** - * 简单的多选树 - * - * Created by GUY on 2016/2/16. - * @class BI.SimpleTreeView - * @extends BI.Widget - */ -BI.SimpleTreeView = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-simple-tree", - itemsCreator: BI.emptyFn, - items: null - }) - }, - _init: function () { - BI.SimpleTreeView.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.structure = new BI.Tree(); - this.tree = BI.createWidget({ - type: "bi.tree_view", - element: this, - itemsCreator: function (op, callback) { - var fn = function (items) { - callback({ - items: items - }); - self.structure.initTree(BI.Tree.transformToTreeFormat(items)); - }; - if (BI.isNotNull(o.items)) { - fn(o.items); - } else { - o.itemsCreator(op, fn); - } - } - }); - this.tree.on(BI.TreeView.EVENT_CHANGE, function () { - self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments); - }); - if (BI.isNotEmptyArray(o.items)) { - this.populate(); - } - }, - - populate: function (items, keyword) { - if (items) { - this.options.items = items; - } - this.tree.stroke({ - keyword: keyword - }); - }, - - setValue: function (v) { - v || (v = []); - var self = this, map = {}; - var selected = []; - BI.each(v, function (i, val) { - var node = self.structure.search(val, "value"); - if (node) { - var p = node; - p = p.getParent(); - if (p) { - if (!map[p.value]) { - map[p.value] = 0; - } - map[p.value]++; - } - - while (p && p.getChildrenLength() <= map[p.value]) { - selected.push(p.value); - p = p.getParent(); - if (p) { - if (!map[p.value]) { - map[p.value] = 0; - } - map[p.value]++; - } - } - } - }); - - this.tree.setValue(BI.makeObject(v.concat(selected))); - }, - - _getValue: function () { - var self = this, result = [], val = this.tree.getValue(); - var track = function (nodes) { - BI.each(nodes, function (key, node) { - if (BI.isEmpty(node)) { - result.push(key); - } else { - track(node); - } - }) - }; - track(val); - return result; - }, - - empty: function () { - this.tree.empty(); - }, - - getValue: function () { - var self = this, result = [], val = this._getValue(); - BI.each(val, function (i, key) { - var target = self.structure.search(key, "value"); - if (target) { - self.structure._traverse(target, function (node) { - if (node.isLeaf()) { - result.push(node.value); - } - }) - } - }); - return result; - } -}); -BI.SimpleTreeView.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.simple_tree", BI.SimpleTreeView); +BI.SimpleTreeView.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.simple_tree", BI.SimpleTreeView); /** * 文本输入框trigger * @@ -12517,329 +12517,329 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, { } }); BI.EditorTrigger.EVENT_CHANGE = "BI.EditorTrigger.EVENT_CHANGE"; -BI.shortcut("bi.editor_trigger", BI.EditorTrigger);/** - * 图标按钮trigger - * - * Created by GUY on 2015/10/8. - * @class BI.IconTrigger - * @extends BI.Trigger - */ -BI.IconTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-icon-trigger", - el: {}, - height: 30 - }); - }, - _init: function () { - var o = this.options; - BI.IconTrigger.superclass._init.apply(this, arguments); - this.iconButton = BI.createWidget(o.el, { - type: "bi.trigger_icon_button", - element: this, - width: o.width, - height: o.height - }); - } -}); -BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** - * 文字trigger - * - * Created by GUY on 2015/9/15. - * @class BI.IconTextTrigger - * @extends BI.Trigger - */ -BI.IconTextTrigger = BI.inherit(BI.Trigger, { - _const: { - hgap: 4, - triggerWidth: 30 - }, - - _defaultConfig: function () { - var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-trigger", - height: 30 - }); - }, - - _init: function () { - BI.IconTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - height: o.height, - text: o.text, - hgap: c.hgap - }); - this.trigerButton = BI.createWidget({ - type: "bi.trigger_icon_button", - cls: "bi-border-left", - width: c.triggerWidth - }); - - BI.createWidget({ - element: this, - type: 'bi.htape', - items: [{ - el: { - type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconClass, - ref: function (_ref) { - self.icon = _ref; - }, - disableSelected: true - }, - width: 24 - }, - { - el: this.text - }, { - el: this.trigerButton, - width: c.triggerWidth - } - ] - }); - }, - - setValue: function (value) { - this.text.setValue(value); - this.text.setTitle(value); - }, - - setIcon: function (iconCls) { - this.icon.setIcon(iconCls); - }, - - setText: function (text) { - this.text.setText(text); - this.text.setTitle(text); - } -}); -BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** - * 文字trigger - * - * Created by GUY on 2015/9/15. - * @class BI.TextTrigger - * @extends BI.Trigger - */ -BI.TextTrigger = BI.inherit(BI.Trigger, { - _const: { - hgap: 4, - triggerWidth: 30 - }, - - _defaultConfig: function () { - var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-trigger", - height: 30 - }); - }, - - _init: function () { - BI.TextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - height: o.height, - text: o.text, - hgap: c.hgap - }); - this.trigerButton = BI.createWidget({ - type: "bi.trigger_icon_button", - cls: "bi-border-left", - width: c.triggerWidth - }); - - BI.createWidget({ - element: this, - type: 'bi.htape', - items: [ - { - el: this.text - }, { - el: this.trigerButton, - width: c.triggerWidth - } - ] - }); - }, - - setValue: function (value) { - this.text.setValue(value); - this.text.setTitle(value); - }, - - setText: function (text) { - this.text.setText(text); - this.text.setTitle(text); - } -}); -BI.shortcut("bi.text_trigger", BI.TextTrigger);/** - * 选择字段trigger - * - * Created by GUY on 2015/9/15. - * @class BI.SelectTextTrigger - * @extends BI.Trigger - */ -BI.SelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-select-text-trigger bi-border", - height: 24 - }); - }, - - _init: function () { - this.options.height -= 2; - BI.SelectTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.text_trigger", - element: this, - height: o.height - }); - if (BI.isKey(o.text)) { - this.setValue(o.text); - } - }, - - setValue: function (vals) { - var o = this.options; - vals = BI.isArray(vals) ? vals : [vals]; - var result = []; - var items = BI.Tree.transformToArrayFormat(this.options.items); - BI.each(items, function (i, item) { - if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { - result.push(item.text || item.value); - } - }); - - if (result.length > 0) { - this.trigger.setText(result.join(",")); - } else { - this.trigger.setText(o.text); - } - }, - - populate: function (items) { - this.options.items = items; - } -}); -BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** - * 选择字段trigger小一号的 - * - * @class BI.SmallSelectTextTrigger - * @extends BI.Trigger - */ -BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, { - - _defaultConfig: function () { - return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-small-select-text-trigger bi-border", - height: 20 - }); - }, - - _init: function () { - this.options.height -= 2; - BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.trigger = BI.createWidget({ - type: "bi.small_text_trigger", - element: this, - height: o.height - 2 - }); - if (BI.isKey(o.text)) { - this.setValue(o.text); - } - }, - - setValue: function (vals) { - var o = this.options; - vals = BI.isArray(vals) ? vals : [vals]; - var result = []; - var items = BI.Tree.transformToArrayFormat(this.options.items); - BI.each(items, function (i, item) { - if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { - result.push(item.text || item.value); - } - }); - - if (result.length > 0) { - this.trigger.element.removeClass("bi-water-mark"); - this.trigger.setText(result.join(",")); - } else { - this.trigger.element.addClass("bi-water-mark"); - this.trigger.setText(o.text); - } - }, - - populate: function (items) { - this.options.items = items; - } -}); -BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);/** - * 文字trigger(右边小三角小一号的) == - * - * @class BI.SmallTextTrigger - * @extends BI.Trigger - */ -BI.SmallTextTrigger = BI.inherit(BI.Trigger, { - _const: { - hgap: 4, - triggerWidth: 20 - }, - - _defaultConfig: function () { - var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-text-trigger", - height: 20 - }); - }, - - _init: function () { - BI.SmallTextTrigger.superclass._init.apply(this, arguments); - var self = this, o = this.options, c = this._const; - this.text = BI.createWidget({ - type: "bi.label", - textAlign: "left", - height: o.height, - text: o.text, - hgap: c.hgap - }); - this.trigerButton = BI.createWidget({ - type: "bi.trigger_icon_button", - width: c.triggerWidth - }); - - BI.createWidget({ - element: this, - type: 'bi.htape', - items: [ - { - el: this.text - }, { - el: this.trigerButton, - width: c.triggerWidth - } - ] - }); - }, - - setValue: function (value) { - this.text.setValue(value); - }, - - setText: function (text) { - this.text.setText(text); - } -}); +BI.shortcut("bi.editor_trigger", BI.EditorTrigger);/** + * 图标按钮trigger + * + * Created by GUY on 2015/10/8. + * @class BI.IconTrigger + * @extends BI.Trigger + */ +BI.IconTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-icon-trigger", + el: {}, + height: 30 + }); + }, + _init: function () { + var o = this.options; + BI.IconTrigger.superclass._init.apply(this, arguments); + this.iconButton = BI.createWidget(o.el, { + type: "bi.trigger_icon_button", + element: this, + width: o.width, + height: o.height + }); + } +}); +BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.IconTextTrigger + * @extends BI.Trigger + */ +BI.IconTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.IconTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [{ + el: { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + ref: function (_ref) { + self.icon = _ref; + }, + disableSelected: true + }, + width: 24 + }, + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setIcon: function (iconCls) { + this.icon.setIcon(iconCls); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.TextTrigger + * @extends BI.Trigger + */ +BI.TextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.TextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [ + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.text_trigger", BI.TextTrigger);/** + * 选择字段trigger + * + * Created by GUY on 2015/9/15. + * @class BI.SelectTextTrigger + * @extends BI.Trigger + */ +BI.SelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-select-text-trigger bi-border", + height: 24 + }); + }, + + _init: function () { + this.options.height -= 2; + BI.SelectTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.text_trigger", + element: this, + height: o.height + }); + if (BI.isKey(o.text)) { + this.setValue(o.text); + } + }, + + setValue: function (vals) { + var o = this.options; + vals = BI.isArray(vals) ? vals : [vals]; + var result = []; + var items = BI.Tree.transformToArrayFormat(this.options.items); + BI.each(items, function (i, item) { + if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { + result.push(item.text || item.value); + } + }); + + if (result.length > 0) { + this.trigger.setText(result.join(",")); + } else { + this.trigger.setText(o.text); + } + }, + + populate: function (items) { + this.options.items = items; + } +}); +BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** + * 选择字段trigger小一号的 + * + * @class BI.SmallSelectTextTrigger + * @extends BI.Trigger + */ +BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, { + + _defaultConfig: function () { + return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-small-select-text-trigger bi-border", + height: 20 + }); + }, + + _init: function () { + this.options.height -= 2; + BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "bi.small_text_trigger", + element: this, + height: o.height - 2 + }); + if (BI.isKey(o.text)) { + this.setValue(o.text); + } + }, + + setValue: function (vals) { + var o = this.options; + vals = BI.isArray(vals) ? vals : [vals]; + var result = []; + var items = BI.Tree.transformToArrayFormat(this.options.items); + BI.each(items, function (i, item) { + if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { + result.push(item.text || item.value); + } + }); + + if (result.length > 0) { + this.trigger.element.removeClass("bi-water-mark"); + this.trigger.setText(result.join(",")); + } else { + this.trigger.element.addClass("bi-water-mark"); + this.trigger.setText(o.text); + } + }, + + populate: function (items) { + this.options.items = items; + } +}); +BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);/** + * 文字trigger(右边小三角小一号的) == + * + * @class BI.SmallTextTrigger + * @extends BI.Trigger + */ +BI.SmallTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 20 + }, + + _defaultConfig: function () { + var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 20 + }); + }, + + _init: function () { + BI.SmallTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [ + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + }, + + setText: function (text) { + this.text.setText(text); + } +}); BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger); \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 81d4dc18f..eb2b92340 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -34,14 +34,14 @@ BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup),BI.ColorChooserTrigge }),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.textIconCheckCombo.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30,text:""})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:30,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:30,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:30})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor] }),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:30})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.BarFloatSection=BI.inherit(BI.FloatSection,{_defaultConfig:function(){return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText("BI-Basic_Cancel")]})},_init:function(){BI.BarFloatSection.superclass._init.apply(this,arguments);var a=this,b=["_init","_defaultConfig","_vessel","_render","getName","listenEnd","local","refresh","load","change"];b=BI.makeObject(b,!0),BI.each(this.constructor.caller.caller.caller.caller.prototype,function(c){if(!b[c]){var d=a[c];BI.isFunction(d)&&(a[c]=BI.bind(function(){return this.model._start===!0?void this._F.push({f:d,arg:arguments}):d.apply(this,arguments)},a))}})},rebuildSouth:function(a){var b=this;this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})}}),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){var e=this.isSelected();b===BI.Events.CLICK&&(a.setAllSelected(e),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.toolbar.isSelected()},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count<c}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(b){a.fireEvent(BI.LazyLoader.EVENT_CHANGE,b)})},_getNextItems:function(a){var b=this.options,c=b.items.length-this._const.PAGE*(a.times-1),d=BI.last(b.items,c),e=BI.first(d,this._const.PAGE);return e},populate:function(a){this.loader.populate(a)},addItems:function(a){this.loader.addItems(a)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){ return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader),BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.next=!1),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",element:this,chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListLoader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasNext:function(){var a=this.options;return BI.isNumber(a.count)?this.count<a.count:!!a.hasNext.apply(this,[{times:this.times,count:this.count}])},addItems:function(a){this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(a),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments),this.next.element.appendTo(this.element)},populate:function(a){var b=this,c=this.options;return 0===arguments.length&&BI.isFunction(c.itemsCreator)?void c.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments),c.onLoaded()}]):(this.options.items=a,this.times=1,this.count=0,this.count+=a.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.DOM.hang([this.next]),this.button_group.populate.apply(this.button_group,arguments),void this.next.element.appendTo(this.element))},empty:function(){BI.DOM.hang([this.next]),this.button_group.empty(),this.next.element.appendTo(this.element),BI.each([this.next],function(a,b){b&&b.setVisible(!1)})},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_loader",BI.ListLoader),BI.SortList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SortList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sort-list",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_init:function(){BI.SortList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.list_loader",element:this,isDefaultInit:b.isDefaultInit,el:b.el,items:this._formatItems(b.items),itemsCreator:function(c,d){b.itemsCreator(c,function(b){d(a._formatItems(b))})},onLoaded:b.onLoaded,count:b.count,next:b.next,hasNext:b.hasNext}),this.loader.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SortList.EVENT_CHANGE,c,d)}),this.loader.element.sortable({containment:b.containment||this.element,connectWith:b.connectWith||".bi-sort-list",items:".sort-item",cursor:b.cursor||"drag",tolerance:b.tolerance||"intersect",placeholder:{element:function(a){var b=BI.createWidget({type:"bi.layout",cls:"bi-sortable-holder",height:a.outerHeight()});return b.element.css({"margin-left":a.css("margin-left"),"margin-right":a.css("margin-right"),"margin-top":a.css("margin-top"),"margin-bottom":a.css("margin-bottom"),margin:a.css("margin")}),b.element},update:function(){}},start:function(a,b){},stop:function(b,c){a.fireEvent(BI.SortList.EVENT_CHANGE)},over:function(a,b){}})},_formatItems:function(a){return BI.each(a,function(a,b){b=BI.stripEL(b),b.cls=b.cls?b.cls+" sort-item":"sort-item",b.attributes={sorted:b.value}}),a},hasNext:function(){return this.loader.hasNext()},addItems:function(a){this.loader.addItems(a)},populate:function(a){a&&(arguments[0]=this._formatItems(a)),this.loader.populate.apply(this.loader,arguments)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue()},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(a){return this.loader.getIndexByValue(a)},getNodeById:function(a){return this.loader.getNodeById(a)},getNodeByValue:function(a){return this.loader.getNodeByValue(a)},getSortedValues:function(){return this.loader.element.sortable("toArray",{attribute:"sorted"})}}),BI.SortList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.sort_list",BI.SortList),BI.AllCountPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-all-count-pager",height:30,pages:1,curr:1,count:1})},_init:function(){BI.AllCountPager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.small_text_editor",cls:"pager-editor",validationChecker:function(b){return 0===a.rowCount.getValue()&&"0"===b||BI.isPositiveInteger(b)},hgap:4,vgap:0,value:b.curr,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),width:35,height:20}),this.pager=BI.createWidget({type:"bi.pager",width:36,layouts:[{type:"bi.horizontal",hgap:1,vgap:1}],dynamicShow:!1,pages:b.pages,curr:b.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Previous_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,cls:"all-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Next_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,cls:"all-pager-next column-next-page-h-font"},hasPrev:b.hasPrev,hasNext:b.hasNext,firstPage:b.firstPage,lastPage:b.lastPage}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.pager.setValue(BI.parseInt(a.editor.getValue())),a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.editor.setValue(a.pager.getCurrentPage())}),this.allPages=BI.createWidget({type:"bi.label",width:30,title:b.pages,text:"/"+b.pages}),this.rowCount=BI.createWidget({type:"bi.label",height:b.height,hgap:5,text:b.count,title:b.count});var c=BI.createWidget({type:"bi.left",height:b.height,scrollable:!1,items:[{type:"bi.label",height:b.height,text:BI.i18nText("BI-Basic_Total"),width:15},this.rowCount,{type:"bi.label",height:b.height,text:BI.i18nText("BI-Tiao_Data"),width:50,textAlign:"left"}]});BI.createWidget({type:"bi.center_adapt",element:this,columnSize:["",35,40,36],items:[c,this.editor,this.allPages,this.pager]})},alwaysShowPager:!0,setAllPages:function(a){this.allPages.setText("/"+a),this.allPages.setTitle(a),this.pager.setAllPages(a),this.editor.setEnable(a>=1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate()}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:30,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var a=this.options;a.vertical,a.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev row-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[74,111,-9,28],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager),BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start<g-1&&(d.start=d.end-g+1);var l=d.start,m=d.end;for(h&&i&&d.index>1&&0!==g&&e>g&&d.end<e&&0!==g&&(l++,m--);l<=m;l++)l===f?c.push({text:l,value:l,selected:!0}):c.push({text:l,value:l});(!b.dynamicShow&&!b.dynamicShowFirstLast||e>g&&d.end<e&&0!==g)&&i&&(e>g&&d.end<e&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),c.push({text:i,value:"last",disabled:!(e>g&&d.end<e&&0!==g)})),d.flow=!j&&0===g,(!b.dynamicShow&&!b.dynamicShowPrevNext&&k||f!==e&&k||d.flow)&&c.push(function(){return BI.isKey(k)?e===!1?{text:k,value:"next",disabled:b.hasNext(f)===!1}:d.flow&&f===e?{text:k,value:"next",disabled:!0}:{text:k,value:"next",disabled:!(f!==e&&k||d.flow)}:BI.extend({disabled:e===!1?b.hasNext(f)===!1:!(f!==e&&k||d.flow)},k)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(c,{cls:"page-item bi-border bi-list-item-active",height:23,hgap:10}),behaviors:b.behaviors,layouts:b.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(c,d,f){if(a._lock!==!0){if(a._lock=!0,a._debouce(),c===BI.Events.CLICK){var g=a.button_group.getValue()[0];switch(g){case"first":a.currPage=1;break;case"last":a.currPage=e;break;case"prev":a.currPage--;break;case"next":a.currPage++;break;default:a.currPage=g}b.jump.apply(a,[{pages:e,curr:a.currPage}]),a._populate(),a.fireEvent(BI.DetailPager.EVENT_CHANGE,f)}a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(a){this.options.pages=a},hasPrev:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasPrev(a):a>1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):a<c},setValue:function(a){var b=this.options;if(a=0|a,a=a<1?1:a,b.pages===!1){var c=BI.result(b,"lastPage"),d=1;this.currPage=a>c?c:(d=BI.result(b,"firstPage"),a<d?d:a)}else a=a>b.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-active",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height-2,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:30})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){return this.options.isNeedFreeze===!0?this.options.freezeCols.length:0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a<f&&(g+=b),h+=b}),f>0&&(b[f-1]=BI.clamp(e-(g-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(h-g-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_recomputeColumnSize:function(){var a=this.options;a.regionColumnSize=this.table.getRegionColumnSize();var b=this.table.getColumnSize().slice();if(a.freezeCols.length>1)for(var c=0;c<a.freezeCols.length-1;c++)b.splice(1,0,0);a.columnSize=b},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=this._createHeader(c),e=this._formatItems(a.items,d,b),f=a.columnSize.slice(),g=a.minColumnSize.slice(),h=a.maxColumnSize.slice();return BI.removeAt(f,e.deletedCols),BI.removeAt(g,e.deletedCols),BI.removeAt(h,e.deletedCols),{header:e.header,items:e.items,columnSize:this._formatColumnSize(f,b),minColumnSize:this._formatColumns(g,b),maxColumnSize:this._formatColumns(h,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.DynamicSummaryLayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._recomputeColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryLayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.DynamicSummaryLayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.attr("freezeCols",f.freezeCols),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryLayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.dynamic_summary_layer_tree_table",BI.DynamicSummaryLayerTreeTable),BI.DynamicSummaryTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.DynamicSummaryTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize();var c=this.getColumnSize(),d=b.columnSize.length-c.length;b.columnSize=c.slice(),b.columnSize=b.columnSize.concat(BI.makeArray(d,0)),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.DynamicSummaryTreeTable.formatHorizontalItems(a.items,b,!1,a.summaryCellStyleGetter),f=BI.DynamicSummaryTreeTable.formatSummaryItems(e,d,a.crossItems,b),g=a.columnSize.slice(),h=a.minColumnSize.slice(),i=a.maxColumnSize.slice(); -return BI.removeAt(g,f.deletedCols),BI.removeAt(h,f.deletedCols),BI.removeAt(i,f.deletedCols),{header:f.header,items:f.items,columnSize:g,minColumnSize:h,maxColumnSize:i}},setWidth:function(a){BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a){switch(BI.DynamicSummaryTreeTable.superclass.attr.apply(this,arguments),a){case"minColumnSize":case"maxColumnSize":return}this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryTreeTable.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.DynamicSummaryTreeTable,{formatHorizontalItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],(a==-1||g.children.length>1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatSummaryItems:function(a,b,c,d){function e(a){if(BI.isArray(a.children)){if(BI.each(a.children,function(a,b){e(b)}),BI.isNotEmptyArray(a.values)){if(1===a.children.length)for(var b=0;b<a.values.length;b++)f.push(g+b+d);g+=a.values.length}}else a.values&&a.values.length>1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep();return{header:this._createHeader(c),items:this._formatItems(a.items),columnSize:this._formatColumnSize(a.columnSize,b),minColumnSize:this._formatColumns(a.minColumnSize,b),maxColumnSize:this._formatColumns(a.maxColumnSize,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.LayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.LayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.LayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){var a=this.table.getColumnSize(),b=this._getHDeep(),c=[];return b>0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i<e;i++){for(var j=[],k=0;k<d;k++)j.push(b[i]);h.push(j.concat(g[i]||[]))}return a&&a.length>0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatCrossItems:function(a,b,c){var d=BI.TableTree.formatItems(a,b,!0,c);return BI.unzip(d)},maxDeep:function(a){function b(a,c){var d=a;return BI.isNotEmptyArray(c.children)&&BI.each(c.children,function(c,e){d=Math.max(d,b(a+1,e))}),d}var c=1;return BI.isObject(a)&&BI.each(a,function(a,d){c=Math.max(c,b(1,d))}),c}}),BI.shortcut("bi.tree_table",BI.TableTree),BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(a){return a.length>0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){ -this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j<k&&h<e.length;)d.push(h),i+=e[h].height,j+=e[h].height,h++;BI.each(d,function(d,f){var g=BI.deepIndexOf(a.renderedKeys,f);if(g>-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return a<b&&!this._isEqual(a,b)},_isMoreThan:function(a,b){return a>b&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c<d;c++)for(var e=c+1;e<d;e++){var f={left:b[c].x,top:b[c].y,width:b[c].w,height:b[c].h},g={left:b[e].x,top:b[e].y,width:b[e].w,height:b[e].h};if(b[c].isIntersects(b[e])&&this._getCrossArea(f,g)>1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;k<l;k++){var m=j[k];m.moved||b.y>m.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c<d;c++)if(this._collides(a[c],b))return a[c]},_moveElementAwayFromCollision:function(a,b,c,d){if(d){var e={x:c.x,y:c.y,w:c.w,h:c.h,i:"-1"};if(e.y=Math.max(b.y-c.h,0),!this._getFirstCollision(a,e))return this._moveElement(a,c,void 0,e.y)}return this._moveElement(a,c,void 0,c.y+1)},_compactItem:function(a,b,c){if(c)for(;b.y>0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g<h;g++){var i=e[g];i._static||(i=this._compactItem(d,i,b),d.push(i)),f[a.indexOf(i)]=i,i.moved=!1}return f},getRegionByName:function(a){var b={};return b[a]=this.regions[a],this._cloneRegion(b)[a]},getAllRegions:function(){return BI.toArray(this._cloneRegion())},getHelper:function(){var a=BI.createWidget({type:"bi.layout",width:18,height:18,cls:"arrangement-helper bi-border"});return BI.createWidget({type:"bi.absolute",element:this,items:[a]}),a},_start:function(){this.options.layoutType===BI.Arrangement.LAYOUT_TYPE.GRID?this.block.setVisible(!0):this.arrangement.setVisible(!0)},_stop:function(){this.arrangement.setVisible(!1),this.block.setVisible(!1)},setLayoutType:function(a){var b=this.options;if(a!==b.layoutType)switch(b.layoutType=a,b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.relayout()}},getLayoutType:function(){return this.options.layoutType},getLayoutRatio:function(){var a=this._getRegionOccupied(),b=this.getClientWidth(),c=this.getClientHeight();return{x:BI.parseFloat(BI.contentFormat((a.left+a.width)/b,"#.##;-#.##")),y:BI.parseFloat(BI.contentFormat((a.top+a.height)/c,"#.##;-#.##"))}},addRegion:function(a,b){b&&this.setPosition(b,a);this.options;if(!this.position)return!1;var c=this._cloneRegion();BI.each(this.position.regions,function(a,b){c[b.id].left=b.left,c[b.id].top=b.top,c[b.id].width=b.width,c[b.id].height=b.height});var d=BI.extend({},a,{left:this.position.insert.left,top:this.position.insert.top,width:this.position.insert.width,height:this.position.insert.height}),e=this._createOneRegion(d);return c[e.id]=e,!!this._test(c)&&(delete c[e.id],this._modifyRegion(c),this._addRegion(d),this._populate(this.getAllRegions()),!0)},deleteRegion:function(a){if(!this.regions[a])return!1;var b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),!0;case BI.Arrangement.LAYOUT_TYPE.GRID:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),this.resize(),!0}return!1},setRegionSize:function(a,b){var c=this.options,d=!1;switch(c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._cloneRegion();BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)&&(this._modifyRegion(e),d=!0);break;case BI.Arrangement.LAYOUT_TYPE.GRID:var e=this._cloneRegion();if(BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)){var f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),d=!0}}return this._applyRegion(),d},setPosition:function(a,b){var c,d,e=this.options,f=[];if(a.left<0||a.top<0){switch(e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.resize()}return this._stop(),this.position=null,null}var g=this._getScrollOffset();switch(a={left:a.left+g.left,top:a.top+g.top},e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var c={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this.position={insert:c},this._setArrangeSize(c),this._start();break;case BI.Arrangement.LAYOUT_TYPE.GRID:var h={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this._setArrangeSize(h);var d=this._getGridPositionAndSize(h),i=[{x:0,y:BI.MAX,w:d.w,h:d.h,i:d.i}].concat(this._getLayoutsByRegions());i=this._moveElement(i,i[0],d.x,d.y,!0),i=this.compact(i,!0);var f=this._setRegionsByLayout(this._cloneRegion(),i),c=this._getBlockPositionAndSize(i[0]);this.position={insert:c,regions:f},this._applyRegion(f),this._setBlockPositionAndSize(c),this._start()}return this.position},setRegionPosition:function(a,b){var c=this.options,d=this._getScrollOffset();switch(b=BI.extend(b,{left:b.left+d.left,top:b.top+d.top}),c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top}),this._applyRegion();break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(b.stop){BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this.block.setVisible(!1)}else{BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),h=this._getGridPositionAndSize(BI.extend(e[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top})),i=h.x,j=h.y;h=BI.extend(h,{x:0,y:BI.MAX,i:-1}),delete e[a];var f=this._getLayoutsByRegions(e);f=this._moveElement([h].concat(f),h,i,j,!0),f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this._setBlockPositionAndSize(this._getBlockPositionAndSize(h)),this.block.setVisible(!0)}}},setDropPosition:function(a,b){var c=this;this.arrangement.setVisible(!0);var d=this._getScrollOffset();return this._setArrangeSize(BI.extend({},b,{left:a.left+d.left,top:a.top+d.top})),function(){c.arrangement.setVisible(!1)}},scrollTo:function(a){this.scrollContainer.element.scrollTop(a.top),this.scrollContainer.element.scrollLeft(a.left)},zoom:function(a){var b=this;this.options;if(a){var c=this._applyContainer();switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:if(this._isArrangeFine()){var d=this.getClientWidth(),e=(a.x||1)*d/(c.left+c.width),f=this._cloneRegion();BI.each(f,function(a,b){b.left=b.left*e,b.width=b.width*e}),this._test(f)&&(this._modifyRegion(f),this._applyRegion()),this.resize(),this.relayout()}break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine()){var d=this.getClientWidth(),g=this.getClientHeight(),e=(a.x||1)*d/(c.left+c.width),h=(a.y||1)*g/(c.top+c.height),f=this._cloneRegion();if(BI.each(f,function(a,c){c.left=c.left*e,c.width=c.width*e,c.top=c.top*h,c.height=c.height*h;var d=b._getOneWidthPortion(),f=Math.round(c.width/d),g=Math.round(c.left/d),i=Math.round((c.width+c.left)/d);g+f!==i&&(c.left=g*d,c.width=i*d-c.left)}),this._test(f)){var i=this._getLayoutsByRegions(f);i=this.compact(i,!0),f=this._getRegionsByLayout(i),this._modifyRegion(f),this._applyRegion()}}else this.relayout()}}},resize:function(){var a=this.options;switch(a.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.zoom(this.ratio);var b=this._cloneRegion(),c=this._getLayoutsByRegions(b);c=this.compact(c,!0),b=this._getRegionsByLayout(c),this._modifyRegion(b),this._applyRegion()}},relayout:function(){var a=this,b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine())this.resize();else{var c=this._getOneHeightPortion(),d=this.getClientWidth(),e=(this.getClientHeight(),this._cloneRegion()),f=BI.toArray(e);f.sort(function(b,c){return a._isEqual(b.top,c.top)?b.left-c.left:b.top-c.top});var g=f.length,h=4,i=(Math.floor((g-1)/4+1),d/h),j={};if(BI.each(f,function(a,b){var d=Math.floor(a/4),e=a%4;BI.extend(b,{top:d*c*6,left:e*i,width:i,height:6*c}),j[d]||(j[d]={}),j[d][e]=b}),this._test(f)){var k=this._getLayoutsByRegions(e);k=this.compact(k,!0),e=this._getRegionsByLayout(k),this._modifyRegion(e),this._populate(f)}}}},_populate:function(a){this._stop(),this._calculateRegions(a),this._applyRegion()},populate:function(a){var b=this;BI.each(this.regions,function(a,c){b.regions[a].el.setVisible(!1),delete b.regions[a]}),this._populate(a),this._renderRegion()}}),BI.Arrangement.EVENT_SCROLL="EVENT_SCROLL",BI.extend(BI.Arrangement,{PORTION:36,H_PORTION:18,LAYOUT_TYPE:{GRID:0,FREE:1}}),BI.shortcut("bi.arrangement",BI.Arrangement),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.leaf=!0,h.width=g.width,h.height=g.height,h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id]; -d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b<c;b++)e[a[b].id]=a[b];for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!=a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(a[b])):d.push(a[b]);return d}return[a]},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=this._transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:25})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a+1),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker bi-background",height:25,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this._year=(new Date).getFullYear(),this._month=(new Date).getMonth(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){0===a._month?a.setValue({year:a.year.getValue()-1,month:11}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){11===a._month?a.setValue({year:a.year.getValue()+1,month:0}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo"}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.left,width:25},{type:"bi.center_adapt",items:[{type:"bi.horizontal",width:100,items:[this.year,this.month]}]},{el:this.right,width:25}]}),this.setValue({year:this._year,month:this._month})},setValue:function(a){this._year=a.year,this._month=a.month,this.year.setValue(a.year),this.month.setValue(a.month)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:30})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.DateTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&Date.checkLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]})},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return Date.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),BI.parseInt(a)},_alertInEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),a=a<10?"0"+a:a},_finetuning:function(a){var b=BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));this.editor.setValue(this._alertInEditorValue(b+a))},getValue:function(){var a=this.editor.getValue();return this._alertOutEditorValue(a)},setValue:function(a){this.editor.setValue(this._alertInEditorValue(a)),this._finetuning(0)}}),BI.DateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.date_time_select",BI.DateTimeSelect),BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:b.triggerWidth},{el:this.text}]})},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=new Date,b=c.print("%Y-%X-%d %H:%M:%S");else{var d=new Date(c.year,c.month,c.day,c.hour,c.minute,c.second);b=d.print("%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.DirectionPathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#808080",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.DirectionPathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",items:[]})},_init:function(){BI.DirectionPathChooser.superclass._init.apply(this,arguments);var a=this,b=this.options; -this.pathChooser=BI.createWidget({type:"bi.path_chooser",element:this,items:b.items}),this.pathChooser.on(BI.PathChooser.EVENT_CHANGE,function(b,c){a._setValue(b,c),a.fireEvent(BI.DirectionPathChooser.EVENT_CHANGE)}),this._drawArrows()},_unselectAllArrows:function(){var a=this._const.lineColor;BI.each(this.arrows,function(b,c){BI.each(c,function(b,c){BI.each(c,function(b,c){c.attr({fill:a,stroke:a})})})})},_drawOneArrow:function(a,b){var c=this._const.lineColor,d=(this._const.selectLineColor,this.pathChooser.svg),e="";switch(b){case 0:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y+5)+"L"+(a.x+3)+","+(a.y+5)+"L"+a.x+","+a.y;break;case 1:e="M"+a.x+","+a.y+"L"+(a.x-5)+","+(a.y-3)+"L"+(a.x-5)+","+(a.y+3)+"L"+a.x+","+a.y;break;case 2:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y-5)+"L"+(a.x+3)+","+(a.y-5)+"L"+a.x+","+a.y;break;case 3:e="M"+a.x+","+a.y+"L"+(a.x+5)+","+(a.y-3)+"L"+(a.x+5)+","+(a.y+3)+"L"+a.x+","+a.y}return d.path(e).attr({fill:c,stroke:c})},_drawArrows:function(){function a(a,b){return b===-1?100*(a+1)-20:100*a+20}function b(a,b){var c=BI.find(a,function(c,d){if(c>0&&a[c-1].x<b&&a[c].x>b)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a<i.length-1){var e;b.y===i[a-1].y?i[a+1].y!=b.y&&(f[h[h.length-2]].direction===-1?a-1>0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a<b-1},_createChildValue:function(a,b){return a+"_"+b},populate:function(a){BI.DownListPopup.superclass.populate.apply(this,arguments);var b=this;b.childValueMap={},b.fatherValueMap={},b.singleValues=[];var c=b._createChildren(a),d=BI.createItems(c,{},{adjustLength:-2});b.popup.populate(d)},setValue:function(a){var b=this,c=[];BI.each(a,function(a,d){var e;e=BI.isNotNull(d.childValue)?b._createChildValue(d.value,d.childValue):d.value,c.push(e)}),this.popup.setValue(c)},getValue:function(){var a=this,b=[],c=this.popup.getValue();return BI.each(c,function(c,d){var e={};if(BI.isNotNull(a.childValueMap[d])){var f=a.fatherValueMap[d];e.childValue=a.childValueMap[d],e.value=f}else e.value=d;b.push(e)}),b}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),BI.ExcelTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-cell",text:""})},_init:function(){BI.ExcelTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_cell",BI.ExcelTableCell),BI.ExcelTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-header-cell bi-background",text:""})},_init:function(){BI.ExcelTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:BI.HorizontalAlign.Center,whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_header_cell",BI.ExcelTableHeaderCell),BI.ExcelTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",el:{type:"bi.responsive_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:37,footerRowSize:37,rowSize:37,regionColumnSize:!1,items:[]})},_init:function(){BI.ExcelTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[];BI.each(b.mergeCols,function(a,b){c.push(b+1)}),this.table=BI.createWidget(b.el,{type:"bi.table_view",element:this,isNeedFreeze:!1,isNeedMerge:b.isNeedMerge,mergeCols:c,mergeRule:b.mergeRule,columnSize:[""].concat(b.columnSize),headerRowSize:18,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize||[82,""]}),BI.isNotEmptyArray(b.items)&&this.populate(b.items),BI.nextTick(function(){a.setRegionColumnSize(b.regionColumnSize||[82,""])})},resize:function(){this.table.resize()},setColumnSize:function(a){this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},resizeHeader:function(){this.table.resize(),this.table._resizeHeader&&this.table._resizeHeader()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.ExcelTable.superclass.attr.apply(this,arguments),a){case"mergeCols":var d=[];BI.each(b,function(a,b){d.push(b+1)}),b=d}this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this.getColumnSize(),c=[],d=[{type:"bi.excel_table_header_cell"}];BI.isNotNull(a)&&(BI.each(b,function(a,b){d.push({type:"bi.excel_table_header_cell",text:BI.int2Abc(a+1)})}),BI.each(a,function(a,b){c.push([{type:"bi.excel_table_header_cell",text:a+1}].concat(b))})),this.table.populate(c,[d])},destroy:function(){this.table.destroy(),BI.ExcelTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.excel_table",BI.ExcelTable),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){ -var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({ -year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill", -el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)), -void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0), -this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d<a.length;d++){var e=a[d],f=b.getRegionIndexById(e);c.push(f);var g=b.regions[f];if(d===a.length-1){g.hasItem(e)||g.addItem(e,b.texts[e]);break}(d>0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d<BI.last(c);d++)BI.contains(c,d)||b.regions[d].addItem("")},_createNodes:function(){var a=this,b=this.options;this.store={},this.texts={},this.start=[],this.end=[],BI.each(b.items,function(b,c){a.start.push(BI.first(c).value),a.end.push(BI.last(c).value)}),this.start=BI.uniq(this.start),this.end=BI.uniq(this.end);var c=[],d=new BI.Tree,e={},f=0;BI.each(b.items,function(b,c){BI.each(c,function(b,g){BI.has(e,g.value)||(e[g.value]=0),e[g.value]++,f=Math.max(f,e[g.value]);var h={};b>0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h<e;h++)c[h]=c[h+1];c[e]=g}}else c.push(d.get("region"))})}),this._createRegions(c),BI.each(e,function(a,b){b<f&&delete e[a]});for(var g=[],h=d.getRoot();h&&1===h.getChildrenLength();)BI.has(e,h.getChildren()[0].id)?(delete e[h.getChildren()[0].id],h=h.getChildren()[0]):h=null;d.traverse(function(a){BI.has(e,a.id)&&(g.push(a.id),delete e[a.id])});for(var i,j,k={},l=0,m=g.length;l<m+1;l++)0===m?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):l===m?(i=j,j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):0===l?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[d.search(g[l])]):(i=[d.search(j[0]||d.getRoot(),g[l-1])],j=[d.search(i[0],g[l])]),BI.each(i,function(b,c){d._recursion(c,[c.id],function(b,d){if(BI.contains(j,b)&&(k[c.id]||(k[c.id]=[]),k[c.id].push(d),a._pushNodes(d),j.length<=1))return!0})});this.routes=k,this._drawLines(k)},_unselectAllPath:function(){var a=this;BI.each(this.radios,function(a,b){BI.each(b,function(a,b){b.setSelected(!1)})}),BI.each(this.lines,function(b,c){BI.each(c,function(b,c){c.attr("stroke",a._const.lineColor)})}),BI.each(this.regions,function(a,b){b.reset()})},populate:function(a){this.options.items=a||[];this.empty(),this.options.items.length<=0||(this.svg=BI.createWidget({type:"bi.svg"}),this._createNodes(),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}))},setValue:function(a){this._unselectAllPath();var b=BI.keys(this.routes),c=this,d=[],e=[];BI.each(a,function(a,c){BI.contains(b,c)&&e.length>0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width(); -if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.length<a.columnSize.length){var e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]<e.left[e.left.length-1]&&(h[h.length-1]=e.left[e.left.length-1]),i[i.length-1]<e.right[e.right.length-1]&&(i[i.length-1]=e.right[e.right.length-1]),a.table.setColumnSize(h.concat(i))}else if(!this._isAdaptiveColumn()){var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),l=e.sum,m=e.size;m[m.length-1]+=d[0]-l;var n=BI.clone(m);n[n.length-1]="",this.table.setColumnSize(n),e=this._getBlockSize(),m[m.length-1]<e.size[e.size.length-1]&&(m[m.length-1]=e.size[e.size.length-1]),this.table.setColumnSize(m)}},_resizeBody:function(){if(this._isAdaptiveColumn()){var a=this.table.getCalculateColumnSize();this.setColumnSize(a)}},_adjustRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this._getBlockSize(),d=c.sumLeft,e=c.sumRight;(d<b[0]||b[0]>=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this.table.element.width();if(b[0]<15||b[1]<15){var d=a.freezeCols,e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h<b.items.length;h++,i++){var j=BI.deepIndexOf(this.renderedKeys,this.start+h),k=h*b.rowSize;if(j>-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b; -},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;b<c;b++)if(i._isMatch(a.slice(0,a.length-1),a[b],l))return!0;return!1}function g(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(c=c[e],null==c)return!1}return!0}function h(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(!BI.has(c,e))return!1;if(c=c[e],BI.isEmpty(c))return!0}return!1}var i=this,j=BI.deepClone(a.selectedValues),k=a.notSelectedValue||{},l=a.keyword||"",m=a.parentValues||[];return null==j||BI.isEmpty(j)?void b({}):(c(j),void b(j))},_reqAdjustTreeNode:function(a,b){function c(a,b){if(null==a||BI.isEmpty(a))return!0;var e=!0;return BI.each(a,function(d,g){var h=BI.clone(b);h.push(d),c(a[d],h)||(BI.each(a[d],function(a,b){var c=BI.clone(h);c.push(a),f.push(c)}),e=!1)}),e&&d(a,b)}function d(a,b){return BI.isEmpty(a)||e._getChildCount(b)===BI.size(a)}var e=this,f=[],g=a.selectedValues;if(null==g||BI.isEmpty(g))return void b({});BI.each(g,function(a,b){f.push([a])}),c(g,[]);var h={};BI.each(f,function(a,b){e._buildTree(h,b)}),b(h)},_reqInitTreeNode:function(a,b){function c(){var a=j._getChildren([]),b=a.length;if(""!==n){for(var c=0,e=b;c<e;c++)if(a[c].value===n){b=c+1;break}}else b=0;for(var f=[],g=b,e=a.length;g<e;g++){if(f.length<j._const.perPage)var h=d(1,[],a[g].value,!1,k);else if(f.length===j._const.perPage)var h=d(1,[],a[g].value,!1,[]);if(h[0]===!0&&f.push(a[g].value),f.length>j._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m<g*this._const.perPage;m++){var n=d(l[m].value,i,k,h);f.push({id:l[m].id,pId:l[m].pId,value:l[m].value,text:l[m].text,times:1,isParent:l[m].getChildrenLength()>0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d<e;d++){if(null==c)return null;c=c[b[d]]}return c},_deleteNode:function(a,b){var c=b[b.length-1],d=b.slice(0,b.length-1),e=this._getNode(a,d);if(null!=e&&e[c])for(delete e[c];d.length>0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d<b*this._const.perPage;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return b*this._const.perPage<a.length},_itemsCreator:function(a,b){function c(c){var e=(a.keywords||[]).slice();if(a.keyword&&e.push(a.keyword),BI.each(e,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var f=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!f[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:d._getItemsByTimes(c,a.times),hasNext:d._hasNextByTimes(c,a.times)})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){var a=this.combo.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_CONFIRM="ValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo),BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this.items=b.items,this.populate())},setValue:function(a){this.list.setValue(a)},getValue:function(){var a=this.list.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="ValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane); \ No newline at end of file +return BI.removeAt(g,f.deletedCols),BI.removeAt(h,f.deletedCols),BI.removeAt(i,f.deletedCols),{header:f.header,items:f.items,columnSize:g,minColumnSize:h,maxColumnSize:i}},setWidth:function(a){BI.DynamicSummaryTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.DynamicSummaryTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.options.columnSize},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a){switch(BI.DynamicSummaryTreeTable.superclass.attr.apply(this,arguments),a){case"minColumnSize":case"maxColumnSize":return}this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.DynamicSummaryTreeTable.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.DynamicSummaryTreeTable,{formatHorizontalItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],(a==-1||g.children.length>1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatSummaryItems:function(a,b,c,d){function e(a){if(BI.isArray(a.children)){if(BI.each(a.children,function(a,b){e(b)}),BI.isNotEmptyArray(a.values)){if(1===a.children.length)for(var b=0;b<a.values.length;b++)f.push(g+b+d);g+=a.values.length}}else a.values&&a.values.length>1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a<b?void(c[0]+=d):void c.push(d)}),c},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep();return{header:this._createHeader(c),items:this._formatItems(a.items),columnSize:this._formatColumnSize(a.columnSize,b),minColumnSize:this._formatColumns(a.minColumnSize,b),maxColumnSize:this._formatColumns(a.maxColumnSize,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.LayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.LayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.LayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){var a=this.table.getColumnSize(),b=this._getHDeep(),c=[];return b>0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i<e;i++){for(var j=[],k=0;k<d;k++)j.push(b[i]);h.push(j.concat(g[i]||[]))}return a&&a.length>0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j<b;j++)h.push(i);if(c||(h=h.concat(g.values)),h.length>0)if(c)for(var k=0,l=g.values.length;k<l;k++)f.push(h);else f.push(h)}}else{if(a!=-1){h=a.slice();for(var j=h.length;j<b;j++)h.push(g)}else h=[];if(!c&&BI.isArray(g.values)&&(h=h.concat(g.values)),c&&BI.isArray(g.values))for(var j=0,m=g.values.length;j<m-1;j++)h.length>0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e<b;e++)c.push(d)}),f},formatCrossItems:function(a,b,c){var d=BI.TableTree.formatItems(a,b,!0,c);return BI.unzip(d)},maxDeep:function(a){function b(a,c){var d=a;return BI.isNotEmptyArray(c.children)&&BI.each(c.children,function(c,e){d=Math.max(d,b(a+1,e))}),d}var c=1;return BI.isObject(a)&&BI.each(a,function(a,d){c=Math.max(c,b(1,d))}),c}}),BI.shortcut("bi.tree_table",BI.TableTree),BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(a){return a.length>0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:c.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+b.iconClass,ref:function(b){a.icon=b},disableSelected:!0},width:24},{el:this.text},{el:this.trigerButton,width:c.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setIcon:function(a){this.icon.setIcon(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){ +BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j<k&&h<e.length;)d.push(h),i+=e[h].height,j+=e[h].height,h++;BI.each(d,function(d,f){var g=BI.deepIndexOf(a.renderedKeys,f);if(g>-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return a<b&&!this._isEqual(a,b)},_isMoreThan:function(a,b){return a>b&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c<d;c++)for(var e=c+1;e<d;e++){var f={left:b[c].x,top:b[c].y,width:b[c].w,height:b[c].h},g={left:b[e].x,top:b[e].y,width:b[e].w,height:b[e].h};if(b[c].isIntersects(b[e])&&this._getCrossArea(f,g)>1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;k<l;k++){var m=j[k];m.moved||b.y>m.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c<d;c++)if(this._collides(a[c],b))return a[c]},_moveElementAwayFromCollision:function(a,b,c,d){if(d){var e={x:c.x,y:c.y,w:c.w,h:c.h,i:"-1"};if(e.y=Math.max(b.y-c.h,0),!this._getFirstCollision(a,e))return this._moveElement(a,c,void 0,e.y)}return this._moveElement(a,c,void 0,c.y+1)},_compactItem:function(a,b,c){if(c)for(;b.y>0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g<h;g++){var i=e[g];i._static||(i=this._compactItem(d,i,b),d.push(i)),f[a.indexOf(i)]=i,i.moved=!1}return f},getRegionByName:function(a){var b={};return b[a]=this.regions[a],this._cloneRegion(b)[a]},getAllRegions:function(){return BI.toArray(this._cloneRegion())},getHelper:function(){var a=BI.createWidget({type:"bi.layout",width:18,height:18,cls:"arrangement-helper bi-border"});return BI.createWidget({type:"bi.absolute",element:this,items:[a]}),a},_start:function(){this.options.layoutType===BI.Arrangement.LAYOUT_TYPE.GRID?this.block.setVisible(!0):this.arrangement.setVisible(!0)},_stop:function(){this.arrangement.setVisible(!1),this.block.setVisible(!1)},setLayoutType:function(a){var b=this.options;if(a!==b.layoutType)switch(b.layoutType=a,b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.relayout()}},getLayoutType:function(){return this.options.layoutType},getLayoutRatio:function(){var a=this._getRegionOccupied(),b=this.getClientWidth(),c=this.getClientHeight();return{x:BI.parseFloat(BI.contentFormat((a.left+a.width)/b,"#.##;-#.##")),y:BI.parseFloat(BI.contentFormat((a.top+a.height)/c,"#.##;-#.##"))}},addRegion:function(a,b){b&&this.setPosition(b,a);this.options;if(!this.position)return!1;var c=this._cloneRegion();BI.each(this.position.regions,function(a,b){c[b.id].left=b.left,c[b.id].top=b.top,c[b.id].width=b.width,c[b.id].height=b.height});var d=BI.extend({},a,{left:this.position.insert.left,top:this.position.insert.top,width:this.position.insert.width,height:this.position.insert.height}),e=this._createOneRegion(d);return c[e.id]=e,!!this._test(c)&&(delete c[e.id],this._modifyRegion(c),this._addRegion(d),this._populate(this.getAllRegions()),!0)},deleteRegion:function(a){if(!this.regions[a])return!1;var b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),!0;case BI.Arrangement.LAYOUT_TYPE.GRID:return this._deleteRegionByName(a),this._populate(this.getAllRegions()),this.resize(),!0}return!1},setRegionSize:function(a,b){var c=this.options,d=!1;switch(c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._cloneRegion();BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)&&(this._modifyRegion(e),d=!0);break;case BI.Arrangement.LAYOUT_TYPE.GRID:var e=this._cloneRegion();if(BI.extend(e[a],{width:b.width,height:b.height}),this._test(e)){var f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),d=!0}}return this._applyRegion(),d},setPosition:function(a,b){var c,d,e=this.options,f=[];if(a.left<0||a.top<0){switch(e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.resize()}return this._stop(),this.position=null,null}var g=this._getScrollOffset();switch(a={left:a.left+g.left,top:a.top+g.top},e.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:var c={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this.position={insert:c},this._setArrangeSize(c),this._start();break;case BI.Arrangement.LAYOUT_TYPE.GRID:var h={top:a.top<0?0:a.top,left:a.left<0?0:a.left,width:b.width,height:b.height};this._setArrangeSize(h);var d=this._getGridPositionAndSize(h),i=[{x:0,y:BI.MAX,w:d.w,h:d.h,i:d.i}].concat(this._getLayoutsByRegions());i=this._moveElement(i,i[0],d.x,d.y,!0),i=this.compact(i,!0);var f=this._setRegionsByLayout(this._cloneRegion(),i),c=this._getBlockPositionAndSize(i[0]);this.position={insert:c,regions:f},this._applyRegion(f),this._setBlockPositionAndSize(c),this._start()}return this.position},setRegionPosition:function(a,b){var c=this.options,d=this._getScrollOffset();switch(b=BI.extend(b,{left:b.left+d.left,top:b.top+d.top}),c.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top}),this._applyRegion();break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(b.stop){BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),f=this._getLayoutsByRegions(e);f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this.block.setVisible(!1)}else{BI.extend(this.regions[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top});var e=this._cloneRegion(),h=this._getGridPositionAndSize(BI.extend(e[a],{left:b.left<0?0:b.left,top:b.top<0?0:b.top})),i=h.x,j=h.y;h=BI.extend(h,{x:0,y:BI.MAX,i:-1}),delete e[a];var f=this._getLayoutsByRegions(e);f=this._moveElement([h].concat(f),h,i,j,!0),f=this.compact(f,!0);var g=this._getRegionsByLayout(f);this._modifyRegion(g),this._applyRegion(),this._setBlockPositionAndSize(this._getBlockPositionAndSize(h)),this.block.setVisible(!0)}}},setDropPosition:function(a,b){var c=this;this.arrangement.setVisible(!0);var d=this._getScrollOffset();return this._setArrangeSize(BI.extend({},b,{left:a.left+d.left,top:a.top+d.top})),function(){c.arrangement.setVisible(!1)}},scrollTo:function(a){this.scrollContainer.element.scrollTop(a.top),this.scrollContainer.element.scrollLeft(a.left)},zoom:function(a){var b=this;this.options;if(a){var c=this._applyContainer();switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:if(this._isArrangeFine()){var d=this.getClientWidth(),e=(a.x||1)*d/(c.left+c.width),f=this._cloneRegion();BI.each(f,function(a,b){b.left=b.left*e,b.width=b.width*e}),this._test(f)&&(this._modifyRegion(f),this._applyRegion()),this.resize(),this.relayout()}break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine()){var d=this.getClientWidth(),g=this.getClientHeight(),e=(a.x||1)*d/(c.left+c.width),h=(a.y||1)*g/(c.top+c.height),f=this._cloneRegion();if(BI.each(f,function(a,c){c.left=c.left*e,c.width=c.width*e,c.top=c.top*h,c.height=c.height*h;var d=b._getOneWidthPortion(),f=Math.round(c.width/d),g=Math.round(c.left/d),i=Math.round((c.width+c.left)/d);g+f!==i&&(c.left=g*d,c.width=i*d-c.left)}),this._test(f)){var i=this._getLayoutsByRegions(f);i=this.compact(i,!0),f=this._getRegionsByLayout(i),this._modifyRegion(f),this._applyRegion()}}else this.relayout()}}},resize:function(){var a=this.options;switch(a.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:this.zoom(this.ratio);var b=this._cloneRegion(),c=this._getLayoutsByRegions(b);c=this.compact(c,!0),b=this._getRegionsByLayout(c),this._modifyRegion(b),this._applyRegion()}},relayout:function(){var a=this,b=this.options;switch(b.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:break;case BI.Arrangement.LAYOUT_TYPE.GRID:if(this._isArrangeFine())this.resize();else{var c=this._getOneHeightPortion(),d=this.getClientWidth(),e=(this.getClientHeight(),this._cloneRegion()),f=BI.toArray(e);f.sort(function(b,c){return a._isEqual(b.top,c.top)?b.left-c.left:b.top-c.top});var g=f.length,h=4,i=(Math.floor((g-1)/4+1),d/h),j={};if(BI.each(f,function(a,b){var d=Math.floor(a/4),e=a%4;BI.extend(b,{top:d*c*6,left:e*i,width:i,height:6*c}),j[d]||(j[d]={}),j[d][e]=b}),this._test(f)){var k=this._getLayoutsByRegions(e);k=this.compact(k,!0),e=this._getRegionsByLayout(k),this._modifyRegion(e),this._populate(f)}}}},_populate:function(a){this._stop(),this._calculateRegions(a),this._applyRegion()},populate:function(a){var b=this;BI.each(this.regions,function(a,c){b.regions[a].el.setVisible(!1),delete b.regions[a]}),this._populate(a),this._renderRegion()}}),BI.Arrangement.EVENT_SCROLL="EVENT_SCROLL",BI.extend(BI.Arrangement,{PORTION:36,H_PORTION:18,LAYOUT_TYPE:{GRID:0,FREE:1}}),BI.shortcut("bi.arrangement",BI.Arrangement),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d<c-1){var h=new BI.Node(BI.UUID());h.leaf=!0,h.width=g.width,h.height=g.height,h.isNew=!0;var i=0;if(f>0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom: +BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b<c;b++)e[a[b].id]=a[b];for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!=a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(a[b])):d.push(a[b]);return d}return[a]},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=this._transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:25})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a+1),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker bi-background",height:25,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=this.options;this._year=(new Date).getFullYear(),this._month=(new Date).getMonth(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){0===a._month?a.setValue({year:a.year.getValue()-1,month:11}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){11===a._month?a.setValue({year:a.year.getValue()+1,month:0}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo"}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.left,width:25},{type:"bi.center_adapt",items:[{type:"bi.horizontal",width:100,items:[this.year,this.month]}]},{el:this.right,width:25}]}),this.setValue({year:this._year,month:this._month})},setValue:function(a){this._year=a.year,this._month=a.month,this.year.setValue(a.year),this.month.setValue(a.month)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:30})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.DateTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&Date.checkLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]})},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return Date.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),BI.parseInt(a)},_alertInEditorValue:function(a){return a>this.options.max&&(a=this.options.min),a<this.options.min&&(a=this.options.max),a=a<10?"0"+a:a},_finetuning:function(a){var b=BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));this.editor.setValue(this._alertInEditorValue(b+a))},getValue:function(){var a=this.editor.getValue();return this._alertOutEditorValue(a)},setValue:function(a){this.editor.setValue(this._alertInEditorValue(a)),this._finetuning(0)}}),BI.DateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.date_time_select",BI.DateTimeSelect),BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger", +min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:b.triggerWidth},{el:this.text}]})},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=new Date,b=c.print("%Y-%X-%d %H:%M:%S");else{var d=new Date(c.year,c.month,c.day,c.hour,c.minute,c.second);b=d.print("%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.DirectionPathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#808080",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.DirectionPathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",items:[]})},_init:function(){BI.DirectionPathChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pathChooser=BI.createWidget({type:"bi.path_chooser",element:this,items:b.items}),this.pathChooser.on(BI.PathChooser.EVENT_CHANGE,function(b,c){a._setValue(b,c),a.fireEvent(BI.DirectionPathChooser.EVENT_CHANGE)}),this._drawArrows()},_unselectAllArrows:function(){var a=this._const.lineColor;BI.each(this.arrows,function(b,c){BI.each(c,function(b,c){BI.each(c,function(b,c){c.attr({fill:a,stroke:a})})})})},_drawOneArrow:function(a,b){var c=this._const.lineColor,d=(this._const.selectLineColor,this.pathChooser.svg),e="";switch(b){case 0:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y+5)+"L"+(a.x+3)+","+(a.y+5)+"L"+a.x+","+a.y;break;case 1:e="M"+a.x+","+a.y+"L"+(a.x-5)+","+(a.y-3)+"L"+(a.x-5)+","+(a.y+3)+"L"+a.x+","+a.y;break;case 2:e="M"+a.x+","+a.y+"L"+(a.x-3)+","+(a.y-5)+"L"+(a.x+3)+","+(a.y-5)+"L"+a.x+","+a.y;break;case 3:e="M"+a.x+","+a.y+"L"+(a.x+5)+","+(a.y-3)+"L"+(a.x+5)+","+(a.y+3)+"L"+a.x+","+a.y}return d.path(e).attr({fill:c,stroke:c})},_drawArrows:function(){function a(a,b){return b===-1?100*(a+1)-20:100*a+20}function b(a,b){var c=BI.find(a,function(c,d){if(c>0&&a[c-1].x<b&&a[c].x>b)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a<i.length-1){var e;b.y===i[a-1].y?i[a+1].y!=b.y&&(f[h[h.length-2]].direction===-1?a-1>0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a<b-1},_createChildValue:function(a,b){return a+"_"+b},populate:function(a){BI.DownListPopup.superclass.populate.apply(this,arguments);var b=this;b.childValueMap={},b.fatherValueMap={},b.singleValues=[];var c=b._createChildren(a),d=BI.createItems(c,{},{adjustLength:-2});b.popup.populate(d)},setValue:function(a){var b=this,c=[];BI.each(a,function(a,d){var e;e=BI.isNotNull(d.childValue)?b._createChildValue(d.value,d.childValue):d.value,c.push(e)}),this.popup.setValue(c)},getValue:function(){var a=this,b=[],c=this.popup.getValue();return BI.each(c,function(c,d){var e={};if(BI.isNotNull(a.childValueMap[d])){var f=a.fatherValueMap[d];e.childValue=a.childValueMap[d],e.value=f}else e.value=d;b.push(e)}),b}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),BI.ExcelTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-cell",text:""})},_init:function(){BI.ExcelTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_cell",BI.ExcelTableCell),BI.ExcelTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table-header-cell bi-background",text:""})},_init:function(){BI.ExcelTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:BI.HorizontalAlign.Center,whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.excel_table_header_cell",BI.ExcelTableHeaderCell),BI.ExcelTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-excel-table",el:{type:"bi.responsive_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:37,footerRowSize:37,rowSize:37,regionColumnSize:!1,items:[]})},_init:function(){BI.ExcelTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[];BI.each(b.mergeCols,function(a,b){c.push(b+1)}),this.table=BI.createWidget(b.el,{type:"bi.table_view",element:this,isNeedFreeze:!1,isNeedMerge:b.isNeedMerge,mergeCols:c,mergeRule:b.mergeRule,columnSize:[""].concat(b.columnSize),headerRowSize:18,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize||[82,""]}),BI.isNotEmptyArray(b.items)&&this.populate(b.items),BI.nextTick(function(){a.setRegionColumnSize(b.regionColumnSize||[82,""])})},resize:function(){this.table.resize()},setColumnSize:function(a){this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},resizeHeader:function(){this.table.resize(),this.table._resizeHeader&&this.table._resizeHeader()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.ExcelTable.superclass.attr.apply(this,arguments),a){case"mergeCols":var d=[];BI.each(b,function(a,b){d.push(b+1)}),b=d}this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this.getColumnSize(),c=[],d=[{type:"bi.excel_table_header_cell"}];BI.isNotNull(a)&&(BI.each(b,function(a,b){d.push({type:"bi.excel_table_header_cell",text:BI.int2Abc(a+1)})}),BI.each(a,function(a,b){c.push([{type:"bi.excel_table_header_cell",text:a+1}].concat(b))})),this.table.populate(c,[d])},destroy:function(){this.table.destroy(),BI.ExcelTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.excel_table",BI.ExcelTable),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID, +items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: +case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn +})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){ +this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d), +a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d<a.length;d++){var e=a[d],f=b.getRegionIndexById(e);c.push(f);var g=b.regions[f];if(d===a.length-1){g.hasItem(e)||g.addItem(e,b.texts[e]);break}(d>0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d<BI.last(c);d++)BI.contains(c,d)||b.regions[d].addItem("")},_createNodes:function(){var a=this,b=this.options;this.store={},this.texts={},this.start=[],this.end=[],BI.each(b.items,function(b,c){a.start.push(BI.first(c).value),a.end.push(BI.last(c).value)}),this.start=BI.uniq(this.start),this.end=BI.uniq(this.end);var c=[],d=new BI.Tree,e={},f=0;BI.each(b.items,function(b,c){BI.each(c,function(b,g){BI.has(e,g.value)||(e[g.value]=0),e[g.value]++,f=Math.max(f,e[g.value]);var h={};b>0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h<e;h++)c[h]=c[h+1];c[e]=g}}else c.push(d.get("region"))})}),this._createRegions(c),BI.each(e,function(a,b){b<f&&delete e[a]});for(var g=[],h=d.getRoot();h&&1===h.getChildrenLength();)BI.has(e,h.getChildren()[0].id)?(delete e[h.getChildren()[0].id],h=h.getChildren()[0]):h=null;d.traverse(function(a){BI.has(e,a.id)&&(g.push(a.id),delete e[a.id])});for(var i,j,k={},l=0,m=g.length;l<m+1;l++)0===m?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):l===m?(i=j,j=[],BI.each(this.end,function(a,b){j.push(d.search(b))})):0===l?(i=[],BI.each(this.start,function(a,b){i.push(d.search(b))}),j=[d.search(g[l])]):(i=[d.search(j[0]||d.getRoot(),g[l-1])],j=[d.search(i[0],g[l])]),BI.each(i,function(b,c){d._recursion(c,[c.id],function(b,d){if(BI.contains(j,b)&&(k[c.id]||(k[c.id]=[]),k[c.id].push(d),a._pushNodes(d),j.length<=1))return!0})});this.routes=k,this._drawLines(k)},_unselectAllPath:function(){var a=this;BI.each(this.radios,function(a,b){BI.each(b,function(a,b){b.setSelected(!1)})}),BI.each(this.lines,function(b,c){BI.each(c,function(b,c){c.attr("stroke",a._const.lineColor)})}),BI.each(this.regions,function(a,b){b.reset()})},populate:function(a){this.options.items=a||[];this.empty(),this.options.items.length<=0||(this.svg=BI.createWidget({type:"bi.svg"}),this._createNodes(),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}))},setValue:function(a){this._unselectAllPath();var b=BI.keys(this.routes),c=this,d=[],e=[];BI.each(a,function(a,c){BI.contains(b,c)&&e.length>0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments); +}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.length<a.columnSize.length){var e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]<e.left[e.left.length-1]&&(h[h.length-1]=e.left[e.left.length-1]),i[i.length-1]<e.right[e.right.length-1]&&(i[i.length-1]=e.right[e.right.length-1]),a.table.setColumnSize(h.concat(i))}else if(!this._isAdaptiveColumn()){var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),l=e.sum,m=e.size;m[m.length-1]+=d[0]-l;var n=BI.clone(m);n[n.length-1]="",this.table.setColumnSize(n),e=this._getBlockSize(),m[m.length-1]<e.size[e.size.length-1]&&(m[m.length-1]=e.size[e.size.length-1]),this.table.setColumnSize(m)}},_resizeBody:function(){if(this._isAdaptiveColumn()){var a=this.table.getCalculateColumnSize();this.setColumnSize(a)}},_adjustRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this._getBlockSize(),d=c.sumLeft,e=c.sumRight;(d<b[0]||b[0]>=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.length<a.columnSize.length){var c=this.table.element.width();if(b[0]<15||b[1]<15){var d=a.freezeCols,e=c/3;d.length>a.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h<b.items.length;h++,i++){var j=BI.deepIndexOf(this.renderedKeys,this.start+h),k=h*b.rowSize;if(j>-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls)); +}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;b<c;b++)if(i._isMatch(a.slice(0,a.length-1),a[b],l))return!0;return!1}function g(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(c=c[e],null==c)return!1}return!0}function h(a,b){for(var c=a,d=0;d<b.length;d++){var e=b[d];if(!BI.has(c,e))return!1;if(c=c[e],BI.isEmpty(c))return!0}return!1}var i=this,j=BI.deepClone(a.selectedValues),k=a.notSelectedValue||{},l=a.keyword||"",m=a.parentValues||[];return null==j||BI.isEmpty(j)?void b({}):(c(j),void b(j))},_reqAdjustTreeNode:function(a,b){function c(a,b){if(null==a||BI.isEmpty(a))return!0;var e=!0;return BI.each(a,function(d,g){var h=BI.clone(b);h.push(d),c(a[d],h)||(BI.each(a[d],function(a,b){var c=BI.clone(h);c.push(a),f.push(c)}),e=!1)}),e&&d(a,b)}function d(a,b){return BI.isEmpty(a)||e._getChildCount(b)===BI.size(a)}var e=this,f=[],g=a.selectedValues;if(null==g||BI.isEmpty(g))return void b({});BI.each(g,function(a,b){f.push([a])}),c(g,[]);var h={};BI.each(f,function(a,b){e._buildTree(h,b)}),b(h)},_reqInitTreeNode:function(a,b){function c(){var a=j._getChildren([]),b=a.length;if(""!==n){for(var c=0,e=b;c<e;c++)if(a[c].value===n){b=c+1;break}}else b=0;for(var f=[],g=b,e=a.length;g<e;g++){if(f.length<j._const.perPage)var h=d(1,[],a[g].value,!1,k);else if(f.length===j._const.perPage)var h=d(1,[],a[g].value,!1,[]);if(h[0]===!0&&f.push(a[g].value),f.length>j._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m<g*this._const.perPage;m++){var n=d(l[m].value,i,k,h);f.push({id:l[m].id,pId:l[m].pId,value:l[m].value,text:l[m].text,times:1,isParent:l[m].getChildrenLength()>0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d<e;d++){if(null==c)return null;c=c[b[d]]}return c},_deleteNode:function(a,b){var c=b[b.length-1],d=b.slice(0,b.length-1),e=this._getNode(a,d);if(null!=e&&e[c])for(delete e[c];d.length>0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d<b*this._const.perPage;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return b*this._const.perPage<a.length},_itemsCreator:function(a,b){function c(c){var e=(a.keywords||[]).slice();if(a.keyword&&e.push(a.keyword),BI.each(e,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var f=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!f[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:d._getItemsByTimes(c,a.times),hasNext:d._hasNextByTimes(c,a.times)})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){var a=this.combo.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_CONFIRM="ValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo),BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this.items=b.items,this.populate())},setValue:function(a){this.list.setValue(a)},getValue:function(){var a=this.list.getValue()||{};return{type:a.type,value:a.value}},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="ValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane); \ No newline at end of file diff --git a/dist/demo.js b/dist/demo.js index 9f9c13df8..5f2b0d304 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -4487,41 +4487,7 @@ Demo.BorderLayout = BI.inherit(BI.Widget, { } } }); -BI.shortcut("demo.border", Demo.BorderLayout);/** - * Created by User on 2017/3/22. - */ -Demo.CenterLayout = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-center" - }, - render: function () { - return { - type: "bi.center", - items: [{ - type: "bi.label", - text: "Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局", - cls: "layout-bg1", - whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", - cls: "layout-bg2", - whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 3", - cls: "layout-bg3" - },{ - type: "bi.label", - text: "Center 4", - cls: "layout-bg5" - }], - hgap: 20, - vgap: 20 - } - } -}); -BI.shortcut("demo.center_layout", Demo.CenterLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, { +BI.shortcut("demo.border", Demo.BorderLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, { props: { baseCls: "demo-absolute" }, @@ -4604,6 +4570,40 @@ BI.shortcut("demo.center_layout", Demo.CenterLayout);Demo.CenterAdapt = BI.inher BI.shortcut("demo.center_adapt", Demo.CenterAdapt);/** * Created by User on 2017/3/22. */ +Demo.CenterLayout = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-center" + }, + render: function () { + return { + type: "bi.center", + items: [{ + type: "bi.label", + text: "Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局", + cls: "layout-bg1", + whiteSpace: "normal" + },{ + type: "bi.label", + text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", + cls: "layout-bg2", + whiteSpace: "normal" + },{ + type: "bi.label", + text: "Center 3", + cls: "layout-bg3" + },{ + type: "bi.label", + text: "Center 4", + cls: "layout-bg5" + }], + hgap: 20, + vgap: 20 + } + } +}); +BI.shortcut("demo.center_layout", Demo.CenterLayout);/** + * Created by User on 2017/3/22. + */ Demo.FloatCenterLayout = BI.inherit(BI.Widget, { props: { baseCls: "demo-float-center" @@ -4848,55 +4848,6 @@ Demo.GridLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.grid", Demo.GridLayout);/** - * Created by User on 2017/3/21. - */ -Demo.Horizontal = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-horizontal" - }, - render: function () { - return { - type: "bi.vertical", - items: [{ - type: "bi.horizontal", - items: [{ - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg1", - text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", - height: 30 - }, - left: 0, - right: 0 - }], - width: 100, - height: 30 - }, { - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg2", - text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", - height: 30 - }, - left: 0, - right: 0 - }], - width: 200, - height: 30 - }] - }], - lgap: 20, - rgap: 80, - tgap: 80, - bgap: 50 - } - } -}); -BI.shortcut("demo.horizontal", Demo.Horizontal);/** * Created by User on 2017/3/22. */ Demo.HorizontalAdapt = BI.inherit(BI.Widget, { @@ -5013,6 +4964,55 @@ Demo.HorizontalFloat = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.horizontal_float", Demo.HorizontalFloat);/** + * Created by User on 2017/3/21. + */ +Demo.Horizontal = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-horizontal" + }, + render: function () { + return { + type: "bi.vertical", + items: [{ + type: "bi.horizontal", + items: [{ + type: "bi.absolute", + items: [{ + el: { + type: "bi.text_button", + cls: "layout-bg1", + text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", + height: 30 + }, + left: 0, + right: 0 + }], + width: 100, + height: 30 + }, { + type: "bi.absolute", + items: [{ + el: { + type: "bi.text_button", + cls: "layout-bg2", + text: "这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)这里设置了lgap(左边距),rgap(右边距),tgap(上边距),bgap(下边距)", + height: 30 + }, + left: 0, + right: 0 + }], + width: 200, + height: 30 + }] + }], + lgap: 20, + rgap: 80, + tgap: 80, + bgap: 50 + } + } +}); +BI.shortcut("demo.horizontal", Demo.Horizontal);/** * Created by User on 2017/3/22. */ Demo.HtapeLayout = BI.inherit(BI.Widget, { @@ -5358,30 +5358,6 @@ Demo.TdLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.td", Demo.TdLayout);/** - * Created by User on 2017/3/21. - */ -Demo.VerticalLayout = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-vertical" - }, - render: function () { - return { - type: "bi.vertical", - items: [{ - type: "bi.label", - cls: "layout-bg1", - text: "这里设置了hgap(水平间距),vgap(垂直间距)", - height: 30 - }, { - type: "bi.label", - cls: "layout-bg2", - text: "这里设置了hgap(水平间距),vgap(垂直间距)", - height: 30 - }] - } - } -}); -BI.shortcut("demo.vertical", Demo.VerticalLayout);/** * Created by User on 2017/3/22. */ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, { @@ -5423,6 +5399,30 @@ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, { } }); BI.shortcut("demo.vertical_adapt", Demo.VerticalAdaptLayout);/** + * Created by User on 2017/3/21. + */ +Demo.VerticalLayout = BI.inherit(BI.Widget, { + props: { + baseCls: "demo-vertical" + }, + render: function () { + return { + type: "bi.vertical", + items: [{ + type: "bi.label", + cls: "layout-bg1", + text: "这里设置了hgap(水平间距),vgap(垂直间距)", + height: 30 + }, { + type: "bi.label", + cls: "layout-bg2", + text: "这里设置了hgap(水平间距),vgap(垂直间距)", + height: 30 + }] + } + } +}); +BI.shortcut("demo.vertical", Demo.VerticalLayout);/** * Created by User on 2017/3/22. */ Demo.VtapeLayout = BI.inherit(BI.Widget, { From 048cef3b162daa9f701f7f9a3c895ce7882e20f6 Mon Sep 17 00:00:00 2001 From: Urthur <urthur@fanruan.com> Date: Tue, 12 Sep 2017 18:11:55 +0800 Subject: [PATCH 11/14] slider update --- bi/slider.js | 17 +++++++++++------ dist/slider.js | 17 +++++++++++------ src/addons/slider/singleslider/singleslider.js | 17 +++++++++++------ 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/bi/slider.js b/bi/slider.js index f65d80897..4bcc063db 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -46,13 +46,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-slider bi-slider-track", - digit: 3 + digit: "" }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; var c = this._constant; this.enable = false; this.value = ""; @@ -81,7 +82,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -118,7 +120,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -140,11 +143,12 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - this.setValue(v.toFixed(o.digit)); - self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + this.setValue(v); + self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); @@ -266,8 +270,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { setValue: function (v) { var o = this.options; + var digitExist = (o.digit === "") ? false : true; var value = BI.parseFloat(v); - value = value.toFixed(o.digit); + value = digitExist ? value.toFixed(o.digit) : value; if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; diff --git a/dist/slider.js b/dist/slider.js index f65d80897..4bcc063db 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -46,13 +46,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-slider bi-slider-track", - digit: 3 + digit: "" }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; var c = this._constant; this.enable = false; this.value = ""; @@ -81,7 +82,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -118,7 +120,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -140,11 +143,12 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - this.setValue(v.toFixed(o.digit)); - self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + this.setValue(v); + self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); @@ -266,8 +270,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { setValue: function (v) { var o = this.options; + var digitExist = (o.digit === "") ? false : true; var value = BI.parseFloat(v); - value = value.toFixed(o.digit); + value = digitExist ? value.toFixed(o.digit) : value; if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; diff --git a/src/addons/slider/singleslider/singleslider.js b/src/addons/slider/singleslider/singleslider.js index 5547135e4..8dfbc19de 100644 --- a/src/addons/slider/singleslider/singleslider.js +++ b/src/addons/slider/singleslider/singleslider.js @@ -14,13 +14,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-single-slider bi-slider-track", - digit: 3 + digit: "" }); }, _init: function () { BI.SingleSlider.superclass._init.apply(this, arguments); var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; var c = this._constant; this.enable = false; this.value = ""; @@ -49,7 +50,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 self._setBlueTrack(significantPercent); self._setLabelPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -86,7 +88,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); - var v = self._getValueByPercent(significantPercent).toFixed(o.digit); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; self.label.setValue(v); self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); @@ -108,11 +111,12 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { var v = BI.parseFloat(this.getValue()); - this.setValue(v.toFixed(o.digit)); - self.value = v.toFixed(o.digit); var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + this.setValue(v); + self.value = v; self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); @@ -234,8 +238,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { setValue: function (v) { var o = this.options; + var digitExist = (o.digit === "") ? false : true; var value = BI.parseFloat(v); - value = value.toFixed(o.digit); + value = digitExist ? value.toFixed(o.digit) : value; if ((!isNaN(value))) { if (this._checkValidation(value)) { this.value = value; From 0106fed642a0af92cef3b57739387823b99bde95 Mon Sep 17 00:00:00 2001 From: iapyang <yklorse@gmail.com> Date: Tue, 12 Sep 2017 18:46:23 +0800 Subject: [PATCH 12/14] update docs --- docs/.gitignore | 14 + docs/base/bubble.html | 21 +- docs/base/button/button.html | 25 +- docs/base/button/icon_button.html | 21 +- docs/base/button/image_button.html | 23 +- docs/base/button/text_button.html | 23 +- docs/base/canvas.html | 21 +- docs/base/editor/code_editor.html | 21 +- docs/base/editor/editor.html | 28 +- docs/base/editor/formula_editor.html | 39 +- docs/base/editor/multifile_editor.html | 23 +- docs/base/editor/textarea_editor.html | 21 +- docs/base/label.html | 27 +- docs/base/message.html | 21 +- docs/base/pager.html | 21 +- docs/base/svg.html | 21 +- docs/base/table/collection_table.html | 23 +- docs/base/table/grid_table.html | 21 +- docs/base/table/resizable_table.html | 21 +- docs/base/table/table_view.html | 21 +- docs/base/toast.html | 21 +- docs/case/button/multi_select_item.html | 25 +- docs/case/button/single_select_item.html | 23 +- .../case/button/single_select_radio_item.html | 21 +- docs/case/calendar.html | 21 +- docs/case/clipboard.html | 21 +- docs/case/color_chooser.html | 23 +- docs/case/color_chooser_popup.html | 2556 +++++++ docs/case/combo/bubble_combo.html | 21 +- docs/case/combo/formula_combo.md | 38 - docs/case/combo/icon_combo.html | 23 +- docs/case/combo/static_combo.html | 25 +- docs/case/combo/text_value_combo.html | 2576 ++++++++ .../case/combo/text_value_downlist_combo.html | 25 +- docs/case/complex_canvas.html | 21 +- docs/case/editor/shelter_editor.html | 26 +- docs/case/editor/sign_editor.html | 21 +- docs/case/editor/sign_initial_editor.html | 23 +- docs/case/editor/state_editor.html | 21 +- docs/case/layer/layer_panel.html | 21 +- docs/case/layer/multi_popup_layer.html | 21 +- docs/case/layer/pane_list.html | 23 +- docs/case/layer/panel.html | 25 +- docs/case/list/list.select.html | 21 +- docs/case/loader/lazy_loader.html | 23 +- docs/case/loader/list_loader.html | 23 +- docs/case/loader/sort_list.html | 21 +- docs/case/pager/all_count_pager.html | 21 +- docs/case/pager/direction_pager.html | 21 +- docs/case/segment.html | 46 +- docs/case/shelter_editor.md | 2 + docs/case/table/adaptive_table.html | 21 +- docs/case/table/layer_tree_table.html | 21 +- docs/case/table/tree_table.html | 21 +- docs/case/tree/branch_relation.html | 21 +- docs/case/tree/branch_tree.html | 21 +- docs/case/tree/display_tree.html | 23 +- docs/case/tree/handstand_branch_tree.html | 21 +- docs/case/tree/level_tree.html | 21 +- docs/case/tree/simple_tree.html | 21 +- docs/case/trigger/editor_trigger.html | 21 +- docs/case/trigger/icon_trigger.html | 21 +- docs/case/trigger/text_trigger.html | 21 +- docs/core/abstract/button_group.html | 21 +- docs/core/abstract/button_tree.html | 21 +- docs/core/abstract/collection_view.html | 31 +- docs/core/abstract/custom_tree.html | 29 +- docs/core/abstract/grid_view.html | 33 +- docs/core/abstract/virtual_group.html | 25 +- docs/core/abstract/virtual_list.html | 27 +- docs/core/basic_button.html | 21 +- docs/core/combination/bi.combo.html | 23 +- docs/core/combination/bi.expander.html | 49 +- docs/core/combination/group_combo.html | 44 +- docs/core/combination/loader.html | 49 +- docs/core/combination/navigation.html | 25 +- docs/core/combination/searcher.html | 21 +- docs/core/combination/switcher.html | 21 +- docs/core/combination/tab.html | 23 +- docs/core/layer/layer_float_box.html | 21 +- docs/core/layer/layer_popup.html | 25 +- docs/core/layer/layer_searcher.html | 25 +- docs/core/layout/border.html | 21 +- docs/core/layout/center.html | 29 +- docs/core/layout/center_adapt.html | 21 +- docs/core/layout/float_center.html | 21 +- docs/core/layout/flow.html | 21 +- docs/core/layout/grid.html | 21 +- docs/core/layout/horizontal.html | 57 +- docs/core/layout/horizontal_adapt.html | 21 +- docs/core/layout/horizontal_auto.html | 21 +- docs/core/layout/horizontal_float.html | 21 +- docs/core/layout/htape.html | 21 +- docs/core/layout/inline.md | 2 - .../layout/left_right_vertical_adapt.html | 21 +- docs/core/layout/table.html | 21 +- docs/core/layout/td.html | 21 +- docs/core/layout/vertical.html | 21 +- docs/core/layout/vertical_adapt.html | 21 +- docs/core/layout/vtape.html | 21 +- docs/core/node_button.html | 21 +- docs/core/pane.html | 25 +- docs/core/single.html | 21 +- docs/core/widget.html | 25 +- docs/detailed/bi.button/general.html | 21 +- docs/detailed/bi.button/items.html | 21 +- docs/detailed/bi.button/node.html | 21 +- docs/detailed/bi.button/segment.html | 21 +- docs/detailed/bi.button/tooltip.html | 21 +- .../combo/multilayer_select_tree_combo.html | 21 +- .../combo/multilayer_single_tree_combo.html | 21 +- docs/detailed/combo/select_tree_combo.html | 21 +- docs/detailed/combo/single_tree_combo.html | 23 +- docs/detailed/date/custom_date_time.html | 22 +- docs/detailed/date/date_combo.html | 21 +- docs/detailed/date/date_pane_widget.html | 24 +- docs/detailed/date/year_month_combo.html | 29 +- docs/detailed/date/year_quarter_combo.html | 25 +- docs/detailed/dialog.html | 28 +- docs/detailed/down_list_combo.html | 23 +- docs/detailed/file_manager.html | 41 +- docs/detailed/month_combo.html | 23 +- docs/detailed/multi_select_combo.html | 55 +- docs/detailed/numeric_interval.html | 23 +- .../detailed/path/direction_path_chooser.html | 24 +- docs/detailed/path/path_chooser.html | 24 +- docs/detailed/quarter_combo.html | 23 +- docs/detailed/relation_view.html | 21 +- docs/detailed/slider.html | 34 +- docs/detailed/table/bi.excel_table.html | 21 +- docs/detailed/table/bi.page_table.html | 21 +- docs/detailed/table/bi.preview_table.html | 21 +- docs/detailed/table/bi.responsive_table.html | 21 +- docs/detailed/text_input/bi.clear_editor.html | 28 +- .../detailed/text_input/bi.search_editor.html | 28 +- docs/detailed/text_input/bi.text_editor.html | 28 +- .../text_input/finetuning_number_editor.html | 21 +- docs/detailed/tree/bi.multi_tree_combo.html | 21 +- docs/detailed/tree/bi.switch_tree.html | 21 +- docs/detailed/year_combo.html | 23 +- docs/index.html | 21 +- docs/package-lock.json | 5851 +++++++++++++++++ docs/search_index.json | 2 +- 143 files changed, 13497 insertions(+), 800 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/case/color_chooser_popup.html delete mode 100644 docs/case/combo/formula_combo.md create mode 100644 docs/case/combo/text_value_combo.html create mode 100644 docs/case/shelter_editor.md delete mode 100644 docs/core/layout/inline.md create mode 100644 docs/package-lock.json diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..db96e3624 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,14 @@ +.DS_Store +.svn +.sass-cache +.vscode +.tmp +node_modules +bower_components +tmp +dist +archive +archive.zip +*.log +_book +test \ No newline at end of file diff --git a/docs/base/bubble.html b/docs/base/bubble.html index a8a399daa..5bbfce716 100644 --- a/docs/base/bubble.html +++ b/docs/base/bubble.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2482,7 +2495,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"bubble","level":"3.2","depth":1,"next":{"title":"toast","level":"3.3","depth":1,"path":"base/toast.md","ref":"base/toast.md","articles":[]},"previous":{"title":"label","level":"3.1","depth":1,"path":"base/label.md","ref":"base/label.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/bubble.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"bubble","level":"3.2","depth":1,"next":{"title":"toast","level":"3.3","depth":1,"path":"base/toast.md","ref":"base/toast.md","articles":[]},"previous":{"title":"label","level":"3.1","depth":1,"path":"base/label.md","ref":"base/label.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/bubble.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/button/button.html b/docs/base/button/button.html index 49378e67d..f01a82d4f 100644 --- a/docs/base/button/button.html +++ b/docs/base/button/button.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2499,10 +2512,10 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">shadow</td> -<td style="text-align:left"></td> +<td style="text-align:left">是否显示阴影</td> <td style="text-align:left">boolean</td> <td style="text-align:left">true,false</td> -<td style="text-align:left"></td> +<td style="text-align:left">props.clear !== true</td> </tr> <tr> <td style="text-align:left">isShadowShowingOnSelected</td> @@ -2662,7 +2675,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"button","level":"3.5.1","depth":2,"next":{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},"previous":{"title":"按钮","level":"3.5","depth":1,"ref":"","articles":[{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/button.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"button","level":"3.5.1","depth":2,"next":{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},"previous":{"title":"按钮","level":"3.5","depth":1,"ref":"","articles":[{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/button.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/button/icon_button.html b/docs/base/button/icon_button.html index 4a352e0d6..26b13abc0 100644 --- a/docs/base/button/icon_button.html +++ b/docs/base/button/icon_button.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2474,7 +2487,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"icon_button","level":"3.5.3","depth":2,"next":{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]},"previous":{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/icon_button.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"icon_button","level":"3.5.3","depth":2,"next":{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]},"previous":{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/icon_button.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/button/image_button.html b/docs/base/button/image_button.html index 701fe7837..4abccbcba 100644 --- a/docs/base/button/image_button.html +++ b/docs/base/button/image_button.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2384,7 +2397,7 @@ <div class="api-method"><div class="api-method-definition"><p><a href="https://jsfiddle.net/fineui/yc0g9gLw/" target="_blank">source</a></p> </div><div class="api-method-code"><div class="api-method-example"><pre><code class="lang-javascript"> BI.createWidget({ - type: <span class="hljs-string">'bi.image_button'</span>, + type: <span class="hljs-string">'bi.image_button'</span>, src: <span class="hljs-string">"http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128"</span>, width: <span class="hljs-number">100</span>, height: <span class="hljs-number">100</span> @@ -2519,7 +2532,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"image_button","level":"3.5.4","depth":2,"next":{"title":"编辑框","level":"3.6","depth":1,"ref":"","articles":[{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]}]},"previous":{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/image_button.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"image_button","level":"3.5.4","depth":2,"next":{"title":"编辑框","level":"3.6","depth":1,"ref":"","articles":[{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]}]},"previous":{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/image_button.md","mtime":"2017-09-07T01:24:43.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/button/text_button.html b/docs/base/button/text_button.html index 4e14747d7..b0ebc27e4 100644 --- a/docs/base/button/text_button.html +++ b/docs/base/button/text_button.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2464,7 +2477,7 @@ BI.createWidget({ <tbody> <tr> <td style="text-align:left">py</td> -<td style="text-align:left"></td> +<td style="text-align:left">拼音</td> <td style="text-align:left">string</td> <td style="text-align:left"></td> <td style="text-align:left">" "</td> @@ -2578,7 +2591,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"text_button","level":"3.5.2","depth":2,"next":{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},"previous":{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/text_button.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"text_button","level":"3.5.2","depth":2,"next":{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},"previous":{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/button/text_button.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/canvas.html b/docs/base/canvas.html index d37ad8cb9..ea2fbf0ec 100644 --- a/docs/base/canvas.html +++ b/docs/base/canvas.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2481,7 +2494,7 @@ canvas.stroke(); <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"canvas","level":"3.10","depth":1,"next":{"title":"按钮","level":"4.1","depth":1,"ref":"","articles":[{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]}]},"previous":{"title":"svg","level":"3.9","depth":1,"path":"base/svg.md","ref":"base/svg.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/canvas.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"canvas","level":"3.10","depth":1,"next":{"title":"按钮","level":"4.1","depth":1,"ref":"","articles":[{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]}]},"previous":{"title":"svg","level":"3.9","depth":1,"path":"base/svg.md","ref":"base/svg.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/canvas.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/editor/code_editor.html b/docs/base/editor/code_editor.html index dc0db75e6..251bf0b69 100644 --- a/docs/base/editor/code_editor.html +++ b/docs/base/editor/code_editor.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2535,7 +2548,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"code_editor","level":"3.6.2","depth":2,"next":{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},"previous":{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/code_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"code_editor","level":"3.6.2","depth":2,"next":{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},"previous":{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/code_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/editor/editor.html b/docs/base/editor/editor.html index 6641c061b..a618812d9 100644 --- a/docs/base/editor/editor.html +++ b/docs/base/editor/editor.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2463,13 +2476,6 @@ BI.createWidget({ <td style="text-align:left">—</td> </tr> <tr> -<td style="text-align:left">mouseOut</td> -<td style="text-align:left"></td> -<td style="text-align:left">boolean</td> -<td style="text-align:left">true,false</td> -<td style="text-align:left">false</td> -</tr> -<tr> <td style="text-align:left">allowBlank</td> <td style="text-align:left">是否允许空值</td> <td style="text-align:left">boolean</td> @@ -2716,7 +2722,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"editor","level":"3.6.1","depth":2,"next":{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},"previous":{"title":"编辑框","level":"3.6","depth":1,"ref":"","articles":[{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"editor","level":"3.6.1","depth":2,"next":{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},"previous":{"title":"编辑框","level":"3.6","depth":1,"ref":"","articles":[{"title":"editor","level":"3.6.1","depth":2,"path":"base/editor/editor.md","ref":"base/editor/editor.md","articles":[]},{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/editor.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/editor/formula_editor.html b/docs/base/editor/formula_editor.html index 22032a876..43af9426a 100644 --- a/docs/base/editor/formula_editor.html +++ b/docs/base/editor/formula_editor.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2423,17 +2436,17 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">fieldTextValueMap</td> -<td style="text-align:left"></td> -<td style="text-align:left">string</td> +<td style="text-align:left">字段集合</td> +<td style="text-align:left">onject</td> <td style="text-align:left">—</td> <td style="text-align:left">{}</td> </tr> <tr> <td style="text-align:left">showHint</td> -<td style="text-align:left"></td> -<td style="text-align:left"></td> -<td style="text-align:left">—</td> -<td style="text-align:left">2</td> +<td style="text-align:left">是否显示提示信息</td> +<td style="text-align:left">boolean</td> +<td style="text-align:left">true,false</td> +<td style="text-align:left">true</td> </tr> <tr> <td style="text-align:left">lineHeight</td> @@ -2491,7 +2504,7 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">getFormulaString</td> -<td style="text-align:left">获取公式</td> +<td style="text-align:left">获取公式框内容</td> <td style="text-align:left">—</td> </tr> <tr> @@ -2501,7 +2514,7 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">getCheckString</td> -<td style="text-align:left"></td> +<td style="text-align:left">获取校验内容</td> <td style="text-align:left">—</td> </tr> <tr> @@ -2516,7 +2529,7 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">setFieldTextValueMap</td> -<td style="text-align:left"></td> +<td style="text-align:left">设置字段集合</td> <td style="text-align:left">fieldTextValueMap</td> </tr> <tr> @@ -2560,7 +2573,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"formula_editor","level":"3.6.5","depth":2,"next":{"title":"表格","level":"3.7","depth":1,"ref":"","articles":[{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]}]},"previous":{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/formula_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"formula_editor","level":"3.6.5","depth":2,"next":{"title":"表格","level":"3.7","depth":1,"ref":"","articles":[{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]}]},"previous":{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/formula_editor.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/editor/multifile_editor.html b/docs/base/editor/multifile_editor.html index a60d128f6..9bc18d85f 100644 --- a/docs/base/editor/multifile_editor.html +++ b/docs/base/editor/multifile_editor.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2422,7 +2435,7 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">accept</td> -<td style="text-align:left"></td> +<td style="text-align:left">允许上传的文件类型</td> <td style="text-align:left">string</td> <td style="text-align:left">—</td> <td style="text-align:left">" "</td> @@ -2525,7 +2538,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"multifile_editor","level":"3.6.3","depth":2,"next":{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},"previous":{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/multifile_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"multifile_editor","level":"3.6.3","depth":2,"next":{"title":"textarea_editor","level":"3.6.4","depth":2,"path":"base/editor/textarea_editor.md","ref":"base/editor/textarea_editor.md","articles":[]},"previous":{"title":"code_editor","level":"3.6.2","depth":2,"path":"base/editor/code_editor.md","ref":"base/editor/code_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/multifile_editor.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/editor/textarea_editor.html b/docs/base/editor/textarea_editor.html index cd80a90cc..60abf3d61 100644 --- a/docs/base/editor/textarea_editor.html +++ b/docs/base/editor/textarea_editor.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2491,7 +2504,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"textarea_editor","level":"3.6.4","depth":2,"next":{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]},"previous":{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/textarea_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"textarea_editor","level":"3.6.4","depth":2,"next":{"title":"formula_editor","level":"3.6.5","depth":2,"path":"base/editor/formula_editor.md","ref":"base/editor/formula_editor.md","articles":[]},"previous":{"title":"multifile_editor","level":"3.6.3","depth":2,"path":"base/editor/multifile_editor.md","ref":"base/editor/multifile_editor.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/editor/textarea_editor.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/label.html b/docs/base/label.html index 91814c3b2..d8fef737f 100644 --- a/docs/base/label.html +++ b/docs/base/label.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2508,14 +2521,14 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">py</td> -<td style="text-align:left"></td> +<td style="text-align:left">拼音</td> <td style="text-align:left">string</td> <td style="text-align:left">—</td> <td style="text-align:left">空</td> </tr> <tr> <td style="text-align:left">keyword</td> -<td style="text-align:left"></td> +<td style="text-align:left">设置标红的关键词</td> <td style="text-align:left">string</td> <td style="text-align:left">—</td> <td style="text-align:left">空</td> @@ -2595,7 +2608,7 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">populate</td> -<td style="text-align:left"></td> +<td style="text-align:left">清空label</td> <td style="text-align:left">—</td> </tr> </tbody> @@ -2634,7 +2647,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"label","level":"3.1","depth":1,"next":{"title":"bubble","level":"3.2","depth":1,"path":"base/bubble.md","ref":"base/bubble.md","articles":[]},"previous":{"title":"pane","level":"2.9","depth":1,"path":"core/pane.md","ref":"core/pane.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/label.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"label","level":"3.1","depth":1,"next":{"title":"bubble","level":"3.2","depth":1,"path":"base/bubble.md","ref":"base/bubble.md","articles":[]},"previous":{"title":"pane","level":"2.9","depth":1,"path":"core/pane.md","ref":"core/pane.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/label.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/message.html b/docs/base/message.html index 05d76f0a9..4209e23cd 100644 --- a/docs/base/message.html +++ b/docs/base/message.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2464,7 +2477,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"message","level":"3.4","depth":1,"next":{"title":"按钮","level":"3.5","depth":1,"ref":"","articles":[{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]}]},"previous":{"title":"toast","level":"3.3","depth":1,"path":"base/toast.md","ref":"base/toast.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/message.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"message","level":"3.4","depth":1,"next":{"title":"按钮","level":"3.5","depth":1,"ref":"","articles":[{"title":"button","level":"3.5.1","depth":2,"path":"base/button/button.md","ref":"base/button/button.md","articles":[]},{"title":"text_button","level":"3.5.2","depth":2,"path":"base/button/text_button.md","ref":"base/button/text_button.md","articles":[]},{"title":"icon_button","level":"3.5.3","depth":2,"path":"base/button/icon_button.md","ref":"base/button/icon_button.md","articles":[]},{"title":"image_button","level":"3.5.4","depth":2,"path":"base/button/image_button.md","ref":"base/button/image_button.md","articles":[]}]},"previous":{"title":"toast","level":"3.3","depth":1,"path":"base/toast.md","ref":"base/toast.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/message.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/pager.html b/docs/base/pager.html index 9fbcdcc15..bfc80395c 100644 --- a/docs/base/pager.html +++ b/docs/base/pager.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2632,7 +2645,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"pager","level":"3.8","depth":1,"next":{"title":"svg","level":"3.9","depth":1,"path":"base/svg.md","ref":"base/svg.md","articles":[]},"previous":{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/pager.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"pager","level":"3.8","depth":1,"next":{"title":"svg","level":"3.9","depth":1,"path":"base/svg.md","ref":"base/svg.md","articles":[]},"previous":{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/pager.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/svg.html b/docs/base/svg.html index ca8c5b03f..f9ce0481e 100644 --- a/docs/base/svg.html +++ b/docs/base/svg.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2538,7 +2551,7 @@ svg.path(<span class="hljs-string">"M10,10L50,50M50,10L10,50"</span>) <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"svg","level":"3.9","depth":1,"next":{"title":"canvas","level":"3.10","depth":1,"path":"base/canvas.md","ref":"base/canvas.md","articles":[]},"previous":{"title":"pager","level":"3.8","depth":1,"path":"base/pager.md","ref":"base/pager.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/svg.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"svg","level":"3.9","depth":1,"next":{"title":"canvas","level":"3.10","depth":1,"path":"base/canvas.md","ref":"base/canvas.md","articles":[]},"previous":{"title":"pager","level":"3.8","depth":1,"path":"base/pager.md","ref":"base/pager.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/svg.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/table/collection_table.html b/docs/base/table/collection_table.html index 1c7522d80..a003aaa22 100644 --- a/docs/base/table/collection_table.html +++ b/docs/base/table/collection_table.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2382,7 +2395,7 @@ <section class="normal markdown-section"> <h1 id="bicollectiontable">bi.collection_table</h1> -<h3 id="继承biwidget">继承BI.Widget</h3> +<h3 id="基本的表格-继承biwidget">基本的表格 继承BI.Widget</h3> <div class="api-method"><div class="api-method-definition"><p><a href="https://jsfiddle.net/fineui/x2zxfzhp/" target="_blank">source</a></p> </div><div class="api-method-code"><div class="api-method-example"><pre><code class="lang-javascript">BI.createWidget({ type: <span class="hljs-string">"bi.collection_table"</span>, @@ -2611,7 +2624,7 @@ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"collection_table","level":"3.7.3","depth":2,"next":{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]},"previous":{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/collection_table.md","mtime":"2017-09-05T07:06:21.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"collection_table","level":"3.7.3","depth":2,"next":{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]},"previous":{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/collection_table.md","mtime":"2017-09-07T01:24:43.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/table/grid_table.html b/docs/base/table/grid_table.html index a3a0bb795..f11c1e17b 100644 --- a/docs/base/table/grid_table.html +++ b/docs/base/table/grid_table.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2582,7 +2595,7 @@ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"grid_table","level":"3.7.2","depth":2,"next":{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},"previous":{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/grid_table.md","mtime":"2017-09-05T07:06:11.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"grid_table","level":"3.7.2","depth":2,"next":{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},"previous":{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/grid_table.md","mtime":"2017-09-05T07:06:11.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/table/resizable_table.html b/docs/base/table/resizable_table.html index 6df505017..611f907f5 100644 --- a/docs/base/table/resizable_table.html +++ b/docs/base/table/resizable_table.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2630,7 +2643,7 @@ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"resizable_table","level":"3.7.4","depth":2,"next":{"title":"pager","level":"3.8","depth":1,"path":"base/pager.md","ref":"base/pager.md","articles":[]},"previous":{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/resizable_table.md","mtime":"2017-09-05T07:06:29.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"resizable_table","level":"3.7.4","depth":2,"next":{"title":"pager","level":"3.8","depth":1,"path":"base/pager.md","ref":"base/pager.md","articles":[]},"previous":{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/resizable_table.md","mtime":"2017-09-05T07:06:29.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/table/table_view.html b/docs/base/table/table_view.html index 6e8744997..82cf363f8 100644 --- a/docs/base/table/table_view.html +++ b/docs/base/table/table_view.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../../case/combo/text_value_combo.html"> - <span> + <a href="../../case/combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../../case/color_chooser_popup.html"> + + <a href="../../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../../case/segment.html"> <a href="../../case/segment.html"> @@ -2649,7 +2662,7 @@ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"table_view","level":"3.7.1","depth":2,"next":{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},"previous":{"title":"表格","level":"3.7","depth":1,"ref":"","articles":[{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/table_view.md","mtime":"2017-09-05T06:52:10.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"table_view","level":"3.7.1","depth":2,"next":{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},"previous":{"title":"表格","level":"3.7","depth":1,"ref":"","articles":[{"title":"table_view","level":"3.7.1","depth":2,"path":"base/table/table_view.md","ref":"base/table/table_view.md","articles":[]},{"title":"grid_table","level":"3.7.2","depth":2,"path":"base/table/grid_table.md","ref":"base/table/grid_table.md","articles":[]},{"title":"collection_table","level":"3.7.3","depth":2,"path":"base/table/collection_table.md","ref":"base/table/collection_table.md","articles":[]},{"title":"resizable_table","level":"3.7.4","depth":2,"path":"base/table/resizable_table.md","ref":"base/table/resizable_table.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/table/table_view.md","mtime":"2017-09-05T06:52:10.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/base/toast.html b/docs/base/toast.html index 2f97cfe9d..0e26dce42 100644 --- a/docs/base/toast.html +++ b/docs/base/toast.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../case/combo/text_value_combo.html"> - <span> + <a href="../case/combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../case/segment.html"> + <li class="chapter " data-level="4.14" data-path="../case/color_chooser_popup.html"> + + <a href="../case/color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../case/segment.html"> <a href="../case/segment.html"> @@ -2488,7 +2501,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"toast","level":"3.3","depth":1,"next":{"title":"message","level":"3.4","depth":1,"path":"base/message.md","ref":"base/message.md","articles":[]},"previous":{"title":"bubble","level":"3.2","depth":1,"path":"base/bubble.md","ref":"base/bubble.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/toast.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"toast","level":"3.3","depth":1,"next":{"title":"message","level":"3.4","depth":1,"path":"base/message.md","ref":"base/message.md","articles":[]},"previous":{"title":"bubble","level":"3.2","depth":1,"path":"base/bubble.md","ref":"base/bubble.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"base/toast.md","mtime":"2017-09-05T09:34:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/button/multi_select_item.html b/docs/case/button/multi_select_item.html index d03a497e7..6774a104e 100644 --- a/docs/case/button/multi_select_item.html +++ b/docs/case/button/multi_select_item.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.html"> - <span> + <a href="../combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../segment.html"> + <li class="chapter " data-level="4.14" data-path="../color_chooser_popup.html"> + + <a href="../color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../segment.html"> <a href="../segment.html"> @@ -2420,9 +2433,9 @@ BI.createWidget({ </tr> <tr> <td style="text-align:left">logic</td> -<td style="text-align:left"></td> +<td style="text-align:left">布局逻辑</td> <td style="text-align:left">object</td> -<td style="text-align:left"></td> +<td style="text-align:left">—</td> <td style="text-align:left">{dynamic:false}</td> </tr> </tbody> @@ -2493,7 +2506,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"multi_select_item","level":"4.1.1","depth":2,"next":{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},"previous":{"title":"按钮","level":"4.1","depth":1,"ref":"","articles":[{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/multi_select_item.md","mtime":"2017-09-04T11:33:40.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"multi_select_item","level":"4.1.1","depth":2,"next":{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},"previous":{"title":"按钮","level":"4.1","depth":1,"ref":"","articles":[{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/multi_select_item.md","mtime":"2017-09-07T08:23:24.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/button/single_select_item.html b/docs/case/button/single_select_item.html index e145c37ef..4550ac39e 100644 --- a/docs/case/button/single_select_item.html +++ b/docs/case/button/single_select_item.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.html"> - <span> + <a href="../combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../segment.html"> + <li class="chapter " data-level="4.14" data-path="../color_chooser_popup.html"> + + <a href="../color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../segment.html"> <a href="../segment.html"> @@ -2382,7 +2395,7 @@ <section class="normal markdown-section"> <h1 id="bisingleselectitem">bi.single_select_item</h1> -<h2 id="复选框item基类bibasicbutton">复选框item,基类<a href="../../core/basic_button.html">BI.BasicButton</a></h2> +<h2 id="可以点击的label基类bibasicbutton">可以点击的label,基类<a href="../../core/basic_button.html">BI.BasicButton</a></h2> <div class="api-method"><div class="api-method-definition"><p><a href="https://jsfiddle.net/fineui/19qqcej4/" target="_blank">source</a></p> </div><div class="api-method-code"><div class="api-method-example"><pre><code class="lang-javascript"> BI.createWidget({ @@ -2502,7 +2515,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"single_select_item","level":"4.1.2","depth":2,"next":{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]},"previous":{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/single_select_item.md","mtime":"2017-09-04T11:33:40.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"single_select_item","level":"4.1.2","depth":2,"next":{"title":"single_select_radio_item","level":"4.1.3","depth":2,"path":"case/button/single_select_radio_item.md","ref":"case/button/single_select_radio_item.md","articles":[]},"previous":{"title":"multi_select_item","level":"4.1.1","depth":2,"path":"case/button/multi_select_item.md","ref":"case/button/multi_select_item.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/single_select_item.md","mtime":"2017-09-07T01:24:43.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/button/single_select_radio_item.html b/docs/case/button/single_select_radio_item.html index 5a12c87ce..5f75db58e 100644 --- a/docs/case/button/single_select_radio_item.html +++ b/docs/case/button/single_select_radio_item.html @@ -1430,9 +1430,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="../combo/text_value_combo.html"> - <span> + <a href="../combo/text_value_combo.html"> text_value_combo @@ -1713,7 +1713,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="../segment.html"> + <li class="chapter " data-level="4.14" data-path="../color_chooser_popup.html"> + + <a href="../color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="../segment.html"> <a href="../segment.html"> @@ -2500,7 +2513,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"single_select_radio_item","level":"4.1.3","depth":2,"next":{"title":"编辑框","level":"4.2","depth":1,"ref":"","articles":[{"title":"shelter_editor","level":"4.2.1","depth":2,"path":"case/editor/shelter_editor.md","ref":"case/editor/shelter_editor.md","articles":[]},{"title":"sign_editor","level":"4.2.2","depth":2,"path":"case/editor/sign_editor.md","ref":"case/editor/sign_editor.md","articles":[]},{"title":"sign_initial_editor","level":"4.2.3","depth":2,"path":"case/editor/sign_initial_editor.md","ref":"case/editor/sign_initial_editor.md","articles":[]},{"title":"state_editor","level":"4.2.4","depth":2,"path":"case/editor/state_editor.md","ref":"case/editor/state_editor.md","articles":[]}]},"previous":{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/single_select_radio_item.md","mtime":"2017-09-04T11:33:40.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"../..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"single_select_radio_item","level":"4.1.3","depth":2,"next":{"title":"编辑框","level":"4.2","depth":1,"ref":"","articles":[{"title":"shelter_editor","level":"4.2.1","depth":2,"path":"case/editor/shelter_editor.md","ref":"case/editor/shelter_editor.md","articles":[]},{"title":"sign_editor","level":"4.2.2","depth":2,"path":"case/editor/sign_editor.md","ref":"case/editor/sign_editor.md","articles":[]},{"title":"sign_initial_editor","level":"4.2.3","depth":2,"path":"case/editor/sign_initial_editor.md","ref":"case/editor/sign_initial_editor.md","articles":[]},{"title":"state_editor","level":"4.2.4","depth":2,"path":"case/editor/state_editor.md","ref":"case/editor/state_editor.md","articles":[]}]},"previous":{"title":"single_select_item","level":"4.1.2","depth":2,"path":"case/button/single_select_item.md","ref":"case/button/single_select_item.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/button/single_select_radio_item.md","mtime":"2017-09-04T11:33:40.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"../..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/calendar.html b/docs/case/calendar.html index a59a74f98..3bdbacaa5 100644 --- a/docs/case/calendar.html +++ b/docs/case/calendar.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.html"> - <span> + <a href="combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="segment.html"> + <li class="chapter " data-level="4.14" data-path="color_chooser_popup.html"> + + <a href="color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="segment.html"> <a href="segment.html"> @@ -2507,7 +2520,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"calendar","level":"4.10","depth":1,"next":{"title":"clipboard","level":"4.11","depth":1,"path":"case/clipboard.md","ref":"case/clipboard.md","articles":[]},"previous":{"title":"direction_pager","level":"4.9.2","depth":2,"path":"case/pager/direction_pager.md","ref":"case/pager/direction_pager.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/calendar.md","mtime":"2017-09-05T08:05:18.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"calendar","level":"4.10","depth":1,"next":{"title":"clipboard","level":"4.11","depth":1,"path":"case/clipboard.md","ref":"case/clipboard.md","articles":[]},"previous":{"title":"direction_pager","level":"4.9.2","depth":2,"path":"case/pager/direction_pager.md","ref":"case/pager/direction_pager.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/calendar.md","mtime":"2017-09-05T08:05:18.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/clipboard.html b/docs/case/clipboard.html index f3447a634..bfd1c9cb7 100644 --- a/docs/case/clipboard.html +++ b/docs/case/clipboard.html @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.html"> - <span> + <a href="combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="segment.html"> + <li class="chapter " data-level="4.14" data-path="color_chooser_popup.html"> + + <a href="color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="segment.html"> <a href="segment.html"> @@ -2457,7 +2470,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"clipboard","level":"4.11","depth":1,"next":{"title":"complex_canvas","level":"4.12","depth":1,"path":"case/complex_canvas.md","ref":"case/complex_canvas.md","articles":[]},"previous":{"title":"calendar","level":"4.10","depth":1,"path":"case/calendar.md","ref":"case/calendar.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/clipboard.md","mtime":"2017-09-05T08:07:01.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"clipboard","level":"4.11","depth":1,"next":{"title":"complex_canvas","level":"4.12","depth":1,"path":"case/complex_canvas.md","ref":"case/complex_canvas.md","articles":[]},"previous":{"title":"calendar","level":"4.10","depth":1,"path":"case/calendar.md","ref":"case/calendar.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/clipboard.md","mtime":"2017-09-05T08:07:01.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/color_chooser.html b/docs/case/color_chooser.html index 6a25af12b..37f1d8790 100644 --- a/docs/case/color_chooser.html +++ b/docs/case/color_chooser.html @@ -69,7 +69,7 @@ <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> - <link rel="next" href="segment.html" /> + <link rel="next" href="color_chooser_popup.html" /> <link rel="prev" href="complex_canvas.html" /> @@ -1432,9 +1432,9 @@ </li> - <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.md"> + <li class="chapter " data-level="4.6.4" data-path="combo/text_value_combo.html"> - <span> + <a href="combo/text_value_combo.html"> text_value_combo @@ -1715,7 +1715,20 @@ </li> - <li class="chapter " data-level="4.14" data-path="segment.html"> + <li class="chapter " data-level="4.14" data-path="color_chooser_popup.html"> + + <a href="color_chooser_popup.html"> + + + color_chooser_popup + + </a> + + + + </li> + + <li class="chapter " data-level="4.15" data-path="segment.html"> <a href="segment.html"> @@ -2457,7 +2470,7 @@ BI.createWidget({ <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"color_chooser","level":"4.13","depth":1,"next":{"title":"segment","level":"4.14","depth":1,"path":"case/segment.md","ref":"case/segment.md","articles":[]},"previous":{"title":"complex_canvas","level":"4.12","depth":1,"path":"case/complex_canvas.md","ref":"case/complex_canvas.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/color_chooser.md","mtime":"2017-09-05T08:07:08.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-06T11:08:15.487Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"color_chooser","level":"4.13","depth":1,"next":{"title":"color_chooser_popup","level":"4.14","depth":1,"path":"case/color_chooser_popup.md","ref":"case/color_chooser_popup.md","articles":[]},"previous":{"title":"complex_canvas","level":"4.12","depth":1,"path":"case/complex_canvas.md","ref":"case/complex_canvas.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["jsfiddle","splitter","theme-api","expandable-chapters"],"pluginsConfig":{"jsfiddle":{"type":"script","tabs":["result","js","html"],"height":"100","width":"500","fontColor":"00FF00"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-api":{"languages":[],"split":true,"theme":"light"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"case/color_chooser.md","mtime":"2017-09-05T08:07:08.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-12T10:43:53.831Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> diff --git a/docs/case/color_chooser_popup.html b/docs/case/color_chooser_popup.html new file mode 100644 index 000000000..b58745f98 --- /dev/null +++ b/docs/case/color_chooser_popup.html @@ -0,0 +1,2556 @@ + +<!DOCTYPE HTML> +<html lang="" > + <head> + <meta charset="UTF-8"> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + <title>color_chooser_popup · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    + +
    + +
    + + + + + + + + +
    +
    + +
    +
    + +
    + +

    bi.color_chooser_popup

    +

    选色控件弹窗

    +
    
    +BI.createWidget({
    +    type: "bi.color_chooser_popup",
    +});
    +
    +
    + + + +

    参数

    + + + + + + + + + + + + + + + + + +
    参数说明类型默认值
    height高度number145
    +

    方法

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    方法名说明参数
    setStoreColors设置储存的颜色值colors
    setValue设置颜色值color
    getValue获取颜色值
    +

    事件

    + + + + + + + + + + + + + +
    事件说明
    EVENT_VALUE_CHANGE颜色值改变时触发
    +
    + + +
    + +
    +
    +
    + +

    results matching ""

    +
      + +
      +
      + +

      No results matching ""

      + +
      +
      +
      + +
      +
      + +
      + + + + +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/case/combo/bubble_combo.html b/docs/case/combo/bubble_combo.html index 1bcc11e42..1eece1127 100644 --- a/docs/case/combo/bubble_combo.html +++ b/docs/case/combo/bubble_combo.html @@ -1430,9 +1430,9 @@ -
    • +
    • - + text_value_combo @@ -1713,7 +1713,20 @@
    • -
    • +
    • + + + + + color_chooser_popup + + + + + +
    • + +
    • @@ -2641,7 +2654,7 @@ BI.createWidget({ diff --git a/docs/case/combo/formula_combo.md b/docs/case/combo/formula_combo.md deleted file mode 100644 index 3138d24ec..000000000 --- a/docs/case/combo/formula_combo.md +++ /dev/null @@ -1,38 +0,0 @@ -# bi.formula_combo_trigger - -## 基类[BI.Widget](/core/widget.md) - -{% method %} -[source]() - -{% common %} -```javascript - - - -``` - -{% endmethod %} - -## API -##### 基础属性 -| 参数 | 说明 | 类型 | 可选值 | 默认值 -| :------ |:------------- | :-----| :----|:---- -| height | 高度 | number | —| 30 -| items | 子组件 | array | — |[ ]| - - - -## 对外方法 -| 名称 | 说明 | 回调参数 -| :------ |:------------- | :----- -| setValue| 设置value值|—| -| getValue| 获取value值|—| - - - - - ---- - - diff --git a/docs/case/combo/icon_combo.html b/docs/case/combo/icon_combo.html index 35b1c63ff..052ce640c 100644 --- a/docs/case/combo/icon_combo.html +++ b/docs/case/combo/icon_combo.html @@ -1432,9 +1432,9 @@
    • -
    • +
    • - + text_value_combo @@ -1715,7 +1715,20 @@
    • -
    • +
    • + + + + + color_chooser_popup + + + + + +
    • + +
    • @@ -2382,7 +2395,7 @@

      bi.icon_combo

      -

      基类BI.Widget

      +

      切换trigger图标的combo 基类BI.Widget

      
       BI.createWidget({
      @@ -2580,7 +2593,7 @@ BI.createWidget({
           
       
      diff --git a/docs/case/combo/static_combo.html b/docs/case/combo/static_combo.html index bdbb48cd0..27202e438 100644 --- a/docs/case/combo/static_combo.html +++ b/docs/case/combo/static_combo.html @@ -69,7 +69,7 @@ - + @@ -1432,9 +1432,9 @@
    • -
    • +
    • - + text_value_combo @@ -1715,7 +1715,20 @@
    • -
    • +
    • + + + + + color_chooser_popup + + + + + +
    • + +
    • @@ -2382,7 +2395,7 @@

      bi.static_combo

      -

      单选combo,基类BI.Widget

      +

      单选combo,trigger显示项不会改变 基类BI.Widget

      
       BI.createWidget({
      @@ -2514,7 +2527,7 @@ BI.createWidget({
           
       
      diff --git a/docs/case/combo/text_value_combo.html b/docs/case/combo/text_value_combo.html new file mode 100644 index 000000000..ebe2fdef7 --- /dev/null +++ b/docs/case/combo/text_value_combo.html @@ -0,0 +1,2576 @@ + + + + + + + text_value_combo · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + + + +
      + +
      + +
      + + + + + + + + +
      +
      + +
      +
      + +
      + +

      bi.text_value_combo

      +

      基类BI.Widget

      +
      
      +BI.createWidget({
      +  type: "bi.text_value_combo",
      +  element: "#wrapper",
      +  text: "value_combo",
      +  width: 300,
      +  items: [{
      +    text: "1",
      +    value: 1
      +  }, {
      +    text: "2",
      +    value: 2
      +  }, {
      +    text: "3",
      +    value: 3
      +  }]
      +});
      +
      +
      + +

      API

      +
      基础属性
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      参数说明类型可选值默认值
      height高度number30
      el自定义下拉框triggerobject{ }
      text文本内容string" "
      chooseType选择类型const参考button_groupBI.ButtonGroup.CHOOSE_TYPE_SINGLE
      +

      对外方法

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      名称说明回调参数
      setValue设置value值
      getValue获取value值
      populate刷新列表items
      +
      + + +
      + +
      +
      +
      + +

      results matching ""

      +
        + +
        +
        + +

        No results matching ""

        + +
        +
        +
        + +
        +
        + +
        + + + + +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/case/combo/text_value_downlist_combo.html b/docs/case/combo/text_value_downlist_combo.html index 97148d4c3..66c2150ba 100644 --- a/docs/case/combo/text_value_downlist_combo.html +++ b/docs/case/combo/text_value_downlist_combo.html @@ -70,7 +70,7 @@ - + @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2380,7 +2393,7 @@

        bi.text_value_down_list_combo

        -

        基类BI.Widget

        +

        有二级下拉菜单的combo 基类BI.Widget

        
         BI.createWidget({
        @@ -2500,7 +2513,7 @@ BI.createWidget({
             
         
        diff --git a/docs/case/complex_canvas.html b/docs/case/complex_canvas.html index 0e5f3441d..7a12d1836 100644 --- a/docs/case/complex_canvas.html +++ b/docs/case/complex_canvas.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2455,7 +2468,7 @@ canvas.stroke(); diff --git a/docs/case/editor/shelter_editor.html b/docs/case/editor/shelter_editor.html index 978260d2d..7c2c9b48b 100644 --- a/docs/case/editor/shelter_editor.html +++ b/docs/case/editor/shelter_editor.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2380,16 +2393,13 @@

        bi.shelter_editor

        -

        带标记的文本框,基类BI.Widget

        +

        带标记的文本框,需手动控制进入编辑状态 基类BI.Widget

        
         BI.createWidget({
             element: "#wrapper",
             type: "bi.shelter_editor",
             cls: "bi-border",
        -    ref:function(_ref){
        -      editor=_ref;
        -    },
             width: 300,
             watermark: "这个是带标记的"
         });
        @@ -2722,7 +2732,7 @@ BI.createWidget({
             
         
        diff --git a/docs/case/editor/sign_editor.html b/docs/case/editor/sign_editor.html index 11efa7ced..d00807d35 100644 --- a/docs/case/editor/sign_editor.html +++ b/docs/case/editor/sign_editor.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2705,7 +2718,7 @@ BI.createWidget({ diff --git a/docs/case/editor/sign_initial_editor.html b/docs/case/editor/sign_initial_editor.html index 331a0c9a7..24da36997 100644 --- a/docs/case/editor/sign_initial_editor.html +++ b/docs/case/editor/sign_initial_editor.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.sign_initial_editor

        -

        基类BI.Widget

        +

        指定初始值 之后初始值会一直显示的editor 基类BI.Widget

        
         BI.createWidget({
        @@ -2718,7 +2731,7 @@ BI.createWidget({
             
         
        diff --git a/docs/case/editor/state_editor.html b/docs/case/editor/state_editor.html index 830c0d583..6eb3f617f 100644 --- a/docs/case/editor/state_editor.html +++ b/docs/case/editor/state_editor.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2692,7 +2705,7 @@ BI.createWidget({ diff --git a/docs/case/layer/layer_panel.html b/docs/case/layer/layer_panel.html index 9c82cb2c4..6262644ef 100644 --- a/docs/case/layer/layer_panel.html +++ b/docs/case/layer/layer_panel.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2575,7 +2588,7 @@ BI.createWidget({ diff --git a/docs/case/layer/multi_popup_layer.html b/docs/case/layer/multi_popup_layer.html index 661d95628..7e5dfc9e3 100644 --- a/docs/case/layer/multi_popup_layer.html +++ b/docs/case/layer/multi_popup_layer.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2447,7 +2460,7 @@ BI.createWidget({ diff --git a/docs/case/layer/pane_list.html b/docs/case/layer/pane_list.html index ccf3f45e1..80aa252a8 100644 --- a/docs/case/layer/pane_list.html +++ b/docs/case/layer/pane_list.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2444,7 +2457,7 @@ BI.createWidget({ logic - +布局逻辑 object — { dynamic:true} @@ -2629,7 +2642,7 @@ BI.createWidget({ diff --git a/docs/case/layer/panel.html b/docs/case/layer/panel.html index cd984aee0..a68f294df 100644 --- a/docs/case/layer/panel.html +++ b/docs/case/layer/panel.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2421,7 +2434,7 @@ BI.createWidget({ titleButton - +标题后的按钮组 array — [ ] @@ -2435,7 +2448,7 @@ BI.createWidget({ logic - +布局逻辑 object — { dynamic:false} @@ -2493,7 +2506,7 @@ BI.createWidget({ diff --git a/docs/case/list/list.select.html b/docs/case/list/list.select.html index 0aad4a304..a1063bf2a 100644 --- a/docs/case/list/list.select.html +++ b/docs/case/list/list.select.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2582,7 +2595,7 @@ BI.createWidget({ diff --git a/docs/case/loader/lazy_loader.html b/docs/case/loader/lazy_loader.html index 9c67a9d42..50def2eff 100644 --- a/docs/case/loader/lazy_loader.html +++ b/docs/case/loader/lazy_loader.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.lazy_loader

        -

        懒加载

        +

        懒加载loader

        
         BI.createWidget({
        @@ -2512,7 +2525,7 @@ BI.createWidget({
             
         
        diff --git a/docs/case/loader/list_loader.html b/docs/case/loader/list_loader.html index e07998369..46aafcd9a 100644 --- a/docs/case/loader/list_loader.html +++ b/docs/case/loader/list_loader.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.list_loader

        -

        恶心的加载控件, 为解决排序问题引入的控件

        +

        为解决排序问题引入的控件

        
         BI.createWidget({
        @@ -2569,7 +2582,7 @@ BI.createWidget({
             
         
        diff --git a/docs/case/loader/sort_list.html b/docs/case/loader/sort_list.html index 8bd44e2e7..ce72c16da 100644 --- a/docs/case/loader/sort_list.html +++ b/docs/case/loader/sort_list.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2567,7 +2580,7 @@ BI.createWidget({ diff --git a/docs/case/pager/all_count_pager.html b/docs/case/pager/all_count_pager.html index 0faea7997..9daef0e63 100644 --- a/docs/case/pager/all_count_pager.html +++ b/docs/case/pager/all_count_pager.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2521,7 +2534,7 @@ BI.createWidget({ diff --git a/docs/case/pager/direction_pager.html b/docs/case/pager/direction_pager.html index acb728fc0..bca1ba152 100644 --- a/docs/case/pager/direction_pager.html +++ b/docs/case/pager/direction_pager.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2583,7 +2596,7 @@ diff --git a/docs/case/segment.html b/docs/case/segment.html index 838239b35..a57dbd186 100644 --- a/docs/case/segment.html +++ b/docs/case/segment.html @@ -70,7 +70,7 @@ - + @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2428,63 +2441,64 @@ BI.createWidget({ hgap 效果相当于文本框左右padding值 number - +— 10 vgap 效果相当于文本框上下padding值 number - +— 0 lgap 效果相当于文本框left-padding值 number - +— 0 rgap 效果相当于文本框right-padding值 number - +— 0 tgap 效果相当于文本框top-padding值 number - +— 0 bgap 效果相当于文本框bottom-padding值 number - +— 0 items 子控件数组 array - - +— +[ ] width 宽度 number - - +— +— height 高度 number - +— +— @@ -2522,7 +2536,7 @@ BI.createWidget({ diff --git a/docs/case/shelter_editor.md b/docs/case/shelter_editor.md new file mode 100644 index 000000000..1b1e4fef3 --- /dev/null +++ b/docs/case/shelter_editor.md @@ -0,0 +1,2 @@ +# clipboard + diff --git a/docs/case/table/adaptive_table.html b/docs/case/table/adaptive_table.html index ce16e072d..43fc8d33f 100644 --- a/docs/case/table/adaptive_table.html +++ b/docs/case/table/adaptive_table.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2633,7 +2646,7 @@ diff --git a/docs/case/table/layer_tree_table.html b/docs/case/table/layer_tree_table.html index 6339749ca..51c2eb1e8 100644 --- a/docs/case/table/layer_tree_table.html +++ b/docs/case/table/layer_tree_table.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2656,7 +2669,7 @@ diff --git a/docs/case/table/tree_table.html b/docs/case/table/tree_table.html index e08e3a11d..92a17eb99 100644 --- a/docs/case/table/tree_table.html +++ b/docs/case/table/tree_table.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2658,7 +2671,7 @@ diff --git a/docs/case/tree/branch_relation.html b/docs/case/tree/branch_relation.html index d21b0ecb9..e6c907eb7 100644 --- a/docs/case/tree/branch_relation.html +++ b/docs/case/tree/branch_relation.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2483,7 +2496,7 @@ diff --git a/docs/case/tree/branch_tree.html b/docs/case/tree/branch_tree.html index fc79d3dfc..3a5dc2761 100644 --- a/docs/case/tree/branch_tree.html +++ b/docs/case/tree/branch_tree.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2486,7 +2499,7 @@ diff --git a/docs/case/tree/display_tree.html b/docs/case/tree/display_tree.html index e72a0f69d..d5ee498cd 100644 --- a/docs/case/tree/display_tree.html +++ b/docs/case/tree/display_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.display_tree

        -

        异步树控件

        +

        树展示控件

        var tree = BI.createWidget({
           type: "bi.display_tree",
        @@ -2454,7 +2467,7 @@ tree.initTree({
             
         
        diff --git a/docs/case/tree/handstand_branch_tree.html b/docs/case/tree/handstand_branch_tree.html index d0437a92f..7d2d9b2db 100644 --- a/docs/case/tree/handstand_branch_tree.html +++ b/docs/case/tree/handstand_branch_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2489,7 +2502,7 @@ diff --git a/docs/case/tree/level_tree.html b/docs/case/tree/level_tree.html index 81710b377..5d68db380 100644 --- a/docs/case/tree/level_tree.html +++ b/docs/case/tree/level_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2505,7 +2518,7 @@ diff --git a/docs/case/tree/simple_tree.html b/docs/case/tree/simple_tree.html index ecf16962a..ee9e5ee32 100644 --- a/docs/case/tree/simple_tree.html +++ b/docs/case/tree/simple_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2486,7 +2499,7 @@ tree.populate(items); diff --git a/docs/case/trigger/editor_trigger.html b/docs/case/trigger/editor_trigger.html index 136374638..f578a9fbd 100644 --- a/docs/case/trigger/editor_trigger.html +++ b/docs/case/trigger/editor_trigger.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2502,7 +2515,7 @@ BI.createWidget({ diff --git a/docs/case/trigger/icon_trigger.html b/docs/case/trigger/icon_trigger.html index 29063ca10..c5fdf43dc 100644 --- a/docs/case/trigger/icon_trigger.html +++ b/docs/case/trigger/icon_trigger.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2426,7 +2439,7 @@ BI.createWidget({ diff --git a/docs/case/trigger/text_trigger.html b/docs/case/trigger/text_trigger.html index f91ebb3fd..7e2d8f895 100644 --- a/docs/case/trigger/text_trigger.html +++ b/docs/case/trigger/text_trigger.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2446,7 +2459,7 @@ BI.createWidget({ diff --git a/docs/core/abstract/button_group.html b/docs/core/abstract/button_group.html index 8f4200952..fce855d97 100644 --- a/docs/core/abstract/button_group.html +++ b/docs/core/abstract/button_group.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2591,7 +2604,7 @@ BI.createWidget({ diff --git a/docs/core/abstract/button_tree.html b/docs/core/abstract/button_tree.html index b0f2e79da..c858fd416 100644 --- a/docs/core/abstract/button_tree.html +++ b/docs/core/abstract/button_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2509,7 +2522,7 @@ BI.createWidget({ diff --git a/docs/core/abstract/collection_view.html b/docs/core/abstract/collection_view.html index 2be15f835..a8af43a68 100644 --- a/docs/core/abstract/collection_view.html +++ b/docs/core/abstract/collection_view.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.collection_view

        -

        CollectionView,基类BI.Widget

        +

        CollectionView,指定行列可以删除看不见的元素 基类BI.Widget

        
         BI.createWidget({
        @@ -2446,14 +2459,14 @@ BI.createWidget({
         
         
         horizontalOverscanSize
        -
        +横向超出可视范围区域预加载的数量
         number
         —
         0
         
         
         verticalOverscanSize
        -
        +纵向超出可视范围区域预加载的数量
         number
         —
         0
        @@ -2462,7 +2475,7 @@ BI.createWidget({
         width
         行宽,必设
         number
        -—ßß
        +—
         —
         
         
        @@ -2561,7 +2574,7 @@ BI.createWidget({
         
         
         
        -BI.GridView.EVENT_SCROLL
        +BI.CollectionView.EVENT_SCROLL
         滚动时触发的事件
         {scrollLeft: scrollLeft, scrollTop: scrollTop}
         
        @@ -2601,7 +2614,7 @@ BI.createWidget({
             
         
        diff --git a/docs/core/abstract/custom_tree.html b/docs/core/abstract/custom_tree.html index 0db9333af..ae2a0976b 100644 --- a/docs/core/abstract/custom_tree.html +++ b/docs/core/abstract/custom_tree.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2450,16 +2463,16 @@ BI.createWidget({ expander - +popup组件 object - +— {el: {},popup: {type: "bi.custom_tree"}} el - +开启popup元素 object - +— {type: "bi.button_tree",chooseType: 0,layouts: [{type: "bi.vertical"}]} @@ -2575,7 +2588,7 @@ BI.createWidget({ diff --git a/docs/core/abstract/grid_view.html b/docs/core/abstract/grid_view.html index 01bddf9e5..10a530432 100644 --- a/docs/core/abstract/grid_view.html +++ b/docs/core/abstract/grid_view.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,7 +2395,7 @@

        bi.grid_view

        -

        GridView,基类BI.Widget

        +

        可以合并单元格,指定行列可以删除看不见的元素,基类BI.Widget

        
         BI.createWidget({
        @@ -2439,14 +2452,14 @@ BI.createWidget({
         
         
         overscanColumnCount
        -
        +超出可视范围区域预加载多少列
         number
         —
         0
         
         
         overscanRowCount
        -
        +超出可视范围区域预加载多少行
         number
         —
         0
        @@ -2481,14 +2494,14 @@ BI.createWidget({
         
         
         estimatedColumnSize
        -每格行宽,columnWidthGetter为function时必设
        +预估行宽,columnWidthGetter为function时必设
         number,function
         —
         function
         
         
         estimatedRowSize
        -每格列宽,rowHeightGetter为function时必设
        +预估列宽,rowHeightGetter为function时必设
         number,function
         —
         function
        @@ -2592,7 +2605,7 @@ BI.createWidget({
         
         
         
        -BI.CollectionView.EVENT_SCROLL
        +BI.GridView.EVENT_SCROLL
         滚动时触发的事件
         {scrollLeft: scrollLeft, scrollTop: scrollTop}
         
        @@ -2632,7 +2645,7 @@ BI.createWidget({
             
         
        diff --git a/docs/core/abstract/virtual_group.html b/docs/core/abstract/virtual_group.html index 31e1e7085..2e5de6655 100644 --- a/docs/core/abstract/virtual_group.html +++ b/docs/core/abstract/virtual_group.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2382,8 +2395,8 @@

        bi.virtual_group

        -

        一组具有相同属性的元素集合,基类BI.Widget

        -

        source

        +

        优化过的buttonGroup,删除看不见的元素 基类BI.Widget

        +
        
         BI.createWidget({
           element: "#wrapper",
        @@ -2506,7 +2519,7 @@ BI.createWidget({
             
         
        diff --git a/docs/core/abstract/virtual_list.html b/docs/core/abstract/virtual_list.html index 6b72e8596..1a1f5e34c 100644 --- a/docs/core/abstract/virtual_list.html +++ b/docs/core/abstract/virtual_list.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2380,7 +2393,7 @@

        bi.virtual_list

        -

        VirtualList,基类BI.Widget

        +

        看不见的元素全部删除的list,基类BI.Widget

        
         BI.createWidget({
        @@ -2419,14 +2432,14 @@ BI.createWidget({
         
         
         blockSize
        -
        +滚动加载的个数
         number
         —
         10
         
         
         overscanHeight
        -
        +超出可视范围区域的高度
         number
         —
         100
        @@ -2511,7 +2524,7 @@ BI.createWidget({
             
         
        diff --git a/docs/core/basic_button.html b/docs/core/basic_button.html index be385e2ee..017e53757 100644 --- a/docs/core/basic_button.html +++ b/docs/core/basic_button.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2608,7 +2621,7 @@ diff --git a/docs/core/combination/bi.combo.html b/docs/core/combination/bi.combo.html index af8ad4f95..8aee9b6ca 100644 --- a/docs/core/combination/bi.combo.html +++ b/docs/core/combination/bi.combo.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2503,7 +2516,7 @@ BI.createWidget({ hideChecker - +是否隐藏弹出层检测 function — — @@ -2701,7 +2714,7 @@ BI.createWidget({ diff --git a/docs/core/combination/bi.expander.html b/docs/core/combination/bi.expander.html index b5d6f4f53..a7f0a730b 100644 --- a/docs/core/combination/bi.expander.html +++ b/docs/core/combination/bi.expander.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2383,6 +2396,34 @@

        bi.expander

        某个可以展开的节点,基类BI.Widget

        +
        
        +BI.createWidget({
        +  type: "bi.expander",
        +  element: "#wrapper",
        +  el: {
        +    type: "bi.icon_text_node",
        +    cls: "pull-right-ha-font",
        +    height: 25,
        +    text: "Expander"
        +  },
        +  popup: {
        +    items: [{
        +      type: "bi.single_select_item",
        +      height: 25,
        +      text: "项目1",
        +      value: 1
        +    }, {
        +      type: "bi.single_select_item",
        +      height: 25,
        +      text: "项目2",
        +      value: 2
        +    }]
        +  }
        +});
        +
        +
        +

        API

        基础属性
        @@ -2614,7 +2655,7 @@ diff --git a/docs/core/combination/group_combo.html b/docs/core/combination/group_combo.html index 88e7761c2..818229074 100644 --- a/docs/core/combination/group_combo.html +++ b/docs/core/combination/group_combo.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2383,6 +2396,29 @@

        bi.combo_group

        基类BI.Widget

        +
        
        +BI.createWidget({
        +  element: "#wrapper",
        +  type: "bi.combo_group",
        +  el: {
        +    type: "bi.icon_text_icon_item",
        +    text: "2010年",
        +    value: 2010,
        +    height: 25,
        +    iconCls: "close-ha-font"
        +  },
        +  children: [{
        +    type: "bi.single_select_item",
        +    height: 25,
        +    text: "一月",
        +    value: 11
        +  }]
        +});
        +
        +
        + +

        API

        基础属性
      • @@ -2522,7 +2558,7 @@ diff --git a/docs/core/combination/loader.html b/docs/core/combination/loader.html index 91702f656..c7f99ed99 100644 --- a/docs/core/combination/loader.html +++ b/docs/core/combination/loader.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2383,6 +2396,32 @@

        bi.loader

        加载控件,BI.Widget

        +
        
        +BI.createWidget({
        +  element: "#wrapper",
        +  type: "bi.loader",
        +  itemsCreator: function(options, populate) {
        +    populate(BI.map(BI.map(BI.makeArray(3, null), function(idx, value){
        +        return {
        +             text: faker.name.findName(),
        +        value: BI.UUID()
        +      };
        +    }), function(i, v) {
        +        return BI.extend(v, {
        +          type: "bi.single_select_item",
        +          height: 25
        +        })
        +      }))
        +  },
        +  hasNext: function(option) {
        +    return option.count < 10;
        +  }
        +});
        +
        +
        + +

        API

        基础属性
      • @@ -2412,7 +2451,7 @@ - + @@ -2606,7 +2645,7 @@ diff --git a/docs/core/combination/navigation.html b/docs/core/combination/navigation.html index d6c0cde2f..72436bcad 100644 --- a/docs/core/combination/navigation.html +++ b/docs/core/combination/navigation.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2455,9 +2468,9 @@ BI.createWidget({
      • - + - + @@ -2589,7 +2602,7 @@ BI.createWidget({ diff --git a/docs/core/combination/searcher.html b/docs/core/combination/searcher.html index 635c55da1..5142aa4a5 100644 --- a/docs/core/combination/searcher.html +++ b/docs/core/combination/searcher.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2727,7 +2740,7 @@ BI.createWidget({ diff --git a/docs/core/combination/switcher.html b/docs/core/combination/switcher.html index f25288f42..5bc8db44a 100644 --- a/docs/core/combination/switcher.html +++ b/docs/core/combination/switcher.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2654,7 +2667,7 @@ BI.createWidget({ diff --git a/docs/core/combination/tab.html b/docs/core/combination/tab.html index 30157fb65..d5c77a293 100644 --- a/docs/core/combination/tab.html +++ b/docs/core/combination/tab.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2462,7 +2475,7 @@ BI.createWidget({
      • - + @@ -2582,7 +2595,7 @@ BI.createWidget({ diff --git a/docs/core/layer/layer_float_box.html b/docs/core/layer/layer_float_box.html index 676e86211..9526ec8ba 100644 --- a/docs/core/layer/layer_float_box.html +++ b/docs/core/layer/layer_float_box.html @@ -1430,9 +1430,9 @@ -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2531,7 +2544,7 @@ BI.createWidget({ diff --git a/docs/core/layer/layer_popup.html b/docs/core/layer/layer_popup.html index 95f455ebe..8aa9c0916 100644 --- a/docs/core/layer/layer_popup.html +++ b/docs/core/layer/layer_popup.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2492,7 +2505,7 @@ BI.createWidget({
      • - + @@ -2518,7 +2531,7 @@ BI.createWidget({ - + @@ -2627,7 +2640,7 @@ BI.createWidget({ diff --git a/docs/core/layer/layer_searcher.html b/docs/core/layer/layer_searcher.html index ef4936c1c..b390f94a1 100644 --- a/docs/core/layer/layer_searcher.html +++ b/docs/core/layer/layer_searcher.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2426,7 +2439,7 @@ searcher.populate([{
      • - + @@ -2438,7 +2451,7 @@ searcher.populate([{ - + @@ -2516,7 +2529,7 @@ searcher.populate([{ diff --git a/docs/core/layout/border.html b/docs/core/layout/border.html index 51d95c428..70ffe6989 100644 --- a/docs/core/layout/border.html +++ b/docs/core/layout/border.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2475,7 +2488,7 @@ diff --git a/docs/core/layout/center.html b/docs/core/layout/center.html index e1f92a615..645ab328c 100644 --- a/docs/core/layout/center.html +++ b/docs/core/layout/center.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2398,14 +2411,6 @@ BI.createWidget({ text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", cls: "layout-bg2", whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 3", - cls: "layout-bg3" - },{ - type: "bi.label", - text: "Center 4", - cls: "layout-bg5" }], hgap: 20, vgap: 20 @@ -2505,7 +2510,7 @@ BI.createWidget({ diff --git a/docs/core/layout/center_adapt.html b/docs/core/layout/center_adapt.html index 0806234e7..c2ce2e335 100644 --- a/docs/core/layout/center_adapt.html +++ b/docs/core/layout/center_adapt.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2503,7 +2516,7 @@ BI.createWidget({ diff --git a/docs/core/layout/float_center.html b/docs/core/layout/float_center.html index ac3872d88..18e981e27 100644 --- a/docs/core/layout/float_center.html +++ b/docs/core/layout/float_center.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2498,7 +2511,7 @@ BI.createWidget({ diff --git a/docs/core/layout/flow.html b/docs/core/layout/flow.html index 95e5268fe..da22c38f9 100644 --- a/docs/core/layout/flow.html +++ b/docs/core/layout/flow.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2526,7 +2539,7 @@ BI.createWidget({ diff --git a/docs/core/layout/grid.html b/docs/core/layout/grid.html index a2e10cb4d..8668c9b4b 100644 --- a/docs/core/layout/grid.html +++ b/docs/core/layout/grid.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2498,7 +2511,7 @@ BI.createWidget({ diff --git a/docs/core/layout/horizontal.html b/docs/core/layout/horizontal.html index 5fe58f38f..9345dcdbd 100644 --- a/docs/core/layout/horizontal.html +++ b/docs/core/layout/horizontal.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2389,33 +2402,17 @@ BI.createWidget({ type: 'bi.horizontal', element: "#wrapper", items: [{ - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg1", - text: "这里设置了lgap,rgap,tgap,bgap", - height: 30 - }, - left: 0, - right: 0 - }], - width: 100, - height: 30 + type: "bi.text_button", + cls: "layout-bg1", + text: "这里设置了lgap,rgap,tgap,bgap", + height: 30, + width: 200 }, { - type: "bi.absolute", - items: [{ - el: { - type: "bi.text_button", - cls: "layout-bg2", - text: "这里设置了lgap,rgap,tgap,bgap", - height: 30 - }, - left: 0, - right: 0 - }], - width: 200, - height: 30 + type: "bi.text_button", + cls: "layout-bg2", + text: "这里设置了lgap,rgap,tgap,bgap", + height: 30, + width: 200 }] }); @@ -2534,7 +2531,7 @@ BI.createWidget({ diff --git a/docs/core/layout/horizontal_adapt.html b/docs/core/layout/horizontal_adapt.html index 5e6aa4edd..401193e51 100644 --- a/docs/core/layout/horizontal_adapt.html +++ b/docs/core/layout/horizontal_adapt.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2512,7 +2525,7 @@ BI.createWidget({ diff --git a/docs/core/layout/horizontal_auto.html b/docs/core/layout/horizontal_auto.html index 4997bccf0..b6ade7bc4 100644 --- a/docs/core/layout/horizontal_auto.html +++ b/docs/core/layout/horizontal_auto.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2498,7 +2511,7 @@ BI.createWidget({ diff --git a/docs/core/layout/horizontal_float.html b/docs/core/layout/horizontal_float.html index f872f8105..13d6d83da 100644 --- a/docs/core/layout/horizontal_float.html +++ b/docs/core/layout/horizontal_float.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2499,7 +2512,7 @@ BI.createWidget({ diff --git a/docs/core/layout/htape.html b/docs/core/layout/htape.html index 55cb14bbb..c0df33c3c 100644 --- a/docs/core/layout/htape.html +++ b/docs/core/layout/htape.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2515,7 +2528,7 @@ BI.createWidget({ diff --git a/docs/core/layout/inline.md b/docs/core/layout/inline.md deleted file mode 100644 index f3d0ae53e..000000000 --- a/docs/core/layout/inline.md +++ /dev/null @@ -1,2 +0,0 @@ -# inline - diff --git a/docs/core/layout/left_right_vertical_adapt.html b/docs/core/layout/left_right_vertical_adapt.html index 8161012d6..71c7fd1b8 100644 --- a/docs/core/layout/left_right_vertical_adapt.html +++ b/docs/core/layout/left_right_vertical_adapt.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2509,7 +2522,7 @@ BI.createWidget({ diff --git a/docs/core/layout/table.html b/docs/core/layout/table.html index 4cb07d0a8..202b1aff9 100644 --- a/docs/core/layout/table.html +++ b/docs/core/layout/table.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2500,7 +2513,7 @@ diff --git a/docs/core/layout/td.html b/docs/core/layout/td.html index 7e1ed712c..104692289 100644 --- a/docs/core/layout/td.html +++ b/docs/core/layout/td.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2485,7 +2498,7 @@ diff --git a/docs/core/layout/vertical.html b/docs/core/layout/vertical.html index 8a569c663..c60796b78 100644 --- a/docs/core/layout/vertical.html +++ b/docs/core/layout/vertical.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2500,7 +2513,7 @@ BI.createWidget({ diff --git a/docs/core/layout/vertical_adapt.html b/docs/core/layout/vertical_adapt.html index 7d718aaf3..0cb41d554 100644 --- a/docs/core/layout/vertical_adapt.html +++ b/docs/core/layout/vertical_adapt.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2505,7 +2518,7 @@ BI.createWidget({ diff --git a/docs/core/layout/vtape.html b/docs/core/layout/vtape.html index f53010158..026c0c5f4 100644 --- a/docs/core/layout/vtape.html +++ b/docs/core/layout/vtape.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2515,7 +2528,7 @@ BI.createWidget({ diff --git a/docs/core/node_button.html b/docs/core/node_button.html index 19cfb88ca..808e3a947 100644 --- a/docs/core/node_button.html +++ b/docs/core/node_button.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2481,7 +2494,7 @@ diff --git a/docs/core/pane.html b/docs/core/pane.html index 58631c43f..257f1b63b 100644 --- a/docs/core/pane.html +++ b/docs/core/pane.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2405,14 +2418,14 @@
      • - + - + @@ -2500,7 +2513,7 @@ diff --git a/docs/core/single.html b/docs/core/single.html index 5a229ffe0..2826bbc52 100644 --- a/docs/core/single.html +++ b/docs/core/single.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2534,7 +2547,7 @@ diff --git a/docs/core/widget.html b/docs/core/widget.html index 47d9726ae..8b7fb1bf9 100644 --- a/docs/core/widget.html +++ b/docs/core/widget.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2605,7 +2618,7 @@
      • - + @@ -2684,7 +2697,7 @@ - + @@ -2733,7 +2746,7 @@ diff --git a/docs/detailed/bi.button/general.html b/docs/detailed/bi.button/general.html index a4d5583cc..b19713519 100644 --- a/docs/detailed/bi.button/general.html +++ b/docs/detailed/bi.button/general.html @@ -1430,9 +1430,9 @@ -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2414,7 +2427,7 @@ diff --git a/docs/detailed/bi.button/items.html b/docs/detailed/bi.button/items.html index 525b54673..77188ab8a 100644 --- a/docs/detailed/bi.button/items.html +++ b/docs/detailed/bi.button/items.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2518,7 +2531,7 @@ BI.createWidget({ diff --git a/docs/detailed/bi.button/node.html b/docs/detailed/bi.button/node.html index 5d4451566..9ec50569d 100644 --- a/docs/detailed/bi.button/node.html +++ b/docs/detailed/bi.button/node.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2525,7 +2538,7 @@ BI.createWidget({ diff --git a/docs/detailed/bi.button/segment.html b/docs/detailed/bi.button/segment.html index de915d443..d3c31161b 100644 --- a/docs/detailed/bi.button/segment.html +++ b/docs/detailed/bi.button/segment.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2523,7 +2536,7 @@ BI.createWidget({ diff --git a/docs/detailed/bi.button/tooltip.html b/docs/detailed/bi.button/tooltip.html index 3e6664f6c..9ace7fd63 100644 --- a/docs/detailed/bi.button/tooltip.html +++ b/docs/detailed/bi.button/tooltip.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2513,7 +2526,7 @@ diff --git a/docs/detailed/combo/multilayer_select_tree_combo.html b/docs/detailed/combo/multilayer_select_tree_combo.html index 857111bc8..ef0e54587 100644 --- a/docs/detailed/combo/multilayer_select_tree_combo.html +++ b/docs/detailed/combo/multilayer_select_tree_combo.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2486,7 +2499,7 @@ diff --git a/docs/detailed/combo/multilayer_single_tree_combo.html b/docs/detailed/combo/multilayer_single_tree_combo.html index 5efa0ff47..1b77296a8 100644 --- a/docs/detailed/combo/multilayer_single_tree_combo.html +++ b/docs/detailed/combo/multilayer_single_tree_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2494,7 +2507,7 @@ diff --git a/docs/detailed/combo/select_tree_combo.html b/docs/detailed/combo/select_tree_combo.html index 3b3f586ae..5c944d17a 100644 --- a/docs/detailed/combo/select_tree_combo.html +++ b/docs/detailed/combo/select_tree_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2488,7 +2501,7 @@ diff --git a/docs/detailed/combo/single_tree_combo.html b/docs/detailed/combo/single_tree_combo.html index 4697531b4..03410afe9 100644 --- a/docs/detailed/combo/single_tree_combo.html +++ b/docs/detailed/combo/single_tree_combo.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2407,7 +2420,7 @@
      • - + @@ -2508,7 +2521,7 @@ diff --git a/docs/detailed/date/custom_date_time.html b/docs/detailed/date/custom_date_time.html index 22bc6a856..497ee117c 100644 --- a/docs/detailed/date/custom_date_time.html +++ b/docs/detailed/date/custom_date_time.html @@ -1430,9 +1430,9 @@ -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2406,7 +2419,6 @@
      • logic布局逻辑 object {dynamic:true,scrolly:true}
        logic布局逻辑 object {dynamic:true}
        logic布局逻辑 object {dynamic:false}direction 工具栏的方向 const参考button_group BI.Direction.Top
        logic布局逻辑 object {dynamic:true}chooseType 选择类型 const参考button_group BI.Selection.Single
        searcher搜索到的元素 object {type: "bi.button_group",behaviors: {redmark: function () {return true;}}, items: [], layouts: [{ type: "bi.vertical" }]}
        overlap是否含有遮罩层 boolean true,false true
        onLoaded已经加载 function
        getName 获取组件名称
        setTag
        isolate组件不在页面展示,组件事件和内容都在
        trigger下拉列表的弹出方式 object {}
        -

        事件

        @@ -2460,7 +2472,7 @@ diff --git a/docs/detailed/date/date_combo.html b/docs/detailed/date/date_combo.html index 0362758fd..5cbcdd098 100644 --- a/docs/detailed/date/date_combo.html +++ b/docs/detailed/date/date_combo.html @@ -1430,9 +1430,9 @@ -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2441,7 +2454,7 @@ diff --git a/docs/detailed/date/date_pane_widget.html b/docs/detailed/date/date_pane_widget.html index 6ed59987b..94be81ed6 100644 --- a/docs/detailed/date/date_pane_widget.html +++ b/docs/detailed/date/date_pane_widget.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2422,7 +2435,8 @@
      • - + +
        selectedTime 选中的初始年月 obj({year: y, month: m})
        @@ -2460,7 +2474,7 @@ diff --git a/docs/detailed/date/year_month_combo.html b/docs/detailed/date/year_month_combo.html index af8c1395d..f87d5e64e 100644 --- a/docs/detailed/date/year_month_combo.html +++ b/docs/detailed/date/year_month_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2407,18 +2420,18 @@ yearBehaviors 自定义年份选择的行为(详见button_group) object - - +— +{ } monthBehaviors 自定义年份选择的行为(详见button_group) object - +— +{ } -

        事件

        @@ -2472,7 +2485,7 @@ diff --git a/docs/detailed/date/year_quarter_combo.html b/docs/detailed/date/year_quarter_combo.html index abb83214b..5686b182d 100644 --- a/docs/detailed/date/year_quarter_combo.html +++ b/docs/detailed/date/year_quarter_combo.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2414,11 +2427,11 @@
      • - + +
        monthBehaviors 自定义年份选择的行为(详见button_group) object{ }
        -

        事件

        @@ -2472,7 +2485,7 @@ diff --git a/docs/detailed/dialog.html b/docs/detailed/dialog.html index 723d911cc..a588fcfe5 100644 --- a/docs/detailed/dialog.html +++ b/docs/detailed/dialog.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2404,14 +2417,15 @@
      • - - + + - + +
        title 对话框标题 string" "
        content 对话框内容 string" "
        @@ -2449,7 +2463,7 @@ diff --git a/docs/detailed/down_list_combo.html b/docs/detailed/down_list_combo.html index 44ea090a2..87f4b7fc6 100644 --- a/docs/detailed/down_list_combo.html +++ b/docs/detailed/down_list_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2474,7 +2487,6 @@ -

        事件

        @@ -2499,6 +2511,7 @@

        具体配置方法见Combo

        +
        @@ -2532,7 +2545,7 @@ diff --git a/docs/detailed/file_manager.html b/docs/detailed/file_manager.html index d4c78407b..ec8ffa0c8 100644 --- a/docs/detailed/file_manager.html +++ b/docs/detailed/file_manager.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2405,24 +2418,8 @@ -

        参数

        - - - - - - - - - - - - - - - -
        参数说明类型可选值默认值
        -
        + +

        方法

        @@ -2476,7 +2473,7 @@ diff --git a/docs/detailed/month_combo.html b/docs/detailed/month_combo.html index fc9daac07..146b8c65f 100644 --- a/docs/detailed/month_combo.html +++ b/docs/detailed/month_combo.html @@ -1432,9 +1432,9 @@ -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2413,7 +2426,6 @@
      • -

        事件

        @@ -2433,6 +2445,7 @@
        +
        @@ -2466,7 +2479,7 @@ diff --git a/docs/detailed/multi_select_combo.html b/docs/detailed/multi_select_combo.html index e682cbd0b..ecff91c18 100644 --- a/docs/detailed/multi_select_combo.html +++ b/docs/detailed/multi_select_combo.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2396,38 +2409,7 @@ -

        参数

        - - - - - - - - - - - - - - - -
        参数说明类型可选值默认值
        -

        方法

        - - - - - - - - - - - - - -
        方法说明用法
        + @@ -2442,6 +2424,7 @@
        +
        @@ -2475,7 +2458,7 @@ diff --git a/docs/detailed/numeric_interval.html b/docs/detailed/numeric_interval.html index c70b7144f..bbb3d40c3 100644 --- a/docs/detailed/numeric_interval.html +++ b/docs/detailed/numeric_interval.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2472,6 +2485,7 @@ setNumTip(string) 设置数值区间的tip提示 +— @@ -2494,6 +2508,7 @@ +
        @@ -2527,7 +2542,7 @@ diff --git a/docs/detailed/path/direction_path_chooser.html b/docs/detailed/path/direction_path_chooser.html index cdba39c40..97c0307ce 100644 --- a/docs/detailed/path/direction_path_chooser.html +++ b/docs/detailed/path/direction_path_chooser.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2422,7 +2435,8 @@ items 二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向 array - +— +[ ] @@ -2460,7 +2474,7 @@ diff --git a/docs/detailed/path/path_chooser.html b/docs/detailed/path/path_chooser.html index b8fd98dc7..245afe71f 100644 --- a/docs/detailed/path/path_chooser.html +++ b/docs/detailed/path/path_chooser.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2421,7 +2434,8 @@ items 二维数组,每个元素代表一条路径 array - +— +[ ] @@ -2459,7 +2473,7 @@ diff --git a/docs/detailed/quarter_combo.html b/docs/detailed/quarter_combo.html index d1fd5b4b9..01c48c1ac 100644 --- a/docs/detailed/quarter_combo.html +++ b/docs/detailed/quarter_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2413,7 +2426,6 @@ -

        事件

        @@ -2433,6 +2445,7 @@
        +
        @@ -2466,7 +2479,7 @@ diff --git a/docs/detailed/relation_view.html b/docs/detailed/relation_view.html index 4767c4e3f..7f86dde38 100644 --- a/docs/detailed/relation_view.html +++ b/docs/detailed/relation_view.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2452,7 +2465,7 @@ diff --git a/docs/detailed/slider.html b/docs/detailed/slider.html index 82822136f..2ecc4d5bc 100644 --- a/docs/detailed/slider.html +++ b/docs/detailed/slider.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2383,8 +2396,9 @@

        slider插件

        BI.createWidget({
        -    type: "bi.multi_select_combo",
        -    items: [],
        +    type: "bi.slider",
        +    min: 16,
        +    max: 50,
         });
         
        @@ -2404,13 +2418,13 @@ min - +最小值 number 10 max - +最大值 number 50 @@ -2428,12 +2442,12 @@ getValue - +获得当前值 — setValue - +设置当前值 value @@ -2476,7 +2490,7 @@ diff --git a/docs/detailed/table/bi.excel_table.html b/docs/detailed/table/bi.excel_table.html index 4ce2f417b..2b52543b6 100644 --- a/docs/detailed/table/bi.excel_table.html +++ b/docs/detailed/table/bi.excel_table.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2657,7 +2670,7 @@ diff --git a/docs/detailed/table/bi.page_table.html b/docs/detailed/table/bi.page_table.html index 95099dcaa..4539ff34f 100644 --- a/docs/detailed/table/bi.page_table.html +++ b/docs/detailed/table/bi.page_table.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2775,7 +2788,7 @@ diff --git a/docs/detailed/table/bi.preview_table.html b/docs/detailed/table/bi.preview_table.html index fd2e79413..5ebb4a465 100644 --- a/docs/detailed/table/bi.preview_table.html +++ b/docs/detailed/table/bi.preview_table.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2626,7 +2639,7 @@ BI.createWidget({ diff --git a/docs/detailed/table/bi.responsive_table.html b/docs/detailed/table/bi.responsive_table.html index 7d3c2be25..a6bacae46 100644 --- a/docs/detailed/table/bi.responsive_table.html +++ b/docs/detailed/table/bi.responsive_table.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2679,7 +2692,7 @@ BI.createWidget({ diff --git a/docs/detailed/text_input/bi.clear_editor.html b/docs/detailed/text_input/bi.clear_editor.html index 639c78cac..e2d8b9b4e 100644 --- a/docs/detailed/text_input/bi.clear_editor.html +++ b/docs/detailed/text_input/bi.clear_editor.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2463,13 +2476,6 @@ — -mouseOut - -boolean -true,false -false - - allowBlank 是否允许空值 boolean @@ -2563,7 +2569,7 @@ diff --git a/docs/detailed/text_input/bi.search_editor.html b/docs/detailed/text_input/bi.search_editor.html index ad5da5327..10a8670a4 100644 --- a/docs/detailed/text_input/bi.search_editor.html +++ b/docs/detailed/text_input/bi.search_editor.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2462,13 +2475,6 @@ — -mouseOut - -boolean -true,false -false - - allowBlank 是否允许空值 boolean @@ -2562,7 +2568,7 @@ diff --git a/docs/detailed/text_input/bi.text_editor.html b/docs/detailed/text_input/bi.text_editor.html index b10a487b2..c03f4b791 100644 --- a/docs/detailed/text_input/bi.text_editor.html +++ b/docs/detailed/text_input/bi.text_editor.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2462,13 +2475,6 @@ — -mouseOut - -boolean -true,false -false - - allowBlank 是否允许空值 boolean @@ -2547,7 +2553,7 @@ diff --git a/docs/detailed/text_input/finetuning_number_editor.html b/docs/detailed/text_input/finetuning_number_editor.html index d761366a1..bc28e4183 100644 --- a/docs/detailed/text_input/finetuning_number_editor.html +++ b/docs/detailed/text_input/finetuning_number_editor.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2462,7 +2475,7 @@ diff --git a/docs/detailed/tree/bi.multi_tree_combo.html b/docs/detailed/tree/bi.multi_tree_combo.html index a82728e94..333f5eb14 100644 --- a/docs/detailed/tree/bi.multi_tree_combo.html +++ b/docs/detailed/tree/bi.multi_tree_combo.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2524,7 +2537,7 @@ BI.createWidget({ diff --git a/docs/detailed/tree/bi.switch_tree.html b/docs/detailed/tree/bi.switch_tree.html index 98ca15d85..7e0a04a96 100644 --- a/docs/detailed/tree/bi.switch_tree.html +++ b/docs/detailed/tree/bi.switch_tree.html @@ -1430,9 +1430,9 @@
      • -
      • +
      • - + text_value_combo @@ -1713,7 +1713,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2501,7 +2514,7 @@ diff --git a/docs/detailed/year_combo.html b/docs/detailed/year_combo.html index ef8c85437..b93204355 100644 --- a/docs/detailed/year_combo.html +++ b/docs/detailed/year_combo.html @@ -1432,9 +1432,9 @@
      • -
      • +
      • - + text_value_combo @@ -1715,7 +1715,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2427,7 +2440,6 @@ -

        事件

        @@ -2447,6 +2459,7 @@
        +
        @@ -2480,7 +2493,7 @@ diff --git a/docs/index.html b/docs/index.html index 52efd8053..c56133367 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1428,9 +1428,9 @@
      • -
      • +
      • - + text_value_combo @@ -1711,7 +1711,20 @@
      • -
      • +
      • + + + + + color_chooser_popup + + + + + +
      • + +
      • @@ -2416,7 +2429,7 @@ diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 000000000..c091091a7 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,5851 @@ +{ + "name": "fineuidocs", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abab": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz", + "integrity": "sha1-uB3l9ydOxOdW15fNg08wNkJyTl0=", + "dev": true, + "optional": true + }, + "acorn": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", + "dev": true + }, + "acorn-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", + "dev": true, + "optional": true, + "requires": { + "acorn": "2.7.0" + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "integrity": "sha1-LSFgx3iAMuTdbL4lAvH5osj2zeQ=", + "dev": true, + "requires": { + "lodash": "4.17.4" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=", + "dev": true + }, + "bash-color": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/bash-color/-/bash-color-0.0.4.tgz", + "integrity": "sha1-6b6M4zVAytpIgXaMWb1jhlc26RM=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "cheerio": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", + "integrity": "sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU=", + "dev": true, + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.8.3", + "jsdom": "7.2.2", + "lodash": "4.17.4" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1" + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true, + "optional": true, + "requires": { + "cssom": "0.3.2" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "optional": true, + "requires": { + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "optional": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true, + "optional": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true, + "optional": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true, + "optional": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs-extra": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "3.0.1", + "universalify": "0.1.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "gh-pages": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-1.0.0.tgz", + "integrity": "sha1-Skb0wlQ596K35oNVBNSknpSfBMo=", + "dev": true, + "requires": { + "async": "2.1.4", + "base64url": "2.0.0", + "commander": "2.9.0", + "fs-extra": "3.0.1", + "globby": "6.1.0", + "graceful-fs": "4.1.11", + "rimraf": "2.6.1" + } + }, + "gitbook-cli": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/gitbook-cli/-/gitbook-cli-2.3.2.tgz", + "integrity": "sha512-eyGtkY7jKHhmgpfuvgAP5fZcUob/FBz4Ld0aLRdEmiTrS1RklimN9epzPp75dd4MWpGhYvSbiwxnpyLiv1wh6A==", + "dev": true, + "requires": { + "bash-color": "0.0.4", + "commander": "2.11.0", + "fs-extra": "3.0.1", + "lodash": "4.17.4", + "npm": "5.1.0", + "npmi": "1.0.1", + "optimist": "0.6.1", + "q": "1.5.0", + "semver": "5.3.0", + "tmp": "0.0.31", + "user-home": "2.0.0" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + } + } + }, + "gitbook-plugin-expandable-chapters": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/gitbook-plugin-expandable-chapters/-/gitbook-plugin-expandable-chapters-0.2.0.tgz", + "integrity": "sha1-RdcIeuaQekH0gSjFT+ViJKnBraI=", + "dev": true + }, + "gitbook-plugin-jsfiddle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitbook-plugin-jsfiddle/-/gitbook-plugin-jsfiddle-1.0.0.tgz", + "integrity": "sha1-deNd6EbvYrvS0Gb7YSzJniUgoq4=", + "dev": true + }, + "gitbook-plugin-search": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-search/-/gitbook-plugin-search-2.2.1.tgz", + "integrity": "sha1-bSW1p3aZD6mP39+jfeMx944PaxM=", + "dev": true + }, + "gitbook-plugin-splitter": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/gitbook-plugin-splitter/-/gitbook-plugin-splitter-0.0.8.tgz", + "integrity": "sha1-8rBRMGD8kma0awQYLk7KHUtx+vw=", + "dev": true + }, + "gitbook-plugin-theme-api": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-theme-api/-/gitbook-plugin-theme-api-1.1.2.tgz", + "integrity": "sha1-jBRaS61JoSE8AlApC5vZtyrqiPw=", + "dev": true, + "requires": { + "cheerio": "0.20.0", + "gitbook-plugin-search": "2.2.1", + "lodash": "4.12.0", + "q": "1.4.1", + "q-plus": "0.0.8" + }, + "dependencies": { + "lodash": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.12.0.tgz", + "integrity": "sha1-K9bcRqBA9Z5obJcu0h2T3FkFMlg=", + "dev": true + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "dev": true + } + } + }, + "gitbook-plugin-toggle-chapters": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/gitbook-plugin-toggle-chapters/-/gitbook-plugin-toggle-chapters-0.0.3.tgz", + "integrity": "sha1-bl9aphubLiIcOAzfbpKDIAFez7k=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.3.0", + "domutils": "1.5.1", + "entities": "1.0.0", + "readable-stream": "1.1.14" + }, + "dependencies": { + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + } + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdom": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", + "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", + "dev": true, + "optional": true, + "requires": { + "abab": "1.0.3", + "acorn": "2.7.0", + "acorn-globals": "1.0.9", + "cssom": "0.3.2", + "cssstyle": "0.2.37", + "escodegen": "1.8.1", + "nwmatcher": "1.4.1", + "parse5": "1.5.1", + "request": "2.81.0", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.3.2", + "webidl-conversions": "2.0.1", + "whatwg-url-compat": "0.6.5", + "xml-name-validator": "2.0.1" + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "optional": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "npm": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm/-/npm-5.1.0.tgz", + "integrity": "sha512-pt5ClxEmY/dLpb60SmGQQBKi3nB6Ljx1FXmpoCUdAULlGqGVn2uCyXxPCWFbcuHGthT7qGiaGa1wOfs/UjGYMw==", + "dev": true, + "requires": { + "abbrev": "1.1.0", + "ansi-regex": "3.0.0", + "ansicolors": "0.3.2", + "ansistyles": "0.1.3", + "aproba": "1.1.2", + "archy": "1.0.0", + "bluebird": "3.5.0", + "cacache": "9.2.9", + "call-limit": "1.1.0", + "chownr": "1.0.1", + "cmd-shim": "2.0.2", + "columnify": "1.5.4", + "config-chain": "1.1.11", + "debuglog": "1.0.1", + "detect-indent": "5.0.0", + "dezalgo": "1.0.3", + "editor": "1.0.0", + "fs-vacuum": "1.2.10", + "fs-write-stream-atomic": "1.0.10", + "fstream": "1.0.11", + "fstream-npm": "1.2.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "has-unicode": "2.0.1", + "hosted-git-info": "2.5.0", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "inflight": "1.0.6", + "inherits": "2.0.3", + "ini": "1.3.4", + "init-package-json": "1.10.1", + "JSONStream": "1.3.1", + "lazy-property": "1.0.0", + "lockfile": "1.0.3", + "lodash._baseindexof": "3.1.0", + "lodash._baseuniq": "4.6.0", + "lodash._bindcallback": "3.0.1", + "lodash._cacheindexof": "3.0.2", + "lodash._createcache": "3.1.2", + "lodash._getnative": "3.9.1", + "lodash.clonedeep": "4.5.0", + "lodash.restparam": "3.6.1", + "lodash.union": "4.6.0", + "lodash.uniq": "4.5.0", + "lodash.without": "4.4.0", + "lru-cache": "4.1.1", + "mississippi": "1.3.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "node-gyp": "3.6.2", + "nopt": "4.0.1", + "normalize-package-data": "2.4.0", + "npm-cache-filename": "1.0.2", + "npm-install-checks": "3.0.0", + "npm-package-arg": "5.1.2", + "npm-registry-client": "8.4.0", + "npm-user-validate": "1.0.0", + "npmlog": "4.1.2", + "once": "1.4.0", + "opener": "1.4.3", + "osenv": "0.1.4", + "pacote": "2.7.38", + "path-is-inside": "1.0.2", + "promise-inflight": "1.0.1", + "read": "1.0.7", + "read-cmd-shim": "1.0.1", + "read-installed": "4.0.3", + "read-package-json": "2.0.9", + "read-package-tree": "5.1.6", + "readable-stream": "2.3.2", + "readdir-scoped-modules": "1.0.2", + "request": "2.81.0", + "retry": "0.10.1", + "rimraf": "2.6.1", + "safe-buffer": "5.1.1", + "semver": "5.3.0", + "sha": "2.0.1", + "slide": "1.1.6", + "sorted-object": "2.0.1", + "sorted-union-stream": "2.1.3", + "ssri": "4.1.6", + "strip-ansi": "4.0.0", + "tar": "2.2.1", + "text-table": "0.2.0", + "uid-number": "0.0.6", + "umask": "1.1.0", + "unique-filename": "1.1.0", + "unpipe": "1.0.0", + "update-notifier": "2.2.0", + "uuid": "3.1.0", + "validate-npm-package-license": "3.0.1", + "validate-npm-package-name": "3.0.0", + "which": "1.2.14", + "worker-farm": "1.3.1", + "wrappy": "1.0.2", + "write-file-atomic": "2.1.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "bluebird": { + "version": "3.5.0", + "bundled": true, + "dev": true + }, + "cacache": { + "version": "9.2.9", + "bundled": true, + "dev": true, + "requires": { + "bluebird": "3.5.0", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.1", + "mississippi": "1.3.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.1", + "ssri": "4.1.6", + "unique-filename": "1.1.0", + "y18n": "3.2.1" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + } + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + } + } + }, + "call-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "cmd-shim": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1" + } + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "strip-ansi": "3.0.1", + "wcwidth": "1.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "defaults": "1.0.3" + }, + "dependencies": { + "defaults": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "clone": "1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "config-chain": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "ini": "1.3.4", + "proto-list": "1.2.4" + }, + "dependencies": { + "proto-list": { + "version": "1.2.4", + "bundled": true, + "dev": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "asap": "2.0.5", + "wrappy": "1.0.2" + }, + "dependencies": { + "asap": { + "version": "2.0.5", + "bundled": true, + "dev": true + } + } + }, + "editor": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fs-vacuum": { + "version": "1.2.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "path-is-inside": "1.0.2", + "rimraf": "2.6.1" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.2" + } + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-npm": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "fstream-ignore": "1.0.5", + "inherits": "2.0.3" + }, + "dependencies": { + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + }, + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "iferr": { + "version": "0.1.5", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true + }, + "init-package-json": { + "version": "1.10.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2", + "npm-package-arg": "5.1.2", + "promzard": "0.3.0", + "read": "1.0.7", + "read-package-json": "2.0.9", + "semver": "5.3.0", + "validate-npm-package-license": "3.0.1", + "validate-npm-package-name": "3.0.0" + }, + "dependencies": { + "promzard": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "read": "1.0.7" + } + } + } + }, + "JSONStream": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + }, + "dependencies": { + "jsonparse": { + "version": "1.3.1", + "bundled": true, + "dev": true + }, + "through": { + "version": "2.3.8", + "bundled": true, + "dev": true + } + } + }, + "lazy-property": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "lockfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "lodash._baseindexof": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "lodash._baseuniq": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._createset": "4.0.3", + "lodash._root": "3.0.1" + }, + "dependencies": { + "lodash._createset": { + "version": "4.0.3", + "bundled": true, + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "lodash._createcache": { + "version": "3.1.2", + "bundled": true, + "dev": true, + "requires": { + "lodash._getnative": "3.9.1" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "bundled": true, + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "bundled": true, + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "bundled": true, + "dev": true + }, + "lodash.union": { + "version": "4.6.0", + "bundled": true, + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "bundled": true, + "dev": true + }, + "lodash.without": { + "version": "4.4.0", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + } + } + }, + "mississippi": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "1.6.0", + "duplexify": "3.5.0", + "end-of-stream": "1.4.0", + "flush-write-stream": "1.0.2", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "1.0.2", + "pumpify": "1.3.5", + "stream-each": "1.2.0", + "through2": "2.0.3" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.2", + "typedarray": "0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + }, + "duplexify": { + "version": "3.5.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.2", + "stream-shift": "1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "once": "1.3.3" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.2" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.2" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.2" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true, + "dev": true + } + } + }, + "pump": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "requires": { + "duplexify": "3.5.0", + "inherits": "2.0.3", + "pump": "1.0.2" + } + }, + "stream-each": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "stream-shift": "1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "2.3.2", + "xtend": "4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "aproba": "1.1.2", + "copy-concurrently": "1.0.3", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "run-queue": "1.0.3" + }, + "dependencies": { + "copy-concurrently": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "1.1.2", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "run-queue": "1.0.3" + } + }, + "run-queue": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "1.1.2" + } + } + } + }, + "node-gyp": { + "version": "3.6.2", + "bundled": true, + "dev": true, + "requires": { + "fstream": "1.0.11", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "4.1.2", + "osenv": "0.1.4", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.2.14" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1.1.0" + } + } + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.3.0", + "validate-npm-package-license": "3.0.1" + }, + "dependencies": { + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "npm-install-checks": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "semver": "5.3.0" + } + }, + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "osenv": "0.1.4", + "semver": "5.3.0", + "validate-npm-package-name": "3.0.0" + } + }, + "npm-registry-client": { + "version": "8.4.0", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "1.6.0", + "graceful-fs": "4.1.11", + "normalize-package-data": "2.4.0", + "npm-package-arg": "5.1.2", + "npmlog": "4.1.2", + "once": "1.4.0", + "request": "2.81.0", + "retry": "0.10.1", + "semver": "5.3.0", + "slide": "1.1.6", + "ssri": "4.1.6" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.2", + "typedarray": "0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-user-validate": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + }, + "dependencies": { + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.2" + }, + "dependencies": { + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "requires": { + "aproba": "1.1.2", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "opener": { + "version": "1.4.3", + "bundled": true, + "dev": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + }, + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "pacote": { + "version": "2.7.38", + "bundled": true, + "dev": true, + "requires": { + "bluebird": "3.5.0", + "cacache": "9.2.9", + "glob": "7.1.2", + "lru-cache": "4.1.1", + "make-fetch-happen": "2.4.13", + "minimatch": "3.0.4", + "mississippi": "1.3.0", + "normalize-package-data": "2.4.0", + "npm-package-arg": "5.1.2", + "npm-pick-manifest": "1.0.4", + "osenv": "0.1.4", + "promise-inflight": "1.0.1", + "promise-retry": "1.1.1", + "protoduck": "4.0.0", + "safe-buffer": "5.1.1", + "semver": "5.3.0", + "ssri": "4.1.6", + "tar-fs": "1.15.3", + "tar-stream": "1.5.4", + "unique-filename": "1.1.0", + "which": "1.2.14" + }, + "dependencies": { + "make-fetch-happen": { + "version": "2.4.13", + "bundled": true, + "dev": true, + "requires": { + "agentkeepalive": "3.3.0", + "cacache": "9.2.9", + "http-cache-semantics": "3.7.3", + "http-proxy-agent": "2.0.0", + "https-proxy-agent": "2.0.0", + "lru-cache": "4.1.1", + "mississippi": "1.3.0", + "node-fetch-npm": "2.0.1", + "promise-retry": "1.1.1", + "socks-proxy-agent": "3.0.0", + "ssri": "4.1.6" + }, + "dependencies": { + "agentkeepalive": { + "version": "3.3.0", + "bundled": true, + "dev": true, + "requires": { + "humanize-ms": "1.2.1" + }, + "dependencies": { + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "http-cache-semantics": { + "version": "3.7.3", + "bundled": true, + "dev": true + }, + "http-proxy-agent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "4.1.0", + "debug": "2.6.8" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "4.1.1" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "https-proxy-agent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "4.1.0", + "debug": "2.6.8" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "4.1.1" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "node-fetch-npm": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "encoding": "0.1.12", + "json-parse-helpfulerror": "1.0.3", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "encoding": { + "version": "0.1.12", + "bundled": true, + "dev": true, + "requires": { + "iconv-lite": "0.4.18" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.18", + "bundled": true, + "dev": true + } + } + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "1.3.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "socks-proxy-agent": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "4.1.0", + "socks": "1.1.10" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "4.1.1" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "socks": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "requires": { + "ip": "1.1.5", + "smart-buffer": "1.1.15" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "bundled": true, + "dev": true + }, + "smart-buffer": { + "version": "1.1.15", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-pick-manifest": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "npm-package-arg": "5.1.2", + "semver": "5.3.0" + } + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "err-code": "1.1.2", + "retry": "0.10.1" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "bundled": true, + "dev": true + } + } + }, + "protoduck": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "genfun": "4.0.1" + }, + "dependencies": { + "genfun": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "tar-fs": { + "version": "1.15.3", + "bundled": true, + "dev": true, + "requires": { + "chownr": "1.0.1", + "mkdirp": "0.5.1", + "pump": "1.0.2", + "tar-stream": "1.5.4" + }, + "dependencies": { + "pump": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "once": "1.4.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0" + } + } + } + } + } + }, + "tar-stream": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "bl": "1.2.1", + "end-of-stream": "1.4.0", + "readable-stream": "2.3.2", + "xtend": "4.0.1" + }, + "dependencies": { + "bl": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "2.3.2" + } + }, + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "path-is-inside": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "mute-stream": "0.0.7" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.7", + "bundled": true, + "dev": true + } + } + }, + "read-cmd-shim": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.9", + "readdir-scoped-modules": "1.0.2", + "semver": "5.3.0", + "slide": "1.1.6", + "util-extend": "1.0.3" + }, + "dependencies": { + "util-extend": { + "version": "1.0.3", + "bundled": true, + "dev": true + } + } + }, + "read-package-json": { + "version": "2.0.9", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-helpfulerror": "1.0.3", + "normalize-package-data": "2.4.0" + }, + "dependencies": { + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "1.3.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "read-package-tree": { + "version": "5.1.6", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "once": "1.4.0", + "read-package-json": "2.0.9", + "readdir-scoped-modules": "1.0.2" + } + }, + "readable-stream": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + }, + "dependencies": { + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + }, + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + }, + "dependencies": { + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true + } + } + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + }, + "dependencies": { + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "jsonify": "0.0.0" + }, + "dependencies": { + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true + } + } + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + }, + "dependencies": { + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + } + } + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.1" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2" + } + } + } + }, + "sshpk": { + "version": "1.13.1", + "bundled": true, + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + }, + "dependencies": { + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "requires": { + "punycode": "1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "retry": { + "version": "0.10.1", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true + }, + "sha": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "readable-stream": "2.3.2" + } + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "sorted-object": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "sorted-union-stream": { + "version": "2.1.3", + "bundled": true, + "dev": true, + "requires": { + "from2": "1.3.0", + "stream-iterate": "1.2.0" + }, + "dependencies": { + "from2": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + } + } + } + } + }, + "stream-iterate": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "2.3.2", + "stream-shift": "1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "ssri": { + "version": "4.1.6", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + }, + "dependencies": { + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true + }, + "umask": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "unique-slug": "2.0.0" + }, + "dependencies": { + "unique-slug": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "imurmurhash": "0.1.4" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "update-notifier": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "boxen": "1.1.0", + "chalk": "1.1.3", + "configstore": "3.1.0", + "import-lazy": "2.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "boxen": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "1.1.3", + "cli-boxes": "1.0.0", + "string-width": "2.1.0", + "term-size": "0.1.1", + "widest-line": "1.0.0" + }, + "dependencies": { + "ansi-align": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "2.1.0" + } + }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "cli-boxes": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "term-size": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "execa": "0.4.0" + }, + "dependencies": { + "execa": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn-async": "2.2.5", + "is-stream": "1.1.0", + "npm-run-path": "1.0.0", + "object-assign": "4.1.1", + "path-key": "1.0.0", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn-async": { + "version": "2.2.5", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "which": "1.2.14" + } + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "npm-run-path": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "path-key": "1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "widest-line": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "configstore": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "dot-prop": "4.1.1", + "graceful-fs": "4.1.11", + "make-dir": "1.0.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.1.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-obj": "1.0.1" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "make-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + } + } + }, + "unique-string": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + }, + "dependencies": { + "crypto-random-string": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "import-lazy": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "is-npm": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "latest-version": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "package-json": "4.0.1" + }, + "dependencies": { + "package-json": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.3.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "bundled": true, + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + }, + "dependencies": { + "create-error-class": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + }, + "dependencies": { + "capture-stack-trace": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "duplexer3": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "bundled": true, + "dev": true + }, + "unzip-response": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "prepend-http": "1.0.4" + }, + "dependencies": { + "prepend-http": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "registry-auth-token": { + "version": "3.3.1", + "bundled": true, + "dev": true, + "requires": { + "rc": "1.2.1", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "registry-url": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "rc": "1.2.1" + }, + "dependencies": { + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "semver-diff": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "semver": "5.3.0" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "uuid": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + }, + "dependencies": { + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + }, + "dependencies": { + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + } + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtins": "1.0.3" + }, + "dependencies": { + "builtins": { + "version": "1.0.3", + "bundled": true, + "dev": true + } + } + }, + "which": { + "version": "1.2.14", + "bundled": true, + "dev": true, + "requires": { + "isexe": "2.0.0" + }, + "dependencies": { + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "worker-farm": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "errno": "0.1.4", + "xtend": "4.0.1" + }, + "dependencies": { + "errno": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "prr": "0.0.0" + }, + "dependencies": { + "prr": { + "version": "0.0.0", + "bundled": true, + "dev": true + } + } + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + } + } + }, + "npmi": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npmi/-/npmi-1.0.1.tgz", + "integrity": "sha1-FddpJzVHVF5oCdzwzhiu1IsCkOI=", + "dev": true, + "requires": { + "npm": "2.15.12", + "semver": "4.3.6" + }, + "dependencies": { + "npm": { + "version": "2.15.12", + "resolved": "https://registry.npmjs.org/npm/-/npm-2.15.12.tgz", + "integrity": "sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY=", + "dev": true, + "requires": { + "abbrev": "1.0.9", + "ansi": "0.3.1", + "ansi-regex": "2.0.0", + "ansicolors": "0.3.2", + "ansistyles": "0.1.3", + "archy": "1.0.0", + "async-some": "1.0.2", + "block-stream": "0.0.9", + "char-spinner": "1.0.1", + "chmodr": "1.0.2", + "chownr": "1.0.1", + "cmd-shim": "2.0.2", + "columnify": "1.5.4", + "config-chain": "1.1.10", + "dezalgo": "1.0.3", + "editor": "1.0.0", + "fs-vacuum": "1.2.9", + "fs-write-stream-atomic": "1.0.8", + "fstream": "1.0.10", + "fstream-npm": "1.1.1", + "github-url-from-git": "1.4.0", + "github-url-from-username-repo": "1.0.2", + "glob": "7.0.6", + "graceful-fs": "4.1.6", + "hosted-git-info": "2.1.5", + "imurmurhash": "0.1.4", + "inflight": "1.0.5", + "inherits": "2.0.3", + "ini": "1.3.4", + "init-package-json": "1.9.4", + "lockfile": "1.0.1", + "lru-cache": "4.0.1", + "minimatch": "3.0.3", + "mkdirp": "0.5.1", + "node-gyp": "3.6.0", + "nopt": "3.0.6", + "normalize-git-url": "3.0.2", + "normalize-package-data": "2.3.5", + "npm-cache-filename": "1.0.2", + "npm-install-checks": "1.0.7", + "npm-package-arg": "4.1.0", + "npm-registry-client": "7.2.1", + "npm-user-validate": "0.1.5", + "npmlog": "2.0.4", + "once": "1.4.0", + "opener": "1.4.1", + "osenv": "0.1.3", + "path-is-inside": "1.0.1", + "read": "1.0.7", + "read-installed": "4.0.3", + "read-package-json": "2.0.4", + "readable-stream": "2.1.5", + "realize-package-specifier": "3.0.1", + "request": "2.74.0", + "retry": "0.10.0", + "rimraf": "2.5.4", + "semver": "5.1.0", + "sha": "2.0.1", + "slide": "1.1.6", + "sorted-object": "2.0.0", + "spdx-license-ids": "1.2.2", + "strip-ansi": "3.0.1", + "tar": "2.2.1", + "text-table": "0.2.0", + "uid-number": "0.0.6", + "umask": "1.1.0", + "validate-npm-package-license": "3.0.1", + "validate-npm-package-name": "2.2.2", + "which": "1.2.11", + "wrappy": "1.0.2", + "write-file-atomic": "1.1.4" + }, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "bundled": true, + "dev": true + }, + "ansi": { + "version": "0.3.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "dev": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "async-some": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "dezalgo": "1.0.3" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "char-spinner": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "chmodr": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "cmd-shim": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "mkdirp": "0.5.1" + } + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "strip-ansi": "3.0.1", + "wcwidth": "1.0.0" + }, + "dependencies": { + "wcwidth": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "defaults": "1.0.3" + }, + "dependencies": { + "defaults": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "clone": "1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "config-chain": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "requires": { + "ini": "1.3.4", + "proto-list": "1.2.4" + }, + "dependencies": { + "proto-list": { + "version": "1.2.4", + "bundled": true, + "dev": true + } + } + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "asap": "2.0.3", + "wrappy": "1.0.2" + }, + "dependencies": { + "asap": { + "version": "2.0.3", + "bundled": true, + "dev": true + } + } + }, + "editor": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fs-vacuum": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "path-is-inside": "1.0.1", + "rimraf": "2.5.4" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.8", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.1.5" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "bundled": true, + "dev": true + } + } + }, + "fstream": { + "version": "1.0.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.5.4" + } + }, + "fstream-npm": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "fstream-ignore": "1.0.5", + "inherits": "2.0.3" + }, + "dependencies": { + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "fstream": "1.0.10", + "inherits": "2.0.3", + "minimatch": "3.0.3" + } + } + } + }, + "github-url-from-git": { + "version": "1.4.0", + "bundled": true, + "dev": true + }, + "github-url-from-username-repo": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.0.6", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.5", + "inherits": "2.0.3", + "minimatch": "3.0.3", + "once": "1.4.0", + "path-is-absolute": "1.0.0" + }, + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.1.6", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.1.5", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true + }, + "init-package-json": { + "version": "1.9.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "6.0.4", + "npm-package-arg": "4.1.0", + "promzard": "0.3.0", + "read": "1.0.7", + "read-package-json": "2.0.4", + "semver": "5.1.0", + "validate-npm-package-license": "3.0.1", + "validate-npm-package-name": "2.2.2" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "bundled": true, + "dev": true, + "requires": { + "inflight": "1.0.5", + "inherits": "2.0.3", + "minimatch": "3.0.3", + "once": "1.4.0", + "path-is-absolute": "1.0.0" + }, + "dependencies": { + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "read": "1.0.7" + } + } + } + }, + "lockfile": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.0.0" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "minimatch": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.6" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "node-gyp": { + "version": "3.6.0", + "bundled": true, + "dev": true, + "requires": { + "fstream": "1.0.10", + "glob": "7.0.6", + "graceful-fs": "4.1.6", + "minimatch": "3.0.3", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "2.0.4", + "osenv": "0.1.3", + "request": "2.74.0", + "rimraf": "2.5.4", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.2.11" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1.0.9" + } + }, + "normalize-git-url": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.1.5", + "is-builtin-module": "1.0.0", + "semver": "5.1.0", + "validate-npm-package-license": "3.0.1" + }, + "dependencies": { + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "npm-install-checks": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "npmlog": "2.0.4", + "semver": "5.1.0" + } + }, + "npm-package-arg": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.1.5", + "semver": "5.1.0" + } + }, + "npm-registry-client": { + "version": "7.2.1", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "1.5.2", + "graceful-fs": "4.1.6", + "normalize-package-data": "2.3.5", + "npm-package-arg": "4.1.0", + "npmlog": "2.0.4", + "once": "1.4.0", + "request": "2.74.0", + "retry": "0.10.0", + "semver": "5.1.0", + "slide": "1.1.6" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + }, + "retry": { + "version": "0.10.0", + "bundled": true, + "dev": true + } + } + }, + "npm-user-validate": { + "version": "0.1.5", + "bundled": true, + "dev": true + }, + "npmlog": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "ansi": "0.3.1", + "are-we-there-yet": "1.1.2", + "gauge": "1.2.7" + }, + "dependencies": { + "are-we-there-yet": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.1.5" + }, + "dependencies": { + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "gauge": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "requires": { + "ansi": "0.3.1", + "has-unicode": "2.0.0", + "lodash.pad": "4.4.0", + "lodash.padend": "4.5.0", + "lodash.padstart": "4.5.0" + }, + "dependencies": { + "has-unicode": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "lodash._baseslice": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "lodash._basetostring": { + "version": "4.12.0", + "bundled": true, + "dev": true + }, + "lodash.pad": { + "version": "4.4.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "4.0.0", + "lodash._basetostring": "4.12.0", + "lodash.tostring": "4.1.4" + } + }, + "lodash.padend": { + "version": "4.5.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "4.0.0", + "lodash._basetostring": "4.12.0", + "lodash.tostring": "4.1.4" + } + }, + "lodash.padstart": { + "version": "4.5.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "4.0.0", + "lodash._basetostring": "4.12.0", + "lodash.tostring": "4.1.4" + } + }, + "lodash.tostring": { + "version": "4.1.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "opener": { + "version": "1.4.1", + "bundled": true, + "dev": true + }, + "osenv": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "os-homedir": "1.0.0", + "os-tmpdir": "1.0.1" + }, + "dependencies": { + "os-homedir": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "os-tmpdir": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "path-is-inside": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "mute-stream": "0.0.5" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.5", + "bundled": true, + "dev": true + } + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "1.0.1", + "graceful-fs": "4.1.6", + "read-package-json": "2.0.4", + "readdir-scoped-modules": "1.0.2", + "semver": "5.1.0", + "slide": "1.1.6", + "util-extend": "1.0.1" + }, + "dependencies": { + "debuglog": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.6", + "once": "1.4.0" + } + }, + "util-extend": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "read-package-json": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "6.0.4", + "graceful-fs": "4.1.6", + "json-parse-helpfulerror": "1.0.3", + "normalize-package-data": "2.3.5" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "bundled": true, + "dev": true, + "requires": { + "inflight": "1.0.5", + "inherits": "2.0.3", + "minimatch": "3.0.3", + "once": "1.4.0", + "path-is-absolute": "1.0.0" + }, + "dependencies": { + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "1.3.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "readable-stream": { + "version": "2.1.5", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "realize-package-specifier": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "dezalgo": "1.0.3", + "npm-package-arg": "4.1.0" + } + }, + "request": { + "version": "2.74.0", + "bundled": true, + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.4.1", + "bl": "1.1.2", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "3.0.0", + "forever-agent": "0.6.1", + "form-data": "1.0.0-rc4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.11", + "node-uuid": "1.4.7", + "oauth-sign": "0.8.2", + "qs": "6.2.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.1", + "tunnel-agent": "0.4.3" + }, + "dependencies": { + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true + }, + "aws4": { + "version": "1.4.1", + "bundled": true, + "dev": true + }, + "bl": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + }, + "caseless": { + "version": "0.11.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + }, + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "extend": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "form-data": { + "version": "1.0.0-rc4", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "combined-stream": "1.0.5", + "mime-types": "2.1.11" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + } + } + }, + "har-validator": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "commander": "2.9.0", + "is-my-json-valid": "2.13.1", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "commander": { + "version": "2.9.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + }, + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "is-my-json-valid": { + "version": "2.13.1", + "bundled": true, + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "2.0.0", + "xtend": "4.0.1" + }, + "dependencies": { + "generate-function": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "is-property": "1.0.2" + }, + "dependencies": { + "is-property": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "jsonpointer": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "2.0.4" + }, + "dependencies": { + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + }, + "dependencies": { + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + } + } + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.3.0", + "sshpk": "1.9.2" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "jsprim": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2", + "json-schema": "0.2.2", + "verror": "1.3.6" + }, + "dependencies": { + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2" + } + } + } + }, + "sshpk": { + "version": "1.9.2", + "bundled": true, + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "dashdash": "1.14.0", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.6", + "jodid25519": "1.0.2", + "jsbn": "0.1.0", + "tweetnacl": "0.13.3" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "dashdash": { + "version": "1.14.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.0" + } + }, + "getpass": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.0" + } + }, + "jsbn": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.13.3", + "bundled": true, + "dev": true, + "optional": true + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.11", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.23.0" + }, + "dependencies": { + "mime-db": { + "version": "1.23.0", + "bundled": true, + "dev": true + } + } + }, + "node-uuid": { + "version": "1.4.7", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true + }, + "qs": { + "version": "6.2.1", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true + }, + "tough-cookie": { + "version": "2.3.1", + "bundled": true, + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "bundled": true, + "dev": true + } + } + }, + "retry": { + "version": "0.10.0", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.5.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.0.6" + } + }, + "semver": { + "version": "5.1.0", + "bundled": true, + "dev": true + }, + "sha": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "readable-stream": "2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "1.0.1", + "inherits": "2.0.3", + "isarray": "0.0.1", + "process-nextick-args": "1.0.3", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "sorted-object": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.0.0" + } + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.10", + "inherits": "2.0.3" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true + }, + "umask": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.2" + }, + "dependencies": { + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "1.0.4", + "spdx-license-ids": "1.2.2" + }, + "dependencies": { + "spdx-exceptions": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "validate-npm-package-name": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "builtins": "0.0.7" + }, + "dependencies": { + "builtins": { + "version": "0.0.7", + "bundled": true, + "dev": true + } + } + }, + "which": { + "version": "1.2.11", + "bundled": true, + "dev": true, + "requires": { + "isexe": "1.1.2" + }, + "dependencies": { + "isexe": { + "version": "1.1.2", + "bundled": true, + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.6", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + } + } + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "1.0.0" + } + }, + "nwmatcher": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.1.tgz", + "integrity": "sha1-eumwew6oBNt+JfBctf5Al9TklJ8=", + "dev": true, + "optional": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "optional": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true, + "optional": true + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", + "dev": true, + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", + "dev": true + }, + "q-plus": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/q-plus/-/q-plus-0.0.8.tgz", + "integrity": "sha1-TMZssZvRRbQ+nhtUAjYUI3e2Hqs=", + "dev": true, + "requires": { + "q": "1.5.0" + } + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.16.3" + } + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true, + "optional": true + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true, + "optional": true + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true, + "optional": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true, + "optional": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "webidl-conversions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", + "integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=", + "dev": true, + "optional": true + }, + "whatwg-url-compat": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", + "integrity": "sha1-AImBEa9om7CXVBzVpFymyHmERb8=", + "dev": true, + "optional": true, + "requires": { + "tr46": "0.0.3" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", + "dev": true, + "optional": true + } + } +} diff --git a/docs/search_index.json b/docs/search_index.json index 9038f974a..e08a7c543 100644 --- a/docs/search_index.json +++ b/docs/search_index.json @@ -1 +1 @@ -{"index":{"version":"0.5.12","fields":[{"name":"title","boost":10},{"name":"keywords","boost":15},{"name":"body","boost":1}],"ref":"url","documentStore":{"store":{"./":["1.","2.","3.","4.","fineuidoc","fineui的交互、前端以及视觉文档规范","getvalue,","populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件","setvalid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setxxx来实现","setvisible,","使用populate来清空或者重置布局,不要使用empty,","慎用resiz","控件都会提供setenable,","控件都会提供setvalue,","文档规范","谨慎监听和触发bi.controller.event_change事件,一般来说,控件都会有一个bi.classname.event_change事件,一些特殊的事件会在对应控件文档中列出"],"core/layout/vertical.html":["\"#wrapper\",","\"bi.label\",","\"layout","\"这里设置了hgap(水平间距),vgap(垂直间距)\",","'demo.vertical',","0","30","[{","api","bg1\",","bg2\",","bgap","bi.createwidget({","bi.vert","boolean","cls:","element:","height:","hgap","items:","lgap","number","padding值","rgap","scrolli","sourc","text:","tgap","true","true,fals","type:","vertic","vgap","{","});","},","}]","—","参数","可选值","垂直流式布局","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","设置垂直方向是否有滚动条","说明","默认值"],"core/layout/horizontal.html":["\"#wrapper\",","\"bi.absolute\",","\"bi.text_button\",","\"layout","\"middle\"","\"这里设置了lgap,rgap,tgap,bgap\",","'bi.horizontal',","0","0,","100,","200,","30","[","[{","]","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizont","boolean","cls:","columns","el:","element:","height:","hgap","horizont","items:","left:","lgap","number","padding值","rgap","right:","scrollx","sourc","string","text:","tgap","true","true,fals","type:","verticalalign","vgap","width:","{","});","},","}]","}],","—","元素的垂直对齐方式","参数","参考相关css属性","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","水平流式布局","类型","设置水平方向是否有滚动条","说明","默认值"],"core/layout/htape.html":["\"#wrapper\",","\"bi.htape\",","\"layout","'1',","'2',","'3',","'bi.button',","'bi.label',","'button1'}},{width:","'button2'}},{width:","'button3'}}]","'fill',","'fill',el:","0","100,","100,el:","200,","200,el:",":","[","[{width:","]","api","array","bg1\"","bg2\"","bg3\"","bgap","bi.createwidget({","bi.htap","cls:","el","element:","hgap","htape","item","lgap","number","padding值","rgap","sourc","text","text:","tgap","type","type:","vgap","width:","{","{type:","}","});","},","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平tape布局,两列定宽,一列自适应","类型","说明","默认值"],"core/layout/vtape.html":["\"#wrapper\",","\"bi.vtape\",","\"layout","'1',","'2',","'3',","'bi.button',","'bi.label',","'button1'}},{height:","'button2'}},{height:","'button3'}}","'fill',","'fill',el:","0","100,","100,el:","200,","200,el:",":","[","]","api","array","bg1\"","bg2\"","bg3\"","bgap","bi.createwidget({","bi.vtap","cls:","el","element:","height:","hgap","item","lgap","number","padding值","rgap","sourc","text","text:","tgap","type","type:","vgap","vtape","{","{height:","{type:","}","});","},","—","参数","可选值","垂直tape布局,两列定高,一列自适应","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","说明","默认值"],"core/layout/center_adapt.html":["\"#wrapper\",","\"bi.center_adapt\",","\"bi.label\",","\"center","\"layout","0","1\",","10,","2\",","30","[","[{","]","adapt","api","array","bg1\",","bg2\",","bgap","bi.center_adapt","bi.createwidget({","center_adapt","cls:","columns","element:","height:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应左右垂直居中布局","说明","默认值"],"core/layout/vertical_adapt.html":["\"#wrapper\",","\"bi.label\",","\"bi.vertical_adapt\",","\"layout","\"vertic","0","10,","30","300,","[","[{","]","adapt上下自适应\",","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.vertical_adapt","cls:","columns","element:","height:","hgap","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vertical_adapt","vgap","vgap:","width:","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应垂直居中布局","说明","默认值"],"core/layout/left_right_vertical_adapt.html":["\"#wrapper\",","\"bi.label\",","\"layout","\"右边的垂直居中\",","\"左边的垂直居中\",","'bi.left_right_vertical_adapt',","0","10,","100,","30","[","[{","]","api","array","bg1\",","bi.createwidget({","bi.left_right_vertical_adapt","cls:","element:","height:","item","items:","left:","left_right_vertical_adapt","lhgap","lhgap:","llgap","lrgap","number","padding值","rhgap","rhgap:","right:","rrgap","sourc","text:","type:","width:","{","}","});","}]","}],","—","参数","可选值","右边容器left","右边容器right","右边容器左右padding值","基础属性","子控件数组","左右分离,垂直方向居中容器","左边容器left","左边容器right","左边容器左右padding值","类型","说明","默认值"],"core/layout/flow.html":["\"#wrapper\",","\"bi.center_adapt\",","\"bi.label\",","\"bi.left\",","\"bi.right\",","\"layout","\"left","\"right","0","1\",","2\",","20","20,","30,","[{","api","array","bg1\",","bg2\",","bg3\",","bg4\",","bgap","bi.createwidget({","bi.flow","cls:","element:","flow","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","{","});","},","}]","}],","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","说明","靠左/右对齐的自由浮动布局","默认值"],"core/layout/center.html":["\"#wrapper\",","\"bi.center\",","\"bi.label\",","\"center","\"layout","\"normal\"","0","1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",","20","20,","2,为了演示label是占满整个的,用了一个whitespace:normal\",","3\",","4\",","[{","api","bg1\",","bg2\",","bg3\"","bg5\"","bgap","bi.cent","bi.createwidget({","center","cls:","element:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","whitespace:","});","},{","}],","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平和垂直方向都居中容器,","类型","说明","非自适应,用于宽度高度固定的面板","默认值"],"core/layout/horizontal_adapt.html":["\"#wrapper\",","\"bi.horizontal_adapt\",","\"bi.label\",","\"horizont","\"layout","//width:","0","10,","30","300,","[","[{","]","adapt左右自适应\",","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizontal_adapt","bi.verticalalign.middl","cls:","columns","const","element:","height:","hgap","horizontal_adapt","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","verticalalign","vgap","vgap:","width:","{","})","},","}]","—","元素的垂直对齐方式","参数","参考相关css属性","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应左右居中布局","说明","默认值"],"core/layout/horizontal_auto.html":["\"#wrapper\",","\"bi.horizontal_auto\",","\"bi.label\",","\"horizont","\"layout","0","10,","30","300,","[{","api","auto左右自适应\",","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizontal_auto","cls:","element:","height:","hgap","horizontal_auto","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","width:","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平方向居中自适应容器","类型","说明","默认值"],"core/layout/horizontal_float.html":["\"#wrapper\",","\"bi.horizontal_float\",","\"bi.label\",","\"horizont","\"layout","0","10,","200,","[","[{","]","api","array","bg1\",","bgap","bi.createwidget({","bi.horizontal_float","cls:","element:","float左右自适应\",","height:30","hgap","horizontal_float","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","width:","})","}]","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","浮动的水平居中布局","类型","说明","默认值"],"core/layout/float_center.html":["\"#wrapper\",","\"bi.label\",","\"floatcenter与center的不同在于,它可以控制最小宽度和最大宽度\",","\"layout","\"normal\"","'bi.float_center',","0","20","20,","300,","[{","api","bg1\",","bg2\",","bgap","bi.createwidget({","bi.float_cent","cls:","element:","float_cent","height:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","whitespace:","{","});","},","}],","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","浮动布局实现的居中容器","类型","说明","默认值"],"core/layout/border.html":["\"#wrapper\",","\"bi.label\"},","\"bi.label\"}}","'bi.border',","20","20,","200,","30,","300,","50,","[","]","api","bi.bord","bi.createwidget({","border","bottom:","center:","east:","el:","element:","height:","item","items:","left:","north,east,west,south,cent","north:","object","right:","sourc","south:","top:","type:","west:","width:","{","{el:","{type:","}","});","},","上下的高度固定/左右的宽度固定,中间的高度/宽度自适应","参数","可选值","基础属性","子控件对象","类型","说明","默认值"],"core/layout/grid.html":["\"#wrapper\",","\"bi.label\",","\"column","\"layout","'bi.grid',","0\",","0,","1\",","1,","2,","[]","[{","api","array","bg1\"","bg2\"","bg5\"","bg6\"","bi.createwidget({","bi.grid","cls:","column","column:","columns:","el:","element:","grid","item","items:","null","number","row","row:","rows:","sourc","text:","type:","{","}","});","},","}]","—","列数","参数","可选值","基础属性","子控件数组","类型","网格布局","行数","说明","默认值"],"core/layout/table.html":["\"bi.table\",","\"body\",","\"fill\",","'bi.button',","'button1'}},{width:","'button2'}},{width:","'button3'}}]","'fill',el:","'fill']","0","10","100,el:","110,","130],","20,","200,","200,el:","200],","30","30,","50,","70,","90,","[10,","[100,","[200,","[],","[{width:","additem","additem(arr)","array","array/numb","bi.createwidget({","bi.tabl","boolean","columns","columnsize:","element:","hgap","hgap:","item","items:","number","poplulate(items)","popul","rowsiz","rowsize:","scrolli","sourc","tabl","table作为一个列表集合存在,继承bi.widget","text:","true","type:","vgap","vgap:","{type:","});","内部元素间横向距离","内部元素间纵向距离","列项宽度","参数","参数设置","增加内容","子项","方法","方法名","是否出现滚动条","更换新的内容","用法","类型","行高","说明","默认值"],"core/layout/td.html":["\"bi.td\",","'body',","'fill'],","'label1'}},{","'label2'},{","'label3'}","0","20,","200,","200]","[20,","[200,","[[{el:","[]","additem","additem(arr)","array","bi.createwidget({","bi.td","columns","columnsize:","el:","element:","hgap","item","items:","number","poplulate(items)","popul","sourc","td","type:","vgap","{text:","});","内容项","列宽","单元格控件,继承bi.layout","参数","增加内容","方法","方法名","更换新的内容","横向间隙","用法","类型","纵向间隙","说明","默认值"],"core/abstract/button_group.html":["\"#wrapper\",","\"bi.button_group\",","\"bi.center\",hgap:","\"bi.label\",","\"bi.vertical\"","\"button_group\"","0,vgap:","0}]","50,","[","[{","[{type:","]","additem","api","array","behavior","bi.button_group","bi.buttongroup.choose_type_singl","bi.buttongroup.choose_type_single,","bi.createwidget({","button_group","choose_type_single,choose_type_multi,choose_type_all,choose_type_none,choose_type_default","choosetyp","choosetype:","choosetype可选值为","const","destroy","dobehavior","el:","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","height:","id","index","item","items:","layout","layouts:","object","popul","prependitem","removeitem","removeitemat","setenabledvalu","setnotselectedvalu","setvalu","sourc","text:","type:","valu","value,可以是单个值也可以是个数组","{","}","})","},","}]","}],","—","一组具有相同属性的元素集合,基类bi.widget","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","布局","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","移除制定元素","移除指定索引处的item","类型","自定义列表中item项的行为,如高亮,标红等","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","见上","设置value值","设置value值可用","设置未被选中的值","说明","选择类型","销毁组件","默认值"],"core/abstract/button_tree.html":["\"#wrapper\",","\"0\",","\"bi.button_tree\",","\"bi.label\",","\"bi.vertical\"","\"label1\",","[{","bi.button_tre","bi.buttongroup.choose_type_multi,","bi.createwidget({","button_tre","choosetype:","element:","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","height:50,","id","items:","layouts:","setenabledvalu","setnotselectedvalu","setvalu","sourc","text:","type:","valu","value,可以是单个值也可以是个数组","value:","vgap:10","})","}]","}],","—","一组具有相同属性的元素集合,基类bi.buttongroup","名称","回调参数","对外方法","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置value值可用","设置未被选中的值","说明"],"core/abstract/virtual_group.html":["\"#wrapper\",","\"bi.center\",hgap:","\"bi.center_adapt\",","\"bi.vertical\"","\"bi.virtual_group\",","0,vgap:","0}]","300,","500,","[","[{","[{type:","]","additem","api","array","bi.buttongroup.choose_type_multi,","bi.createwidget({","bi.virtual_group","choosetype:","element:","getvalu","height:","item","items:[]","layout","layouts:","popul","prependitem","render","setvalu","sourc","type:","value,可以是单个值也可以是个数组","virtual_group","width:","{","})","},","}],","—","一组具有相同属性的元素集合,基类bi.widget","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","布局","渲染列表","类型","获取被选中的值","设置value值","说明","默认值"],"core/abstract/custom_tree.html":["\"bi.button_tree\",","\"bi.button_tree\",choosetype:","\"bi.custom_tree\",","\"bi.custom_tree\"}}","\"bi.plus_group_node\",","\"bi.single_select_item\",","\"bi.vertical\",","\"bi.vertical\"}]}","\"根目录\",","\"第一级目录1\",","\"第二级文件1\",","0,","0,layouts:","1,","11,","2,","25","30","[","[{","[{type:","]","additem","api","array","bi.createwidget({","bi.custom_tre","choosetype:","custom_tre","el","el:","empti","expand","getallbutton","getallleav","getnodebyid","getnodebyvalu","getvalu","height:","hgap:","id","id:","inittre","item","items:","itemscr","layouts:","node","object","open:","pid:","popul","prependitem","render","setvalu","sourc","stroke","true,","type:","valu","value,可以是单个值也可以是个数组","value:","{","{el:","{type:","{},popup:","}","});","},","}]","—","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","子组件构造器","对外方法","构造树结构","根据id获取节点","根据value值获取节点","清空组件","渲染列表","生成树方法","类型","自定义树,基类bi.widget","获取所有button","获取所有的叶子节点","获取被选中的值","设置value值","说明","默认值"],"core/abstract/grid_view.html":["\"bi.grid_view\",","()","0","100,","100;","30,","300,","30;","400,","[","[],","]","api","array","b","bi.collectionview.event_scrol","bi.createwidget({","bi.grid_view","boolean","columnwidthgett","columnwidthgetter:","estimatedcolumns","estimatedcolumnsize:","estimatedrows","estimatedrowsize:","function","getmaxscrollleft","getmaxscrolltop","getscrollleft","getscrolltop","grid_view","gridview,基类bi.widget","height","height:","item","items:","number","number,funct","overflowi","overflowx","overscancolumncount","overscanrowcount","popul","restor","return","rowheightgett","rowheightgetter:","scrollleft","scrollleft,","scrolltop","scrolltop:","scrolltop}","setestimatedcolumns","setestimatedrows","setoverflowi","setoverflowx","setscrollleft","setscrolltop","sourc","true","true,fals","type:","width","width:","{","{scrollleft:","}","});","},","—","事件","列宽,必设","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","是否显示横向滚动条","是否显示纵向滚动条","每格列宽","每格列宽,rowheightgetter为function时必设","每格行宽","每格行宽,columnwidthgetter为function时必设","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","类型","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","行宽,必设","设置列宽","设置是否显示横向滚动条","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","设置行宽","说明","还原列表设置","默认值"],"core/abstract/collection_view.html":["\"bi.collection_view\",","%","(index)","*","/","0","10","10)","300,","400,","50","50,","[","[],","]","api","array","b","bi.collection_view","bi.createwidget({","bi.gridview.event_scrol","boolean","cellsizeandpositiongett","cellsizeandpositiongetter:","collection_view","collectionview,基类bi.widget","element:\"#wrapper\",","function","getmaxscrollleft","getmaxscrolltop","getscrollleft","getscrolltop","height","height:","horizontaloverscans","index","item","items:","math.floor(index","number","overflowi","overflowx","popul","restor","return","scrollleft","scrollleft,","scrolltop","scrolltop:","scrolltop}","setoverflowi","setoverflowx","setscrollleft","setscrolltop","sourc","true","true,fals","type:","verticaloverscans","width","width:","x:","y:","{","{scrollleft:","}","});","—","—ßß","事件","列宽,必设","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","是否显示横向滚动条","是否显示纵向滚动条","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","类型","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","行宽,必设","设置是否显示横向滚动条","设置每个单元格的位置坐标和宽高","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","说明","还原列表设置","默认值"],"core/abstract/virtual_list.html":["\".\"","\"bi.label\",","\"bi.virtual_list\",","\"xxxx\"}],","(i","(i,","+","0","1)","10","100","30,","[","]","api","array","bi.createwidget({","bi.extend({},","bi.map([{value:","bi.virtual_list","blocksiz","destroy","element:\"body\",","function","height:","item","item)","item,","item.text,","items:","mount","number","overscanheight","popul","render","restor","return","scrolltop","sourc","text:","type:","virtual_list","virtuallist,基类bi.widget","{","})","});","—","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","渲染列表","滚动条相对于顶部的偏移","类型","组件挂载","说明","还原列表设置","销毁组件","默认值"],"core/combination/bi.combo.html":["\"bi","\"bi.button\",","\"bi.combo\",","\"body\",","\"bottom\"","\"click\"","\"left,right,center\"","\"测试\",","0","2,","25","adjustheight","adjustlength","adjustlength:","adjustwidth","adjustxoffset","adjustyoffset","api","bi.combo","bi.combo.event_after_hideview","bi.combo.event_after_init","bi.combo.event_after_popupview","bi.combo.event_before_hideview","bi.combo.event_before_popupview","bi.combo.event_chang","bi.combo.event_collaps","bi.combo.event_expand","bi.combo.event_trigger_chang","bi.createwidget({","boolean","bottom","bottom,left","bottom,right","click,hov","combo","combo,基类bi.widget","comboclass","combo类","destroy","destroywhenhid","direct","el","el:","element:","fals","function","getpopupposit","getvalu","getview","height","height:","hidecheck","hideview","hover\"","hoverclass","hover类","isdefaultinit","isneedadjustheight","isneedadjustwidth","isviewvis","item","left","left,right,cent","number","object","offsetstyl","popul","popup","popup\"","popup:","resetlistheight","resetlistwidth","right","setvalu","showview","sourc","stopev","stoppropag","string","text:","toggl","top","top,left","top,right","trigger","trigger发生改变触发","true","true,fals","type:","v","value值","width","{","{}","|","}","});","},","—","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","下拉框初始化后触发","下拉框展开触发","下拉框收起触发","事件","切换状态","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","开启或者隐藏弹出层","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层显示位置","弹出层点击触发","弹窗层是否可见","是否阻止事件","是否需要宽度调整","是否需要高度调整","是否默认初始化子节点","显示弹出层","类型","自定义下拉框trigger","获取combo","获取弹出层","获取弹出层的位置","设置combo","说明","调整宽度","调整横向偏移","调整纵向偏移","调整高度","重置列表宽度","重置列表高度","销毁组件","阻止事件冒泡","隐藏弹出层","隐藏弹窗层是否销毁","默认值"],"core/combination/bi.expander.html":["\"bi","\"bottom\"","\"click\"","0","adjustlength","api","bi.expand","bi.expander.event_after_hideview","bi.expander.event_after_init","bi.expander.event_after_popupview","bi.expander.event_before_hideview","bi.expander.event_before_popupview","bi.expander.event_chang","bi.expander.event_collaps","bi.expander.event_expand","bi.expander.event_trigger_chang","boolean","bottom","bottom,left","bottom,right","click,hov","destroy","direct","el","expand","expanderclass","expander初始化后触发","expander展开触发","expander收起触发","fals","getallleav","getnodebyid","getnodebyvalu","getvalu","getview","hideview","hover\"","hoverclass","hover类","id","isdefaultinit","isexpand","isviewvis","item","left","number","object","popul","popup","popup\"","right","setvalu","showview","string","toggl","top","top,left","top,right","trigger","trigger发生改变触发","true","true,fals","v","valu","value值","{","|","}","—","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","事件","切换状态","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","展开类","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层点击触发","弹窗层是否可见","是否默认初始化子节点","显示弹出层","某个可以展开的节点,基类bi.widget","根据id获取节点","根据value值获取节点","类型","自定义下拉框trigger","节点是否展开","获取combo","获取弹出层","获取所有的叶子节点","设置combo","说明","销毁组件","隐藏弹出层","默认值"],"core/combination/group_combo.html":["\"\",","\"\"}","\"bi.button_tree\",choosetype:","\"bi.text_button\",","\"bi.vertical\"}]}}","\"bottom\"","\"click\"","0","0,layouts:","[","[{type:","]","adjustlength","api","array","bi.combo_group","boolean","bottom","bottom,left","bottom,right","childern","click,hov","direct","el","fals","getvalu","group_combo","isdefaultinit","isneedadjustheight","isneedadjustwidth","item","left","number","object","popul","popup","right","setvalu","string","text:","top","top,left","top,right","trigger","true,fals","v","value:","value值","{el:","{type:","|","—","下拉列表的弹出方式","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","子组件","对外方法","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","是否需要宽度调整","是否需要高度调整","是否默认初始化子节点","类型","自定义下拉框trigger","获取combo","设置combo","说明","默认值"],"core/combination/loader.html":["\"top\"","[]","additem","api","array","bi.load","boolean","combo弹出层位置","count","destroy","direct","empti","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasprev","id","isdefaultinit","item","itemscr","loader","logic","next","object","onload","popul","prependitem","prev","setnotselectedvalu","setvalu","string","top,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)","true","true,fals","valu","value,可以是单个值也可以是个数组","{dynamic:true,scrolly:true}","—","上一页","下一页","内部前插入","内部后插入","判断是否有上一页","判断是否有下一页","刷新列表","加载中","加载控件,bi.widget","参数","可选值","名称","回调参数","基础属性","子组件","子组件构造器","对外方法","是否显示总页数","是否默认初始化子数据","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","销毁组件","默认值"],"core/combination/navigation.html":["\"#wrapper\",","\"bi.label\",","\"bi.navigation\",","\"bottom\"","\"layout","\"前进\",","\"后退\",","\"第\"","\"页\"","+","1","30,","8),","[{","aftercardcr","aftercardshow","api","bg\"","bi.createwidget({","bi.navig","bi.random(1,","boolean","cardcreat","cardcreator:","cls:","defaultshowindex","destroy","direct","element:","empti","false,","function","function(v)","getselect","getselectedcard","getvalu","height:","item","items:","logic","mount","navig","object","once:","popul","render","return","setselect","setvalu","singl","sourc","string","tab","tab:","tab页元素","text:","top,bottom,left,right,custom","true","true,fals","type:","v","valu","value:","{","{dynamic:true}","}","})","},","}]","—","创建卡导航页页之后","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","导航栏控件,bi.widget","导航页展示之后","挂载组件","控件位置","是否为单页","是否默认显示","清空组件","渲染组件","类型","获取被选中的值","获取选中的index","获取选中的导航页","设置value值","设置选中的index","说明","销毁组件","面板显示之后","面板构造之后","面板构造器","默认值"],"core/combination/searcher.html":["\"bi","\"bi.button_group\",","\"bi.label\",","\"bi.search_editor\"}","\"bi.searcher\",","\"bi.searcher_view\"}","\"bi.vertical\"","\"张三\"","()","0","[{","adapt","adapter:","adjustheight","adjustview","api","bgap","bi.createwidget({","bi.search","bi.searcher.event_after_init","bi.searcher.event_chang","bi.searcher.event_paus","bi.searcher.event_search","bi.searcher.event_start","bi.searcher.event_stop","boolean","border\",","choose_type_singl","choosetyp","cls:","const","destroy","dosearch","el","element:\"#wrapper\",","empti","event_after_init","event_paus","event_search","event_start","event_stop","fals","function","function(op.callback)","getitems:","getkeyword","getvalu","getview","hasmatch","hgap","isautosearch","isautosearch为false时启用","isautosync","isdefaultinit","issearch","isviewvis","items,","items:","keyword","layouts:","lgap","masker","masker:","masker层","null","number","object","onsearch","padding值","popul","popup","popup:","result,","return","rgap","searcher","searchresult,","setvalu","sourc","stopsearch","tgap","true","true,fals","type:","valu","value:","vgap","{","{offset:","{type:","{}}","}","})","},","}]","}],","—","事件","事件名称","事件方法","停止搜索","停止搜索触发(搜索框为空)","初始化之后","刷新列表","即是否保持搜索面板和adapter面板状态值的统一","参数","可选值","名称","回调参数","基础属性","对外方法","开启弹出层的元素","开始搜索","开始搜索触发","弹出层","弹出层显示的位置元素","搜索中","搜索列表位置","搜索暂停触发(搜索文本以空白字符结尾)","搜索结果面板初始化完成后触发","搜索结果面板发生改变触发","搜索逻辑控件,bi.widget","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否匹配","是否正在搜索","是否自动同步数据,","是否自动搜索","是否默认初始化子节点","暂停搜索","正在搜索时触发","清空组件","类型","组件是否可见","获取搜索关键词","获取搜索关键词数组","获取搜索列表栏","获取被选中的值","设置value值","说明","调整搜索列表栏","调整高度","选择类型","销毁组件","默认值"],"core/combination/switcher.html":["\"#wrapper\",","\"bi","\"bi.button\",","\"bi.switcher\",","\"click\"","\"switcher\"","25,","adapt","adapter:","adjustview","api","bi.createwidget({","bi.direction.top","bi.switch","boolean","click,hov","destroy","direct","el","el:","element:","empti","event_after_hideview","event_after_init","event_after_popupview","event_before_hideview","event_before_popupview","event_collaps","event_expand","event_trigger_chang","getallleav","getnodebyid","getnodebyvalu","getvalu","getview","height:","hideview","hover\"","hoverclass","hover类","id","isexpand","isviewvis","item","masker","masker层","null","obejct","object","popul","popup","popup\"","popup:","setadapt","setvalu","showview","sourc","string","switcher","switcherclass","text:","toggl","trigger","true","true,fals","type:","valu","{","}","})","},","—","下拉列表的弹出方式","事件名称","事件方法","切换显示或隐藏面板,bi.widget","切换状态","切换类","初始化之后","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","弹出层","弹出层的位置","弹窗层是否可见","显示弹出层","根据id获取节点","根据value值获取节点","清空组件","类型","自定义下拉框trigger","节点是否展开","获取弹出层","获取所有的叶子节点","获取被选中的值","设置value值","设置弹出层显示的位置元素","说明","调整弹出层显示的位置元素","销毁组件","隐藏弹出层","面板切换","面板展开","面板收起","面板显示之前","面板显示之后","面板显示的位置","面板隐藏之前","面板隐藏之后","默认值"],"core/combination/tab.html":["\"#wrapper\",","\"bi","\"bi.button_group\",","\"bi.label\",","\"bi.tab\",","\"bottom\"","\"tab1\",","\"tab2\",","\"面板1\"","\"面板2\"","(v)","1,","1:","2,","2:","30,","50","[{","api","bi.createwidget();}","bi.createwidget({","bi.switch","boolean","card\",","cardcreat","cardcreator:","cardnam","case","cls:","defaultshowindex","destroy","direct","element:","empti","fals","function","function(v)","getselect","getselectedtab","gettab","getvalu","height:","item","items:","logic","mount","object","popul","removetab","render","return","setselect","setvalu","singl","sourc","string","switch","tab","tab:","tab标签页","text:","top,bottom,left,right,custom","true,fals","type:","v","valu","value:","width:","{","{dynamic:false}","{return","}","})","},","}]","—","切换显示或隐藏面板,bi.widget","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","挂载组件","控件位置","是否为单页","是否默认显示tab页","清空组件","渲染组件","移除tab面板页","类型","获取tab面板页","获取被选中的值","获取选中的index","获取选中的tab面板页","设置value值","设置选中的index","说明","销毁组件","面板构造器","默认值"],"core/layer/layer_float_box.html":["\"#wrapper\",","\"bi.text_button\",","\"点击弹出floatbox\",","200,","500","600","80,","=","api","bi.barpopoversection()).open(id);","bi.createwidget({","bi.float_box","bi.popovers.create(id,","bi.popovers.remove(id);","bi.uuid();","close","destroy","element:","event_float_box_clos","float_box","floatbox弹出层,bi.widget","function()","handler:","height","height:","hide","id","index","new","number","open","popul","sectionprovid","setzindex","show","sourc","text:","type:","var","width","width:","z","{","}","})","—","事件名称","事件方法","关闭弹出层","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","弹出层宽度","弹出层高度","打开弹出层","显示","类型","设置z","说明","销毁组件","隐藏","默认值"],"core/layer/layer_popup.html":["\"#wrapper\",","\"aaa\"","\"aaa\",","\"auto\"","\"bbb\"","\"bbb\",","\"bi.button_group\",","\"bi.button_group\",items:","\"bi.popup_view\",","\"bi.vertical\"","\"bi.vertical\"}]}","0","0,behaviors:","100","25","[]","[],","[{","[{type:","api","array","bgap","bi.createwidget({","bi.direction.top","bi.popup_view","boolean","button","choosetype:","const","direct","el","el:","element:","fals","getvalu","getview","height","hgap","index","item","items:","layouts:","lgap","logic","maxheight","maxwidth","minheight","minwidth","number","number/str","object","padding值","popul","popup","resetheight","resetwidth","rgap","setvalu","setzindex","sourc","stopev","stoppropag","tab","text:","tgap","tool","toolbar栏","true,fals","type:","valu","value:","vgap","width","z","zindex在1000w,bi.widget","{","{dynamic:true}","{},layouts:","}","})","},","}]","}],","—","下拉框弹出层,","值","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件","对外方法","导航栏","工具栏的方向","弹出层最大宽度","弹出层最大高度","弹出层最小宽度","弹出层最小高度","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否停止mousedown、mouseup事件","是否停止mousedown、mouseup向上冒泡","类型","自定义工具栏","获取value值","获取弹出层","设置valu","设置z","说明","重置宽度","重置高度","默认值"],"core/layer/layer_searcher.html":["\"#wrapper\",","\"a\"","\"a\");","\"a\",","\"aba\"","\"aba\",","\"acc\"","\"acc\",","\"bi.button_group\",behaviors:","\"bi.searcher_view\",","\"bi.vertical\"","\"bi.vertical\"}]}","()","=","[],","[{","api","bi.createwidget({","bi.i18ntext(\"bi","bi.searcher_view","bi.selection.singl","choosetyp","const","element:","empti","function","getvalu","hasmatch","items:","keyword","layouts:","matcher","matchresult,","no_select\")","object","popul","redmark:","return","searcher","searcher.populate([{","searchresult,","setvalu","sourc","string","text:","tiptext","title文本","true;}","true;}},","type:","valu","value:","var","{","{redmark:","{return","{type:","});","},items:","},{","}],","}]}","—","值","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","完全匹配的构造器","对外方法","搜索面板,","是否有匹配的元素","清空组件","类型","获取value值","设置valu","说明","选择类型","默认值"],"core/widget.html":["\"","\"div\"","(注:",",一些需要在设置状态后做的额外工作可以通过重写_setxxx来实现)","addwidget","api","attr","attribut","basecl","beforecr","beforedestroy","beforemount","bi.widget","boolean","cl","class类名","creat","data","destroy","disabl","dobehavior","empti","enabl","extracl","fals","fineui2.0引入生命周期后,widget的实现类不需要重写setenable,setvalid等方法,会自动调用子组件的对应方法","getheight","getnam","gettag","gettext","getvalu","getwidgetbynam","getwidth","haswidget","height","html标签","invalid","invis","isen","ismount","isol","isvalid","isvis","key,valu","mount","name","name,widget","nameorwidget","null","object","removewidget","render","root","seten","setheight","settag","settext","setvalid","setvalu","setvis","setwidth","string","tag","tagnam","text","true,fals","updat","valid","valu","visibl","widget","width","—","判断是否有效","判断是否有该组件","判断组件是否挂载","参数","可选值","名称","回调参数","基础class类","基础属性","对外方法","属性","所有控件的超类","扩展class类","数据","是否可用","是否可见","是否有效","根据组件名称获取组件","根组件","添加组件","清空组件","渲染组件","生命周期函数","移除组件","类型","组件实例刚被创建","组件实例创建完成","组件挂载","组件挂载之前","组件更新","组件销毁前调用","组件销毁后调用","自定义下拉列表中item项的行为,如高亮,标红等","获取tag","获取text值","获取value值","获取组件名称","获取组件宽度","获取组件高度","设置tag","设置text值","设置value值","设置组件不可用","设置组件不可见","设置组件可用","设置组件可见","设置组件宽度","设置组件属性","设置组件无效","设置组件是否可用","设置组件是否可见","设置组件是否有效","设置组件有效","设置组件高度","说明","销毁组件","默认值"],"core/single.html":["api","bi.singl","boolean","disabledhov","enablehov","fals","gettiptyp","gettitl","getvalu","getwarningtitl","isreadonli","item","null","opt","popul","readonli","settitl","setvalu","setwarningtitl","singl","string","success,warn","tiptyp","titl","title,opt","title类型","true,fals","valu","warningtitl","—","刷新或者清空列表","参数","取消hover事件","可选值","名称","回调参数","基础属性","对外方法","恢复hover可用","所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类bi.widget","是否只读","类型","组件value值","获取tiptyp","获取titl","获取value值","获取warningtitl","设置titl","设置value值","设置错误titl","说明","这仅仅只是一个超类,","错误titl","默认值"],"core/basic_button.html":["api","b","basic_button","beforeclick","bi.basic_button","bi.emptyfn","bindev","boolean","button的选中状态","click,","dblclick,","destroy","disableselect","dishov","doclick","empti","fals","forcenotselect","forceselect","function","gettext","handl","handler","hover","hover事件","isdisableselect","isforcenotselect","isforceselect","isonc","isselect","isshadowshowingonselect","lclick","mousedown,","mouseup,","null","onc","select","setselect","settext","shadow","stopev","stoppropag","string","trigger","true,fals","valu","—","一般的button父级,基类bi.singl","使能选中","判断是否怎么点击都不会被选中","判断是否点击即选中","判断是否让选中","参数","取消hover事件","可选值","名称","回调参数","基础属性","对外方法","无论怎么点击都不会被选中","是否只允许点击一次","是否显示阴影","是否被选中","清空组件","点击一次选中有效,再点无效","点击事件","点击事件之前","点击事件回调","点击即选中,","类型","组件value值","绑定事件","获取文本值","被选元素要触发的事件","设置文本值","设置选中的文本","说明","返回该对象","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中状态下是否显示阴影","销毁组件","阻止事件","阻止冒泡","默认值"],"core/node_button.html":["api","b","bi.basicbutton","bi.nodebutton","boolean","doclick","fals","isonc","isopen","node_button","open","setopen","triggercollaps","triggerexpand","true,fals","—","不仅有选中状态而且有展开状态,","判断节点是否展开","参数","可选值","名称","回调参数","基础属性","对外方法","点击一次后失效","点击展开","类型","节点展开","节点收起","节点是否展开","表示一个可以展开的节点,","设置节点展开状态","说明","默认值"],"core/pane.html":["api","bi.i18ntext(\"bi","bi.pan","bi.widget","boolean","check","empti","function","hasmatch","item","load","no_selected_item\")","onload","overlap","pane","popul","settipvis","string","tiptext","title文本","true","true,fals","—","刷新列表","加载中","加载完毕","参数","可选值","名称","回调参数","基础属性","对外方法","当没有元素时有提示信息的view,","是否有匹配的元素","检查是否为空","清空组件","类型","设tip可见","说明","默认值"],"base/label.html":["\"","\"bi.label\",","\"基本标签\"","0","100,","30,","api","bgap","bi.createwidget({","bi.label","boolean","center","disabl","dohighlight","doredmark","forcecent","gettext","hgap","keyword","label","left,center,right","lgap","normal,nowrap","nowrap","null","number","padding值","popul","py","rgap","setstyl","settext","setvalu","sourc","string","text","text:","textalign","textheight","textheight:","textwidth","textwidth:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","vgap","warningtitl","whitespac","});","—","不考虑超出边界的情况,","元素内空白处理方式","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","在未知宽度和高度时有效","基础属性","对外方法","提示titl","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","文本内容","文本对齐方式","文本标签","文本标签宽度","文本标红","文本高亮","无","是否无论如何都要居中,","灰化","空","类型","获取文本值","设置文本值","设置文本样式","说明","错误提示titl","需要设置的文本值text","需要设置的文本标签样式,例{\"color\":\"#000\"}","高级属性","默认值"],"base/bubble.html":["\"","\"#wrapper\",","\"top\"","\"测试\"","'bi.bubble',","30,","35","api","bi.bubbl","bi.createwidget({","bubbl","direct","element:","height","height:","number","settext","sourc","string","text","text:","type:","})","—","参数","可选值","名称","回调参数","基础属性","对外方法","气泡提示","气泡显示位置","气泡显示内容","气泡高度","类型","设置文本值","说明","需要设置的文本值text","默认值"],"base/toast.html":["\"","\"#wrapper\",","\"success\"","\"toast测试\"","\"warning\",","'bi.toast',","30","30,","api","bi.createwidget({","bi.toast","element:","height","height:","level","level:","number","setheight","settext","sourc","string","success,warn","text","text:","toast","toast提示","type:","})","—","参数","可选值","名称","回调参数","基础属性","对外方法","提示类型","显示内容","类型","设置文本值","设置高度","说明","需要设置的文本值text","需要设置的高度值height","高度","默认值"],"base/message.html":["\"#wrapper\",","\"bi.button\",","'点击我弹出一个消息框',","30,",":","alert","bi.createwidget({","bi.msg","bi.msg.confirm('测试消息框',\"我是测试消息框的内容\");","callback","callback,","confirm","context","element:","function()","handler","height","level,","messag","message,","min_width","prompt","sourc","text","title,","toast","toast提示","type:","value,","{","}","});","名称","回调参数","对外方法","提示消息框","消息提示","确认消息框","警告消息框","说明"],"base/button/button.html":["\"","\"#wrapper\",","'bi.button',","'common',","'一般按钮',","0","10","30","90","[","]","api","array","bgap","bi.button","bi.createwidget({","block","boolean","button","clear","cneter","common","common,success,warning,ignor","destroy","doclick","dohighlight","doredmark","element:","fals","forcecent","height","height:","hgap","iconclass","isshadowshowingonselect","item","left,center,right","level","level:","lgap","minwidth","normal,nowrap","nowrap","null","number","padding值","readonli","rgap","settext","setvalu","shadow","sourc","string","text:","textalign","textheight","textwidth","tgap","true","true,fals","type:","unhighlight","unredmark","vgap","whitespac","width","});","—","不考虑超出边界的情况,","元素内的空白处理方式","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","图标类型","在未知宽度和高度时有效","基础属性","子控件数组","宽度","对外方法","按钮文本宽度","按钮文本高度","按钮类型","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","文字布局","文字类型的按钮,基类bi.basicbutton","文本标红","文本高亮","是否去掉边框和背景","是否只读","是否块状显示,即不显示边框,没有最小宽度的限制","是否无论如何都要居中,","最小宽度,如果block/clear中某一项为true,此项值为0,否则为90","点击事件","类型","设置文本值","说明","选中状态下是否显示阴影","销毁事件","需要设置的文本值text","高度","高级属性","默认值"],"base/button/text_button.html":["\"","'bi.text_button',","'文字按钮',","0","10","30","api","bi.createwidget({","bi.text_button","boolean","cneter","doclick","dohighlight","doredmark","fals","forcecent","height:","hgap","left,center,right","lgap","normal,nowrap","nowrap","null","number","padding值","py","rgap","setstyl","settext","setvalu","sourc","string","text","text:","text_button","textalign","textheight","textwidth","true,fals","type:","unhighlight","unredmark","whitespac","});","—","不考虑超出边界的情况,","元素内的空白处理方式","参数","取消文本标红","取消文本高亮","可以点击的一行文字,基类bi.basicbutton","可选值","名称","回调参数","在未知宽度和高度时有效","基础属性","对外方法","按钮文本内容","按钮文本宽度","按钮文本高度","效果相当于文本框left","效果相当于文本框right","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","文字布局","文本标红","文本高亮","是否无论如何都要居中,","点击事件","类型","设置文本值","设置文本样式","说明","需要设置的文本值text","需要设置的文本标签样式,例{\"color\":\"#000\"}","高级属性","默认值"],"base/button/icon_button.html":["\"close","'bi.icon_button',","20","20,","api","bi.createwidget({","bi.icon_button","cls:","doclick","font\",","ha","height:","icon_button","iconheight","iconwidth","null","number","sourc","type:","width:","});","—","参数","可选值","名称","回调参数","图标button,基类bi.basicbutton","图标宽度","图标高度","基础属性","对外方法","点击事件","类型","说明","默认值"],"base/button/image_button.html":["\"","\"100%\"","\"http://www.easyicon.net/api/resizeapi.php?id=1206741&size=128\",","'bi.image_button',","100","100,","api","bi.createwidget({","bi.image_button","doclick","getimageheight","getimagewidth","getsrc","height:","iconheight","iconwidth","image_button","number/str","setheight","setimageheight","setimagewidth","setsrc","setwidth","sourc","src","src:","string","type:","width:","});","—","参数","可选值","名称","回调参数","图标宽度","图标高度","图片的button,基类bi.basicbutton","图片路径","基础属性","宽度width","对外方法","点击事件","类型","获取图片宽度","获取图片路径","获取图片高度","设置图片宽度","设置图片路径","设置图片高度","设置按钮宽度","设置按钮高度","说明","高度height","默认值"],"base/editor/editor.html":["\"","\"#wrapper\",","\"bi.editor\",","\"text\"","\"warning\"","\"字段不可重名!\",","0","2","200,","30","4","allowblank","api","b","bgap","bi.createwidget({","bi.editor","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","blur","blur事件","boolean","disableerror","disablewatermark","editor","editor的value发生改变触发","element:","enableerror","enablewatermark","errortext","errortext:","fals","focu","focus事件","function","geterrortext","getlastvalidvalu","getvalu","height:","hgap","inputtyp","isedit","isvalid","key","keydown时触发","lgap","mouseout","number","onkeydown","padding值","quitcheck","resetlastvalidvalu","rgap","selectal","seterrortext","seterrorvis","setvalu","sourc","string","string/funct","success,warn","text","tgap","tiptyp","true,fals","type:","validationcheck","valu","vgap","watermark","width:","});","—","事件","停止输入触发","参数","参考input输入框类型","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","开始输入触发","恢复文本框placeholder可用","按下backspace触发","按下空格触发","按键事件","提示类型","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框,基类bi.singl","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置error不可用","设置error可用","设置文本框placeholder不可用","设置文本框值","设置错误文本","设置错误文本可见","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入框类型","输入较验函数","选中文本框文本","重置文本框最后一次输入的有效值","错误提示","默认值"],"base/editor/code_editor.html":["\"","\"bi.code_editor\",","\"mvc","2","400","600,","api","bi.code_editor","bi.createwidget({","blur","boolean","border\",","cls:","code_editor","fals","focu","function","getstyl","getvalu","height:","insertparam","insertstr","lineheight","number","param","paramformatt","readonli","refresh","setstyl","setvalu","sourc","str","string","true,fals","type:","valu","watermark","width:","});","—","代码文本框,基类bi.singl","刷新文本框","参数","参数显示值构造函数","可选值","名称","回调参数","基础属性","对外方法","插入参数","插入字符串","文本框placehold","文本框值","文本框失焦","文本框获取焦点","是否只读","类型","获取文本样式","获取文本框值","行高","设置文本样式","设置文本框值","说明","需要设置的文本标签样式style,例{\"color\":\"#000\"}","默认值"],"base/editor/multifile_editor.html":["\"","\"bi.multifile_editor\",","1","300","400,","accept","api","bi.createwidget({","bi.multifile_editor","bi.multifileeditor.event_progress","bi.multifileeditor.event_upload","bi.multifileeditor.event_uploadstart","boolean","fals","getvalu","height:","maxsiz","multifile_editor","multipl","number","reset","select","sourc","string","true,fals","type:","upload","url","width:","});","—","上传结束后触发","上传过程中触发","事件","参数","可选值","名称","回调参数","基础属性","多文件,基类bi.singl","对外方法","开始上传时触发","文件上传","文件路径","是否支持多选","最大可选数量","类型","获取文件名称","说明","选择文件","重置","默认值"],"base/editor/textarea_editor.html":["\"","\"bi.textarea_editor\",","300","400,","api","bi.createwidget({","bi.textarea_editor","blur","focu","getstyl","getvalu","height:","setstyl","setvalu","sourc","string","textarea_editor","type:","valu","width:","});","—","参数","可选值","名称","回调参数","基础属性","对外方法","文本域,基类bi.singl","文本域失焦","文本域的值","文本域获取焦点","类型","获取文本域值","获取文本域样式","设置文本域值","设置文本域样式","说明","需要设置的文本域样式style,例{\"color\":\"#000\"}","默认值"],"base/editor/formula_editor.html":["\"","\"100%\"","\"100%\",","\"bi","\"bi.formula_editor\",","'sum(c5,","16,","2","26)',","api","bi.createwidget({","bi.formula_editor","border\",","cls:","disablewatermark","field","fieldtextvaluemap","fn","focu","formula_editor","getcheckstr","getformulastr","getusedfield","getvalu","height:","insertfield","insertfunct","insertoper","insertstr","lineheight","number","op","refresh","setfieldtextvaluemap","setfunct","setvalu","showhint","sourc","str","string","type:","v","valu","value:","watermark","watermark:'请输入公式',","width:","{}","});","—","公式编辑控件,基类bi.singl","刷新文本框","参数","可选值","名称","回调参数","基础属性","对外方法","插入函数","插入字符串","插入操作符","文本域的值","文本框placehold","文本框获取焦点","添加字段","类型","获取公式","获取可用字段","获取文本框值","行高","设置函数","设置文本框placeholder不可用","设置文本框值","说明","默认值"],"base/table/table_view.html":["\"bi.table_view\",","'body',","1],","200,","25","300,","400,","500],","=","[0,","[100,","[]","[],","array","bi.createwidget({","bi.table.event_table_after_init","bi.table.event_table_res","bi.table.event_table_scrol","bi.table_view","boolean","columns","columnsize:","element:","fals","footer","footerrows","freezecols:","function(row1,","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreeze:","isneedmerg","isneedmerge:","item","items:","mergecol","mergecols:","mergerul","number","popul","regioncolumns","resiz","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","table_view","table初始化完成后触发","table大小调整时触发(窗口变化等)","true,","type:","});","—","事件","列项间的","刷新内容","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","子组件","得到列宽","方法","方法名","时合并","是否含有数值滚动条","是否需要合并单元格","普通单元格高度","滚动事件","类型","能处理静态宽度以及动态宽度的表","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","表头","表头高度","表尾","表尾高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表格","默认row1","默认值","默认相等时合并"],"base/table/grid_table.html":["\"bi.grid_table\",","'body',","1],","25","500,","600,","[0,","[50,50,200,250,400],","[]","array","bi.createwidget({","bi.grid_t","boolean","columns","columnsize:","element:","fals","freezecol","freezecols:","getcolumns","getlefthorizontalscrol","getregioncolumns","getregions","getrighthorizontalscrol","getverticalscrol","grid_tabl","header","header:","headerrows","height","height:","isneedfreez","isneedfreeze:","isneedresize:","isresizeadapt:","item","items,","items:","number","popul","regioncolumns","restor","row","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","true,","type:","width","width:","});","—","储存","冻结列","列表展示的table,继承bi.widget","列项间的","刷新内容","单元格宽度集合","参数","参数设置","子组件","得到列宽","方法","方法名","是否需要冻结","普通单元格高度","类型","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获取间隙大小","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认值"],"base/table/collection_table.html":["\"bi.collection_table\",","\"bi.label\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","25","=","[","[200,200],","[]","[{","]","array","bg1\",","bg2\",","bg3\",","bg4\",","bi.collection_t","bi.createwidget({","boolean","cls:","collection_t","columns","columnsize:","element:","fals","freezecol","function(row1,","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getverticalscrol","headerrows","height","isneedfreez","isneedmerg","item","items:","mergecol","mergerul","number","popul","regioncolumns","restor","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","text:","type:","width","{","});","},","}]","}],","—","冻结的列","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加行","子组件","存储数据","得到列宽","方法","方法名","时合并","是否冻结列","是否需要合并单元格","普通单元格高度","类型","继承bi.widget","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取纵向滚动距离","获得列项之间的间隙","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认row1","默认值","默认相等时合并"],"base/table/resizable_table.html":["\"bi.label\",","\"bi.resizable_table\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","25","[","[200,200],","[]","[{","]","array","attr","bg1\",","bg2\",","bg3\",","bg4\",","bi.createwidget({","bi.resizable_t","boolean","cls:","columns","columnsize:","element:","fals","freezecol","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","headerrows","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items:","key:键,value:值","maxcolumns","mergecol","mincolumns","number","popul","regioncolumns","resizable_t","restor","row","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","text:","true","type:","{","});","},","}]","}],","—","保存表","冻结的列","列项间的","刷新内容","单元格宽度集合","参数","参数设置","可调整列宽的grid表格,继承bi.widget","合并的单元格列号","子组件","得到列宽","方法","方法名","是否调整时自适应","是否需要冻结列","是否需要合并单元格","是否需要调整大小","普通单元格高度","最大列宽","最小列宽","类型","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认值"],"base/pager.html":["\"bi.pager\",","\"上一页\"","\"下一页\"","\"尾页\"","\"首页\",","0","1","18,","1;}","5,","50,","6,","api","array","attr","behavior","bi.createwidget({","bi.pag","bi.pager.event_after_popul","boolean","curr","curr:","dynamicshow","dynamicshowfirstlast","dynamicshowprevnext","fals","first","first:","firstpag","function","function(){","function(){return","getcurrentpag","getvalu","group","groups:","hasnext","hasprev","height:","jump","key,valu","last","last:","lastpag","layout","next","number","object","page","pager","pager刷新完成事件","pages:","popul","prev","return","setallpag","setvalu","sourc","sting,object","string,object","true","true,fals","type:","v","{type:\"bi.horizontal\",hgap:10,vgap:0}","{}","});","—","上一页","下一页","主要作用于setvalue方法","事件","分页控件,基类bi.widget","初始化当前页","判断是否有上一页","判断是否有上一页,pages不可用时有效","判断是否有下一页","判断是否有下一页,pages不可用时有效","刷新或者清空列表","参数","可选值","名称","回调参数","基础属性","对外方法","布局","是否动态显示上一页、下一页,dynamicshow为false时生效","是否动态显示上一页、下一页、首页、尾页,","是否动态显示首页、尾页,dynamicshow为false时生效","是否显示尾页","是否显示总页数","是否显示首页","最后一页,在万不得已时才会调用这个函数获取最后一页的页码,","第一页","类型","自定义列表中item项的行为,如高亮,标红等","若为false,则指对其设置使能状态","获取当前页码","设置属性","设置当前页码","设置总页数","说明","连续显示分页数","页数跳转","默认值"],"base/svg.html":["\"bi.svg\",","\"red\"});","(family,","(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高","(width,height)分别表示画布宽高","(x,","(x,y)","(x,y,r)分别表示原点的横坐标,纵坐标,以及半径","(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径","(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容","(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角bord","(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整",".attr({stroke:","500,","600","=","add","bi.createwidget({","bi.svg","circl","clear","ellips","font,","getbyid","getelementbypoint","getelementsbypoint","getfont","height:","id","imag","json","letter_spacing,","line_spacing)","origin,","page","path","pathstr","print","radius大小","rect","remov","set","setfinish","setsiz","setstart","setviewbox","size,","sourc","stretch)","string,","style,","svg","svg.path(\"m10,10l50,50m50,10l10,50\")","svg绘图,基类bi.widget","text","type:","v","var","weight,","width:","y,","});","—","判断是否有上一页","名称","回调参数","对外方法","开始绘制","根据id返回元素","根据制定参数打印出路径","添加对象到json数组","结束绘制","绘制图片","绘制圆形","绘制形状的集合","绘制文本","绘制椭圆","绘制矩形","绘制路径","获根据给定的点坐标返回元素","设置总页数","设置画布可视区域","设置画布尺寸","说明","通过给定的参数在已注册的字体中找到字体对象"],"base/canvas.html":["\"#wrapper\",","\"bi.canvas\",","\"green\");","(x,","(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色","(x0,","20,","50,","500,","600","=","bi.canva","bi.createwidget({","callback","canva","canvas.circle(150,","canvas.stroke();","canvas绘图,基类bi.widget","circl","color)分别表示原点的横坐标,纵坐标,半径以及颜色","element:","end)","gradient","height:","hollow","line","radius,","rect","reset","solid","sourc","start,","stroke","type:","var","width:","x1,","y,","y0,","y1)","y1,","});","—","名称","回调参数","填充中空的路径","填充实心的路径","对外方法","绘制","绘制圆形","绘制渐变色","绘制矩形","绘制线段","说明","重置画布"],"case/button/multi_select_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.multi_select_item\",","\"复选item\"","\"复选项\"","'bi.vertical',","30","30,","[{","api","bi.createwidget({","bi.multi_select_item","doclick","doredmark","element:","height","height:","items:","logic","multi_select_item","number","object","setselect","sourc","text:","type:","unredmark","v","{","{dynamic:false}","});","},","}]","—","参数","取消标红","可选值","名称","回调参数","基础属性","复选框item,基类bi.basicbutton","对外方法","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/button/single_select_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.single_select_item\",","\"left\"","\"复选item\"","\"复选项\"","'bi.vertical',","10","25","30,","[{","api","bi.createwidget({","bi.single_select_item","doclick","doredmark","element:","height","height:","hgap","items:","left,center,right","number","setselect","single_select_item","sourc","string","text:","textalign","type:","unredmark","v","{","});","},","}]","—","参数","取消标红","可选值","名称","回调参数","基础属性","复选框item,基类bi.basicbutton","对外方法","效果相当于文本框左右padding值","文本对齐方式","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/button/single_select_radio_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.single_select_radio_item\",","\"left\"","\"单选item\"","\"单选项\"","'bi.vertical',","10","25","30,","[{","api","bi.createwidget({","bi.single_select_radio_item","doclick","doredmark","element:","height","height:","hgap","items:","left,center,right","number","setselect","single_select_radio_item","sourc","string","text:","textalign","type:","unredmark","v","{","});","},","}]","—","单选框item,基类bi.basicbutton","参数","取消标红","可选值","名称","回调参数","基础属性","对外方法","效果相当于文本框左右padding值","文本对齐方式","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/editor/shelter_editor.html":["\"","\"#wrapper\",","\"bi","\"bi.shelter_editor\",","\"left\"","\"这个是带标记的\"","0","2","30","300,","4","allowblank","api","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.shelter_editor","blur","blur事件","boolean","border\",","cls:","dohighlight","doredmark","editor=_ref;","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","key","keydown时触发","left,center,right","lgap","number","onkeydown","padding值","quitcheck","ref:function(_ref){","rgap","seterrortext","setstat","settextstyl","settitl","setvalu","setwarningtitl","shelter_editor","sourc","string","string/funct","style","text","textalign","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","vgap","watermark","watermark:","width:","});","},","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","对齐方式","带标记的文本框,基类bi.widget","开始输入触发","按下backspace触发","按下空格触发","按键事件","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置文本框样式","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/sign_editor.html":["\"","\"#wrapper\",","\"123\",","\"456\",","\"bi.sign_editor\",","0","2","30","300","4","allowblank","api","bg5\",","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.sign_editor","blur","blur事件","boolean","cls:\"layout","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","settitl","setvalu","setwarningtitl","sign_editor","sourc","string","string/funct","text","text:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","value:","vgap","watermark","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","带标记的文本框,基类bi.widget","开始输入触发","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/sign_initial_editor.html":["\"","\"#wrapper\",","\"bi.sign_initial_editor\",","\"layout","\"原始值\",","0","2","30","300","4","allowblank","api","bg5\",","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.sign_initial_editor","blur","blur事件","boolean","cls:","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","settitl","setvalu","setwarningtitl","sign_initial_editor","sourc","string","string/funct","text","text:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","vgap","watermark","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","基类bi.widget","对外方法","开始输入触发","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本value值","文本内容","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/state_editor.html":["\"","\"#wrapper\",","\"123\",","\"456\",","\"bi.state_editor\",","0","2","30","300","4","allowblank","api","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.state_editor","blur","blur事件","boolean","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","setvalu","sourc","state_editor","string","string/funct","text","text:","tgap","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","value:","vgap","watermark","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","开始输入触发","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","记录状态的输入框,基类bi.widget","设置文本框值","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/layer/multi_popup_layer.html":["\"#wrapper\",","\"bi.multi_popup_view\",","300","api","array","basic_sure\")","bi.createwidget({","bi.i18ntext(\"bi","bi.multi_popup_view","button","element:","multi_popup_lay","sourc","type:","width:","zindex在1000w,基类bi.multipopupview","});","—","下拉框弹出层的多选版本,toolbar带有若干按钮,","参数","可选值","基础属性","按钮组","类型","说明","默认值"],"case/layer/layer_panel.html":["\"","\"#wrapper\",","\"bi.popup_panel\",","\"测试\",","300","additem","api","bi.createwidget({","bi.popup_panel","bi.popuppanel.event_chang","bi.popuppanel.event_click_toolbar_button","bi.popuppanel.event_clos","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasprev","id","index","item","layer_panel","panel的value发生改变触发","panel的关闭事件","popul","prependitem","removeitemat","setnotselectedvalu","setvalu","sourc","string","titl","title:","type:","valu","value,可以是单个值也可以是个数组","width:","});","—","事件","内部前插入","内部后插入","刷新列表","参数","可以理解为multipopupview和panel两个面板的结合体,基类bi.multipopupview","可选值","名称","回调参数","基础属性","对外方法","是否有上一页","是否有下一页","标题","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","点击工具栏事件","移除指定索引处的item","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","默认值"],"case/layer/pane_list.html":["\"#wrapper\",","\"bi","\"bi.button_group\"","'bi.list_pane',","0","[","[]","]","additem","api","array","bgap","bi.createwidget({","bi.list_pan","border\",","cls:","dynamic:true}","el","element:","empti","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasprev","hgap","id","index","item","items:","itemscr","lgap","list面板,基类bi.widget","logic","number","object","onload","padding值","pane_list","popul","prependitem","removeitemat","rgap","setnotselectedvalu","setvalu","sourc","tgap","type:","valu","value,可以是单个值也可以是个数组","vgap","{","{type:","}","});","—","内部前插入","内部后插入","列表","列表创建器","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","开启panel的元素","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否有上一页","是否有下一页","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","正在加载","清空组件","移除指定索引处的item","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","默认值"],"case/layer/panel.html":["\"","\"#wrapper\",","\"+\"","\"bi.button\",","\"bi.panel\",","\"标题\",","[","[{","]","api","array","bi.createwidget({","bi.panel","dynamic:","dynamic:false}","el","el:","element:","logic","logic:","object","panel","settitl","sourc","string","text:","this.button_group,","titl","title:","titlebutton","titlebuttons:","true","type:","{","}","});","}],","—","参数","可选值","名称","回调参数","基础属性","对外方法","带有标题栏的panel,基类bi.widget","开启panel的元素","标题","类型","设置标题","说明","默认值"],"case/list/list.select.html":["\"bi.select_list\",","'1',","'2',","[]","[{","additem","array","b:","bi.createwidget({","bi.direction.top","bi.emptyfn","bi.select_list","boolean","data","direct","empti","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","hasprev","id","isallselect","item","items:","itemscr","onload","popul","prependitem","resetheight","select_list","setallselect","setnotselectedvalu","settoolbarvis","setvalu","sourc","string","text:","toolbar位置","type:","v:","valu","{","});","},","}]","—","元素创造器","列表最前添加元素","列表最后添加元素","加载完成的回调(测试了无效果)","参数","子项","方法","方法名","是否全选中","是否有上一页","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置toolbar是否可见","设置值","设置全选","设置未选中值","说明","选择列表","重新设置高度","默认值"],"case/loader/lazy_loader.html":["\"bi.lazy_loader\",","'body',","100,","additem","bi.createwidget({","bi.lazy_load","data","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","id","item","items,","items:","lazy_load","popul","setnotselectedvalu","setvalu","sourc","type:","valu","width:","});","—","列表最后添加元素","参数","懒加载","方法","方法名","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明"],"case/loader/list_loader.html":["\"bi.list_loader\",","'body',","100,","[]","additem","array","bi.createwidget({","bi.emptyfn","bi.list_load","count","data","element:","empti","fals","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","id","item","items,","items:","itemscr","list_load","next","number","object","onload","popul","resetheight","setnotselectedvalu","setvalu","sourc","type:","valu","width:","{}","});","—","为解决排序问题引入的控件","元素创造器","分页计数","列表最后添加元素","加载完成回调","参数","子项","恶心的加载控件,","方法","方法名","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明","重新设置高度","默认值"],"case/loader/sort_list.html":["\"bi.sort_list\",","'body',","100,","[]","additem","array","bi.createwidget({","bi.emptyfn","bi.sort_list","count","data","element:","empti","fals","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","id","item","items,","items:","itemscr","next","number","object","onload","popul","resetheight","setnotselectedvalu","setvalu","sort_list","sourc","type:","valu","width:","{}","});","—","元素创造器","分页计数","列表最后添加元素","加载完成回调","参数","子项","排序列表","方法","方法名","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明","重新设置高度","默认值"],"case/trigger/editor_trigger.html":["\"\"","\"bi.editor_trigger\",","\"body\",","30","allowblank","bi.createwidget({","bi.editor_trigg","bi.emptyfn","boolean","editor_trigg","element:","errortext","fals","function","getvlau","number","quitcheck","settext","setvalu","sourc","string","text","triggerwidth","type:","validationcheck","valu","watermark","});","—","参数","文本输入框trigger","方法","方法名","是否允许为空","水印","类型","获得值","触发器宽度","设置值","说明","退出时验证函数","错误信息","验证函数","默认值"],"case/trigger/icon_trigger.html":["\"bi.icon_trigger\",","\"body\",","bi.createwidget({","bi.icon_trigg","element:","icon_trigg","sourc","type:","});","图标按钮trigger"],"case/trigger/text_trigger.html":["\"bi.editor_trigger\",","\"body\",","bi.createwidget({","bi.text_trigg","element:","getvlau","setvalu","sourc","text_trigg","type:","valu","});","—","参数","文本输入框trigger","方法","方法名","获得值","设置值","说明"],"case/combo/bubble_combo.html":["\"\"","\"bi.bubble_combo\",","\"bi.button\",","\"bi.button_group\",","\"bi.text_item\",","\"bi.vertical\"","\"item\"","\"测试\",","200","25","25,","[{","api","b","beforeclick","bi.bubble_combo","bi.createwidget({","bi.emptyfn","bi.makearray(100,","bindev","boolean","bubble_combo","button的选中状态","click,","dblclick,","destroy","disableselect","dishov","doclick","el:","element:\"#wrapper\",","empti","fals","forcenotselect","forceselect","function","gettext","handl","handler","height:","hover","hover事件","isdisableselect","isforcenotselect","isforceselect","isonc","isselect","isshadowshowingonselect","items:","layouts:","lclick","maxheight:","mousedown,","mouseup,","null","onc","popup:","select","setselect","settext","shadow","sourc","stopev","stoppropag","string","text","text:","trigger","true,fals","type:","valu","{","}","})","}),","},","}]","—","不仅有选中状态而且有展开状态,","使能选中","判断是否怎么点击都不会被选中","判断是否点击即选中","判断是否让选中","参数","取消hover事件","可选值","名称","回调参数","基础属性","基类bi.widget","对外方法","无论怎么点击都不会被选中","是否只允许点击一次","是否显示阴影","是否被选中","清空组件","点击一次选中有效,再点无效","点击事件","点击事件之前","点击事件回调","点击即选中,","类型","组件text值","组件value值","绑定事件","获取文本值","表示一个可以展开的节点,","被选元素要触发的事件","设置文本值","设置选中的文本","说明","返回该对象","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中状态下是否显示阴影","销毁组件","阻止事件","阻止冒泡","默认值"],"case/combo/icon_combo.html":["\"","\"#wrapper\",","\"auto\"","\"bi.icon_combo\",","\"delet","\"left,right,center\"","\"move","\"renam","\"第一项\",","\"第三项\",","\"第二项\",","0","100","24","300","[{","adjustlength","adjustxoffset","adjustyoffset","api","bi.buttongroup.choose_type_singl","bi.createwidget({","bi.icon_combo","choosetyp","const","el","element:","font\"","font\",","getvalu","height","hideview","icon_combo","iconclass","iconclass:","icon的类名","item","items:","left,right,cent","maxheight","maxwidth","minwidth","number","object","offsetstyl","popul","popup","setvalu","showview","sourc","string","string/numb","type:","value:","width","{","}","});","},","}]","—","刷新列表","参数","参考button_group","可选值","名称","回调参数","基础属性","基类bi.widget","宽度","对外方法","弹出列表和trigger的距离","弹出层","弹出层显示位置","显示弹出层","最大宽度","最大高度","最小宽度","类型","自定义下拉框trigger","获取value值","设置value值","说明","调整横向偏移","调整纵向偏移","选择类型","隐藏弹出层","高度","默认值"],"case/combo/static_combo.html":["\"","\"#wrapper\",","\"1\",","\"2\",","\"3\",","\"bi.static_combo\",","\"valu","1","2","24","3","[","[{","]","api","array","bi.buttongroup.choose_type_singl","bi.createwidget({","bi.static_combo","choosetyp","const","el","element:","getvalu","height","item","items:","number","object","popul","setvalu","sourc","static_combo","string","text","text:","type:","value:","{","}","});","},","}]","—","不变\",","刷新列表","单选combo,基类bi.widget","参数","参考button_group","可选值","名称","回调参数","基础属性","子组件","对外方法","文本内容","类型","自定义下拉框trigger","获取value值","设置value值","说明","选择类型","高度","默认值"],"case/combo/text_value_downlist_combo.html":["\"","\"#wrapper\",","\"1\",","\"11\",","\"2\",","\"3\",","\"bi.text_value_down_list_combo\",","\"text\",","1","11","2","3","30","[","[{","]","api","bi.createwidget({","bi.text_value_down_list_combo","children:","el:","element:","getvalu","height","item","items:","number","popul","setvalu","sourc","string","text","text:","text_value_downlist_combo","type:","value:","{","});","},","}]","}],","—","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","对外方法","文本内容","类型","获取value值","设置value值","说明","高度","默认值"],"case/tree/branch_tree.html":["\"bi.branch_tree\",","'body',","...","//","[]","[{","array","bi.branch_tre","bi.createwidget({","branch_expander组件配置项","branch_tre","children:","el","el:","element:","expand","getvalu","item","items:","object","popul","sourc","type:","{}","{},","});","}]","—","去掉所有内容","参数","参数设置","基础元素","子项","方法","方法名","横向分支的树","类型","获取所选项值","说明","默认值"],"case/tree/handstand_branch_tree.html":["\"bi.handstand_branch_tree\",","'body',","...","//","[]","[{","array","bi.createwidget({","bi.handstand_branch_tre","branch_expander组件配置项","children:","el","el:","element:","expand","getvalu","handstand_branch_tre","item","items:","object","popul","sourc","type:","{}","{},","});","}]","—","去掉所有内容","参数","参数设置","基础元素","子项","方法","方法名","类型","纵向分支的树","获取所选项值","说明","默认值"],"case/tree/display_tree.html":["\"bi.display_tree\",","'',","'body',","1,","=","bi.createwidget({","bi.display_tre","destroy","display_tre","element:","id:","inittre","node:","open:","settings:","sourc","text:","tree","tree.inittree({","true,","type:","var","});","—","加载tree结构","参数","异步树控件","摧毁元素","方法","方法名","节点数组","说明","配置项"],"case/tree/simple_tree.html":["\"bi.simple_tree\",","'body',","=","array","bi.createwidget({","bi.emptyfn","bi.simple_tre","element:","empti","function","getvalu","item","items:","itemscr","items构造器","keywords:","null","popul","setvalu","simple_tre","sourc","tree","tree.populate(items);","type:","v","var","});","—","元素","关键字标红字符串","去掉所有内容","参数","参数设置","子项数组","方法","方法名","清空树","简单的多选树","类型","获得值","设置值","说明","默认值"],"case/tree/level_tree.html":["\"bi.level_tree\",","'body',","=","[]","[],","array","bi.createwidget({","bi.level_tre","branch_expander配置","element:","expand","getallleav","getnodebyid","getnodebyvalu","getvalu","id","inittre","item","items:","level_tre","node","object","popul","setvalu","sourc","stroke","tree","type:","v","var","{}","});","—","二级树","元素","去掉所有内容","参数","参数设置","子项数组","方法","方法名","构造树结构","根据id获取节点","根据值获取节点","生成树方法","类型","获取所有叶节点","获得值","设置值","说明","默认值"],"case/tree/branch_relation.html":["\"bi.branch_relation\",","'body',","0","50","=","[],","align","align:","array","bi.branch_rel","bi.createwidget({","bi.direction.bottom","bi.direction.right,","bi.horizontalalign.right,","bi.verticalalign.top","branch_rel","centeroffset","centeroffset:","direct","direction:","element:","item","items:","null","number","popul","sourc","string","tree","type:","var","});","元素","去掉所有内容","参数","参数设置","子项数组","对齐方向","方法","方法名","根节点所在方向","类型","表关联树","说明","重心偏移量","默认值"],"case/table/adaptive_table.html":["\"bi.adaptive_table\",","'body',","1],","25","500,","600,","=","[0,","[50,50,200,250,400],","[]","[],","adaptive_t","array","attr","bi.adaptive_t","bi.createwidget({","boolean","columns","columnsize:","crosshead","crossitem","destroy","element:","fals","freezecol","freezecols:","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header:","headerrows","height:","isneedfreez","isneedfreeze:","isneedmerg","isneedres","isneedresize:","isresizeadapt:","item","items:","key:","maxcolumns","mergecol","mergerul","mincolumns","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","true","true,","type:","value:","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","得到列宽","摧毁表","方法","方法名","时合并","是否可改变列大小","是否需要冻结表头","是否需要合并单元格","普通单元格高度","最大列宽","最小列宽","横向滚动距离","类型","纵向滚动距离","自适应宽度的表格","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/table/tree_table.html":["\"bi.tree_table\",","'body',","100,","100],","25","400,","600,","=","[100,","[]","array","attr","bi.createwidget({","bi.emptyfn","bi.tree_t","boolean","columns","columnsize:","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","destroy","element:","fals","freezecol","function","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header,","header:","headercellstylegett","headerrows","height:","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items,","items:","key:","maxcolumns","mergecol","mergerul","mincolumns","mincolumnsize:","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","summarycellstylegett","tabl","tree_tabl","true","type:","value:","var","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","得到列宽","摧毁表","方法","方法名","时合并","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要调整列宽","普通单元格高度","最大列宽","最小列宽","树状结构的表格","横向滚动距离","类型","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/table/layer_tree_table.html":["\"bi.layer_tree_table\",","'body',","100,","100],","25","400,","600,","=","[100,","[]","array","attr","bi.createwidget({","bi.emptyfn","bi.layer_tree_t","boolean","columns","columnsize:","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","destroy","element:","fals","freezecol","function","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header,","header:","headercellstylegett","headerrows","height:","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items,","items:","key:","layer_tree_t","maxcolumns","mergecol","mergerul","mincolumns","mincolumnsize:","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","summarycellstylegett","tabl","true","type:","value:","var","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","层级树状结构的表格","得到列宽","摧毁表","方法","方法名","时合并","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要调整列宽","普通单元格高度","最大列宽","最小列宽","横向滚动距离","类型","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/pager/all_count_pager.html":["'bi.all_count_pager',","//必选项","1","1,","10,","30","30,","all_count_pag","bi.all_count_pag","bi.createwidget({","count","count:","curr","curr:","getcurrentpag","hasnext","hasprev","height","height:","number","page","pages:","popul","setallpag","setcount","setpagervis","setvalu","setvpag","sourc","true/fals","type:","v","});","—","参数","当前页","总行数","总页数","控件高度","方法","方法名","是否有前一页","是否有后一页","有总页数和总行数的分页控件","清空内容","类型","获取当前页码","设置当前页码","设置总页数","设置计数","设置页码是否可见","说明","默认值"],"case/pager/direction_pager.html":["'bi.direction_pager',","'body',","//初始化当前页,","//必选项","1","1,","10,","30","30,","=","bi.createwidget({","bi.direction_pag","bi.emptyfn","curr","curr:","direction_pag","element:","fals","firstpag","firstpage:","function","gethpag","getvpag","hashnext","hashprev","hasnext","hasprev","hasvnext","hasvprev","height","height:","horizont","horizontal:","lastpag","lastpage:","number","number/boolean","number/funct","object","page","pager","pages:","pages为数字时可用","pages为数字时可用,","popul","sethpag","sethpagervis","setvpag","setvpagervis","sourc","type:","v","var","vertic","vertical:","{","});","},","—","二级参数","判断是否有前一页的方法","判断是否有后一页的方法","参数","当前页,","总页数","控件高度","方法","方法名","显示页码的分页控件","最后一页","横向坐标是否有上一页","横向坐标是否有下一页","横向翻页设置","清空内容","第一页","类型","纵向坐标是否有上一页","纵向坐标是否有下一页","纵向翻页设置,参数与horizontal相同","获取水平向页码","获取纵向页码","设置横向分页键可见","设置纵向分页键可见","说明","默认值"],"case/calendar.html":["'1900","'2099","'bi.calendar',","//7表示八月","//最大日期","//最小日期","01","01'","01',","12","2015","2015,","25","25,","31'","31',","7","7,","bi.calendar","bi.createwidget({","calendar","day","day:","day}","getvlau","isfinald","isfrontd","max","max:","min","min:","month","month,","month:","number","object:","setvalu","sourc","string","type:","year","year:","{year,","});","—","参数","方法","方法名","日历控件","是否为最大日期","是否为最小日期","最大日期","最小日期","类型","获得日期","设定的年份","设定的日期","设定的月份","设置日期","说明","默认值"],"case/clipboard.html":["'bi.clipboard',","()","100,","aftercopi","aftercopy:","bi.clipboard","bi.createwidget({","bi.emptyfn","clipboard","copi","copy:","function","height:","sourc","type:","width:","{}","{},","});","剪切板","参数","完成拷贝后执行的方法","类型","获取需要拷贝的值","说明","默认值"],"case/complex_canvas.html":["\"bi.complex_canvas\",","\"red\",","(x0,","10,","100,","2","20,","200,","500,","600","=","bi.createwidget({","branch","canva","canvas.branch(55,","canvas.stroke();","complex_canva","height:","linewidth:","offset:","sourc","stroke","strokestyle:","type:","var","width:","x1,","x2,","x2,y2...)","y0,","y0为根节点,分支到x1,y1,","y1,","y2)","{","});","名称","回调参数","复杂的canvas绘图","对外方法","绘制","绘制树枝节点","说明","(以x0,"],"case/color_chooser.html":["\"#wrapper\",","\"bi.color_chooser\",","30","30,","bi.color_choos","bi.createwidget({","color","color_choos","element:","getvalu","height:","isviewvis","setvalu","sourc","type:","width:","});","—","判断是否显示","参数","方法","方法名","获取颜色值","设置颜色值","说明","选色控件"],"case/segment.html":["\"#wrapper\",","\"bi.label\",","\"bi.segment\",","\"bi.vertical\",","\"tab1\",","\"tab2\",","\"tab3","\"默认风格\"","0","1,","10","2","20","3","30,","50,","[{","api","array","bgap","bi.createwidget({","bi.sgement","disabled\",","disabled:","element:","height","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","segment","selected:","sourc","text:","tgap","true","true,","type:","value:","vgap","vgap:","width","{","});","},","}]","}],","参数","可选值","各种segment","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/bi.button/general.html":["bi.button","通用按钮","通用按钮,详情见bi.button"],"detailed/bi.button/tooltip.html":["\"#wrapper\",","\"bi.vertical\",","'bi.button',","'简单toast测试',","()","0","10","20","30,","=","[","[{","]","api","array","bgap","bi.createwidget({","bi.msg.toast(\"这是一条简单的数据\");","el:","element:","function","handler:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","toast","type:","var","vgap","vgap:","width","{","}","});","}],","—","参数","可选值","基础属性","子控件数组","宽度","提示性信息","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/bi.button/items.html":["\"#wrapper\",","\"bi.label\",","\"bi.multi_select_item\",","\"bi.single_select_item\",","\"单选item\"","\"单选项\"","\"复选item\"","\"复选项\"","'bi.vertical',","0","10","30,","[","[{","]","api","array","bgap","bi.createwidget({","element:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","width","{","});","},","}]","—","参数","可选值","各种item","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","类型","说明","高度","默认值"],"detailed/bi.button/node.html":["\"#wrapper\",","\"bi.arrow_group_node\",","\"bi.label\",","\"bi.plus_group_node\",","\"bi.triangle_group_node\",","\"三角形的节点\"","\"十字形的节点\"","\"箭头节点\"","'bi.vertical',","0","10","30,","[","[{","]","api","array","bgap","bi.createwidget({","element:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","width","{","});","},","}]","—","参数","可选值","各种节点node","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","类型","说明","高度","默认值"],"detailed/bi.button/segment.html":["\"#wrapper\",","\"bi.label\",","\"bi.segment\",","\"bi.vertical\",","\"tab1\",","\"tab2\",","\"tab3","\"默认风格\"","0","1,","10","2","20","3","30,","50,","[","[{","]","api","array","bgap","bi.createwidget({","bi.sgement","disabled\",","disabled:","element:","height","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","selected:","sourc","text:","tgap","true","true,","type:","value:","vgap","vgap:","width","{","});","},","}]","}],","—","参数","可选值","各种segment","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/tree/bi.multi_tree_combo.html":["\"bi.multi_tree_combo\",","\"根目录\"","\"根目录\",","\"第一级目录1\"","\"第一级目录1\",","\"第二级文件1\"","\"第二级文件1\",","(options,","1,","11,","2,","200","30","300","=","[{","array","bi.createwidget({","bi.multi_tree_combo","bi.multitreecombo.event_confirm","callback({","callback)","function","function()","getvalu","height","id:","item","items:","itemscr","itemscreator:","multi_tree_combo","null","number","pid:","popul","setvalu","sourc","text:","type:","v","value:","var","width","width:","{","{}","})","});","},","}];","—","事件","参数","参数设置","子项创建函数","子项,pid代表父节点id","宽度","方法","方法名","更改树结构内容","树下拉框,继承bi.widget","点击一级节点触发","类型","获取文本框值","设置文本框值","说明","高度","默认值"],"detailed/tree/bi.switch_tree.html":["\"bi.switch_tree\",","\"根目录\"","\"根目录\",","\"第一级目录1\"","\"第一级目录1\",","\"第二级文件1\"","\"第二级文件1\",","1,","11,","2,","=","[]","[{","array","bi.createwidget({","bi.switch_tre","getselect","getvalu","id:","item","items,","items:","pid:","popul","setselect","setvalu","sourc","switch_tre","switchselect","text:","tree","type:","v","value:","var","{","});","},","}];","—","切换树结构","参数","参数设置","可以单选多选切换的树,继承bi.widget","子项,pid代表父节点id","方法","方法名","更改树结构内容","类型","获取当前选中项内容","获取选中项","设置当前选中项内容","设置选中项","说明","默认值"],"detailed/table/bi.preview_table.html":["\"\",","\"bi.preview_table\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"表头1\"","\"表头2\"","\"表头3\"","'body',","30","50],","[100,","[[{","[]","array","array/numb","attr","bi.createwidget({","bi.preview_t","boolean","columns","columnsize:","destroy","element:","fals","freezecol","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreez","item","items:","key:键,value:值","null","number","popul","preview_t","resiz","resizehead","row","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","type:","{","});","},","}]]","}]],","—","冻结的列","列宽","参数","子组件","得到列宽","摧毁表","方法","方法名","是否冻结","是否含有数值滚动条","替换为新的内容","用于表格预览,继承bi.widget","类型","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","行高","表头内容","表头行高","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认值"],"detailed/table/bi.responsive_table.html":["\"\",","\"\"],","\"bi.responsive_table\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"表头1\"","\"表头2\"","\"表头3\"","'body'","(row1,","1],","25","[\"\",","[0,","[[{","[]","array","attr","bi.createwidget({","bi.responsive_t","boolean","columns","columnsize:","crosshead","crossitem","destroy","element:","fals","footer","footerrows","freezecol","function","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreez","isneedfreeze:","isneedmerg","isneedmerge:","item","items:","key:键,value:值","mergecols:","mergerul","number","popul","regioncolumns","resiz","resizehead","responsive_t","row","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","true,","type:","{","});","},","}]],","—","交叉表内容二维数组","交叉表头","冻结的列号,从0开始,isneedfreeze为true时生效","列宽","参数","合并规则,","子组件二维数组","得到列宽","摧毁表","方法","方法名","是否含有数值滚动条","是否需要冻结单元格","是否需要合并单元格","是否需要表尾","替换为新内容","类型","自适应宽度的表格,继承bi.widget","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","行高","表头内容","表头行高","表尾行高","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认值","默认相等时合并"],"detailed/table/bi.excel_table.html":["\"\"]","\"bi.excel_table\",","\"bi.label\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","37","=","[","[200,200],","[82,","[]","[{","]","array","attr","bg1\",","bg2\",","bg3\",","bg4\",","bi.createwidget({","bi.excel_t","boolean","cls:","columns","columnsize:","destroy","element:","excel_t","fals","footerrows","function(row1,","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","headerrows","isneedmerg","isneedres","isresizeadapt","item","items:","key:键,value:值","mergecol","mergerul","number","popul","regioncolumns","resiz","resizehead","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","true","type:","{","});","},","}]","}],","—","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加行","子组件","得到列宽","摧毁表","方法","方法名","时合并","是否含有数值滚动条","是否调整时自适应","是否需要合并单元格","是否需要调整大小","普通单元格高度","类似excel式的表格,继承bi.widget","类型","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","表头高度","表尾高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认row1","默认值","默认相等时合并"],"detailed/table/bi.page_table.html":["\"bi.page_table\",","\"body\",","1","25",":","=","[200,200],","[]","[],","array","attr","bi.createwidget({","bi.emptyfn","bi.page_t","boolean","columns","columnsize:","crosshead","crossitem","curr","destroy","element:","fals","firstpag","freezecol","function","function(row1,","getcolumns","gethpag","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","getvpag","hasnext","hasprev","header","headercellstylegett","headerrows","height:","horizont","isneedfreez","isneedmerg","item","items:","itemscr","key:","lastpag","maxcolumns","mergecol","mergerul","mincolumns","number","number/funct","object","page","page_t","pager","pager:","popul","regioncolumns","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","sethpag","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setvpag","setwidth","sourc","summarycellstylegett","type:","v:","value:","vertic","vertical:","width:","{","{}","{},","}","});","—","三级参数","二级参数","交叉表头","交叉项","值","元素创造器","冻结的列","分页表格","分页选项","列宽数组","列项间的","判断是否有前一页的函数","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加","子组件","宽度","当前页","得到列宽","摧毁表","方法","方法名","时合并","是否有下一页","是否需要冻结表头","是否需要合并单元格","显示总页数","普通单元格高度","最后一页","最大列宽","最小列宽","横向滚动距离","水平分页选项","第一页","类型","纵向分页,参数与horizont","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","获得垂直页数","获得水平页数","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置水平页数","设置纵向滚动距离","设置纵向页数","设置高度","说明","键","页码","高度","默认row1","默认值","默认相等时合并"],"detailed/text_input/bi.text_editor.html":["\"","\"#wrapper\",","\"bi.text_editor\",","0","2","200,","30","30,","4","allowblank","api","bgap","bi.createwidget({","bi.text_editor","boolean","element:","errortext","fals","function","height","height:","hgap","lgap","mouseout","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"请输入内容\"","width","width:","});","—","事件详见editor","参数","可选值","基础用法","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","类型","说明","输入较验函数","通过鼠标或键盘输入字符","错误提示","默认值"],"detailed/text_input/bi.search_editor.html":["\"","'#wrapper',","'bi.search_editor',","0","2","30","300,","4","allowblank","api","bgap","bi.createwidget({","bi.search_editor","bi.searcheditor.event_clear","boolean","element:","errortext","fals","function","height","hgap","lgap","mouseout","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"搜索\",","width","width:","});","—","事件","其他事件详见editor","参数","可选值","搜索框","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","点击清空按钮触发","类型","说明","输入较验函数","错误提示","默认值"],"detailed/text_input/bi.clear_editor.html":["\"","\"bi","'#wrapper',","'bi.clear_editor',","0","2","30","300,","4","allowblank","api","bgap","bi.clear_editor","bi.cleareditor.event_clear","bi.createwidget({","boolean","border\",","cls:","element:","errortext","fals","function","height","hgap","lgap","mouseout","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"带清除按钮的输入框\",","width","width:","});","—","事件","其他事件详见input","参数","可选值","带清除按钮的输入框","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","点击清空按钮触发","类型","说明","输入较验函数","错误提示","默认值"],"detailed/text_input/finetuning_number_editor.html":["'#wrapper',","'bi.fine_tuning_number_editor',","1","1表示自动","300","bi.createwidget({","bi.finetuningnumbereditor.event_confirm","element:","finetuning_number_editor","number","sourc","type:","valu","width:","});","事件","参数","可选值","数值微调器","点击增加/减少按钮或者编辑框确定时触发","类型","编辑框中的值,","说明","默认值"],"detailed/year_combo.html":["'#wrapper',","'1900","'2099","'bi.year_combo',","01","01'","12","300","31'","behavior","bi.createwidget({","bi.yearcombo.event_before_popupview","bi.yearcombo.event_confirm","element:","max","min","object","sourc","string","type:","width:","year_combo","{}","});","事件","参数","可选值","年份选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","限定可选日期的上限","限定可选日期的下限","默认值"],"detailed/month_combo.html":["'#wrapper',","'bi.month_combo',","300","behavior","bi.createwidget({","bi.monthcombo.event_before_popupview","bi.monthcombo.event_confirm","element:","month_combo","object","sourc","type:","width:","{}","});","事件","参数","可选值","月份选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","默认值"],"detailed/quarter_combo.html":["'#wrapper',","'bi.quarter_combo',","300","behavior","bi.createwidget({","bi.quartercombo.event_before_popupview","bi.quartercombo.event_confirm","element:","object","quarter_combo","sourc","type:","width:","{}","});","事件","参数","可选值","季度选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","默认值"],"detailed/down_list_combo.html":["\"bi.icon_text_icon_item\",","\"bi.icon_text_item\",","\"chart","\"check","\"column","\"dot","'#wrapper',","'bi.down_list_combo',","0","1.1\",","1.222222222222222222222222222222222222\",","11","1111\",","12","12,","2\",","2.1\",","2.2\",","21,","22,","25,","300,","[","[{","]","adjustlength","bi.createwidget({","bi.downlistcombo.event_before_popupview","bi.downlistcombo.event_chang","bi.downlistcombo.event_son_value_chang","bottom","bottom,left","bottom,right","children:","click","click,","cls:","direct","disabled:","down_list_combo","e","el","el:","element:","font\"","font\",","height:","hover","iconcls1:","items:","left","mark","number","object","right","selected:","sourc","string","text:","top","top,left","top,right","trigger","true","true,","type","type:","value:","width:","{","|","});","},","}]","}],","下拉列表弹出前触发","下拉列表的弹出方式","事件","具体配置方法见combo","参数","可选值","多层下拉列表的下拉框","弹出列表和trigger的位置关系","弹出列表和trigger的距离","点击一级节点触发","点击二级节点触发","类型","自定义下拉框trigger","说明","默认值"],"detailed/numeric_interval.html":["\"bi.numerical_interval\",","'#wrapper',","500","bi.createwidget({","bi.numericalinterval.event_error","bi.numericalinterval.event_valid","boolean","closemax","closemin","element:","isstatevalid()","max","min","number","numeric_interv","setclosemaxenable(boolean)","setcloseminenable(boolean)","setmaxenable(boolean)","setminenable(boolean)","setnumtip(string)","sourc","true","type:","width:","});","事件","区间不合法的状态事件","区间合法的状态事件","区间是否成立)","参数","可选值","右区间初始状态","左区间初始状态","当前状态是否有效(输入是否合法,","数值区间控件","方法","无","最大值初始值","最小值初始值","用法","类型","设置右区间开闭combo的disable状态","设置右区间输入框disable状态","设置左区间开闭combo的disable状态","设置左区间输入框disable状态","设置数值区间的tip提示","说明","默认值"],"detailed/multi_select_combo.html":["\"bi.multi_select_combo\",","'#wrapper',","500,","[],","bi.createwidget({","bi.multiselectcombo.event_confirm","element:","fals","function(){","hasnext:","items:","itemscreator:","multi_select_combo","return","sourc","type:","width:","{","}","});","事件","参数","可选值","带确定的复选下拉框","方法","点击确定触发","用法","类型","说明","默认值"],"detailed/date/date_combo.html":["\"#wrapper\",","\"bi.date_combo\",","300","bi.createwidget({","date_combo","element:","sourc","type:","width:","});","参数","可选值","日期选择下拉框(弹出的年月选择可以进一步选择日期)","类型","说明","默认值"],"detailed/date/date_pane_widget.html":["\"#wrapper\",","\"bi.date_pane_widget\",","'1900","'2099","01","01'","12","300","31'","bi.createwidget({","date_pane_widget","element:","max","min","month:","m})","obj({year:","selectedtim","sourc","string","type:","width:","y,","});","参数","可选值","日期选择下拉框的弹出面板","类型","说明","选中的初始年月","限定可选日期的上限","限定可选日期的下限","默认值"],"detailed/date/year_month_combo.html":["\"bi.year_month_combo\",","300","bi.createwidget({","bi.yearmonthcombo.event_before_popupview","bi.yearmonthcombo.event_confirm","monthbehavior","object","sourc","type:","width:","year_month_combo","yearbehavior","});","事件","参数","可选值","年月选择下拉框","弹出框弹出前触发","点击确认触发","类型","自定义年份选择的行为(详见button_group)","说明","默认值"],"detailed/date/year_quarter_combo.html":["\"bi.year_quarter_combo\",","300","bi.createwidget({","bi.yearquartercombo.event_before_popupview","bi.yearquartercombo.event_confirm","monthbehavior","object","sourc","type:","width:","year_quarter_combo","yearbehavior","});","事件","参数","可选值","年季度选择下拉框","弹出框弹出前触发","点击确认触发","类型","自定义年份选择的行为(详见button_group)","说明","默认值"],"detailed/date/custom_date_time.html":["\"#wrapper\",","\"bi.custom_date_time_combo\",","bi.createwidget({","bi.customdatetimecombo.event_cancel","bi.customdatetimecombo.event_confirm","custom_date_tim","element:","sourc","type:","});","事件","参数","可选值","日期选择下拉框(可以选择时分秒)","点击取消触发","点击确认触发","类型","说明","默认值"],"detailed/combo/single_tree_combo.html":["\"bi.single_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.single_tree_combo","bi.singletreecombo.event_before_popupview","element:","getvalu","height","item","items:","null","number","object","popul","setvalu","single_tree_combo","sourc","string","text","text:","tree","trigger","type:","var","width:","{}","});","下拉框弹出前触发","事件","二级树下拉框","元素","其他事件详见input","刷新内容","参数","参数设置","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/multilayer_single_tree_combo.html":["\"bi.multilayer_single_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.emptyfn","bi.multilayer_single_tree_combo","element:","function","getvalu","height","item","items:","itemscr","multilayer_single_tree_combo","null","number","popul","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","元素","元素创造器","刷新内容","参数","参数设置","回调参数","多层级下拉单选树","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/select_tree_combo.html":["\"bi.select_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.select_tree_combo","element:","getvalu","height","item","items:","null","number","popul","select_tree_combo","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","二级可选节点下拉框树","元素","刷新内容","参数","参数设置","回调参数","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/multilayer_select_tree_combo.html":["\"bi.multilayer_select_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.multilayer_select_tree_combo","element:","getvalu","height","item","items:","multilayer_select_tree_combo","null","number","popul","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","元素","刷新内容","参数","参数设置","回调参数","多层级下拉可选节点树","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/path/path_chooser.html":["\"#wrapper\",","\"0fbd0dc648f41e97\",","\"1\"","\"3\"","\"5\"","\"8c4460bc3605685e\",","\"bi.path_chooser\",","\"c6d72d6c7e19a667\",","\"id\",","\"region\":","\"regiontext\":","\"text\":","\"value\":","\"供应商基本信息\",","\"学号\",","\"采购订单\",","\"采购订单xxx\",","[[{","array","bi.createwidget({","element:","item","items:","path_choos","sourc","type:","{","});","},","}]]","二维数组,每个元素代表一条路径","参数","可选值","类型","说明","路径选择","默认值"],"detailed/path/direction_path_chooser.html":["\"#wrapper\",","\"1f4711c201ef1842\",","\"bi.direction_path_chooser\",","\"defa1f7ba8b2684a客户id\"","\"direction\":","\"e351e9f1d8147947合同id\",","\"region\":","\"text\":","\"value\":","\"主键\",","\"合同id\",","\"合同信息\",","\"合同的回款信息\",","\"客户id\",","\"客户信息\",","1","[[{","array","bi.createwidget({","direction_path_choos","element:","item","items:","sourc","type:","{","});","},","}]]","二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向","参数","可选值","带方向的路径选择","类型","说明","默认值"],"detailed/relation_view.html":["\"a\",","\"a1\",","\"a1字段\"},","\"b\",","\"b2\",","\"b2...\",","\"b2字段\"","\"bi.relation_view\",","\"c\",","\"c1\",","\"c1字段\"}","\"c2\",","\"c2字段\"}","\"比\",","[{","bi.createwidget({","foreign:","items:","primary:","region:","regiontext:","relation_view","sourc","text:","title:","type:","value:","{","{region:","});","},","}]","关联视图","参数","可选值","类型","说明","默认值"],"detailed/dialog.html":["bi.msg.alert(title,","content","content)","dialog","sourc","string","titl","参数","可选值","对话框","对话框内容","对话框标题","类型","说明","默认值"],"detailed/file_manager.html":["\"1\",","\"11\",","\"12\",","\"bi.file_manager\",","\"根目录\"","\"第一级子目录1\"","\"第一级子目录2\"","[{","bi.createwidget({","file_manag","getselectedid","getselectedvalue()","id:","items:","pid:","sourc","text:","type:","value:","{","})","},","}]","参数","可选值","文件管理器","方法","类型","获取当前选中项的id属性","获取当前选中项的value值","说明","默认值"],"detailed/slider.html":["\"bi.multi_select_combo\",","10","50","[],","bi.createwidget({","bi.slid","getvalu","items:","max","min","number","setvalu","slider","slider插件","sourc","type:","valu","});","—","参数","方法","方法名","类型","说明","默认值"]},"length":135},"tokenStore":{"root":{"0":{"1":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}},"'":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.06611570247933884},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.07058823529411765},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.06896551724137931},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.06593406593406594},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.061855670103092786},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.06521739130434782},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.08333333333333333},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.025974025974025976},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.028985507246376812},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.027649769585253458},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.03571428571428571},"base/label.html":{"ref":"base/label.html","tf":0.0410958904109589},"base/button/button.html":{"ref":"base/button/button.html","tf":0.029069767441860465},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021164021164021163},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.020512820512820513},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.020833333333333332},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0410958904109589},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0234375},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/segment.html":{"ref":"case/segment.html","tf":0.05319148936170213},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.056818181818181816},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.05319148936170213},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.04672897196261682},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.039603960396039604},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.038834951456310676},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.03773584905660377},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.05357142857142857},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"s":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856}}}},"}":{"docs":{},"]":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}},"1":{"0":{"0":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.08163265306122448},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.08163265306122448},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.041666666666666664}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},";":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}},"]":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306}}}}},"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.03278688524590164},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.08333333333333333}}},")":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}},"1":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"1":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{}},"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}},"2":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"3":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}},"docs":{}},"6":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"8":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.0425531914893617}},".":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856}}}},",":{"docs":{},"这":{"docs":{},"里":{"docs":{},"虽":{"docs":{},"然":{"docs":{},"设":{"docs":{},"置":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"3":{"0":{"docs":{},",":{"docs":{},"但":{"docs":{},"是":{"docs":{},"最":{"docs":{},"终":{"docs":{},"影":{"docs":{},"响":{"docs":{},"高":{"docs":{},"度":{"docs":{},"的":{"docs":{},"是":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"布":{"docs":{},"局":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}},"docs":{}}}}}}}}}}}}}}}},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.05357142857142857},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02962962962962963},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.03278688524590164},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.043478260869565216},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.05263157894736842}}},")":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}},":":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}},"]":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},";":{"docs":{},"}":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334}}}},"表":{"docs":{},"示":{"docs":{},"自":{"docs":{},"动":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}},"2":{"0":{"0":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"]":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}},"1":{"5":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"docs":{}},"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"1":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"2":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"4":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}},"5":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}},",":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"6":{"docs":{},")":{"docs":{},"'":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}},"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.02127659574468085},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},".":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},",":{"docs":{},"为":{"docs":{},"了":{"docs":{},"演":{"docs":{},"示":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"是":{"docs":{},"占":{"docs":{},"满":{"docs":{},"整":{"docs":{},"个":{"docs":{},"的":{"docs":{},",":{"docs":{},"用":{"docs":{},"了":{"docs":{},"一":{"docs":{},"个":{"docs":{},"w":{"docs":{},"h":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},":":{"docs":{},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},":":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"3":{"0":{"0":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.03305785123966942},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}},";":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}},"1":{"docs":{},"'":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"5":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}},"7":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115}}},"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}},".":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}},"4":{"0":{"0":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}},"docs":{}},"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},".":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}},"5":{"0":{"0":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}},",":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}},"]":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}},"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.021739130434782608},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}},"]":{"docs":{},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}},"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"6":{"0":{"0":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},",":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}},"docs":{}},"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"7":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"8":{"0":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"docs":{},")":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}},"9":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{}},"docs":{},"f":{"docs":{},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"u":{"docs":{},"i":{"2":{"docs":{},".":{"0":{"docs":{},"引":{"docs":{},"入":{"docs":{},"生":{"docs":{},"命":{"docs":{},"周":{"docs":{},"期":{"docs":{},"后":{"docs":{},",":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"的":{"docs":{},"实":{"docs":{},"现":{"docs":{},"类":{"docs":{},"不":{"docs":{},"需":{"docs":{},"要":{"docs":{},"重":{"docs":{},"写":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"等":{"docs":{},"方":{"docs":{},"法":{"docs":{},",":{"docs":{},"会":{"docs":{},"自":{"docs":{},"动":{"docs":{},"调":{"docs":{},"用":{"docs":{},"子":{"docs":{},"组":{"docs":{},"件":{"docs":{},"的":{"docs":{},"对":{"docs":{},"应":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}},"docs":{},"d":{"docs":{},"o":{"docs":{},"c":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}},"的":{"docs":{},"交":{"docs":{},"互":{"docs":{},"、":{"docs":{},"前":{"docs":{},"端":{"docs":{},"以":{"docs":{},"及":{"docs":{},"视":{"docs":{},"觉":{"docs":{},"文":{"docs":{},"档":{"docs":{},"规":{"docs":{},"范":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"_":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":10.037037037037036}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.02127659574468085}}}}}}}}}}}}}}}}},"r":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"a":{"docs":{},"n":{"docs":{},"a":{"docs":{},"g":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":10.020408163265307}}}}}}}}}}},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":10}}},"a":{"docs":{},"t":{"docs":{},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":10}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":10}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.03896103896103896},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.03389830508474576},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/pager.html":{"ref":"base/pager.html","tf":0.03333333333333333},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.02054794520547945},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.031914893617021274},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.125},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.027906976744186046},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}},"(":{"docs":{},"v":{"docs":{},")":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"o":{"docs":{},"p":{"docs":{},".":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}},")":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}},"{":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}},"r":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"docs":{}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.01932367149758454},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.031914893617021274},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.017857142857142856},"core/widget.html":{"ref":"core/widget.html","tf":0.020618556701030927},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/button/button.html":{"ref":"base/button/button.html","tf":0.01744186046511628},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.01875},"base/pager.html":{"ref":"base/pager.html","tf":0.03333333333333333},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}},"e":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401}}}}}}},"o":{"docs":{},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":10}}}}}}}}}}}}},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}}}}},"n":{"docs":{},"t":{"docs":{},"\"":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0234375},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},",":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314}}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"c":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"s":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"o":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}},"n":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.034482758620689655},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"u":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"v":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},"b":{"docs":{},"y":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"b":{"docs":{},"y":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}}}}}},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},"e":{"docs":{},"d":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"c":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}},"i":{"docs":{},"d":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"(":{"docs":{},")":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}}}}}}}}}}}}}},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"a":{"docs":{},"t":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"b":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}},"t":{"docs":{},"h":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"b":{"docs":{},"y":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"s":{"docs":{},"b":{"docs":{},"y":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"c":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"u":{"docs":{},"r":{"docs":{},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"s":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"y":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":10}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":10}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":10}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":10}}}}}}}},"s":{"docs":{},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"这":{"docs":{},"几":{"docs":{},"个":{"docs":{},"方":{"docs":{},"法":{"docs":{},"来":{"docs":{},"设":{"docs":{},"置":{"docs":{},"值":{"docs":{},",":{"docs":{},"获":{"docs":{},"取":{"docs":{},"值":{"docs":{},"(":{"docs":{},"展":{"docs":{},"示":{"docs":{},"类":{"docs":{},"控":{"docs":{},"件":{"docs":{},"除":{"docs":{},"外":{"docs":{},")":{"docs":{},"和":{"docs":{},"刷":{"docs":{},"新":{"docs":{},"控":{"docs":{},"件":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":10},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},":":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"l":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},")":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}}}}}}}},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.05128205128205128},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.03305785123966942},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.032},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.032},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.047058823529411764},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.04597701149425287},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.04395604395604396},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.043478260869565216},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.04938271604938271},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.05555555555555555},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.05063291139240506},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.023809523809523808},"base/label.html":{"ref":"base/label.html","tf":0.0273972602739726},"base/button/button.html":{"ref":"base/button/button.html","tf":0.023255813953488372},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021164021164021163},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.020512820512820513},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.020833333333333332},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0273972602739726},"case/segment.html":{"ref":"case/segment.html","tf":0.0425531914893617},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.045454545454545456},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0425531914893617},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.037037037037037035},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.037383177570093455},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.039603960396039604},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.038834951456310676},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.03773584905660377}}}}}}}},"n":{"docs":{},"e":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":10}},"l":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":10}},"的":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}},"关":{"docs":{},"闭":{"docs":{},"事":{"docs":{},"件":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":10}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"m":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"t":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}},"g":{"docs":{},"e":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"r":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"刷":{"docs":{},"新":{"docs":{},"完":{"docs":{},"成":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},":":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"s":{"docs":{},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}},"为":{"docs":{},"数":{"docs":{},"字":{"docs":{},"时":{"docs":{},"可":{"docs":{},"用":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}}},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":10}}}}}},"t":{"docs":{},"h":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":10.020408163265307}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}},"v":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":10}}}}}}}}},"o":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"y":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}}}}}},"i":{"docs":{},"d":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224}}}}},"y":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"这":{"docs":{},"几":{"docs":{},"个":{"docs":{},"方":{"docs":{},"法":{"docs":{},"来":{"docs":{},"设":{"docs":{},"置":{"docs":{},"使":{"docs":{},"能":{"docs":{},",":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{},",":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{},"并":{"docs":{},"且":{"docs":{},"在":{"docs":{},"f":{"docs":{},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"u":{"docs":{},"i":{"2":{"docs":{},".":{"0":{"docs":{},"之":{"docs":{},"后":{"docs":{},",":{"docs":{},"会":{"docs":{},"自":{"docs":{},"动":{"docs":{},"给":{"docs":{},"子":{"docs":{},"组":{"docs":{},"件":{"docs":{},"设":{"docs":{},"置":{"docs":{},"同":{"docs":{},"样":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{},"不":{"docs":{},"要":{"docs":{},"重":{"docs":{},"写":{"docs":{},"这":{"docs":{},"些":{"docs":{},"方":{"docs":{},"法":{"docs":{},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"需":{"docs":{},"要":{"docs":{},"在":{"docs":{},"设":{"docs":{},"置":{"docs":{},"状":{"docs":{},"态":{"docs":{},"时":{"docs":{},"的":{"docs":{},"额":{"docs":{},"外":{"docs":{},"操":{"docs":{},"作":{"docs":{},"可":{"docs":{},"以":{"docs":{},"通":{"docs":{},"过":{"docs":{},"重":{"docs":{},"写":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"来":{"docs":{},"实":{"docs":{},"现":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.034482758620689655},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}},"i":{"docs":{},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"i":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}},"e":{"docs":{},"w":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"e":{"docs":{},"n":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"(":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}},"x":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"t":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"i":{"docs":{},"z":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"l":{"docs":{},"l":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}},"z":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}},"n":{"docs":{},"g":{"docs":{},"s":{"docs":{},":":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}}}}}}}}},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}}}},"n":{"docs":{},"i":{"docs":{},"s":{"docs":{},"h":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"l":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":10},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":10.018867924528301}},".":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"[":{"docs":{},"{":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}}}}}},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"v":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"a":{"docs":{},"l":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":10}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":10}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},":":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"e":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":10}}}}}}}},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}},"x":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077}},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}},":":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"}":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}},"o":{"docs":{},"u":{"docs":{},"r":{"docs":{},"c":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":10}}}}}}}}}},"t":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.024154589371980676},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.029197080291970802},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.02127659574468085},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.025},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.020618556701030927},"core/single.html":{"ref":"core/single.html","tf":0.05555555555555555},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.04794520547945205},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.023255813953488372},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.0380952380952381},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.015873015873015872},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.02531645569620253},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.03125},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.031914893617021274},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.015625},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.017341040462427744},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.0297029702970297},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.02912621359223301},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.02830188679245283},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.05714285714285714},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.11764705882352941}},"/":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}},"e":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":10}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":10}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"h":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":10}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/single.html":{"ref":"core/single.html","tf":10}},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":10}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":10}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":10}}}}}}}}}}}}}}}}},"z":{"docs":{},"e":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":10}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":10}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":10}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}},"e":{"docs":{},"r":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":10.0125}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":10}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},",":{"docs":{},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}},"m":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"y":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}},":":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}},"v":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":10.01123595505618}},".":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"m":{"1":{"0":{"docs":{},",":{"1":{"0":{"docs":{},"l":{"5":{"0":{"docs":{},",":{"5":{"0":{"docs":{},"m":{"5":{"0":{"docs":{},",":{"1":{"0":{"docs":{},"l":{"1":{"0":{"docs":{},",":{"5":{"0":{"docs":{},"\"":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}}}}}}}},"绘":{"docs":{},"图":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":10}},"插":{"docs":{},"件":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}}}}}}},"使":{"docs":{},"用":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"来":{"docs":{},"清":{"docs":{},"空":{"docs":{},"或":{"docs":{},"者":{"docs":{},"重":{"docs":{},"置":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"不":{"docs":{},"要":{"docs":{},"使":{"docs":{},"用":{"docs":{},"e":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"能":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"慎":{"docs":{},"用":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}},"控":{"docs":{},"件":{"docs":{},"都":{"docs":{},"会":{"docs":{},"提":{"docs":{},"供":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}},"位":{"docs":{},"置":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"高":{"docs":{},"度":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"文":{"docs":{},"档":{"docs":{},"规":{"docs":{},"范":{"docs":{"./":{"ref":"./","tf":10}}}}},"本":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}},"对":{"docs":{},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}},"标":{"docs":{},"签":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}},"宽":{"docs":{},"度":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863}}}}},"红":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"高":{"docs":{},"亮":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}},"值":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"失":{"docs":{},"焦":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"是":{"docs":{},"否":{"docs":{},"处":{"docs":{},"于":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"获":{"docs":{},"取":{"docs":{},"焦":{"docs":{},"点":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"宽":{"docs":{},"度":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}},"高":{"docs":{},"度":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}},"默":{"docs":{},"认":{"docs":{},"值":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}},"域":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}},"失":{"docs":{},"焦":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"的":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"获":{"docs":{},"取":{"docs":{},"焦":{"docs":{},"点":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}}}}}}}},"字":{"docs":{},"布":{"docs":{},"局":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}},"类":{"docs":{},"型":{"docs":{},"的":{"docs":{},"按":{"docs":{},"钮":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}}}}}}}}}}}}}}}}}}},"件":{"docs":{},"上":{"docs":{},"传":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}},"路":{"docs":{},"径":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}},"管":{"docs":{},"理":{"docs":{},"器":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}}}}},"谨":{"docs":{},"慎":{"docs":{},"监":{"docs":{},"听":{"docs":{},"和":{"docs":{},"触":{"docs":{},"发":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"事":{"docs":{},"件":{"docs":{},",":{"docs":{},"一":{"docs":{},"般":{"docs":{},"来":{"docs":{},"说":{"docs":{},",":{"docs":{},"控":{"docs":{},"件":{"docs":{},"都":{"docs":{},"会":{"docs":{},"有":{"docs":{},"一":{"docs":{},"个":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"事":{"docs":{},"件":{"docs":{},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"特":{"docs":{},"殊":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{},"会":{"docs":{},"在":{"docs":{},"对":{"docs":{},"应":{"docs":{},"控":{"docs":{},"件":{"docs":{},"文":{"docs":{},"档":{"docs":{},"中":{"docs":{},"列":{"docs":{},"出":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"\"":{"0":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}},"f":{"docs":{},"b":{"docs":{},"d":{"0":{"docs":{},"d":{"docs":{},"c":{"6":{"4":{"8":{"docs":{},"f":{"4":{"1":{"docs":{},"e":{"9":{"7":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}}}}},"1":{"0":{"0":{"docs":{},"%":{"docs":{},"\"":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}},"docs":{}},"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224}}}}},"2":{"3":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224}}}}},"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.08163265306122448}}}},"f":{"4":{"7":{"1":{"1":{"docs":{},"c":{"2":{"0":{"1":{"docs":{},"e":{"docs":{},"f":{"1":{"8":{"4":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}},"3":{"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}},"4":{"5":{"6":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"docs":{}},"docs":{}},"5":{"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}},"8":{"docs":{},"c":{"4":{"4":{"6":{"0":{"docs":{},"b":{"docs":{},"c":{"3":{"6":{"0":{"5":{"6":{"8":{"5":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.030927835051546393},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021164021164021163},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.05063291139240506},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.0625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.0425531914893617},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.020512820512820513},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.041666666666666664},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.02531645569620253},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0273972602739726},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886}},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}}}}},"b":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},".":{"docs":{},".":{"docs":{},".":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"docs":{},"i":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},".":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.02631578947368421},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154}}},"}":{"docs":{},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195}}},"}":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425}}}}}}}}}}}}}}},"a":{"docs":{},"b":{"docs":{},"s":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"t":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471}}}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}}}}}}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}}}}}},"i":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}}}}},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}}}},"\"":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}},"}":{"docs":{},"]":{"docs":{},"}":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},"}":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}}}}}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}}}}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}}},"}":{"docs":{},"}":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}}}}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}}}},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}},",":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}}}}}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"u":{"docs":{},"s":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014814814814814815},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}},"v":{"docs":{},"g":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"h":{"docs":{},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}}}}}}}}}}}},"x":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}}}}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"a":{"docs":{},"n":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}}}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.02631578947368421},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154}}}}}},"b":{"docs":{},"e":{"docs":{},"l":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}},"docs":{}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385}},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}}}}}}}}},"\"":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}},"这":{"docs":{},"里":{"docs":{},"设":{"docs":{},"置":{"docs":{},"了":{"docs":{},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"水":{"docs":{},"平":{"docs":{},"间":{"docs":{},"距":{"docs":{},")":{"docs":{},",":{"docs":{},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"间":{"docs":{},"距":{"docs":{},")":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"t":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"b":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471}}}}}}}}}}}}}}}}}}}}}}}}}}},"个":{"docs":{},"是":{"docs":{},"带":{"docs":{},"标":{"docs":{},"记":{"docs":{},"的":{"docs":{},"\"":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}},"m":{"docs":{},"i":{"docs":{},"d":{"docs":{},"d":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}}}}}}}},"v":{"docs":{},"c":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"c":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"6":{"docs":{},"d":{"7":{"2":{"docs":{},"d":{"6":{"docs":{},"c":{"7":{"docs":{},"e":{"1":{"9":{"docs":{},"a":{"6":{"6":{"7":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855}}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314}}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}},"h":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436}}}}}}},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}},"e":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.061224489795918366},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06382978723404255}}}}}}}}},"右":{"docs":{},"边":{"docs":{},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385}}}}}},"e":{"docs":{},"d":{"docs":{},"\"":{"docs":{},"}":{"docs":{},")":{"docs":{},";":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.061224489795918366},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06382978723404255}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.061224489795918366}}}}}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.020618556701030927},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"p":{"docs":{},":":{"docs":{},"/":{"docs":{},"/":{"docs":{},"w":{"docs":{},"w":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"a":{"docs":{},"s":{"docs":{},"y":{"docs":{},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"/":{"docs":{},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{},"/":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{},".":{"docs":{},"p":{"docs":{},"h":{"docs":{},"p":{"docs":{},"?":{"docs":{},"i":{"docs":{},"d":{"docs":{},"=":{"1":{"2":{"0":{"6":{"7":{"4":{"1":{"docs":{},"&":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"=":{"1":{"2":{"8":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"与":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"的":{"docs":{},"不":{"docs":{},"同":{"docs":{},"在":{"docs":{},"于":{"docs":{},",":{"docs":{},"它":{"docs":{},"可":{"docs":{},"以":{"docs":{},"控":{"docs":{},"制":{"docs":{},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"和":{"docs":{},"最":{"docs":{},"大":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"根":{"docs":{},"目":{"docs":{},"录":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"第":{"docs":{},"一":{"docs":{},"级":{"docs":{},"目":{"docs":{},"录":{"1":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"docs":{}}},"子":{"docs":{},"目":{"docs":{},"录":{"1":{"docs":{},"\"":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}},"2":{"docs":{},"\"":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}},"docs":{}}}}},"行":{"docs":{},"第":{"docs":{},"一":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"二":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"三":{"docs":{},"列":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"二":{"docs":{},"级":{"docs":{},"文":{"docs":{},"件":{"1":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"docs":{}}}},"行":{"docs":{},"第":{"docs":{},"一":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"二":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}},"三":{"docs":{},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}},".":{"docs":{},"\"":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"\"":{"docs":{},"}":{"docs":{},"]":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}},"测":{"docs":{},"试":{"docs":{},"\"":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"\"":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497}},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"}":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}},"]":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},"\"":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"测":{"docs":{},"试":{"docs":{},"\"":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}},"a":{"docs":{},"b":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"3":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}},"docs":{}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"\"":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.061224489795918366},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06382978723404255}}}}}}}},"前":{"docs":{},"进":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}},"后":{"docs":{},"退":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}},"页":{"docs":{},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}},"张":{"docs":{},"三":{"docs":{},"\"":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"s":{"docs":{},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},"\"":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}},"面":{"docs":{},"板":{"1":{"docs":{},"\"":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"2":{"docs":{},"\"":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"docs":{}}},"点":{"docs":{},"击":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}},"a":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}},"docs":{},"a":{"docs":{},"a":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},")":{"docs":{},";":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"b":{"docs":{},"a":{"docs":{},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}},"c":{"docs":{},"c":{"docs":{},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}},"d":{"docs":{},"i":{"docs":{},"v":{"docs":{},"\"":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.0425531914893617}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}},"f":{"docs":{},"a":{"1":{"docs":{},"f":{"7":{"docs":{},"b":{"docs":{},"a":{"8":{"docs":{},"b":{"2":{"6":{"8":{"4":{"docs":{},"a":{"docs":{},"客":{"docs":{},"户":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}}}},"docs":{}}},"docs":{}}}},"o":{"docs":{},"t":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.03289473684210526}}}}},"基":{"docs":{},"本":{"docs":{},"标":{"docs":{},"签":{"docs":{},"\"":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"\"":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}},",":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}}},"字":{"docs":{},"段":{"docs":{},"不":{"docs":{},"可":{"docs":{},"重":{"docs":{},"名":{"docs":{},"!":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"尾":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"首":{"docs":{},"页":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"g":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"n":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"复":{"docs":{},"选":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}},"项":{"docs":{},"\"":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}},"单":{"docs":{},"选":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}},"项":{"docs":{},"\"":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}},"原":{"docs":{},"始":{"docs":{},"值":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}}},"+":{"docs":{},"\"":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}},"标":{"docs":{},"题":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.04081632653061224}}}}}},"默":{"docs":{},"认":{"docs":{},"风":{"docs":{},"格":{"docs":{},"\"":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"值":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}},"三":{"docs":{},"角":{"docs":{},"形":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}}}},"十":{"docs":{},"字":{"docs":{},"形":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}}}},"箭":{"docs":{},"头":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}},"表":{"docs":{},"头":{"1":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"2":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"3":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"docs":{}}},"供":{"docs":{},"应":{"docs":{},"商":{"docs":{},"基":{"docs":{},"本":{"docs":{},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}}}}}}},"学":{"docs":{},"号":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}},"采":{"docs":{},"购":{"docs":{},"订":{"docs":{},"单":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}}}}}}},"e":{"3":{"5":{"1":{"docs":{},"e":{"9":{"docs":{},"f":{"1":{"docs":{},"d":{"8":{"1":{"4":{"7":{"9":{"4":{"7":{"docs":{},"合":{"docs":{},"同":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}},"主":{"docs":{},"键":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}},"合":{"docs":{},"同":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}},"的":{"docs":{},"回":{"docs":{},"款":{"docs":{},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}}}},"客":{"docs":{},"户":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}},"比":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"'":{"1":{"9":{"0":{"0":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}},"docs":{}},"docs":{}},"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"2":{"0":{"9":{"9":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}},"docs":{}},"docs":{}},"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"3":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}},"docs":{},"d":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},".":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}}}}}}}}}}}}},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}}}}}}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"'":{"docs":{},",":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"'":{"docs":{},",":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"_":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}}}}}},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"'":{"docs":{},",":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}}}}}}},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"'":{"docs":{},",":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669}}}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"1":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}},"2":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}},"3":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}},"]":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"docs":{}}}}}},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"'":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"]":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"1":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}},"2":{"docs":{},"'":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"3":{"docs":{},"'":{"docs":{},"}":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"docs":{}}}}}},"点":{"docs":{},"击":{"docs":{},"我":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"一":{"docs":{},"个":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"'":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}}}},"一":{"docs":{},"般":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}},"文":{"docs":{},"字":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}},"s":{"docs":{},"u":{"docs":{},"m":{"docs":{},"(":{"docs":{},"c":{"5":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"docs":{}}}}}},"'":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},",":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}},"简":{"docs":{},"单":{"docs":{},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"测":{"docs":{},"试":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}}}}}}},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}}}}}}}}},"[":{"0":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"1":{"0":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}},"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{}},"2":{"0":{"0":{"docs":{},",":{"2":{"0":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"docs":{}},"docs":{}},"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"docs":{},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"docs":{}},"5":{"0":{"docs":{},",":{"5":{"0":{"docs":{},",":{"2":{"0":{"0":{"docs":{},",":{"2":{"5":{"0":{"docs":{},",":{"4":{"0":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"8":{"2":{"docs":{},",":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"docs":{}},"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.024793388429752067},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.029850746268656716},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014814814814814815},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.02830188679245283},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0410958904109589},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.02127659574468085},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.018691588785046728},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"]":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.031446540880503145},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.043859649122807015},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.03289473684210526},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.06060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.05102040816326531},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.05102040816326531},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.03684210526315789},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.046511627906976744}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}},"[":{"docs":{},"{":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"\"":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}},"r":{"docs":{},"r":{"docs":{},"a":{"docs":{},"y":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.029411764705882353},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.03773584905660377},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.043859649122807015},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.03289473684210526},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.06666666666666667},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.05612244897959184},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.05612244897959184},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.03684210526315789},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.046511627906976744},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}},"/":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125}},"上":{"docs":{},"下":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608}}}}}}}}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":10}}}}}}}}}},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"(":{"docs":{},"a":{"docs":{},"r":{"docs":{},"r":{"docs":{},")":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}},"j":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}},"x":{"docs":{},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}},"y":{"docs":{},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357}}}}}}}}}}}},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"c":{"docs":{},"r":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401}}}},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"i":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}},"y":{"docs":{},":":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"i":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"b":{"docs":{},"l":{"docs":{},"a":{"docs":{},"n":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":10}}}}}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}},"b":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"g":{"1":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"2":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"3":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"4":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"5":{"docs":{},"\"":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}},"6":{"docs":{},"\"":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}},"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"(":{"docs":{},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.020689655172413793},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}},")":{"docs":{},";":{"docs":{},"}":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}}}}}}}}},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941}}}}}}}}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":10.00943396226415}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},".":{"docs":{},"m":{"docs":{},"i":{"docs":{},"d":{"docs":{},"d":{"docs":{},"l":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},".":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":0.5}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},".":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}},"e":{"docs":{},",":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"(":{"docs":{},")":{"docs":{},")":{"docs":{},".":{"docs":{},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},")":{"docs":{},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}},"t":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}},"e":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}},"d":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":10.009900990099009}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"(":{"docs":{},"{":{"docs":{},"}":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"f":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.031914893617021274},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.03255813953488372},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"l":{"docs":{},"u":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"e":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"n":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"f":{"docs":{},"o":{"docs":{},"c":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"_":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"r":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"o":{"docs":{},"p":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"[":{"docs":{},"{":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}},"k":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"r":{"docs":{},"a":{"docs":{},"y":{"docs":{},"(":{"1":{"0":{"0":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}},"s":{"docs":{},"g":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}},".":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{},"(":{"docs":{},"'":{"docs":{},"测":{"docs":{},"试":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"'":{"docs":{},",":{"docs":{},"\"":{"docs":{},"我":{"docs":{},"是":{"docs":{},"测":{"docs":{},"试":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"这":{"docs":{},"是":{"docs":{},"一":{"docs":{},"条":{"docs":{},"简":{"docs":{},"单":{"docs":{},"的":{"docs":{},"数":{"docs":{},"据":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"(":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}}}}}}}}}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"g":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"o":{"docs":{},"m":{"docs":{},"(":{"1":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}},"docs":{}}}}}}},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":10.009708737864077}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}},"v":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"h":{"docs":{},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}},"g":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}}},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}},"s":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},")":{"docs":{},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},"_":{"docs":{},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"s":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}},"e":{"docs":{},"l":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}},"u":{"docs":{},"u":{"docs":{},"i":{"docs":{},"d":{"docs":{},"(":{"docs":{},")":{"docs":{},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}},"i":{"1":{"8":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"b":{"docs":{},"i":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}},"docs":{}},"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.033816425120772944},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.031914893617021274},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.059322033898305086},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.017857142857142856},"core/widget.html":{"ref":"core/widget.html","tf":0.020618556701030927},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/button/button.html":{"ref":"base/button/button.html","tf":0.03488372093023256},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"base/pager.html":{"ref":"base/pager.html","tf":0.04},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.02040816326530612},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.02040816326530612},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561}}}}}}},"r":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":10}},"\"":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"r":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"d":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"y":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/button/button.html":{"ref":"base/button/button.html","tf":10},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":10}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":10}}}}}},"的":{"docs":{},"选":{"docs":{},"中":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":10}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":10}}}}}}}}}}}}},"l":{"docs":{},"o":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}},"u":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"a":{"docs":{},"s":{"docs":{},"e":{"docs":{},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":10}}}}}}}},"s":{"docs":{},"u":{"docs":{},"r":{"docs":{},"e":{"docs":{},"\"":{"docs":{},")":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}},":":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"_":{"docs":{},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"组":{"docs":{},"件":{"docs":{},"配":{"docs":{},"置":{"docs":{},"项":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}},"配":{"docs":{},"置":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":10}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":10}}}}}}}}}}}},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"s":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.02631578947368421},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.03289473684210526}},"\"":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":10}}}}}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}},"i":{"docs":{},"n":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{},"名":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},"s":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.025157232704402517},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.02631578947368421},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.019736842105263157},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.01875},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.02631578947368421},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023}}}}}}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":10}}}}}},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":10}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"半":{"docs":{},"径":{"docs":{},"以":{"docs":{},"及":{"docs":{},"颜":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":10}}}}}}}}}}},"n":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}},"n":{"docs":{},"t":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}},")":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":10.009661835748792}},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}},"类":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}},",":{"docs":{},"s":{"docs":{},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},",":{"docs":{},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":10.020833333333334}}}}}}}}}}}}},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353}},":":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":10}}}}}}}}}}},"p":{"docs":{},"i":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}},"y":{"docs":{},":":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":10},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":10}}}}}}}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"e":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"n":{"docs":{},"e":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"d":{"docs":{},"e":{"docs":{},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}},"e":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}},"可":{"docs":{},"选":{"docs":{},"值":{"docs":{},"为":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},":":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}}}}}}}},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":10}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":10.045454545454545}}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}},"o":{"docs":{},"r":{"docs":{},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862}}}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}},"s":{"docs":{},"e":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862}}}},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.0425531914893617},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}},"(":{"docs":{},"{":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}},")":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":10}}}}}}}},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":10.016666666666667},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"i":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"1":{"5":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{},"(":{"docs":{},")":{"docs":{},";":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"(":{"5":{"5":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}},"docs":{}}}}}}}}},"绘":{"docs":{},"图":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"o":{"docs":{},"s":{"docs":{},"s":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}},"i":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"e":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.046052631578947366}},"l":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}},"\"":{"docs":{},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"b":{"docs":{},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}}}}},":":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.057692307692307696},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"s":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":10.014598540145986},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}},"展":{"docs":{},"开":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}},"收":{"docs":{},"起":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"a":{"docs":{},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":10}}}}}}}},"s":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"o":{"docs":{},"s":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}}}}}}}}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}},"w":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}}}}},"d":{"docs":{},")":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":10}},"的":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"=":{"docs":{},"_":{"docs":{},"r":{"docs":{},"e":{"docs":{},"f":{"docs":{},";":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":10}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},":":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}},"h":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},":":{"3":{"0":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}},"docs":{}},"5":{"0":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}},"docs":{}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.03305785123966942},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.025974025974025976},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},":":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":10}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":10}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":10}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"类":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"l":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":10}}}}},"m":{"docs":{},"l":{"docs":{},"标":{"docs":{},"签":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}},"a":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}},"s":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.01694915254237288},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.02127659574468085},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}},"h":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}},"n":{"docs":{},"d":{"docs":{},"l":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"e":{"docs":{},"r":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},":":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":10}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.016},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.016},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.031746031746031744},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.058823529411764705},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.02564102564102564},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.03389830508474576},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.03225806451612903},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0273972602739726},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.03773584905660377},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.03389830508474576},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.031914893617021274},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.02531645569620253},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.043478260869565216},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}},"s":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.024793388429752067},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/segment.html":{"ref":"case/segment.html","tf":0.02127659574468085},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.018691588785046728},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.034482758620689655},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"[":{"docs":{},"]":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}},"c":{"docs":{},"r":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},":":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}}}}}},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}},")":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}},".":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}},"d":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571}},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.061224489795918366}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}},"i":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}}}}}},"i":{"docs":{},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}}}}},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"p":{"docs":{},"a":{"docs":{},"r":{"docs":{},"a":{"docs":{},"m":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}},"s":{"docs":{},"d":{"docs":{},"e":{"docs":{},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"e":{"docs":{},"d":{"docs":{},"a":{"docs":{},"d":{"docs":{},"j":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}}}}}}}},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"g":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}}},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"n":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"a":{"docs":{},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"启":{"docs":{},"用":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}},"y":{"docs":{},"n":{"docs":{},"c":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"h":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"(":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"o":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"n":{"docs":{},"c":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"a":{"docs":{},"l":{"docs":{},"d":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"r":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"d":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},":":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.03125}}}}}},"s":{"1":{"docs":{},":":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}}},"docs":{}}}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":10}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":10}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":10}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}},"的":{"docs":{},"类":{"docs":{},"名":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":10}}}}}}}}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.03896103896103896}}},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":10}}}}}}}}}}}}}}}}}}}}}}},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}},":":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":10}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"s":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":10}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":10}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":10}}}}},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":10}}}}}}}}}},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.04081632653061224}},"e":{"docs":{},"r":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":10}}}}}},"g":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}},"_":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"面":{"docs":{},"板":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}}}}}},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":10}}}}}}}}}}},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.049586776859504134},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.07058823529411765},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.06896551724137931},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.06593406593406594},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.061855670103092786},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.06521739130434782},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.08333333333333333},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.03896103896103896},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.043478260869565216},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.038461538461538464},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.027649769585253458},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.047619047619047616},"base/label.html":{"ref":"base/label.html","tf":0.0547945205479452},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.06395348837209303},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.047619047619047616},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.031746031746031744},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.035897435897435895},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.038461538461538464},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.036458333333333336},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.040229885057471264},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0410958904109589},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0546875},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.058823529411764705},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/segment.html":{"ref":"case/segment.html","tf":0.0851063829787234},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.09090909090909091},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0851063829787234},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.07407407407407407},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.07476635514018691},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.018604651162790697},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.07920792079207921},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.07766990291262135},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.07547169811320754},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.07142857142857142}},",":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.025974025974025976}}}}}}}},"/":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":10.017543859649123}}}}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"core/single.html":{"ref":"core/single.html","tf":0.05555555555555555},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"e":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"w":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"s":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}}}}}}}}}}}}}}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},",":{"docs":{},"n":{"docs":{},"o":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":10}}}}}}}}},":":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"\"":{"docs":{},")":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}},"e":{"docs":{},"d":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},")":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"w":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":10}}}}},"m":{"docs":{},"e":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}},",":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.03896103896103896}}}}}}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"o":{"docs":{},"w":{"2":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},")":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571}}},"s":{"docs":{},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"i":{"docs":{},"z":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}},"o":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"e":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}},"a":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}},"e":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"i":{"docs":{},"z":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":10}}}}}}}},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":10}}}}}}}}}}}},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"h":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}},":":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"(":{"docs":{},"_":{"docs":{},"r":{"docs":{},"e":{"docs":{},"f":{"docs":{},")":{"docs":{},"{":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}}}}},"c":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":10.01923076923077}}}}}}}}}}}}}},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"u":{"docs":{},"s":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.041237113402061855},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.027586206896551724},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.02830188679245283},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.02631578947368421},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.03636363636363636},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.05063291139240506},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0684931506849315},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/segment.html":{"ref":"case/segment.html","tf":0.0425531914893617},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0425531914893617},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.05555555555555555},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.037383177570093455},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.04054054054054054},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.031578947368421054},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.07692307692307693},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.061224489795918366}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":10}}}}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}},":":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}},":":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":10}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":10}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":10}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.02631578947368421},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.033816425120772944},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.031914893617021274},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.03389830508474576},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.017857142857142856},"core/widget.html":{"ref":"core/widget.html","tf":0.020618556701030927},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/button/button.html":{"ref":"base/button/button.html","tf":0.03488372093023256},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/pager.html":{"ref":"base/pager.html","tf":0.04},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.019801980198019802},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886}}}}}}},";":{"docs":{},"}":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},"}":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}},"/":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}}}}},"e":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},".":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"(":{"docs":{},"{":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},")":{"docs":{},";":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":10}}}}}}}}}},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.038461538461538464},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.04132231404958678},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.03529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.034482758620689655},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.03296703296703297},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.05384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.05154639175257732},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.03260869565217391},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.037037037037037035},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.027777777777777776},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0379746835443038},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.04477611940298507},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.04411764705882353},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.044444444444444446},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.02564102564102564},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.027586206896551724},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.023809523809523808},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.02830188679245283},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.03289473684210526},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.03125},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.05454545454545454},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.04838709677419355},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.04838709677419355},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.028901734104046242},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.031914893617021274},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.05319148936170213},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.06481481481481481},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.027624309392265192},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.019736842105263157},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"(":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"o":{"docs":{},"l":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}},"位":{"docs":{},"置":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":10},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}},"提":{"docs":{},"示":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}},"a":{"docs":{},"b":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":10.006896551724138},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":10},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}},"e":{"docs":{},"作":{"docs":{},"为":{"docs":{},"一":{"docs":{},"个":{"docs":{},"列":{"docs":{},"表":{"docs":{},"集":{"docs":{},"合":{"docs":{},"存":{"docs":{},"在":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":10}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"完":{"docs":{},"成":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}},"大":{"docs":{},"小":{"docs":{},"调":{"docs":{},"整":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"窗":{"docs":{},"口":{"docs":{},"变":{"docs":{},"化":{"docs":{},"等":{"docs":{},")":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}},"页":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}},"标":{"docs":{},"签":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"d":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":10}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}},"e":{"docs":{},"文":{"docs":{},"本":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.06382978723404255}},"o":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776}}}}}},"类":{"docs":{},"型":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}},":":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}},"s":{"docs":{},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}}}}}}}}},"h":{"docs":{},"i":{"docs":{},"s":{"docs":{},".":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}}}}}}}}}}}}}}},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0364963503649635},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.02},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"a":{"docs":{},"l":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":10}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},":":{"1":{"0":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}},"docs":{}},"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":10}}}}}},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.029850746268656716},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.01694915254237288},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.0379746835443038},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.02127659574468085},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.03389830508474576},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.02127659574468085},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"e":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}},"可":{"docs":{},"以":{"docs":{},"是":{"docs":{},"单":{"docs":{},"个":{"docs":{},"值":{"docs":{},"也":{"docs":{},"可":{"docs":{},"以":{"docs":{},"是":{"docs":{},"个":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.04477611940298507},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.01694915254237288},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863}}}}}}}}}}}}}}}},":":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.02830188679245283},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0234375},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0379746835443038},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0547945205479452},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.031914893617021274},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.07692307692307693},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.061224489795918366}}},"值":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.02127659574468085}}}}},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}}}}}},"r":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":10}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":10}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}}}}}}},":":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.024793388429752067},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.06493506493506493},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.0625},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02962962962962963},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.02564102564102564},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0375},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.034482758620689655},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.017857142857142856},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.04918032786885246},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.023121387283236993},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.03125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0379746835443038},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0273972602739726},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/segment.html":{"ref":"case/segment.html","tf":0.031914893617021274},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.031914893617021274},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.04081632653061224},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.0425531914893617},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.06493506493506493},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014814814814814815},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.02127659574468085},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}},"\"":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"1":{"0":{"docs":{},",":{"docs":{},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"0":{"docs":{},"}":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"docs":{}}}}}}}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.05357142857142857}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}},"}":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}},",":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.06},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.07692307692307693},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}}}}},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},":":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"y":{"docs":{},":":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"}":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}}}}}}}}}}}}},"}":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"}":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818}}}}}}}}}}}}}}}},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.057692307692307696}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}},"}":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.032},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.032},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.025},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.020689655172413793},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.05714285714285714}},")":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.02564102564102564},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.020689655172413793},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}},";":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.06060606060606061},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.041666666666666664},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.024793388429752067},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.016},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.016},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.02531645569620253},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0273972602739726},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/segment.html":{"ref":"case/segment.html","tf":0.031914893617021274},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.031914893617021274},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.04081632653061224},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.0425531914893617},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224}},"{":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.030927835051546393},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}},"]":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014814814814814815},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0273972602739726},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.019736842105263157},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}},"}":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}},";":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},"]":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684}}}}}},"—":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.05785123966942149},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.056},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.056},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.08235294117647059},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.08045977011494253},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.07692307692307693},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.06153846153846154},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.061855670103092786},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.07608695652173914},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.09722222222222222},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.026785714285714284},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.09523809523809523},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.08955223880597014},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.058823529411764705},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.05185185185185185},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.11688311688311688},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.10869565217391304},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.10256410256410256},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.09178743961352658},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0948905109489051},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.05319148936170213},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.16101694915254236},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.08759124087591241},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.14285714285714285},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.15625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.06896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.1111111111111111},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.10119047619047619},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.05660377358490566},"core/widget.html":{"ref":"core/widget.html","tf":0.17010309278350516},"core/single.html":{"ref":"core/single.html","tf":0.125},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.1349206349206349},"core/node_button.html":{"ref":"core/node_button.html","tf":0.13157894736842105},"core/pane.html":{"ref":"core/pane.html","tf":0.1836734693877551},"base/label.html":{"ref":"base/label.html","tf":0.13013698630136986},"base/bubble.html":{"ref":"base/bubble.html","tf":0.06976744186046512},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.12209302325581395},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.11428571428571428},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.07692307692307693},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.1044776119402985},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.12698412698412698},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.11392405063291139},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.109375},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.10869565217391304},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.1276595744680851},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.0880503144654088},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.06140350877192982},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.05263157894736842},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"base/pager.html":{"ref":"base/pager.html","tf":0.12},"base/svg.html":{"ref":"base/svg.html","tf":0.033707865168539325},"base/canvas.html":{"ref":"base/canvas.html","tf":0.05},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.07272727272727272},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.08064516129032258},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.08064516129032258},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.13333333333333333},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.14285714285714285},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.140625},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.14942528735632185},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.10752688172043011},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.1643835616438356},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.06557377049180328},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.10377358490566038},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.13559322033898305},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.09574468085106383},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.0967741935483871},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.10404624277456648},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.1171875},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0759493670886076},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0547945205479452},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.04242424242424243},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.03571428571428571},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.03571428571428571},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.058823529411764705},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.09016393442622951},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.07692307692307693},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.125},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.11702127659574468},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.10185185185185185},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.102803738317757},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.10810810810810811},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.08421052631578947},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.08839779005524862},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.05581395348837209},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.15841584158415842},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.1553398058252427},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.1509433962264151},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"ß":{"docs":{},"ß":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}},"参":{"docs":{},"数":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.02830188679245283},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.031914893617021274},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.06},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02027027027027027},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.05714285714285714},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.11764705882352941},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.05714285714285714},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.07142857142857142},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.07142857142857142},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.034482758620689655},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.04081632653061224},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.0425531914893617},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.11764705882352941},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.10714285714285714}},"设":{"docs":{},"置":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"显":{"docs":{},"示":{"docs":{},"值":{"docs":{},"构":{"docs":{},"造":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}},"考":{"docs":{},"相":{"docs":{},"关":{"docs":{},"c":{"docs":{},"s":{"docs":{},"s":{"docs":{},"属":{"docs":{},"性":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"类":{"docs":{},"型":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}}}}}}}}}}}}}},"可":{"docs":{},"选":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}},"以":{"docs":{},"点":{"docs":{},"击":{"docs":{},"的":{"docs":{},"一":{"docs":{},"行":{"docs":{},"文":{"docs":{},"字":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}}}}}}}}}}}}}}}}},"理":{"docs":{},"解":{"docs":{},"为":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"和":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"两":{"docs":{},"个":{"docs":{},"面":{"docs":{},"板":{"docs":{},"的":{"docs":{},"结":{"docs":{},"合":{"docs":{},"体":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"单":{"docs":{},"选":{"docs":{},"多":{"docs":{},"选":{"docs":{},"切":{"docs":{},"换":{"docs":{},"的":{"docs":{},"树":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}}}}}}}}}}},"调":{"docs":{},"整":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"的":{"docs":{},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"表":{"docs":{},"格":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}}}}}}}}}}}}}}}}}},"垂":{"docs":{},"直":{"docs":{},"流":{"docs":{},"式":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"两":{"docs":{},"列":{"docs":{},"定":{"docs":{},"高":{"docs":{},",":{"docs":{},"一":{"docs":{},"列":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}}}}}}}},"基":{"docs":{},"础":{"docs":{},"属":{"docs":{},"性":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}},"元":{"docs":{},"素":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}},"用":{"docs":{},"法":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}}}},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}}}}}}}}}},"效":{"docs":{},"果":{"docs":{},"相":{"docs":{},"当":{"docs":{},"于":{"docs":{},"容":{"docs":{},"器":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}},"上":{"docs":{},"下":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}},"上":{"docs":{},"下":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},",":{"docs":{},"如":{"docs":{},"果":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"属":{"docs":{},"性":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"该":{"docs":{},"属":{"docs":{},"性":{"docs":{},"值":{"docs":{},"置":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"类":{"docs":{},"型":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}},"似":{"docs":{},"e":{"docs":{},"x":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"式":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}}}}}}},"设":{"docs":{},"置":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}}}}}}}},"水":{"docs":{},"平":{"docs":{},"方":{"docs":{},"向":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}}}}}}}}}},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}},"e":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}},"可":{"docs":{},"用":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}},"未":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}},"选":{"docs":{},"中":{"docs":{},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"列":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"是":{"docs":{},"否":{"docs":{},"显":{"docs":{},"示":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}},"行":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}},"每":{"docs":{},"个":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"和":{"docs":{},"宽":{"docs":{},"高":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}},"文":{"docs":{},"本":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"值":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}},"项":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}},"z":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}},"t":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"宽":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"属":{"docs":{},"性":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"无":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"有":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"有":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"高":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"错":{"docs":{},"误":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333}}}}}},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"可":{"docs":{},"见":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}},"样":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"框":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}}},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}},"样":{"docs":{},"式":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}},"域":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}},"样":{"docs":{},"式":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}},"节":{"docs":{},"点":{"docs":{},"展":{"docs":{},"开":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}},"高":{"docs":{},"度":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"图":{"docs":{},"片":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"按":{"docs":{},"钮":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}},"函":{"docs":{},"数":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"右":{"docs":{},"往":{"docs":{},"左":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"开":{"docs":{},"闭":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"的":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}},"左":{"docs":{},"到":{"docs":{},"右":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"开":{"docs":{},"闭":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"的":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"分":{"docs":{},"页":{"docs":{},"键":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"表":{"docs":{},"头":{"docs":{},"的":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}},"宽":{"docs":{},"度":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"属":{"docs":{},"性":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},"码":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353}}}},"选":{"docs":{},"中":{"docs":{},"项":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"画":{"docs":{},"布":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"尺":{"docs":{},"寸":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"标":{"docs":{},"题":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}},"全":{"docs":{},"选":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}},"计":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"页":{"docs":{},"码":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}},"横":{"docs":{},"向":{"docs":{},"分":{"docs":{},"页":{"docs":{},"键":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}},"数":{"docs":{},"值":{"docs":{},"区":{"docs":{},"间":{"docs":{},"的":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"提":{"docs":{},"示":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}},"定":{"docs":{},"的":{"docs":{},"年":{"docs":{},"份":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"月":{"docs":{},"份":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"说":{"docs":{},"明":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.029411764705882353},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014814814814814815},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01948051948051948},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.021739130434782608},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.02564102564102564},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.021897810218978103},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.02127659574468085},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.01694915254237288},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.01875},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.037037037037037035},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"core/widget.html":{"ref":"core/widget.html","tf":0.015463917525773196},"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"core/node_button.html":{"ref":"core/node_button.html","tf":0.05263157894736842},"core/pane.html":{"ref":"core/pane.html","tf":0.04081632653061224},"base/label.html":{"ref":"base/label.html","tf":0.02054794520547945},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.01744186046511628},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.02857142857142857},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.015873015873015872},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.02531645569620253},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.046875},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.02127659574468085},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013157894736842105},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.02},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.03636363636363636},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.015384615384615385},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.016483516483516484},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.015625},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.017241379310344827},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.03225806451612903},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.02127659574468085},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.02531645569620253},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0273972602739726},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.05263157894736842},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.08571428571428572},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.07142857142857142},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.07142857142857142},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.05172413793103448},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.07142857142857142}}}},"默":{"docs":{},"认":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"docs":{}}}},"相":{"docs":{},"等":{"docs":{},"时":{"docs":{},"合":{"docs":{},"并":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"]":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},":":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.01652892561983471},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.025974025974025976},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":10}}}}}}},"h":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}},"e":{"docs":{},":":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.020618556701030927},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}}}}},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},":":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}},"'":{"docs":{},"请":{"docs":{},"输":{"docs":{},"入":{"docs":{},"公":{"docs":{},"式":{"docs":{},"'":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}},"\"":{"docs":{},"请":{"docs":{},"输":{"docs":{},"入":{"docs":{},"内":{"docs":{},"容":{"docs":{},"\"":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}}}}}}},"搜":{"docs":{},"索":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669}}}}}},"带":{"docs":{},"清":{"docs":{},"除":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}}}}}}}}}}}}}}}},"元":{"docs":{},"素":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"对":{"docs":{},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}},"内":{"docs":{},"空":{"docs":{},"白":{"docs":{},"处":{"docs":{},"理":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}}},"的":{"docs":{},"空":{"docs":{},"白":{"docs":{},"处":{"docs":{},"理":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}},"创":{"docs":{},"造":{"docs":{},"器":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}},"每":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"所":{"docs":{},"组":{"docs":{},"成":{"docs":{},"的":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}}}},"格":{"docs":{},"列":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},",":{"docs":{},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"为":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"时":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"行":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}},",":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"为":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"时":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"水":{"docs":{},"平":{"docs":{},"流":{"docs":{},"式":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.008264462809917356}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"两":{"docs":{},"列":{"docs":{},"定":{"docs":{},"宽":{"docs":{},",":{"docs":{},"一":{"docs":{},"列":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}}}}}}}}}}}}}}}},"和":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"都":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}}}}}}}}}},"方":{"docs":{},"向":{"docs":{},"居":{"docs":{},"中":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}}}}}}},"分":{"docs":{},"页":{"docs":{},"选":{"docs":{},"项":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"印":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.08},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.08},"base/message.html":{"ref":"base/message.html","tf":0.06382978723404255},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"子":{"docs":{},"控":{"docs":{},"件":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},"对":{"docs":{},"象":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"项":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}},"数":{"docs":{},"组":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"创":{"docs":{},"建":{"docs":{},"函":{"docs":{},"数":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}},",":{"docs":{},"p":{"docs":{},"i":{"docs":{},"d":{"docs":{},"代":{"docs":{},"表":{"docs":{},"父":{"docs":{},"节":{"docs":{},"点":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"数":{"docs":{},"组":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}},"二":{"docs":{},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"左":{"docs":{},"右":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941}}}}}}}},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}}}}},"定":{"docs":{},"义":{"docs":{},"列":{"docs":{},"表":{"docs":{},"中":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"项":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},",":{"docs":{},"如":{"docs":{},"高":{"docs":{},"亮":{"docs":{},",":{"docs":{},"标":{"docs":{},"红":{"docs":{},"等":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}},"树":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408}}}}}}}}}}}}}}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}},"列":{"docs":{},"表":{"docs":{},"中":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"项":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},",":{"docs":{},"如":{"docs":{},"高":{"docs":{},"亮":{"docs":{},",":{"docs":{},"标":{"docs":{},"红":{"docs":{},"等":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"(":{"docs":{},"详":{"docs":{},"见":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},")":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}},"年":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},"(":{"docs":{},"详":{"docs":{},"见":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},")":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.07142857142857142},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.07142857142857142}}}}}}}}}}}}}}}}}}}}}}}}}}}},"右":{"docs":{},"边":{"docs":{},"容":{"docs":{},"器":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"初":{"docs":{},"始":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"分":{"docs":{},"离":{"docs":{},",":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}},"边":{"docs":{},"容":{"docs":{},"器":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"初":{"docs":{},"始":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}},"靠":{"docs":{},"左":{"docs":{},"/":{"docs":{},"右":{"docs":{},"对":{"docs":{},"齐":{"docs":{},"的":{"docs":{},"自":{"docs":{},"由":{"docs":{},"浮":{"docs":{},"动":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}}}}}}}}}}},"非":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},",":{"docs":{},"用":{"docs":{},"于":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"高":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},"的":{"docs":{},"面":{"docs":{},"板":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.010309278350515464}}}}}}}}}}}}}}}}}},"/":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}},"/":{"7":{"docs":{},"表":{"docs":{},"示":{"docs":{},"八":{"docs":{},"月":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"必":{"docs":{},"选":{"docs":{},"项":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}},"最":{"docs":{},"大":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"小":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}},"浮":{"docs":{},"动":{"docs":{},"的":{"docs":{},"水":{"docs":{},"平":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"布":{"docs":{},"局":{"docs":{},"实":{"docs":{},"现":{"docs":{},"的":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}}}}}}}}},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.022222222222222223},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.02127659574468085},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.01875},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011904761904761904},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.03278688524590164},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.07142857142857142},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.07142857142857142},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}},"(":{"docs":{},"{":{"docs":{},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},":":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}}}},"e":{"docs":{},"j":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}},"e":{"docs":{},"n":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}},"x":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}}},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}},"n":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"c":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"e":{"docs":{},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014598540145985401}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"i":{"docs":{},"n":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"上":{"docs":{},"下":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},"/":{"docs":{},"左":{"docs":{},"右":{"docs":{},"的":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},",":{"docs":{},"中":{"docs":{},"间":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"docs":{},"/":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}}}}}}}}}}}}}}}}}}}},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"传":{"docs":{},"结":{"docs":{},"束":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}},"过":{"docs":{},"程":{"docs":{},"中":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}},"列":{"docs":{},"数":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"项":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"间":{"docs":{},"的":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"宽":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684}},",":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}},"数":{"docs":{},"组":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}},"表":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}},"展":{"docs":{},"示":{"docs":{},"的":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}}}}}}}}}}}}}}}},"创":{"docs":{},"建":{"docs":{},"器":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}},"最":{"docs":{},"前":{"docs":{},"添":{"docs":{},"加":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}},"后":{"docs":{},"添":{"docs":{},"加":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}},"网":{"docs":{},"格":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}}}},"行":{"docs":{},"数":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"高":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"宽":{"docs":{},",":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"内":{"docs":{},"部":{"docs":{},"元":{"docs":{},"素":{"docs":{},"间":{"docs":{},"横":{"docs":{},"向":{"docs":{},"距":{"docs":{},"离":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"纵":{"docs":{},"向":{"docs":{},"距":{"docs":{},"离":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}}},"前":{"docs":{},"插":{"docs":{},"入":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}},"后":{"docs":{},"插":{"docs":{},"入":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}},"容":{"docs":{},"项":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"增":{"docs":{},"加":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"内":{"docs":{},"容":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"行":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}},"项":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}},"方":{"docs":{},"法":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.05714285714285714},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"名":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}}}}},"是":{"docs":{},"否":{"docs":{},"出":{"docs":{},"现":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"显":{"docs":{},"示":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"阴":{"docs":{},"影":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"尾":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"首":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"阻":{"docs":{},"止":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"需":{"docs":{},"要":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"调":{"docs":{},"整":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}},"高":{"docs":{},"度":{"docs":{},"调":{"docs":{},"整":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}},"合":{"docs":{},"并":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"冻":{"docs":{},"结":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}},"列":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}},"表":{"docs":{},"头":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"调":{"docs":{},"整":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"列":{"docs":{},"宽":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}},"在":{"docs":{},"调":{"docs":{},"整":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"或":{"docs":{},"区":{"docs":{},"域":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"时":{"docs":{},"候":{"docs":{},"它":{"docs":{},"们":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"变":{"docs":{},"化":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}}}}},"表":{"docs":{},"尾":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}},"默":{"docs":{},"认":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"子":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"数":{"docs":{},"据":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}}}}},"显":{"docs":{},"示":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}},"为":{"docs":{},"单":{"docs":{},"页":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}},"最":{"docs":{},"大":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"小":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"匹":{"docs":{},"配":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"正":{"docs":{},"在":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"自":{"docs":{},"动":{"docs":{},"同":{"docs":{},"步":{"docs":{},"数":{"docs":{},"据":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"停":{"docs":{},"止":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"、":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"u":{"docs":{},"p":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}},"向":{"docs":{},"上":{"docs":{},"冒":{"docs":{},"泡":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}}}}}}}}}}}}}}}}}}},"有":{"docs":{},"匹":{"docs":{},"配":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.0136986301369863},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.02127659574468085},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"前":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464}}},"改":{"docs":{},"变":{"docs":{},"列":{"docs":{},"大":{"docs":{},"小":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}},"只":{"docs":{},"读":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}},"允":{"docs":{},"许":{"docs":{},"点":{"docs":{},"击":{"docs":{},"一":{"docs":{},"次":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"无":{"docs":{},"论":{"docs":{},"如":{"docs":{},"何":{"docs":{},"都":{"docs":{},"要":{"docs":{},"居":{"docs":{},"中":{"docs":{},",":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}},"去":{"docs":{},"掉":{"docs":{},"边":{"docs":{},"框":{"docs":{},"和":{"docs":{},"背":{"docs":{},"景":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}}},"块":{"docs":{},"状":{"docs":{},"显":{"docs":{},"示":{"docs":{},",":{"docs":{},"即":{"docs":{},"不":{"docs":{},"显":{"docs":{},"示":{"docs":{},"边":{"docs":{},"框":{"docs":{},",":{"docs":{},"没":{"docs":{},"有":{"docs":{},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"限":{"docs":{},"制":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}}}}}}}}}}}}}}}}}}},"允":{"docs":{},"许":{"docs":{},"空":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}},"退":{"docs":{},"出":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"为":{"docs":{},"空":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"支":{"docs":{},"持":{"docs":{},"多":{"docs":{},"选":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}},"含":{"docs":{},"有":{"docs":{},"数":{"docs":{},"值":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"冻":{"docs":{},"结":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}},"列":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052}}}}},"调":{"docs":{},"整":{"docs":{},"时":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"动":{"docs":{},"态":{"docs":{},"显":{"docs":{},"示":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{},"、":{"docs":{},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{},",":{"docs":{},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}},"、":{"docs":{},"首":{"docs":{},"页":{"docs":{},"、":{"docs":{},"尾":{"docs":{},"页":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}},"首":{"docs":{},"页":{"docs":{},"、":{"docs":{},"尾":{"docs":{},"页":{"docs":{},",":{"docs":{},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"全":{"docs":{},"选":{"docs":{},"中":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}},"更":{"docs":{},"换":{"docs":{},"新":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"改":{"docs":{},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}},"用":{"docs":{},"法":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}},"于":{"docs":{},"表":{"docs":{},"格":{"docs":{},"预":{"docs":{},"览":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}}}}}}}}}}},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}}}}}}},"宽":{"docs":{},"度":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"选":{"docs":{},"框":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}}}}},"横":{"docs":{},"向":{"docs":{},"间":{"docs":{},"隙":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"分":{"docs":{},"支":{"docs":{},"的":{"docs":{},"树":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}}},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}}},"坐":{"docs":{},"标":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}},"翻":{"docs":{},"页":{"docs":{},"设":{"docs":{},"置":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"间":{"docs":{},"隙":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"分":{"docs":{},"支":{"docs":{},"的":{"docs":{},"树":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}},"页":{"docs":{},",":{"docs":{},"参":{"docs":{},"数":{"docs":{},"与":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"坐":{"docs":{},"标":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}},"翻":{"docs":{},"页":{"docs":{},"设":{"docs":{},"置":{"docs":{},",":{"docs":{},"参":{"docs":{},"数":{"docs":{},"与":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"相":{"docs":{},"同":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"y":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"w":{"docs":{},"h":{"docs":{},"e":{"docs":{},"n":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}}}}},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}}}}}}}}},"o":{"docs":{},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"h":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":10.006578947368421}}}}}}}}}}}}}}}},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":10}}},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":10.02127659574468}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}},"e":{"docs":{},"d":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}},"\"":{"docs":{},",":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},":":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}},"w":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":10}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"o":{"docs":{},"g":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":10.058823529411764}}}}}}},"a":{"docs":{},"t":{"docs":{},"a":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":10.058823529411764}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":10.028571428571428}}}}}}}}}}}}}}}},"y":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},"}":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"b":{"docs":{},"l":{"docs":{},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"s":{"docs":{},"t":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"}":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"}":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}}}}}}}}}}},"一":{"docs":{},"组":{"docs":{},"具":{"docs":{},"有":{"docs":{},"相":{"docs":{},"同":{"docs":{},"属":{"docs":{},"性":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{},"集":{"docs":{},"合":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"般":{"docs":{},"的":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"父":{"docs":{},"级":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936}}}}}}}}}}}}}}}}}}}}}}}},"刷":{"docs":{},"新":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}},"或":{"docs":{},"者":{"docs":{},"清":{"docs":{},"空":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}},"内":{"docs":{},"容":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}},"名":{"docs":{},"称":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.00966183574879227},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.014598540145985401},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"回":{"docs":{},"调":{"docs":{},"参":{"docs":{},"数":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.010309278350515464},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}},"车":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"但":{"docs":{},"是":{"docs":{},"值":{"docs":{},"不":{"docs":{},"合":{"docs":{},"法":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"对":{"docs":{},"外":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}},"向":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}},"话":{"docs":{},"框":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}},"内":{"docs":{},"容":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}}}},"标":{"docs":{},"题":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.058823529411764705}}}}}}},"布":{"docs":{},"局":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"根":{"docs":{},"据":{"docs":{},"i":{"docs":{},"d":{"docs":{},"获":{"docs":{},"取":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"返":{"docs":{},"回":{"docs":{},"元":{"docs":{},"素":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{},"获":{"docs":{},"取":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"在":{"docs":{},"数":{"docs":{},"组":{"docs":{},"中":{"docs":{},"的":{"docs":{},"索":{"docs":{},"引":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}}}},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{},"获":{"docs":{},"取":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}},"制":{"docs":{},"定":{"docs":{},"参":{"docs":{},"数":{"docs":{},"打":{"docs":{},"印":{"docs":{},"出":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}},"值":{"docs":{},"获":{"docs":{},"取":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"索":{"docs":{},"引":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"节":{"docs":{},"点":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"节":{"docs":{},"点":{"docs":{},"所":{"docs":{},"在":{"docs":{},"方":{"docs":{},"向":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}},"清":{"docs":{},"空":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"组":{"docs":{},"件":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"树":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}},"内":{"docs":{},"容":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"移":{"docs":{},"除":{"docs":{},"制":{"docs":{},"定":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}},"指":{"docs":{},"定":{"docs":{},"索":{"docs":{},"引":{"docs":{},"处":{"docs":{},"的":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"获":{"docs":{},"取":{"docs":{},"所":{"docs":{},"有":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}},"未":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}},"的":{"docs":{},"叶":{"docs":{},"子":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}},"叶":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}},"选":{"docs":{},"项":{"docs":{},"值":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}},"没":{"docs":{},"有":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}}},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}},"最":{"docs":{},"大":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}},"最":{"docs":{},"大":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}},"导":{"docs":{},"航":{"docs":{},"页":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"项":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"搜":{"docs":{},"索":{"docs":{},"关":{"docs":{},"键":{"docs":{},"词":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"数":{"docs":{},"组":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"列":{"docs":{},"表":{"docs":{},"栏":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863}}}}}}}},"组":{"docs":{},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"宽":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"高":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}},"框":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"次":{"docs":{},"输":{"docs":{},"入":{"docs":{},"的":{"docs":{},"有":{"docs":{},"效":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}},"样":{"docs":{},"式":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"域":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}},"样":{"docs":{},"式":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}},"图":{"docs":{},"片":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"错":{"docs":{},"误":{"docs":{},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"公":{"docs":{},"式":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"可":{"docs":{},"用":{"docs":{},"字":{"docs":{},"段":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}},"列":{"docs":{},"项":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"右":{"docs":{},"往":{"docs":{},"左":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"左":{"docs":{},"到":{"docs":{},"右":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"浏":{"docs":{},"览":{"docs":{},"器":{"docs":{},"中":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"列":{"docs":{},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"页":{"docs":{},"码":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}},"计":{"docs":{},"算":{"docs":{},"后":{"docs":{},"的":{"docs":{},"列":{"docs":{},"项":{"docs":{},"上":{"docs":{},"下":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}},"间":{"docs":{},"隙":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},"码":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"选":{"docs":{},"中":{"docs":{},"项":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}},"的":{"docs":{},"i":{"docs":{},"d":{"docs":{},"属":{"docs":{},"性":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.02040816326530612}}}}}}}}}}}}}},"未":{"docs":{},"选":{"docs":{},"中":{"docs":{},"植":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}},"的":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}},"水":{"docs":{},"平":{"docs":{},"向":{"docs":{},"页":{"docs":{},"码":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}},"需":{"docs":{},"要":{"docs":{},"拷":{"docs":{},"贝":{"docs":{},"的":{"docs":{},"值":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}},"值":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"得":{"docs":{},"列":{"docs":{},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"计":{"docs":{},"算":{"docs":{},"后":{"docs":{},"的":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}},"所":{"docs":{},"以":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"有":{"docs":{},"叶":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"垂":{"docs":{},"直":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"水":{"docs":{},"平":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"根":{"docs":{},"据":{"docs":{},"给":{"docs":{},"定":{"docs":{},"的":{"docs":{},"点":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"返":{"docs":{},"回":{"docs":{},"元":{"docs":{},"素":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.02247191011235955}}}}}}}}}}}}}}},"见":{"docs":{},"上":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}},"选":{"docs":{},"择":{"docs":{},"类":{"docs":{},"型":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}},"文":{"docs":{},"件":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}},"列":{"docs":{},"表":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"中":{"docs":{},"了":{"docs":{},"就":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"取":{"docs":{},"消":{"docs":{},",":{"docs":{},"与":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"的":{"docs":{},"区":{"docs":{},"别":{"docs":{},"是":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"不":{"docs":{},"影":{"docs":{},"响":{"docs":{},"事":{"docs":{},"件":{"docs":{},"的":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"状":{"docs":{},"态":{"docs":{},"下":{"docs":{},"是":{"docs":{},"否":{"docs":{},"显":{"docs":{},"示":{"docs":{},"阴":{"docs":{},"影":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}},"日":{"docs":{},"期":{"docs":{},"或":{"docs":{},"者":{"docs":{},"退":{"docs":{},"出":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142}}}}}}}}}}}}}},"的":{"docs":{},"初":{"docs":{},"始":{"docs":{},"年":{"docs":{},"月":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}},"色":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}},"销":{"docs":{},"毁":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"事":{"docs":{},"件":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}}}},"渲":{"docs":{},"染":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014705882352941176},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}},"组":{"docs":{},"件":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"构":{"docs":{},"造":{"docs":{},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}},"生":{"docs":{},"成":{"docs":{},"树":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007407407407407408},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}},"命":{"docs":{},"周":{"docs":{},"期":{"docs":{},"函":{"docs":{},"数":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}},"(":{"docs":{},")":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018867924528301886},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}},"i":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},")":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}},"v":{"docs":{},")":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.013793103448275862}}}},"注":{"docs":{},":":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"f":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"l":{"docs":{},"y":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"s":{"docs":{},"r":{"docs":{},"c":{"docs":{},",":{"docs":{},"x":{"docs":{},",":{"docs":{},"y":{"docs":{},",":{"docs":{},"w":{"docs":{},",":{"docs":{},"h":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"图":{"docs":{},"片":{"docs":{},"路":{"docs":{},"径":{"docs":{},",":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"原":{"docs":{},"点":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"画":{"docs":{},"布":{"docs":{},"宽":{"docs":{},"高":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}},"x":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"y":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.02247191011235955}}},",":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"半":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}},"x":{"docs":{},",":{"docs":{},"r":{"docs":{},"y":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"水":{"docs":{},"平":{"docs":{},"半":{"docs":{},"径":{"docs":{},"和":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"半":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"原":{"docs":{},"点":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"以":{"docs":{},"及":{"docs":{},"要":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"w":{"docs":{},",":{"docs":{},"h":{"docs":{},",":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"左":{"docs":{},"上":{"docs":{},"角":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{},"、":{"docs":{},"以":{"docs":{},"及":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"的":{"docs":{},"圆":{"docs":{},"角":{"docs":{},"b":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"左":{"docs":{},"上":{"docs":{},"角":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{},"、":{"docs":{},"以":{"docs":{},"及":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"颜":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"f":{"docs":{},"i":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"原":{"docs":{},"点":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"以":{"docs":{},"及":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"宽":{"docs":{},"高":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"是":{"docs":{},"否":{"docs":{},"根":{"docs":{},"据":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"进":{"docs":{},"行":{"docs":{},"调":{"docs":{},"整":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},",":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"docs":{}}}}},"事":{"docs":{},"件":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.012987012987012988},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010582010582010581},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.03125},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010256410256410256},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010416666666666666},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.019417475728155338},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.018867924528301886},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.07142857142857142},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.07142857142857142},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.034482758620689655}},"名":{"docs":{},"称":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"方":{"docs":{},"法":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"详":{"docs":{},"见":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}}}}},"事":{"docs":{},"件":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}},"还":{"docs":{},"原":{"docs":{},"列":{"docs":{},"表":{"docs":{},"设":{"docs":{},"置":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.006493506493506494},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282}}}}}}}},"%":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}},"*":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014492753623188406}}},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},".":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"o":{"docs":{},"r":{"docs":{},"(":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}}}}},"s":{"docs":{},"k":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},"层":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"x":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},":":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"r":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"u":{"docs":{},"p":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":10.035714285714286}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.03571428571428571}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}}},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/message.html":{"ref":"base/message.html","tf":10}},"e":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.0851063829787234}}}}}}}},"r":{"docs":{},"g":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"r":{"docs":{},"u":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":10}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":10}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":10.028571428571428}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":10}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":10}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":10}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":10}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"}":{"docs":{},")":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}},"x":{"1":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"2":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"y":{"2":{"docs":{},".":{"docs":{},".":{"docs":{},".":{"docs":{},")":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}},"docs":{}}}},"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}}},"y":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}},"为":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{},"分":{"docs":{},"支":{"docs":{},"到":{"docs":{},"x":{"1":{"docs":{},",":{"docs":{},"y":{"1":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}}}},"docs":{}}}}}}}}}}},"1":{"docs":{},")":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"2":{"docs":{},")":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.007246376811594203}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":10.025}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":10.035714285714286}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":10.035714285714286}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}},"+":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.038461538461538464},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.021897810218978103}}},"组":{"docs":{},"件":{"docs":{},"挂":{"docs":{},"载":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.01282051282051282},"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}},"之":{"docs":{},"前":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"实":{"docs":{},"例":{"docs":{},"刚":{"docs":{},"被":{"docs":{},"创":{"docs":{},"建":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}},"创":{"docs":{},"建":{"docs":{},"完":{"docs":{},"成":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}},"更":{"docs":{},"新":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"销":{"docs":{},"毁":{"docs":{},"前":{"docs":{},"调":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"后":{"docs":{},"调":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"|":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.033816425120772944},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.051094890510948905},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.07446808510638298},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.046052631578947366}}},"下":{"docs":{},"拉":{"docs":{},"列":{"docs":{},"表":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}},"收":{"docs":{},"起":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}},"的":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"方":{"docs":{},"式":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}},"框":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}},"展":{"docs":{},"开":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"收":{"docs":{},"起":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}},"的":{"docs":{},"多":{"docs":{},"选":{"docs":{},"版":{"docs":{},"本":{"docs":{},",":{"docs":{},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"带":{"docs":{},"有":{"docs":{},"若":{"docs":{},"干":{"docs":{},"按":{"docs":{},"钮":{"docs":{},",":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}}}}}}}}}}},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}}}}},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"切":{"docs":{},"换":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"显":{"docs":{},"示":{"docs":{},"或":{"docs":{},"隐":{"docs":{},"藏":{"docs":{},"面":{"docs":{},"板":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}}}}}}}}}}}}}}},"类":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"开":{"docs":{},"启":{"docs":{},"或":{"docs":{},"者":{"docs":{},"隐":{"docs":{},"藏":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}}}}}},"始":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"上":{"docs":{},"传":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}},"绘":{"docs":{},"制":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"弹":{"docs":{},"出":{"docs":{},"列":{"docs":{},"表":{"docs":{},"和":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"关":{"docs":{},"系":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"距":{"docs":{},"离":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.010638297872340425},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},"显":{"docs":{},"示":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"最":{"docs":{},"大":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}},"框":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}},"窗":{"docs":{},"层":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"显":{"docs":{},"示":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}},"内":{"docs":{},"容":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}},"页":{"docs":{},"码":{"docs":{},"的":{"docs":{},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"调":{"docs":{},"整":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}},"横":{"docs":{},"向":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"纵":{"docs":{},"向":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}}}},"高":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"搜":{"docs":{},"索":{"docs":{},"列":{"docs":{},"表":{"docs":{},"栏":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}},"表":{"docs":{},"格":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}},"头":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}},"重":{"docs":{},"置":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}},"列":{"docs":{},"表":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}},"高":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"次":{"docs":{},"输":{"docs":{},"入":{"docs":{},"的":{"docs":{},"有":{"docs":{},"效":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}}}}},"画":{"docs":{},"布":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"新":{"docs":{},"设":{"docs":{},"置":{"docs":{},"高":{"docs":{},"度":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"心":{"docs":{},"偏":{"docs":{},"移":{"docs":{},"量":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}},"阻":{"docs":{},"止":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"冒":{"docs":{},"泡":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}},"冒":{"docs":{},"泡":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"隐":{"docs":{},"藏":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}},"窗":{"docs":{},"层":{"docs":{},"是":{"docs":{},"否":{"docs":{},"销":{"docs":{},"毁":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004830917874396135}}}}}}}}}}},"展":{"docs":{},"开":{"docs":{},"类":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}},"某":{"docs":{},"个":{"docs":{},"可":{"docs":{},"以":{"docs":{},"展":{"docs":{},"开":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005}}}}}}}}}}}}}}}}}}}}}}},"节":{"docs":{},"点":{"docs":{},"是":{"docs":{},"否":{"docs":{},"展":{"docs":{},"开":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"收":{"docs":{},"起":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"数":{"docs":{},"组":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}},"判":{"docs":{},"断":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},",":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"s":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.01694915254237288},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},",":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"s":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"该":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"前":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}},"函":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"怎":{"docs":{},"么":{"docs":{},"点":{"docs":{},"击":{"docs":{},"都":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"即":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"让":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"显":{"docs":{},"示":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}},"组":{"docs":{},"件":{"docs":{},"是":{"docs":{},"否":{"docs":{},"挂":{"docs":{},"载":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}},"节":{"docs":{},"点":{"docs":{},"是":{"docs":{},"否":{"docs":{},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}},"加":{"docs":{},"载":{"docs":{},"中":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644},"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.00847457627118644}}}}}}}}}}}}}},"完":{"docs":{},"毕":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}},"成":{"docs":{},"的":{"docs":{},"回":{"docs":{},"调":{"docs":{},"(":{"docs":{},"测":{"docs":{},"试":{"docs":{},"了":{"docs":{},"无":{"docs":{},"效":{"docs":{},"果":{"docs":{},")":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}}},"回":{"docs":{},"调":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"结":{"docs":{},"构":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}},"创":{"docs":{},"建":{"docs":{},"卡":{"docs":{},"导":{"docs":{},"航":{"docs":{},"页":{"docs":{},"页":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}}}}}}},"导":{"docs":{},"航":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}}}}}}}}}}},"页":{"docs":{},"展":{"docs":{},"示":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}}}}}}},"挂":{"docs":{},"载":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}}},"面":{"docs":{},"板":{"docs":{},"显":{"docs":{},"示":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"前":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"构":{"docs":{},"造":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005}}}},"器":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.0072992700729927005},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.006896551724137931}}}}},"切":{"docs":{},"换":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"展":{"docs":{},"开":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"收":{"docs":{},"起":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"隐":{"docs":{},"藏":{"docs":{},"之":{"docs":{},"前":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"后":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}},"s":{"docs":{},":":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}},",":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},":":{"docs":{},"键":{"docs":{},",":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},":":{"docs":{},"值":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}},":":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"停":{"docs":{},"止":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"框":{"docs":{},"为":{"docs":{},"空":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},"即":{"docs":{},"是":{"docs":{},"否":{"docs":{},"保":{"docs":{},"持":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"面":{"docs":{},"板":{"docs":{},"和":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"面":{"docs":{},"板":{"docs":{},"状":{"docs":{},"态":{"docs":{},"值":{"docs":{},"的":{"docs":{},"统":{"docs":{},"一":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}}}}}}}}}}}}},"搜":{"docs":{},"索":{"docs":{},"中":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},"列":{"docs":{},"表":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"暂":{"docs":{},"停":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"文":{"docs":{},"本":{"docs":{},"以":{"docs":{},"空":{"docs":{},"白":{"docs":{},"字":{"docs":{},"符":{"docs":{},"结":{"docs":{},"尾":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}}}}},"结":{"docs":{},"果":{"docs":{},"面":{"docs":{},"板":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"完":{"docs":{},"成":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"逻":{"docs":{},"辑":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}},"面":{"docs":{},"板":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}},"框":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669}}}}},"暂":{"docs":{},"停":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"输":{"docs":{},"入":{"docs":{},"空":{"docs":{},"白":{"docs":{},"字":{"docs":{},"符":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}},"正":{"docs":{},"在":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"加":{"docs":{},"载":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.00684931506849315}}}}}},"=":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}},"z":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},"在":{"1":{"0":{"0":{"0":{"docs":{},"w":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}}}}}},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"关":{"docs":{},"闭":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}},"键":{"docs":{},"字":{"docs":{},"标":{"docs":{},"红":{"docs":{},"字":{"docs":{},"符":{"docs":{},"串":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}},"联":{"docs":{},"视":{"docs":{},"图":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"打":{"docs":{},"开":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}}},"值":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{},"的":{"docs":{},"方":{"docs":{},"向":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.005952380952380952}}}}}}}},"完":{"docs":{},"全":{"docs":{},"匹":{"docs":{},"配":{"docs":{},"的":{"docs":{},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009433962264150943}}}}}}}}},"成":{"docs":{},"拷":{"docs":{},"贝":{"docs":{},"后":{"docs":{},"执":{"docs":{},"行":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}}},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"需":{"docs":{},"要":{"docs":{},"在":{"docs":{},"设":{"docs":{},"置":{"docs":{},"状":{"docs":{},"态":{"docs":{},"后":{"docs":{},"做":{"docs":{},"的":{"docs":{},"额":{"docs":{},"外":{"docs":{},"工":{"docs":{},"作":{"docs":{},"可":{"docs":{},"以":{"docs":{},"通":{"docs":{},"过":{"docs":{},"重":{"docs":{},"写":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"来":{"docs":{},"实":{"docs":{},"现":{"docs":{},")":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}},"n":{"docs":{},"h":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"r":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}},"属":{"docs":{},"性":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"所":{"docs":{},"有":{"docs":{},"控":{"docs":{},"件":{"docs":{},"的":{"docs":{},"超":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}},"简":{"docs":{},"单":{"docs":{},"控":{"docs":{},"件":{"docs":{},"的":{"docs":{},"基":{"docs":{},"类":{"docs":{},",":{"docs":{},"类":{"docs":{},"的":{"docs":{},"控":{"docs":{},"制":{"docs":{},",":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{},"e":{"docs":{},"的":{"docs":{},"控":{"docs":{},"制":{"docs":{},",":{"docs":{},"文":{"docs":{},"字":{"docs":{},"超":{"docs":{},"过":{"docs":{},"边":{"docs":{},"界":{"docs":{},"显":{"docs":{},"示":{"3":{"docs":{},"个":{"docs":{},"点":{"docs":{},",":{"docs":{},"c":{"docs":{},"u":{"docs":{},"r":{"docs":{},"s":{"docs":{},"o":{"docs":{},"r":{"docs":{},"默":{"docs":{},"认":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"扩":{"docs":{},"展":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}}}}}}}},"数":{"docs":{},"据":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}},"值":{"docs":{},"微":{"docs":{},"调":{"docs":{},"器":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}},"区":{"docs":{},"间":{"docs":{},"控":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}},"添":{"docs":{},"加":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.005154639175257732}}}},"字":{"docs":{},"段":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"对":{"docs":{},"象":{"docs":{},"到":{"docs":{},"j":{"docs":{},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{},"数":{"docs":{},"组":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}},"取":{"docs":{},"消":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"标":{"docs":{},"红":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"高":{"docs":{},"亮":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"标":{"docs":{},"红":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}},"恢":{"docs":{},"复":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}}}}}}}}}}}}}}}}},"这":{"docs":{},"仅":{"docs":{},"仅":{"docs":{},"只":{"docs":{},"是":{"docs":{},"一":{"docs":{},"个":{"docs":{},"超":{"docs":{},"类":{"docs":{},",":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}},"错":{"docs":{},"误":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"提":{"docs":{},"示":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}}}},"信":{"docs":{},"息":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"无":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.03508771929824561}},"论":{"docs":{},"怎":{"docs":{},"么":{"docs":{},"点":{"docs":{},"击":{"docs":{},"都":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"一":{"docs":{},"次":{"docs":{},"选":{"docs":{},"中":{"docs":{},"有":{"docs":{},"效":{"docs":{},",":{"docs":{},"再":{"docs":{},"点":{"docs":{},"无":{"docs":{},"效":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"后":{"docs":{},"失":{"docs":{},"效":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"级":{"docs":{},"节":{"docs":{},"点":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"之":{"docs":{},"前":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"回":{"docs":{},"调":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"即":{"docs":{},"选":{"docs":{},"中":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"不":{"docs":{},"在":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{},"时":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{},"事":{"docs":{},"件":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}},"清":{"docs":{},"空":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"增":{"docs":{},"加":{"docs":{},"/":{"docs":{},"减":{"docs":{},"少":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"或":{"docs":{},"者":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"确":{"docs":{},"定":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}},"二":{"docs":{},"级":{"docs":{},"节":{"docs":{},"点":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}},"确":{"docs":{},"定":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}},"认":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}},"取":{"docs":{},"消":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}},"绑":{"docs":{},"定":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"被":{"docs":{},"选":{"docs":{},"元":{"docs":{},"素":{"docs":{},"要":{"docs":{},"触":{"docs":{},"发":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"返":{"docs":{},"回":{"docs":{},"该":{"docs":{},"对":{"docs":{},"象":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"不":{"docs":{},"仅":{"docs":{},"有":{"docs":{},"选":{"docs":{},"中":{"docs":{},"状":{"docs":{},"态":{"docs":{},"而":{"docs":{},"且":{"docs":{},"有":{"docs":{},"展":{"docs":{},"开":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}},"考":{"docs":{},"虑":{"docs":{},"超":{"docs":{},"出":{"docs":{},"边":{"docs":{},"界":{"docs":{},"的":{"docs":{},"情":{"docs":{},"况":{"docs":{},",":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}}},"变":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266}}}}}},"表":{"docs":{},"示":{"docs":{},"一":{"docs":{},"个":{"docs":{},"可":{"docs":{},"以":{"docs":{},"展":{"docs":{},"开":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}},"头":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"行":{"docs":{},"高":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"尾":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"行":{"docs":{},"高":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"关":{"docs":{},"联":{"docs":{},"树":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}},"当":{"docs":{},"没":{"docs":{},"有":{"docs":{},"元":{"docs":{},"素":{"docs":{},"时":{"docs":{},"有":{"docs":{},"提":{"docs":{},"示":{"docs":{},"信":{"docs":{},"息":{"docs":{},"的":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},",":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"前":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}},"状":{"docs":{},"态":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{},"(":{"docs":{},"输":{"docs":{},"入":{"docs":{},"是":{"docs":{},"否":{"docs":{},"合":{"docs":{},"法":{"docs":{},",":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}},"检":{"docs":{},"查":{"docs":{},"是":{"docs":{},"否":{"docs":{},"为":{"docs":{},"空":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.02040816326530612}}}}}}}},"在":{"docs":{},"未":{"docs":{},"知":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"和":{"docs":{},"高":{"docs":{},"度":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}}}}}}}}},"提":{"docs":{},"示":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}}}},"类":{"docs":{},"型":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}},"性":{"docs":{},"信":{"docs":{},"息":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":10.011363636363637}}}}}}},"灰":{"docs":{},"化":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315}}}},"空":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.0273972602739726}}},"需":{"docs":{},"要":{"docs":{},"设":{"docs":{},"置":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.0136986301369863},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011627906976744186},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.01904761904761905}}}}}}},"标":{"docs":{},"签":{"docs":{},"样":{"docs":{},"式":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}},"域":{"docs":{},"样":{"docs":{},"式":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}},"高":{"docs":{},"度":{"docs":{},"值":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}}}}}}}},"高":{"docs":{},"级":{"docs":{},"属":{"docs":{},"性":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.00684931506849315},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}},"度":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.012658227848101266},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.0136986301369863},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}}}}}}},"气":{"docs":{},"泡":{"docs":{},"提":{"docs":{},"示":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"显":{"docs":{},"示":{"docs":{},"位":{"docs":{},"置":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"内":{"docs":{},"容":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}},"高":{"docs":{},"度":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}},"消":{"docs":{},"息":{"docs":{},"提":{"docs":{},"示":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"确":{"docs":{},"认":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"定":{"docs":{},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"b":{"docs":{},"l":{"docs":{},"u":{"docs":{},"r":{"docs":{},"时":{"docs":{},"且":{"docs":{},"输":{"docs":{},"入":{"docs":{},"值":{"docs":{},"有":{"docs":{},"效":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}}}}}}},"警":{"docs":{},"告":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}},"图":{"docs":{},"标":{"docs":{},"类":{"docs":{},"型":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}}}}}}}}}}}}}}}}}}},"宽":{"docs":{},"度":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"按":{"docs":{},"钮":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}}}}}}},"片":{"docs":{},"的":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}}}}}}}}}}}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"宽":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}}}}}},"按":{"docs":{},"钮":{"docs":{},"文":{"docs":{},"本":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}},"高":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}},"内":{"docs":{},"容":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009523809523809525}}}}}},"类":{"docs":{},"型":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}}},"组":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}},"下":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}},"空":{"docs":{},"格":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"键":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128}}}}}},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}},",":{"docs":{},"如":{"docs":{},"果":{"docs":{},"b":{"docs":{},"l":{"docs":{},"o":{"docs":{},"c":{"docs":{},"k":{"docs":{},"/":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"中":{"docs":{},"某":{"docs":{},"一":{"docs":{},"项":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"此":{"docs":{},"项":{"docs":{},"值":{"docs":{},"为":{"0":{"docs":{},",":{"docs":{},"否":{"docs":{},"则":{"docs":{},"为":{"9":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005813953488372093}}},"docs":{}},"docs":{}}}}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"列":{"docs":{},"宽":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"值":{"docs":{},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}},"大":{"docs":{},"可":{"docs":{},"选":{"docs":{},"数":{"docs":{},"量":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}},"列":{"docs":{},"宽":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"宽":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}},"高":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.0078125}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"值":{"docs":{},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},",":{"docs":{},"在":{"docs":{},"万":{"docs":{},"不":{"docs":{},"得":{"docs":{},"已":{"docs":{},"时":{"docs":{},"才":{"docs":{},"会":{"docs":{},"调":{"docs":{},"用":{"docs":{},"这":{"docs":{},"个":{"docs":{},"函":{"docs":{},"数":{"docs":{},"获":{"docs":{},"取":{"docs":{},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"页":{"docs":{},"码":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":10.035714285714286}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"为":{"docs":{},"空":{"docs":{},"时":{"docs":{},"按":{"docs":{},"下":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}},"值":{"docs":{},"无":{"docs":{},"效":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"有":{"docs":{},"效":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"框":{"docs":{},"为":{"docs":{},"空":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"类":{"docs":{},"型":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291}}}}},"较":{"docs":{},"验":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005291005291005291},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005208333333333333},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}},"代":{"docs":{},"码":{"docs":{},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}},"插":{"docs":{},"入":{"docs":{},"参":{"docs":{},"数":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"字":{"docs":{},"符":{"docs":{},"串":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}},"函":{"docs":{},"数":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}},"操":{"docs":{},"作":{"docs":{},"符":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}},"多":{"docs":{},"文":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015625}}}}}}}}}}}}}}},"层":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"列":{"docs":{},"表":{"docs":{},"的":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}},"级":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"单":{"docs":{},"选":{"docs":{},"树":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}},"可":{"docs":{},"选":{"docs":{},"节":{"docs":{},"点":{"docs":{},"树":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}},"公":{"docs":{},"式":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010638297872340425}}}}}}}}}}}}}}}}}}},"合":{"docs":{},"并":{"docs":{},"的":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"列":{"docs":{},"号":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"规":{"docs":{},"则":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"得":{"docs":{},"到":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"时":{"docs":{},"合":{"docs":{},"并":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"普":{"docs":{},"通":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"能":{"docs":{},"处":{"docs":{},"理":{"docs":{},"静":{"docs":{},"态":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"以":{"docs":{},"及":{"docs":{},"动":{"docs":{},"态":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"表":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}},"储":{"docs":{},"存":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}},"冻":{"docs":{},"结":{"docs":{},"列":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}},"的":{"docs":{},"列":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"号":{"docs":{},",":{"docs":{},"从":{"0":{"docs":{},"开":{"docs":{},"始":{"docs":{},",":{"docs":{},"i":{"docs":{},"s":{"docs":{},"n":{"docs":{},"e":{"docs":{},"e":{"docs":{},"d":{"docs":{},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{},"e":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}}}}}}},"存":{"docs":{},"储":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}},"数":{"docs":{},"据":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052}}}}}},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006578947368421052}}}}}}}}}}}}},"保":{"docs":{},"存":{"docs":{},"表":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}},"j":{"docs":{},"u":{"docs":{},"m":{"docs":{},"p":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"主":{"docs":{},"要":{"docs":{},"作":{"docs":{},"用":{"docs":{},"于":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"方":{"docs":{},"法":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}},"计":{"docs":{},"数":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"表":{"docs":{},"格":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"选":{"docs":{},"项":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"第":{"docs":{},"一":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"若":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},",":{"docs":{},"则":{"docs":{},"指":{"docs":{},"对":{"docs":{},"其":{"docs":{},"设":{"docs":{},"置":{"docs":{},"使":{"docs":{},"能":{"docs":{},"状":{"docs":{},"态":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}},"连":{"docs":{},"续":{"docs":{},"显":{"docs":{},"示":{"docs":{},"分":{"docs":{},"页":{"docs":{},"数":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}},"页":{"docs":{},"数":{"docs":{},"跳":{"docs":{},"转":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"码":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}},".":{"docs":{},"a":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"(":{"docs":{},"{":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{},":":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}},".":{"docs":{},".":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}},"结":{"docs":{},"束":{"docs":{},"绘":{"docs":{},"制":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"绘":{"docs":{},"制":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"图":{"docs":{},"片":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"圆":{"docs":{},"形":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"形":{"docs":{},"状":{"docs":{},"的":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"文":{"docs":{},"本":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"椭":{"docs":{},"圆":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"矩":{"docs":{},"形":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"路":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"渐":{"docs":{},"变":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"线":{"docs":{},"段":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"树":{"docs":{},"枝":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}},"通":{"docs":{},"过":{"docs":{},"给":{"docs":{},"定":{"docs":{},"的":{"docs":{},"参":{"docs":{},"数":{"docs":{},"在":{"docs":{},"已":{"docs":{},"注":{"docs":{},"册":{"docs":{},"的":{"docs":{},"字":{"docs":{},"体":{"docs":{},"中":{"docs":{},"找":{"docs":{},"到":{"docs":{},"字":{"docs":{},"体":{"docs":{},"对":{"docs":{},"象":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}},"鼠":{"docs":{},"标":{"docs":{},"或":{"docs":{},"键":{"docs":{},"盘":{"docs":{},"输":{"docs":{},"入":{"docs":{},"字":{"docs":{},"符":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.009900990099009901}}}}}}}}}}}},"用":{"docs":{},"按":{"docs":{},"钮":{"docs":{"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":10}},",":{"docs":{},"详":{"docs":{},"情":{"docs":{},"见":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":0.5}}}}}}}}}}}}}}}}}}},"填":{"docs":{},"充":{"docs":{},"中":{"docs":{},"空":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"实":{"docs":{},"心":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}},"复":{"docs":{},"选":{"docs":{},"框":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}}}}}},"杂":{"docs":{},"的":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"绘":{"docs":{},"图":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}}}},"标":{"docs":{},"红":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.01818181818181818},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}},"题":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}},"带":{"docs":{},"标":{"docs":{},"记":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.005128205128205128},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}}}}},"有":{"docs":{},"标":{"docs":{},"题":{"docs":{},"栏":{"docs":{},"的":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.01639344262295082}}}}}}}}}}}}}}}}}}}}}}}},"清":{"docs":{},"除":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943}}}}}}}}}},"确":{"docs":{},"定":{"docs":{},"的":{"docs":{},"复":{"docs":{},"选":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.02857142857142857}}}}}}}}}},"方":{"docs":{},"向":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{},"选":{"docs":{},"择":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}}},"记":{"docs":{},"录":{"docs":{},"状":{"docs":{},"态":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}}}}}}}},"替":{"docs":{},"换":{"docs":{},"内":{"docs":{},"容":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"为":{"docs":{},"新":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}},"懒":{"docs":{},"加":{"docs":{},"载":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}},"为":{"docs":{},"解":{"docs":{},"决":{"docs":{},"排":{"docs":{},"序":{"docs":{},"问":{"docs":{},"题":{"docs":{},"引":{"docs":{},"入":{"docs":{},"的":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425}}}}}}}}}}}}}},"恶":{"docs":{},"心":{"docs":{},"的":{"docs":{},"加":{"docs":{},"载":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010638297872340425}}}}}}}}}},"排":{"docs":{},"序":{"docs":{},"列":{"docs":{},"表":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"触":{"docs":{},"发":{"docs":{},"器":{"docs":{},"宽":{"docs":{},"度":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}},"退":{"docs":{},"出":{"docs":{},"时":{"docs":{},"验":{"docs":{},"证":{"docs":{},"函":{"docs":{},"数":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}},"验":{"docs":{},"证":{"docs":{},"函":{"docs":{},"数":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"去":{"docs":{},"掉":{"docs":{},"所":{"docs":{},"有":{"docs":{},"内":{"docs":{},"容":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}},"异":{"docs":{},"步":{"docs":{},"树":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}},"摧":{"docs":{},"毁":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}},"表":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"配":{"docs":{},"置":{"docs":{},"项":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"简":{"docs":{},"单":{"docs":{},"的":{"docs":{},"多":{"docs":{},"选":{"docs":{},"树":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}},"二":{"docs":{},"级":{"docs":{},"树":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}},"参":{"docs":{},"数":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"可":{"docs":{},"选":{"docs":{},"节":{"docs":{},"点":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"树":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{},",":{"docs":{},"每":{"docs":{},"个":{"docs":{},"元":{"docs":{},"素":{"docs":{},"代":{"docs":{},"表":{"docs":{},"一":{"docs":{},"条":{"docs":{},"路":{"docs":{},"径":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}},",":{"docs":{},"相":{"docs":{},"较":{"docs":{},"于":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"多":{"docs":{},"一":{"docs":{},"个":{"docs":{},"属":{"docs":{},"性":{"docs":{},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"来":{"docs":{},"指":{"docs":{},"定":{"docs":{},"方":{"docs":{},"向":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02127659574468085}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"交":{"docs":{},"叉":{"docs":{},"表":{"docs":{},"头":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"内":{"docs":{},"容":{"docs":{},"二":{"docs":{},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"项":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"键":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"树":{"docs":{},"状":{"docs":{},"结":{"docs":{},"构":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}}}}},"层":{"docs":{},"级":{"docs":{},"树":{"docs":{},"状":{"docs":{},"结":{"docs":{},"构":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}},"总":{"docs":{},"行":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"页":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"有":{"docs":{},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{},"和":{"docs":{},"总":{"docs":{},"行":{"docs":{},"数":{"docs":{},"的":{"docs":{},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}},"日":{"docs":{},"历":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"期":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"(":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"的":{"docs":{},"年":{"docs":{},"月":{"docs":{},"选":{"docs":{},"择":{"docs":{},"可":{"docs":{},"以":{"docs":{},"进":{"docs":{},"一":{"docs":{},"步":{"docs":{},"选":{"docs":{},"择":{"docs":{},"日":{"docs":{},"期":{"docs":{},")":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705}}}}}}}}}}}}}}}}}}},"可":{"docs":{},"以":{"docs":{},"选":{"docs":{},"择":{"docs":{},"时":{"docs":{},"分":{"docs":{},"秒":{"docs":{},")":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}},"的":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"面":{"docs":{},"板":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}}}}}}}},"剪":{"docs":{},"切":{"docs":{},"板":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}},"(":{"docs":{},"以":{"docs":{},"x":{"0":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}}}},"各":{"docs":{},"种":{"docs":{},"s":{"docs":{},"e":{"docs":{},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.010638297872340425},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":10.009345794392523}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":10.01063829787234}}}}}},"节":{"docs":{},"点":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":10.00925925925926}}}}}}}}}},"三":{"docs":{},"级":{"docs":{},"参":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"其":{"docs":{},"他":{"docs":{},"事":{"docs":{},"件":{"docs":{},"详":{"docs":{},"见":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.009708737864077669}}}}}}}},"i":{"docs":{},"n":{"docs":{},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.009433962264150943},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.017241379310344827}}}}}}}}}}}}},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{},",":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}},"年":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}},"月":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.03571428571428571}}}}}}}},"季":{"docs":{},"度":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03571428571428571}}}}}}}}}},"限":{"docs":{},"定":{"docs":{},"可":{"docs":{},"选":{"docs":{},"日":{"docs":{},"期":{"docs":{},"的":{"docs":{},"上":{"docs":{},"限":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}},"下":{"docs":{},"限":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02857142857142857}}}}}}}}}}},"月":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}},"季":{"docs":{},"度":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}},"具":{"docs":{},"体":{"docs":{},"配":{"docs":{},"置":{"docs":{},"方":{"docs":{},"法":{"docs":{},"见":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"不":{"docs":{},"合":{"docs":{},"法":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}}},"合":{"docs":{},"法":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}},"是":{"docs":{},"否":{"docs":{},"成":{"docs":{},"立":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017543859649122806}}}}}}}}},"路":{"docs":{},"径":{"docs":{},"选":{"docs":{},"择":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.02040816326530612}}}}}}},"length":9120},"corpusTokens":["\"","\"\"","\"\",","\"\"]","\"\"],","\"\"}","\"#wrapper\",","\"+\"","\".\"","\"0\",","\"0fbd0dc648f41e97\",","\"1\"","\"1\",","\"100%\"","\"100%\",","\"11\",","\"12\",","\"123\",","\"1f4711c201ef1842\",","\"2\",","\"3\"","\"3\",","\"456\",","\"5\"","\"8c4460bc3605685e\",","\"a\"","\"a\");","\"a\",","\"a1\",","\"a1字段\"},","\"aaa\"","\"aaa\",","\"aba\"","\"aba\",","\"acc\"","\"acc\",","\"auto\"","\"b\",","\"b2\",","\"b2...\",","\"b2字段\"","\"bbb\"","\"bbb\",","\"bi","\"bi.absolute\",","\"bi.adaptive_table\",","\"bi.arrow_group_node\",","\"bi.branch_relation\",","\"bi.branch_tree\",","\"bi.bubble_combo\",","\"bi.button\",","\"bi.button_group\"","\"bi.button_group\",","\"bi.button_group\",behaviors:","\"bi.button_group\",items:","\"bi.button_tree\",","\"bi.button_tree\",choosetype:","\"bi.canvas\",","\"bi.center\",","\"bi.center\",hgap:","\"bi.center_adapt\",","\"bi.code_editor\",","\"bi.collection_table\",","\"bi.collection_view\",","\"bi.color_chooser\",","\"bi.combo\",","\"bi.complex_canvas\",","\"bi.custom_date_time_combo\",","\"bi.custom_tree\",","\"bi.custom_tree\"}}","\"bi.date_combo\",","\"bi.date_pane_widget\",","\"bi.direction_path_chooser\",","\"bi.display_tree\",","\"bi.editor\",","\"bi.editor_trigger\",","\"bi.excel_table\",","\"bi.file_manager\",","\"bi.formula_editor\",","\"bi.grid_table\",","\"bi.grid_view\",","\"bi.handstand_branch_tree\",","\"bi.horizontal_adapt\",","\"bi.horizontal_auto\",","\"bi.horizontal_float\",","\"bi.htape\",","\"bi.icon_combo\",","\"bi.icon_text_icon_item\",","\"bi.icon_text_item\",","\"bi.icon_trigger\",","\"bi.label\",","\"bi.label\"},","\"bi.label\"}}","\"bi.layer_tree_table\",","\"bi.lazy_loader\",","\"bi.left\",","\"bi.level_tree\",","\"bi.list_loader\",","\"bi.multi_popup_view\",","\"bi.multi_select_combo\",","\"bi.multi_select_item\",","\"bi.multi_tree_combo\",","\"bi.multifile_editor\",","\"bi.multilayer_select_tree_combo\",","\"bi.multilayer_single_tree_combo\",","\"bi.navigation\",","\"bi.numerical_interval\",","\"bi.page_table\",","\"bi.pager\",","\"bi.panel\",","\"bi.path_chooser\",","\"bi.plus_group_node\",","\"bi.popup_panel\",","\"bi.popup_view\",","\"bi.preview_table\",","\"bi.relation_view\",","\"bi.resizable_table\",","\"bi.responsive_table\",","\"bi.right\",","\"bi.search_editor\"}","\"bi.searcher\",","\"bi.searcher_view\",","\"bi.searcher_view\"}","\"bi.segment\",","\"bi.select_list\",","\"bi.select_tree_combo\",","\"bi.shelter_editor\",","\"bi.sign_editor\",","\"bi.sign_initial_editor\",","\"bi.simple_tree\",","\"bi.single_select_item\",","\"bi.single_select_radio_item\",","\"bi.single_tree_combo\",","\"bi.sort_list\",","\"bi.state_editor\",","\"bi.static_combo\",","\"bi.svg\",","\"bi.switch_tree\",","\"bi.switcher\",","\"bi.tab\",","\"bi.table\",","\"bi.table_view\",","\"bi.td\",","\"bi.text_button\",","\"bi.text_editor\",","\"bi.text_item\",","\"bi.text_value_down_list_combo\",","\"bi.textarea_editor\",","\"bi.tree_table\",","\"bi.triangle_group_node\",","\"bi.vertical\"","\"bi.vertical\",","\"bi.vertical\"}]}","\"bi.vertical\"}]}}","\"bi.vertical_adapt\",","\"bi.virtual_group\",","\"bi.virtual_list\",","\"bi.vtape\",","\"bi.year_month_combo\",","\"bi.year_quarter_combo\",","\"body\",","\"bottom\"","\"button_group\"","\"c\",","\"c1\",","\"c1字段\"}","\"c2\",","\"c2字段\"}","\"c6d72d6c7e19a667\",","\"center","\"chart","\"check","\"click\"","\"close","\"column","\"defa1f7ba8b2684a客户id\"","\"delet","\"direction\":","\"div\"","\"dot","\"e351e9f1d8147947合同id\",","\"fill\",","\"floatcenter与center的不同在于,它可以控制最小宽度和最大宽度\",","\"green\");","\"horizont","\"http://www.easyicon.net/api/resizeapi.php?id=1206741&size=128\",","\"id\",","\"item\"","\"label1\",","\"layout","\"left","\"left\"","\"left,right,center\"","\"middle\"","\"move","\"mvc","\"normal\"","\"red\",","\"red\"});","\"region\":","\"regiontext\":","\"renam","\"right","\"success\"","\"switcher\"","\"tab1\",","\"tab2\",","\"tab3","\"text\"","\"text\",","\"text\":","\"toast测试\"","\"top\"","\"valu","\"value\":","\"vertic","\"warning\"","\"warning\",","\"xxxx\"}],","\"三角形的节点\"","\"上一页\"","\"下一页\"","\"主键\",","\"供应商基本信息\",","\"前进\",","\"十字形的节点\"","\"单选item\"","\"单选项\"","\"原始值\",","\"右边的垂直居中\",","\"合同id\",","\"合同信息\",","\"合同的回款信息\",","\"后退\",","\"基本标签\"","\"复选item\"","\"复选项\"","\"字段不可重名!\",","\"学号\",","\"客户id\",","\"客户信息\",","\"尾页\"","\"左边的垂直居中\",","\"张三\"","\"标题\",","\"根目录\"","\"根目录\",","\"比\",","\"测试\"","\"测试\",","\"点击弹出floatbox\",","\"第\"","\"第一级子目录1\"","\"第一级子目录2\"","\"第一级目录1\"","\"第一级目录1\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"第一项\",","\"第三项\",","\"第二级文件1\"","\"第二级文件1\",","\"第二行第一列\"","\"第二行第二列\"","\"第二项\",","\"箭头节点\"","\"表头1\"","\"表头2\"","\"表头3\"","\"这个是带标记的\"","\"这里设置了hgap(水平间距),vgap(垂直间距)\",","\"这里设置了lgap,rgap,tgap,bgap\",","\"采购订单\",","\"采购订单xxx\",","\"面板1\"","\"面板2\"","\"页\"","\"首页\",","\"默认值\",","\"默认风格\"","%","'#wrapper',","''","'',","'1',","'1900","'2',","'2099","'3',","'bi.all_count_pager',","'bi.border',","'bi.bubble',","'bi.button',","'bi.calendar',","'bi.clear_editor',","'bi.clipboard',","'bi.direction_pager',","'bi.down_list_combo',","'bi.fine_tuning_number_editor',","'bi.float_center',","'bi.grid',","'bi.horizontal',","'bi.icon_button',","'bi.image_button',","'bi.label',","'bi.left_right_vertical_adapt',","'bi.list_pane',","'bi.month_combo',","'bi.quarter_combo',","'bi.search_editor',","'bi.text_button',","'bi.toast',","'bi.vertical',","'bi.year_combo',","'body'","'body',","'button1'}},{height:","'button1'}},{width:","'button2'}},{height:","'button2'}},{width:","'button3'}}","'button3'}}]","'common',","'demo.vertical',","'fill',","'fill',el:","'fill']","'fill'],","'label1'}},{","'label2'},{","'label3'}","'sum(c5,","'一般按钮',","'文字按钮',","'点击我弹出一个消息框',","'简单toast测试',","()","(family,","(i","(i,","(index)","(options,","(row1,","(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高","(v)","(width,height)分别表示画布宽高","(x,","(x,y)","(x,y,r)分别表示原点的横坐标,纵坐标,以及半径","(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径","(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容","(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色","(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角bord","(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整","(x0,","(注:","*","+",",一些需要在设置状态后做的额外工作可以通过重写_setxxx来实现)","...",".attr({stroke:","/","//","//7表示八月","//width:","//初始化当前页,","//必选项","//最大日期","//最小日期","0","0\",","0,","0,behaviors:","0,layouts:","0,vgap:","01","01'","01',","0}]","1","1\",","1)","1,","1.","1.1\",","1.222222222222222222222222222222222222\",","10","10)","10,","100","100,","100,el:","100;","100],","11","11,","110,","1111\",","12","12,","130],","16,","18,","1:","1;}","1],","1表示自动","1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",","2","2\",","2,","2.","2.1\",","2.2\",","20","20,","200","200,","200,el:","200]","200],","2015","2015,","21,","22,","24","25","25,","26)',","2:","2,为了演示label是占满整个的,用了一个whitespace:normal\",","3","3\",","3.","30","30,","300","300,","30;","31'","31',","35","37","4","4\",","4.","400","400,","5,","50","50,","500","500,","500],","50],","6,","600","600,","7","7,","70,","8),","80,","90","90,",":","=","[","[\"\",","[0,","[10,","[100,","[20,","[200,","[200,200],","[50,50,200,250,400],","[82,","[[{","[[{el:","[]","[],","[{","[{type:","[{width:","]","accept","adapt","adapter:","adaptive_t","adapt上下自适应\",","adapt左右自适应\",","add","additem","additem(arr)","addwidget","adjustheight","adjustlength","adjustlength:","adjustview","adjustwidth","adjustxoffset","adjustyoffset","aftercardcr","aftercardshow","aftercopi","aftercopy:","alert","align","align:","all_count_pag","allowblank","api","array","array/numb","attr","attribut","auto左右自适应\",","b","b:","basecl","basic_button","basic_sure\")","beforeclick","beforecr","beforedestroy","beforemount","behavior","bg\"","bg1\"","bg1\",","bg2\"","bg2\",","bg3\"","bg3\",","bg4\",","bg5\"","bg5\",","bg6\"","bgap","bi.adaptive_t","bi.all_count_pag","bi.barpopoversection()).open(id);","bi.basic_button","bi.basicbutton","bi.bord","bi.branch_rel","bi.branch_tre","bi.bubbl","bi.bubble_combo","bi.button","bi.button_group","bi.button_tre","bi.buttongroup.choose_type_multi,","bi.buttongroup.choose_type_singl","bi.buttongroup.choose_type_single,","bi.calendar","bi.canva","bi.cent","bi.center_adapt","bi.clear_editor","bi.cleareditor.event_clear","bi.clipboard","bi.code_editor","bi.collection_t","bi.collection_view","bi.collectionview.event_scrol","bi.color_choos","bi.combo","bi.combo.event_after_hideview","bi.combo.event_after_init","bi.combo.event_after_popupview","bi.combo.event_before_hideview","bi.combo.event_before_popupview","bi.combo.event_chang","bi.combo.event_collaps","bi.combo.event_expand","bi.combo.event_trigger_chang","bi.combo_group","bi.createwidget();}","bi.createwidget({","bi.custom_tre","bi.customdatetimecombo.event_cancel","bi.customdatetimecombo.event_confirm","bi.direction.bottom","bi.direction.right,","bi.direction.top","bi.direction_pag","bi.display_tre","bi.downlistcombo.event_before_popupview","bi.downlistcombo.event_chang","bi.downlistcombo.event_son_value_chang","bi.editor","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.editor_trigg","bi.emptyfn","bi.excel_t","bi.expand","bi.expander.event_after_hideview","bi.expander.event_after_init","bi.expander.event_after_popupview","bi.expander.event_before_hideview","bi.expander.event_before_popupview","bi.expander.event_chang","bi.expander.event_collaps","bi.expander.event_expand","bi.expander.event_trigger_chang","bi.extend({},","bi.finetuningnumbereditor.event_confirm","bi.float_box","bi.float_cent","bi.flow","bi.formula_editor","bi.grid","bi.grid_t","bi.grid_view","bi.gridview.event_scrol","bi.handstand_branch_tre","bi.horizont","bi.horizontal_adapt","bi.horizontal_auto","bi.horizontal_float","bi.horizontalalign.right,","bi.htap","bi.i18ntext(\"bi","bi.icon_button","bi.icon_combo","bi.icon_trigg","bi.image_button","bi.label","bi.layer_tree_t","bi.lazy_load","bi.left_right_vertical_adapt","bi.level_tre","bi.list_load","bi.list_pan","bi.load","bi.makearray(100,","bi.map([{value:","bi.monthcombo.event_before_popupview","bi.monthcombo.event_confirm","bi.msg","bi.msg.alert(title,","bi.msg.confirm('测试消息框',\"我是测试消息框的内容\");","bi.msg.toast(\"这是一条简单的数据\");","bi.multi_popup_view","bi.multi_select_item","bi.multi_tree_combo","bi.multifile_editor","bi.multifileeditor.event_progress","bi.multifileeditor.event_upload","bi.multifileeditor.event_uploadstart","bi.multilayer_select_tree_combo","bi.multilayer_single_tree_combo","bi.multiselectcombo.event_confirm","bi.multitreecombo.event_confirm","bi.navig","bi.nodebutton","bi.numericalinterval.event_error","bi.numericalinterval.event_valid","bi.pag","bi.page_t","bi.pager.event_after_popul","bi.pan","bi.panel","bi.popovers.create(id,","bi.popovers.remove(id);","bi.popup_panel","bi.popup_view","bi.popuppanel.event_chang","bi.popuppanel.event_click_toolbar_button","bi.popuppanel.event_clos","bi.preview_t","bi.quartercombo.event_before_popupview","bi.quartercombo.event_confirm","bi.random(1,","bi.resizable_t","bi.responsive_t","bi.search","bi.search_editor","bi.searcheditor.event_clear","bi.searcher.event_after_init","bi.searcher.event_chang","bi.searcher.event_paus","bi.searcher.event_search","bi.searcher.event_start","bi.searcher.event_stop","bi.searcher_view","bi.select_list","bi.select_tree_combo","bi.selection.singl","bi.sgement","bi.shelter_editor","bi.sign_editor","bi.sign_initial_editor","bi.simple_tre","bi.singl","bi.single_select_item","bi.single_select_radio_item","bi.single_tree_combo","bi.singletreecombo.event_before_popupview","bi.slid","bi.sort_list","bi.state_editor","bi.static_combo","bi.svg","bi.switch","bi.switch_tre","bi.tabl","bi.table.event_table_after_init","bi.table.event_table_res","bi.table.event_table_scrol","bi.table_view","bi.td","bi.text_button","bi.text_editor","bi.text_trigg","bi.text_value_down_list_combo","bi.textarea_editor","bi.toast","bi.tree_t","bi.uuid();","bi.vert","bi.vertical_adapt","bi.verticalalign.middl","bi.verticalalign.top","bi.virtual_group","bi.virtual_list","bi.vtap","bi.widget","bi.yearcombo.event_before_popupview","bi.yearcombo.event_confirm","bi.yearmonthcombo.event_before_popupview","bi.yearmonthcombo.event_confirm","bi.yearquartercombo.event_before_popupview","bi.yearquartercombo.event_confirm","bindev","block","blocksiz","blur","blur事件","boolean","border","border\",","bottom","bottom,left","bottom,right","bottom:","branch","branch_expander组件配置项","branch_expander配置","branch_rel","branch_tre","bubbl","bubble_combo","button","button_group","button_tre","button的选中状态","calendar","callback","callback({","callback)","callback,","canva","canvas.branch(55,","canvas.circle(150,","canvas.stroke();","canvas绘图,基类bi.widget","card\",","cardcreat","cardcreator:","cardnam","case","cellsizeandpositiongett","cellsizeandpositiongetter:","center","center:","center_adapt","centeroffset","centeroffset:","check","childern","children:","choose_type_singl","choose_type_single,choose_type_multi,choose_type_all,choose_type_none,choose_type_default","choosetyp","choosetype:","choosetype可选值为","circl","cl","class类名","clear","click","click,","click,hov","clipboard","close","closemax","closemin","cls:","cls:\"layout","cneter","code_editor","collection_t","collection_view","collectionview,基类bi.widget","color","color)分别表示原点的横坐标,纵坐标,半径以及颜色","color_choos","column","column:","columns","columns:","columnsize:","columnwidthgett","columnwidthgetter:","combo","combo,基类bi.widget","comboclass","combo弹出层位置","combo类","common","common,success,warning,ignor","complex_canva","confirm","const","content","content)","context","copi","copy:","count","count:","creat","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","curr","curr:","custom_date_tim","custom_tre","data","date_combo","date_pane_widget","day","day:","day}","dblclick,","defaultshowindex","destroy","destroywhenhid","dialog","direct","direction:","direction_pag","direction_path_choos","disabl","disabled\",","disabled:","disabledhov","disableerror","disableselect","disablewatermark","dishov","display_tre","dobehavior","doclick","dohighlight","doredmark","dosearch","down_list_combo","dynamic:","dynamic:false}","dynamic:true}","dynamicshow","dynamicshowfirstlast","dynamicshowprevnext","e","east:","editor","editor=_ref;","editor_trigg","editor的value发生改变触发","el","el:","element:","element:\"#wrapper\",","element:\"body\",","ellips","empti","enabl","enableerror","enablehov","enablewatermark","end)","errortext","errortext:","estimatedcolumns","estimatedcolumnsize:","estimatedrows","estimatedrowsize:","event_after_hideview","event_after_init","event_after_popupview","event_before_hideview","event_before_popupview","event_collaps","event_expand","event_float_box_clos","event_paus","event_search","event_start","event_stop","event_trigger_chang","excel_t","expand","expanderclass","expander初始化后触发","expander展开触发","expander收起触发","extracl","fals","false,","field","fieldtextvaluemap","file_manag","finetuning_number_editor","fineui2.0引入生命周期后,widget的实现类不需要重写setenable,setvalid等方法,会自动调用子组件的对应方法","fineuidoc","fineui的交互、前端以及视觉文档规范","first","first:","firstpag","firstpage:","float_box","float_cent","floatbox弹出层,bi.widget","float左右自适应\",","flow","fn","focu","focus事件","font\"","font\",","font,","footer","footerrows","forcecent","forcenotselect","forceselect","foreign:","formula_editor","freezecol","freezecols:","function","function()","function(){","function(){return","function(op.callback)","function(row1,","function(v)","getallbutton","getallleav","getbyid","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getcheckstr","getclientregioncolumns","getcolumn","getcolumns","getcurrentpag","getelementbypoint","getelementsbypoint","geterrortext","getfont","getformulastr","getheight","gethpag","getimageheight","getimagewidth","getindexbyvalu","getitems:","getkeyword","getlastvalidvalu","getlefthorizontalscrol","getmaxscrollleft","getmaxscrolltop","getnam","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getpopupposit","getregioncolumns","getregions","getrighthorizontalscrol","getscrollleft","getscrollregioncolumns","getscrollregionrows","getscrolltop","getselect","getselectedbutton","getselectedcard","getselectedid","getselectedtab","getselectedvalue()","getsrc","getstat","getstyl","gettab","gettag","gettext","gettiptyp","gettitl","getusedfield","getvalu","getvalue,","getverticalscrol","getview","getvlau","getvpag","getwarningtitl","getwidgetbynam","getwidth","gradient","grid","grid_tabl","grid_view","gridview,基类bi.widget","group","group_combo","groups:","h","ha","handl","handler","handler:","handstand_branch_tre","hashnext","hashprev","hasmatch","hasnext","hasnext:","hasprev","hasverticalscrol","hasvnext","hasvprev","haswidget","header","header,","header:","headercellstylegett","headerrows","height","height:","height:30","height:50,","hgap","hgap:","hide","hidecheck","hideview","hollow","horizont","horizontal:","horizontal_adapt","horizontal_auto","horizontal_float","horizontaloverscans","hover","hover\"","hoverclass","hover事件","hover类","htape","html标签","icon_button","icon_combo","icon_trigg","iconclass","iconclass:","iconcls1:","iconheight","iconwidth","icon的类名","id","id:","imag","image_button","index","inittre","inputtyp","insertfield","insertfunct","insertoper","insertparam","insertstr","invalid","invis","isallselect","isautosearch","isautosearch为false时启用","isautosync","isdefaultinit","isdisableselect","isedit","isen","isexpand","isfinald","isforcenotselect","isforceselect","isfrontd","ismount","isneedadjustheight","isneedadjustwidth","isneedfreez","isneedfreeze:","isneedmerg","isneedmerge:","isneedres","isneedresize:","isol","isonc","isopen","isreadonli","isresizeadapt","isresizeadapt:","issearch","isselect","isshadowshowingonselect","isstatevalid()","isvalid","isviewvis","isvis","item","item)","item,","item.text,","items,","items:","items:[]","itemscr","itemscreator:","items构造器","json","jump","key","key,valu","key:","keydown时触发","keyword","keywords:","key:键,value:值","label","last","last:","lastpag","lastpage:","layer_panel","layer_tree_t","layout","layouts:","lazy_load","lclick","left","left,center,right","left,right,cent","left:","left_right_vertical_adapt","letter_spacing,","level","level,","level:","level_tre","lgap","lhgap","lhgap:","line","line_spacing)","lineheight","linewidth:","list_load","list面板,基类bi.widget","llgap","load","loader","logic","logic:","lrgap","mark","masker","masker:","masker层","matcher","matchresult,","math.floor(index","max","max:","maxcolumns","maxheight","maxheight:","maxsiz","maxwidth","mergecol","mergecols:","mergerul","messag","message,","min","min:","min_width","mincolumns","mincolumnsize:","minheight","minwidth","month","month,","month:","month_combo","monthbehavior","mount","mousedown,","mouseout","mouseup,","multi_popup_lay","multi_select_combo","multi_select_item","multi_tree_combo","multifile_editor","multilayer_select_tree_combo","multilayer_single_tree_combo","multipl","m})","name","name,widget","nameorwidget","navig","new","next","no_select\")","no_selected_item\")","node","node:","node_button","normal,nowrap","north,east,west,south,cent","north:","nowrap","null","number","number,funct","number/boolean","number/funct","number/str","numeric_interv","obejct","obj({year:","object","object:","offset:","offsetstyl","onc","once:","onkeydown","onload","onsearch","op","open","open:","opt","origin,","overflowi","overflowx","overlap","overscancolumncount","overscanheight","overscanrowcount","padding值","page","page_t","pager","pager:","pager刷新完成事件","pages:","pages为数字时可用","pages为数字时可用,","pane","pane_list","panel","panel的value发生改变触发","panel的关闭事件","param","paramformatt","path","path_choos","pathstr","pid:","poplulate(items)","popul","populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件","popup","popup\"","popup:","prependitem","prev","preview_t","primary:","print","prompt","py","quarter_combo","quitcheck","radius,","radius大小","readonli","rect","redmark:","ref:function(_ref){","refresh","region:","regioncolumns","regiontext:","relation_view","remov","removeitem","removeitemat","removetab","removewidget","render","reset","resetheight","resetlastvalidvalu","resetlistheight","resetlistwidth","resetwidth","resiz","resizable_t","resizehead","responsive_t","restor","result,","return","rgap","rhgap","rhgap:","right","right:","root","row","row2","row2)","row:","rowheightgett","rowheightgetter:","rows:","rowsiz","rowsize:","rrgap","scrolli","scrollleft","scrollleft,","scrollleft:","scrolltop","scrolltop:","scrolltop}","scrollx","searcher","searcher.populate([{","searchresult,","sectionprovid","segment","select","select_list","select_tree_combo","selectal","selected:","selectedtim","sequencecellstylegett","set","setadapt","setallpag","setallselect","setclosemaxenable(boolean)","setcloseminenable(boolean)","setcolumns","setcount","seten","setenabledvalu","seterrortext","seterrorvis","setestimatedcolumns","setestimatedrows","setfieldtextvaluemap","setfinish","setfunct","setheadercolumns","setheight","sethpag","sethpagervis","setimageheight","setimagewidth","setlefthorizontalscrol","setmaxenable(boolean)","setminenable(boolean)","setnotselectedvalu","setnumtip(string)","setopen","setoverflowi","setoverflowx","setpagervis","setregioncolumns","setrighthorizontalscrol","setscrollleft","setscrolltop","setselect","setsiz","setsrc","setstart","setstat","setstyl","settag","settext","settextstyl","settings:","settipvis","settitl","settoolbarvis","setvalid","setvalid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setxxx来实现","setvalu","setverticalscrol","setviewbox","setvis","setvisible,","setvpag","setvpagervis","setwarningtitl","setwidth","setzindex","shadow","shelter_editor","show","showhint","showview","sign_editor","sign_initial_editor","simple_tre","singl","single_select_item","single_select_radio_item","single_tree_combo","size,","slider","slider插件","solid","sort_list","sourc","south:","src","src:","start,","state_editor","static_combo","sting,object","stopev","stoppropag","stopsearch","str","stretch)","string","string,","string,object","string/funct","string/numb","stroke","strokestyle:","style","style,","success,warn","summarycellstylegett","svg","svg.path(\"m10,10l50,50m50,10l10,50\")","svg绘图,基类bi.widget","switch","switch_tre","switcher","switcherclass","switchselect","tab","tab:","tabl","table_view","table作为一个列表集合存在,继承bi.widget","table初始化完成后触发","table大小调整时触发(窗口变化等)","tab标签页","tab页元素","tag","tagnam","td","text","text:","text_button","text_trigg","text_value_downlist_combo","textalign","textarea_editor","textheight","textheight:","textwidth","textwidth:","tgap","this.button_group,","tiptext","tiptyp","titl","title,","title,opt","title:","titlebutton","titlebuttons:","title文本","title类型","toast","toast提示","toggl","tool","toolbar位置","toolbar栏","top","top,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)","top,bottom,left,right,custom","top,left","top,right","top:","tree","tree.inittree({","tree.populate(items);","tree_tabl","trigger","triggercollaps","triggerexpand","triggerwidth","trigger发生改变触发","true","true,","true,fals","true/fals","true;}","true;}},","type","type:","unhighlight","unredmark","updat","upload","url","v","v:","valid","validationcheck","valu","value,","value,可以是单个值也可以是个数组","value:","value值","var","vertic","vertical:","vertical_adapt","verticalalign","verticaloverscans","vgap","vgap:","vgap:10","virtual_group","virtual_list","virtuallist,基类bi.widget","visibl","vtape","warningtitl","watermark","watermark:","watermark:\"带清除按钮的输入框\",","watermark:\"搜索\",","watermark:\"请输入内容\"","watermark:'请输入公式',","weight,","west:","whitespac","whitespace:","widget","width","width:","x1,","x2,","x2,y2...)","x:","y,","y0,","y0为根节点,分支到x1,y1,","y1)","y1,","y2)","y:","year","year:","year_combo","year_month_combo","year_quarter_combo","yearbehavior","z","zindex在1000w,bi.widget","zindex在1000w,基类bi.multipopupview","{","{dynamic:false}","{dynamic:true,scrolly:true}","{dynamic:true}","{el:","{height:","{offset:","{redmark:","{region:","{return","{scrollleft:","{text:","{type:","{type:\"bi.horizontal\",hgap:10,vgap:0}","{year,","{}","{},","{},layouts:","{},popup:","{}}","|","}","})","}),","});","},","},items:","},{","}]","}],","}];","}]]","}]],","}]}","—","—ßß","一组具有相同属性的元素集合,基类bi.buttongroup","一组具有相同属性的元素集合,基类bi.widget","一般的button父级,基类bi.singl","三级参数","上一页","上下的高度固定/左右的宽度固定,中间的高度/宽度自适应","上传结束后触发","上传过程中触发","下一页","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","下拉框初始化后触发","下拉框展开触发","下拉框弹出前触发","下拉框弹出层,","下拉框弹出层的多选版本,toolbar带有若干按钮,","下拉框收起触发","不仅有选中状态而且有展开状态,","不变\",","不考虑超出边界的情况,","为解决排序问题引入的控件","主要作用于setvalue方法","事件","事件名称","事件方法","事件详见editor","二级参数","二级可选节点下拉框树","二级树","二级树下拉框","二维数组,每个元素代表一条路径","二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向","交叉表内容二维数组","交叉表头","交叉项","代码文本框,基类bi.singl","使用populate来清空或者重置布局,不要使用empty,","使能选中","保存表","值","停止搜索","停止搜索触发(搜索框为空)","停止输入触发","储存","元素","元素内的空白处理方式","元素内空白处理方式","元素创造器","元素的垂直对齐方式","公式编辑控件,基类bi.singl","关联视图","关键字标红字符串","关闭弹出层","其他事件详见editor","其他事件详见input","具体配置方法见combo","内容项","内部元素间横向距离","内部元素间纵向距离","内部前插入","内部后插入","冻结列","冻结的列","冻结的列号,从0开始,isneedfreeze为true时生效","分页控件,基类bi.widget","分页表格","分页计数","分页选项","切换显示或隐藏面板,bi.widget","切换树结构","切换状态","切换类","列宽","列宽数组","列宽,必设","列数","列表","列表创建器","列表展示的table,继承bi.widget","列表最前添加元素","列表最后添加元素","列项宽度","列项间的","创建卡导航页页之后","初始化之后","初始化当前页","判断是否怎么点击都不会被选中","判断是否显示","判断是否有上一页","判断是否有上一页,pages不可用时有效","判断是否有下一页","判断是否有下一页,pages不可用时有效","判断是否有前一页的函数","判断是否有前一页的方法","判断是否有后一页的方法","判断是否有效","判断是否有该组件","判断是否点击即选中","判断是否让选中","判断组件是否挂载","判断节点是否展开","刷新内容","刷新列表","刷新或者清空列表","刷新文本框","剪切板","加载tree结构","加载中","加载完成回调","加载完成的回调(测试了无效果)","加载完毕","加载控件,bi.widget","区间不合法的状态事件","区间合法的状态事件","区间是否成立)","单元格宽度集合","单元格控件,继承bi.layout","单选combo,基类bi.widget","单选框item,基类bi.basicbutton","即是否保持搜索面板和adapter面板状态值的统一","去掉所有内容","参数","参数显示值构造函数","参数设置","参考button_group","参考input输入框类型","参考相关css属性","取消hover事件","取消文本标红","取消文本高亮","取消标红","可以单选多选切换的树,继承bi.widget","可以点击的一行文字,基类bi.basicbutton","可以理解为multipopupview和panel两个面板的结合体,基类bi.multipopupview","可调整列宽的grid表格,继承bi.widget","可选值","右区间初始状态","右边容器left","右边容器right","右边容器左右padding值","各种item","各种segment","各种节点node","合并的单元格列号","合并规则,","名称","回调参数","回车事件","回车但是值不合法","图标button,基类bi.basicbutton","图标宽度","图标按钮trigger","图标类型","图标高度","图片的button,基类bi.basicbutton","图片路径","在未知宽度和高度时有效","垂直tape布局,两列定高,一列自适应","垂直流式布局","基础class类","基础元素","基础属性","基础用法","基类bi.widget","填充中空的路径","填充实心的路径","增加","增加内容","增加行","增加项","复杂的canvas绘图","复选框item,基类bi.basicbutton","多层下拉列表的下拉框","多层级下拉单选树","多层级下拉可选节点树","多文件,基类bi.singl","子控件对象","子控件数组","子组件","子组件二维数组","子组件数组","子组件构造器","子项","子项创建函数","子项数组","子项,pid代表父节点id","存储","存储数据","季度选择下拉框","完全匹配的构造器","完成拷贝后执行的方法","宽度","宽度width","对外方法","对话框","对话框内容","对话框标题","对齐方向","对齐方式","导航栏","导航栏控件,bi.widget","导航页展示之后","层级树状结构的表格","展开类","属性","工具栏的方向","左区间初始状态","左右分离,垂直方向居中容器","左边容器left","左边容器right","左边容器左右padding值","布局","带方向的路径选择","带有标题栏的panel,基类bi.widget","带标记的文本框,基类bi.widget","带清除按钮的输入框","带确定的复选下拉框","年份选择下拉框","年季度选择下拉框","年月选择下拉框","开启panel的元素","开启弹出层的元素","开启或者隐藏弹出层","开始上传时触发","开始搜索","开始搜索触发","开始绘制","开始输入触发","异步树控件","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层宽度","弹出层显示位置","弹出层显示的位置元素","弹出层最大宽度","弹出层最大高度","弹出层最小宽度","弹出层最小高度","弹出层点击触发","弹出层的位置","弹出层高度","弹出框弹出前触发","弹窗层是否可见","当前状态是否有效(输入是否合法,","当前页","当前页,","当没有元素时有提示信息的view,","得到列宽","总行数","总页数","恢复hover可用","恢复文本框placeholder可用","恶心的加载控件,","慎用resiz","懒加载","所有控件的超类","所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类bi.widget","打开弹出层","扩展class类","挂载组件","按下backspace触发","按下空格触发","按钮文本内容","按钮文本宽度","按钮文本高度","按钮类型","按钮组","按键事件","排序列表","控件位置","控件都会提供setenable,","控件都会提供setvalue,","控件高度","提示titl","提示性信息","提示消息框","提示类型","插入函数","插入参数","插入字符串","插入操作符","搜索中","搜索列表位置","搜索暂停触发(搜索文本以空白字符结尾)","搜索框","搜索结果面板初始化完成后触发","搜索结果面板发生改变触发","搜索逻辑控件,bi.widget","搜索面板,","摧毁元素","摧毁表","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","数值区间控件","数值微调器","数据","文件上传","文件管理器","文件路径","文字布局","文字类型的按钮,基类bi.basicbutton","文本value值","文本内容","文本域,基类bi.singl","文本域失焦","文本域的值","文本域获取焦点","文本对齐方式","文本标签","文本标签宽度","文本标红","文本框,基类bi.singl","文本框placehold","文本框值","文本框值是否有效","文本框失焦","文本框宽度","文本框是否处于编辑状态","文本框获取焦点","文本框高度","文本框默认值","文本输入框trigger","文本高亮","文档规范","方法","方法名","无","无论怎么点击都不会被选中","日历控件","日期选择下拉框的弹出面板","日期选择下拉框(可以选择时分秒)","日期选择下拉框(弹出的年月选择可以进一步选择日期)","时合并","是否为单页","是否为最大日期","是否为最小日期","是否停止mousedown、mouseup事件","是否停止mousedown、mouseup向上冒泡","是否允许为空","是否允许空值","是否允许退出编辑函数","是否全选中","是否冻结","是否冻结列","是否出现滚动条","是否动态显示上一页、下一页,dynamicshow为false时生效","是否动态显示上一页、下一页、首页、尾页,","是否动态显示首页、尾页,dynamicshow为false时生效","是否匹配","是否去掉边框和背景","是否只允许点击一次","是否只读","是否可改变列大小","是否可用","是否可见","是否含有数值滚动条","是否块状显示,即不显示边框,没有最小宽度的限制","是否支持多选","是否无论如何都要居中,","是否显示尾页","是否显示总页数","是否显示横向滚动条","是否显示纵向滚动条","是否显示阴影","是否显示首页","是否有上一页","是否有下一页","是否有前一页","是否有匹配的元素","是否有后一页","是否有效","是否正在搜索","是否自动同步数据,","是否自动搜索","是否被选中","是否调整时自适应","是否阻止事件","是否需要冻结","是否需要冻结列","是否需要冻结单元格","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要宽度调整","是否需要表尾","是否需要调整列宽","是否需要调整大小","是否需要高度调整","是否默认初始化子数据","是否默认初始化子节点","是否默认显示","是否默认显示tab页","显示","显示内容","显示弹出层","显示总页数","显示页码的分页控件","普通单元格高度","暂停搜索","暂停输入触发(输入空白字符)","更换新的内容","更改树结构内容","替换为新内容","替换为新的内容","替换内容","最后一页","最后一页,在万不得已时才会调用这个函数获取最后一页的页码,","最大值初始值","最大列宽","最大可选数量","最大宽度","最大日期","最大高度","最小值初始值","最小列宽","最小宽度","最小宽度,如果block/clear中某一项为true,此项值为0,否则为90","最小日期","月份选择下拉框","有总页数和总行数的分页控件","构造树结构","某个可以展开的节点,基类bi.widget","标红","标题","树下拉框,继承bi.widget","树状结构的表格","根据id获取nod","根据id获取节点","根据id返回元素","根据value值获取value在数组中的索引","根据value值获取节点","根据值获取node","根据值获取索引","根据值获取节点","根据制定参数打印出路径","根据组件名称获取组件","根组件","根节点所在方向","检查是否为空","横向分支的树","横向坐标是否有上一页","横向坐标是否有下一页","横向滚动距离","横向翻页设置","横向间隙","正在加载","正在搜索时触发","每列宽度所组成的数组","每格列宽","每格列宽,rowheightgetter为function时必设","每格行宽","每格行宽,columnwidthgetter为function时必设","气泡提示","气泡显示位置","气泡显示内容","气泡高度","水印","水平tape布局,两列定宽,一列自适应","水平分页选项","水平和垂直方向都居中容器,","水平方向居中自适应容器","水平流式布局","浮动布局实现的居中容器","浮动的水平居中布局","消息提示","添加字段","添加对象到json数组","添加组件","清空","清空内容","清空树","清空组件","渲染列表","渲染组件","滚动事件","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","灰化","点击一次后失效","点击一次选中有效,再点无效","点击一级节点触发","点击事件","点击事件之前","点击事件回调","点击二级节点触发","点击即选中,","点击取消触发","点击增加/减少按钮或者编辑框确定时触发","点击展开","点击工具栏事件","点击清空按钮触发","点击确定触发","点击确认触发","点击编辑框触发(不在编辑状态时)","生命周期函数","生成树方法","用于表格预览,继承bi.widget","用法","确定输入触发(blur时且输入值有效)","确认消息框","移除tab面板页","移除制定元素","移除指定索引处的item","移除组件","空","第一页","简单的多选树","类似excel式的表格,继承bi.widget","类型","纵向分支的树","纵向分页,参数与horizont","纵向坐标是否有上一页","纵向坐标是否有下一页","纵向滚动距离","纵向翻页设置,参数与horizontal相同","纵向间隙","组件text值","组件value值","组件实例刚被创建","组件实例创建完成","组件挂载","组件挂载之前","组件是否可见","组件更新","组件销毁前调用","组件销毁后调用","绑定事件","结束绘制","绘制","绘制图片","绘制圆形","绘制形状的集合","绘制文本","绘制树枝节点","绘制椭圆","绘制渐变色","绘制矩形","绘制线段","绘制路径","继承bi.widget","编辑框中的值,","网格布局","能处理静态宽度以及动态宽度的表","自定义下拉列表中item项的行为,如高亮,标红等","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","自定义下拉框trigger","自定义列表中item项的行为,如高亮,标红等","自定义工具栏","自定义年份选择的行为(详见button_group)","自定义树,基类bi.widget","自适应垂直居中布局","自适应宽度的表格","自适应宽度的表格,继承bi.widget","自适应左右垂直居中布局","自适应左右居中布局","节点展开","节点收起","节点数组","节点是否展开","若为false,则指对其设置使能状态","获取combo","获取tab面板页","获取tag","获取text值","获取tiptyp","获取titl","获取value值","获取warningtitl","获取值","获取公式","获取列项","获取可用字段","获取右往左横向滚动距离","获取图片宽度","获取图片路径","获取图片高度","获取左到右横向滚动距离","获取弹出层","获取弹出层的位置","获取当前选中项内容","获取当前选中项的id属性","获取当前选中项的value值","获取当前页码","获取所有button","获取所有叶节点","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取所选项值","获取搜索关键词","获取搜索关键词数组","获取搜索列表栏","获取文件名称","获取文本值","获取文本域值","获取文本域样式","获取文本样式","获取文本框值","获取文本框最后一次输入的有效值","获取未选中植","获取未选中的根节点","获取横向滚动条宽度","获取水平向页码","获取没有被选中的值","获取浏览器中显示的列项之间的间隙","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","获取纵向滚动条宽度","获取纵向滚动距离","获取纵向页码","获取组件名称","获取组件宽度","获取组件高度","获取被选中的值","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获取选中的index","获取选中的tab面板页","获取选中的导航页","获取选中的根节点","获取选中项","获取错误文本","获取间隙大小","获取需要拷贝的值","获取颜色值","获得值","获得列项之间的间隙","获得垂直页数","获得所以根节点","获得所有叶节点","获得日期","获得水平页数","获得计算后的列宽","获根据给定的点坐标返回元素","行宽,必设","行数","行高","表关联树","表头","表头内容","表头行高","表头高度","表尾","表尾行高","表尾高度","表示一个可以展开的节点,","被选元素要触发的事件","见上","触发器宽度","警告消息框","记录状态的输入框,基类bi.widget","设tip可见","设定的年份","设定的日期","设定的月份","设置combo","设置error不可用","设置error可用","设置tag","设置text值","设置titl","设置toolbar是否可见","设置valu","设置value值","设置value值可用","设置z","设置值","设置全选","设置函数","设置列宽","设置列项之间的间隙","设置右区间开闭combo的disable状态","设置右区间输入框disable状态","设置右往左横向滚动距离","设置图片宽度","设置图片路径","设置图片高度","设置垂直方向是否有滚动条","设置宽度","设置属性","设置左到右横向滚动距离","设置左区间开闭combo的disable状态","设置左区间输入框disable状态","设置弹出层显示的位置元素","设置当前选中项内容","设置当前页码","设置总页数","设置按钮宽度","设置按钮高度","设置数值区间的tip提示","设置文本值","设置文本域值","设置文本域样式","设置文本样式","设置文本框placeholder不可用","设置文本框值","设置文本框样式","设置日期","设置是否显示横向滚动条","设置未被选中的值","设置未选中值","设置标题","设置横向分页键可见","设置每个单元格的位置坐标和宽高","设置水平方向是否有滚动条","设置水平页数","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","设置画布可视区域","设置画布尺寸","设置纵向分页键可见","设置纵向滚动距离","设置纵向页数","设置组件不可用","设置组件不可见","设置组件可用","设置组件可见","设置组件宽度","设置组件属性","设置组件无效","设置组件是否可用","设置组件是否可见","设置组件是否有效","设置组件有效","设置组件高度","设置节点展开状态","设置行宽","设置表头的列宽","设置计数","设置选中值","设置选中的index","设置选中的文本","设置选中项","设置错误titl","设置错误文本","设置错误文本可见","设置页码是否可见","设置颜色值","设置高度","说明","调整宽度","调整弹出层显示的位置元素","调整搜索列表栏","调整横向偏移","调整纵向偏移","调整表头","调整表格","调整高度","谨慎监听和触发bi.controller.event_change事件,一般来说,控件都会有一个bi.classname.event_change事件,一些特殊的事件会在对应控件文档中列出","路径选择","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入框类型","输入较验函数","返回该对象","还原列表设置","这仅仅只是一个超类,","连续显示分页数","退出时验证函数","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中文本框文本","选中日期或者退出编辑状态触发","选中状态下是否显示阴影","选中的初始年月","选择列表","选择文件","选择类型","选色控件","通用按钮","通用按钮,详情见bi.button","通过给定的参数在已注册的字体中找到字体对象","通过鼠标或键盘输入字符","配置项","重心偏移量","重新设置高度","重置","重置列表宽度","重置列表高度","重置宽度","重置文本框最后一次输入的有效值","重置画布","重置高度","销毁事件","销毁组件","错误titl","错误信息","错误提示","错误提示titl","键","阻止事件","阻止事件冒泡","阻止冒泡","限定可选日期的上限","限定可选日期的下限","隐藏","隐藏弹出层","隐藏弹窗层是否销毁","需要设置的文本值text","需要设置的文本域样式style,例{\"color\":\"#000\"}","需要设置的文本标签样式,例{\"color\":\"#000\"}","需要设置的文本标签样式style,例{\"color\":\"#000\"}","需要设置的高度值height","非自适应,用于宽度高度固定的面板","靠左/右对齐的自由浮动布局","面板切换","面板展开","面板收起","面板显示之前","面板显示之后","面板显示的位置","面板构造之后","面板构造器","面板隐藏之前","面板隐藏之后","页数跳转","页码","验证函数","高度","高度height","高级属性","默认row1","默认值","默认相等时合并","(以x0,"],"pipeline":["stopWordFilter","stemmer"]},"store":{"./":{"url":"./","title":"文档规范","keywords":"","body":"FineUIdocs\nFineUI的交互、前端以及视觉文档规范\n1. 控件都会提供setValue, getValue, populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件\n2. 控件都会提供setEnable, setVisible, setValid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setXXX来实现\n3. 使用populate来清空或者重置布局,不要使用empty, 慎用resize\n4. 谨慎监听和触发BI.Controller.EVENT_CHANGE事件,一般来说,控件都会有一个BI.ClassName.EVENT_CHANGE事件,一些特殊的事件会在对应控件文档中列出\n"},"core/layout/vertical.html":{"url":"core/layout/vertical.html","title":"vertical","keywords":"","body":"bi.vertical\n垂直流式布局\nsource\n\nBI.createWidget({\n type: 'demo.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"这里设置了hgap(水平间距),vgap(垂直间距)\",\n height: 30\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"这里设置了hgap(水平间距),vgap(垂直间距)\",\n height: 30\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nscrolly\n设置垂直方向是否有滚动条\nboolean\ntrue,false\ntrue\n\n\n\n\n"},"core/layout/horizontal.html":{"url":"core/layout/horizontal.html","title":"horizontal","keywords":"","body":"bi.horizontal\n水平流式布局\nsource\n\nBI.createWidget({\n type: 'bi.horizontal',\n element: \"#wrapper\",\n items: [{\n type: \"bi.absolute\",\n items: [{\n el: {\n type: \"bi.text_button\",\n cls: \"layout-bg1\",\n text: \"这里设置了lgap,rgap,tgap,bgap\",\n height: 30\n },\n left: 0,\n right: 0\n }],\n width: 100,\n height: 30\n }, {\n type: \"bi.absolute\",\n items: [{\n el: {\n type: \"bi.text_button\",\n cls: \"layout-bg2\",\n text: \"这里设置了lgap,rgap,tgap,bgap\",\n height: 30\n },\n left: 0,\n right: 0\n }],\n width: 200,\n height: 30\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\nverticalAlign\n元素的垂直对齐方式\nstring\n参考相关css属性\n\"middle\"\n\n\nscrollx\n设置水平方向是否有滚动条\nboolean\ntrue,false\ntrue\n\n\n\n\n"},"core/layout/htape.html":{"url":"core/layout/htape.html","title":"htape","keywords":"","body":"bi.htape\n水平tape布局,两列定宽,一列自适应\nsource\n\nBI.createWidget({\n type: \"bi.htape\",\n element: \"#wrapper\", \n items : [\n {\n width: 100,\n el : {\n type : 'bi.label',\n text : '1',\n cls: \"layout-bg1\"\n }\n }, {\n width: 200,\n el : {\n type : 'bi.label',\n text : '2',\n cls: \"layout-bg2\"\n }\n }, {\n width: 'fill',\n el : {\n type : 'bi.label',\n text : '3',\n cls: \"layout-bg3\"\n }\n }\n ]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[{width: 100,el: {type: 'bi.button', text: 'button1'}},{width: 'fill',el: {type: 'bi.button', text: 'button2'}},{width: 200,el: {type: 'bi.button', text: 'button3'}}]\n\n\n\n\n"},"core/layout/vtape.html":{"url":"core/layout/vtape.html","title":"vtape","keywords":"","body":"bi.vtape\n垂直tape布局,两列定高,一列自适应\nsource\n\nBI.createWidget({\n type: \"bi.vtape\",\n element: \"#wrapper\", \n items : [\n {\n height: 100,\n el : {\n type : 'bi.label',\n text : '1',\n cls: \"layout-bg1\"\n }\n }, {\n height: 200,\n el : {\n type : 'bi.label',\n text : '2',\n cls: \"layout-bg2\"\n }\n }, {\n height: 'fill',\n el : {\n type : 'bi.label',\n text : '3',\n cls: \"layout-bg3\"\n }\n }\n ]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n{height: 100,el: {type: 'bi.button', text: 'button1'}},{height: 'fill',el: {type: 'bi.button', text: 'button2'}},{height: 200,el: {type: 'bi.button', text: 'button3'}}\n\n\n\n\n"},"core/layout/center_adapt.html":{"url":"core/layout/center_adapt.html","title":"center_adapt","keywords":"","body":"bi.center_adapt\n自适应左右垂直居中布局\nsource\n\nBI.createWidget({\n type: \"bi.center_adapt\",\n element: \"#wrapper\",\n hgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Center Adapt 1\",\n cls: \"layout-bg1\",\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Center Adapt 2\",\n cls: \"layout-bg2\",\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/vertical_adapt.html":{"url":"core/layout/vertical_adapt.html","title":"vertical_adapt","keywords":"","body":"bi.vertical_adapt\n自适应垂直居中布局\nsource\n\nBI.createWidget({\n type: \"bi.vertical_adapt\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Vertical Adapt上下自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Vertical Adapt上下自适应\",\n cls: \"layout-bg2\",\n width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/left_right_vertical_adapt.html":{"url":"core/layout/left_right_vertical_adapt.html","title":"left_right_vertical_adapt","keywords":"","body":"bi.left_right_vertical_adapt\n左右分离,垂直方向居中容器\nsource\n\nBI.createWidget({\n type: 'bi.left_right_vertical_adapt',\n element: \"#wrapper\",\n lhgap: 10,\n rhgap: 10,\n items: {\n left: [{\n type: \"bi.label\",\n text: \"左边的垂直居中\",\n cls: \"layout-bg1\",\n width: 100,\n height: 30\n }],\n right: [{\n type: \"bi.label\",\n text: \"右边的垂直居中\",\n cls: \"layout-bg1\",\n width: 100,\n height: 30\n }]\n }\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlhgap\n左边容器左右padding值\nnumber\n—\n0\n\n\nlrgap\n左边容器right-padding值\nnumber\n—\n0\n\n\nllgap\n左边容器left-padding值\nnumber\n—\n0\n\n\nrhgap\n右边容器左右padding值\nnumber\n—\n0\n\n\nrrgap\n右边容器right-padding值\nnumber\n—\n0\n\n\nrhgap\n右边容器left-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/flow.html":{"url":"core/layout/flow.html","title":"flow","keywords":"","body":"bi.flow\n靠左/右对齐的自由浮动布局\nsource\n\nBI.createWidget({\n type: \"bi.center_adapt\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.left\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"Left-1\",\n cls: \"layout-bg1\",\n hgap: 20\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"Left-2\",\n cls: \"layout-bg2\",\n hgap: 20\n }],\n hgap: 20,\n vgap: 20\n }, {\n type: \"bi.right\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"Right-1\",\n cls: \"layout-bg3\",\n hgap: 20\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"Right-2\",\n cls: \"layout-bg4\",\n hgap: 20\n }],\n hgap: 20,\n vgap: 20\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n—\n\n\n\n\n"},"core/layout/center.html":{"url":"core/layout/center.html","title":"center","keywords":"","body":"bi.center\n水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\nsource\n\nBI.createWidget({\n type: \"bi.center\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n text: \"Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",\n cls: \"layout-bg1\",\n whiteSpace: \"normal\"\n },{\n type: \"bi.label\",\n text: \"Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal\",\n cls: \"layout-bg2\",\n whiteSpace: \"normal\"\n },{\n type: \"bi.label\",\n text: \"Center 3\",\n cls: \"layout-bg3\"\n },{\n type: \"bi.label\",\n text: \"Center 4\",\n cls: \"layout-bg5\"\n }],\n hgap: 20,\n vgap: 20\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/horizontal_adapt.html":{"url":"core/layout/horizontal_adapt.html","title":"horizontal_adapt","keywords":"","body":"bi.horizontal_adapt\n自适应左右居中布局\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_adapt\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Adapt左右自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Horizontal Adapt左右自适应\",\n cls: \"layout-bg2\",\n //width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\nverticalAlign\n元素的垂直对齐方式\nconst\n参考相关css属性\nBI.VerticalAlign.Middle\n\n\n\n\n"},"core/layout/horizontal_auto.html":{"url":"core/layout/horizontal_auto.html","title":"horizontal_auto","keywords":"","body":"bi.horizontal_auto\n水平方向居中自适应容器\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_auto\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Auto左右自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Horizontal Auto左右自适应\",\n cls: \"layout-bg2\",\n width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/horizontal_float.html":{"url":"core/layout/horizontal_float.html","title":"horizontal_float","keywords":"","body":"bi.horizontal_float\n浮动的水平居中布局\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_float\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Float左右自适应\",\n cls: \"layout-bg1\",\n width: 200,\n height:30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/float_center.html":{"url":"core/layout/float_center.html","title":"float_center","keywords":"","body":"bi.float_center\n浮动布局实现的居中容器\nsource\n\nBI.createWidget({\n type: 'bi.float_center',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n text: \"floatCenter与center的不同在于,它可以控制最小宽度和最大宽度\",\n cls: \"layout-bg1\",\n whiteSpace: \"normal\"\n }, {\n type: \"bi.label\",\n text: \"floatCenter与center的不同在于,它可以控制最小宽度和最大宽度\",\n cls: \"layout-bg2\",\n whiteSpace: \"normal\"\n }],\n height: 300,\n hgap: 20,\n vgap: 20\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/border.html":{"url":"core/layout/border.html","title":"border","keywords":"","body":"bi.border\n上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\nsource\nBI.createWidget({\n type: 'bi.border',\n element: \"#wrapper\",\n items: {\n north: {\n el: {type: \"bi.label\"},\n height: 30,\n top: 20,\n left: 20,\n right: 20\n },\n south: {\n el: {type: \"bi.label\"},\n height: 50,\n bottom: 20,\n left: 20,\n right: 20\n },\n west: {\n el: {type: \"bi.label\"},\n width: 200,\n left: 20\n },\n east: {\n el: {type: \"bi.label\"},\n width: 300,\n right: 20\n },\n center: {el: {type: \"bi.label\"}}\n }\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子控件对象\nobject\nnorth,east,west,south,center\n[ ]\n\n\n\n\n"},"core/layout/grid.html":{"url":"core/layout/grid.html","title":"grid","keywords":"","body":"bi.grid\n网格布局\nsource\n\nBI.createWidget({\n type: 'bi.grid',\n element: \"#wrapper\",\n columns: 2,\n rows: 2,\n items: [{\n column: 0,\n row: 0,\n el: {\n type: \"bi.label\",\n text: \"column-0, row-0\",\n cls: \"layout-bg1\"\n }\n }, {\n column: 1,\n row: 0,\n el: {\n type: \"bi.label\",\n text: \"column-1, row-0\",\n cls: \"layout-bg2\"\n }\n } {\n column: 0,\n row: 1,\n el: {\n type: \"bi.label\",\n text: \"column-0, row-1\",\n cls: \"layout-bg5\"\n }\n }, {\n column: 1,\n row: 1,\n el: {\n type: \"bi.label\",\n text: \"column-1, row-1\",\n cls: \"layout-bg6\"\n }\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ncolumns\n列数\nnumber\n—\nnull\n\n\nrows\n行数\nnumber\n—\nnull\n\n\nitems\n子控件数组\narray\n—\n[]\n\n\n\n\n"},"core/layout/table.html":{"url":"core/layout/table.html","title":"table","keywords":"","body":"bi.table\ntable作为一个列表集合存在,继承BI.Widget\nsource\nBI.createWidget({\n element: \"body\",\n type: \"bi.table\",\n items: [],\n columnSize: [100, \"fill\", 200],\n rowSize: [10, 30, 50, 70, 90, 110, 130],\n hgap: 20,\n vgap: 10\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nscrolly\n是否出现滚动条\nboolean\ntrue\n\n\ncolumnSize\n列项宽度\narray/number\n[200, 200, 'fill']\n\n\nrowSize\n行高\narray/number\n30\n\n\nhgap\n内部元素间纵向距离\nnumber\n0\n\n\nvgap\n内部元素间横向距离\nnumber\n0\n\n\nitems\n子项\narray\n[{width: 100,el: {type: 'bi.button', text: 'button1'}},{width: 'fill',el: {type: 'bi.button', text: 'button2'}},{width: 200,el: {type: 'bi.button', text: 'button3'}}]\n\n\n\n方法\n\n\n\n方法名\n说明\n用法\n\n\n\n\naddItem\n增加内容\naddItem(arr)\n\n\npopulate\n更换新的内容\npoplulate(items)\n\n\n\n"},"core/layout/td.html":{"url":"core/layout/td.html","title":"td","keywords":"","body":"bi.td\n单元格控件,继承BI.Layout\nsource\nBI.createWidget({\n type: \"bi.td\",\n element: 'body',\n columnSize: [20, 20, 'fill'],\n items: []\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncolumnSize\n列宽\narray\n[200, 200, 200]\n\n\nhgap\n纵向间隙\nnumber\n0\n\n\nvgap\n横向间隙\nnumber\n0\n\n\nitems\n内容项\narray\n[[{el: {text: 'label1'}},{ el: {text: 'label2'},{ el: {text: 'label3'}\n\n\n\n方法\n\n\n\n方法名\n说明\n用法\n\n\n\n\naddItem\n增加内容\naddItem(arr)\n\n\npopulate\n更换新的内容\npoplulate(items)\n\n\n\n"},"core/abstract/button_group.html":{"url":"core/abstract/button_group.html","title":"button_group","keywords":"","body":"bi.button_group\n一组具有相同属性的元素集合,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.button_group\",\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\n layouts: [{\n type: \"bi.vertical\"\n }],\n items: [{\n el: {\n type: \"bi.label\",\n text: \"button_group\"\n },\n height: 50,\n }]\n})\n\n\n\nAPI\n基础属性\nchooseType可选值为 CHOOSE_TYPE_SINGLE,CHOOSE_TYPE_MULTI,CHOOSE_TYPE_ALL,CHOOSE_TYPE_NONE,CHOOSE_TYPE_DEFAULT\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义列表中item项的行为,如高亮,标红等\nobject\n—\n{ }\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nchooseType\n选择类型\nconst\n见上\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\nlayouts\n布局\narray\n—\n[{type: \"bi.center\",hgap: 0,vgap: 0}]\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoBehavior\n自定义列表中item项的行为,如高亮,标红等\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\nremoveItems\n移除制定元素\nvalues\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetEnabledValue\n设置value值可用\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/abstract/button_tree.html":{"url":"core/abstract/button_tree.html","title":"button_tree","keywords":"","body":"bi.button_tree\n一组具有相同属性的元素集合,基类BI.ButtonGroup\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.button_tree\",\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\n layouts: [{\n type: \"bi.vertical\"\n }],\n items: [{\n type: \"bi.label\",\n text: \"0\",\n value: \"label1\",\n height:50,\n vgap:10\n }]\n})\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetEnabledValue\n设置value值可用\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\n\n\n"},"core/abstract/virtual_group.html":{"url":"core/abstract/virtual_group.html","title":"virtual_group","keywords":"","body":"bi.virtual_group\n一组具有相同属性的元素集合,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.virtual_group\",\n width: 500,\n height: 300,\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\n layouts: [{\n type: \"bi.vertical\"\n }, {\n type: \"bi.center_adapt\",\n }],\n items:[]\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nlayouts\n布局\narray\n—\n[{type: \"bi.center\",hgap: 0,vgap: 0}]\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetValue\n获取被选中的值\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nitems\n\n\nrender\n渲染列表\n—\n\n\n\n\n"},"core/abstract/custom_tree.html":{"url":"core/abstract/custom_tree.html","title":"custom_tree","keywords":"","body":"bi.custom_tree\n自定义树,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.custom_tree\",\n el: {\n type: \"bi.button_tree\",\n chooseType: 0,\n layouts: [{\n type: \"bi.vertical\",\n hgap: 30\n }]\n },\n items: [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n open: true,\n type: \"bi.plus_group_node\",\n height: 25\n },\n {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n type: \"bi.plus_group_node\",\n height: 25\n },\n {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n type: \"bi.single_select_item\",\n height: 25\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nitemsCreator\n子组件构造器\nobject\n—\n{ }\n\n\nexpander\n\nobject\n\n{el: {},popup: {type: \"bi.custom_tree\"}}\n\n\nel\n\nobject\n\n{type: \"bi.button_tree\",chooseType: 0,layouts: [{type: \"bi.vertical\"}]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ninitTree\n构造树结构\nnodes\n\n\nstroke\n生成树方法\nnodes\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nnodes\n\n\nrender\n渲染列表\n—\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\n\n\n"},"core/abstract/grid_view.html":{"url":"core/abstract/grid_view.html","title":"grid_view","keywords":"","body":"bi.grid_view\nGridView,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.grid_view\",\n width: 400,\n height: 300,\n estimatedRowSize: 30,\n estimatedColumnSize: 100,\n items: [],\n scrollTop: 100,\n rowHeightGetter: function () {\n return 30;\n },\n columnWidthGetter: function () {\n return 100;\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\noverflowX\n是否显示横向滚动条\nboolean\ntrue,false\ntrue\n\n\noverflowY\n是否显示纵向滚动条\nboolean\ntrue,false\ntrue\n\n\noverscanColumnCount\n\nnumber\n—\n0\n\n\noverscanRowCount\n\nnumber\n—\n0\n\n\nwidth\n行宽,必设\nnumber\n—\n—\n\n\nheight\n列宽,必设\nnumber\n—\n—\n\n\nrowHeightGetter\n每格行宽\nnumber,function\n—\nfunction\n\n\ncolumnWidthGetter\n每格列宽\nnumber,function\n—\nfunction\n\n\nestimatedColumnSize\n每格行宽,columnWidthGetter为function时必设\nnumber,function\n—\nfunction\n\n\nestimatedRowSize\n每格列宽,rowHeightGetter为function时必设\nnumber,function\n—\nfunction\n\n\nscrollLeft\n滚动条相对于左边的偏移\nnumber\n—\n0\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetScrollLeft\n设置滚动条相对于左边的偏移\nscrollLeft\n\n\nsetScrollTop\n设置滚动条相对于顶部的偏移\nscrollTop\n\n\nsetOverflowX\n设置是否显示横向滚动条\nb\n\n\nsetOverflowY\n设置是否显示横向滚动条\nb\n\n\ngetScrollLeft\n获取滚动条相对于左边的偏移\n—\n\n\ngetScrollTop\n获取滚动条相对于顶部的偏移\n—\n\n\ngetMaxScrollLeft\n获取滚动条相对于左边的最大偏移\n—\n\n\ngetMaxScrollTop\n获取滚动条相对于顶部的最大偏移\n—\n\n\nsetEstimatedColumnSize\n设置列宽\nwidth\n\n\nsetEstimatedRowSize\n设置行宽\nheight\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n回调参数\n\n\n\n\nBI.CollectionView.EVENT_SCROLL\n滚动时触发的事件\n{scrollLeft: scrollLeft, scrollTop: scrollTop}\n\n\n\n\n"},"core/abstract/collection_view.html":{"url":"core/abstract/collection_view.html","title":"collection_view","keywords":"","body":"bi.collection_view\nCollectionView,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.collection_view\",\n element:\"#wrapper\",\n width: 400,\n height: 300,\n items: [],\n cellSizeAndPositionGetter: function (index) {\n return {\n x: index % 10 * 50,\n y: Math.floor(index / 10) * 50,\n width: 50,\n height: 50\n }\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\noverflowX\n是否显示横向滚动条\nboolean\ntrue,false\ntrue\n\n\noverflowY\n是否显示纵向滚动条\nboolean\ntrue,false\ntrue\n\n\ncellSizeAndPositionGetter\n设置每个单元格的位置坐标和宽高\nfunction\n—\n—\n\n\nhorizontalOverscanSize\n\nnumber\n—\n0\n\n\nverticalOverscanSize\n\nnumber\n—\n0\n\n\nwidth\n行宽,必设\nnumber\n—ßß\n—\n\n\nheight\n列宽,必设\nnumber\n—\n—\n\n\nscrollLeft\n滚动条相对于左边的偏移\nnumber\n—\n0\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetScrollLeft\n设置滚动条相对于左边的偏移\nscrollLeft\n\n\nsetScrollTop\n设置滚动条相对于顶部的偏移\nscrollTop\n\n\nsetOverflowX\n设置是否显示横向滚动条\nb\n\n\nsetOverflowY\n设置是否显示横向滚动条\nb\n\n\ngetScrollLeft\n获取滚动条相对于左边的偏移\n—\n\n\ngetScrollTop\n获取滚动条相对于顶部的偏移\n—\n\n\ngetMaxScrollLeft\n获取滚动条相对于左边的最大偏移\n—\n\n\ngetMaxScrollTop\n获取滚动条相对于顶部的最大偏移\n—\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n回调参数\n\n\n\n\nBI.GridView.EVENT_SCROLL\n滚动时触发的事件\n{scrollLeft: scrollLeft, scrollTop: scrollTop}\n\n\n\n\n"},"core/abstract/virtual_list.html":{"url":"core/abstract/virtual_list.html","title":"virtual_list","keywords":"","body":"bi.virtual_list\nVirtualList,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.virtual_list\",\n element:\"body\",\n items: BI.map([{value: \"xxxx\"}], function (i, item) {\n return BI.extend({}, item, {\n type: \"bi.label\",\n height: 30,\n text: (i + 1) + \".\" + item.text,\n });\n })\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nblockSize\n\nnumber\n—\n10\n\n\noverscanHeight\n\nnumber\n—\n100\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染列表\n—\n\n\nmounted\n组件挂载\n—\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\ndestroyed\n销毁组件\n—\n\n\n\n\n"},"core/combination/bi.combo.html":{"url":"core/combination/bi.combo.html","title":"combo","keywords":"","body":"bi.combo\ncombo,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.combo\",\n element: \"body\",\n adjustLength: 2,\n el: {\n type: \"bi.button\",\n text: \"测试\",\n height: 25\n },\n popup: {}\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\ndestroyWhenHide\n隐藏弹窗层是否销毁\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustHeight\n是否需要高度调整\nboolean\ntrue,false\ntrue\n\n\nisNeedAdjustWidth\n是否需要宽度调整\nboolean\ntrue,false\ntrue\n\n\nstopEvent\n是否阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止事件冒泡\nboolean\ntrue,false\nfalse\n\n\nadjustXOffset\n调整横向偏移\nnumber\n—\n0\n\n\nadjustYOffset\n调整纵向偏移\nnumber\n—\n0\n\n\nhideChecker\n\nfunction\n—\n—\n\n\noffsetStyle\n弹出层显示位置\nstring\nleft,right,center\n\"left,right,center\"\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\ncomboClass\ncombo类\nstring\n—\n\"bi-combo-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-combo-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nadjustWidth\n调整宽度\n—\n\n\nadjustHeight\n调整高度\n—\n\n\nresetListHeight\n重置列表高度\nheight\n\n\nresetListWidth\n重置列表宽度\nwidth\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetPopupPosition\n获取弹出层的位置\n—\n\n\ntoggle\n开启或者隐藏弹出层\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Combo.EVENT_TRIGGER_CHANGE\ntrigger发生改变触发\n\n\nBI.Combo.EVENT_CHANGE\n弹出层点击触发\n\n\nBI.Combo.EVENT_EXPAND\n下拉框展开触发\n\n\nBI.Combo.EVENT_COLLAPSE\n下拉框收起触发\n\n\nBI.Combo.EVENT_AFTER_INIT\n下拉框初始化后触发\n\n\nBI.Combo.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\nBI.Combo.EVENT_AFTER_POPUPVIEW\n下拉列表弹出后触发\n\n\nBI.Combo.EVENT_BEFORE_HIDEVIEW\n下拉列表收起前触发\n\n\nBI.Combo.EVENT_AFTER_HIDEVIEW\n下拉列表收起后触发\n\n\n\n\n"},"core/combination/bi.expander.html":{"url":"core/combination/bi.expander.html","title":"expander","keywords":"","body":"bi.expander\n某个可以展开的节点,基类BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nexpanderClass\n展开类\nstring\n—\n\"bi-expander-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-expander-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nisExpanded\n节点是否展开\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Expander.EVENT_TRIGGER_CHANGE\ntrigger发生改变触发\n\n\nBI.Expander.EVENT_CHANGE\n弹出层点击触发\n\n\nBI.Expander.EVENT_EXPAND\nExpander展开触发\n\n\nBI.Expander.EVENT_COLLAPSE\nExpander收起触发\n\n\nBI.Expander.EVENT_AFTER_INIT\nExpander初始化后触发\n\n\nBI.Expander.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\nBI.Expander.EVENT_AFTER_POPUPVIEW\n下拉列表弹出后触发\n\n\nBI.Expander.EVENT_BEFORE_HIDEVIEW\n下拉列表收起前触发\n\n\nBI.Expander.EVENT_AFTER_HIDEVIEW\n下拉列表收起后触发\n\n\n\n\n"},"core/combination/group_combo.html":{"url":"core/combination/group_combo.html","title":"group_combo","keywords":"","body":"bi.combo_group\n基类BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nchildern\n子组件\narray\n—\n[ ]\n\n\npopup\n弹出层\nobject\n—\n{el: {type: \"bi.button_tree\",chooseType: 0,layouts: [{type: \"bi.vertical\"}]}}\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustHeight\n是否需要高度调整\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustWidth\n是否需要宽度调整\nboolean\ntrue,false\nfalse\n\n\nel\n自定义下拉框trigger\nobject\n—\n{type: \"bi.text_button\", text: \"\", value: \"\"}\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\n\n\n"},"core/combination/loader.html":{"url":"core/combination/loader.html","title":"loader","keywords":"","body":"bi.loader\n加载控件,BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\ncombo弹出层位置\nstring\ntop,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)\n\"top\"\n\n\nisDefaultInit\n是否默认初始化子数据\nboolean\ntrue,false\ntrue\n\n\nlogic\n\nobject\n—\n{dynamic:true,scrolly:true}\n\n\nitems\n子组件\narray\n—\n[]\n\n\nitemsCreator\n子组件构造器\nfunction\n—\n—\n\n\nonLoaded\n加载中\nfunction\n—\n—\n\n\ncount\n是否显示总页数\nboolean\ntrue,false\nboolean\n\n\nprev\n上一页\nboolean\ntrue,false\nboolean\n\n\nnext\n下一页\nboolean\ntrue,false\nboolean\n\n\nhasPrev\n判断是否有上一页\nfunction\n—\n—\n\n\nhasNext\n判断是否有下一页\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nhasNext\n判断是否有下一页\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/combination/navigation.html":{"url":"core/combination/navigation.html","title":"navigation","keywords":"","body":"bi.navigation\n导航栏控件,BI.Widget\nsource\n\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.navigation\",\n tab: {\n height: 30,\n items: [{\n once: false,\n text: \"后退\",\n value: -1\n }, {\n once: false,\n text: \"前进\",\n value: 1\n }]\n },\n cardCreator: function(v) {\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"layout-bg\" + BI.random(1, 8),\n text: \"第\" + v + \"页\"\n })\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n控件位置\nstring\ntop,bottom,left,right,custom\n\"bottom\"\n\n\nsingle\n是否为单页\nboolean\ntrue,false\ntrue\n\n\ndefaultShowIndex\n是否默认显示\nboolean\ntrue,false\ntrue\n\n\ntab\ntab页元素\nboolean\ntrue,false\ntrue\n\n\nlogic\n\nobject\n\n{dynamic:true}\n\n\ncardCreator\n面板构造器\nfunction\n—\nv\n\n\nafterCardCreated\n面板构造之后\nfunction\n—\n—\n\n\nafterCardShow\n面板显示之后\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染组件\n—\n\n\nmounted\n挂载组件\n—\n\n\nafterCardCreated\n创建卡导航页页之后\nv\n\n\nafterCardShow\n导航页展示之后\nv\n\n\nsetSelect\n设置选中的index\nv\n\n\ngetSelect\n获取选中的index\n—\n\n\ngetSelectedCard\n获取选中的导航页\n—\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/combination/searcher.html":{"url":"core/combination/searcher.html","title":"searcher","keywords":"","body":"bi.searcher\n搜索逻辑控件,BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.searcher\",\n element:\"#wrapper\",\n adapter: {\n getItems: function () {\n return [{\n type: \"bi.label\",\n value: \"张三\"\n }]\n }\n },\n popup: {\n type: \"bi.button_group\",\n cls: \"bi-border\",\n items: items,\n layouts: [{\n type: \"bi.vertical\"\n }],\n },\n masker: false\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nchooseType\n选择类型\nconst\n\nCHOOSE_TYPE_SINGLE\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\nisAutoSearch\n是否自动搜索\nboolean\ntrue,false\ntrue\n\n\nisAutoSync\n是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一\nboolean\ntrue,false\ntrue\n\n\nonSearch\nisAutoSearch为false时启用\nfunction(op.callback)\n—\n—\n\n\nel\n开启弹出层的元素\nobject\n—\n{type: \"bi.search_editor\"}\n\n\npopup\n弹出层\nobject\n—\n{type: \"bi.searcher_view\"}\n\n\nadapter\n弹出层显示的位置元素\nobject\n—\nnull\n\n\nmasker\nmasker层\nobject\n—\n{offset: {}}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nresult, searchResult, keyword\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\nadapter\n搜索列表位置\n—\n\n\ndoSearch\n开始搜索\n—\n\n\nstopSearch\n停止搜索\n—\n\n\nisSearching\n是否正在搜索\n—\n\n\nisViewVisible\n组件是否可见\n—\n\n\ngetView\n获取搜索列表栏\n—\n\n\nhasMatched\n是否匹配\n—\n\n\nadjustHeight\n调整高度\n—\n\n\nadjustView\n调整搜索列表栏\n—\n\n\ngetKeyword\n获取搜索关键词\n—\n\n\ngetKeywords\n获取搜索关键词数组\n—\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_START\n开始搜索\n—\n\n\nEVENT_STOP\n停止搜索\n—\n\n\nEVENT_PAUSE\n暂停搜索\n—\n\n\nEVENT_SEARCHING\n搜索中\n—\n\n\nEVENT_AFTER_INIT\n初始化之后\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Searcher.EVENT_CHANGE\n搜索结果面板发生改变触发\n\n\nBI.Searcher.EVENT_START\n开始搜索触发\n\n\nBI.Searcher.EVENT_STOP\n停止搜索触发(搜索框为空)\n\n\nBI.Searcher.EVENT_PAUSE\n搜索暂停触发(搜索文本以空白字符结尾)\n\n\nBI.Searcher.EVENT_SEARCHING\n正在搜索时触发\n\n\nBI.Searcher.EVENT_AFTER_INIT\n搜索结果面板初始化完成后触发\n\n\n\n\n"},"core/combination/switcher.html":{"url":"core/combination/switcher.html","title":"switcher","keywords":"","body":"bi.switcher\n切换显示或隐藏面板,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.switcher\",\n el: {\n type: \"bi.button\",\n height: 25,\n text: \"Switcher\"\n },\n popup: {\n\n },\n adapter: { \n\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n面板显示的位置\nstring\n—\nBI.Direction.Top\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nadapter\n弹出层的位置\nobject\n—\nnull\n\n\nmasker\nmasker层\nobejct\n—\n{ }\n\n\nswitcherClass\n切换类\nstring\n—\n\"bi-switcher-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-switcher-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\npopulate\n刷新列表\nitems\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nisExpanded\n节点是否展开\n—\n\n\nsetAdapter\n设置弹出层显示的位置元素\nadapter\n\n\nadjustView\n调整弹出层显示的位置元素\n—\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_EXPAND\n面板展开\n—\n\n\nEVENT_COLLAPSE\n面板收起\n—\n\n\nEVENT_TRIGGER_CHANGE\n面板切换\n—\n\n\nEVENT_AFTER_INIT\n初始化之后\n—\n\n\nEVENT_BEFORE_POPUPVIEW\n面板显示之前\n—\n\n\nEVENT_AFTER_POPUPVIEW\n面板显示之后\n—\n\n\nEVENT_BEFORE_HIDEVIEW\n面板隐藏之前\n—\n\n\nEVENT_AFTER_HIDEVIEW\n面板隐藏之后\n—\n\n\n\n\n"},"core/combination/tab.html":{"url":"core/combination/tab.html","title":"tab","keywords":"","body":"bi.switcher\n切换显示或隐藏面板,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.tab\",\n tab: {\n type: \"bi.button_group\",\n height: 30,\n items: [{\n text: \"Tab1\",\n value: 1,\n width: 50\n }, {\n text: \"Tab2\",\n value: 2,\n width: 50\n }]\n },\n cardCreator: function(v) {\n switch (v) {\n case 1:\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"bi-card\",\n text: \"面板1\"\n })\n case 2:\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"bi-card\",\n text: \"面板2\"\n })\n }\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n控件位置\nstring\ntop,bottom,left,right,custom\n\"bottom\"\n\n\nsingle\n是否为单页\nboolean\ntrue,false\nfalse\n\n\ndefaultShowIndex\n是否默认显示tab页\nboolean\ntrue,false\nfalse\n\n\ntab\ntab标签页\nobject\n—\n{ }\n\n\nlogic\n\nobject\n—\n{dynamic:false}\n\n\ncardCreator\n面板构造器\nfunction\n—\nfunction (v) {return BI.createWidget();}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染组件\n—\n\n\nmounted\n挂载组件\n—\n\n\nremoveTab\n移除tab面板页\ncardname\n\n\ngetTab\n获取tab面板页\nv\n\n\nsetSelect\n设置选中的index\nv\n\n\ngetSelect\n获取选中的index\n—\n\n\ngetSelectedTab\n获取选中的tab面板页\n—\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/layer/layer_float_box.html":{"url":"core/layer/layer_float_box.html","title":"float_box","keywords":"","body":"bi.float_box\nfloatBox弹出层,BI.Widget\nsource\n\nvar id = BI.UUID();\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.text_button\",\n text: \"点击弹出FloatBox\",\n width: 200,\n height: 80,\n handler: function() {\n BI.Popovers.remove(id);\n BI.Popovers.create(id, new BI.BarPopoverSection()).open(id);\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwidth\n弹出层宽度\nnumber\n—\n600\n\n\nheight\n弹出层高度\nnumber\n—\n500\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nsectionProvider\n\n\ndestroyed\n销毁组件\n—\n\n\nshow\n显示\n—\n\n\nhide\n隐藏\n—\n\n\nopen\n打开弹出层\n—\n\n\nclose\n关闭弹出层\n—\n\n\nsetZindex\n设置z-index\nz-index\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_FLOAT_BOX_CLOSED\n关闭弹出层\n—\n\n\nEVENT_FLOAT_BOX_CLOSED\n打开弹出层\n—\n\n\n\n\n"},"core/layer/layer_popup.html":{"url":"core/layer/layer_popup.html","title":"popup","keywords":"","body":"bi.popup_view\n下拉框弹出层, zIndex在1000w,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.popup_view\",\n el: {\n type: \"bi.button_group\",\n items: [{\n text: \"aaa\",\n value: \"aaa\"\n }, {\n text: \"bbb\",\n value: \"bbb\"\n }],\n layouts: [{\n type: \"bi.vertical\"\n }]\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmaxWidth\n弹出层最大宽度\nnumber/string\n—\n\"auto\"\n\n\nminWidth\n弹出层最小宽度\nnumber\n—\n100\n\n\nmaxHeight\n弹出层最大高度\nnumber/string\n—\n—\n\n\nminHeight\n弹出层最小高度\nnumber\n—\n25\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ndirection\n工具栏的方向\nconst\n\nBI.Direction.Top\n\n\nstopEvent\n是否停止mousedown、mouseup事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n是否停止mousedown、mouseup向上冒泡\nboolean\ntrue,false\nfalse\n\n\ntabs\n导航栏\narray\n—\n[]\n\n\nlogic\n\nobject\n—\n{dynamic:true}\n\n\ntools\n自定义工具栏\nboolean\ntrue,false\nfalse\n\n\nbuttons\ntoolbar栏\narray\n—\n[]\n\n\nel\n子组件\nobject\n—\n{ type: \"bi.button_group\",items: [], chooseType: 0,behaviors: {},layouts: [{type: \"bi.vertical\"}]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nresetWidth\n重置宽度\nwidth\n\n\nresetHeight\n重置高度\nheight\n\n\nsetValue\n设置value 值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\nsetZindex\n设置z-index\nz-index\n\n\ngetView\n获取弹出层\n—\n\n\n\n\n"},"core/layer/layer_searcher.html":{"url":"core/layer/layer_searcher.html","title":"searcher","keywords":"","body":"bi.searcher_view\n搜索面板, 基类BI.Widget\nsource\n\nvar searcher = BI.createWidget({\n element: \"#wrapper\",\n type: \"bi.searcher_view\",\n});\nsearcher.populate([{\n text: \"aba\",\n value: \"aba\"\n},{\n text: \"acc\",\n value: \"acc\"\n}], [{\n text: \"a\",\n value: \"a\"\n}], \"a\");\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntipText\ntitle文本\nstring\n—\nBI.i18nText(\"BI-No_Select\")\n\n\nchooseType\n选择类型\nconst\n\nBI.Selection.Single\n\n\nmatcher\n完全匹配的构造器\nobject\n—\n{type: \"bi.button_group\",behaviors: { redmark: function () { return true;} },items: [], layouts: [{ type: \"bi.vertical\"}]}\n\n\nsearcher\n\nobject\n—\n{type: \"bi.button_group\",behaviors: {redmark: function () {return true;}}, items: [], layouts: [{ type: \"bi.vertical\" }]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nsearchResult, matchResult, keyword\n\n\nsetValue\n设置value 值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\nempty\n清空组件\n—\n\n\nhasMatched\n是否有匹配的元素\n—\n\n\n\n\n"},"core/widget.html":{"url":"core/widget.html","title":"widget","keywords":"","body":"bi.widget\n所有控件的超类\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nroot\n根组件\nboolean\ntrue,false\nfalse\n\n\ntagName\nhtml标签\nstring\n—\n\"div\"\n\n\nattributes\n属性\nobject\n—\nnull\n\n\ndata\n数据\nobject\n—\nnull\n\n\ndisabled\n是否可用\nboolean\ntrue,false\nfalse\n\n\ninvisible\n是否可见\nboolean\ntrue,false\nfalse\n\n\ninvalid\n是否有效\nboolean\ntrue,false\nfalse\n\n\nbaseCls\n基础class类\nstring\n—\n\" \"\n\n\nextraCls\n扩展class类\nstring\n—\n\" \"\n\n\ncls\nclass类名\nstring\n—\n\" \"\n\n\n\n生命周期函数\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbeforeCreate\n组件实例刚被创建\n—\n\n\ncreated\n组件实例创建完成\n—\n\n\nrender\n渲染组件\n—\n\n\nbeforeMounted\n组件挂载之前\n—\n\n\nmounted\n组件挂载\n—\n\n\nupdate\n组件更新\n—\n\n\nbeforeDestroyed\n组件销毁前调用\n—\n\n\ndestroyed\n组件销毁后调用\n—\n\n\n\n对外方法\n(注: fineui2.0引入生命周期后,widget的实现类不需要重写setEnable,setValid等方法,会自动调用子组件的对应方法\n,一些需要在设置状态后做的额外工作可以通过重写_setXXX来实现)\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nisMounted\n判断组件是否挂载\n—\n\n\nsetWidth\n设置组件宽度\nwidth\n\n\nsetHeight\n设置组件高度\nheight\n\n\nsetEnable\n设置组件是否可用\nenable\n\n\nsetVisible\n设置组件是否可见\nvisible\n\n\nsetValid\n设置组件是否有效\nvalid\n\n\ndoBehavior\n自定义下拉列表中item项的行为,如高亮,标红等\n—\n\n\ngetWidth\n获取组件宽度\n—\n\n\ngetHeight\n获取组件高度\n—\n\n\nisValid\n判断是否有效\n—\n\n\naddWidget\n添加组件\nname,widget\n\n\ngetWidgetByName\n根据组件名称获取组件\nname\n\n\nremoveWidget\n移除组件\nnameOrWidget\n\n\nhasWidget\n判断是否有该组件\nname\n\n\ngetName\n获取组件名称\n\n\n\nsetTag\n设置tag\ntag\n\n\ngetTag\n获取tag\n—\n\n\nattr\n设置组件属性\nkey,value\n\n\ngetText\n获取text值\n—\n\n\nsetText\n设置text值\ntext\n\n\ngetValue\n获取value值\n—\n\n\nsetValue\n设置value值\nvalue\n\n\nisEnabled\n是否可用\n—\n\n\nisVisible\n是否可见\n—\n\n\ndisable\n设置组件不可用\n—\n\n\nenable\n设置组件可用\n—\n\n\nvalid\n设置组件有效\n—\n\n\ninvalid\n设置组件无效\n—\n\n\ninvisible\n设置组件不可见\n—\n\n\nvisible\n设置组件可见\n—\n\n\nisolate\n\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/single.html":{"url":"core/single.html","title":"single","keywords":"","body":"bi.single\n这仅仅只是一个超类, 所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nreadonly\n是否只读\nboolean\ntrue,false\nfalse\n\n\ntitle\ntitle\nstring\n—\nnull\n\n\nwarningTitle\n错误title\nstring\n—\nnull\n\n\ntipType\ntitle类型\nstring\nsuccess,warning\nnull\n\n\nvalue\n组件value值\nstring\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nenableHover\n恢复hover可用\nopt\n\n\ndisabledHover\n取消hover事件\n—\n\n\npopulate\n刷新或者清空列表\nitems\n\n\nsetTitle\n设置title\ntitle,opt\n\n\nsetWarningTitle\n设置错误title\ntitle,opt\n\n\ngetTipType\n获取tipType\n—\n\n\nisReadOnly\n是否只读\n—\n\n\ngetTitle\n获取title\n—\n\n\ngetWarningTitle\n获取warningtitle\n—\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\n\n\n"},"core/basic_button.html":{"url":"core/basic_button.html","title":"basic_button","keywords":"","body":"bi.basic_button\n一般的button父级,基类BI.Single\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n组件value值\nstring\n—\nnull\n\n\nstopEvent\n阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止冒泡\nboolean\ntrue,false\nfalse\n\n\nselected\nbutton的选中状态\nboolean\ntrue,false\nfalse\n\n\nonce\n点击一次选中有效,再点无效\nboolean\ntrue,false\nfalse\n\n\nforceSelected\n点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\nboolean\ntrue,false\nfalse\n\n\nforceNotSelected\n无论怎么点击都不会被选中\nboolean\ntrue,false\nfalse\n\n\ndisableSelected\n使能选中\nboolean\ntrue,false\nfalse\n\n\nshadow\n是否显示阴影\nboolean\ntrue,false\nfalse\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\nfalse\n\n\ntrigger\n被选元素要触发的事件\nstring\nmousedown, mouseup, click, dblclick, lclick\nnull\n\n\nhandler\n点击事件回调\nfunction\n—\nBI.emptyFn\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbindEvent\n绑定事件\n—\n\n\nbeforeClick\n点击事件之前\n—\n\n\ndoClick\n点击事件\n—\n\n\nhandle\n返回该对象\n—\n\n\nhover\nhover事件\n—\n\n\ndishover\n取消hover事件\n—\n\n\nsetSelected\n设置选中的文本\nb\n\n\nisSelected\n是否被选中\n—\n\n\nisOnce\n是否只允许点击一次\n—\n\n\nisForceSelected\n判断是否点击即选中\n—\n\n\nisForceNotSelected\n判断是否怎么点击都不会被选中\n—\n\n\nisDisableSelected\n判断是否让选中\n—\n\n\nsetText\n设置文本值\n—\n\n\ngetText\n获取文本值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/node_button.html":{"url":"core/node_button.html","title":"node_button","keywords":"","body":"bi.NodeButton\n表示一个可以展开的节点, 不仅有选中状态而且有展开状态, BI.BasicButton\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nopen\n节点是否展开\nboolean\ntrue,false\nfalse\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击展开\n—\n\n\nisOnce\n点击一次后失效\n—\n\n\nisOpened\n判断节点是否展开\n—\n\n\nsetOpened\n设置节点展开状态\nb\n\n\ntriggerCollapse\n节点收起\n—\n\n\ntriggerExpand\n节点展开\n—\n\n\n\n\n"},"core/pane.html":{"url":"core/pane.html","title":"pane","keywords":"","body":"bi.pane\n当没有元素时有提示信息的view, BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntipText\ntitle文本\nstring\n—\nBI.i18nText(\"BI-No_Selected_Item\")\n\n\noverlap\n\nboolean\ntrue,false\ntrue\n\n\nonLoaded\n\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nempty\n清空组件\n—\n\n\nhasMatched\n是否有匹配的元素\n—\n\n\nloading\n加载中\n—\n\n\nloaded\n加载完毕\n—\n\n\ncheck\n检查是否为空\n—\n\n\nsetTipVisible\n设tip可见\n—\n\n\n\n\n"},"base/label.html":{"url":"base/label.html","title":"label","keywords":"","body":"bi.label\n文本标签\nsource\n\nBI.createWidget({\n type: \"bi.label\",\n textWidth: 100,\n textHeight: 30,\n text: \"基本标签\"\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ntextWidth\n文本标签宽度\nnumber\n—\nnull\n\n\ntextHeight\n文本标签宽度\nnumber\n—\nnull\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\ncenter\n\n\nwhiteSpace\n元素内空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\ntrue\n\n\npy\n\nstring\n—\n空\n\n\nkeyword\n\nstring\n—\n空\n\n\ndisabled\n灰化\nboolean\ntrue,false\n无\n\n\ntitle\n提示title\nstring\n—\n空\n\n\nwarningTitle\n错误提示title\nstring\n—\n空\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ngetText\n获取文本值\n—\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式,例{\"color\":\"#000\"}\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\npopulate\n\n—\n\n\n\n\n"},"base/bubble.html":{"url":"base/bubble.html","title":"bubble","keywords":"","body":"bi.bubble\n气泡提示\nsource\n\nBI.createWidget({\n type: 'bi.bubble',\n element: \"#wrapper\",\n height: 30,\n text: \"测试\"\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n气泡显示位置\nstring\n—\n\"top\"\n\n\nheight\n气泡高度\nnumber\n—\n35\n\n\ntext\n气泡显示内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\n\n\n"},"base/toast.html":{"url":"base/toast.html","title":"toast","keywords":"","body":"bi.toast\ntoast提示\nsource\n\nBI.createWidget({\n type: 'bi.toast',\n element: \"#wrapper\",\n height: 30,\n level: \"warning\",\n text: \"toast测试\"\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlevel\n提示类型\nstring\nsuccess,warning\n\"success\"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n显示内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\nsetHeight\n设置高度\n需要设置的高度值height\n\n\n\n\n"},"base/message.html":{"url":"base/message.html","title":"message","keywords":"","body":"bi.Msg\n消息提示\nsource\n\nBI.createWidget({\n type: \"bi.button\",\n element: \"#wrapper\",\n text : '点击我弹出一个消息框',\n height : 30,\n handler : function() {\n BI.Msg.confirm('测试消息框',\"我是测试消息框的内容\");\n }\n});\n\n\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nalert\n警告消息框\ntitle, message, callback\n\n\nconfirm\n确认消息框\ntitle, message, callback\n\n\nprompt\n提示消息框\ntitle, message, value, callback, min_width\n\n\ntoast\ntoast提示\nmessage, level, context\n\n\n\n\n"},"base/button/button.html":{"url":"base/button/button.html","title":"button","keywords":"","body":"bi.button\n文字类型的按钮,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.button',\n element: \"#wrapper\",\n text: '一般按钮',\n level: 'common',\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlevel\n按钮类型\nstring\ncommon,success,warning,ignore\ncommon\n\n\nminWidth\n最小宽度,如果block/clear中某一项为true,此项值为0,否则为90\nnumber\n—\n90\n\n\nshadow\n\nboolean\ntrue,false\n\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\ntrue\n\n\nreadonly\n是否只读\nboolean\ntrue,false\ntrue\n\n\niconClass\n图标类型\nstring\n—\n\" \"\n\n\nblock\n是否块状显示,即不显示边框,没有最小宽度的限制\nboolean\ntrue,false\nfalse\n\n\nclear\n是否去掉边框和背景\nboolean\ntrue,false\nfalse\n\n\ntextAlign\n文字布局\nstring\nleft,center,right\ncneter\n\n\nwhiteSpace\n元素内的空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\nfalse\n\n\ntextWidth\n按钮文本宽度\nnumber\n—\nnull\n\n\ntextHeight\n按钮文本高度\nnumber\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ndoClick\n点击事件\n—\n\n\ndestroy\n销毁事件\n—\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\n\n\n"},"base/button/text_button.html":{"url":"base/button/text_button.html","title":"text_button","keywords":"","body":"bi.text_button\n可以点击的一行文字,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.text_button',\n text: '文字按钮',\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntext\n按钮文本内容\nstring\n—\n—\n\n\ntextWidth\n按钮文本宽度\nnumber\n—\nnull\n\n\ntextHeight\n按钮文本高度\nnumber\n—\nnull\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\npy\n\nstring\n\n\" \"\n\n\ntextAlign\n文字布局\nstring\nleft,center,right\ncneter\n\n\nwhiteSpace\n元素内的空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\nfalse\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ndoClick\n点击事件\n—\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式,例{\"color\":\"#000\"}\n\n\n\n\n"},"base/button/icon_button.html":{"url":"base/button/icon_button.html","title":"icon_button","keywords":"","body":"bi.icon_button\n图标button,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.icon_button',\n cls: \"close-ha-font\",\n width: 20,\n height: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\niconWidth\n图标宽度\nnumber\n—\nnull\n\n\niconHeight\n图标高度\nnumber\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"base/button/image_button.html":{"url":"base/button/image_button.html","title":"image_button","keywords":"","body":"bi.image_button\n图片的button,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.image_button',\n src: \"http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128\",\n width: 100,\n height: 100\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nsrc\n图片路径\nstring\n—\n\" \"\n\n\niconWidth\n图标宽度\nnumber/string\n—\n\"100%\"\n\n\niconHeight\n图标高度\nnumber/string\n—\n\"100%\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击事件\n—\n\n\nsetWidth\n设置按钮宽度\n宽度width\n\n\nsetHeight\n设置按钮高度\n高度height\n\n\nsetImageWidth\n设置图片宽度\n宽度width\n\n\nsetImageHeight\n设置图片高度\n高度height\n\n\ngetImageWidth\n获取图片宽度\n—\n\n\ngetImageHeight\n获取图片高度\n—\n\n\nsetSrc\n设置图片路径\nsrc\n\n\ngetSrc\n获取图片路径\n—\n\n\n\n\n"},"base/editor/editor.html":{"url":"base/editor/editor.html","title":"editor","keywords":"","body":"bi.editor\n文本框,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.editor\",\n element: \"#wrapper\",\n errorText: \"字段不可重名!\",\n width: 200,\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nmouseOut\n\nboolean\ntrue,false\nfalse\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\ntipType\n提示类型\nstring\nsuccess,warning\n\"warning\"\n\n\ninputType\n输入框类型\nstring\n参考input输入框类型\n\"text\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nsetErrorVisible\n设置错误文本可见\nb\n\n\ndisableError\n设置error不可用\n—\n\n\nenableError\n设置error可用\n—\n\n\ndisableWaterMark\n设置文本框placeholder不可用\n—\n\n\nenableWaterMark\n恢复文本框placeholder可用\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nselectAll\n选中文本框文本\n—\n\n\nonKeyDown\n按键事件\nkey\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\nresetLastValidValue\n重置文本框最后一次输入的有效值\nvalue\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"base/editor/code_editor.html":{"url":"base/editor/code_editor.html","title":"code_editor","keywords":"","body":"bi.code_editor\n代码文本框,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.code_editor\",\n cls: \"mvc-border\",\n width: 600,\n height: 400\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nreadOnly\n是否只读\nboolean\ntrue,false\nfalse\n\n\nlineHeight\n行高\nnumber\n—\n2\n\n\nvalue\n文本框值\nstring\n—\n\" \"\n\n\nparamFormatter\n参数显示值构造函数\nfunction\n—\nvalue\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ninsertParam\n插入参数\nparam\n\n\ninsertString\n插入字符串\nstr\n\n\ngetValue\n获取文本框值\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式style,例{\"color\":\"#000\"}\n\n\ngetStyle\n获取文本样式\n—\n\n\nrefresh\n刷新文本框\n—\n\n\n\n\n"},"base/editor/multifile_editor.html":{"url":"base/editor/multifile_editor.html","title":"multifile_editor","keywords":"","body":"bi.multifile_editor\n多文件,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.multifile_editor\",\n width: 400,\n height: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmultiple\n是否支持多选\nboolean\ntrue,false\nfalse\n\n\nmaxSize\n最大可选数量\nnumber\n—\n-1\n\n\naccept\n\nstring\n—\n\" \"\n\n\nurl\n文件路径\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nselect\n选择文件\n—\n\n\ngetValue\n获取文件名称\n—\n\n\nupload\n文件上传\n—\n\n\nreset\n重置\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MultifileEditor.EVENT_UPLOADSTART\n开始上传时触发\n\n\nBI.MultifileEditor.EVENT_PROGRESS\n上传过程中触发\n\n\nBI.MultifileEditor.EVENT_UPLOADED\n上传结束后触发\n\n\n\n\n"},"base/editor/textarea_editor.html":{"url":"base/editor/textarea_editor.html","title":"textarea_editor","keywords":"","body":"bi.textarea_editor\n文本域,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.textarea_editor\",\n width: 400,\n height: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n文本域的值\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ngetValue\n获取文本域值\n—\n\n\nsetValue\n设置文本域值\nvalue\n\n\nsetStyle\n设置文本域样式\n需要设置的文本域样式style,例{\"color\":\"#000\"}\n\n\ngetStyle\n获取文本域样式\n—\n\n\nfocus\n文本域获取焦点\n—\n\n\nblur\n文本域失焦\n—\n\n\n\n\n"},"base/editor/formula_editor.html":{"url":"base/editor/formula_editor.html","title":"formula_editor","keywords":"","body":"bi.formula_editor\n公式编辑控件,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.formula_editor\",\n cls: \"bi-border\",\n watermark:'请输入公式',\n value: 'SUM(C5, 16, 26)',\n width: \"100%\",\n height: \"100%\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n文本域的值\nstring\n—\n\" \"\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nfieldTextValueMap\n\nstring\n—\n{}\n\n\nshowHint\n\n\n—\n2\n\n\nlineHeight\n行高\nnumber\n—\n2\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndisableWaterMark\n设置文本框placeholder不可用\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\ninsertField\n添加字段\nfield\n\n\ninsertFunction\n插入函数\nfn\n\n\ninsertOperator\n插入操作符\nop\n\n\nsetFunction\n设置函数\nv\n\n\ninsertString\n插入字符串\nstr\n\n\ngetFormulaString\n获取公式\n—\n\n\ngetUsedFields\n获取可用字段\n—\n\n\ngetCheckString\n\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\nsetFieldTextValueMap\n\nfieldTextValueMap\n\n\nrefresh\n刷新文本框\n—\n\n\n\n\n"},"base/table/table_view.html":{"url":"base/table/table_view.html","title":"table_view","keywords":"","body":"bi.table_view\n能处理静态宽度以及动态宽度的表\nsource\nBI.createWidget({\n type: \"bi.table_view\",\n element: 'body',\n isNeedMerge: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n mergeCols: [0, 1],\n columnSize: [100, 200, 300, 400, 500],\n items: [],\n header: []\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nfooterRowSize\n表尾高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\nfalse\n\n\nheader\n表头\narray\n[]\n\n\nfooter\n表尾\narray\nfalse\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\npopulate\n刷新内容\nrows\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Table.EVENT_TABLE_AFTER_INIT\ntable初始化完成后触发\n\n\nBI.Table.EVENT_TABLE_RESIZE\ntable大小调整时触发(窗口变化等)\n\n\nBI.Table.EVENT_TABLE_SCROLL\n滚动事件\n\n\n\n\n"},"base/table/grid_table.html":{"url":"base/table/grid_table.html","title":"grid_table","keywords":"","body":"bi.grid_table\n列表展示的table,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.grid_table\",\n element: 'body',\n width: 600,\n height: 500,\n isResizeAdapt: true,\n isNeedResize: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n columnSize: [50,50,200,250,400],\n items: items,\n header: header\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结\nboolean\nfalse\n\n\nfreezeCols\n冻结列\narray\n[]\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth\n\n\nsetHeight\n设置高度\nheight\n\n\ngetRegionSize\n获取间隙大小\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\npopulate\n刷新内容\nrows\n\n\nrestore\n储存\n—\n\n\n\n\n"},"base/table/collection_table.html":{"url":"base/table/collection_table.html","title":"collection_table","keywords":"","body":"bi.collection_table\n继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.collection_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否冻结列\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth\n\n\nsetHeight\n设置高度\nheight\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\npopulate\n增加行\nrows\n\n\nrestore\n存储数据\n—\n\n\n\n\n"},"base/table/resizable_table.html":{"url":"base/table/resizable_table.html","title":"resizable_table","keywords":"","body":"bi.resizable_table\n可调整列宽的grid表格,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.resizable_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结列\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedResize\n是否需要调整大小\nboolean\nfalse\n\n\nisResizeAdapt\n是否调整时自适应\nboolean\ntrue\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nheader\n表头\narray\n[]\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\n—\n\n\nsetHeight\n设置高度\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n刷新内容\nrows\n\n\nrestore\n保存表\n—\n\n\n\n\n"},"base/pager.html":{"url":"base/pager.html","title":"pager","keywords":"","body":"bi.pager\n分页控件,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.pager\",\n height: 50,\n pages: 18,\n groups: 5,\n curr: 6,\n first: \"首页\",\n last: \"尾页\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义列表中item项的行为,如高亮,标红等\nobject\n—\n{}\n\n\nlayouts\n布局\narray\n—\n{type:\"bi.horizontal\",hgap:10,vgap:0}\n\n\ndynamicShow\n是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\nboolean\ntrue,false\ntrue\n\n\ndynamicShowFirstLast\n是否动态显示首页、尾页,dynamicShow为false时生效\nboolean\ntrue,false\nfalse\n\n\ndynamicShowPrevNext\n是否动态显示上一页、下一页,dynamicShow为false时生效\nboolean\ntrue,false\nfalse\n\n\npages\n是否显示总页数\nboolean\ntrue,false\nfalse\n\n\ncurr\n初始化当前页\nfunction\n—\nfunction(){return 1;}\n\n\ngroups\n连续显示分页数\nnumber\n—\n0\n\n\njump\n页数跳转\nfunction\n—\n—\n\n\nfirst\n是否显示首页\nboolean\ntrue,false\nfalse\n\n\nlast\n是否显示尾页\nboolean\ntrue,false\nfalse\n\n\nprev\n上一页\nstring,object —\n—\n\"上一页\"\n\n\nnext\n下一页\nsting,object\n—\n\"下一页\"\n\n\nfirstPage\n第一页\nnumber\n—\n1\n\n\nlastPage\n最后一页,在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\nfunction\n—\nfunction(){ return 1;}\n\n\nhasPrev\n判断是否有上一页,pages不可用时有效\nfunction\n—\n—\n\n\nhasNext\n判断是否有下一页,pages不可用时有效\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ngetCurrentPage\n获取当前页码\n—\n\n\nsetAllPages\n设置总页数\npages\n\n\nhasPrev\n判断是否有上一页\nv\n\n\nhasNext\n判断是否有下一页\nv\n\n\nsetValue\n设置当前页码\nv\n\n\ngetValue\n获取当前页码\n—\n\n\nattr\n设置属性\nkey,value\n\n\npopulate\n刷新或者清空列表\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Pager.EVENT_AFTER_POPULATE\npager刷新完成事件\n\n\n\n\n"},"base/svg.html":{"url":"base/svg.html","title":"svg","keywords":"","body":"bi.svg\nsvg绘图,基类BI.Widget\nsource\n\nvar svg = BI.createWidget({\n type: \"bi.svg\",\n width: 500,\n height: 600\n});\n\nsvg.path(\"M10,10L50,50M50,10L10,50\")\n .attr({stroke: \"red\"});\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nadd\n添加对象到json数组\njson\n\n\npath\n绘制路径\npathString\n\n\nimage\n绘制图片\n(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高\n\n\nrect\n绘制矩形\n(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角border-radius大小\n\n\ncircle\n绘制圆形\n(x,y,r)分别表示原点的横坐标,纵坐标,以及半径\n\n\nellipse\n绘制椭圆\n(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径\n\n\ntext\n绘制文本\n(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容\n\n\nprint\n根据制定参数打印出路径\n(x, y, string, font, size, origin, letter_spacing, line_spacing)\n\n\nsetStart\n开始绘制\n—\n\n\nsetFinish\n结束绘制\n—\n\n\nsetSize\n设置画布尺寸\n(width,height)分别表示画布宽高\n\n\nsetViewBox\n设置画布可视区域\n(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整\n\n\ngetById\n根据id返回元素\nid\n\n\ngetElementByPoint\n获根据给定的点坐标返回元素\n(x,y)\n\n\ngetElementsByPoint\n获根据给定的点坐标返回元素\n(x,y)\n\n\ngetFont\n通过给定的参数在已注册的字体中找到字体对象\n(family, weight, style, stretch)\n\n\nset\n绘制形状的集合\n—\n\n\nremove\n设置总页数\npages\n\n\nclear\n判断是否有上一页\nv\n\n\n\n\n"},"base/canvas.html":{"url":"base/canvas.html","title":"canvas","keywords":"","body":"bi.canvas\ncanvas绘图,基类BI.Widget\nsource\n\nvar canvas = BI.createWidget({\n type: \"bi.canvas\",\n element: \"#wrapper\",\n width: 500,\n height: 600\n});\ncanvas.circle(150, 50, 20, \"green\");\ncanvas.stroke();\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nline\n绘制线段\n(x0, y0, x1, y1)\n\n\nrect\n绘制矩形\n(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色\n\n\ncircle\n绘制圆形\n(x, y, radius, color)分别表示原点的横坐标,纵坐标,半径以及颜色\n\n\nhollow\n填充中空的路径\n—\n\n\nsolid\n填充实心的路径\n—\n\n\ngradient\n绘制渐变色\n(x0, y0, x1, y1, start, end)\n\n\nreset\n重置画布\n—\n\n\nstroke\n绘制\ncallback\n\n\n\n\n"},"case/button/multi_select_item.html":{"url":"case/button/multi_select_item.html","title":"multi_select_item","keywords":"","body":"bi.multi_select_item\n复选框item,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.multi_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n30\n\n\nlogic\n\nobject\n\n{dynamic:false}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/button/single_select_item.html":{"url":"case/button/single_select_item.html","title":"single_select_item","keywords":"","body":"bi.single_select_item\n复选框item,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.single_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n25\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/button/single_select_radio_item.html":{"url":"case/button/single_select_radio_item.html","title":"single_select_radio_item","keywords":"","body":"bi.single_select_radio_item\n单选框item,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"单选item\"\n }, {\n type: \"bi.single_select_radio_item\",\n text: \"单选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n25\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/editor/shelter_editor.html":{"url":"case/editor/shelter_editor.html","title":"shelter_editor","keywords":"","body":"bi.shelter_editor\n带标记的文本框,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.shelter_editor\",\n cls: \"bi-border\",\n ref:function(_ref){\n editor=_ref;\n },\n width: 300,\n watermark: \"这个是带标记的\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntextAlign\n对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nonKeyDown\n按键事件\nkey\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\nsetTextStyle\n设置文本框样式\nstyle\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/sign_editor.html":{"url":"case/editor/sign_editor.html","title":"sign_editor","keywords":"","body":"bi.sign_editor\n带标记的文本框,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.sign_editor\",\n cls:\"layout-bg5\",\n value: \"123\",\n text: \"456\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/sign_initial_editor.html":{"url":"case/editor/sign_initial_editor.html","title":"sign_initial_editor","keywords":"","body":"bi.sign_initial_editor\n基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.sign_initial_editor\",\n cls: \"layout-bg5\",\n text: \"原始值\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\nvalue\n文本value值\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/state_editor.html":{"url":"case/editor/state_editor.html","title":"state_editor","keywords":"","body":"bi.state_editor\n记录状态的输入框,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.state_editor\",\n value: \"123\",\n text: \"456\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/layer/multi_popup_layer.html":{"url":"case/layer/multi_popup_layer.html","title":"multi_popup_layer","keywords":"","body":"bi.multi_popup_view\n下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w,基类BI.MultiPopupView\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.multi_popup_view\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbuttons\n按钮组\narray\n—\nBI.i18nText(\"BI-Basic_Sure\")\n\n\n\n\n"},"case/layer/layer_panel.html":{"url":"case/layer/layer_panel.html","title":"layer_panel","keywords":"","body":"bi.popup_panel\n可以理解为MultiPopupView和Panel两个面板的结合体,基类BI.MultiPopupView\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.popup_panel\",\n title: \"测试\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n标题\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.PopupPanel.EVENT_CHANGE\npanel的value发生改变触发\n\n\nBI.PopupPanel.EVENT_CLOSE\npanel的关闭事件\n\n\nBI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON\n点击工具栏事件\n\n\n\n\n"},"case/layer/pane_list.html":{"url":"case/layer/pane_list.html","title":"pane_list","keywords":"","body":"bi.list_pane\nlist面板,基类BI.Widget\nsource\n\nBI.createWidget({\n type: 'bi.list_pane',\n element: \"#wrapper\",\n cls: \"bi-border\",\n items: []\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n列表\narray\n—\n[ ]\n\n\nitemsCreator\n列表创建器\nfunction\n—\n—\n\n\nhasNext\n是否有下一页\nfunction\n—\n—\n\n\nonLoad\n正在加载\nfunction\n—\n— \n\n\nel\n开启panel的元素\nobject\n—\n{type: \"bi.button_group\" }\n\n\nlogic\n\nobject\n—\n{ dynamic:true}\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\n\n\n"},"case/layer/panel.html":{"url":"case/layer/panel.html","title":"panel","keywords":"","body":"bi.panel\n带有标题栏的panel,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.panel\",\n title: \"标题\",\n titleButtons: [{\n type: \"bi.button\",\n text: \"+\"\n }],\n el: this.button_group,\n logic: {\n dynamic: true\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n标题\nstring\n—\n\" \"\n\n\ntitleButton\n\narray\n—\n[ ]\n\n\nel\n开启panel的元素\nobject\n—\n{ }\n\n\nlogic\n\nobject\n—\n{ dynamic:false}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetTitle\n设置标题\ntitle\n\n\n\n\n"},"case/list/list.select.html":{"url":"case/list/list.select.html","title":"select_list","keywords":"","body":"bi.select_list\n选择列表\nsource\n\nBI.createWidget({\n type: \"bi.select_list\",\n items: [{\n text: '1',\n }, {\n text: '2',\n }]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ndirection\ntoolbar位置\nstring\nBI.Direction.Top\n\n\nonLoaded\n加载完成的回调(测试了无效果)\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetAllSelected\n设置全选\nv: boolean\n\n\nsetToolBarVisible\n设置toolbar是否可见\nb: boolean\n\n\nisAllSelected\n是否全选中\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\nprependItems\n列表最前添加元素\nitems\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/lazy_loader.html":{"url":"case/loader/lazy_loader.html","title":"lazy_loader","keywords":"","body":"bi.lazy_loader\n懒加载\nsource\n\nBI.createWidget({\n type: \"bi.lazy_loader\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/list_loader.html":{"url":"case/loader/list_loader.html","title":"list_loader","keywords":"","body":"bi.list_loader\n恶心的加载控件, 为解决排序问题引入的控件\nsource\n\nBI.createWidget({\n type: \"bi.list_loader\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncount\n分页计数\nnumber\nfalse\n\n\nnext\n\nobject\n{}\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nonLoaded\n加载完成回调\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nhasNext\n是否有下一页\n—\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/sort_list.html":{"url":"case/loader/sort_list.html","title":"sort_list","keywords":"","body":"bi.sort_list\n排序列表\nsource\n\nBI.createWidget({\n type: \"bi.sort_list\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncount\n分页计数\nnumber\nfalse\n\n\nnext\n\nobject\n{}\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nonLoaded\n加载完成回调\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nhasNext\n是否有下一页\n—\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/trigger/editor_trigger.html":{"url":"case/trigger/editor_trigger.html","title":"editor_trigger","keywords":"","body":"bi.editor_trigger\n文本输入框trigger\nsource\n\nBI.createWidget({\n type: \"bi.editor_trigger\",\n element: \"body\",\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nvalidationChecker\n验证函数\nfunction\nBI.emptyFn\n\n\nquitChecker\n退出时验证函数\nfunction\nBI.emptyFn\n\n\nallowBlank\n是否允许为空\nboolean\nfalse\n\n\nwatermark\n水印\nstring\n\"\"\n\n\nerrorText\n错误信息\nstring\n\"\"\n\n\ntriggerWidth\n触发器宽度\nnumber\n30\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置值\nvalue\n\n\ngetVlaue\n获得值\n—\n\n\nsetText\n\ntext\n\n\n\n\n"},"case/trigger/icon_trigger.html":{"url":"case/trigger/icon_trigger.html","title":"icon_trigger","keywords":"","body":"bi.icon_trigger\n图标按钮trigger\nsource\n\nBI.createWidget({\n type: \"bi.icon_trigger\",\n element: \"body\",\n});\n\n\n\n\n"},"case/trigger/text_trigger.html":{"url":"case/trigger/text_trigger.html","title":"text_trigger","keywords":"","body":"bi.text_trigger\n文本输入框trigger\nsource\n\nBI.createWidget({\n type: \"bi.editor_trigger\",\n element: \"body\",\n});\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置值\nvalue\n\n\ngetVlaue\n获得值\n—\n\n\n\n\n"},"case/combo/bubble_combo.html":{"url":"case/combo/bubble_combo.html","title":"bubble_combo","keywords":"","body":"bi.bubble_combo\n表示一个可以展开的节点, 不仅有选中状态而且有展开状态, 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.bubble_combo\",\n element:\"#wrapper\",\n el: {\n type: \"bi.button\",\n text: \"测试\",\n height: 25\n },\n popup: {\n el: {\n type: \"bi.button_group\",\n items: BI.makeArray(100, {\n type: \"bi.text_item\",\n height: 25,\n text: \"item\"\n }),\n layouts: [{\n type: \"bi.vertical\"\n }]\n },\n maxHeight: 200\n }\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntext\n组件text值\nstring\n—\n\"\"\n\n\nvalue\n组件value值\nstring\n—\n\"\"\n\n\nstopEvent\n阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止冒泡\nboolean\ntrue,false\nfalse\n\n\nselected\nbutton的选中状态\nboolean\ntrue,false\nfalse\n\n\nonce\n点击一次选中有效,再点无效\nboolean\ntrue,false\nfalse\n\n\nforceSelected\n点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\nboolean\ntrue,false\nfalse\n\n\nforceNotSelected\n无论怎么点击都不会被选中\nboolean\ntrue,false\nfalse\n\n\ndisableSelected\n使能选中\nboolean\ntrue,false\nfalse\n\n\nshadow\n是否显示阴影\nboolean\ntrue,false\nfalse\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\nfalse\n\n\ntrigger\n被选元素要触发的事件\nstring\nmousedown, mouseup, click, dblclick, lclick\nnull\n\n\nhandler\n点击事件回调\nfunction\n—\nBI.emptyFn\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbindEvent\n绑定事件\n—\n\n\nbeforeClick\n点击事件之前\n—\n\n\ndoClick\n点击事件\n—\n\n\nhandle\n返回该对象\n—\n\n\nhover\nhover事件\n—\n\n\ndishover\n取消hover事件\n—\n\n\nsetSelected\n设置选中的文本\nb\n\n\nisSelected\n是否被选中\n—\n\n\nisOnce\n是否只允许点击一次\n—\n\n\nisForceSelected\n判断是否点击即选中\n—\n\n\nisForceNotSelected\n判断是否怎么点击都不会被选中\n—\n\n\nisDisableSelected\n判断是否让选中\n—\n\n\nsetText\n设置文本值\n—\n\n\ngetText\n获取文本值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"case/combo/icon_combo.html":{"url":"case/combo/icon_combo.html","title":"icon_combo","keywords":"","body":"bi.icon_combo\n基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.icon_combo\",\n element: \"#wrapper\",\n iconClass: \"rename-font\",\n items: [{\n value: \"第一项\",\n iconClass: \"delete-font\"\n }, {\n value: \"第二项\",\n iconClass: \"rename-font\"\n }, {\n value: \"第三项\",\n iconClass: \"move-font\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwidth\n宽度\nnumber\n—\n24\n\n\nheight\n高度\nnumber\n—\n24\n\n\niconClass\nicon的类名\nstring\n—\n\" \"\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nminWidth\n最小宽度\nnumber\n—\n100\n\n\nmaxWidth\n最大宽度\nstring/number\n—\n\"auto\"\n\n\nmaxHeight\n最大高度\nnumber\n—\n300\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\nadjustXOffset\n调整横向偏移\nnumber\n—\n0\n\n\nadjustYOffset\n调整纵向偏移\nnumber\n—\n0\n\n\noffsetStyle\n弹出层显示位置\nstring\nleft,right,center\n\"left,right,center\"\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/combo/static_combo.html":{"url":"case/combo/static_combo.html","title":"static_combo","keywords":"","body":"bi.static_combo\n单选combo,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.static_combo\",\n element: \"#wrapper\",\n text: \"Value 不变\",\n items: [{\n text: \"1\",\n value: 1\n }, {\n text: \"2\",\n value: 2\n }, {\n text: \"3\",\n value: 3\n }]\n });\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n24\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\nitems\n子组件\narray\n—\n[ ]\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/combo/text_value_downlist_combo.html":{"url":"case/combo/text_value_downlist_combo.html","title":"text_value_downlist_combo","keywords":"","body":"bi.text_value_down_list_combo\n基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.text_value_down_list_combo\",\n element: \"#wrapper\",\n text: \"text\",\n items: [\n [{\n el: {\n text: \"1\",\n value: 1\n },\n children: [{\n text: \"11\",\n value: 11\n }]\n }],\n [{\n text: \"2\",\n value: 2\n }, {\n text: \"3\",\n value: 3\n }]\n ]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/tree/branch_tree.html":{"url":"case/tree/branch_tree.html","title":"branch_tree","keywords":"","body":"bi.branch_tree\n横向分支的树\nsource\nBI.createWidget({\n type: \"bi.branch_tree\",\n element: 'body',\n items: [{\n el: {},\n children: [{\n el: {},\n children: {},\n // ...\n }]\n }]\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander组件配置项\nobject\n{}\n\n\nel\n基础元素\nobject\n{}\n\n\nitems\n子项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\n—\n\n\ngetValue\n获取所选项值\n—\n\n\n\n\n"},"case/tree/handstand_branch_tree.html":{"url":"case/tree/handstand_branch_tree.html","title":"handstand_branch_tree","keywords":"","body":"bi.handstand_branch_tree\n纵向分支的树\nsource\nBI.createWidget({\n type: \"bi.handstand_branch_tree\",\n element: 'body',\n el: {},\n items: [{\n el: {},\n children: [{\n el: {},\n children: {},\n // ...\n }]\n }]\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander组件配置项\nobject\n{}\n\n\nel\n基础元素\nobject\n{}\n\n\nitems\n子项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\n—\n\n\ngetValue\n获取所选项值\n—\n\n\n\n\n"},"case/tree/display_tree.html":{"url":"case/tree/display_tree.html","title":"display_tree","keywords":"","body":"bi.display_tree\n异步树控件\nsource\nvar tree = BI.createWidget({\n type: \"bi.display_tree\",\n element: 'body',\n});\n\ntree.initTree({\n id: 1,\n text: '',\n open: true,\n});\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ninitTree\n加载tree结构\nnode: 节点数组 settings: 配置项\n\n\ndestroy\n摧毁元素\n—\n\n\n\n\n"},"case/tree/simple_tree.html":{"url":"case/tree/simple_tree.html","title":"simple_tree","keywords":"","body":"bi.simple_tree\n简单的多选树\nsource\nvar tree = BI.createWidget({\n type: \"bi.simple_tree\",\n element: 'body',\n});\n\ntree.populate(items);\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nitemsCreator\nitems构造器\nfunction\nBI.emptyFn\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\nitems: 子项数组 keywords: 关键字标红字符串\n\n\nsetValue\n设置值\nv\n\n\ngetValue\n获得值\n—\n\n\nempty\n清空树\n—\n\n\n\n\n"},"case/tree/level_tree.html":{"url":"case/tree/level_tree.html","title":"level_tree","keywords":"","body":"bi.level_tree\n二级树\nsource\nvar tree = BI.createWidget({\n type: \"bi.level_tree\",\n element: 'body',\n items: [],\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander配置\nobject\n{}\n\n\nitems\n元素\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ninitTree\n构造树结构\nnodes\n\n\nstroke\n生成树方法\nnodes\n\n\npopulate\n去掉所有内容\nitems: 子项数组\n\n\nsetValue\n设置值\nv\n\n\ngetValue\n获得值\n—\n\n\ngetAllLeaves\n获取所有叶节点\n—\n\n\ngetNodeById\n根据Id获取节点\nid\n\n\ngetNodeByValue\n根据值获取节点\nid\n\n\n\n\n"},"case/tree/branch_relation.html":{"url":"case/tree/branch_relation.html","title":"branch_relation","keywords":"","body":"bi.branch_relation\n表关联树\nsource\nvar tree = BI.createWidget({\n type: \"bi.branch_relation\",\n element: 'body',\n items: [],\n direction: BI.Direction.Right,\n align: BI.HorizontalAlign.Right,\n centerOffset: -50\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncenterOffset\n重心偏移量\nnumber\n0\n\n\ndirection\n根节点所在方向\nstring\nBI.Direction.Bottom\n\n\nalign\n对齐方向\nstring\nBI.VerticalAlign.Top\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\nitems: 子项数组\n\n\n\n\n"},"case/table/adaptive_table.html":{"url":"case/table/adaptive_table.html","title":"adaptive_table","keywords":"","body":"bi.adaptive_table\n自适应宽度的表格\nsource\nBI.createWidget({\n type: \"bi.adaptive_table\",\n element: 'body',\n width: 600,\n height: 500,\n isResizeAdapt: true,\n isNeedResize: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n columnSize: [50,50,200,250,400],\n header: [],\n items: [],\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否可改变列大小\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/table/tree_table.html":{"url":"case/table/tree_table.html","title":"tree_table","keywords":"","body":"bi.tree_table\n树状结构的表格\nsource\nvar table = BI.createWidget({\n type: \"bi.tree_table\",\n width: 600,\n height: 400,\n columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n header: header,\n items: items,\n crossHeader: crossHeader,\n crossItems: crossItems,\n element: 'body',\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整列宽\nboolean\nfalse\n\n\nisResizeAdapt\n是否需要在调整列宽或区域宽度的时候它们自适应变化\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nheaderCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/table/layer_tree_table.html":{"url":"case/table/layer_tree_table.html","title":"layer_tree_table","keywords":"","body":"bi.layer_tree_table\n层级树状结构的表格\nsource\nvar table = BI.createWidget({\n type: \"bi.layer_tree_table\",\n width: 600,\n height: 400,\n columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n header: header,\n items: items,\n crossHeader: crossHeader,\n crossItems: crossItems,\n element: 'body',\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整列宽\nboolean\nfalse\n\n\nisResizeAdapt\n是否需要在调整列宽或区域宽度的时候它们自适应变化\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nheaderCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/pager/all_count_pager.html":{"url":"case/pager/all_count_pager.html","title":"all_count_pager","keywords":"","body":"bi.all_count_pager\n有总页数和总行数的分页控件\nsource\n\nBI.createWidget({\n type: 'bi.all_count_pager',\n height: 30,\n pages: 10, //必选项\n curr: 1,\n count: 1,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n控件高度\nnumber\n30\n\n\npages\n总页数\nnumber\n1\n\n\ncurr\n当前页\nnumber\n1\n\n\ncount\n总行数\nnumber\n1\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetAllPages\n设置总页数\nv\n\n\nsetValue\n设置当前页码\nv\n\n\nsetVPage\n设置当前页码\nv\n\n\nsetCount\n设置计数\ncount\n\n\ngetCurrentPage\n获取当前页码\n—\n\n\nhasPrev\n是否有前一页\n—\n\n\nhasNext\n是否有后一页\n—\n\n\nsetPagerVisible\n设置页码是否可见\ntrue/false\n\n\npopulate\n清空内容\n—\n\n\n\n\n"},"case/pager/direction_pager.html":{"url":"case/pager/direction_pager.html","title":"direction_pager","keywords":"","body":"bi.direction_pager\n显示页码的分页控件\nsource\n\nvar pager = BI.createWidget({\n type: 'bi.direction_pager',\n height: 30,\n horizontal: {\n pages: 10, //必选项\n curr: 1, //初始化当前页, pages为数字时可用,\n firstPage: 1,\n lastPage: 10,\n },\n vertical: {\n pages: 10, //必选项\n curr: 1, //初始化当前页, pages为数字时可用,\n firstPage: 1,\n lastPage: 10,\n },\n element: 'body',\n});\n\n\n\n参数\n\n\n\n参数\n二级参数\n说明\n类型\n默认值\n\n\n\n\nheight\n\n控件高度\nnumber\n30\n\n\nhorizontal\n\n横向翻页设置\nobject\n—\n\n\n\npages\n总页数\nnumber/boolean\nfalse\n\n\n\ncurr\n当前页, pages为数字时可用\nnumber\n1\n\n\n\nhasPrev\n判断是否有前一页的方法\nfunction\nBI.emptyFn\n\n\n\nhasNext\n判断是否有后一页的方法\nfunction\nBI.emptyFn\n\n\n\nfirstPage\n第一页\nnumber\n1\n\n\n\nlastPage\n最后一页\nnumber/function\nBI.emptyFn\n\n\nvertical\n\n纵向翻页设置,参数与horizontal相同\nobject\n—\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ngetVPage\n获取纵向页码\n—\n\n\ngetHPage\n获取水平向页码\n—\n\n\nsetVPage\n获取纵向页码\nv\n\n\nsetHPage\n获取水平向页码\nv\n\n\nhasVNext\n纵向坐标是否有下一页\n—\n\n\nhasHNext\n横向坐标是否有下一页\n—\n\n\nhasVPrev\n纵向坐标是否有上一页\n—\n\n\nhasHPrev\n横向坐标是否有上一页\n—\n\n\nsetHPagerVisible\n设置横向分页键可见\n—\n\n\nsetVPagerVisible\n设置纵向分页键可见\n—\n\n\npopulate\n清空内容\n—\n\n\n\n\n"},"case/calendar.html":{"url":"case/calendar.html","title":"calendar","keywords":"","body":"bi.calendar\n日历控件\nsource\n\nBI.createWidget({\n type: 'bi.calendar',\n min: '1900-01-01', //最小日期\n max: '2099-12-31', //最大日期\n year: 2015,\n month: 7, //7表示八月\n day: 25,\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nmin\n最小日期\nstring\n'1900-01-01'\n\n\nmax\n最大日期\nstring\n'2099-12-31'\n\n\nyear\n设定的年份\nnumber\n2015\n\n\nmonth\n设定的月份\nnumber\n7\n\n\nday\n设定的日期\nnumber\n25\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nisFrontDate\n是否为最小日期\n—\n\n\nisFinalDate\n是否为最大日期\n—\n\n\nsetValue\n设置日期\nobject: {year, month, day}\n\n\ngetVlaue\n获得日期\n—\n\n\n\n\n"},"case/clipboard.html":{"url":"case/clipboard.html","title":"clipboard","keywords":"","body":"bi.clipboard\n剪切板\nsource\n\nBI.createWidget({\n type: 'bi.clipboard',\n width: 100,\n height: 100,\n copy: function () {},\n\n afterCopy: function () {}\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncopy\n获取需要拷贝的值\nfunction\nBI.emptyFn\n\n\nafterCopy\n完成拷贝后执行的方法\nfunction\nBI.emptyFn\n\n\n\n\n"},"case/complex_canvas.html":{"url":"case/complex_canvas.html","title":"complex_canvas","keywords":"","body":"complex_canvas\n复杂的canvas绘图\nsource\n\nvar canvas = BI.createWidget({\n type: \"bi.complex_canvas\",\n width: 500,\n height: 600\n });\ncanvas.branch(55, 100, 10, 10, 100, 10, 200, 10, {\n offset: 20,\n strokeStyle: \"red\",\n lineWidth: 2\n });\n\ncanvas.stroke();\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数\n\n\n\n\nbranch\n绘制树枝节点\n(x0, y0, x1, y1, x2, y2) (以x0, y0为根节点,分支到x1,y1, x2,y2...)\n\n\nstroke\n绘制\n\n\n\n\n"},"case/color_chooser.html":{"url":"case/color_chooser.html","title":"color_chooser","keywords":"","body":"bi.color_chooser\n选色控件\nsource\n\nBI.createWidget({\n type: \"bi.color_chooser\",\n element: \"#wrapper\",\n width: 30,\n height: 30\n});\n\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nisViewVisible\n判断是否显示\n—\n\n\nsetValue\n设置颜色值\ncolor\n\n\ngetValue\n获取颜色值\n—\n\n\n\n\n"},"case/segment.html":{"url":"case/segment.html","title":"segment","keywords":"","body":"bi.sgement\n各种segment\nsource\n\nBI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"默认风格\"\n }, {\n type: \"bi.segment\",\n items: [{\n text: \"tab1\",\n value: 1,\n selected: true\n }, {\n text: \"tab2\",\n value: 2\n }, {\n text: \"tab3 disabled\",\n disabled: true,\n value: 3\n }]\n }],\n hgap: 50,\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n\n0\n\n\nitems\n子控件数组\narray\n\n\n\n\nwidth\n宽度\nnumber\n\n\n\n\nheight\n高度\nnumber\n\n\n\n\n\n"},"detailed/bi.button/general.html":{"url":"detailed/bi.button/general.html","title":"通用按钮","keywords":"","body":"bi.button\n通用按钮,详情见BI.button\n"},"detailed/bi.button/tooltip.html":{"url":"detailed/bi.button/tooltip.html","title":"提示性信息","keywords":"","body":"提示性信息\nsource\nvar toast = BI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n el: {\n type: 'bi.button',\n text: '简单Toast测试',\n height: 30,\n handler: function () {\n BI.Msg.toast(\"这是一条简单的数据\");\n }\n }\n }],\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/items.html":{"url":"detailed/bi.button/items.html","title":"各种items","keywords":"","body":"各种items\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"单选item\"\n }, {\n type: \"bi.single_select_item\",\n text: \"单选项\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.multi_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/node.html":{"url":"detailed/bi.button/node.html","title":"各种节点nodes","keywords":"","body":"各种节点nodes\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"十字形的节点\"\n }, {\n type: \"bi.plus_group_node\",\n text: \"十字形的节点\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"三角形的节点\"\n }, {\n type: \"bi.triangle_group_node\",\n text: \"三角形的节点\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"箭头节点\"\n }, {\n type: \"bi.arrow_group_node\",\n text: \"箭头节点\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/segment.html":{"url":"detailed/bi.button/segment.html","title":"各种segment","keywords":"","body":"bi.sgement\n各种segment\nsource\n\nBI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"默认风格\"\n }, {\n type: \"bi.segment\",\n items: [{\n text: \"tab1\",\n value: 1,\n selected: true\n }, {\n text: \"tab2\",\n value: 2\n }, {\n text: \"tab3 disabled\",\n disabled: true,\n value: 3\n }]\n }],\n hgap: 50,\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/tree/bi.multi_tree_combo.html":{"url":"detailed/tree/bi.multi_tree_combo.html","title":"multi_tree_combo","keywords":"","body":"bi.multi_tree_combo\n树下拉框,继承BI.Widget\nsource\nvar items = [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n text: \"根目录\"\n}, {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n text: \"第一级目录1\"\n}, {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n text: \"第二级文件1\"\n}];\n\nBI.createWidget({\n type: \"bi.multi_tree_combo\",\n itemsCreator: function (options, callback) {\n callback({\n items: items\n });\n },\n width: 300\n})\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nwidth\n宽度\nnumber\n200\n\n\nheight\n高度\nnumber\n30\n\n\nitems\n子项,pId代表父节点ID\narray\nnull\n\n\nitemsCreator\n子项创建函数\nfunction\nfunction() {}\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置文本框值\nv\n\n\ngetValue\n获取文本框值\n—\n\n\npopulate\n更改树结构内容\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MultiTreeCombo.EVENT_CONFIRM\n点击一级节点触发\n\n\n\n\n"},"detailed/tree/bi.switch_tree.html":{"url":"detailed/tree/bi.switch_tree.html","title":"switch_tree","keywords":"","body":"bi.switch_tree\n可以单选多选切换的树,继承BI.Widget\nsource\nvar items = [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n text: \"根目录\"\n}, {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n text: \"第一级目录1\"\n}, {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n text: \"第二级文件1\"\n}];\n\nvar tree = BI.createWidget({\n type: \"bi.switch_tree\",\n items: items,\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nitems\n子项,pId代表父节点ID\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nswitchSelect\n切换树结构\n—\n\n\nsetSelect\n设置选中项\nv\n\n\ngetSelect\n获取选中项\n—\n\n\nsetValue\n设置当前选中项内容\nv\n\n\ngetValue\n获取当前选中项内容\nv\n\n\npopulate\n更改树结构内容\nitems\n\n\n\n\n"},"detailed/table/bi.preview_table.html":{"url":"detailed/table/bi.preview_table.html","title":"preview_table","keywords":"","body":"bi.preview_table\n用于表格预览,继承BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.preview_table\",\n header: [[{\n text: \"表头1\"\n }, {\n text: \"表头2\"\n }, {\n text: \"表头3\"\n }]],\n element: 'body',\n columnSize: [100, \"\", 50],\n items: [[{\n text: \"第一行第一列\"\n }, {\n text: \"第一行第二列\"\n }, {\n text: \"第一行第三列\"\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否冻结\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nrowSize\n行高\narray/number\nnull\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nheaderRowSize\n表头行高\nnumber\n30\n\n\nheader\n表头内容\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n替换为新的内容\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.responsive_table.html":{"url":"detailed/table/bi.responsive_table.html","title":"responsive_table","keywords":"","body":"bi.responsive_table\n自适应宽度的表格,继承BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.responsive_table\",\n isNeedMerge: true,\n isNeedFreeze: true,\n mergeCols: [0, 1],\n columnSize: [\"\", \"\", \"\"],\n items: [[{\n text: \"第一行第一列\"\n }, {\n text: \"第一行第二列\"\n }, {\n text: \"第一行第三列\"\n }]],\n header: [[{\n text: \"表头1\"\n }, {\n text: \"表头2\"\n }, {\n text: \"表头3\"\n }]],\n element: 'body'\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结单元格\nboolean\nfalse\n\n\nfreezeCols\n冻结的列号,从0开始,isNeedFreeze为true时生效\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeRule\nfunction (row1, row2) 合并规则, 默认相等时合并\nfunction\nfunction\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nheaderRowSize\n表头行高\nnumber\n25\n\n\nfooterRowSize\n表尾行高\nnumber\n25\n\n\nrowSize\n行高\nnumber\n25\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nregionColumnSize\n\nboolean\nfalse\n\n\nheader\n表头内容\narray\n[]\n\n\nfooter\n是否需要表尾\nboolean\nfalse\n\n\nitems\n子组件二维数组\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉表内容二维数组\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n替换为新内容\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.excel_table.html":{"url":"detailed/table/bi.excel_table.html","title":"excel_table","keywords":"","body":"bi.excel_table\n类似excel式的表格,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.excel_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整大小\nboolean\nfalse\n\n\nisResizeAdapt\n是否调整时自适应\nboolean\ntrue\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n37\n\n\nfooterRowSize\n表尾高度\nnumber\n37\n\n\nrowSize\n普通单元格高度\nnumber\n37\n\n\nregionColumnSize\n列项间的\narray\n[82, \"\"]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n增加行\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.page_table.html":{"url":"detailed/table/bi.page_table.html","title":"page_table","keywords":"","body":"bi.page_table\n分页表格\nsource\nBI.createWidget({\n type: \"bi.page_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [],\n pager: {\n horizontal : {},\n vertical: {}\n } \n});\n\n\n\n参数设置\n\n\n\n参数\n二级参数\n三级参数\n说明\n类型\n默认值\n\n\n\n\npager\n\n\n分页选项\nobject\n—\n\n\n\nhorizontal\n\n水平分页选项\nobject\n—\n\n\n\n\npages\n显示总页数\nboolean\nfalse\n\n\n\n\ncurr\n当前页\nnumber\n1\n\n\n\n\nhasPrev\n判断是否有前一页的函数\nfunction\nBI.emptyFn\n\n\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\n\n\nfirstPage\n第一页\nnumber\n1\n\n\n\n\nlastPage\n最后一页\nnumber/function\nBI.emptyFn\n\n\n\nvertical\n\n纵向分页,参数与horizontal\nobject\n—\n\n\nitemsCreator\n\n\n元素创造器\nfunction\nBI.emptyFn\n\n\nisNeedFreeze\n\n\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n\n\n冻结的列\narray\n[]\n\n\nisNeedMerge\n\n\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n\n\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n\n\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n\n\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n\n\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n\n\n最大列宽\narray\n[]\n\n\nheaderRowSize\n\n\n表头高度\nnumber\n25\n\n\nrowSize\n\n\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n\n\n列项间的\narray\n[]\n\n\nheaderCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nheader\n\n\n表头\narray\n[]\n\n\nitems\n\n\n子组件\narray\n[]\n\n\ncrossHeader\n\n\n交叉表头\narray\n[]\n\n\ncrossItems\n\n\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetHPage\n设置水平页数\nv: 页码\n\n\nsetVpage\n设置纵向页数\nv: 页码\n\n\ngetHPage\n获得水平页数\n—\n\n\ngetVPage\n获得垂直页数\n—\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\npopulate\n增加\n—\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/text_input/bi.text_editor.html":{"url":"detailed/text_input/bi.text_editor.html","title":"bi.text_editor","keywords":"","body":"bi.text_editor\n通过鼠标或键盘输入字符\n基础用法\nsource\nBI.createWidget({\n type: \"bi.text_editor\",\n element: \"#wrapper\",\n width: 200,\n height: 30,\n watermark:\"请输入内容\"\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nmouseOut\n\nboolean\ntrue,false\nfalse\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件详见Editor\n\n"},"detailed/text_input/bi.search_editor.html":{"url":"detailed/text_input/bi.search_editor.html","title":"bi.search_editor","keywords":"","body":"bi.search_editor\n搜索框\nsource\nBI.createWidget({\n type: 'bi.search_editor',\n element: '#wrapper',\n width: 300,\n watermark:\"搜索\",\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nmouseOut\n\nboolean\ntrue,false\nfalse\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.SearchEditor.EVENT_CLEAR\n点击清空按钮触发\n\n\n\n其他事件详见Editor\n\n"},"detailed/text_input/bi.clear_editor.html":{"url":"detailed/text_input/bi.clear_editor.html","title":"bi.clear_editor","keywords":"","body":"bi.clear_editor\n带清除按钮的输入框\nsource\nBI.createWidget({\n type: 'bi.clear_editor',\n cls: \"bi-border\",\n element: '#wrapper',\n width: 300,\n watermark:\"带清除按钮的输入框\",\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nmouseOut\n\nboolean\ntrue,false\nfalse\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.ClearEditor.EVENT_CLEAR\n点击清空按钮触发\n\n\n\n其他事件详见Input\n\n"},"detailed/text_input/finetuning_number_editor.html":{"url":"detailed/text_input/finetuning_number_editor.html","title":"finetuning_number_editor","keywords":"","body":"finetuning_number_editor\n数值微调器\nsource\nBI.createWidget({\n type: 'bi.fine_tuning_number_editor',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n编辑框中的值,-1表示自动\nnumber\n\n-1\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.FineTuningNumberEditor.EVENT_CONFIRM\n点击增加/减少按钮或者编辑框确定时触发\n\n\n\n\n"},"detailed/year_combo.html":{"url":"detailed/year_combo.html","title":"year_combo","keywords":"","body":"year_combo\n年份选择下拉框\nsource\nBI.createWidget({\n type: 'bi.year_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\nmin\n限定可选日期的下限\nstring\n\n'1900-01-01'\n\n\nmax\n限定可选日期的上限\nstring\n\n'2099-12-31'\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.YearCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n"},"detailed/month_combo.html":{"url":"detailed/month_combo.html","title":"month_combo","keywords":"","body":"month_combo\n月份选择下拉框\nsource\nBI.createWidget({\n type: 'bi.month_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MonthCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.MonthCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n"},"detailed/quarter_combo.html":{"url":"detailed/quarter_combo.html","title":"quarter_combo","keywords":"","body":"quarter_combo\n季度选择下拉框\nsource\nBI.createWidget({\n type: 'bi.quarter_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.QuarterCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.QuarterCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n"},"detailed/down_list_combo.html":{"url":"detailed/down_list_combo.html","title":"down_list_combo","keywords":"","body":"down_list_combo\n多层下拉列表的下拉框\nsource\nBI.createWidget({\n type: 'bi.down_list_combo',\n element: '#wrapper',\n width: 300,\n items: [\n [{\n el: {\n text: \"column 1111\",\n iconCls1: \"check-mark-e-font\",\n value: 11\n },\n children: [{\n text: \"column 1.1\",\n value: 21,\n cls: \"dot-e-font\",\n selected: true\n }, {\n text: \"column 1.222222222222222222222222222222222222\",\n cls: \"dot-e-font\",\n value: 22,\n }]\n }],\n [{\n el: {\n type: \"bi.icon_text_icon_item\",\n text: \"column 2\",\n iconCls1: \"chart-type-e-font\",\n cls: \"dot-e-font\",\n value: 12\n },\n disabled: true,\n children: [{\n type: \"bi.icon_text_item\",\n cls: \"dot-e-font\",\n height: 25,\n text: \"column 2.1\",\n value: 11\n }, {\n text: \"column 2.2\",\n value: 12,\n cls: \"dot-e-font\"\n }]\n }]\n ]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n\n\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick, hover\nclick\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\nbottom\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n\n0\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.DownListCombo.EVENT_CHANGE\n点击一级节点触发\n\n\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE\n点击二级节点触发\n\n\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\n\n具体配置方法见Combo\n"},"detailed/numeric_interval.html":{"url":"detailed/numeric_interval.html","title":"numeric_interval","keywords":"","body":"numeric_interval\n数值区间控件\nsource\nBI.createWidget({\n type: \"bi.numerical_interval\",\n element: '#wrapper',\n width: 500\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmin\n最小值初始值\nnumber\n\n无\n\n\nmax\n最大值初始值\nnumber\n\n无\n\n\ncloseMin\n左区间初始状态\nboolean\n\ntrue\n\n\ncloseMax\n右区间初始状态\nboolean\n\ntrue\n\n\n\n方法\n\n\n\n方法\n说明\n用法\n\n\n\n\nisStateValid()\n当前状态是否有效(输入是否合法, 区间是否成立)\n\n\n\nsetMinEnable(boolean)\n设置左区间输入框disable状态\n\n\n\nsetCloseMinEnable(boolean)\n设置左区间开闭combo的disable状态\n\n\n\nsetMaxEnable(boolean)\n设置右区间输入框disable状态\n\n\n\nsetCloseMaxEnable(boolean)\n设置右区间开闭combo的disable状态\n\n\n\nsetNumTip(string)\n设置数值区间的tip提示\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.NumericalInterval.EVENT_VALID\n区间合法的状态事件\n\n\nBI.NumericalInterval.EVENT_ERROR\n区间不合法的状态事件\n\n\n\n"},"detailed/multi_select_combo.html":{"url":"detailed/multi_select_combo.html","title":"multi_select_combo","keywords":"","body":"multi_select_combo\n带确定的复选下拉框\nsource\nBI.createWidget({\n type: \"bi.multi_select_combo\",\n element: '#wrapper',\n width: 500,\n itemsCreator: function(){\n return {\n items: [],\n hasNext: false\n }\n }\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n方法\n\n\n\n方法\n说明\n用法\n\n\n\n\n\n\n\n\n\n\n\n事件\n说明\n\n\n\n\nBI.MultiSelectCombo.EVENT_CONFIRM\n点击确定触发\n\n\n\n"},"detailed/date/date_combo.html":{"url":"detailed/date/date_combo.html","title":"date_combo","keywords":"","body":"date_combo\n日期选择下拉框(弹出的年月选择可以进一步选择日期)\nsource\nBI.createWidget({\n type: \"bi.date_combo\",\n element: \"#wrapper\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n"},"detailed/date/date_pane_widget.html":{"url":"detailed/date/date_pane_widget.html","title":"date_pane_widget","keywords":"","body":"date_pane_widget\n日期选择下拉框的弹出面板\nsource\nBI.createWidget({\n type: \"bi.date_pane_widget\",\n element: \"#wrapper\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmin\n限定可选日期的下限\nstring\n\n'1900-01-01'\n\n\nmax\n限定可选日期的上限\nstring\n\n'2099-12-31'\n\n\nselectedTime\n选中的初始年月\nobj({year: y, month: m})\n\n\n\n\n\n"},"detailed/date/year_month_combo.html":{"url":"detailed/date/year_month_combo.html","title":"year_month_combo","keywords":"","body":"year_month_combo\n年月选择下拉框\nsource\nBI.createWidget({\n type: \"bi.year_month_combo\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nyearBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n\n\n\n\nmonthBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW\n弹出框弹出前触发\n\n\nBI.YearMonthCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/date/year_quarter_combo.html":{"url":"detailed/date/year_quarter_combo.html","title":"year_quarter_combo","keywords":"","body":"year_quarter_combo\n年季度选择下拉框\nsource\nBI.createWidget({\n type: \"bi.year_quarter_combo\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nyearBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n\n\n\n\nmonthBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW\n弹出框弹出前触发\n\n\nBI.YearQuarterCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/date/custom_date_time.html":{"url":"detailed/date/custom_date_time.html","title":"custom_date_time","keywords":"","body":"custom_date_time\n日期选择下拉框(可以选择时分秒)\nsource\nBI.createWidget({\n type: \"bi.custom_date_time_combo\",\n element: \"#wrapper\",\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.CustomDateTimeCombo.EVENT_CANCEL\n点击取消触发\n\n\nBI.CustomDateTimeCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/combo/single_tree_combo.html":{"url":"detailed/combo/single_tree_combo.html","title":"single_tree_combo","keywords":"","body":"bi.single_tree_combo\n二级树下拉框\nsource\nvar tree = BI.createWidget({\n type: \"bi.single_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ntrigger\n\nobject\n{}\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW\n下拉框弹出前触发\n\n\n\n其他事件详见Input\n\n"},"detailed/combo/multilayer_single_tree_combo.html":{"url":"detailed/combo/multilayer_single_tree_combo.html","title":"multilayer_single_tree_combo","keywords":"","body":"bi.multilayer_single_tree_combo\n多层级下拉单选树\nsource\nvar tree = BI.createWidget({\n type: \"bi.multilayer_single_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/combo/select_tree_combo.html":{"url":"detailed/combo/select_tree_combo.html","title":"select_tree_combo","keywords":"","body":"bi.select_tree_combo\n二级可选节点下拉框树\nsource\nvar tree = BI.createWidget({\n type: \"bi.select_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/combo/multilayer_select_tree_combo.html":{"url":"detailed/combo/multilayer_select_tree_combo.html","title":"multilayer_select_tree_combo","keywords":"","body":"bi.multilayer_select_tree_combo\n多层级下拉可选节点树\nsource\nvar tree = BI.createWidget({\n type: \"bi.multilayer_select_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/path/path_chooser.html":{"url":"detailed/path/path_chooser.html","title":"path_chooser","keywords":"","body":"path_chooser\n路径选择\nsource\nBI.createWidget({\n type: \"bi.path_chooser\",\n element: \"#wrapper\",\n items: [[{\n \"region\": \"8c4460bc3605685e\",\n \"regionText\": \"采购订单XXX\",\n \"text\": \"ID\",\n \"value\": \"1\"\n }, {\n \"region\": \"0fbd0dc648f41e97\",\n \"regionText\": \"采购订单\",\n \"text\": \"学号\",\n \"value\": \"3\"\n }, {\n \"region\": \"c6d72d6c7e19a667\",\n \"regionText\": \"供应商基本信息\",\n \"text\": \"ID\",\n \"value\": \"5\"\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n二维数组,每个元素代表一条路径\narray\n\n\n\n\n\n"},"detailed/path/direction_path_chooser.html":{"url":"detailed/path/direction_path_chooser.html","title":"direction_path_chooser","keywords":"","body":"direction_path_chooser\n带方向的路径选择\nsource\nBI.createWidget({\n type: \"bi.direction_path_chooser\",\n element: \"#wrapper\",\n items: [[{\n \"region\": \"合同信息\",\n \"text\": \"客户ID\",\n \"value\": \"defa1f7ba8b2684a客户ID\"\n }, {\n \"region\": \"客户信息\",\n \"text\": \"主键\",\n \"value\": \"1f4711c201ef1842\",\n \"direction\": -1\n }, {\n \"region\": \"合同的回款信息\",\n \"text\": \"合同ID\",\n \"value\": \"e351e9f1d8147947合同ID\",\n \"direction\": -1\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向\narray\n\n\n\n\n\n"},"detailed/relation_view.html":{"url":"detailed/relation_view.html","title":"relation_view","keywords":"","body":"relation_view\n关联视图\nsource\nBI.createWidget({\n type: \"bi.relation_view\",\n items: [{\n primary: {\n region: \"B\", regionText: \"比\",\n title: \"b2...\",\n value: \"b2\", text: \"b2字段\"\n },\n foreign: {region: \"C\", value: \"c1\", text: \"c1字段\"}\n }, {\n primary: {region: \"A\", value: \"a1\", text: \"a1字段\"},\n foreign: {region: \"C\", value: \"c2\", text: \"c2字段\"}\n }]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n"},"detailed/dialog.html":{"url":"detailed/dialog.html","title":"dialog","keywords":"","body":"dialog\n对话框\nsource\nBI.Msg.alert(title, content)\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n对话框标题\nstring\n\n\n\n\ncontent\n对话框内容\nstring\n\n\n\n\n\n"},"detailed/file_manager.html":{"url":"detailed/file_manager.html","title":"file_manager","keywords":"","body":"file_manager\n文件管理器\nsource\nBI.createWidget({\n type: \"bi.file_manager\",\n items: [{\n id: \"1\",\n value: \"1\",\n text: \"根目录\"\n }, {\n id: \"11\",\n pId: \"1\",\n value: \"11\",\n text: \"第一级子目录1\"\n }, {\n id: \"12\",\n pId: \"1\",\n value: \"12\",\n text: \"第一级子目录2\"\n }]\n})\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n方法\n\n\n\n方法\n说明\n\n\n\n\ngetSelectedValue()\n获取当前选中项的value值\n\n\ngetSelectedId\n获取当前选中项的id属性\n\n\n\n\n"},"detailed/slider.html":{"url":"detailed/slider.html","title":"slider","keywords":"","body":"bi.slider\nslider插件\nsource\nBI.createWidget({\n type: \"bi.multi_select_combo\",\n items: [],\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nmin\n\nnumber\n10\n\n\nmax\n\nnumber\n50\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ngetValue\n\n—\n\n\nsetValue\n\nvalue\n\n\n\n\n\n\n\n\n"}}} \ No newline at end of file +{"index":{"version":"0.5.12","fields":[{"name":"title","boost":10},{"name":"keywords","boost":15},{"name":"body","boost":1}],"ref":"url","documentStore":{"store":{"./":["1.","2.","3.","4.","fineuidoc","fineui的交互、前端以及视觉文档规范","getvalue,","populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件","setvalid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setxxx来实现","setvisible,","使用populate来清空或者重置布局,不要使用empty,","慎用resiz","控件都会提供setenable,","控件都会提供setvalue,","文档规范","谨慎监听和触发bi.controller.event_change事件,一般来说,控件都会有一个bi.classname.event_change事件,一些特殊的事件会在对应控件文档中列出"],"core/layout/vertical.html":["\"#wrapper\",","\"bi.label\",","\"layout","\"这里设置了hgap(水平间距),vgap(垂直间距)\",","'demo.vertical',","0","30","[{","api","bg1\",","bg2\",","bgap","bi.createwidget({","bi.vert","boolean","cls:","element:","height:","hgap","items:","lgap","number","padding值","rgap","scrolli","sourc","text:","tgap","true","true,fals","type:","vertic","vgap","{","});","},","}]","—","参数","可选值","垂直流式布局","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","设置垂直方向是否有滚动条","说明","默认值"],"core/layout/horizontal.html":["\"#wrapper\",","\"bi.text_button\",","\"layout","\"middle\"","\"这里设置了lgap,rgap,tgap,bgap\",","'bi.horizontal',","0","200","30,","[","[{","]","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizont","boolean","cls:","columns","element:","height:","hgap","horizont","items:","lgap","number","padding值","rgap","scrollx","sourc","string","text:","tgap","true","true,fals","type:","verticalalign","vgap","width:","{","});","},","}]","—","元素的垂直对齐方式","参数","参考相关css属性","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","水平流式布局","类型","设置水平方向是否有滚动条","说明","默认值"],"core/layout/htape.html":["\"#wrapper\",","\"bi.htape\",","\"layout","'1',","'2',","'3',","'bi.button',","'bi.label',","'button1'}},{width:","'button2'}},{width:","'button3'}}]","'fill',","'fill',el:","0","100,","100,el:","200,","200,el:",":","[","[{width:","]","api","array","bg1\"","bg2\"","bg3\"","bgap","bi.createwidget({","bi.htap","cls:","el","element:","hgap","htape","item","lgap","number","padding值","rgap","sourc","text","text:","tgap","type","type:","vgap","width:","{","{type:","}","});","},","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平tape布局,两列定宽,一列自适应","类型","说明","默认值"],"core/layout/vtape.html":["\"#wrapper\",","\"bi.vtape\",","\"layout","'1',","'2',","'3',","'bi.button',","'bi.label',","'button1'}},{height:","'button2'}},{height:","'button3'}}","'fill',","'fill',el:","0","100,","100,el:","200,","200,el:",":","[","]","api","array","bg1\"","bg2\"","bg3\"","bgap","bi.createwidget({","bi.vtap","cls:","el","element:","height:","hgap","item","lgap","number","padding值","rgap","sourc","text","text:","tgap","type","type:","vgap","vtape","{","{height:","{type:","}","});","},","—","参数","可选值","垂直tape布局,两列定高,一列自适应","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","说明","默认值"],"core/layout/center_adapt.html":["\"#wrapper\",","\"bi.center_adapt\",","\"bi.label\",","\"center","\"layout","0","1\",","10,","2\",","30","[","[{","]","adapt","api","array","bg1\",","bg2\",","bgap","bi.center_adapt","bi.createwidget({","center_adapt","cls:","columns","element:","height:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应左右垂直居中布局","说明","默认值"],"core/layout/vertical_adapt.html":["\"#wrapper\",","\"bi.label\",","\"bi.vertical_adapt\",","\"layout","\"vertic","0","10,","30","300,","[","[{","]","adapt上下自适应\",","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.vertical_adapt","cls:","columns","element:","height:","hgap","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vertical_adapt","vgap","vgap:","width:","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应垂直居中布局","说明","默认值"],"core/layout/left_right_vertical_adapt.html":["\"#wrapper\",","\"bi.label\",","\"layout","\"右边的垂直居中\",","\"左边的垂直居中\",","'bi.left_right_vertical_adapt',","0","10,","100,","30","[","[{","]","api","array","bg1\",","bi.createwidget({","bi.left_right_vertical_adapt","cls:","element:","height:","item","items:","left:","left_right_vertical_adapt","lhgap","lhgap:","llgap","lrgap","number","padding值","rhgap","rhgap:","right:","rrgap","sourc","text:","type:","width:","{","}","});","}]","}],","—","参数","可选值","右边容器left","右边容器right","右边容器左右padding值","基础属性","子控件数组","左右分离,垂直方向居中容器","左边容器left","左边容器right","左边容器左右padding值","类型","说明","默认值"],"core/layout/flow.html":["\"#wrapper\",","\"bi.center_adapt\",","\"bi.label\",","\"bi.left\",","\"bi.right\",","\"layout","\"left","\"right","0","1\",","2\",","20","20,","30,","[{","api","array","bg1\",","bg2\",","bg3\",","bg4\",","bgap","bi.createwidget({","bi.flow","cls:","element:","flow","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","{","});","},","}]","}],","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","类型","说明","靠左/右对齐的自由浮动布局","默认值"],"core/layout/center.html":["\"#wrapper\",","\"bi.center\",","\"bi.label\",","\"center","\"layout","\"normal\"","0","1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",","20","20,","2,为了演示label是占满整个的,用了一个whitespace:normal\",","[{","api","bg1\",","bg2\",","bgap","bi.cent","bi.createwidget({","center","cls:","element:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","whitespace:","});","},{","}],","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平和垂直方向都居中容器,","类型","说明","非自适应,用于宽度高度固定的面板","默认值"],"core/layout/horizontal_adapt.html":["\"#wrapper\",","\"bi.horizontal_adapt\",","\"bi.label\",","\"horizont","\"layout","//width:","0","10,","30","300,","[","[{","]","adapt左右自适应\",","api","array","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizontal_adapt","bi.verticalalign.middl","cls:","columns","const","element:","height:","hgap","horizontal_adapt","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","verticalalign","vgap","vgap:","width:","{","})","},","}]","—","元素的垂直对齐方式","参数","参考相关css属性","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","每列宽度所组成的数组","类型","自适应左右居中布局","说明","默认值"],"core/layout/horizontal_auto.html":["\"#wrapper\",","\"bi.horizontal_auto\",","\"bi.label\",","\"horizont","\"layout","0","10,","30","300,","[{","api","auto左右自适应\",","bg1\",","bg2\",","bgap","bi.createwidget({","bi.horizontal_auto","cls:","element:","height:","hgap","horizontal_auto","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","width:","{","})","},","}]","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","水平方向居中自适应容器","类型","说明","默认值"],"core/layout/horizontal_float.html":["\"#wrapper\",","\"bi.horizontal_float\",","\"bi.label\",","\"horizont","\"layout","0","10,","200,","[","[{","]","api","array","bg1\",","bgap","bi.createwidget({","bi.horizontal_float","cls:","element:","float左右自适应\",","height:30","hgap","horizontal_float","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","width:","})","}]","—","参数","可选值","基础属性","子控件数组","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","浮动的水平居中布局","类型","说明","默认值"],"core/layout/float_center.html":["\"#wrapper\",","\"bi.label\",","\"floatcenter与center的不同在于,它可以控制最小宽度和最大宽度\",","\"layout","\"normal\"","'bi.float_center',","0","20","20,","300,","[{","api","bg1\",","bg2\",","bgap","bi.createwidget({","bi.float_cent","cls:","element:","float_cent","height:","hgap","hgap:","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","vgap:","whitespace:","{","});","},","}],","—","参数","可选值","基础属性","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","浮动布局实现的居中容器","类型","说明","默认值"],"core/layout/border.html":["\"#wrapper\",","\"bi.label\"},","\"bi.label\"}}","'bi.border',","20","20,","200,","30,","300,","50,","[","]","api","bi.bord","bi.createwidget({","border","bottom:","center:","east:","el:","element:","height:","item","items:","left:","north,east,west,south,cent","north:","object","right:","sourc","south:","top:","type:","west:","width:","{","{el:","{type:","}","});","},","上下的高度固定/左右的宽度固定,中间的高度/宽度自适应","参数","可选值","基础属性","子控件对象","类型","说明","默认值"],"core/layout/grid.html":["\"#wrapper\",","\"bi.label\",","\"column","\"layout","'bi.grid',","0\",","0,","1\",","1,","2,","[]","[{","api","array","bg1\"","bg2\"","bg5\"","bg6\"","bi.createwidget({","bi.grid","cls:","column","column:","columns:","el:","element:","grid","item","items:","null","number","row","row:","rows:","sourc","text:","type:","{","}","});","},","}]","—","列数","参数","可选值","基础属性","子控件数组","类型","网格布局","行数","说明","默认值"],"core/layout/table.html":["\"bi.table\",","\"body\",","\"fill\",","'bi.button',","'button1'}},{width:","'button2'}},{width:","'button3'}}]","'fill',el:","'fill']","0","10","100,el:","110,","130],","20,","200,","200,el:","200],","30","30,","50,","70,","90,","[10,","[100,","[200,","[],","[{width:","additem","additem(arr)","array","array/numb","bi.createwidget({","bi.tabl","boolean","columns","columnsize:","element:","hgap","hgap:","item","items:","number","poplulate(items)","popul","rowsiz","rowsize:","scrolli","sourc","tabl","table作为一个列表集合存在,继承bi.widget","text:","true","type:","vgap","vgap:","{type:","});","内部元素间横向距离","内部元素间纵向距离","列项宽度","参数","参数设置","增加内容","子项","方法","方法名","是否出现滚动条","更换新的内容","用法","类型","行高","说明","默认值"],"core/layout/td.html":["\"bi.td\",","'body',","'fill'],","'label1'}},{","'label2'},{","'label3'}","0","20,","200,","200]","[20,","[200,","[[{el:","[]","additem","additem(arr)","array","bi.createwidget({","bi.td","columns","columnsize:","el:","element:","hgap","item","items:","number","poplulate(items)","popul","sourc","td","type:","vgap","{text:","});","内容项","列宽","单元格控件,继承bi.layout","参数","增加内容","方法","方法名","更换新的内容","横向间隙","用法","类型","纵向间隙","说明","默认值"],"core/abstract/button_group.html":["\"#wrapper\",","\"bi.button_group\",","\"bi.center\",hgap:","\"bi.label\",","\"bi.vertical\"","\"button_group\"","0,vgap:","0}]","50,","[","[{","[{type:","]","additem","api","array","behavior","bi.button_group","bi.buttongroup.choose_type_singl","bi.buttongroup.choose_type_single,","bi.createwidget({","button_group","choose_type_single,choose_type_multi,choose_type_all,choose_type_none,choose_type_default","choosetyp","choosetype:","choosetype可选值为","const","destroy","dobehavior","el:","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","height:","id","index","item","items:","layout","layouts:","object","popul","prependitem","removeitem","removeitemat","setenabledvalu","setnotselectedvalu","setvalu","sourc","text:","type:","valu","value,可以是单个值也可以是个数组","{","}","})","},","}]","}],","—","一组具有相同属性的元素集合,基类bi.widget","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","布局","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","移除制定元素","移除指定索引处的item","类型","自定义列表中item项的行为,如高亮,标红等","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","见上","设置value值","设置value值可用","设置未被选中的值","说明","选择类型","销毁组件","默认值"],"core/abstract/button_tree.html":["\"#wrapper\",","\"0\",","\"bi.button_tree\",","\"bi.label\",","\"bi.vertical\"","\"label1\",","[{","bi.button_tre","bi.buttongroup.choose_type_multi,","bi.createwidget({","button_tre","choosetype:","element:","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","height:50,","id","items:","layouts:","setenabledvalu","setnotselectedvalu","setvalu","sourc","text:","type:","valu","value,可以是单个值也可以是个数组","value:","vgap:10","})","}]","}],","—","一组具有相同属性的元素集合,基类bi.buttongroup","名称","回调参数","对外方法","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置value值可用","设置未被选中的值","说明"],"core/abstract/virtual_group.html":["\"#wrapper\",","\"bi.center\",hgap:","\"bi.center_adapt\",","\"bi.vertical\"","\"bi.virtual_group\",","0,vgap:","0}]","300,","500,","[","[{","[{type:","]","additem","api","array","bi.buttongroup.choose_type_multi,","bi.createwidget({","bi.virtual_group","choosetype:","element:","getvalu","height:","item","items:[]","layout","layouts:","popul","prependitem","render","setvalu","sourc","type:","value,可以是单个值也可以是个数组","virtual_group","width:","{","})","},","}],","—","优化过的buttongroup,删除看不见的元素","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","子组件数组","对外方法","布局","渲染列表","类型","获取被选中的值","设置value值","说明","默认值"],"core/abstract/custom_tree.html":["\"bi.button_tree\",","\"bi.button_tree\",choosetype:","\"bi.custom_tree\",","\"bi.custom_tree\"}}","\"bi.plus_group_node\",","\"bi.single_select_item\",","\"bi.vertical\",","\"bi.vertical\"}]}","\"根目录\",","\"第一级目录1\",","\"第二级文件1\",","0,","0,layouts:","1,","11,","2,","25","30","[","[{","[{type:","]","additem","api","array","bi.createwidget({","bi.custom_tre","choosetype:","custom_tre","el","el:","empti","expand","getallbutton","getallleav","getnodebyid","getnodebyvalu","getvalu","height:","hgap:","id","id:","inittre","item","items:","itemscr","layouts:","node","object","open:","pid:","popul","popup组件","prependitem","render","setvalu","sourc","stroke","true,","type:","valu","value,可以是单个值也可以是个数组","value:","{","{el:","{type:","{},popup:","}","});","},","}]","—","内部前插入","内部后插入","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","子组件构造器","对外方法","开启popup元素","构造树结构","根据id获取节点","根据value值获取节点","清空组件","渲染列表","生成树方法","类型","自定义树,基类bi.widget","获取所有button","获取所有的叶子节点","获取被选中的值","设置value值","说明","默认值"],"core/abstract/grid_view.html":["\"bi.grid_view\",","()","0","100,","100;","30,","300,","30;","400,","[","[],","]","api","array","b","bi.createwidget({","bi.grid_view","bi.gridview.event_scrol","boolean","columnwidthgett","columnwidthgetter:","estimatedcolumns","estimatedcolumnsize:","estimatedrows","estimatedrowsize:","function","getmaxscrollleft","getmaxscrolltop","getscrollleft","getscrolltop","grid_view","height","height:","item","items:","number","number,funct","overflowi","overflowx","overscancolumncount","overscanrowcount","popul","restor","return","rowheightgett","rowheightgetter:","scrollleft","scrollleft,","scrolltop","scrolltop:","scrolltop}","setestimatedcolumns","setestimatedrows","setoverflowi","setoverflowx","setscrollleft","setscrolltop","sourc","true","true,fals","type:","width","width:","{","{scrollleft:","}","});","},","—","事件","列宽,必设","刷新列表","参数","可以合并单元格,指定行列可以删除看不见的元素,基类bi.widget","可选值","名称","回调参数","基础属性","子组件数组","对外方法","是否显示横向滚动条","是否显示纵向滚动条","每格列宽","每格行宽","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","类型","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","行宽,必设","设置列宽","设置是否显示横向滚动条","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","设置行宽","说明","超出可视范围区域预加载多少列","超出可视范围区域预加载多少行","还原列表设置","预估列宽,rowheightgetter为function时必设","预估行宽,columnwidthgetter为function时必设","默认值"],"core/abstract/collection_view.html":["\"bi.collection_view\",","%","(index)","*","/","0","10","10)","300,","400,","50","50,","[","[],","]","api","array","b","bi.collection_view","bi.collectionview.event_scrol","bi.createwidget({","boolean","cellsizeandpositiongett","cellsizeandpositiongetter:","collection_view","collectionview,指定行列可以删除看不见的元素","element:\"#wrapper\",","function","getmaxscrollleft","getmaxscrolltop","getscrollleft","getscrolltop","height","height:","horizontaloverscans","index","item","items:","math.floor(index","number","overflowi","overflowx","popul","restor","return","scrollleft","scrollleft,","scrolltop","scrolltop:","scrolltop}","setoverflowi","setoverflowx","setscrollleft","setscrolltop","sourc","true","true,fals","type:","verticaloverscans","width","width:","x:","y:","{","{scrollleft:","}","});","—","事件","列宽,必设","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","子组件数组","对外方法","是否显示横向滚动条","是否显示纵向滚动条","横向超出可视范围区域预加载的数量","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","类型","纵向超出可视范围区域预加载的数量","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","行宽,必设","设置是否显示横向滚动条","设置每个单元格的位置坐标和宽高","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","说明","还原列表设置","默认值"],"core/abstract/virtual_list.html":["\".\"","\"bi.label\",","\"bi.virtual_list\",","\"xxxx\"}],","(i","(i,","+","0","1)","10","100","30,","[","]","api","array","bi.createwidget({","bi.extend({},","bi.map([{value:","bi.virtual_list","blocksiz","destroy","element:\"body\",","function","height:","item","item)","item,","item.text,","items:","mount","number","overscanheight","popul","render","restor","return","scrolltop","sourc","text:","type:","virtual_list","{","})","});","—","刷新列表","参数","可选值","名称","回调参数","基础属性","子组件数组","对外方法","渲染列表","滚动加载的个数","滚动条相对于顶部的偏移","看不见的元素全部删除的list,基类bi.widget","类型","组件挂载","说明","超出可视范围区域的高度","还原列表设置","销毁组件","默认值"],"core/combination/bi.combo.html":["\"bi","\"bi.button\",","\"bi.combo\",","\"body\",","\"bottom\"","\"click\"","\"left,right,center\"","\"测试\",","0","2,","25","adjustheight","adjustlength","adjustlength:","adjustwidth","adjustxoffset","adjustyoffset","api","bi.combo","bi.combo.event_after_hideview","bi.combo.event_after_init","bi.combo.event_after_popupview","bi.combo.event_before_hideview","bi.combo.event_before_popupview","bi.combo.event_chang","bi.combo.event_collaps","bi.combo.event_expand","bi.combo.event_trigger_chang","bi.createwidget({","boolean","bottom","bottom,left","bottom,right","click,hov","combo","combo,基类bi.widget","comboclass","combo类","destroy","destroywhenhid","direct","el","el:","element:","fals","function","getpopupposit","getvalu","getview","height","height:","hidecheck","hideview","hover\"","hoverclass","hover类","isdefaultinit","isneedadjustheight","isneedadjustwidth","isviewvis","item","left","left,right,cent","number","object","offsetstyl","popul","popup","popup\"","popup:","resetlistheight","resetlistwidth","right","setvalu","showview","sourc","stopev","stoppropag","string","text:","toggl","top","top,left","top,right","trigger","trigger发生改变触发","true","true,fals","type:","v","value值","width","{","{}","|","}","});","},","—","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","下拉框初始化后触发","下拉框展开触发","下拉框收起触发","事件","切换状态","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","开启或者隐藏弹出层","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层显示位置","弹出层点击触发","弹窗层是否可见","是否阻止事件","是否隐藏弹出层检测","是否需要宽度调整","是否需要高度调整","是否默认初始化子节点","显示弹出层","类型","自定义下拉框trigger","获取combo","获取弹出层","获取弹出层的位置","设置combo","说明","调整宽度","调整横向偏移","调整纵向偏移","调整高度","重置列表宽度","重置列表高度","销毁组件","阻止事件冒泡","隐藏弹出层","隐藏弹窗层是否销毁","默认值"],"core/combination/bi.expander.html":["\"#wrapper\",","\"bi","\"bi.expander\",","\"bi.icon_text_node\",","\"bi.single_select_item\",","\"bottom\"","\"click\"","\"expander\"","\"pull","\"项目1\",","\"项目2\",","0","1","2","25,","[{","adjustlength","api","bi.createwidget({","bi.expand","bi.expander.event_after_hideview","bi.expander.event_after_init","bi.expander.event_after_popupview","bi.expander.event_before_hideview","bi.expander.event_before_popupview","bi.expander.event_chang","bi.expander.event_collaps","bi.expander.event_expand","bi.expander.event_trigger_chang","boolean","bottom","bottom,left","bottom,right","click,hov","cls:","destroy","direct","el","el:","element:","expand","expanderclass","expander初始化后触发","expander展开触发","expander收起触发","fals","font\",","getallleav","getnodebyid","getnodebyvalu","getvalu","getview","ha","height:","hideview","hover\"","hoverclass","hover类","id","isdefaultinit","isexpand","isviewvis","item","items:","left","number","object","popul","popup","popup\"","popup:","right","setvalu","showview","sourc","string","text:","toggl","top","top,left","top,right","trigger","trigger发生改变触发","true","true,fals","type:","v","valu","value:","value值","{","|","}","});","},","}]","—","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","事件","切换状态","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","展开类","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层点击触发","弹窗层是否可见","是否默认初始化子节点","显示弹出层","某个可以展开的节点,基类bi.widget","根据id获取节点","根据value值获取节点","类型","自定义下拉框trigger","节点是否展开","获取combo","获取弹出层","获取所有的叶子节点","设置combo","说明","销毁组件","隐藏弹出层","默认值"],"core/combination/group_combo.html":["\"\",","\"\"}","\"#wrapper\",","\"2010年\",","\"bi.button_tree\",choosetype:","\"bi.combo_group\",","\"bi.icon_text_icon_item\",","\"bi.single_select_item\",","\"bi.text_button\",","\"bi.vertical\"}]}}","\"bottom\"","\"click\"","\"close","\"一月\",","0","0,layouts:","11","2010,","25,","[","[{","[{type:","]","adjustlength","api","array","bi.combo_group","bi.createwidget({","boolean","bottom","bottom,left","bottom,right","childern","children:","click,hov","direct","el","el:","element:","fals","font\"","getvalu","group_combo","ha","height:","iconcls:","isdefaultinit","isneedadjustheight","isneedadjustwidth","item","left","number","object","popul","popup","right","setvalu","sourc","string","text:","top","top,left","top,right","trigger","true,fals","type:","v","value:","value值","{","{el:","{type:","|","});","},","}]","—","下拉列表的弹出方式","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","子组件","对外方法","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","是否需要宽度调整","是否需要高度调整","是否默认初始化子节点","类型","自定义下拉框trigger","获取combo","设置combo","说明","默认值"],"core/combination/loader.html":["\"#wrapper\",","\"bi.loader\",","\"bi.single_select_item\",","\"top\"","25","[]","additem","api","array","bi.createwidget({","bi.extend(v,","bi.load","bi.uuid()","boolean","combo弹出层位置","count","destroy","direct","element:","empti","faker.name.findname(),","function","function(i,","function(idx,","function(option)","function(options,","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasnext:","hasprev","height:","id","isdefaultinit","item","itemscr","itemscreator:","loader","logic","next","null),","object","onload","option.count","popul","populate(bi.map(bi.map(bi.makearray(3,","populate)","prependitem","prev","return","setnotselectedvalu","setvalu","sourc","string","text:","top,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)","true","true,fals","type:","v)","valu","value){","value,可以是单个值也可以是个数组","value:","{","{dynamic:true,scrolly:true}","})","}))","}),","},","};","—","上一页","下一页","内部前插入","内部后插入","判断是否有上一页","判断是否有下一页","刷新列表","加载中","加载控件,bi.widget","参数","可选值","名称","回调参数","基础属性","子组件","子组件构造器","对外方法","布局逻辑","是否显示总页数","是否默认初始化子数据","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","销毁组件","默认值"],"core/combination/navigation.html":["\"#wrapper\",","\"bi.label\",","\"bi.navigation\",","\"bottom\"","\"layout","\"前进\",","\"后退\",","\"第\"","\"页\"","+","1","30,","8),","[{","aftercardcr","aftercardshow","api","bg\"","bi.createwidget({","bi.navig","bi.random(1,","boolean","cardcreat","cardcreator:","cls:","defaultshowindex","destroy","direct","element:","empti","false,","function","function(v)","getselect","getselectedcard","getvalu","height:","item","items:","logic","mount","navig","object","once:","popul","render","return","setselect","setvalu","singl","sourc","string","tab","tab:","tab页元素","text:","top,bottom,left,right,custom","true","true,fals","type:","v","valu","value:","{","{dynamic:true}","}","})","},","}]","—","创建卡导航页页之后","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","导航栏控件,bi.widget","导航页展示之后","布局逻辑","挂载组件","控件位置","是否为单页","是否默认显示","清空组件","渲染组件","类型","获取被选中的值","获取选中的index","获取选中的导航页","设置value值","设置选中的index","说明","销毁组件","面板显示之后","面板构造之后","面板构造器","默认值"],"core/combination/searcher.html":["\"bi","\"bi.button_group\",","\"bi.label\",","\"bi.search_editor\"}","\"bi.searcher\",","\"bi.searcher_view\"}","\"bi.vertical\"","\"张三\"","()","0","[{","adapt","adapter:","adjustheight","adjustview","api","bgap","bi.createwidget({","bi.search","bi.searcher.event_after_init","bi.searcher.event_chang","bi.searcher.event_paus","bi.searcher.event_search","bi.searcher.event_start","bi.searcher.event_stop","boolean","border\",","choose_type_singl","choosetyp","cls:","const","destroy","dosearch","el","element:\"#wrapper\",","empti","event_after_init","event_paus","event_search","event_start","event_stop","fals","function","function(op.callback)","getitems:","getkeyword","getvalu","getview","hasmatch","hgap","isautosearch","isautosearch为false时启用","isautosync","isdefaultinit","issearch","isviewvis","items,","items:","keyword","layouts:","lgap","masker","masker:","masker层","null","number","object","onsearch","padding值","popul","popup","popup:","result,","return","rgap","searcher","searchresult,","setvalu","sourc","stopsearch","tgap","true","true,fals","type:","valu","value:","vgap","{","{offset:","{type:","{}}","}","})","},","}]","}],","—","事件","事件名称","事件方法","停止搜索","停止搜索触发(搜索框为空)","初始化之后","刷新列表","即是否保持搜索面板和adapter面板状态值的统一","参数","可选值","名称","回调参数","基础属性","对外方法","开启弹出层的元素","开始搜索","开始搜索触发","弹出层","弹出层显示的位置元素","搜索中","搜索列表位置","搜索暂停触发(搜索文本以空白字符结尾)","搜索结果面板初始化完成后触发","搜索结果面板发生改变触发","搜索逻辑控件,bi.widget","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否匹配","是否正在搜索","是否自动同步数据,","是否自动搜索","是否默认初始化子节点","暂停搜索","正在搜索时触发","清空组件","类型","组件是否可见","获取搜索关键词","获取搜索关键词数组","获取搜索列表栏","获取被选中的值","设置value值","说明","调整搜索列表栏","调整高度","选择类型","销毁组件","默认值"],"core/combination/switcher.html":["\"#wrapper\",","\"bi","\"bi.button\",","\"bi.switcher\",","\"click\"","\"switcher\"","25,","adapt","adapter:","adjustview","api","bi.createwidget({","bi.direction.top","bi.switch","boolean","click,hov","destroy","direct","el","el:","element:","empti","event_after_hideview","event_after_init","event_after_popupview","event_before_hideview","event_before_popupview","event_collaps","event_expand","event_trigger_chang","getallleav","getnodebyid","getnodebyvalu","getvalu","getview","height:","hideview","hover\"","hoverclass","hover类","id","isexpand","isviewvis","item","masker","masker层","null","obejct","object","popul","popup","popup\"","popup:","setadapt","setvalu","showview","sourc","string","switcher","switcherclass","text:","toggl","trigger","true","true,fals","type:","valu","{","}","})","},","—","下拉列表的弹出方式","事件名称","事件方法","切换显示或隐藏面板,bi.widget","切换状态","切换类","初始化之后","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","弹出层","弹出层的位置","弹窗层是否可见","显示弹出层","根据id获取节点","根据value值获取节点","清空组件","类型","自定义下拉框trigger","节点是否展开","获取弹出层","获取所有的叶子节点","获取被选中的值","设置value值","设置弹出层显示的位置元素","说明","调整弹出层显示的位置元素","销毁组件","隐藏弹出层","面板切换","面板展开","面板收起","面板显示之前","面板显示之后","面板显示的位置","面板隐藏之前","面板隐藏之后","默认值"],"core/combination/tab.html":["\"#wrapper\",","\"bi","\"bi.button_group\",","\"bi.label\",","\"bi.tab\",","\"bottom\"","\"tab1\",","\"tab2\",","\"面板1\"","\"面板2\"","(v)","1,","1:","2,","2:","30,","50","[{","api","bi.createwidget();}","bi.createwidget({","bi.switch","boolean","card\",","cardcreat","cardcreator:","cardnam","case","cls:","defaultshowindex","destroy","direct","element:","empti","fals","function","function(v)","getselect","getselectedtab","gettab","getvalu","height:","item","items:","logic","mount","object","popul","removetab","render","return","setselect","setvalu","singl","sourc","string","switch","tab","tab:","tab标签页","text:","top,bottom,left,right,custom","true,fals","type:","v","valu","value:","width:","{","{dynamic:false}","{return","}","})","},","}]","—","切换显示或隐藏面板,bi.widget","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","布局逻辑","挂载组件","控件位置","是否为单页","是否默认显示tab页","清空组件","渲染组件","移除tab面板页","类型","获取tab面板页","获取被选中的值","获取选中的index","获取选中的tab面板页","设置value值","设置选中的index","说明","销毁组件","面板构造器","默认值"],"core/layer/layer_float_box.html":["\"#wrapper\",","\"bi.text_button\",","\"点击弹出floatbox\",","200,","500","600","80,","=","api","bi.barpopoversection()).open(id);","bi.createwidget({","bi.float_box","bi.popovers.create(id,","bi.popovers.remove(id);","bi.uuid();","close","destroy","element:","event_float_box_clos","float_box","floatbox弹出层,bi.widget","function()","handler:","height","height:","hide","id","index","new","number","open","popul","sectionprovid","setzindex","show","sourc","text:","type:","var","width","width:","z","{","}","})","—","事件名称","事件方法","关闭弹出层","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","弹出层宽度","弹出层高度","打开弹出层","显示","类型","设置z","说明","销毁组件","隐藏","默认值"],"core/layer/layer_popup.html":["\"#wrapper\",","\"aaa\"","\"aaa\",","\"auto\"","\"bbb\"","\"bbb\",","\"bi.button_group\",","\"bi.button_group\",items:","\"bi.popup_view\",","\"bi.vertical\"","\"bi.vertical\"}]}","0","0,behaviors:","100","25","[]","[],","[{","[{type:","api","array","bgap","bi.createwidget({","bi.direction.top","bi.popup_view","boolean","button","choosetype:","const","direct","el","el:","element:","fals","getvalu","getview","height","hgap","index","item","items:","layouts:","lgap","logic","maxheight","maxwidth","minheight","minwidth","number","number/str","object","padding值","popul","popup","resetheight","resetwidth","rgap","setvalu","setzindex","sourc","stopev","stoppropag","tab","text:","tgap","tool","toolbar栏","true,fals","type:","valu","value:","vgap","width","z","zindex在1000w,bi.widget","{","{dynamic:true}","{},layouts:","}","})","},","}]","}],","—","下拉框弹出层,","值","刷新列表","参数","参考button_group","可选值","名称","回调参数","基础属性","子组件","对外方法","导航栏","工具栏的方向","布局逻辑","弹出层最大宽度","弹出层最大高度","弹出层最小宽度","弹出层最小高度","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否停止mousedown、mouseup事件","是否停止mousedown、mouseup向上冒泡","类型","自定义工具栏","获取value值","获取弹出层","设置valu","设置z","说明","重置宽度","重置高度","默认值"],"core/layer/layer_searcher.html":["\"#wrapper\",","\"a\"","\"a\");","\"a\",","\"aba\"","\"aba\",","\"acc\"","\"acc\",","\"bi.button_group\",behaviors:","\"bi.searcher_view\",","\"bi.vertical\"","\"bi.vertical\"}]}","()","=","[],","[{","api","bi.createwidget({","bi.i18ntext(\"bi","bi.searcher_view","bi.selection.singl","choosetyp","const","element:","empti","function","getvalu","hasmatch","items:","keyword","layouts:","matcher","matchresult,","no_select\")","object","popul","redmark:","return","searcher","searcher.populate([{","searchresult,","setvalu","sourc","string","text:","tiptext","title文本","true;}","true;}},","type:","valu","value:","var","{","{redmark:","{return","{type:","});","},items:","},{","}],","}]}","—","值","刷新列表","参数","参考button_group","可选值","名称","回调参数","基础属性","基类bi.widget","完全匹配的构造器","对外方法","搜索到的元素","搜索面板,","是否有匹配的元素","清空组件","类型","获取value值","设置valu","说明","选择类型","默认值"],"core/widget.html":["\"","\"div\"","(注:",",一些需要在设置状态后做的额外工作可以通过重写_setxxx来实现)","addwidget","api","attr","attribut","basecl","beforecr","beforedestroy","beforemount","bi.widget","boolean","cl","class类名","creat","data","destroy","disabl","dobehavior","empti","enabl","extracl","fals","fineui2.0引入生命周期后,widget的实现类不需要重写setenable,setvalid等方法,会自动调用子组件的对应方法","getheight","getnam","gettag","gettext","getvalu","getwidgetbynam","getwidth","haswidget","height","html标签","invalid","invis","isen","ismount","isol","isvalid","isvis","key,valu","mount","name","name,widget","nameorwidget","null","object","removewidget","render","root","seten","setheight","settag","settext","setvalid","setvalu","setvis","setwidth","string","tag","tagnam","text","true,fals","updat","valid","valu","visibl","widget","width","—","判断是否有效","判断是否有该组件","判断组件是否挂载","参数","可选值","名称","回调参数","基础class类","基础属性","对外方法","属性","所有控件的超类","扩展class类","数据","是否可用","是否可见","是否有效","根据组件名称获取组件","根组件","添加组件","清空组件","渲染组件","生命周期函数","移除组件","类型","组件不在页面展示,组件事件和内容都在","组件实例刚被创建","组件实例创建完成","组件挂载","组件挂载之前","组件更新","组件销毁前调用","组件销毁后调用","自定义下拉列表中item项的行为,如高亮,标红等","获取tag","获取text值","获取value值","获取组件名称","获取组件宽度","获取组件高度","设置tag","设置text值","设置value值","设置组件不可用","设置组件不可见","设置组件可用","设置组件可见","设置组件宽度","设置组件属性","设置组件无效","设置组件是否可用","设置组件是否可见","设置组件是否有效","设置组件有效","设置组件高度","说明","销毁组件","默认值"],"core/single.html":["api","bi.singl","boolean","disabledhov","enablehov","fals","gettiptyp","gettitl","getvalu","getwarningtitl","isreadonli","item","null","opt","popul","readonli","settitl","setvalu","setwarningtitl","singl","string","success,warn","tiptyp","titl","title,opt","title类型","true,fals","valu","warningtitl","—","刷新或者清空列表","参数","取消hover事件","可选值","名称","回调参数","基础属性","对外方法","恢复hover可用","所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类bi.widget","是否只读","类型","组件value值","获取tiptyp","获取titl","获取value值","获取warningtitl","设置titl","设置value值","设置错误titl","说明","这仅仅只是一个超类,","错误titl","默认值"],"core/basic_button.html":["api","b","basic_button","beforeclick","bi.basic_button","bi.emptyfn","bindev","boolean","button的选中状态","click,","dblclick,","destroy","disableselect","dishov","doclick","empti","fals","forcenotselect","forceselect","function","gettext","handl","handler","hover","hover事件","isdisableselect","isforcenotselect","isforceselect","isonc","isselect","isshadowshowingonselect","lclick","mousedown,","mouseup,","null","onc","select","setselect","settext","shadow","stopev","stoppropag","string","trigger","true,fals","valu","—","一般的button父级,基类bi.singl","使能选中","判断是否怎么点击都不会被选中","判断是否点击即选中","判断是否让选中","参数","取消hover事件","可选值","名称","回调参数","基础属性","对外方法","无论怎么点击都不会被选中","是否只允许点击一次","是否显示阴影","是否被选中","清空组件","点击一次选中有效,再点无效","点击事件","点击事件之前","点击事件回调","点击即选中,","类型","组件value值","绑定事件","获取文本值","被选元素要触发的事件","设置文本值","设置选中的文本","说明","返回该对象","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中状态下是否显示阴影","销毁组件","阻止事件","阻止冒泡","默认值"],"core/node_button.html":["api","b","bi.basicbutton","bi.nodebutton","boolean","doclick","fals","isonc","isopen","node_button","open","setopen","triggercollaps","triggerexpand","true,fals","—","不仅有选中状态而且有展开状态,","判断节点是否展开","参数","可选值","名称","回调参数","基础属性","对外方法","点击一次后失效","点击展开","类型","节点展开","节点收起","节点是否展开","表示一个可以展开的节点,","设置节点展开状态","说明","默认值"],"core/pane.html":["api","bi.i18ntext(\"bi","bi.pan","bi.widget","boolean","check","empti","function","hasmatch","item","load","no_selected_item\")","onload","overlap","pane","popul","settipvis","string","tiptext","title文本","true","true,fals","—","刷新列表","加载中","加载完毕","参数","可选值","名称","回调参数","基础属性","对外方法","已经加载","当没有元素时有提示信息的view,","是否含有遮罩层","是否有匹配的元素","检查是否为空","清空组件","类型","设tip可见","说明","默认值"],"base/label.html":["\"","\"bi.label\",","\"基本标签\"","0","100,","30,","api","bgap","bi.createwidget({","bi.label","boolean","center","disabl","dohighlight","doredmark","forcecent","gettext","hgap","keyword","label","left,center,right","lgap","normal,nowrap","nowrap","null","number","padding值","popul","py","rgap","setstyl","settext","setvalu","sourc","string","text","text:","textalign","textheight","textheight:","textwidth","textwidth:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","vgap","warningtitl","whitespac","});","—","不考虑超出边界的情况,","元素内空白处理方式","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","在未知宽度和高度时有效","基础属性","对外方法","拼音","提示titl","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","文本内容","文本对齐方式","文本标签","文本标签宽度","文本标红","文本高亮","无","是否无论如何都要居中,","清空label","灰化","空","类型","获取文本值","设置文本值","设置文本样式","设置标红的关键词","说明","错误提示titl","需要设置的文本值text","需要设置的文本标签样式,例{\"color\":\"#000\"}","高级属性","默认值"],"base/bubble.html":["\"","\"#wrapper\",","\"top\"","\"测试\"","'bi.bubble',","30,","35","api","bi.bubbl","bi.createwidget({","bubbl","direct","element:","height","height:","number","settext","sourc","string","text","text:","type:","})","—","参数","可选值","名称","回调参数","基础属性","对外方法","气泡提示","气泡显示位置","气泡显示内容","气泡高度","类型","设置文本值","说明","需要设置的文本值text","默认值"],"base/toast.html":["\"","\"#wrapper\",","\"success\"","\"toast测试\"","\"warning\",","'bi.toast',","30","30,","api","bi.createwidget({","bi.toast","element:","height","height:","level","level:","number","setheight","settext","sourc","string","success,warn","text","text:","toast","toast提示","type:","})","—","参数","可选值","名称","回调参数","基础属性","对外方法","提示类型","显示内容","类型","设置文本值","设置高度","说明","需要设置的文本值text","需要设置的高度值height","高度","默认值"],"base/message.html":["\"#wrapper\",","\"bi.button\",","'点击我弹出一个消息框',","30,",":","alert","bi.createwidget({","bi.msg","bi.msg.confirm('测试消息框',\"我是测试消息框的内容\");","callback","callback,","confirm","context","element:","function()","handler","height","level,","messag","message,","min_width","prompt","sourc","text","title,","toast","toast提示","type:","value,","{","}","});","名称","回调参数","对外方法","提示消息框","消息提示","确认消息框","警告消息框","说明"],"base/button/button.html":["!==","\"","\"#wrapper\",","'bi.button',","'common',","'一般按钮',","0","10","30","90","[","]","api","array","bgap","bi.button","bi.createwidget({","block","boolean","button","clear","cneter","common","common,success,warning,ignor","destroy","doclick","dohighlight","doredmark","element:","fals","forcecent","height","height:","hgap","iconclass","isshadowshowingonselect","item","left,center,right","level","level:","lgap","minwidth","normal,nowrap","nowrap","null","number","padding值","props.clear","readonli","rgap","settext","setvalu","shadow","sourc","string","text:","textalign","textheight","textwidth","tgap","true","true,fals","type:","unhighlight","unredmark","vgap","whitespac","width","});","—","不考虑超出边界的情况,","元素内的空白处理方式","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","图标类型","在未知宽度和高度时有效","基础属性","子控件数组","宽度","对外方法","按钮文本宽度","按钮文本高度","按钮类型","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","文字布局","文字类型的按钮,基类bi.basicbutton","文本标红","文本高亮","是否去掉边框和背景","是否只读","是否块状显示,即不显示边框,没有最小宽度的限制","是否无论如何都要居中,","是否显示阴影","最小宽度,如果block/clear中某一项为true,此项值为0,否则为90","点击事件","类型","设置文本值","说明","选中状态下是否显示阴影","销毁事件","需要设置的文本值text","高度","高级属性","默认值"],"base/button/text_button.html":["\"","'bi.text_button',","'文字按钮',","0","10","30","api","bi.createwidget({","bi.text_button","boolean","cneter","doclick","dohighlight","doredmark","fals","forcecent","height:","hgap","left,center,right","lgap","normal,nowrap","nowrap","null","number","padding值","py","rgap","setstyl","settext","setvalu","sourc","string","text","text:","text_button","textalign","textheight","textwidth","true,fals","type:","unhighlight","unredmark","whitespac","});","—","不考虑超出边界的情况,","元素内的空白处理方式","参数","取消文本标红","取消文本高亮","可以点击的一行文字,基类bi.basicbutton","可选值","名称","回调参数","在未知宽度和高度时有效","基础属性","对外方法","拼音","按钮文本内容","按钮文本宽度","按钮文本高度","效果相当于文本框left","效果相当于文本框right","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","文字布局","文本标红","文本高亮","是否无论如何都要居中,","点击事件","类型","设置文本值","设置文本样式","说明","需要设置的文本值text","需要设置的文本标签样式,例{\"color\":\"#000\"}","高级属性","默认值"],"base/button/icon_button.html":["\"close","'bi.icon_button',","20","20,","api","bi.createwidget({","bi.icon_button","cls:","doclick","font\",","ha","height:","icon_button","iconheight","iconwidth","null","number","sourc","type:","width:","});","—","参数","可选值","名称","回调参数","图标button,基类bi.basicbutton","图标宽度","图标高度","基础属性","对外方法","点击事件","类型","说明","默认值"],"base/button/image_button.html":["\"","\"100%\"","\"http://www.easyicon.net/api/resizeapi.php?id=1206741&size=128\",","'bi.image_button',","100","100,","api","bi.createwidget({","bi.image_button","doclick","getimageheight","getimagewidth","getsrc","height:","iconheight","iconwidth","image_button","number/str","setheight","setimageheight","setimagewidth","setsrc","setwidth","sourc","src","src:","string","type:","width:","});","—","参数","可选值","名称","回调参数","图标宽度","图标高度","图片的button,基类bi.basicbutton","图片路径","基础属性","宽度width","对外方法","点击事件","类型","获取图片宽度","获取图片路径","获取图片高度","设置图片宽度","设置图片路径","设置图片高度","设置按钮宽度","设置按钮高度","说明","高度height","默认值"],"base/editor/editor.html":["\"","\"#wrapper\",","\"bi.editor\",","\"text\"","\"warning\"","\"字段不可重名!\",","0","2","200,","30","4","allowblank","api","b","bgap","bi.createwidget({","bi.editor","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","blur","blur事件","boolean","disableerror","disablewatermark","editor","editor的value发生改变触发","element:","enableerror","enablewatermark","errortext","errortext:","fals","focu","focus事件","function","geterrortext","getlastvalidvalu","getvalu","height:","hgap","inputtyp","isedit","isvalid","key","keydown时触发","lgap","number","onkeydown","padding值","quitcheck","resetlastvalidvalu","rgap","selectal","seterrortext","seterrorvis","setvalu","sourc","string","string/funct","success,warn","text","tgap","tiptyp","true,fals","type:","validationcheck","valu","vgap","watermark","width:","});","—","事件","停止输入触发","参数","参考input输入框类型","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","开始输入触发","恢复文本框placeholder可用","按下backspace触发","按下空格触发","按键事件","提示类型","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框,基类bi.singl","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置error不可用","设置error可用","设置文本框placeholder不可用","设置文本框值","设置错误文本","设置错误文本可见","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入框类型","输入较验函数","选中文本框文本","重置文本框最后一次输入的有效值","错误提示","默认值"],"base/editor/code_editor.html":["\"","\"bi.code_editor\",","\"mvc","2","400","600,","api","bi.code_editor","bi.createwidget({","blur","boolean","border\",","cls:","code_editor","fals","focu","function","getstyl","getvalu","height:","insertparam","insertstr","lineheight","number","param","paramformatt","readonli","refresh","setstyl","setvalu","sourc","str","string","true,fals","type:","valu","watermark","width:","});","—","代码文本框,基类bi.singl","刷新文本框","参数","参数显示值构造函数","可选值","名称","回调参数","基础属性","对外方法","插入参数","插入字符串","文本框placehold","文本框值","文本框失焦","文本框获取焦点","是否只读","类型","获取文本样式","获取文本框值","行高","设置文本样式","设置文本框值","说明","需要设置的文本标签样式style,例{\"color\":\"#000\"}","默认值"],"base/editor/multifile_editor.html":["\"","\"bi.multifile_editor\",","1","300","400,","accept","api","bi.createwidget({","bi.multifile_editor","bi.multifileeditor.event_progress","bi.multifileeditor.event_upload","bi.multifileeditor.event_uploadstart","boolean","fals","getvalu","height:","maxsiz","multifile_editor","multipl","number","reset","select","sourc","string","true,fals","type:","upload","url","width:","});","—","上传结束后触发","上传过程中触发","事件","允许上传的文件类型","参数","可选值","名称","回调参数","基础属性","多文件,基类bi.singl","对外方法","开始上传时触发","文件上传","文件路径","是否支持多选","最大可选数量","类型","获取文件名称","说明","选择文件","重置","默认值"],"base/editor/textarea_editor.html":["\"","\"bi.textarea_editor\",","300","400,","api","bi.createwidget({","bi.textarea_editor","blur","focu","getstyl","getvalu","height:","setstyl","setvalu","sourc","string","textarea_editor","type:","valu","width:","});","—","参数","可选值","名称","回调参数","基础属性","对外方法","文本域,基类bi.singl","文本域失焦","文本域的值","文本域获取焦点","类型","获取文本域值","获取文本域样式","设置文本域值","设置文本域样式","说明","需要设置的文本域样式style,例{\"color\":\"#000\"}","默认值"],"base/editor/formula_editor.html":["\"","\"100%\"","\"100%\",","\"bi","\"bi.formula_editor\",","'sum(c5,","16,","2","26)',","api","bi.createwidget({","bi.formula_editor","boolean","border\",","cls:","disablewatermark","field","fieldtextvaluemap","fn","focu","formula_editor","getcheckstr","getformulastr","getusedfield","getvalu","height:","insertfield","insertfunct","insertoper","insertstr","lineheight","number","onject","op","refresh","setfieldtextvaluemap","setfunct","setvalu","showhint","sourc","str","string","true","true,fals","type:","v","valu","value:","watermark","watermark:'请输入公式',","width:","{}","});","—","公式编辑控件,基类bi.singl","刷新文本框","参数","可选值","名称","回调参数","基础属性","字段集合","对外方法","插入函数","插入字符串","插入操作符","文本域的值","文本框placehold","文本框获取焦点","是否显示提示信息","添加字段","类型","获取公式框内容","获取可用字段","获取文本框值","获取校验内容","行高","设置函数","设置字段集合","设置文本框placeholder不可用","设置文本框值","说明","默认值"],"base/table/table_view.html":["\"bi.table_view\",","'body',","1],","200,","25","300,","400,","500],","=","[0,","[100,","[]","[],","array","bi.createwidget({","bi.table.event_table_after_init","bi.table.event_table_res","bi.table.event_table_scrol","bi.table_view","boolean","columns","columnsize:","element:","fals","footer","footerrows","freezecols:","function(row1,","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreeze:","isneedmerg","isneedmerge:","item","items:","mergecol","mergecols:","mergerul","number","popul","regioncolumns","resiz","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","table_view","table初始化完成后触发","table大小调整时触发(窗口变化等)","true,","type:","});","—","事件","列项间的","刷新内容","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","子组件","得到列宽","方法","方法名","时合并","是否含有数值滚动条","是否需要合并单元格","普通单元格高度","滚动事件","类型","能处理静态宽度以及动态宽度的表","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","表头","表头高度","表尾","表尾高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表格","默认row1","默认值","默认相等时合并"],"base/table/grid_table.html":["\"bi.grid_table\",","'body',","1],","25","500,","600,","[0,","[50,50,200,250,400],","[]","array","bi.createwidget({","bi.grid_t","boolean","columns","columnsize:","element:","fals","freezecol","freezecols:","getcolumns","getlefthorizontalscrol","getregioncolumns","getregions","getrighthorizontalscrol","getverticalscrol","grid_tabl","header","header:","headerrows","height","height:","isneedfreez","isneedfreeze:","isneedresize:","isresizeadapt:","item","items,","items:","number","popul","regioncolumns","restor","row","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","true,","type:","width","width:","});","—","储存","冻结列","列表展示的table,继承bi.widget","列项间的","刷新内容","单元格宽度集合","参数","参数设置","子组件","得到列宽","方法","方法名","是否需要冻结","普通单元格高度","类型","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获取间隙大小","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认值"],"base/table/collection_table.html":["\"bi.collection_table\",","\"bi.label\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","25","=","[","[200,200],","[]","[{","]","array","bg1\",","bg2\",","bg3\",","bg4\",","bi.collection_t","bi.createwidget({","boolean","cls:","collection_t","columns","columnsize:","element:","fals","freezecol","function(row1,","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getverticalscrol","headerrows","height","isneedfreez","isneedmerg","item","items:","mergecol","mergerul","number","popul","regioncolumns","restor","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","text:","type:","width","{","});","},","}]","}],","—","冻结的列","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","基本的表格","增加行","子组件","存储数据","得到列宽","方法","方法名","时合并","是否冻结列","是否需要合并单元格","普通单元格高度","类型","继承bi.widget","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取纵向滚动距离","获得列项之间的间隙","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认row1","默认值","默认相等时合并"],"base/table/resizable_table.html":["\"bi.label\",","\"bi.resizable_table\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","25","[","[200,200],","[]","[{","]","array","attr","bg1\",","bg2\",","bg3\",","bg4\",","bi.createwidget({","bi.resizable_t","boolean","cls:","columns","columnsize:","element:","fals","freezecol","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","headerrows","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items:","key:键,value:值","maxcolumns","mergecol","mincolumns","number","popul","regioncolumns","resizable_t","restor","row","rowsiz","scrollleft","scrolltop","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","text:","true","type:","{","});","},","}]","}],","—","保存表","冻结的列","列项间的","刷新内容","单元格宽度集合","参数","参数设置","可调整列宽的grid表格,继承bi.widget","合并的单元格列号","子组件","得到列宽","方法","方法名","是否调整时自适应","是否需要冻结列","是否需要合并单元格","是否需要调整大小","普通单元格高度","最大列宽","最小列宽","类型","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","默认值"],"base/pager.html":["\"bi.pager\",","\"上一页\"","\"下一页\"","\"尾页\"","\"首页\",","0","1","18,","1;}","5,","50,","6,","api","array","attr","behavior","bi.createwidget({","bi.pag","bi.pager.event_after_popul","boolean","curr","curr:","dynamicshow","dynamicshowfirstlast","dynamicshowprevnext","fals","first","first:","firstpag","function","function(){","function(){return","getcurrentpag","getvalu","group","groups:","hasnext","hasprev","height:","jump","key,valu","last","last:","lastpag","layout","next","number","object","page","pager","pager刷新完成事件","pages:","popul","prev","return","setallpag","setvalu","sourc","sting,object","string,object","true","true,fals","type:","v","{type:\"bi.horizontal\",hgap:10,vgap:0}","{}","});","—","上一页","下一页","主要作用于setvalue方法","事件","分页控件,基类bi.widget","初始化当前页","判断是否有上一页","判断是否有上一页,pages不可用时有效","判断是否有下一页","判断是否有下一页,pages不可用时有效","刷新或者清空列表","参数","可选值","名称","回调参数","基础属性","对外方法","布局","是否动态显示上一页、下一页,dynamicshow为false时生效","是否动态显示上一页、下一页、首页、尾页,","是否动态显示首页、尾页,dynamicshow为false时生效","是否显示尾页","是否显示总页数","是否显示首页","最后一页,在万不得已时才会调用这个函数获取最后一页的页码,","第一页","类型","自定义列表中item项的行为,如高亮,标红等","若为false,则指对其设置使能状态","获取当前页码","设置属性","设置当前页码","设置总页数","说明","连续显示分页数","页数跳转","默认值"],"base/svg.html":["\"bi.svg\",","\"red\"});","(family,","(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高","(width,height)分别表示画布宽高","(x,","(x,y)","(x,y,r)分别表示原点的横坐标,纵坐标,以及半径","(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径","(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容","(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角bord","(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整",".attr({stroke:","500,","600","=","add","bi.createwidget({","bi.svg","circl","clear","ellips","font,","getbyid","getelementbypoint","getelementsbypoint","getfont","height:","id","imag","json","letter_spacing,","line_spacing)","origin,","page","path","pathstr","print","radius大小","rect","remov","set","setfinish","setsiz","setstart","setviewbox","size,","sourc","stretch)","string,","style,","svg","svg.path(\"m10,10l50,50m50,10l10,50\")","svg绘图,基类bi.widget","text","type:","v","var","weight,","width:","y,","});","—","判断是否有上一页","名称","回调参数","对外方法","开始绘制","根据id返回元素","根据制定参数打印出路径","添加对象到json数组","结束绘制","绘制图片","绘制圆形","绘制形状的集合","绘制文本","绘制椭圆","绘制矩形","绘制路径","获根据给定的点坐标返回元素","设置总页数","设置画布可视区域","设置画布尺寸","说明","通过给定的参数在已注册的字体中找到字体对象"],"base/canvas.html":["\"#wrapper\",","\"bi.canvas\",","\"green\");","(x,","(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色","(x0,","20,","50,","500,","600","=","bi.canva","bi.createwidget({","callback","canva","canvas.circle(150,","canvas.stroke();","canvas绘图,基类bi.widget","circl","color)分别表示原点的横坐标,纵坐标,半径以及颜色","element:","end)","gradient","height:","hollow","line","radius,","rect","reset","solid","sourc","start,","stroke","type:","var","width:","x1,","y,","y0,","y1)","y1,","});","—","名称","回调参数","填充中空的路径","填充实心的路径","对外方法","绘制","绘制圆形","绘制渐变色","绘制矩形","绘制线段","说明","重置画布"],"case/button/multi_select_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.multi_select_item\",","\"复选item\"","\"复选项\"","'bi.vertical',","30","30,","[{","api","bi.createwidget({","bi.multi_select_item","doclick","doredmark","element:","height","height:","items:","logic","multi_select_item","number","object","setselect","sourc","text:","type:","unredmark","v","{","{dynamic:false}","});","},","}]","—","参数","取消标红","可选值","名称","回调参数","基础属性","复选框item,基类bi.basicbutton","对外方法","布局逻辑","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/button/single_select_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.single_select_item\",","\"left\"","\"复选item\"","\"复选项\"","'bi.vertical',","10","25","30,","[{","api","bi.createwidget({","bi.single_select_item","doclick","doredmark","element:","height","height:","hgap","items:","left,center,right","number","setselect","single_select_item","sourc","string","text:","textalign","type:","unredmark","v","{","});","},","}]","—","参数","取消标红","可以点击的label,基类bi.basicbutton","可选值","名称","回调参数","基础属性","对外方法","效果相当于文本框左右padding值","文本对齐方式","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/button/single_select_radio_item.html":["\"#wrapper\",","\"bi.label\",","\"bi.single_select_radio_item\",","\"left\"","\"单选item\"","\"单选项\"","'bi.vertical',","10","25","30,","[{","api","bi.createwidget({","bi.single_select_radio_item","doclick","doredmark","element:","height","height:","hgap","items:","left,center,right","number","setselect","single_select_radio_item","sourc","string","text:","textalign","type:","unredmark","v","{","});","},","}]","—","单选框item,基类bi.basicbutton","参数","取消标红","可选值","名称","回调参数","基础属性","对外方法","效果相当于文本框左右padding值","文本对齐方式","标红","点击事件","类型","设置选中值","说明","高度","默认值"],"case/editor/shelter_editor.html":["\"","\"#wrapper\",","\"bi","\"bi.shelter_editor\",","\"left\"","\"这个是带标记的\"","0","2","30","300,","4","allowblank","api","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.shelter_editor","blur","blur事件","boolean","border\",","cls:","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","key","keydown时触发","left,center,right","lgap","number","onkeydown","padding值","quitcheck","rgap","seterrortext","setstat","settextstyl","settitl","setvalu","setwarningtitl","shelter_editor","sourc","string","string/funct","style","text","textalign","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","vgap","watermark","watermark:","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","基类bi.widget","对外方法","对齐方式","带标记的文本框,需手动控制进入编辑状态","开始输入触发","按下backspace触发","按下空格触发","按键事件","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置文本框样式","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/sign_editor.html":["\"","\"#wrapper\",","\"123\",","\"456\",","\"bi.sign_editor\",","0","2","30","300","4","allowblank","api","bg5\",","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.sign_editor","blur","blur事件","boolean","cls:\"layout","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","settitl","setvalu","setwarningtitl","sign_editor","sourc","string","string/funct","text","text:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","value:","vgap","watermark","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","带标记的文本框,基类bi.widget","开始输入触发","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/sign_initial_editor.html":["\"","\"#wrapper\",","\"bi.sign_initial_editor\",","\"layout","\"原始值\",","0","2","30","300","4","allowblank","api","bg5\",","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.sign_initial_editor","blur","blur事件","boolean","cls:","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","settitl","setvalu","setwarningtitl","sign_initial_editor","sourc","string","string/funct","text","text:","tgap","titl","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","vgap","watermark","width:","});","—","之后初始值会一直显示的editor","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","基类bi.widget","对外方法","开始输入触发","指定初始值","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本value值","文本内容","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","设置titl","设置文本框值","设置错误titl","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/editor/state_editor.html":["\"","\"#wrapper\",","\"123\",","\"456\",","\"bi.state_editor\",","0","2","30","300","4","allowblank","api","bgap","bi.createwidget({","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.state_editor","blur","blur事件","boolean","dohighlight","doredmark","editor的value发生改变触发","element:","errortext","focu","focus事件","function","geterrortext","getlastvalidvalu","getstat","getvalu","height","hgap","isedit","isvalid","keydown时触发","lgap","number","padding值","quitcheck","rgap","seterrortext","setstat","setvalu","sourc","state_editor","string","string/funct","text","text:","tgap","true","true,fals","type:","unhighlight","unredmark","validationcheck","valu","value:","vgap","watermark","width:","});","—","事件","停止输入触发","参数","取消文本标红","取消文本高亮","可选值","名称","回调参数","回车事件","回车但是值不合法","基础属性","对外方法","开始输入触发","按下backspace触发","按下空格触发","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本标红","文本框placehold","文本框值是否有效","文本框失焦","文本框是否处于编辑状态","文本框获取焦点","文本高亮","是否允许空值","是否允许退出编辑函数","暂停输入触发(输入空白字符)","点击编辑框触发(不在编辑状态时)","确定输入触发(blur时且输入值有效)","类型","获取文本框值","获取文本框最后一次输入的有效值","获取错误文本","记录状态的输入框,基类bi.widget","设置文本框值","设置错误文本","说明","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入较验函数","错误提示","高度","默认值"],"case/layer/multi_popup_layer.html":["\"#wrapper\",","\"bi.multi_popup_view\",","300","api","array","basic_sure\")","bi.createwidget({","bi.i18ntext(\"bi","bi.multi_popup_view","button","element:","multi_popup_lay","sourc","type:","width:","zindex在1000w,基类bi.multipopupview","});","—","下拉框弹出层的多选版本,toolbar带有若干按钮,","参数","可选值","基础属性","按钮组","类型","说明","默认值"],"case/layer/layer_panel.html":["\"","\"#wrapper\",","\"bi.popup_panel\",","\"测试\",","300","additem","api","bi.createwidget({","bi.popup_panel","bi.popuppanel.event_chang","bi.popuppanel.event_click_toolbar_button","bi.popuppanel.event_clos","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasprev","id","index","item","layer_panel","panel的value发生改变触发","panel的关闭事件","popul","prependitem","removeitemat","setnotselectedvalu","setvalu","sourc","string","titl","title:","type:","valu","value,可以是单个值也可以是个数组","width:","});","—","事件","内部前插入","内部后插入","刷新列表","参数","可以理解为multipopupview和panel两个面板的结合体,基类bi.multipopupview","可选值","名称","回调参数","基础属性","对外方法","是否有上一页","是否有下一页","标题","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","清空组件","点击工具栏事件","移除指定索引处的item","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","默认值"],"case/layer/pane_list.html":["\"#wrapper\",","\"bi","\"bi.button_group\"","'bi.list_pane',","0","[","[]","]","additem","api","array","bgap","bi.createwidget({","bi.list_pan","border\",","cls:","dynamic:true}","el","element:","empti","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvalu","hasnext","hasprev","hgap","id","index","item","items:","itemscr","lgap","list面板,基类bi.widget","logic","number","object","onload","padding值","pane_list","popul","prependitem","removeitemat","rgap","setnotselectedvalu","setvalu","sourc","tgap","type:","valu","value,可以是单个值也可以是个数组","vgap","{","{type:","}","});","—","内部前插入","内部后插入","列表","列表创建器","刷新列表","参数","可选值","名称","回调参数","基础属性","对外方法","布局逻辑","开启panel的元素","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","是否有上一页","是否有下一页","根据id获取节点","根据value值获取value在数组中的索引","根据value值获取节点","正在加载","清空组件","移除指定索引处的item","类型","获取所有button","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取没有被选中的值","获取被选中的值","设置value值","设置未被选中的值","说明","默认值"],"case/layer/panel.html":["\"","\"#wrapper\",","\"+\"","\"bi.button\",","\"bi.panel\",","\"标题\",","[","[{","]","api","array","bi.createwidget({","bi.panel","dynamic:","dynamic:false}","el","el:","element:","logic","logic:","object","panel","settitl","sourc","string","text:","this.button_group,","titl","title:","titlebutton","titlebuttons:","true","type:","{","}","});","}],","—","参数","可选值","名称","回调参数","基础属性","对外方法","布局逻辑","带有标题栏的panel,基类bi.widget","开启panel的元素","标题","标题后的按钮组","类型","设置标题","说明","默认值"],"case/list/list.select.html":["\"bi.select_list\",","'1',","'2',","[]","[{","additem","array","b:","bi.createwidget({","bi.direction.top","bi.emptyfn","bi.select_list","boolean","data","direct","empti","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","hasprev","id","isallselect","item","items:","itemscr","onload","popul","prependitem","resetheight","select_list","setallselect","setnotselectedvalu","settoolbarvis","setvalu","sourc","string","text:","toolbar位置","type:","v:","valu","{","});","},","}]","—","元素创造器","列表最前添加元素","列表最后添加元素","加载完成的回调(测试了无效果)","参数","子项","方法","方法名","是否全选中","是否有上一页","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置toolbar是否可见","设置值","设置全选","设置未选中值","说明","选择列表","重新设置高度","默认值"],"case/loader/lazy_loader.html":["\"bi.lazy_loader\",","'body',","100,","additem","bi.createwidget({","bi.lazy_load","data","element:","empti","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","id","item","items,","items:","lazy_load","popul","setnotselectedvalu","setvalu","sourc","type:","valu","width:","});","—","列表最后添加元素","参数","懒加载loader","方法","方法名","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明"],"case/loader/list_loader.html":["\"bi.list_loader\",","'body',","100,","[]","additem","array","bi.createwidget({","bi.emptyfn","bi.list_load","count","data","element:","empti","fals","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","id","item","items,","items:","itemscr","list_load","next","number","object","onload","popul","resetheight","setnotselectedvalu","setvalu","sourc","type:","valu","width:","{}","});","—","为解决排序问题引入的控件","元素创造器","分页计数","列表最后添加元素","加载完成回调","参数","子项","方法","方法名","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明","重新设置高度","默认值"],"case/loader/sort_list.html":["\"bi.sort_list\",","'body',","100,","[]","additem","array","bi.createwidget({","bi.emptyfn","bi.sort_list","count","data","element:","empti","fals","function","getallbutton","getallleav","getindexbyvalu","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getselectedbutton","getvlau","h","hasnext","id","item","items,","items:","itemscr","next","number","object","onload","popul","resetheight","setnotselectedvalu","setvalu","sort_list","sourc","type:","valu","width:","{}","});","—","元素创造器","分页计数","列表最后添加元素","加载完成回调","参数","子项","排序列表","方法","方法名","是否有下一页","替换内容","根据id获取nod","根据值获取node","根据值获取索引","清空","类型","获取未选中植","获取未选中的根节点","获取选中的根节点","获得值","获得所以根节点","获得所有叶节点","设置值","设置未选中值","说明","重新设置高度","默认值"],"case/trigger/editor_trigger.html":["\"\"","\"bi.editor_trigger\",","\"body\",","30","allowblank","bi.createwidget({","bi.editor_trigg","bi.emptyfn","boolean","editor_trigg","element:","errortext","fals","function","getvlau","number","quitcheck","settext","setvalu","sourc","string","text","triggerwidth","type:","validationcheck","valu","watermark","});","—","参数","文本输入框trigger","方法","方法名","是否允许为空","水印","类型","获得值","触发器宽度","设置值","说明","退出时验证函数","错误信息","验证函数","默认值"],"case/trigger/icon_trigger.html":["\"bi.icon_trigger\",","\"body\",","bi.createwidget({","bi.icon_trigg","element:","icon_trigg","sourc","type:","});","图标按钮trigger"],"case/trigger/text_trigger.html":["\"bi.editor_trigger\",","\"body\",","bi.createwidget({","bi.text_trigg","element:","getvlau","setvalu","sourc","text_trigg","type:","valu","});","—","参数","文本输入框trigger","方法","方法名","获得值","设置值","说明"],"case/combo/bubble_combo.html":["\"\"","\"bi.bubble_combo\",","\"bi.button\",","\"bi.button_group\",","\"bi.text_item\",","\"bi.vertical\"","\"item\"","\"测试\",","200","25","25,","[{","api","b","beforeclick","bi.bubble_combo","bi.createwidget({","bi.emptyfn","bi.makearray(100,","bindev","boolean","bubble_combo","button的选中状态","click,","dblclick,","destroy","disableselect","dishov","doclick","el:","element:\"#wrapper\",","empti","fals","forcenotselect","forceselect","function","gettext","handl","handler","height:","hover","hover事件","isdisableselect","isforcenotselect","isforceselect","isonc","isselect","isshadowshowingonselect","items:","layouts:","lclick","maxheight:","mousedown,","mouseup,","null","onc","popup:","select","setselect","settext","shadow","sourc","stopev","stoppropag","string","text","text:","trigger","true,fals","type:","valu","{","}","})","}),","},","}]","—","不仅有选中状态而且有展开状态,","使能选中","判断是否怎么点击都不会被选中","判断是否点击即选中","判断是否让选中","参数","取消hover事件","可选值","名称","回调参数","基础属性","基类bi.widget","对外方法","无论怎么点击都不会被选中","是否只允许点击一次","是否显示阴影","是否被选中","清空组件","点击一次选中有效,再点无效","点击事件","点击事件之前","点击事件回调","点击即选中,","类型","组件text值","组件value值","绑定事件","获取文本值","表示一个可以展开的节点,","被选元素要触发的事件","设置文本值","设置选中的文本","说明","返回该对象","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中状态下是否显示阴影","销毁组件","阻止事件","阻止冒泡","默认值"],"case/combo/icon_combo.html":["\"","\"#wrapper\",","\"auto\"","\"bi.icon_combo\",","\"delet","\"left,right,center\"","\"move","\"renam","\"第一项\",","\"第三项\",","\"第二项\",","0","100","24","300","[{","adjustlength","adjustxoffset","adjustyoffset","api","bi.buttongroup.choose_type_singl","bi.createwidget({","bi.icon_combo","choosetyp","const","el","element:","font\"","font\",","getvalu","height","hideview","icon_combo","iconclass","iconclass:","icon的类名","item","items:","left,right,cent","maxheight","maxwidth","minwidth","number","object","offsetstyl","popul","popup","setvalu","showview","sourc","string","string/numb","type:","value:","width","{","}","});","},","}]","—","切换trigger图标的combo","刷新列表","参数","参考button_group","可选值","名称","回调参数","基础属性","基类bi.widget","宽度","对外方法","弹出列表和trigger的距离","弹出层","弹出层显示位置","显示弹出层","最大宽度","最大高度","最小宽度","类型","自定义下拉框trigger","获取value值","设置value值","说明","调整横向偏移","调整纵向偏移","选择类型","隐藏弹出层","高度","默认值"],"case/combo/static_combo.html":["\"","\"#wrapper\",","\"1\",","\"2\",","\"3\",","\"bi.static_combo\",","\"valu","1","2","24","3","[","[{","]","api","array","bi.buttongroup.choose_type_singl","bi.createwidget({","bi.static_combo","choosetyp","const","el","element:","getvalu","height","item","items:","number","object","popul","setvalu","sourc","static_combo","string","text","text:","type:","value:","{","}","});","},","}]","—","不变\",","刷新列表","单选combo,trigger显示项不会改变","参数","参考button_group","可选值","名称","回调参数","基础属性","基类bi.widget","子组件","对外方法","文本内容","类型","自定义下拉框trigger","获取value值","设置value值","说明","选择类型","高度","默认值"],"case/combo/text_value_combo.html":["\"","\"#wrapper\",","\"1\",","\"2\",","\"3\",","\"bi.text_value_combo\",","\"value_combo\",","1","2","3","30","300,","[{","api","bi.buttongroup.choose_type_singl","bi.createwidget({","bi.text_value_combo","choosetyp","const","el","element:","getvalu","height","item","items:","number","object","popul","setvalu","sourc","string","text","text:","text_value_combo","type:","value:","width:","{","}","});","},","}]","—","刷新列表","参数","参考button_group","可选值","名称","回调参数","基础属性","基类bi.widget","对外方法","文本内容","类型","自定义下拉框trigger","获取value值","设置value值","说明","选择类型","高度","默认值"],"case/combo/text_value_downlist_combo.html":["\"","\"#wrapper\",","\"1\",","\"11\",","\"2\",","\"3\",","\"bi.text_value_down_list_combo\",","\"text\",","1","11","2","3","30","[","[{","]","api","bi.createwidget({","bi.text_value_down_list_combo","children:","el:","element:","getvalu","height","item","items:","number","popul","setvalu","sourc","string","text","text:","text_value_downlist_combo","type:","value:","{","});","},","}]","}],","—","刷新列表","参数","可选值","名称","回调参数","基础属性","基类bi.widget","对外方法","文本内容","有二级下拉菜单的combo","类型","获取value值","设置value值","说明","高度","默认值"],"case/tree/branch_tree.html":["\"bi.branch_tree\",","'body',","...","//","[]","[{","array","bi.branch_tre","bi.createwidget({","branch_expander组件配置项","branch_tre","children:","el","el:","element:","expand","getvalu","item","items:","object","popul","sourc","type:","{}","{},","});","}]","—","去掉所有内容","参数","参数设置","基础元素","子项","方法","方法名","横向分支的树","类型","获取所选项值","说明","默认值"],"case/tree/handstand_branch_tree.html":["\"bi.handstand_branch_tree\",","'body',","...","//","[]","[{","array","bi.createwidget({","bi.handstand_branch_tre","branch_expander组件配置项","children:","el","el:","element:","expand","getvalu","handstand_branch_tre","item","items:","object","popul","sourc","type:","{}","{},","});","}]","—","去掉所有内容","参数","参数设置","基础元素","子项","方法","方法名","类型","纵向分支的树","获取所选项值","说明","默认值"],"case/tree/display_tree.html":["\"bi.display_tree\",","'',","'body',","1,","=","bi.createwidget({","bi.display_tre","destroy","display_tre","element:","id:","inittre","node:","open:","settings:","sourc","text:","tree","tree.inittree({","true,","type:","var","});","—","加载tree结构","参数","摧毁元素","方法","方法名","树展示控件","节点数组","说明","配置项"],"case/tree/simple_tree.html":["\"bi.simple_tree\",","'body',","=","array","bi.createwidget({","bi.emptyfn","bi.simple_tre","element:","empti","function","getvalu","item","items:","itemscr","items构造器","keywords:","null","popul","setvalu","simple_tre","sourc","tree","tree.populate(items);","type:","v","var","});","—","元素","关键字标红字符串","去掉所有内容","参数","参数设置","子项数组","方法","方法名","清空树","简单的多选树","类型","获得值","设置值","说明","默认值"],"case/tree/level_tree.html":["\"bi.level_tree\",","'body',","=","[]","[],","array","bi.createwidget({","bi.level_tre","branch_expander配置","element:","expand","getallleav","getnodebyid","getnodebyvalu","getvalu","id","inittre","item","items:","level_tre","node","object","popul","setvalu","sourc","stroke","tree","type:","v","var","{}","});","—","二级树","元素","去掉所有内容","参数","参数设置","子项数组","方法","方法名","构造树结构","根据id获取节点","根据值获取节点","生成树方法","类型","获取所有叶节点","获得值","设置值","说明","默认值"],"case/tree/branch_relation.html":["\"bi.branch_relation\",","'body',","0","50","=","[],","align","align:","array","bi.branch_rel","bi.createwidget({","bi.direction.bottom","bi.direction.right,","bi.horizontalalign.right,","bi.verticalalign.top","branch_rel","centeroffset","centeroffset:","direct","direction:","element:","item","items:","null","number","popul","sourc","string","tree","type:","var","});","元素","去掉所有内容","参数","参数设置","子项数组","对齐方向","方法","方法名","根节点所在方向","类型","表关联树","说明","重心偏移量","默认值"],"case/table/adaptive_table.html":["\"bi.adaptive_table\",","'body',","1],","25","500,","600,","=","[0,","[50,50,200,250,400],","[]","[],","adaptive_t","array","attr","bi.adaptive_t","bi.createwidget({","boolean","columns","columnsize:","crosshead","crossitem","destroy","element:","fals","freezecol","freezecols:","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header:","headerrows","height:","isneedfreez","isneedfreeze:","isneedmerg","isneedres","isneedresize:","isresizeadapt:","item","items:","key:","maxcolumns","mergecol","mergerul","mincolumns","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","true","true,","type:","value:","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","得到列宽","摧毁表","方法","方法名","时合并","是否可改变列大小","是否需要冻结表头","是否需要合并单元格","普通单元格高度","最大列宽","最小列宽","横向滚动距离","类型","纵向滚动距离","自适应宽度的表格","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/table/tree_table.html":["\"bi.tree_table\",","'body',","100,","100],","25","400,","600,","=","[100,","[]","array","attr","bi.createwidget({","bi.emptyfn","bi.tree_t","boolean","columns","columnsize:","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","destroy","element:","fals","freezecol","function","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header,","header:","headercellstylegett","headerrows","height:","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items,","items:","key:","maxcolumns","mergecol","mergerul","mincolumns","mincolumnsize:","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","summarycellstylegett","tabl","tree_tabl","true","type:","value:","var","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","得到列宽","摧毁表","方法","方法名","时合并","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要调整列宽","普通单元格高度","最大列宽","最小列宽","树状结构的表格","横向滚动距离","类型","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/table/layer_tree_table.html":["\"bi.layer_tree_table\",","'body',","100,","100],","25","400,","600,","=","[100,","[]","array","attr","bi.createwidget({","bi.emptyfn","bi.layer_tree_t","boolean","columns","columnsize:","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","destroy","element:","fals","freezecol","function","function(row1,","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","header","header,","header:","headercellstylegett","headerrows","height:","isneedfreez","isneedmerg","isneedres","isresizeadapt","item","items,","items:","key:","layer_tree_t","maxcolumns","mergecol","mergerul","mincolumns","mincolumnsize:","number","popul","regioncolumns","restor","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setwidth","sourc","summarycellstylegett","tabl","true","type:","value:","var","width:","});","—","交叉表头","交叉项","值","冻结的列","列宽数组","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加项","子组件","存储","宽度","层级树状结构的表格","得到列宽","摧毁表","方法","方法名","时合并","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要调整列宽","普通单元格高度","最大列宽","最小列宽","横向滚动距离","类型","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置高度","说明","键","高度","默认row1","默认值","默认相等时合并"],"case/pager/all_count_pager.html":["'bi.all_count_pager',","//必选项","1","1,","10,","30","30,","all_count_pag","bi.all_count_pag","bi.createwidget({","count","count:","curr","curr:","getcurrentpag","hasnext","hasprev","height","height:","number","page","pages:","popul","setallpag","setcount","setpagervis","setvalu","setvpag","sourc","true/fals","type:","v","});","—","参数","当前页","总行数","总页数","控件高度","方法","方法名","是否有前一页","是否有后一页","有总页数和总行数的分页控件","清空内容","类型","获取当前页码","设置当前页码","设置总页数","设置计数","设置页码是否可见","说明","默认值"],"case/pager/direction_pager.html":["'bi.direction_pager',","'body',","//初始化当前页,","//必选项","1","1,","10,","30","30,","=","bi.createwidget({","bi.direction_pag","bi.emptyfn","curr","curr:","direction_pag","element:","fals","firstpag","firstpage:","function","gethpag","getvpag","hashnext","hashprev","hasnext","hasprev","hasvnext","hasvprev","height","height:","horizont","horizontal:","lastpag","lastpage:","number","number/boolean","number/funct","object","page","pager","pages:","pages为数字时可用","pages为数字时可用,","popul","sethpag","sethpagervis","setvpag","setvpagervis","sourc","type:","v","var","vertic","vertical:","{","});","},","—","二级参数","判断是否有前一页的方法","判断是否有后一页的方法","参数","当前页,","总页数","控件高度","方法","方法名","显示页码的分页控件","最后一页","横向坐标是否有上一页","横向坐标是否有下一页","横向翻页设置","清空内容","第一页","类型","纵向坐标是否有上一页","纵向坐标是否有下一页","纵向翻页设置,参数与horizontal相同","获取水平向页码","获取纵向页码","设置横向分页键可见","设置纵向分页键可见","说明","默认值"],"case/calendar.html":["'1900","'2099","'bi.calendar',","//7表示八月","//最大日期","//最小日期","01","01'","01',","12","2015","2015,","25","25,","31'","31',","7","7,","bi.calendar","bi.createwidget({","calendar","day","day:","day}","getvlau","isfinald","isfrontd","max","max:","min","min:","month","month,","month:","number","object:","setvalu","sourc","string","type:","year","year:","{year,","});","—","参数","方法","方法名","日历控件","是否为最大日期","是否为最小日期","最大日期","最小日期","类型","获得日期","设定的年份","设定的日期","设定的月份","设置日期","说明","默认值"],"case/clipboard.html":["'bi.clipboard',","()","100,","aftercopi","aftercopy:","bi.clipboard","bi.createwidget({","bi.emptyfn","clipboard","copi","copy:","function","height:","sourc","type:","width:","{}","{},","});","剪切板","参数","完成拷贝后执行的方法","类型","获取需要拷贝的值","说明","默认值"],"case/complex_canvas.html":["\"bi.complex_canvas\",","\"red\",","(x0,","10,","100,","2","20,","200,","500,","600","=","bi.createwidget({","branch","canva","canvas.branch(55,","canvas.stroke();","complex_canva","height:","linewidth:","offset:","sourc","stroke","strokestyle:","type:","var","width:","x1,","x2,","x2,y2...)","y0,","y0为根节点,分支到x1,y1,","y1,","y2)","{","});","名称","回调参数","复杂的canvas绘图","对外方法","绘制","绘制树枝节点","说明","(以x0,"],"case/color_chooser.html":["\"#wrapper\",","\"bi.color_chooser\",","30","30,","bi.color_choos","bi.createwidget({","color","color_choos","element:","getvalu","height:","isviewvis","setvalu","sourc","type:","width:","});","—","判断是否显示","参数","方法","方法名","获取颜色值","设置颜色值","说明","选色控件"],"case/color_chooser_popup.html":["\"bi.color_chooser_popup\",","145","bi.color_chooser_popup","bi.createwidget({","color","color_chooser_popup","event_value_chang","getvalu","height","number","setstorecolor","setvalu","sourc","type:","});","—","事件","参数","方法","方法名","类型","获取颜色值","设置储存的颜色值","设置颜色值","说明","选色控件弹窗","颜色值改变时触发","高度","默认值"],"case/segment.html":["\"#wrapper\",","\"bi.label\",","\"bi.segment\",","\"bi.vertical\",","\"tab1\",","\"tab2\",","\"tab3","\"默认风格\"","0","1,","10","2","20","3","30,","50,","[","[{","]","api","array","bgap","bi.createwidget({","bi.sgement","disabled\",","disabled:","element:","height","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","segment","selected:","sourc","text:","tgap","true","true,","type:","value:","vgap","vgap:","width","{","});","},","}]","}],","—","参数","可选值","各种segment","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/bi.button/general.html":["bi.button","通用按钮","通用按钮,详情见bi.button"],"detailed/bi.button/tooltip.html":["\"#wrapper\",","\"bi.vertical\",","'bi.button',","'简单toast测试',","()","0","10","20","30,","=","[","[{","]","api","array","bgap","bi.createwidget({","bi.msg.toast(\"这是一条简单的数据\");","el:","element:","function","handler:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","toast","type:","var","vgap","vgap:","width","{","}","});","}],","—","参数","可选值","基础属性","子控件数组","宽度","提示性信息","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/bi.button/items.html":["\"#wrapper\",","\"bi.label\",","\"bi.multi_select_item\",","\"bi.single_select_item\",","\"单选item\"","\"单选项\"","\"复选item\"","\"复选项\"","'bi.vertical',","0","10","30,","[","[{","]","api","array","bgap","bi.createwidget({","element:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","width","{","});","},","}]","—","参数","可选值","各种item","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","类型","说明","高度","默认值"],"detailed/bi.button/node.html":["\"#wrapper\",","\"bi.arrow_group_node\",","\"bi.label\",","\"bi.plus_group_node\",","\"bi.triangle_group_node\",","\"三角形的节点\"","\"十字形的节点\"","\"箭头节点\"","'bi.vertical',","0","10","30,","[","[{","]","api","array","bgap","bi.createwidget({","element:","height","height:","hgap","item","items:","lgap","number","padding值","rgap","sourc","text:","tgap","type:","vgap","width","{","});","},","}]","—","参数","可选值","各种节点node","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","类型","说明","高度","默认值"],"detailed/bi.button/segment.html":["\"#wrapper\",","\"bi.label\",","\"bi.segment\",","\"bi.vertical\",","\"tab1\",","\"tab2\",","\"tab3","\"默认风格\"","0","1,","10","2","20","3","30,","50,","[","[{","]","api","array","bgap","bi.createwidget({","bi.sgement","disabled\",","disabled:","element:","height","height:","hgap","hgap:","item","items:","lgap","number","padding值","rgap","selected:","sourc","text:","tgap","true","true,","type:","value:","vgap","vgap:","width","{","});","},","}]","}],","—","参数","可选值","各种segment","基础属性","子控件数组","宽度","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","类型","说明","高度","默认值"],"detailed/tree/bi.multi_tree_combo.html":["\"bi.multi_tree_combo\",","\"根目录\"","\"根目录\",","\"第一级目录1\"","\"第一级目录1\",","\"第二级文件1\"","\"第二级文件1\",","(options,","1,","11,","2,","200","30","300","=","[{","array","bi.createwidget({","bi.multi_tree_combo","bi.multitreecombo.event_confirm","callback({","callback)","function","function()","getvalu","height","id:","item","items:","itemscr","itemscreator:","multi_tree_combo","null","number","pid:","popul","setvalu","sourc","text:","type:","v","value:","var","width","width:","{","{}","})","});","},","}];","—","事件","参数","参数设置","子项创建函数","子项,pid代表父节点id","宽度","方法","方法名","更改树结构内容","树下拉框,继承bi.widget","点击一级节点触发","类型","获取文本框值","设置文本框值","说明","高度","默认值"],"detailed/tree/bi.switch_tree.html":["\"bi.switch_tree\",","\"根目录\"","\"根目录\",","\"第一级目录1\"","\"第一级目录1\",","\"第二级文件1\"","\"第二级文件1\",","1,","11,","2,","=","[]","[{","array","bi.createwidget({","bi.switch_tre","getselect","getvalu","id:","item","items,","items:","pid:","popul","setselect","setvalu","sourc","switch_tre","switchselect","text:","tree","type:","v","value:","var","{","});","},","}];","—","切换树结构","参数","参数设置","可以单选多选切换的树,继承bi.widget","子项,pid代表父节点id","方法","方法名","更改树结构内容","类型","获取当前选中项内容","获取选中项","设置当前选中项内容","设置选中项","说明","默认值"],"detailed/table/bi.preview_table.html":["\"\",","\"bi.preview_table\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"表头1\"","\"表头2\"","\"表头3\"","'body',","30","50],","[100,","[[{","[]","array","array/numb","attr","bi.createwidget({","bi.preview_t","boolean","columns","columnsize:","destroy","element:","fals","freezecol","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreez","item","items:","key:键,value:值","null","number","popul","preview_t","resiz","resizehead","row","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","type:","{","});","},","}]]","}]],","—","冻结的列","列宽","参数","子组件","得到列宽","摧毁表","方法","方法名","是否冻结","是否含有数值滚动条","替换为新的内容","用于表格预览,继承bi.widget","类型","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","行高","表头内容","表头行高","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认值"],"detailed/table/bi.responsive_table.html":["\"\",","\"\"],","\"bi.responsive_table\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"表头1\"","\"表头2\"","\"表头3\"","'body'","(row1,","1],","25","[\"\",","[0,","[[{","[]","array","attr","bi.createwidget({","bi.responsive_t","boolean","columns","columnsize:","crosshead","crossitem","destroy","element:","fals","footer","footerrows","freezecol","function","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","header","header:","headerrows","isneedfreez","isneedfreeze:","isneedmerg","isneedmerge:","item","items:","key:键,value:值","mergecols:","mergerul","number","popul","regioncolumns","resiz","resizehead","responsive_t","row","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","true,","type:","{","});","},","}]],","—","交叉表内容二维数组","交叉表头","冻结的列号,从0开始,isneedfreeze为true时生效","列宽","参数","合并规则,","子组件二维数组","得到列宽","摧毁表","方法","方法名","是否含有数值滚动条","是否需要冻结单元格","是否需要合并单元格","是否需要表尾","替换为新内容","类型","自适应宽度的表格,继承bi.widget","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","行高","表头内容","表头行高","表尾行高","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认值","默认相等时合并"],"detailed/table/bi.excel_table.html":["\"\"]","\"bi.excel_table\",","\"bi.label\",","\"body\",","\"layout","\"第一行第一列\"","\"第一行第二列\"","\"第二行第一列\"","\"第二行第二列\"","37","=","[","[200,200],","[82,","[]","[{","]","array","attr","bg1\",","bg2\",","bg3\",","bg4\",","bi.createwidget({","bi.excel_t","boolean","cls:","columns","columnsize:","destroy","element:","excel_t","fals","footerrows","function(row1,","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getclientregioncolumns","getcolumn","getcolumns","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getscrollregioncolumns","getscrollregionrows","getverticalscrol","hasverticalscrol","headerrows","isneedmerg","isneedres","isresizeadapt","item","items:","key:键,value:值","mergecol","mergerul","number","popul","regioncolumns","resiz","resizehead","row","row2","row2)","rowsiz","scrollleft","scrolltop","setcolumns","setheadercolumns","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","sourc","text:","true","type:","{","});","},","}]","}],","—","列项间的","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加行","子组件","得到列宽","摧毁表","方法","方法名","时合并","是否含有数值滚动条","是否调整时自适应","是否需要合并单元格","是否需要调整大小","普通单元格高度","类似excel式的表格,继承bi.widget","类型","获取列项","获取右往左横向滚动距离","获取左到右横向滚动距离","获取横向滚动条宽度","获取浏览器中显示的列项之间的间隙","获取纵向滚动条宽度","获取纵向滚动距离","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获得列项之间的间隙","获得计算后的列宽","表头高度","表尾高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置属性","设置左到右横向滚动距离","设置纵向滚动距离","设置表头的列宽","说明","调整表头","调整表格","默认row1","默认值","默认相等时合并"],"detailed/table/bi.page_table.html":["\"bi.page_table\",","\"body\",","1","25",":","=","[200,200],","[]","[],","array","attr","bi.createwidget({","bi.emptyfn","bi.page_t","boolean","columns","columnsize:","crosshead","crossitem","curr","destroy","element:","fals","firstpag","freezecol","function","function(row1,","getcolumns","gethpag","getlefthorizontalscrol","getregioncolumns","getrighthorizontalscrol","getverticalscrol","getvpag","hasnext","hasprev","header","headercellstylegett","headerrows","height:","horizont","isneedfreez","isneedmerg","item","items:","itemscr","key:","lastpag","maxcolumns","mergecol","mergerul","mincolumns","number","number/funct","object","page","page_t","pager","pager:","popul","regioncolumns","row2","row2)","rowsiz","scrollleft:","scrolltop:","sequencecellstylegett","setcolumns","setheight","sethpag","setlefthorizontalscrol","setregioncolumns","setrighthorizontalscrol","setverticalscrol","setvpag","setwidth","sourc","summarycellstylegett","type:","v:","value:","vertic","vertical:","width:","{","{}","{},","}","});","—","三级参数","二级参数","交叉表头","交叉项","值","元素创造器","冻结的列","分页表格","分页选项","列宽数组","列项间的","判断是否有前一页的函数","单元格宽度集合","参数","参数设置","合并的单元格列号","合并规则,","增加","子组件","宽度","当前页","得到列宽","摧毁表","方法","方法名","时合并","是否有下一页","是否需要冻结表头","是否需要合并单元格","显示总页数","普通单元格高度","最后一页","最大列宽","最小列宽","横向滚动距离","水平分页选项","第一页","类型","纵向分页,参数与horizont","纵向滚动距离","获取右往左横向滚动距离","获取左到右横向滚动距离","获取纵向滚动距离","获得列项之间的间隙","获得垂直页数","获得水平页数","表头","表头高度","设置列宽","设置列项之间的间隙","设置右往左横向滚动距离","设置宽度","设置属性","设置左到右横向滚动距离","设置水平页数","设置纵向滚动距离","设置纵向页数","设置高度","说明","键","页码","高度","默认row1","默认值","默认相等时合并"],"detailed/text_input/bi.text_editor.html":["\"","\"#wrapper\",","\"bi.text_editor\",","0","2","200,","30","30,","4","allowblank","api","bgap","bi.createwidget({","bi.text_editor","boolean","element:","errortext","fals","function","height","height:","hgap","lgap","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"请输入内容\"","width","width:","});","—","事件详见editor","参数","可选值","基础用法","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","类型","说明","输入较验函数","通过鼠标或键盘输入字符","错误提示","默认值"],"detailed/text_input/bi.search_editor.html":["\"","'#wrapper',","'bi.search_editor',","0","2","30","300,","4","allowblank","api","bgap","bi.createwidget({","bi.search_editor","bi.searcheditor.event_clear","boolean","element:","errortext","fals","function","height","hgap","lgap","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"搜索\",","width","width:","});","—","事件","其他事件详见editor","参数","可选值","搜索框","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","点击清空按钮触发","类型","说明","输入较验函数","错误提示","默认值"],"detailed/text_input/bi.clear_editor.html":["\"","\"bi","'#wrapper',","'bi.clear_editor',","0","2","30","300,","4","allowblank","api","bgap","bi.clear_editor","bi.cleareditor.event_clear","bi.createwidget({","boolean","border\",","cls:","element:","errortext","fals","function","height","hgap","lgap","null","number","padding值","quitcheck","rgap","sourc","string","tgap","true,fals","type:","validationcheck","valu","vgap","watermark","watermark:\"带清除按钮的输入框\",","width","width:","});","—","事件","其他事件详见input","参数","可选值","带清除按钮的输入框","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","文本框placehold","文本框宽度","文本框高度","文本框默认值","是否允许空值","是否允许退出编辑函数","点击清空按钮触发","类型","说明","输入较验函数","错误提示","默认值"],"detailed/text_input/finetuning_number_editor.html":["'#wrapper',","'bi.fine_tuning_number_editor',","1","1表示自动","300","bi.createwidget({","bi.finetuningnumbereditor.event_confirm","element:","finetuning_number_editor","number","sourc","type:","valu","width:","});","事件","参数","可选值","数值微调器","点击增加/减少按钮或者编辑框确定时触发","类型","编辑框中的值,","说明","默认值"],"detailed/year_combo.html":["'#wrapper',","'1900","'2099","'bi.year_combo',","01","01'","12","300","31'","behavior","bi.createwidget({","bi.yearcombo.event_before_popupview","bi.yearcombo.event_confirm","element:","max","min","object","sourc","string","type:","width:","year_combo","{}","});","事件","参数","可选值","年份选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","限定可选日期的上限","限定可选日期的下限","默认值"],"detailed/month_combo.html":["'#wrapper',","'bi.month_combo',","300","behavior","bi.createwidget({","bi.monthcombo.event_before_popupview","bi.monthcombo.event_confirm","element:","month_combo","object","sourc","type:","width:","{}","});","事件","参数","可选值","月份选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","默认值"],"detailed/quarter_combo.html":["'#wrapper',","'bi.quarter_combo',","300","behavior","bi.createwidget({","bi.quartercombo.event_before_popupview","bi.quartercombo.event_confirm","element:","object","quarter_combo","sourc","type:","width:","{}","});","事件","参数","可选值","季度选择下拉框","类型","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","说明","选中日期或者退出编辑状态触发","默认值"],"detailed/down_list_combo.html":["\"bi.icon_text_icon_item\",","\"bi.icon_text_item\",","\"chart","\"check","\"column","\"dot","'#wrapper',","'bi.down_list_combo',","0","1.1\",","1.222222222222222222222222222222222222\",","11","1111\",","12","12,","2\",","2.1\",","2.2\",","21,","22,","25,","300,","[","[{","]","adjustlength","bi.createwidget({","bi.downlistcombo.event_before_popupview","bi.downlistcombo.event_chang","bi.downlistcombo.event_son_value_chang","bottom","bottom,left","bottom,right","children:","click","click,","cls:","direct","disabled:","down_list_combo","e","el","el:","element:","font\"","font\",","height:","hover","iconcls1:","items:","left","mark","number","object","right","selected:","sourc","string","text:","top","top,left","top,right","trigger","true","true,","type","type:","value:","width:","{","|","});","},","}]","}],","下拉列表弹出前触发","下拉列表的弹出方式","事件","具体配置方法见combo","参数","可选值","多层下拉列表的下拉框","弹出列表和trigger的位置关系","弹出列表和trigger的距离","点击一级节点触发","点击二级节点触发","类型","自定义下拉框trigger","说明","默认值"],"detailed/numeric_interval.html":["\"bi.numerical_interval\",","'#wrapper',","500","bi.createwidget({","bi.numericalinterval.event_error","bi.numericalinterval.event_valid","boolean","closemax","closemin","element:","isstatevalid()","max","min","number","numeric_interv","setclosemaxenable(boolean)","setcloseminenable(boolean)","setmaxenable(boolean)","setminenable(boolean)","setnumtip(string)","sourc","true","type:","width:","});","—","事件","区间不合法的状态事件","区间合法的状态事件","区间是否成立)","参数","可选值","右区间初始状态","左区间初始状态","当前状态是否有效(输入是否合法,","数值区间控件","方法","无","最大值初始值","最小值初始值","用法","类型","设置右区间开闭combo的disable状态","设置右区间输入框disable状态","设置左区间开闭combo的disable状态","设置左区间输入框disable状态","设置数值区间的tip提示","说明","默认值"],"detailed/multi_select_combo.html":["\"bi.multi_select_combo\",","'#wrapper',","500,","[],","bi.createwidget({","bi.multiselectcombo.event_confirm","element:","fals","function(){","hasnext:","items:","itemscreator:","multi_select_combo","return","sourc","type:","width:","{","}","});","事件","带确定的复选下拉框","点击确定触发","说明"],"detailed/date/date_combo.html":["\"#wrapper\",","\"bi.date_combo\",","300","bi.createwidget({","date_combo","element:","sourc","type:","width:","});","参数","可选值","日期选择下拉框(弹出的年月选择可以进一步选择日期)","类型","说明","默认值"],"detailed/date/date_pane_widget.html":["\"#wrapper\",","\"bi.date_pane_widget\",","'1900","'2099","01","01'","12","300","31'","bi.createwidget({","date_pane_widget","element:","max","min","month:","m})","obj({year:","selectedtim","sourc","string","type:","width:","y,","});","—","参数","可选值","日期选择下拉框的弹出面板","类型","说明","选中的初始年月","限定可选日期的上限","限定可选日期的下限","默认值"],"detailed/date/year_month_combo.html":["\"bi.year_month_combo\",","300","bi.createwidget({","bi.yearmonthcombo.event_before_popupview","bi.yearmonthcombo.event_confirm","monthbehavior","object","sourc","type:","width:","year_month_combo","yearbehavior","{","}","});","—","事件","参数","可选值","年月选择下拉框","弹出框弹出前触发","点击确认触发","类型","自定义年份选择的行为(详见button_group)","说明","默认值"],"detailed/date/year_quarter_combo.html":["\"bi.year_quarter_combo\",","300","bi.createwidget({","bi.yearquartercombo.event_before_popupview","bi.yearquartercombo.event_confirm","monthbehavior","object","sourc","type:","width:","year_quarter_combo","yearbehavior","{","}","});","—","事件","参数","可选值","年季度选择下拉框","弹出框弹出前触发","点击确认触发","类型","自定义年份选择的行为(详见button_group)","说明","默认值"],"detailed/date/custom_date_time.html":["\"#wrapper\",","\"bi.custom_date_time_combo\",","bi.createwidget({","bi.customdatetimecombo.event_cancel","bi.customdatetimecombo.event_confirm","custom_date_tim","element:","sourc","type:","});","事件","参数","可选值","日期选择下拉框(可以选择时分秒)","点击取消触发","点击确认触发","类型","说明","默认值"],"detailed/combo/single_tree_combo.html":["\"bi.single_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.single_tree_combo","bi.singletreecombo.event_before_popupview","element:","getvalu","height","item","items:","null","number","object","popul","setvalu","single_tree_combo","sourc","string","text","text:","tree","trigger","type:","var","width:","{}","});","下拉列表的弹出方式","下拉框弹出前触发","事件","二级树下拉框","元素","其他事件详见input","刷新内容","参数","参数设置","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/multilayer_single_tree_combo.html":["\"bi.multilayer_single_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.emptyfn","bi.multilayer_single_tree_combo","element:","function","getvalu","height","item","items:","itemscr","multilayer_single_tree_combo","null","number","popul","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","元素","元素创造器","刷新内容","参数","参数设置","回调参数","多层级下拉单选树","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/select_tree_combo.html":["\"bi.select_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.select_tree_combo","element:","getvalu","height","item","items:","null","number","popul","select_tree_combo","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","二级可选节点下拉框树","元素","刷新内容","参数","参数设置","回调参数","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/combo/multilayer_select_tree_combo.html":["\"bi.multilayer_select_tree_combo\",","\"默认值\",","''","'body',","30","300,","=","[],","array","bi.createwidget({","bi.multilayer_select_tree_combo","element:","getvalu","height","item","items:","multilayer_select_tree_combo","null","number","popul","setvalu","sourc","string","text","text:","tree","type:","var","width:","});","元素","刷新内容","参数","参数设置","回调参数","多层级下拉可选节点树","子项数组","文本框值","方法","方法名","类型","获取值","设置值","说明","高度","默认值"],"detailed/path/path_chooser.html":["\"#wrapper\",","\"0fbd0dc648f41e97\",","\"1\"","\"3\"","\"5\"","\"8c4460bc3605685e\",","\"bi.path_chooser\",","\"c6d72d6c7e19a667\",","\"id\",","\"region\":","\"regiontext\":","\"text\":","\"value\":","\"供应商基本信息\",","\"学号\",","\"采购订单\",","\"采购订单xxx\",","[","[[{","]","array","bi.createwidget({","element:","item","items:","path_choos","sourc","type:","{","});","},","}]]","—","二维数组,每个元素代表一条路径","参数","可选值","类型","说明","路径选择","默认值"],"detailed/path/direction_path_chooser.html":["\"#wrapper\",","\"1f4711c201ef1842\",","\"bi.direction_path_chooser\",","\"defa1f7ba8b2684a客户id\"","\"direction\":","\"e351e9f1d8147947合同id\",","\"region\":","\"text\":","\"value\":","\"主键\",","\"合同id\",","\"合同信息\",","\"合同的回款信息\",","\"客户id\",","\"客户信息\",","1","[","[[{","]","array","bi.createwidget({","direction_path_choos","element:","item","items:","sourc","type:","{","});","},","}]]","—","二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向","参数","可选值","带方向的路径选择","类型","说明","默认值"],"detailed/relation_view.html":["\"a\",","\"a1\",","\"a1字段\"},","\"b\",","\"b2\",","\"b2...\",","\"b2字段\"","\"bi.relation_view\",","\"c\",","\"c1\",","\"c1字段\"}","\"c2\",","\"c2字段\"}","\"比\",","[{","bi.createwidget({","foreign:","items:","primary:","region:","regiontext:","relation_view","sourc","text:","title:","type:","value:","{","{region:","});","},","}]","关联视图","参数","可选值","类型","说明","默认值"],"detailed/dialog.html":["\"","bi.msg.alert(title,","content","content)","dialog","sourc","string","titl","—","参数","可选值","对话框","对话框内容","对话框标题","类型","说明","默认值"],"detailed/file_manager.html":["\"1\",","\"11\",","\"12\",","\"bi.file_manager\",","\"根目录\"","\"第一级子目录1\"","\"第一级子目录2\"","[{","bi.createwidget({","file_manag","getselectedid","getselectedvalue()","id:","items:","pid:","sourc","text:","type:","value:","{","})","},","}]","文件管理器","方法","获取当前选中项的id属性","获取当前选中项的value值","说明"],"detailed/slider.html":["\"bi.slider\",","10","16,","50","50,","bi.createwidget({","bi.slid","getvalu","max","max:","min","min:","number","setvalu","slider","slider插件","sourc","type:","valu","});","—","参数","方法","方法名","最大值","最小值","类型","获得当前值","设置当前值","说明","默认值"]},"length":137},"tokenStore":{"root":{"0":{"1":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}},"'":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.06451612903225806},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.07058823529411765},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.06896551724137931},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.06593406593406594},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.0759493670886076},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.06521739130434782},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.08333333333333333},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.02564102564102564},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.028368794326241134},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014423076923076924},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.027649769585253458},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.03529411764705882},"base/label.html":{"ref":"base/label.html","tf":0.040268456375838924},"base/button/button.html":{"ref":"base/button/button.html","tf":0.028409090909090908},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021621621621621623},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.02072538860103627},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.020618556701030927},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.04081632653061224},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.023255813953488372},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/segment.html":{"ref":"case/segment.html","tf":0.04672897196261682},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.056818181818181816},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.05319148936170213},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.04672897196261682},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.041237113402061855},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.04040404040404041},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0392156862745098},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"\"":{"docs":{},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856}}}},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.05357142857142857},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"s":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}}}}}}},"}":{"docs":{},"]":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}},"1":{"0":{"0":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.08163265306122448},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.08163265306122448},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.041666666666666664}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},";":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}},"]":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306}}}}},"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.03278688524590164},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.08333333333333333}}},")":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}},"1":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"1":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{}},"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}},"2":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"3":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}},"docs":{}},"4":{"5":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}},"docs":{}},"6":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}},"8":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.04}},".":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856}}}},",":{"docs":{},"这":{"docs":{},"里":{"docs":{},"虽":{"docs":{},"然":{"docs":{},"设":{"docs":{},"置":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"3":{"0":{"docs":{},",":{"docs":{},"但":{"docs":{},"是":{"docs":{},"最":{"docs":{},"终":{"docs":{},"影":{"docs":{},"响":{"docs":{},"高":{"docs":{},"度":{"docs":{},"的":{"docs":{},"是":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"布":{"docs":{},"局":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}},"docs":{}}}}}}}}}}}}}}}},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.05357142857142857},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02877697841726619},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.03278688524590164},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.043478260869565216},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.05263157894736842}}},")":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}},":":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}},"]":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},";":{"docs":{},"}":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334}}}},"表":{"docs":{},"示":{"docs":{},"自":{"docs":{},"动":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}},"2":{"0":{"0":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"]":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}},"1":{"0":{"docs":{},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}},"5":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"docs":{}},"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"1":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"2":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"4":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}}},"5":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.016483516483516484},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"6":{"docs":{},")":{"docs":{},"'":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},".":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"docs":{"./":{"ref":"./","tf":0.06666666666666667}}},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},",":{"docs":{},"为":{"docs":{},"了":{"docs":{},"演":{"docs":{},"示":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"是":{"docs":{},"占":{"docs":{},"满":{"docs":{},"整":{"docs":{},"个":{"docs":{},"的":{"docs":{},",":{"docs":{},"用":{"docs":{},"了":{"docs":{},"一":{"docs":{},"个":{"docs":{},"w":{"docs":{},"h":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},":":{"docs":{},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},":":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},"3":{"0":{"0":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}},";":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}},"1":{"docs":{},"'":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"5":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}},"7":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115}}},"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}},".":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}},"4":{"0":{"0":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}},"docs":{}},"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},".":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}},"5":{"0":{"0":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}},",":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}},"]":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}},"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.02127659574468085},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},"]":{"docs":{},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}},"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"6":{"0":{"0":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},",":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}},"docs":{}},"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"7":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"8":{"0":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"docs":{},")":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}},"9":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{}},"docs":{},"f":{"docs":{},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"u":{"docs":{},"i":{"2":{"docs":{},".":{"0":{"docs":{},"引":{"docs":{},"入":{"docs":{},"生":{"docs":{},"命":{"docs":{},"周":{"docs":{},"期":{"docs":{},"后":{"docs":{},",":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"的":{"docs":{},"实":{"docs":{},"现":{"docs":{},"类":{"docs":{},"不":{"docs":{},"需":{"docs":{},"要":{"docs":{},"重":{"docs":{},"写":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"等":{"docs":{},"方":{"docs":{},"法":{"docs":{},",":{"docs":{},"会":{"docs":{},"自":{"docs":{},"动":{"docs":{},"调":{"docs":{},"用":{"docs":{},"子":{"docs":{},"组":{"docs":{},"件":{"docs":{},"的":{"docs":{},"对":{"docs":{},"应":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}},"docs":{},"d":{"docs":{},"o":{"docs":{},"c":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}},"的":{"docs":{},"交":{"docs":{},"互":{"docs":{},"、":{"docs":{},"前":{"docs":{},"端":{"docs":{},"以":{"docs":{},"及":{"docs":{},"视":{"docs":{},"觉":{"docs":{},"文":{"docs":{},"档":{"docs":{},"规":{"docs":{},"范":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"_":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":10.037037037037036}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.020202020202020204}}}}}}}}}}}}}}}}},"r":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"a":{"docs":{},"n":{"docs":{},"a":{"docs":{},"g":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":10.023255813953488}}}}}}}}}}},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":10}}},"a":{"docs":{},"t":{"docs":{},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":10}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":10}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.038461538461538464},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.025157232704402517},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010810810810810811},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/pager.html":{"ref":"base/pager.html","tf":0.03333333333333333},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.02040816326530612},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.03225806451612903},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.125},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.027906976744186046},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.020618556701030927},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.020202020202020204},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0196078431372549},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}},"(":{"docs":{},"i":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}},"d":{"docs":{},"x":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}},"o":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}},"s":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}},".":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}},"v":{"docs":{},")":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},")":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}},"{":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}},"r":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"docs":{}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.019230769230769232},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.01764705882352941},"core/widget.html":{"ref":"core/widget.html","tf":0.02040816326530612},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/button/button.html":{"ref":"base/button/button.html","tf":0.017045454545454544},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.01875},"base/pager.html":{"ref":"base/pager.html","tf":0.03333333333333333},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}},"e":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094}}}}}},"k":{"docs":{},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{},".":{"docs":{},"f":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{},"(":{"docs":{},")":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"\"":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.023255813953488372},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314}}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":10}}}}}}}}}}}}},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}}}}},"c":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"s":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"o":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}},"n":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.03389830508474576},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"u":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"v":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},"b":{"docs":{},"y":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"b":{"docs":{},"y":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}}}}}},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},"e":{"docs":{},"d":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"c":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}},"i":{"docs":{},"d":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"(":{"docs":{},")":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}}}}}}}}}}}}}},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"a":{"docs":{},"t":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"b":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}},"t":{"docs":{},"h":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"b":{"docs":{},"y":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"s":{"docs":{},"b":{"docs":{},"y":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"c":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"u":{"docs":{},"r":{"docs":{},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"s":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"y":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":10}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":10}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":10}}}}}}}}},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":10}}}}}}}},"s":{"docs":{},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"这":{"docs":{},"几":{"docs":{},"个":{"docs":{},"方":{"docs":{},"法":{"docs":{},"来":{"docs":{},"设":{"docs":{},"置":{"docs":{},"值":{"docs":{},",":{"docs":{},"获":{"docs":{},"取":{"docs":{},"值":{"docs":{},"(":{"docs":{},"展":{"docs":{},"示":{"docs":{},"类":{"docs":{},"控":{"docs":{},"件":{"docs":{},"除":{"docs":{},"外":{"docs":{},")":{"docs":{},"和":{"docs":{},"刷":{"docs":{},"新":{"docs":{},"控":{"docs":{},"件":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"(":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"a":{"docs":{},"k":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"r":{"docs":{},"a":{"docs":{},"y":{"docs":{},"(":{"3":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}},"p":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":10},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},"组":{"docs":{},"件":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},":":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"l":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},")":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}}}}}}}},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.05128205128205128},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.043010752688172046},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.032},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.032},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.047058823529411764},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.04597701149425287},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.04395604395604396},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.05063291139240506},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.043478260869565216},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.04938271604938271},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.05555555555555555},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.05063291139240506},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.023529411764705882},"base/label.html":{"ref":"base/label.html","tf":0.026845637583892617},"base/button/button.html":{"ref":"base/button/button.html","tf":0.022727272727272728},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021621621621621623},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.02072538860103627},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.020618556701030927},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.027210884353741496},"case/segment.html":{"ref":"case/segment.html","tf":0.037383177570093455},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.045454545454545456},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0425531914893617},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.037037037037037035},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.037383177570093455},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.041237113402061855},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.04040404040404041},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0392156862745098}}}}}}}},"n":{"docs":{},"e":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":10}},"l":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":10}},"的":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}},"关":{"docs":{},"闭":{"docs":{},"事":{"docs":{},"件":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":10}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"m":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"t":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}},"g":{"docs":{},"e":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"r":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"刷":{"docs":{},"新":{"docs":{},"完":{"docs":{},"成":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},":":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"s":{"docs":{},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}},"为":{"docs":{},"数":{"docs":{},"字":{"docs":{},"时":{"docs":{},"可":{"docs":{},"用":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}}},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":10}}}}}},"t":{"docs":{},"h":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":10.01923076923077}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}},"v":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":10}}}}}}}}},"o":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}},"p":{"docs":{},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"y":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}}}}}},"i":{"docs":{},"d":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744}}}}},"y":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"这":{"docs":{},"几":{"docs":{},"个":{"docs":{},"方":{"docs":{},"法":{"docs":{},"来":{"docs":{},"设":{"docs":{},"置":{"docs":{},"使":{"docs":{},"能":{"docs":{},",":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{},",":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{},"并":{"docs":{},"且":{"docs":{},"在":{"docs":{},"f":{"docs":{},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"u":{"docs":{},"i":{"2":{"docs":{},".":{"0":{"docs":{},"之":{"docs":{},"后":{"docs":{},",":{"docs":{},"会":{"docs":{},"自":{"docs":{},"动":{"docs":{},"给":{"docs":{},"子":{"docs":{},"组":{"docs":{},"件":{"docs":{},"设":{"docs":{},"置":{"docs":{},"同":{"docs":{},"样":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{},"不":{"docs":{},"要":{"docs":{},"重":{"docs":{},"写":{"docs":{},"这":{"docs":{},"些":{"docs":{},"方":{"docs":{},"法":{"docs":{},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"需":{"docs":{},"要":{"docs":{},"在":{"docs":{},"设":{"docs":{},"置":{"docs":{},"状":{"docs":{},"态":{"docs":{},"时":{"docs":{},"的":{"docs":{},"额":{"docs":{},"外":{"docs":{},"操":{"docs":{},"作":{"docs":{},"可":{"docs":{},"以":{"docs":{},"通":{"docs":{},"过":{"docs":{},"重":{"docs":{},"写":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"来":{"docs":{},"实":{"docs":{},"现":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.03389830508474576},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}},"i":{"docs":{},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"i":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}},"e":{"docs":{},"w":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"e":{"docs":{},"n":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"(":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}},"x":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"t":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"i":{"docs":{},"z":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"l":{"docs":{},"l":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}},"z":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}},"n":{"docs":{},"g":{"docs":{},"s":{"docs":{},":":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}}}}}}}},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}}},"n":{"docs":{},"i":{"docs":{},"s":{"docs":{},"h":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"l":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":10},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":10.018518518518519}},".":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"[":{"docs":{},"{":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}}}}}},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"v":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"a":{"docs":{},"l":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":10}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":10}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},":":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"e":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":10}}}}}}}},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}},"x":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077}},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}},":":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"}":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}},"o":{"docs":{},"u":{"docs":{},"r":{"docs":{},"c":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":10}}}}}}}}}},"t":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.02403846153846154},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.02197802197802198},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.025},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.02040816326530612},"core/single.html":{"ref":"core/single.html","tf":0.05555555555555555},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.04697986577181208},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.022727272727272728},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.03773584905660377},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.016216216216216217},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.02531645569620253},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.03076923076923077},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.020202020202020204},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.015463917525773196},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.017341040462427744},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.030927835051546393},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.030303030303030304},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.029411764705882353},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.05405405405405406},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.08695652173913043}},"/":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}},"e":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":10}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":10}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"h":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":10}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/single.html":{"ref":"core/single.html","tf":10}},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":10}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":10}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":10}}}}}}}}}}}}}}}}},"z":{"docs":{},"e":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":10}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":10}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":10}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}},"e":{"docs":{},"r":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":10.0125}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":10}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},",":{"docs":{},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}},"m":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"y":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"c":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}},":":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}},"v":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":10.01123595505618}},".":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"m":{"1":{"0":{"docs":{},",":{"1":{"0":{"docs":{},"l":{"5":{"0":{"docs":{},",":{"5":{"0":{"docs":{},"m":{"5":{"0":{"docs":{},",":{"1":{"0":{"docs":{},"l":{"1":{"0":{"docs":{},",":{"5":{"0":{"docs":{},"\"":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}}}}}}}},"绘":{"docs":{},"图":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":10}},"插":{"docs":{},"件":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}}}}}}},"使":{"docs":{},"用":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"来":{"docs":{},"清":{"docs":{},"空":{"docs":{},"或":{"docs":{},"者":{"docs":{},"重":{"docs":{},"置":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"不":{"docs":{},"要":{"docs":{},"使":{"docs":{},"用":{"docs":{},"e":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"能":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"慎":{"docs":{},"用":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}},"控":{"docs":{},"件":{"docs":{},"都":{"docs":{},"会":{"docs":{},"提":{"docs":{},"供":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}},"位":{"docs":{},"置":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},"高":{"docs":{},"度":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"文":{"docs":{},"档":{"docs":{},"规":{"docs":{},"范":{"docs":{"./":{"ref":"./","tf":10}}}}},"本":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}},"对":{"docs":{},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}},"标":{"docs":{},"签":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}},"宽":{"docs":{},"度":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308}}}}},"红":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"高":{"docs":{},"亮":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}},"值":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"失":{"docs":{},"焦":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"是":{"docs":{},"否":{"docs":{},"处":{"docs":{},"于":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"获":{"docs":{},"取":{"docs":{},"焦":{"docs":{},"点":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"宽":{"docs":{},"度":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}},"高":{"docs":{},"度":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}},"默":{"docs":{},"认":{"docs":{},"值":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}},"域":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}},"失":{"docs":{},"焦":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}},"的":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}},"获":{"docs":{},"取":{"docs":{},"焦":{"docs":{},"点":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}}}}}}}},"字":{"docs":{},"布":{"docs":{},"局":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}},"类":{"docs":{},"型":{"docs":{},"的":{"docs":{},"按":{"docs":{},"钮":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}}}}}}}}}}}}}}}}}},"件":{"docs":{},"上":{"docs":{},"传":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}},"路":{"docs":{},"径":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}},"管":{"docs":{},"理":{"docs":{},"器":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}}}}},"谨":{"docs":{},"慎":{"docs":{},"监":{"docs":{},"听":{"docs":{},"和":{"docs":{},"触":{"docs":{},"发":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"事":{"docs":{},"件":{"docs":{},",":{"docs":{},"一":{"docs":{},"般":{"docs":{},"来":{"docs":{},"说":{"docs":{},",":{"docs":{},"控":{"docs":{},"件":{"docs":{},"都":{"docs":{},"会":{"docs":{},"有":{"docs":{},"一":{"docs":{},"个":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"事":{"docs":{},"件":{"docs":{},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"特":{"docs":{},"殊":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{},"会":{"docs":{},"在":{"docs":{},"对":{"docs":{},"应":{"docs":{},"控":{"docs":{},"件":{"docs":{},"文":{"docs":{},"档":{"docs":{},"中":{"docs":{},"列":{"docs":{},"出":{"docs":{"./":{"ref":"./","tf":0.06666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"\"":{"0":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}},"f":{"docs":{},"b":{"docs":{},"d":{"0":{"docs":{},"d":{"docs":{},"c":{"6":{"4":{"8":{"docs":{},"f":{"4":{"1":{"docs":{},"e":{"9":{"7":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}}}}},"1":{"0":{"0":{"docs":{},"%":{"docs":{},"\"":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"docs":{}},"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744}}}}},"2":{"3":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744}}}}},"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.09302325581395349}}}},"f":{"4":{"7":{"1":{"1":{"docs":{},"c":{"2":{"0":{"1":{"docs":{},"e":{"docs":{},"f":{"1":{"8":{"4":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"2":{"0":{"1":{"0":{"docs":{},"年":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}},"docs":{}},"docs":{}},"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}},"3":{"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}},"4":{"5":{"6":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"docs":{}},"docs":{}},"5":{"docs":{},"\"":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}},"8":{"docs":{},"c":{"4":{"4":{"6":{"0":{"docs":{},"b":{"docs":{},"c":{"3":{"6":{"0":{"5":{"6":{"8":{"5":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.030612244897959183},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.021621621621621623},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.05063291139240506},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.06153846153846154},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.04040404040404041},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.02072538860103627},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.02197802197802198},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.041237113402061855},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.022988505747126436},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.025},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.02702702702702703},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.02702702702702703},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.020618556701030927},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.020202020202020204},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0196078431372549},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.17391304347826086}},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}}}}},"b":{"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},".":{"docs":{},".":{"docs":{},".":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"docs":{},"i":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},".":{"docs":{},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.026143790849673203},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154}}},"}":{"docs":{},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195}}},"}":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}}}}},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012}}}}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}}}}}}},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}}}}}}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}}}}}},"i":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}}}}},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}}}},"\"":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}},"}":{"docs":{},"]":{"docs":{},"}":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},"}":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}}}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}}}}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}},"}":{"docs":{},"}":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}}}},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}},",":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}}}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"u":{"docs":{},"s":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014388489208633094},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}},"v":{"docs":{},"g":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"h":{"docs":{},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}}}}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"a":{"docs":{},"n":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}}}}}}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},"\"":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.026143790849673203},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154}}}}}},"b":{"docs":{},"e":{"docs":{},"l":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}},"docs":{}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385}},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}}}}}}}}},"\"":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}},"这":{"docs":{},"里":{"docs":{},"设":{"docs":{},"置":{"docs":{},"了":{"docs":{},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"水":{"docs":{},"平":{"docs":{},"间":{"docs":{},"距":{"docs":{},")":{"docs":{},",":{"docs":{},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"间":{"docs":{},"距":{"docs":{},")":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"t":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},",":{"docs":{},"b":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023}}}}}}}}}}}}}}}}}}}}}}}}}}},"个":{"docs":{},"是":{"docs":{},"带":{"docs":{},"标":{"docs":{},"记":{"docs":{},"的":{"docs":{},"\"":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}}},"m":{"docs":{},"i":{"docs":{},"d":{"docs":{},"d":{"docs":{},"l":{"docs":{},"e":{"docs":{},"\"":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}}}}}}}},"v":{"docs":{},"c":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"c":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}},"6":{"docs":{},"d":{"7":{"2":{"docs":{},"d":{"6":{"docs":{},"c":{"7":{"docs":{},"e":{"1":{"9":{"docs":{},"a":{"6":{"6":{"7":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253}}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314}}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}},"h":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436}}}}}}},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}}}}}}}},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.057692307692307696},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06}}}}}}}}},"右":{"docs":{},"边":{"docs":{},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385}}}}}},"e":{"docs":{},"d":{"docs":{},"\"":{"docs":{},"}":{"docs":{},")":{"docs":{},";":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.057692307692307696},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.057692307692307696}}}}}}}}}}}}}},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"p":{"docs":{},":":{"docs":{},"/":{"docs":{},"/":{"docs":{},"w":{"docs":{},"w":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"a":{"docs":{},"s":{"docs":{},"y":{"docs":{},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"/":{"docs":{},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{},"/":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{},".":{"docs":{},"p":{"docs":{},"h":{"docs":{},"p":{"docs":{},"?":{"docs":{},"i":{"docs":{},"d":{"docs":{},"=":{"1":{"2":{"0":{"6":{"7":{"4":{"1":{"docs":{},"&":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"=":{"1":{"2":{"8":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"与":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"的":{"docs":{},"不":{"docs":{},"同":{"docs":{},"在":{"docs":{},"于":{"docs":{},",":{"docs":{},"它":{"docs":{},"可":{"docs":{},"以":{"docs":{},"控":{"docs":{},"制":{"docs":{},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"和":{"docs":{},"最":{"docs":{},"大":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"根":{"docs":{},"目":{"docs":{},"录":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"第":{"docs":{},"一":{"docs":{},"级":{"docs":{},"目":{"docs":{},"录":{"1":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"docs":{}}},"子":{"docs":{},"目":{"docs":{},"录":{"1":{"docs":{},"\"":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}},"2":{"docs":{},"\"":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}},"docs":{}}}}},"行":{"docs":{},"第":{"docs":{},"一":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"二":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"三":{"docs":{},"列":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"二":{"docs":{},"级":{"docs":{},"文":{"docs":{},"件":{"1":{"docs":{},"\"":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"docs":{}}}},"行":{"docs":{},"第":{"docs":{},"一":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"二":{"docs":{},"列":{"docs":{},"\"":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}},"三":{"docs":{},"项":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}},".":{"docs":{},"\"":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"\"":{"docs":{},"}":{"docs":{},"]":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}},"测":{"docs":{},"试":{"docs":{},"\"":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}},",":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"e":{"3":{"5":{"1":{"docs":{},"e":{"9":{"docs":{},"f":{"1":{"docs":{},"d":{"8":{"1":{"4":{"7":{"9":{"4":{"7":{"docs":{},"合":{"docs":{},"同":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}}},"docs":{}}},"docs":{}},"docs":{}},"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"l":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}},"项":{"docs":{},"目":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}},"docs":{}}},"\"":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497}},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"}":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}},"]":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"一":{"docs":{},"月":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},"\"":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"测":{"docs":{},"试":{"docs":{},"\"":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}},"a":{"docs":{},"b":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"2":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"3":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}},"docs":{}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"\"":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}},",":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}},":":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.057692307692307696},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.06}}}}}}}},"前":{"docs":{},"进":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}},"后":{"docs":{},"退":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}},"页":{"docs":{},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}},"张":{"docs":{},"三":{"docs":{},"\"":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"s":{"docs":{},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},"\"":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}},"面":{"docs":{},"板":{"1":{"docs":{},"\"":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},"2":{"docs":{},"\"":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},"docs":{}}},"点":{"docs":{},"击":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}},"a":{"1":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"字":{"docs":{},"段":{"docs":{},"\"":{"docs":{},"}":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}},"docs":{},"a":{"docs":{},"a":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"\"":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},")":{"docs":{},";":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}},"b":{"docs":{},"a":{"docs":{},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}},"c":{"docs":{},"c":{"docs":{},"\"":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}},"d":{"docs":{},"i":{"docs":{},"v":{"docs":{},"\"":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{},":":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.04}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}},"f":{"docs":{},"a":{"1":{"docs":{},"f":{"7":{"docs":{},"b":{"docs":{},"a":{"8":{"docs":{},"b":{"2":{"6":{"8":{"4":{"docs":{},"a":{"docs":{},"客":{"docs":{},"户":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}}}},"docs":{}}},"docs":{}}}},"o":{"docs":{},"t":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.03289473684210526}}}}},"基":{"docs":{},"本":{"docs":{},"标":{"docs":{},"签":{"docs":{},"\"":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"\"":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}},",":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}}},"字":{"docs":{},"段":{"docs":{},"不":{"docs":{},"可":{"docs":{},"重":{"docs":{},"名":{"docs":{},"!":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"尾":{"docs":{},"页":{"docs":{},"\"":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"首":{"docs":{},"页":{"docs":{},"\"":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"g":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"n":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}},"复":{"docs":{},"选":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}},"项":{"docs":{},"\"":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}},"单":{"docs":{},"选":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}}},"项":{"docs":{},"\"":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425}}}}}},"原":{"docs":{},"始":{"docs":{},"值":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}},"+":{"docs":{},"\"":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}},"标":{"docs":{},"题":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.038461538461538464}}}}}},"默":{"docs":{},"认":{"docs":{},"风":{"docs":{},"格":{"docs":{},"\"":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}},"值":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}},"三":{"docs":{},"角":{"docs":{},"形":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}}}},"十":{"docs":{},"字":{"docs":{},"形":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}}}},"箭":{"docs":{},"头":{"docs":{},"节":{"docs":{},"点":{"docs":{},"\"":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.018518518518518517}}}}}}},"表":{"docs":{},"头":{"1":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"2":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"3":{"docs":{},"\"":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"docs":{}}},"供":{"docs":{},"应":{"docs":{},"商":{"docs":{},"基":{"docs":{},"本":{"docs":{},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}}}}}}},"学":{"docs":{},"号":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}},"采":{"docs":{},"购":{"docs":{},"订":{"docs":{},"单":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}}}}}}},"主":{"docs":{},"键":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}},"合":{"docs":{},"同":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}},"的":{"docs":{},"回":{"docs":{},"款":{"docs":{},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}}}},"客":{"docs":{},"户":{"docs":{},"i":{"docs":{},"d":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}},"信":{"docs":{},"息":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}},"比":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"'":{"1":{"9":{"0":{"0":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}},"docs":{}},"docs":{}},"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"2":{"0":{"9":{"9":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}},"docs":{}},"docs":{}},"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"3":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}},"docs":{},"d":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},".":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}}}}}}}}}}}}},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}}}}}}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"'":{"docs":{},",":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024}}}}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"'":{"docs":{},",":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"_":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}}}}}},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"'":{"docs":{},",":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}}}}}}},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"'":{"docs":{},",":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"1":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}},"2":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}},"3":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}},"]":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"docs":{}}}}}},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"'":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"'":{"docs":{},",":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"]":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"1":{"docs":{},"'":{"docs":{},"}":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}},"2":{"docs":{},"'":{"docs":{},"}":{"docs":{},",":{"docs":{},"{":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"3":{"docs":{},"'":{"docs":{},"}":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"docs":{}}}}}},"点":{"docs":{},"击":{"docs":{},"我":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"一":{"docs":{},"个":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"'":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}}},"一":{"docs":{},"般":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}},"文":{"docs":{},"字":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"'":{"docs":{},",":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}},"s":{"docs":{},"u":{"docs":{},"m":{"docs":{},"(":{"docs":{},"c":{"5":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}},"docs":{}}}}}},"'":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},",":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}},"简":{"docs":{},"单":{"docs":{},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"测":{"docs":{},"试":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}}}}}}},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"'":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}}}}}}}},"[":{"0":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"1":{"0":{"0":{"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}},"docs":{},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"docs":{}},"2":{"0":{"0":{"docs":{},",":{"2":{"0":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"docs":{}},"docs":{}},"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"docs":{},",":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"docs":{}},"5":{"0":{"docs":{},",":{"5":{"0":{"docs":{},",":{"2":{"0":{"0":{"docs":{},",":{"2":{"5":{"0":{"docs":{},",":{"4":{"0":{"0":{"docs":{},"]":{"docs":{},",":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}},"docs":{}}},"docs":{}},"docs":{}}},"docs":{}},"8":{"2":{"docs":{},",":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"docs":{}},"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.029850746268656716},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014388489208633094},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.027777777777777776},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.04054054054054054},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.018691588785046728},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.018691588785046728},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"]":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.031446540880503145},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.043859649122807015},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.032679738562091505},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.06060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.05102040816326531},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.05102040816326531},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.03684210526315789},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.046511627906976744}},",":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"[":{"docs":{},"{":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"\"":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}},"a":{"docs":{},"p":{"docs":{},"i":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}},"r":{"docs":{},"r":{"docs":{},"a":{"docs":{},"y":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.028985507246376812},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.03773584905660377},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.043859649122807015},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.032679738562091505},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.06666666666666667},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.05612244897959184},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.05612244897959184},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.03684210526315789},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.046511627906976744},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},"/":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125}},"上":{"docs":{},"下":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608}}}}}}}}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":10}}}}}}}}}},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"(":{"docs":{},"a":{"docs":{},"r":{"docs":{},"r":{"docs":{},")":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}},"j":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}},"x":{"docs":{},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}},"y":{"docs":{},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"左":{"docs":{},"右":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357}}}}}}}}}}}},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"c":{"docs":{},"r":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094}}}},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"i":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}},"y":{"docs":{},":":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"i":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"b":{"docs":{},"l":{"docs":{},"a":{"docs":{},"n":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":10}}}}}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}},"b":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"g":{"1":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"2":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"3":{"docs":{},"\"":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"4":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"5":{"docs":{},"\"":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},",":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}},"6":{"docs":{},"\"":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}},"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}},"\"":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}},"i":{"docs":{},".":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"(":{"docs":{},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.02054794520547945},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},")":{"docs":{},";":{"docs":{},"}":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}}}}}}}}},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941}}}}}}}}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"l":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":10.009803921568627}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},".":{"docs":{},"m":{"docs":{},"i":{"docs":{},"d":{"docs":{},"d":{"docs":{},"l":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},".":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":0.5}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},".":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}},"e":{"docs":{},",":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"(":{"docs":{},")":{"docs":{},")":{"docs":{},".":{"docs":{},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},")":{"docs":{},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}},"t":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}},"e":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}},"d":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}}}}},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":10.010309278350515}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"(":{"docs":{},"{":{"docs":{},"}":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}},"v":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"f":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.03225806451612903},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.03255813953488372},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"l":{"docs":{},"u":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"e":{"docs":{},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"n":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"f":{"docs":{},"o":{"docs":{},"c":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"_":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"r":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}},"o":{"docs":{},"p":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"p":{"docs":{},"(":{"docs":{},"[":{"docs":{},"{":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}},"k":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"r":{"docs":{},"a":{"docs":{},"y":{"docs":{},"(":{"1":{"0":{"0":{"docs":{},",":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}},"s":{"docs":{},"g":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}},".":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{},"(":{"docs":{},"'":{"docs":{},"测":{"docs":{},"试":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"'":{"docs":{},",":{"docs":{},"\"":{"docs":{},"我":{"docs":{},"是":{"docs":{},"测":{"docs":{},"试":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"o":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"这":{"docs":{},"是":{"docs":{},"一":{"docs":{},"条":{"docs":{},"简":{"docs":{},"单":{"docs":{},"的":{"docs":{},"数":{"docs":{},"据":{"docs":{},"\"":{"docs":{},")":{"docs":{},";":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"(":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}}}}}}}}}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"g":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"u":{"docs":{},"i":{"docs":{},"d":{"docs":{},"(":{"docs":{},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}}},"u":{"docs":{},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"o":{"docs":{},"m":{"docs":{},"(":{"1":{"docs":{},",":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}},"docs":{}}}}}}},"e":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":10.01010101010101}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}}}},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516}}}}}},"r":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"o":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"n":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}},"v":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"h":{"docs":{},"e":{"docs":{},"l":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}},"g":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}}}},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}}},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}},"s":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},",":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"d":{"docs":{},")":{"docs":{},";":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},"_":{"docs":{},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"s":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}}}},"a":{"docs":{},"n":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}},"e":{"docs":{},"l":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"e":{"docs":{},"r":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}},"i":{"1":{"8":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"(":{"docs":{},"\"":{"docs":{},"b":{"docs":{},"i":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}},"docs":{}},"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},".":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.03365384615384615},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.0440251572327044},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.01764705882352941},"core/widget.html":{"ref":"core/widget.html","tf":0.02040816326530612},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/button/button.html":{"ref":"base/button/button.html","tf":0.03409090909090909},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"base/pager.html":{"ref":"base/pager.html","tf":0.04},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.02040816326530612},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.02040816326530612},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655}}}}}}},"r":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":10}},"\"":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"r":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"d":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"y":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/button/button.html":{"ref":"base/button/button.html","tf":10},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":10}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":10}}}}}},"的":{"docs":{},"选":{"docs":{},"中":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"b":{"docs":{},"b":{"docs":{},"l":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":10}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":10}}}}}}}}}}}}},"l":{"docs":{},"o":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}},"u":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"a":{"docs":{},"s":{"docs":{},"e":{"docs":{},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":10}}}}}}}},"s":{"docs":{},"u":{"docs":{},"r":{"docs":{},"e":{"docs":{},"\"":{"docs":{},")":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}},":":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"_":{"docs":{},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"组":{"docs":{},"件":{"docs":{},"配":{"docs":{},"置":{"docs":{},"项":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}}},"配":{"docs":{},"置":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":10}}}}},"r":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":10}}}}}}}}}}}},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"s":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.026143790849673203},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.03289473684210526}},"\"":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}}},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"p":{"docs":{},"b":{"docs":{},"o":{"docs":{},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":10}}}}}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"m":{"docs":{},"a":{"docs":{},"x":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}},"i":{"docs":{},"n":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{},"名":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}},"s":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.025157232704402517},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.02631578947368421},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.0196078431372549},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.01875},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.02631578947368421},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.015306122448979591},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.015306122448979591},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023}}}}}}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":10}}}}}},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":10}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},",":{"docs":{},"指":{"docs":{},"定":{"docs":{},"行":{"docs":{},"列":{"docs":{},"可":{"docs":{},"以":{"docs":{},"删":{"docs":{},"除":{"docs":{},"看":{"docs":{},"不":{"docs":{},"见":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.058823529411764705}},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"半":{"docs":{},"径":{"docs":{},"以":{"docs":{},"及":{"docs":{},"颜":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":10}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":10}}}}}}}}}}}}}}}}}}},"n":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"m":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}},"n":{"docs":{},"t":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}},")":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}}}}}}}},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":10.009615384615385}},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}},"类":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}},",":{"docs":{},"s":{"docs":{},"u":{"docs":{},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},",":{"docs":{},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}}}}}}}}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{},"e":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":10.020833333333334}}}}}}}}}}}}},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353}},":":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"d":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":10}}}}}}}}}}},"p":{"docs":{},"i":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}},"y":{"docs":{},":":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":10},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":10}}}}}}}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"e":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"n":{"docs":{},"o":{"docs":{},"n":{"docs":{},"e":{"docs":{},",":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},"_":{"docs":{},"d":{"docs":{},"e":{"docs":{},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}},"e":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}},"可":{"docs":{},"选":{"docs":{},"值":{"docs":{},"为":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}}}}}}}},"i":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},":":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}}}}}}}},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":10}}}}},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":10.045454545454545}}}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}},"a":{"docs":{},"r":{"docs":{},"d":{"docs":{},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}},"o":{"docs":{},"r":{"docs":{},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}},"\"":{"docs":{},",":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863}}}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}},"s":{"docs":{},"e":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863}}}},"l":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.0425531914893617},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}},"(":{"docs":{},"{":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}},")":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":10}}}}}}}},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":10.016666666666667},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"i":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"(":{"1":{"5":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{},"(":{"docs":{},")":{"docs":{},";":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"(":{"5":{"5":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}},"docs":{}}}}}}}}},"绘":{"docs":{},"图":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"o":{"docs":{},"s":{"docs":{},"s":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},"r":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}},"i":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"e":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.046052631578947366}},"l":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},"\"":{"docs":{},"#":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"b":{"docs":{},"o":{"docs":{},"d":{"docs":{},"y":{"docs":{},"\"":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}}}}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.057692307692307696},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}},"l":{"docs":{},"i":{"docs":{},"p":{"docs":{},"s":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"m":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":10.010989010989011},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}},"e":{"docs":{},"r":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}},"展":{"docs":{},"开":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}},"收":{"docs":{},"起":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"a":{"docs":{},"c":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":10}}}}}}}},"s":{"docs":{},"t":{"docs":{},"i":{"docs":{},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"_":{"docs":{},"a":{"docs":{},"f":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"u":{"docs":{},"s":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"b":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"e":{"docs":{},"_":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{},"_":{"docs":{},"b":{"docs":{},"o":{"docs":{},"x":{"docs":{},"_":{"docs":{},"c":{"docs":{},"l":{"docs":{},"o":{"docs":{},"s":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}}}}}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}}}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}},"w":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}}}},"d":{"docs":{},")":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":10}},"的":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":10}}}}}}}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},":":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}},"h":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},":":{"3":{"0":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}},"docs":{}},"5":{"0":{"docs":{},",":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}},"docs":{}},"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.025974025974025976},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.016483516483516484},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.02127659574468085},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.027777777777777776},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},",":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},":":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":10}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":10}}}}}},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":10}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"\"":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"类":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"l":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":10}}}}},"m":{"docs":{},"l":{"docs":{},"标":{"docs":{},"签":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}},"a":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}},"s":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.021505376344086023},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},":":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}},"h":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}},"n":{"docs":{},"d":{"docs":{},"l":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"e":{"docs":{},"r":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},":":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}}}}},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"_":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":10}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.016},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.016},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.031746031746031744},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.057971014492753624},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.025},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.025157232704402517},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.03225806451612903},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.027210884353741496},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.03773584905660377},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.03389830508474576},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.03225806451612903},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.025},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.043478260869565216},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},"s":{"docs":{},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/segment.html":{"ref":"case/segment.html","tf":0.018691588785046728},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.018691588785046728},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.03389830508474576},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}},"[":{"docs":{},"]":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}},"c":{"docs":{},"r":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},":":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}}}}},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}},")":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}},".":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}},"d":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571}},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.06976744186046512}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}},"i":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}}}}}},"i":{"docs":{},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}}}}},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"p":{"docs":{},"a":{"docs":{},"r":{"docs":{},"a":{"docs":{},"m":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}},"f":{"docs":{},"i":{"docs":{},"e":{"docs":{},"l":{"docs":{},"d":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}},"s":{"docs":{},"d":{"docs":{},"e":{"docs":{},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"e":{"docs":{},"d":{"docs":{},"a":{"docs":{},"d":{"docs":{},"j":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}}}}}}}},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"m":{"docs":{},"e":{"docs":{},"r":{"docs":{},"g":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"v":{"docs":{},"i":{"docs":{},"s":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}}},"s":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"n":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"a":{"docs":{},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"启":{"docs":{},"用":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}},"y":{"docs":{},"n":{"docs":{},"c":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"l":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"h":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"(":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"o":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"n":{"docs":{},"c":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}}}}}}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"o":{"docs":{},"t":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"a":{"docs":{},"l":{"docs":{},"d":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"r":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"d":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"l":{"docs":{},"s":{"1":{"docs":{},":":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105}}}},"docs":{},":":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},":":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.031007751937984496}}}}}}}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":10}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":10}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":10}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}},"的":{"docs":{},"类":{"docs":{},"名":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}},"m":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"e":{"docs":{},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":10}}}}}}}}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.03896103896103896}}},"_":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"_":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":10}}}}}}}}}}}}}}}}}}}}}}},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}}}}},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}},":":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":10}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"l":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"s":{"docs":{},":":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":10}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":10}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":10}}}}},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},":":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}},"z":{"docs":{},"y":{"docs":{},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":10}}}}}}}}}},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0392156862745098}},"e":{"docs":{},"r":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":10}}}}}},"g":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"i":{"docs":{},"n":{"docs":{},"e":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}},"_":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"面":{"docs":{},"板":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}}}}}},"_":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":10}}}}}}}}}}},"n":{"docs":{},"u":{"docs":{},"m":{"docs":{},"b":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.06451612903225806},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.07058823529411765},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.06896551724137931},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.06593406593406594},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.046153846153846156},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.0759493670886076},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.06521739130434782},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.08333333333333333},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.038461538461538464},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0425531914893617},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0375},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014423076923076924},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.027649769585253458},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.047058823529411764},"base/label.html":{"ref":"base/label.html","tf":0.053691275167785234},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.0625},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.04716981132075472},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.032432432432432434},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.03626943005181347},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.038461538461538464},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.03608247422680412},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.040229885057471264},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.04081632653061224},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.05426356589147287},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.058823529411764705},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.07476635514018691},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.09090909090909091},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0851063829787234},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.07407407407407407},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.07476635514018691},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.016574585635359115},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.018604651162790697},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.08247422680412371},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.08080808080808081},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0784313725490196},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.058823529411764705}},",":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.02564102564102564}}}}}}}},"/":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}},"b":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"n":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"c":{"docs":{},"_":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":10.017241379310345}}}}}}}}}}}}}},"l":{"docs":{},"l":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"core/single.html":{"ref":"core/single.html","tf":0.05555555555555555},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.020618556701030927},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.020202020202020204},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0196078431372549},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},")":{"docs":{},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"e":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"w":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"s":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"c":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}}}}}}}}}}}}}}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"m":{"docs":{},"a":{"docs":{},"l":{"docs":{},",":{"docs":{},"n":{"docs":{},"o":{"docs":{},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":10}}}}}}}}},":":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"\"":{"docs":{},")":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}},"e":{"docs":{},"d":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"\"":{"docs":{},")":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}}}}}}}}}}}}},"w":{"docs":{},"r":{"docs":{},"a":{"docs":{},"p":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"w":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"g":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":10}}}}},"m":{"docs":{},"e":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}},",":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.03896103896103896}}}}}}},"r":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"o":{"docs":{},"w":{"2":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},")":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571}}},"s":{"docs":{},":":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"i":{"docs":{},"z":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"e":{"docs":{},":":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}},"e":{"docs":{},"r":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}},"o":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"e":{"docs":{},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},"e":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}},"a":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}},"e":{"docs":{},"t":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"d":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"i":{"docs":{},"z":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":10}}}}}}}},"e":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":10}}}}}}}}}}}},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.018867924528301886},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"h":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}}}}}}},"c":{"docs":{},"t":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":10.01923076923077}}}}}}}}}}}}}},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{},"u":{"docs":{},"s":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.02564102564102564},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.023529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.03076923076923077},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.021739130434782608},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.03571428571428571},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.016483516483516484},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0273972602739726},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.027777777777777776},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.026143790849673203},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.025},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.03508771929824561},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.05},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.05405405405405406},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.06756756756756757},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/segment.html":{"ref":"case/segment.html","tf":0.037383177570093455},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.0425531914893617},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.05555555555555555},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.037383177570093455},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.04054054054054054},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.031578947368421054},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.022099447513812154},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.07692307692307693},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.06976744186046512}}},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":10}}}}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}},":":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}},":":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}}},"_":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":10}}}}}}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":10}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":10}}}}}}},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":10}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014423076923076924},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.017045454545454544},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655}},",":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.02631578947368421},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.01818181818181818},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.03365384615384615},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.025157232704402517},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.01764705882352941},"core/widget.html":{"ref":"core/widget.html","tf":0.02040816326530612},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.07142857142857142},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/button/button.html":{"ref":"base/button/button.html","tf":0.03409090909090909},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.04},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.05202312138728324},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}},";":{"docs":{},"}":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},"}":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}},"/":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}}}}},"e":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},".":{"docs":{},"i":{"docs":{},"n":{"docs":{},"i":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"(":{"docs":{},"{":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},")":{"docs":{},";":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":10}}}}}}}}}},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.038461538461538464},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.03225806451612903},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.03529411764705882},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.034482758620689655},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.03296703296703297},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.05384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.0379746835443038},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.03260869565217391},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.037037037037037035},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.027777777777777776},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0379746835443038},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.04477611940298507},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.043478260869565216},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.04316546762589928},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.025},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.02197802197802198},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0273972602739726},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.023529411764705882},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.027777777777777776},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.032679738562091505},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.03125},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.05263157894736842},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.04838709677419355},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.04838709677419355},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.028901734104046242},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.028037383177570093},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.05319148936170213},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.06481481481481481},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.027624309392265192},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.019736842105263157},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}}},"o":{"docs":{},"p":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"(":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},")":{"docs":{},",":{"docs":{},"(":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{},",":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}}}}}}}}}}}}}}}}}}}},"g":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"o":{"docs":{},"l":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}},"位":{"docs":{},"置":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":10},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}},"提":{"docs":{},"示":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}},"a":{"docs":{},"b":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":10.006849315068493},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},"l":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":10},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}},"e":{"docs":{},"作":{"docs":{},"为":{"docs":{},"一":{"docs":{},"个":{"docs":{},"列":{"docs":{},"表":{"docs":{},"集":{"docs":{},"合":{"docs":{},"存":{"docs":{},"在":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}}}}}}}}}}}}}}}}}},"_":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":10}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"完":{"docs":{},"成":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}},"大":{"docs":{},"小":{"docs":{},"调":{"docs":{},"整":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"窗":{"docs":{},"口":{"docs":{},"变":{"docs":{},"化":{"docs":{},"等":{"docs":{},")":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}}},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}},"页":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}},"标":{"docs":{},"签":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"d":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":10}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}},"e":{"docs":{},"文":{"docs":{},"本":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.06382978723404255}},"o":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776}}}}}},"类":{"docs":{},"型":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}},":":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}},"s":{"docs":{},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}}}}}}},"h":{"docs":{},"i":{"docs":{},"s":{"docs":{},".":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},",":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}}}}}}}}}}}}},"v":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.03597122302158273},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.02},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314}},"e":{"docs":{},"r":{"docs":{},"t":{"docs":{},"i":{"docs":{},"c":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":10},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"a":{"docs":{},"l":{"docs":{},"a":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}},"_":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":10}}}}}}}},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"s":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}},":":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},":":{"1":{"0":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}},"docs":{}},"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":10}}}}}},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.029850746268656716},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010810810810810811},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.0379746835443038},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.020202020202020204},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.03389830508474576},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.021505376344086023},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"e":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}},"可":{"docs":{},"以":{"docs":{},"是":{"docs":{},"单":{"docs":{},"个":{"docs":{},"值":{"docs":{},"也":{"docs":{},"可":{"docs":{},"以":{"docs":{},"是":{"docs":{},"个":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.023809523809523808},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.04477611940298507},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748}}}}}}}}}}}}}}}},":":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.023622047244094488},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.027777777777777776},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.023255813953488372},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0375},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.04054054054054054},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.05405405405405406},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.028037383177570093},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.039473684210526314},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.039473684210526314},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.07692307692307693},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.06976744186046512}}},"值":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992}}},")":{"docs":{},"{":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}},"i":{"docs":{},"d":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}}}}}},"r":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"i":{"docs":{},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":10}}}}}}},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":10}}}}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}}}}}}},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}},":":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}},"{":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.048},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.048},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.06493506493506493},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.0625},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02877697841726619},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.025},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014423076923076924},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.027472527472527472},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.031446540880503145},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.013824884792626729},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0375},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.03424657534246575},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.01764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.047619047619047616},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.023121387283236993},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.031007751937984496},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0375},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.04054054054054054},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.02702702702702703},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/segment.html":{"ref":"case/segment.html","tf":0.028037383177570093},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.031914893617021274},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.038461538461538464},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.04},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744}},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{},"e":{"docs":{},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.024},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.06493506493506493},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.03614457831325301},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014388489208633094},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}},"\"":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"\"":{"docs":{},",":{"docs":{},"h":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"1":{"0":{"docs":{},",":{"docs":{},"v":{"docs":{},"g":{"docs":{},"a":{"docs":{},"p":{"docs":{},":":{"0":{"docs":{},"}":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"docs":{}}}}}}}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.05357142857142857}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}},"e":{"docs":{},"l":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}},"}":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}},",":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.06},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.07692307692307693},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}}}}},"}":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{},":":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},":":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"y":{"docs":{},":":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"}":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}}}}}}}}},"}":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"}":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806}}}}}}}}}}}}}}}},"o":{"docs":{},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}},"g":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},":":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.057692307692307696}}}}}}}}},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}},"}":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.032},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.032},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.044642857142857144},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.016483516483516484},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.025},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.02054794520547945},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.022727272727272728},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.08},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}},")":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.025},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.02054794520547945},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}},";":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.06060606060606061},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.041666666666666664},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},")":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}},",":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},",":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.016},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.016},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.023076923076923078},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.05194805194805195},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.025},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.02702702702702703},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.02702702702702703},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/segment.html":{"ref":"case/segment.html","tf":0.028037383177570093},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.031914893617021274},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.046296296296296294},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.028037383177570093},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02702702702702703},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.021052631578947368},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.02631578947368421},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.038461538461538464},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.04},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744}},"{":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"s":{"docs":{},":":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}},"]":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014388489208633094},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.02702702702702703},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.019736842105263157},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}},",":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.015384615384615385},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}},"}":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}},";":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}},"]":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}},",":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684}}}}},";":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}},"—":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.07692307692307693},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.07526881720430108},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.056},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.056},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.08235294117647059},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.08045977011494253},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.07692307692307693},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.06153846153846154},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.0759493670886076},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.07608695652173914},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.07407407407407407},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.09722222222222222},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.0759493670886076},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.026785714285714284},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.09523809523809523},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.08955223880597014},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.057971014492753624},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.06474820143884892},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.11538461538461539},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.11347517730496454},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.1},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.09134615384615384},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.07142857142857142},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.03937007874015748},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.11949685534591195},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.09352517985611511},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.14285714285714285},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.15625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.1111111111111111},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.1},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.05555555555555555},"core/widget.html":{"ref":"core/widget.html","tf":0.17346938775510204},"core/single.html":{"ref":"core/single.html","tf":0.125},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.1349206349206349},"core/node_button.html":{"ref":"core/node_button.html","tf":0.13157894736842105},"core/pane.html":{"ref":"core/pane.html","tf":0.17647058823529413},"base/label.html":{"ref":"base/label.html","tf":0.12751677852348994},"base/bubble.html":{"ref":"base/bubble.html","tf":0.06976744186046512},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/button/button.html":{"ref":"base/button/button.html","tf":0.11931818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.11320754716981132},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.07692307692307693},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.1044776119402985},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.12972972972972974},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.11392405063291139},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.1076923076923077},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.10869565217391304},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.1111111111111111},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.0880503144654088},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.06140350877192982},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.05228758169934641},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.05},"base/pager.html":{"ref":"base/pager.html","tf":0.12},"base/svg.html":{"ref":"base/svg.html","tf":0.033707865168539325},"base/canvas.html":{"ref":"base/canvas.html","tf":0.05},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.08771929824561403},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.08064516129032258},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.08064516129032258},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.13471502590673576},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.14285714285714285},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.13917525773195877},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.14942528735632185},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.10752688172043011},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.16326530612244897},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.06349206349206349},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.10377358490566038},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.13559322033898305},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.0967741935483871},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.0967741935483871},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.10404624277456648},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.11627906976744186},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.075},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.06756756756756757},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.05405405405405406},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.04242424242424243},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.03571428571428571},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.03571428571428571},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.058823529411764705},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.09016393442622951},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.07692307692307693},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.102803738317757},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.125},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.11702127659574468},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.10185185185185185},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.102803738317757},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.10810810810810811},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.08421052631578947},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.08839779005524862},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.05581395348837209},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.16494845360824742},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.16161616161616163},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.1568627450980392},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.05405405405405406},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.08695652173913043},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},"参":{"docs":{},"数":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.02830188679245283},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.03225806451612903},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.03225806451612903},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.06},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.04411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.02459016393442623},"case/calendar.html":{"ref":"case/calendar.html","tf":0.041666666666666664},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.08823529411764706},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.02027027027027027},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.015789473684210527},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.11764705882352941},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.05405405405405406},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.06451612903225806},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.03389830508474576},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.038461538461538464},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.04},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.038461538461538464},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.08695652173913043},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.08823529411764706}},"设":{"docs":{},"置":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"显":{"docs":{},"示":{"docs":{},"值":{"docs":{},"构":{"docs":{},"造":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}},"考":{"docs":{},"相":{"docs":{},"关":{"docs":{},"c":{"docs":{},"s":{"docs":{},"s":{"docs":{},"属":{"docs":{},"性":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"类":{"docs":{},"型":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}}},"可":{"docs":{},"选":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}}}},"以":{"docs":{},"合":{"docs":{},"并":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},",":{"docs":{},"指":{"docs":{},"定":{"docs":{},"行":{"docs":{},"列":{"docs":{},"可":{"docs":{},"以":{"docs":{},"删":{"docs":{},"除":{"docs":{},"看":{"docs":{},"不":{"docs":{},"见":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"的":{"docs":{},"一":{"docs":{},"行":{"docs":{},"文":{"docs":{},"字":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}}}}}}}},"理":{"docs":{},"解":{"docs":{},"为":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},"和":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"两":{"docs":{},"个":{"docs":{},"面":{"docs":{},"板":{"docs":{},"的":{"docs":{},"结":{"docs":{},"合":{"docs":{},"体":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"单":{"docs":{},"选":{"docs":{},"多":{"docs":{},"选":{"docs":{},"切":{"docs":{},"换":{"docs":{},"的":{"docs":{},"树":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}}}}}}}}}}},"调":{"docs":{},"整":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"的":{"docs":{},"g":{"docs":{},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{},"表":{"docs":{},"格":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}}}}}}}}}}}}}}}}}}}}}}},"垂":{"docs":{},"直":{"docs":{},"流":{"docs":{},"式":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"两":{"docs":{},"列":{"docs":{},"定":{"docs":{},"高":{"docs":{},",":{"docs":{},"一":{"docs":{},"列":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008}}}}}}}}}}}}}}}}}}}}},"基":{"docs":{},"础":{"docs":{},"属":{"docs":{},"性":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}},"元":{"docs":{},"素":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}},"用":{"docs":{},"法":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}}}},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}}}}}}}}},"本":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}}}}},"效":{"docs":{},"果":{"docs":{},"相":{"docs":{},"当":{"docs":{},"于":{"docs":{},"容":{"docs":{},"器":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}},"上":{"docs":{},"下":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"b":{"docs":{},"o":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}},"t":{"docs":{},"o":{"docs":{},"p":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}},"上":{"docs":{},"下":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},",":{"docs":{},"如":{"docs":{},"果":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"属":{"docs":{},"性":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"该":{"docs":{},"属":{"docs":{},"性":{"docs":{},"值":{"docs":{},"置":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"类":{"docs":{},"型":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},"似":{"docs":{},"e":{"docs":{},"x":{"docs":{},"c":{"docs":{},"e":{"docs":{},"l":{"docs":{},"式":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}}}}}}}}}}},"设":{"docs":{},"置":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282}}}}}}}}}}}},"水":{"docs":{},"平":{"docs":{},"方":{"docs":{},"向":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}}}}}}}}}},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}},"e":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}},"可":{"docs":{},"用":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}},"未":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}},"选":{"docs":{},"中":{"docs":{},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"列":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"是":{"docs":{},"否":{"docs":{},"显":{"docs":{},"示":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}},"行":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}},"每":{"docs":{},"个":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"和":{"docs":{},"宽":{"docs":{},"高":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}},"文":{"docs":{},"本":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"值":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}},"项":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}},"z":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}},"t":{"docs":{},"a":{"docs":{},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"宽":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"属":{"docs":{},"性":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"无":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"有":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"有":{"docs":{},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"高":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"错":{"docs":{},"误":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}},"可":{"docs":{},"见":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}},"样":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"框":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}},"样":{"docs":{},"式":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}},"域":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}},"样":{"docs":{},"式":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}}},"节":{"docs":{},"点":{"docs":{},"展":{"docs":{},"开":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}},"标":{"docs":{},"红":{"docs":{},"的":{"docs":{},"关":{"docs":{},"键":{"docs":{},"词":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}},"题":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}},"高":{"docs":{},"度":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"图":{"docs":{},"片":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"按":{"docs":{},"钮":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}},"函":{"docs":{},"数":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}},"字":{"docs":{},"段":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"右":{"docs":{},"往":{"docs":{},"左":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"开":{"docs":{},"闭":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"的":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}},"左":{"docs":{},"到":{"docs":{},"右":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"开":{"docs":{},"闭":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},"的":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"d":{"docs":{},"i":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"分":{"docs":{},"页":{"docs":{},"键":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"表":{"docs":{},"头":{"docs":{},"的":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}},"宽":{"docs":{},"度":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"属":{"docs":{},"性":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},"码":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353}}}},"选":{"docs":{},"中":{"docs":{},"项":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"值":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"画":{"docs":{},"布":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"尺":{"docs":{},"寸":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}},"全":{"docs":{},"选":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}},"计":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"页":{"docs":{},"码":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}},"横":{"docs":{},"向":{"docs":{},"分":{"docs":{},"页":{"docs":{},"键":{"docs":{},"可":{"docs":{},"见":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}},"储":{"docs":{},"存":{"docs":{},"的":{"docs":{},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}},"数":{"docs":{},"值":{"docs":{},"区":{"docs":{},"间":{"docs":{},"的":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"提":{"docs":{},"示":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}},"定":{"docs":{},"的":{"docs":{},"年":{"docs":{},"份":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"月":{"docs":{},"份":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"说":{"docs":{},"明":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.024096385542168676},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.03571428571428571},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.028985507246376812},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.014388489208633094},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.019230769230769232},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.02127659574468085},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.025},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.014423076923076924},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.016483516483516484},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.01875},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.037037037037037035},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"core/widget.html":{"ref":"core/widget.html","tf":0.015306122448979591},"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.015873015873015872},"core/node_button.html":{"ref":"core/node_button.html","tf":0.05263157894736842},"core/pane.html":{"ref":"core/pane.html","tf":0.0392156862745098},"base/label.html":{"ref":"base/label.html","tf":0.020134228187919462},"base/bubble.html":{"ref":"base/bubble.html","tf":0.046511627906976744},"base/toast.html":{"ref":"base/toast.html","tf":0.041666666666666664},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.017045454545454544},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.02830188679245283},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.05128205128205128},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.016216216216216217},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.02531645569620253},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.046153846153846156},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.043478260869565216},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.020202020202020204},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.018867924528301886},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.017543859649122806},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.013071895424836602},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.0125},"base/pager.html":{"ref":"base/pager.html","tf":0.02},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.03508771929824561},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.03225806451612903},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.03225806451612903},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.015544041450777202},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.016483516483516484},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.015463917525773196},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.017241379310344827},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.03225806451612903},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.018867924528301886},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.021505376344086023},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.04},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.011560693641618497},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.025},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.02702702702702703},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.02702702702702703},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.044444444444444446},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.03571428571428571},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.04081632653061224},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.029411764705882353},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"case/calendar.html":{"ref":"case/calendar.html","tf":0.027777777777777776},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.08823529411764706},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.03260869565217391},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.013513513513513514},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.011049723756906077},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.020202020202020204},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0196078431372549},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.05172413793103448},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.06451612903225806},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.05084745762711865},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.03773584905660377},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.04081632653061224},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.04081632653061224},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.058823529411764705}}}},"默":{"docs":{},"认":{"docs":{},"值":{"docs":{"core/layout/vertical.html":{"ref":"core/layout/vertical.html","tf":0.01282051282051282},"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02},"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232},"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"docs":{}}}},"相":{"docs":{},"等":{"docs":{},"时":{"docs":{},"合":{"docs":{},"并":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"]":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232},"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},":":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.021505376344086023},"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.024},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.022988505747126436},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.02197802197802198},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304},"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.024691358024691357},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.025974025974025976},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":10}}}}}}},"h":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}},"e":{"docs":{},":":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.02531645569620253},"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.02531645569620253}}}}}}}}}}}},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},":":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},":":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}},"'":{"docs":{},"请":{"docs":{},"输":{"docs":{},"入":{"docs":{},"公":{"docs":{},"式":{"docs":{},"'":{"docs":{},",":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}},"\"":{"docs":{},"请":{"docs":{},"输":{"docs":{},"入":{"docs":{},"内":{"docs":{},"容":{"docs":{},"\"":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}}}}}}},"搜":{"docs":{},"索":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102}}}}}},"带":{"docs":{},"清":{"docs":{},"除":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},"\"":{"docs":{},",":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}}}}}}}}}}}}}}}},"元":{"docs":{},"素":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"的":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"对":{"docs":{},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}},"内":{"docs":{},"空":{"docs":{},"白":{"docs":{},"处":{"docs":{},"理":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}}},"的":{"docs":{},"空":{"docs":{},"白":{"docs":{},"处":{"docs":{},"理":{"docs":{},"方":{"docs":{},"式":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}},"创":{"docs":{},"造":{"docs":{},"器":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}}}},"每":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"所":{"docs":{},"组":{"docs":{},"成":{"docs":{},"的":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012},"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941},"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218},"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}}}}},"格":{"docs":{},"列":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}},"行":{"docs":{},"宽":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}},"水":{"docs":{},"平":{"docs":{},"流":{"docs":{},"式":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal.html":{"ref":"core/layout/horizontal.html","tf":0.010752688172043012}}}}}},"t":{"docs":{},"a":{"docs":{},"p":{"docs":{},"e":{"docs":{},"布":{"docs":{},"局":{"docs":{},",":{"docs":{},"两":{"docs":{},"列":{"docs":{},"定":{"docs":{},"宽":{"docs":{},",":{"docs":{},"一":{"docs":{},"列":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008}}}}}}}}}}}}}}}}}}},"和":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"都":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{},",":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}}}}}}}}}}}}},"方":{"docs":{},"向":{"docs":{},"居":{"docs":{},"中":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/horizontal_auto.html":{"ref":"core/layout/horizontal_auto.html","tf":0.012345679012345678}}}}}}}}}}},"分":{"docs":{},"页":{"docs":{},"选":{"docs":{},"项":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"印":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}},":":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.08},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.08},"base/message.html":{"ref":"base/message.html","tf":0.06382978723404255},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"子":{"docs":{},"控":{"docs":{},"件":{"docs":{},"数":{"docs":{},"组":{"docs":{"core/layout/htape.html":{"ref":"core/layout/htape.html","tf":0.008},"core/layout/vtape.html":{"ref":"core/layout/vtape.html","tf":0.008},"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099},"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693},"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888},"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},"对":{"docs":{},"象":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}},"项":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}},"数":{"docs":{},"组":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"创":{"docs":{},"建":{"docs":{},"函":{"docs":{},"数":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}},",":{"docs":{},"p":{"docs":{},"i":{"docs":{},"d":{"docs":{},"代":{"docs":{},"表":{"docs":{},"父":{"docs":{},"节":{"docs":{},"点":{"docs":{},"i":{"docs":{},"d":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"数":{"docs":{},"组":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}},"二":{"docs":{},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"左":{"docs":{},"右":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/center_adapt.html":{"ref":"core/layout/center_adapt.html","tf":0.011764705882352941}}}}}}}},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"垂":{"docs":{},"直":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/vertical_adapt.html":{"ref":"core/layout/vertical_adapt.html","tf":0.011494252873563218}}}}}}}},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}}}}},"定":{"docs":{},"义":{"docs":{},"列":{"docs":{},"表":{"docs":{},"中":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"项":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},",":{"docs":{},"如":{"docs":{},"高":{"docs":{},"亮":{"docs":{},",":{"docs":{},"标":{"docs":{},"红":{"docs":{},"等":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.015873015873015872},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}},"树":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}}}}}}}}}}}}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}},"列":{"docs":{},"表":{"docs":{},"中":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"项":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},",":{"docs":{},"如":{"docs":{},"高":{"docs":{},"亮":{"docs":{},",":{"docs":{},"标":{"docs":{},"红":{"docs":{},"等":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"(":{"docs":{},"详":{"docs":{},"见":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},")":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}},"年":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"的":{"docs":{},"行":{"docs":{},"为":{"docs":{},"(":{"docs":{},"详":{"docs":{},"见":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"_":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},")":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.06451612903225806}}}}}}}}}}}}}}}}}}}}}}}}}}}},"右":{"docs":{},"边":{"docs":{},"容":{"docs":{},"器":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"初":{"docs":{},"始":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}},"左":{"docs":{},"右":{"docs":{},"分":{"docs":{},"离":{"docs":{},",":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"方":{"docs":{},"向":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}},"边":{"docs":{},"容":{"docs":{},"器":{"docs":{},"l":{"docs":{},"e":{"docs":{},"f":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}},"左":{"docs":{},"右":{"docs":{},"p":{"docs":{},"a":{"docs":{},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"值":{"docs":{"core/layout/left_right_vertical_adapt.html":{"ref":"core/layout/left_right_vertical_adapt.html","tf":0.01098901098901099}}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"初":{"docs":{},"始":{"docs":{},"状":{"docs":{},"态":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}},"靠":{"docs":{},"左":{"docs":{},"/":{"docs":{},"右":{"docs":{},"对":{"docs":{},"齐":{"docs":{},"的":{"docs":{},"自":{"docs":{},"由":{"docs":{},"浮":{"docs":{},"动":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/flow.html":{"ref":"core/layout/flow.html","tf":0.007692307692307693}}}}}}}}}}}}}}},"非":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},",":{"docs":{},"用":{"docs":{},"于":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"高":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},"的":{"docs":{},"面":{"docs":{},"板":{"docs":{"core/layout/center.html":{"ref":"core/layout/center.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}},"/":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}},"/":{"7":{"docs":{},"表":{"docs":{},"示":{"docs":{},"八":{"docs":{},"月":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},":":{"docs":{"core/layout/horizontal_adapt.html":{"ref":"core/layout/horizontal_adapt.html","tf":0.010869565217391304}}}}}}}},"必":{"docs":{},"选":{"docs":{},"项":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}}}},"最":{"docs":{},"大":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"小":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}}},"浮":{"docs":{},"动":{"docs":{},"的":{"docs":{},"水":{"docs":{},"平":{"docs":{},"居":{"docs":{},"中":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/horizontal_float.html":{"ref":"core/layout/horizontal_float.html","tf":0.013888888888888888}}}}}}}}},"布":{"docs":{},"局":{"docs":{},"实":{"docs":{},"现":{"docs":{},"的":{"docs":{},"居":{"docs":{},"中":{"docs":{},"容":{"docs":{},"器":{"docs":{"core/layout/float_center.html":{"ref":"core/layout/float_center.html","tf":0.012658227848101266}}}}}}}}}}}}},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988},"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.02158273381294964},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.015748031496062992},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.018433179723502304},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.01875},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.011764705882352941},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.031746031746031744},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.015503875968992248},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.04},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.038461538461538464},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.013953488372093023},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.06451612903225806},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}},"(":{"docs":{},"{":{"docs":{},"y":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},":":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}}}},"e":{"docs":{},"j":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"p":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}},"e":{"docs":{},"n":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}},":":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},".":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}},"x":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"s":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"c":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"p":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}}},"f":{"docs":{},"f":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},":":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}},"n":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"c":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"e":{"docs":{},":":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.014388489208633094}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"i":{"docs":{},"n":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"上":{"docs":{},"下":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},"/":{"docs":{},"左":{"docs":{},"右":{"docs":{},"的":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"固":{"docs":{},"定":{"docs":{},",":{"docs":{},"中":{"docs":{},"间":{"docs":{},"的":{"docs":{},"高":{"docs":{},"度":{"docs":{},"/":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"core/layout/border.html":{"ref":"core/layout/border.html","tf":0.012987012987012988}}}}}}}}}}}}}}}}}}}}}}}}}}}},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"传":{"docs":{},"结":{"docs":{},"束":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}},"过":{"docs":{},"程":{"docs":{},"中":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}},"列":{"docs":{},"数":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"项":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}},"间":{"docs":{},"的":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"宽":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.010526315789473684}},",":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}},"数":{"docs":{},"组":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}},"表":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}},"展":{"docs":{},"示":{"docs":{},"的":{"docs":{},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}}}}}}}}}}}}}}}}}},"创":{"docs":{},"建":{"docs":{},"器":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}},"最":{"docs":{},"前":{"docs":{},"添":{"docs":{},"加":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}},"后":{"docs":{},"添":{"docs":{},"加":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}}},"网":{"docs":{},"格":{"docs":{},"布":{"docs":{},"局":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}}}}},"行":{"docs":{},"数":{"docs":{"core/layout/grid.html":{"ref":"core/layout/grid.html","tf":0.008928571428571428}}},"高":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}},"宽":{"docs":{},",":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"内":{"docs":{},"部":{"docs":{},"元":{"docs":{},"素":{"docs":{},"间":{"docs":{},"横":{"docs":{},"向":{"docs":{},"距":{"docs":{},"离":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}},"纵":{"docs":{},"向":{"docs":{},"距":{"docs":{},"离":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}}}},"前":{"docs":{},"插":{"docs":{},"入":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}},"后":{"docs":{},"插":{"docs":{},"入":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}},"容":{"docs":{},"项":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}},"增":{"docs":{},"加":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"内":{"docs":{},"容":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"行":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}},"项":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}},"方":{"docs":{},"法":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.046511627906976744},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"名":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}},"是":{"docs":{},"否":{"docs":{},"出":{"docs":{},"现":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338}}}}}}},"显":{"docs":{},"示":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"阴":{"docs":{},"影":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"提":{"docs":{},"示":{"docs":{},"信":{"docs":{},"息":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"尾":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}},"首":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}},"阻":{"docs":{},"止":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"隐":{"docs":{},"藏":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"检":{"docs":{},"测":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}},"需":{"docs":{},"要":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"调":{"docs":{},"整":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}},"高":{"docs":{},"度":{"docs":{},"调":{"docs":{},"整":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}},"合":{"docs":{},"并":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"冻":{"docs":{},"结":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}},"列":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}},"表":{"docs":{},"头":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"调":{"docs":{},"整":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"列":{"docs":{},"宽":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}},"在":{"docs":{},"调":{"docs":{},"整":{"docs":{},"列":{"docs":{},"宽":{"docs":{},"或":{"docs":{},"区":{"docs":{},"域":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"时":{"docs":{},"候":{"docs":{},"它":{"docs":{},"们":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{},"变":{"docs":{},"化":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}}}}},"表":{"docs":{},"尾":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}},"默":{"docs":{},"认":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"子":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"数":{"docs":{},"据":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}},"显":{"docs":{},"示":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}},"为":{"docs":{},"单":{"docs":{},"页":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}},"最":{"docs":{},"大":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"小":{"docs":{},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}}}},"匹":{"docs":{},"配":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"正":{"docs":{},"在":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"自":{"docs":{},"动":{"docs":{},"同":{"docs":{},"步":{"docs":{},"数":{"docs":{},"据":{"docs":{},",":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"停":{"docs":{},"止":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"、":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{},"u":{"docs":{},"p":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}},"向":{"docs":{},"上":{"docs":{},"冒":{"docs":{},"泡":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}}}}}}}}}}}}}}}}}}},"有":{"docs":{},"匹":{"docs":{},"配":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.013605442176870748},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.021505376344086023},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.021505376344086023},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"前":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}},"可":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}}},"见":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306}}},"改":{"docs":{},"变":{"docs":{},"列":{"docs":{},"大":{"docs":{},"小":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061}}}}}}}},"只":{"docs":{},"读":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.027777777777777776},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}},"允":{"docs":{},"许":{"docs":{},"点":{"docs":{},"击":{"docs":{},"一":{"docs":{},"次":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"含":{"docs":{},"有":{"docs":{},"遮":{"docs":{},"罩":{"docs":{},"层":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}},"数":{"docs":{},"值":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"无":{"docs":{},"论":{"docs":{},"如":{"docs":{},"何":{"docs":{},"都":{"docs":{},"要":{"docs":{},"居":{"docs":{},"中":{"docs":{},",":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}},"去":{"docs":{},"掉":{"docs":{},"边":{"docs":{},"框":{"docs":{},"和":{"docs":{},"背":{"docs":{},"景":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}},"块":{"docs":{},"状":{"docs":{},"显":{"docs":{},"示":{"docs":{},",":{"docs":{},"即":{"docs":{},"不":{"docs":{},"显":{"docs":{},"示":{"docs":{},"边":{"docs":{},"框":{"docs":{},",":{"docs":{},"没":{"docs":{},"有":{"docs":{},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"限":{"docs":{},"制":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}}}}}}}}}}}}}}}}}}},"允":{"docs":{},"许":{"docs":{},"空":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}},"退":{"docs":{},"出":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}},"为":{"docs":{},"空":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"支":{"docs":{},"持":{"docs":{},"多":{"docs":{},"选":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}},"冻":{"docs":{},"结":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}},"列":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}}},"调":{"docs":{},"整":{"docs":{},"时":{"docs":{},"自":{"docs":{},"适":{"docs":{},"应":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"动":{"docs":{},"态":{"docs":{},"显":{"docs":{},"示":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{},"、":{"docs":{},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{},",":{"docs":{},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}},"、":{"docs":{},"首":{"docs":{},"页":{"docs":{},"、":{"docs":{},"尾":{"docs":{},"页":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}},"首":{"docs":{},"页":{"docs":{},"、":{"docs":{},"尾":{"docs":{},"页":{"docs":{},",":{"docs":{},"d":{"docs":{},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"全":{"docs":{},"选":{"docs":{},"中":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}},"更":{"docs":{},"换":{"docs":{},"新":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}},"改":{"docs":{},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}}}},"用":{"docs":{},"法":{"docs":{"core/layout/table.html":{"ref":"core/layout/table.html","tf":0.012048192771084338},"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}},"于":{"docs":{},"表":{"docs":{},"格":{"docs":{},"预":{"docs":{},"览":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}}}}}}}}}}}}}}}}},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"o":{"docs":{},"u":{"docs":{},"t":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}}}}}}}}}}}}}},"宽":{"docs":{},"度":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"选":{"docs":{},"框":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{},",":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"显":{"docs":{},"示":{"docs":{},"项":{"docs":{},"不":{"docs":{},"会":{"docs":{},"改":{"docs":{},"变":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}}}}}}}}}}}}}}}}}}}}}}}},"横":{"docs":{},"向":{"docs":{},"间":{"docs":{},"隙":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"超":{"docs":{},"出":{"docs":{},"可":{"docs":{},"视":{"docs":{},"范":{"docs":{},"围":{"docs":{},"区":{"docs":{},"域":{"docs":{},"预":{"docs":{},"加":{"docs":{},"载":{"docs":{},"的":{"docs":{},"数":{"docs":{},"量":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}}},"分":{"docs":{},"支":{"docs":{},"的":{"docs":{},"树":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02}}}}}},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.012121212121212121},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}}}},"坐":{"docs":{},"标":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}},"翻":{"docs":{},"页":{"docs":{},"设":{"docs":{},"置":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"间":{"docs":{},"隙":{"docs":{"core/layout/td.html":{"ref":"core/layout/td.html","tf":0.017857142857142856}}}},"超":{"docs":{},"出":{"docs":{},"可":{"docs":{},"视":{"docs":{},"范":{"docs":{},"围":{"docs":{},"区":{"docs":{},"域":{"docs":{},"预":{"docs":{},"加":{"docs":{},"载":{"docs":{},"的":{"docs":{},"数":{"docs":{},"量":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}}},"分":{"docs":{},"支":{"docs":{},"的":{"docs":{},"树":{"docs":{"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}},"页":{"docs":{},",":{"docs":{},"参":{"docs":{},"数":{"docs":{},"与":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"坐":{"docs":{},"标":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}},"翻":{"docs":{},"页":{"docs":{},"设":{"docs":{},"置":{"docs":{},",":{"docs":{},"参":{"docs":{},"数":{"docs":{},"与":{"docs":{},"h":{"docs":{},"o":{"docs":{},"r":{"docs":{},"i":{"docs":{},"z":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"l":{"docs":{},"相":{"docs":{},"同":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"y":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"w":{"docs":{},"h":{"docs":{},"e":{"docs":{},"n":{"docs":{},"h":{"docs":{},"i":{"docs":{},"d":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}}}}},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}}}}}}}}},"o":{"docs":{},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"c":{"docs":{},"h":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"h":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"w":{"docs":{},"n":{"docs":{},"_":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":10.006578947368421}}}}}}}}}}}}}}}},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},":":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}},"_":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":10}}},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":10.02}}}}}}}}}}}}}}}}}}}},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}},"e":{"docs":{},"d":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}},"\"":{"docs":{},",":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364}}}},":":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"e":{"docs":{},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}},"w":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":10}}}}}}}}}}},"a":{"docs":{},"l":{"docs":{},"o":{"docs":{},"g":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":10.043478260869565}}}}}}},"a":{"docs":{},"t":{"docs":{},"a":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":10.058823529411764}}}}}}},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":10.027027027027026}}}}}}}}}}}}}}}},"y":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},"}":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"b":{"docs":{},"l":{"docs":{},"c":{"docs":{},"l":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"c":{"docs":{},"s":{"docs":{},"h":{"docs":{},"o":{"docs":{},"w":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"f":{"docs":{},"i":{"docs":{},"r":{"docs":{},"s":{"docs":{},"t":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"v":{"docs":{},"n":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}},":":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"}":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},"}":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}}}}}}}}},"一":{"docs":{},"组":{"docs":{},"具":{"docs":{},"有":{"docs":{},"相":{"docs":{},"同":{"docs":{},"属":{"docs":{},"性":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{},"集":{"docs":{},"合":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"般":{"docs":{},"的":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"父":{"docs":{},"级":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936}}}}}}}}}}}}}}}}}}}}}}}},"刷":{"docs":{},"新":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}},"或":{"docs":{},"者":{"docs":{},"清":{"docs":{},"空":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}},"内":{"docs":{},"容":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}},"名":{"docs":{},"称":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.009615384615384616},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.01098901098901099},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"回":{"docs":{},"调":{"docs":{},"参":{"docs":{},"数":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.0125},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.01020408163265306},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}},"车":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"但":{"docs":{},"是":{"docs":{},"值":{"docs":{},"不":{"docs":{},"合":{"docs":{},"法":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"对":{"docs":{},"外":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385},"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}},"齐":{"docs":{},"方":{"docs":{},"式":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}},"向":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}},"话":{"docs":{},"框":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}},"内":{"docs":{},"容":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}}}},"标":{"docs":{},"题":{"docs":{"detailed/dialog.html":{"ref":"detailed/dialog.html","tf":0.043478260869565216}}}}}}},"布":{"docs":{},"局":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},"逻":{"docs":{},"辑":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}},"根":{"docs":{},"据":{"docs":{},"i":{"docs":{},"d":{"docs":{},"获":{"docs":{},"取":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"返":{"docs":{},"回":{"docs":{},"元":{"docs":{},"素":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{},"获":{"docs":{},"取":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"在":{"docs":{},"数":{"docs":{},"组":{"docs":{},"中":{"docs":{},"的":{"docs":{},"索":{"docs":{},"引":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}}}},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{},"获":{"docs":{},"取":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}},"制":{"docs":{},"定":{"docs":{},"参":{"docs":{},"数":{"docs":{},"打":{"docs":{},"印":{"docs":{},"出":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}},"值":{"docs":{},"获":{"docs":{},"取":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"索":{"docs":{},"引":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"节":{"docs":{},"点":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"节":{"docs":{},"点":{"docs":{},"所":{"docs":{},"在":{"docs":{},"方":{"docs":{},"向":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}}},"清":{"docs":{},"空":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}},"组":{"docs":{},"件":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"l":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}},"树":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}},"内":{"docs":{},"容":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}},"移":{"docs":{},"除":{"docs":{},"制":{"docs":{},"定":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}}}},"指":{"docs":{},"定":{"docs":{},"索":{"docs":{},"引":{"docs":{},"处":{"docs":{},"的":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"获":{"docs":{},"取":{"docs":{},"所":{"docs":{},"有":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}},"未":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}},"的":{"docs":{},"叶":{"docs":{},"子":{"docs":{},"节":{"docs":{},"点":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}},"叶":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}},"选":{"docs":{},"项":{"docs":{},"值":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}}},"没":{"docs":{},"有":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}}}},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/button_tree.html":{"ref":"core/abstract/button_tree.html","tf":0.014925373134328358},"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}}},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}},"最":{"docs":{},"大":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}},"最":{"docs":{},"大":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}},"选":{"docs":{},"中":{"docs":{},"的":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}},"导":{"docs":{},"航":{"docs":{},"页":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"项":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}},"搜":{"docs":{},"索":{"docs":{},"关":{"docs":{},"键":{"docs":{},"词":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}},"数":{"docs":{},"组":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"列":{"docs":{},"表":{"docs":{},"栏":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"面":{"docs":{},"板":{"docs":{},"页":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}},"g":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{},"y":{"docs":{},"p":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}}}}},"组":{"docs":{},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"宽":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"高":{"docs":{},"度":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"w":{"docs":{},"a":{"docs":{},"r":{"docs":{},"n":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}},"框":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"次":{"docs":{},"输":{"docs":{},"入":{"docs":{},"的":{"docs":{},"有":{"docs":{},"效":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}},"样":{"docs":{},"式":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"域":{"docs":{},"值":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}},"样":{"docs":{},"式":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}}},"件":{"docs":{},"名":{"docs":{},"称":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}},"图":{"docs":{},"片":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"错":{"docs":{},"误":{"docs":{},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"公":{"docs":{},"式":{"docs":{},"框":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"可":{"docs":{},"用":{"docs":{},"字":{"docs":{},"段":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"校":{"docs":{},"验":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"列":{"docs":{},"项":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"右":{"docs":{},"往":{"docs":{},"左":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"左":{"docs":{},"到":{"docs":{},"右":{"docs":{},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}}}},"横":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"浏":{"docs":{},"览":{"docs":{},"器":{"docs":{},"中":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"列":{"docs":{},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}}}}},"纵":{"docs":{},"向":{"docs":{},"滚":{"docs":{},"动":{"docs":{},"条":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}},"距":{"docs":{},"离":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"页":{"docs":{},"码":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}},"计":{"docs":{},"算":{"docs":{},"后":{"docs":{},"的":{"docs":{},"列":{"docs":{},"项":{"docs":{},"上":{"docs":{},"下":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}}},"间":{"docs":{},"隙":{"docs":{},"大":{"docs":{},"小":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{},"码":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.013333333333333334},"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"选":{"docs":{},"中":{"docs":{},"项":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}},"的":{"docs":{},"i":{"docs":{},"d":{"docs":{},"属":{"docs":{},"性":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"detailed/file_manager.html":{"ref":"detailed/file_manager.html","tf":0.023255813953488372}}}}}}}}}}}}}},"未":{"docs":{},"选":{"docs":{},"中":{"docs":{},"植":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}},"的":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}}}},"水":{"docs":{},"平":{"docs":{},"向":{"docs":{},"页":{"docs":{},"码":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.01639344262295082}}}}}}},"需":{"docs":{},"要":{"docs":{},"拷":{"docs":{},"贝":{"docs":{},"的":{"docs":{},"值":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}},"值":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}},"得":{"docs":{},"列":{"docs":{},"项":{"docs":{},"之":{"docs":{},"间":{"docs":{},"的":{"docs":{},"间":{"docs":{},"隙":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"计":{"docs":{},"算":{"docs":{},"后":{"docs":{},"的":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}},"值":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"case/trigger/text_trigger.html":{"ref":"case/trigger/text_trigger.html","tf":0.05263157894736842},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}},"所":{"docs":{},"以":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"有":{"docs":{},"叶":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"垂":{"docs":{},"直":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"水":{"docs":{},"平":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"当":{"docs":{},"前":{"docs":{},"值":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}}},"根":{"docs":{},"据":{"docs":{},"给":{"docs":{},"定":{"docs":{},"的":{"docs":{},"点":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"返":{"docs":{},"回":{"docs":{},"元":{"docs":{},"素":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.02247191011235955}}}}}}}}}}}}}}},"见":{"docs":{},"上":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936}}}},"选":{"docs":{},"择":{"docs":{},"类":{"docs":{},"型":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514}}}},"文":{"docs":{},"件":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}},"列":{"docs":{},"表":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}},"中":{"docs":{},"了":{"docs":{},"就":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"取":{"docs":{},"消":{"docs":{},",":{"docs":{},"与":{"docs":{},"o":{"docs":{},"n":{"docs":{},"c":{"docs":{},"e":{"docs":{},"的":{"docs":{},"区":{"docs":{},"别":{"docs":{},"是":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"e":{"docs":{},"d":{"docs":{},"不":{"docs":{},"影":{"docs":{},"响":{"docs":{},"事":{"docs":{},"件":{"docs":{},"的":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"状":{"docs":{},"态":{"docs":{},"下":{"docs":{},"是":{"docs":{},"否":{"docs":{},"显":{"docs":{},"示":{"docs":{},"阴":{"docs":{},"影":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"文":{"docs":{},"本":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}},"日":{"docs":{},"期":{"docs":{},"或":{"docs":{},"者":{"docs":{},"退":{"docs":{},"出":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142}}}}}}}}}}}}}},"的":{"docs":{},"初":{"docs":{},"始":{"docs":{},"年":{"docs":{},"月":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}},"色":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}},"弹":{"docs":{},"窗":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}},"销":{"docs":{},"毁":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/abstract/button_group.html":{"ref":"core/abstract/button_group.html","tf":0.007936507936507936},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"事":{"docs":{},"件":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}}},"优":{"docs":{},"化":{"docs":{},"过":{"docs":{},"的":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},"g":{"docs":{},"r":{"docs":{},"o":{"docs":{},"u":{"docs":{},"p":{"docs":{},",":{"docs":{},"删":{"docs":{},"除":{"docs":{},"看":{"docs":{},"不":{"docs":{},"见":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406}}}}}}}}}}}}}}}}}}}}}}}}}},"渲":{"docs":{},"染":{"docs":{},"列":{"docs":{},"表":{"docs":{"core/abstract/virtual_group.html":{"ref":"core/abstract/virtual_group.html","tf":0.014492753623188406},"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}},"组":{"docs":{},"件":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"开":{"docs":{},"启":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547}}}}}}}},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}}},"或":{"docs":{},"者":{"docs":{},"隐":{"docs":{},"藏":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"始":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"上":{"docs":{},"传":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}},"绘":{"docs":{},"制":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"构":{"docs":{},"造":{"docs":{},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}}},"生":{"docs":{},"成":{"docs":{},"树":{"docs":{},"方":{"docs":{},"法":{"docs":{"core/abstract/custom_tree.html":{"ref":"core/abstract/custom_tree.html","tf":0.007194244604316547},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}}}}}},"命":{"docs":{},"周":{"docs":{},"期":{"docs":{},"函":{"docs":{},"数":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}},"(":{"docs":{},")":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.018518518518518517},"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.0625},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364}}},"i":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},")":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},",":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}},"v":{"docs":{},")":{"docs":{"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.0136986301369863}}}},"注":{"docs":{},":":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"f":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"l":{"docs":{},"y":{"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}},"s":{"docs":{},"r":{"docs":{},"c":{"docs":{},",":{"docs":{},"x":{"docs":{},",":{"docs":{},"y":{"docs":{},",":{"docs":{},"w":{"docs":{},",":{"docs":{},"h":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"图":{"docs":{},"片":{"docs":{},"路":{"docs":{},"径":{"docs":{},",":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"原":{"docs":{},"点":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"画":{"docs":{},"布":{"docs":{},"宽":{"docs":{},"高":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}},"x":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}},"y":{"docs":{},")":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.02247191011235955}}},",":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"半":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}},"x":{"docs":{},",":{"docs":{},"r":{"docs":{},"y":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"原":{"docs":{},"点":{"docs":{},"的":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"水":{"docs":{},"平":{"docs":{},"半":{"docs":{},"径":{"docs":{},"和":{"docs":{},"垂":{"docs":{},"直":{"docs":{},"半":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"原":{"docs":{},"点":{"docs":{},"横":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"以":{"docs":{},"及":{"docs":{},"要":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"内":{"docs":{},"容":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"w":{"docs":{},",":{"docs":{},"h":{"docs":{},",":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"左":{"docs":{},"上":{"docs":{},"角":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{},"、":{"docs":{},"以":{"docs":{},"及":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"的":{"docs":{},"圆":{"docs":{},"角":{"docs":{},"b":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"左":{"docs":{},"上":{"docs":{},"角":{"docs":{},"的":{"docs":{},"横":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"、":{"docs":{},"纵":{"docs":{},"坐":{"docs":{},"标":{"docs":{},",":{"docs":{},"矩":{"docs":{},"形":{"docs":{},"宽":{"docs":{},"、":{"docs":{},"高":{"docs":{},"、":{"docs":{},"以":{"docs":{},"及":{"docs":{},"绘":{"docs":{},"制":{"docs":{},"的":{"docs":{},"颜":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},",":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},",":{"docs":{},"f":{"docs":{},"i":{"docs":{},"t":{"docs":{},")":{"docs":{},"分":{"docs":{},"别":{"docs":{},"表":{"docs":{},"示":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"原":{"docs":{},"点":{"docs":{},"坐":{"docs":{},"标":{"docs":{},"以":{"docs":{},"及":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"宽":{"docs":{},"高":{"docs":{},",":{"docs":{},"以":{"docs":{},"及":{"docs":{},"是":{"docs":{},"否":{"docs":{},"根":{"docs":{},"据":{"docs":{},"可":{"docs":{},"视":{"docs":{},"区":{"docs":{},"域":{"docs":{},"进":{"docs":{},"行":{"docs":{},"调":{"docs":{},"整":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},",":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"1":{"docs":{},",":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"docs":{}}}}},"事":{"docs":{},"件":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.01282051282051282},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567},"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.010810810810810811},"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.03076923076923077},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.012578616352201259},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.010362694300518135},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.01098901098901099},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.010309278350515464},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.011494252873563218},"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.021505376344086023},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.058823529411764705},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.021739130434782608},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.020202020202020204},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.0196078431372549},"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.07407407407407407},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.05},"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.07142857142857142},"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.07142857142857142},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.013157894736842105},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655},"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04},"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.058823529411764705},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.06451612903225806},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.09090909090909091},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.03389830508474576}},"名":{"docs":{},"称":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"方":{"docs":{},"法":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"详":{"docs":{},"见":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}}}}}}}}}}},"滚":{"docs":{},"动":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}},"条":{"docs":{},"相":{"docs":{},"对":{"docs":{},"于":{"docs":{},"左":{"docs":{},"边":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}},"顶":{"docs":{},"部":{"docs":{},"的":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}},"加":{"docs":{},"载":{"docs":{},"的":{"docs":{},"个":{"docs":{},"数":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}},"事":{"docs":{},"件":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}},"超":{"docs":{},"出":{"docs":{},"可":{"docs":{},"视":{"docs":{},"范":{"docs":{},"围":{"docs":{},"区":{"docs":{},"域":{"docs":{},"预":{"docs":{},"加":{"docs":{},"载":{"docs":{},"多":{"docs":{},"少":{"docs":{},"列":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}},"行":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}},"的":{"docs":{},"高":{"docs":{},"度":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}}},"还":{"docs":{},"原":{"docs":{},"列":{"docs":{},"表":{"docs":{},"设":{"docs":{},"置":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641},"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835},"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}},"预":{"docs":{},"估":{"docs":{},"列":{"docs":{},"宽":{"docs":{},",":{"docs":{},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"为":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"时":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"行":{"docs":{},"宽":{"docs":{},",":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"为":{"docs":{},"f":{"docs":{},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"时":{"docs":{},"必":{"docs":{},"设":{"docs":{"core/abstract/grid_view.html":{"ref":"core/abstract/grid_view.html","tf":0.00641025641025641}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"%":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}},"*":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.014184397163120567}}},"m":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},".":{"docs":{},"f":{"docs":{},"l":{"docs":{},"o":{"docs":{},"o":{"docs":{},"r":{"docs":{},"(":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}}}}}}}}}}}}},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}}}}},"s":{"docs":{},"k":{"docs":{},"e":{"docs":{},"r":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}},":":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},"层":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"x":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},":":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}},"s":{"docs":{},"i":{"docs":{},"z":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}},"r":{"docs":{},"k":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"u":{"docs":{},"p":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},",":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":10.035714285714286}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}}}}}},"i":{"docs":{},"n":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}},"_":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}}},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"u":{"docs":{},"m":{"docs":{},"n":{"docs":{},"s":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"i":{"docs":{},"z":{"docs":{},"e":{"docs":{},":":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}}}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888},"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}}}}},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{},"a":{"docs":{},"g":{"docs":{"base/message.html":{"ref":"base/message.html","tf":10}},"e":{"docs":{},",":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.0851063829787234}}}}}}}},"r":{"docs":{},"g":{"docs":{},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"s":{"docs":{},":":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}},"r":{"docs":{},"u":{"docs":{},"l":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":10}}}}}}}}}}}}},"p":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":10}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":10.04}}}}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"_":{"docs":{},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":10}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":10}}}}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"y":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{},"e":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":10}}}}}}}}}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"_":{"docs":{},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":10}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"}":{"docs":{},")":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}},"x":{"1":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"2":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"y":{"2":{"docs":{},".":{"docs":{},".":{"docs":{},".":{"docs":{},")":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}},"docs":{}}}},"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}}},"y":{"0":{"docs":{},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.03333333333333333},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}},"为":{"docs":{},"根":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{},"分":{"docs":{},"支":{"docs":{},"到":{"docs":{},"x":{"1":{"docs":{},",":{"docs":{},"y":{"1":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}}}},"docs":{}}}}}}}}}}},"1":{"docs":{},")":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}},",":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"2":{"docs":{},")":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{},":":{"docs":{"core/abstract/collection_view.html":{"ref":"core/abstract/collection_view.html","tf":0.0070921985815602835}}},",":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}},":":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":10.025}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":10.029411764705882}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":10.03225806451613}}}}}}}}}}}}}}}},"b":{"docs":{},"e":{"docs":{},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}}}}}},"+":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0375},"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.02158273381294964}}},"看":{"docs":{},"不":{"docs":{},"见":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{},"全":{"docs":{},"部":{"docs":{},"删":{"docs":{},"除":{"docs":{},"的":{"docs":{},"l":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"组":{"docs":{},"件":{"docs":{},"挂":{"docs":{},"载":{"docs":{"core/abstract/virtual_list.html":{"ref":"core/abstract/virtual_list.html","tf":0.0125},"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}},"之":{"docs":{},"前":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"不":{"docs":{},"在":{"docs":{},"页":{"docs":{},"面":{"docs":{},"展":{"docs":{},"示":{"docs":{},",":{"docs":{},"组":{"docs":{},"件":{"docs":{},"事":{"docs":{},"件":{"docs":{},"和":{"docs":{},"内":{"docs":{},"容":{"docs":{},"都":{"docs":{},"在":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}},"实":{"docs":{},"例":{"docs":{},"刚":{"docs":{},"被":{"docs":{},"创":{"docs":{},"建":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}},"创":{"docs":{},"建":{"docs":{},"完":{"docs":{},"成":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}},"更":{"docs":{},"新":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"销":{"docs":{},"毁":{"docs":{},"前":{"docs":{},"调":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"后":{"docs":{},"调":{"docs":{},"用":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"值":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"值":{"docs":{"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"|":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.03365384615384615},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.038461538461538464},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.05511811023622047},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.046052631578947366}}},"下":{"docs":{},"拉":{"docs":{},"列":{"docs":{},"表":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}},"收":{"docs":{},"起":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}},"的":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"方":{"docs":{},"式":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}},"框":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}},"展":{"docs":{},"开":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"收":{"docs":{},"起":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},",":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}},"的":{"docs":{},"多":{"docs":{},"选":{"docs":{},"版":{"docs":{},"本":{"docs":{},",":{"docs":{},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{},"带":{"docs":{},"有":{"docs":{},"若":{"docs":{},"干":{"docs":{},"按":{"docs":{},"钮":{"docs":{},",":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}}}}}}}}}}},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"切":{"docs":{},"换":{"docs":{},"状":{"docs":{},"态":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"显":{"docs":{},"示":{"docs":{},"或":{"docs":{},"隐":{"docs":{},"藏":{"docs":{},"面":{"docs":{},"板":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}}}}}}}}}}}}}}},"类":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"图":{"docs":{},"标":{"docs":{},"的":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}}}}}}}}}}}}},"树":{"docs":{},"结":{"docs":{},"构":{"docs":{"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.013157894736842105}}}}}}},"弹":{"docs":{},"出":{"docs":{},"列":{"docs":{},"表":{"docs":{},"和":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"关":{"docs":{},"系":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}},"距":{"docs":{},"离":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}}},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/group_combo.html":{"ref":"core/combination/group_combo.html","tf":0.007874015748031496},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},"显":{"docs":{},"示":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}}}},"最":{"docs":{},"大":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}},"框":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"前":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}},"窗":{"docs":{},"层":{"docs":{},"是":{"docs":{},"否":{"docs":{},"可":{"docs":{},"见":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}},"显":{"docs":{},"示":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}},"内":{"docs":{},"容":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}},"页":{"docs":{},"码":{"docs":{},"的":{"docs":{},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"调":{"docs":{},"整":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}},"横":{"docs":{},"向":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"纵":{"docs":{},"向":{"docs":{},"偏":{"docs":{},"移":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}}}},"高":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"搜":{"docs":{},"索":{"docs":{},"列":{"docs":{},"表":{"docs":{},"栏":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}}}}}},"表":{"docs":{},"格":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}},"头":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}},"重":{"docs":{},"置":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}},"列":{"docs":{},"表":{"docs":{},"宽":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}},"高":{"docs":{},"度":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"宽":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}},"高":{"docs":{},"度":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"次":{"docs":{},"输":{"docs":{},"入":{"docs":{},"的":{"docs":{},"有":{"docs":{},"效":{"docs":{},"值":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}}}},"画":{"docs":{},"布":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"新":{"docs":{},"设":{"docs":{},"置":{"docs":{},"高":{"docs":{},"度":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}}},"心":{"docs":{},"偏":{"docs":{},"移":{"docs":{},"量":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}},"阻":{"docs":{},"止":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"冒":{"docs":{},"泡":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}},"冒":{"docs":{},"泡":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"隐":{"docs":{},"藏":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678}},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308},"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}},"窗":{"docs":{},"层":{"docs":{},"是":{"docs":{},"否":{"docs":{},"销":{"docs":{},"毁":{"docs":{"core/combination/bi.combo.html":{"ref":"core/combination/bi.combo.html","tf":0.004807692307692308}}}}}}}}}}},"展":{"docs":{},"开":{"docs":{},"类":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}},"某":{"docs":{},"个":{"docs":{},"可":{"docs":{},"以":{"docs":{},"展":{"docs":{},"开":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}}}}}}}},"节":{"docs":{},"点":{"docs":{},"是":{"docs":{},"否":{"docs":{},"展":{"docs":{},"开":{"docs":{"core/combination/bi.expander.html":{"ref":"core/combination/bi.expander.html","tf":0.005494505494505495},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625},"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"收":{"docs":{},"起":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"数":{"docs":{},"组":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}},"判":{"docs":{},"断":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"上":{"docs":{},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}},",":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"s":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"下":{"docs":{},"一":{"docs":{},"页":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.012578616352201259},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}},",":{"docs":{},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{},"s":{"docs":{},"不":{"docs":{},"可":{"docs":{},"用":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"效":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"该":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"前":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}},"函":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}}}}}},"怎":{"docs":{},"么":{"docs":{},"点":{"docs":{},"击":{"docs":{},"都":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"即":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"让":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}},"显":{"docs":{},"示":{"docs":{"case/color_chooser.html":{"ref":"case/color_chooser.html","tf":0.038461538461538464}}}}}},"组":{"docs":{},"件":{"docs":{},"是":{"docs":{},"否":{"docs":{},"挂":{"docs":{},"载":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}},"节":{"docs":{},"点":{"docs":{},"是":{"docs":{},"否":{"docs":{},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}}}}}},"加":{"docs":{},"载":{"docs":{},"中":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629},"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/loader.html":{"ref":"core/combination/loader.html","tf":0.006289308176100629}}}}}}}}}}}}}},"完":{"docs":{},"毕":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}},"成":{"docs":{},"的":{"docs":{},"回":{"docs":{},"调":{"docs":{},"(":{"docs":{},"测":{"docs":{},"试":{"docs":{},"了":{"docs":{},"无":{"docs":{},"效":{"docs":{},"果":{"docs":{},")":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943}}}}}}}}}}}}},"回":{"docs":{},"调":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"t":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"结":{"docs":{},"构":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}}}}}},"创":{"docs":{},"建":{"docs":{},"卡":{"docs":{},"导":{"docs":{},"航":{"docs":{},"页":{"docs":{},"页":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}}}}}}},"导":{"docs":{},"航":{"docs":{},"栏":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}}}}}}}}}}},"页":{"docs":{},"展":{"docs":{},"示":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}}}}}}},"挂":{"docs":{},"载":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}}},"面":{"docs":{},"板":{"docs":{},"显":{"docs":{},"示":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"前":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"的":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}},"构":{"docs":{},"造":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547}}}},"器":{"docs":{"core/combination/navigation.html":{"ref":"core/combination/navigation.html","tf":0.007194244604316547},"core/combination/tab.html":{"ref":"core/combination/tab.html","tf":0.00684931506849315}}}}},"切":{"docs":{},"换":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"展":{"docs":{},"开":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"收":{"docs":{},"起":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"隐":{"docs":{},"藏":{"docs":{},"之":{"docs":{},"前":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}},"后":{"docs":{"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}}}}}},"k":{"docs":{},"e":{"docs":{},"y":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}},"s":{"docs":{},":":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}},",":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653},"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},"n":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},":":{"docs":{},"键":{"docs":{},",":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},":":{"docs":{},"值":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}}}}}}}}}},":":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"停":{"docs":{},"止":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.009216589861751152}},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"框":{"docs":{},"为":{"docs":{},"空":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"之":{"docs":{},"后":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576},"core/combination/switcher.html":{"ref":"core/combination/switcher.html","tf":0.00625}}}},"当":{"docs":{},"前":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}},"即":{"docs":{},"是":{"docs":{},"否":{"docs":{},"保":{"docs":{},"持":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"面":{"docs":{},"板":{"docs":{},"和":{"docs":{},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"p":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"面":{"docs":{},"板":{"docs":{},"状":{"docs":{},"态":{"docs":{},"值":{"docs":{},"的":{"docs":{},"统":{"docs":{},"一":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}}}}}}}}}}}}},"搜":{"docs":{},"索":{"docs":{},"中":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}},"列":{"docs":{},"表":{"docs":{},"位":{"docs":{},"置":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}},"暂":{"docs":{},"停":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"文":{"docs":{},"本":{"docs":{},"以":{"docs":{},"空":{"docs":{},"白":{"docs":{},"字":{"docs":{},"符":{"docs":{},"结":{"docs":{},"尾":{"docs":{},")":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}}}}},"结":{"docs":{},"果":{"docs":{},"面":{"docs":{},"板":{"docs":{},"初":{"docs":{},"始":{"docs":{},"化":{"docs":{},"完":{"docs":{},"成":{"docs":{},"后":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}},"发":{"docs":{},"生":{"docs":{},"改":{"docs":{},"变":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}},"逻":{"docs":{},"辑":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}}}}}}}}}}},"到":{"docs":{},"的":{"docs":{},"元":{"docs":{},"素":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}},"面":{"docs":{},"板":{"docs":{},",":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}},"框":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102}}}}},"暂":{"docs":{},"停":{"docs":{},"搜":{"docs":{},"索":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"输":{"docs":{},"入":{"docs":{},"空":{"docs":{},"白":{"docs":{},"字":{"docs":{},"符":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}},"正":{"docs":{},"在":{"docs":{},"搜":{"docs":{},"索":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"core/combination/searcher.html":{"ref":"core/combination/searcher.html","tf":0.004608294930875576}}}}}}},"加":{"docs":{},"载":{"docs":{"case/layer/pane_list.html":{"ref":"case/layer/pane_list.html","tf":0.006802721088435374}}}}}},"=":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.01020408163265306},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.01020408163265306},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/tree/bi.switch_tree.html":{"ref":"detailed/tree/bi.switch_tree.html","tf":0.02631578947368421},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}},"z":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.012345679012345678},"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"x":{"docs":{},"在":{"1":{"0":{"0":{"0":{"docs":{},"w":{"docs":{},",":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}}}}}},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"m":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{},"i":{"docs":{},"p":{"docs":{},"o":{"docs":{},"p":{"docs":{},"u":{"docs":{},"p":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}},"docs":{}},"docs":{}},"docs":{}}}}}}}},"关":{"docs":{},"闭":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}},"键":{"docs":{},"字":{"docs":{},"标":{"docs":{},"红":{"docs":{},"字":{"docs":{},"符":{"docs":{},"串":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}}},"联":{"docs":{},"视":{"docs":{},"图":{"docs":{"detailed/relation_view.html":{"ref":"detailed/relation_view.html","tf":0.019230769230769232}}}}}},"打":{"docs":{},"开":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"层":{"docs":{"core/layer/layer_float_box.html":{"ref":"core/layer/layer_float_box.html","tf":0.024691358024691357}}}}}}},"值":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705},"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{},"的":{"docs":{},"方":{"docs":{},"向":{"docs":{"core/layer/layer_popup.html":{"ref":"core/layer/layer_popup.html","tf":0.0058823529411764705}}}}}}}},"完":{"docs":{},"全":{"docs":{},"匹":{"docs":{},"配":{"docs":{},"的":{"docs":{},"构":{"docs":{},"造":{"docs":{},"器":{"docs":{"core/layer/layer_searcher.html":{"ref":"core/layer/layer_searcher.html","tf":0.009259259259259259}}}}}}}}},"成":{"docs":{},"拷":{"docs":{},"贝":{"docs":{},"后":{"docs":{},"执":{"docs":{},"行":{"docs":{},"的":{"docs":{},"方":{"docs":{},"法":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}}}}}}}}},",":{"docs":{},"一":{"docs":{},"些":{"docs":{},"需":{"docs":{},"要":{"docs":{},"在":{"docs":{},"设":{"docs":{},"置":{"docs":{},"状":{"docs":{},"态":{"docs":{},"后":{"docs":{},"做":{"docs":{},"的":{"docs":{},"额":{"docs":{},"外":{"docs":{},"工":{"docs":{},"作":{"docs":{},"可":{"docs":{},"以":{"docs":{},"通":{"docs":{},"过":{"docs":{},"重":{"docs":{},"写":{"docs":{},"_":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"x":{"docs":{},"x":{"docs":{},"x":{"docs":{},"来":{"docs":{},"实":{"docs":{},"现":{"docs":{},")":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"u":{"docs":{},"p":{"docs":{},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}},"n":{"docs":{},"h":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"k":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"r":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}},"属":{"docs":{},"性":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"所":{"docs":{},"有":{"docs":{},"控":{"docs":{},"件":{"docs":{},"的":{"docs":{},"超":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}},"简":{"docs":{},"单":{"docs":{},"控":{"docs":{},"件":{"docs":{},"的":{"docs":{},"基":{"docs":{},"类":{"docs":{},",":{"docs":{},"类":{"docs":{},"的":{"docs":{},"控":{"docs":{},"制":{"docs":{},",":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{},"e":{"docs":{},"的":{"docs":{},"控":{"docs":{},"制":{"docs":{},",":{"docs":{},"文":{"docs":{},"字":{"docs":{},"超":{"docs":{},"过":{"docs":{},"边":{"docs":{},"界":{"docs":{},"显":{"docs":{},"示":{"3":{"docs":{},"个":{"docs":{},"点":{"docs":{},",":{"docs":{},"c":{"docs":{},"u":{"docs":{},"r":{"docs":{},"s":{"docs":{},"o":{"docs":{},"r":{"docs":{},"默":{"docs":{},"认":{"docs":{},"p":{"docs":{},"o":{"docs":{},"i":{"docs":{},"n":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"扩":{"docs":{},"展":{"docs":{},"c":{"docs":{},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{},"类":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}}}}}}}},"数":{"docs":{},"据":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}},"值":{"docs":{},"微":{"docs":{},"调":{"docs":{},"器":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}},"区":{"docs":{},"间":{"docs":{},"控":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}},"添":{"docs":{},"加":{"docs":{},"组":{"docs":{},"件":{"docs":{"core/widget.html":{"ref":"core/widget.html","tf":0.00510204081632653}}}},"字":{"docs":{},"段":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}},"对":{"docs":{},"象":{"docs":{},"到":{"docs":{},"j":{"docs":{},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{},"数":{"docs":{},"组":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}},"取":{"docs":{},"消":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888},"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"标":{"docs":{},"红":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}},"高":{"docs":{},"亮":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}},"标":{"docs":{},"红":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}}}}},"恢":{"docs":{},"复":{"docs":{},"h":{"docs":{},"o":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"可":{"docs":{},"用":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"h":{"docs":{},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"可":{"docs":{},"用":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}}}}}}}}}}}}}}}}},"这":{"docs":{},"仅":{"docs":{},"仅":{"docs":{},"只":{"docs":{},"是":{"docs":{},"一":{"docs":{},"个":{"docs":{},"超":{"docs":{},"类":{"docs":{},",":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}}}}}}}},"错":{"docs":{},"误":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"core/single.html":{"ref":"core/single.html","tf":0.013888888888888888}}}}}},"提":{"docs":{},"示":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}}}},"信":{"docs":{},"息":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"无":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.034482758620689655}},"论":{"docs":{},"怎":{"docs":{},"么":{"docs":{},"点":{"docs":{},"击":{"docs":{},"都":{"docs":{},"不":{"docs":{},"会":{"docs":{},"被":{"docs":{},"选":{"docs":{},"中":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}},"点":{"docs":{},"击":{"docs":{},"一":{"docs":{},"次":{"docs":{},"选":{"docs":{},"中":{"docs":{},"有":{"docs":{},"效":{"docs":{},",":{"docs":{},"再":{"docs":{},"点":{"docs":{},"无":{"docs":{},"效":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}},"后":{"docs":{},"失":{"docs":{},"效":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}}}},"级":{"docs":{},"节":{"docs":{},"点":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943},"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}},"之":{"docs":{},"前":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}},"回":{"docs":{},"调":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"即":{"docs":{},"选":{"docs":{},"中":{"docs":{},",":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"展":{"docs":{},"开":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421}}}},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"不":{"docs":{},"在":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{},"时":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}},"工":{"docs":{},"具":{"docs":{},"栏":{"docs":{},"事":{"docs":{},"件":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012}}}}}}},"清":{"docs":{},"空":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}},"增":{"docs":{},"加":{"docs":{},"/":{"docs":{},"减":{"docs":{},"少":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"或":{"docs":{},"者":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"确":{"docs":{},"定":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}}}}}}}}}}}},"二":{"docs":{},"级":{"docs":{},"节":{"docs":{},"点":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}},"确":{"docs":{},"定":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}},"认":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353},"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903},"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}},"取":{"docs":{},"消":{"docs":{},"触":{"docs":{},"发":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}},"绑":{"docs":{},"定":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}},"被":{"docs":{},"选":{"docs":{},"元":{"docs":{},"素":{"docs":{},"要":{"docs":{},"触":{"docs":{},"发":{"docs":{},"的":{"docs":{},"事":{"docs":{},"件":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}},"返":{"docs":{},"回":{"docs":{},"该":{"docs":{},"对":{"docs":{},"象":{"docs":{"core/basic_button.html":{"ref":"core/basic_button.html","tf":0.007936507936507936},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}},"不":{"docs":{},"仅":{"docs":{},"有":{"docs":{},"选":{"docs":{},"中":{"docs":{},"状":{"docs":{},"态":{"docs":{},"而":{"docs":{},"且":{"docs":{},"有":{"docs":{},"展":{"docs":{},"开":{"docs":{},"状":{"docs":{},"态":{"docs":{},",":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}}}}},"考":{"docs":{},"虑":{"docs":{},"超":{"docs":{},"出":{"docs":{},"边":{"docs":{},"界":{"docs":{},"的":{"docs":{},"情":{"docs":{},"况":{"docs":{},",":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}}},"变":{"docs":{},"\"":{"docs":{},",":{"docs":{"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125}}}}}},"表":{"docs":{},"示":{"docs":{},"一":{"docs":{},"个":{"docs":{},"可":{"docs":{},"以":{"docs":{},"展":{"docs":{},"开":{"docs":{},"的":{"docs":{},"节":{"docs":{},"点":{"docs":{},",":{"docs":{"core/node_button.html":{"ref":"core/node_button.html","tf":0.02631578947368421},"case/combo/bubble_combo.html":{"ref":"case/combo/bubble_combo.html","tf":0.005780346820809248}}}}}}}}}}}}},"头":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}},"行":{"docs":{},"高":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"尾":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384}}}},"行":{"docs":{},"高":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}},"关":{"docs":{},"联":{"docs":{},"树":{"docs":{"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}},"已":{"docs":{},"经":{"docs":{},"加":{"docs":{},"载":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}},"当":{"docs":{},"没":{"docs":{},"有":{"docs":{},"元":{"docs":{},"素":{"docs":{},"时":{"docs":{},"有":{"docs":{},"提":{"docs":{},"示":{"docs":{},"信":{"docs":{},"息":{"docs":{},"的":{"docs":{},"v":{"docs":{},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{},",":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}}}}}}}}}}}}},"前":{"docs":{},"页":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},",":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}},"状":{"docs":{},"态":{"docs":{},"是":{"docs":{},"否":{"docs":{},"有":{"docs":{},"效":{"docs":{},"(":{"docs":{},"输":{"docs":{},"入":{"docs":{},"是":{"docs":{},"否":{"docs":{},"合":{"docs":{},"法":{"docs":{},",":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}}}}}}}}}},"检":{"docs":{},"查":{"docs":{},"是":{"docs":{},"否":{"docs":{},"为":{"docs":{},"空":{"docs":{"core/pane.html":{"ref":"core/pane.html","tf":0.0196078431372549}}}}}}}},"在":{"docs":{},"未":{"docs":{},"知":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"和":{"docs":{},"高":{"docs":{},"度":{"docs":{},"时":{"docs":{},"有":{"docs":{},"效":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}}}}}}}}},"拼":{"docs":{},"音":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}},"提":{"docs":{},"示":{"docs":{},"t":{"docs":{},"i":{"docs":{},"t":{"docs":{},"l":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}}}},"类":{"docs":{},"型":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}},"性":{"docs":{},"信":{"docs":{},"息":{"docs":{"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":10.011363636363637}}}}}}},"灰":{"docs":{},"化":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154}}}},"空":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.026845637583892617}}},"需":{"docs":{},"要":{"docs":{},"设":{"docs":{},"置":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"值":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.013422818791946308},"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372},"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.011363636363636364},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.018867924528301886}}}}}}},"标":{"docs":{},"签":{"docs":{},"样":{"docs":{},"式":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}},"域":{"docs":{},"样":{"docs":{},"式":{"docs":{},"s":{"docs":{},"t":{"docs":{},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{},",":{"docs":{},"例":{"docs":{},"{":{"docs":{},"\"":{"docs":{},"c":{"docs":{},"o":{"docs":{},"l":{"docs":{},"o":{"docs":{},"r":{"docs":{},"\"":{"docs":{},":":{"docs":{},"\"":{"docs":{},"#":{"0":{"0":{"0":{"docs":{},"\"":{"docs":{},"}":{"docs":{"base/editor/textarea_editor.html":{"ref":"base/editor/textarea_editor.html","tf":0.021739130434782608}}}}},"docs":{}},"docs":{}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}},"高":{"docs":{},"度":{"docs":{},"值":{"docs":{},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332}}}}}}}}}}}}}}}},"高":{"docs":{},"级":{"docs":{},"属":{"docs":{},"性":{"docs":{"base/label.html":{"ref":"base/label.html","tf":0.006711409395973154},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}},"度":{"docs":{"base/toast.html":{"ref":"base/toast.html","tf":0.020833333333333332},"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/combo/static_combo.html":{"ref":"case/combo/static_combo.html","tf":0.0125},"case/combo/text_value_combo.html":{"ref":"case/combo/text_value_combo.html","tf":0.013513513513513514},"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288},"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886},"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612},"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}},"h":{"docs":{},"e":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}}}}}}},"气":{"docs":{},"泡":{"docs":{},"提":{"docs":{},"示":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"显":{"docs":{},"示":{"docs":{},"位":{"docs":{},"置":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}},"内":{"docs":{},"容":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}},"高":{"docs":{},"度":{"docs":{"base/bubble.html":{"ref":"base/bubble.html","tf":0.023255813953488372}}}}}},"消":{"docs":{},"息":{"docs":{},"提":{"docs":{},"示":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"确":{"docs":{},"认":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}},"定":{"docs":{},"输":{"docs":{},"入":{"docs":{},"触":{"docs":{},"发":{"docs":{},"(":{"docs":{},"b":{"docs":{},"l":{"docs":{},"u":{"docs":{},"r":{"docs":{},"时":{"docs":{},"且":{"docs":{},"输":{"docs":{},"入":{"docs":{},"值":{"docs":{},"有":{"docs":{},"效":{"docs":{},")":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}}}}}}},"警":{"docs":{},"告":{"docs":{},"消":{"docs":{},"息":{"docs":{},"框":{"docs":{"base/message.html":{"ref":"base/message.html","tf":0.02127659574468085}}}}}}},"!":{"docs":{},"=":{"docs":{},"=":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}}},"图":{"docs":{},"标":{"docs":{},"类":{"docs":{},"型":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564}}}}}}}}}}}}}}}}}}}}}}}}},"宽":{"docs":{},"度":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"高":{"docs":{},"度":{"docs":{"base/button/icon_button.html":{"ref":"base/button/icon_button.html","tf":0.02564102564102564},"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}},"按":{"docs":{},"钮":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"case/trigger/icon_trigger.html":{"ref":"case/trigger/icon_trigger.html","tf":0.1111111111111111}}}}}}}}}}}},"片":{"docs":{},"的":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}}}}}}}}}}}}}}}}}}}}}},"路":{"docs":{},"径":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.014925373134328358}}}}}},"宽":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/tooltip.html":{"ref":"detailed/bi.button/tooltip.html","tf":0.011363636363636364},"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":0.010638297872340425},"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":0.009259259259259259},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":0.009345794392523364},"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"t":{"docs":{},"h":{"docs":{"base/button/image_button.html":{"ref":"base/button/image_button.html","tf":0.029850746268656716}}}}}}}}},"按":{"docs":{},"钮":{"docs":{},"文":{"docs":{},"本":{"docs":{},"宽":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}},"高":{"docs":{},"度":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182},"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}},"内":{"docs":{},"容":{"docs":{"base/button/text_button.html":{"ref":"base/button/text_button.html","tf":0.009433962264150943}}}}}},"类":{"docs":{},"型":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}}},"组":{"docs":{"case/layer/multi_popup_layer.html":{"ref":"case/layer/multi_popup_layer.html","tf":0.04}}}},"下":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"e":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}},"空":{"docs":{},"格":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"键":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}},"最":{"docs":{},"小":{"docs":{},"宽":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}},",":{"docs":{},"如":{"docs":{},"果":{"docs":{},"b":{"docs":{},"l":{"docs":{},"o":{"docs":{},"c":{"docs":{},"k":{"docs":{},"/":{"docs":{},"c":{"docs":{},"l":{"docs":{},"e":{"docs":{},"a":{"docs":{},"r":{"docs":{},"中":{"docs":{},"某":{"docs":{},"一":{"docs":{},"项":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{},"此":{"docs":{},"项":{"docs":{},"值":{"docs":{},"为":{"0":{"docs":{},",":{"docs":{},"否":{"docs":{},"则":{"docs":{},"为":{"9":{"0":{"docs":{"base/button/button.html":{"ref":"base/button/button.html","tf":0.005681818181818182}}},"docs":{}},"docs":{}}}}}},"docs":{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"列":{"docs":{},"宽":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"值":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}},"大":{"docs":{},"可":{"docs":{},"选":{"docs":{},"数":{"docs":{},"量":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}},"列":{"docs":{},"宽":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"宽":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}},"高":{"docs":{},"度":{"docs":{"case/combo/icon_combo.html":{"ref":"case/combo/icon_combo.html","tf":0.007751937984496124}}}},"日":{"docs":{},"期":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}},"值":{"docs":{"detailed/slider.html":{"ref":"detailed/slider.html","tf":0.029411764705882353}},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},",":{"docs":{},"在":{"docs":{},"万":{"docs":{},"不":{"docs":{},"得":{"docs":{},"已":{"docs":{},"时":{"docs":{},"才":{"docs":{},"会":{"docs":{},"调":{"docs":{},"用":{"docs":{},"这":{"docs":{},"个":{"docs":{},"函":{"docs":{},"数":{"docs":{},"获":{"docs":{},"取":{"docs":{},"最":{"docs":{},"后":{"docs":{},"一":{"docs":{},"页":{"docs":{},"的":{"docs":{},"页":{"docs":{},"码":{"docs":{},",":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"i":{"docs":{},"t":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"c":{"docs":{},"k":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"_":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":10.035714285714286}}}}}}}}}}}}}}},"输":{"docs":{},"入":{"docs":{},"为":{"docs":{},"空":{"docs":{},"时":{"docs":{},"按":{"docs":{},"下":{"docs":{},"b":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}},"值":{"docs":{},"无":{"docs":{},"效":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}},"有":{"docs":{},"效":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}},"框":{"docs":{},"为":{"docs":{},"空":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}},"类":{"docs":{},"型":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406}}}}},"较":{"docs":{},"验":{"docs":{},"函":{"docs":{},"数":{"docs":{"base/editor/editor.html":{"ref":"base/editor/editor.html","tf":0.005405405405405406},"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676},"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495},"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732},"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609},"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464},"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102},"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}},"代":{"docs":{},"码":{"docs":{},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}}}}}}}}}}}}}}}},"插":{"docs":{},"入":{"docs":{},"参":{"docs":{},"数":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266}}}},"字":{"docs":{},"符":{"docs":{},"串":{"docs":{"base/editor/code_editor.html":{"ref":"base/editor/code_editor.html","tf":0.012658227848101266},"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}},"函":{"docs":{},"数":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}},"操":{"docs":{},"作":{"docs":{},"符":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}},"允":{"docs":{},"许":{"docs":{},"上":{"docs":{},"传":{"docs":{},"的":{"docs":{},"文":{"docs":{},"件":{"docs":{},"类":{"docs":{},"型":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}}}},"多":{"docs":{},"文":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/multifile_editor.html":{"ref":"base/editor/multifile_editor.html","tf":0.015384615384615385}}}}}}}}}}}}}}},"层":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"列":{"docs":{},"表":{"docs":{},"的":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}},"级":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"单":{"docs":{},"选":{"docs":{},"树":{"docs":{"detailed/combo/multilayer_single_tree_combo.html":{"ref":"detailed/combo/multilayer_single_tree_combo.html","tf":0.018867924528301886}}}}},"可":{"docs":{},"选":{"docs":{},"节":{"docs":{},"点":{"docs":{},"树":{"docs":{"detailed/combo/multilayer_select_tree_combo.html":{"ref":"detailed/combo/multilayer_select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}}},"公":{"docs":{},"式":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"s":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}}}}}}}}}}}}}}},"字":{"docs":{},"段":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/editor/formula_editor.html":{"ref":"base/editor/formula_editor.html","tf":0.010101010101010102}}}}}},"合":{"docs":{},"并":{"docs":{},"的":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"列":{"docs":{},"号":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}},"规":{"docs":{},"则":{"docs":{},",":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}},"得":{"docs":{},"到":{"docs":{},"列":{"docs":{},"宽":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"时":{"docs":{},"合":{"docs":{},"并":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"普":{"docs":{},"通":{"docs":{},"单":{"docs":{},"元":{"docs":{},"格":{"docs":{},"高":{"docs":{},"度":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629},"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403},"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}}}}},"能":{"docs":{},"处":{"docs":{},"理":{"docs":{},"静":{"docs":{},"态":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"以":{"docs":{},"及":{"docs":{},"动":{"docs":{},"态":{"docs":{},"宽":{"docs":{},"度":{"docs":{},"的":{"docs":{},"表":{"docs":{"base/table/table_view.html":{"ref":"base/table/table_view.html","tf":0.006289308176100629}}}}}}}}}}}}}}}}},"储":{"docs":{},"存":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}}},"冻":{"docs":{},"结":{"docs":{},"列":{"docs":{"base/table/grid_table.html":{"ref":"base/table/grid_table.html","tf":0.008771929824561403}}},"的":{"docs":{},"列":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301},"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625},"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}},"号":{"docs":{},",":{"docs":{},"从":{"0":{"docs":{},"开":{"docs":{},"始":{"docs":{},",":{"docs":{},"i":{"docs":{},"s":{"docs":{},"n":{"docs":{},"e":{"docs":{},"e":{"docs":{},"d":{"docs":{},"f":{"docs":{},"r":{"docs":{},"e":{"docs":{},"e":{"docs":{},"z":{"docs":{},"e":{"docs":{},"为":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"e":{"docs":{},"时":{"docs":{},"生":{"docs":{},"效":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}}}}}}}}}}}}}}}}}}},"docs":{}}}}}}}},"存":{"docs":{},"储":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}},"数":{"docs":{},"据":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}}}},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/table/collection_table.html":{"ref":"base/table/collection_table.html","tf":0.006535947712418301}}}}}}}}}}}}},"保":{"docs":{},"存":{"docs":{},"表":{"docs":{"base/table/resizable_table.html":{"ref":"base/table/resizable_table.html","tf":0.00625}}}}},"j":{"docs":{},"u":{"docs":{},"m":{"docs":{},"p":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"主":{"docs":{},"要":{"docs":{},"作":{"docs":{},"用":{"docs":{},"于":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},"方":{"docs":{},"法":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}},"计":{"docs":{},"数":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"表":{"docs":{},"格":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"选":{"docs":{},"项":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"第":{"docs":{},"一":{"docs":{},"页":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"若":{"docs":{},"为":{"docs":{},"f":{"docs":{},"a":{"docs":{},"l":{"docs":{},"s":{"docs":{},"e":{"docs":{},",":{"docs":{},"则":{"docs":{},"指":{"docs":{},"对":{"docs":{},"其":{"docs":{},"设":{"docs":{},"置":{"docs":{},"使":{"docs":{},"能":{"docs":{},"状":{"docs":{},"态":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}}}}}}}}}}}}},"连":{"docs":{},"续":{"docs":{},"显":{"docs":{},"示":{"docs":{},"分":{"docs":{},"页":{"docs":{},"数":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}}}}}},"页":{"docs":{},"数":{"docs":{},"跳":{"docs":{},"转":{"docs":{"base/pager.html":{"ref":"base/pager.html","tf":0.006666666666666667}}}}},"码":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.009302325581395349}}}},".":{"docs":{},"a":{"docs":{},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"(":{"docs":{},"{":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"o":{"docs":{},"k":{"docs":{},"e":{"docs":{},":":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}},".":{"docs":{},".":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232}}}}},"结":{"docs":{},"束":{"docs":{},"绘":{"docs":{},"制":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}},"绘":{"docs":{},"制":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666},"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}},"图":{"docs":{},"片":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"圆":{"docs":{},"形":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"形":{"docs":{},"状":{"docs":{},"的":{"docs":{},"集":{"docs":{},"合":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}},"文":{"docs":{},"本":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"椭":{"docs":{},"圆":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"矩":{"docs":{},"形":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775},"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"路":{"docs":{},"径":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}},"渐":{"docs":{},"变":{"docs":{},"色":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}},"线":{"docs":{},"段":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}},"树":{"docs":{},"枝":{"docs":{},"节":{"docs":{},"点":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}},"通":{"docs":{},"过":{"docs":{},"给":{"docs":{},"定":{"docs":{},"的":{"docs":{},"参":{"docs":{},"数":{"docs":{},"在":{"docs":{},"已":{"docs":{},"注":{"docs":{},"册":{"docs":{},"的":{"docs":{},"字":{"docs":{},"体":{"docs":{},"中":{"docs":{},"找":{"docs":{},"到":{"docs":{},"字":{"docs":{},"体":{"docs":{},"对":{"docs":{},"象":{"docs":{"base/svg.html":{"ref":"base/svg.html","tf":0.011235955056179775}}}}}}}}}}}}}}}}}}}}},"鼠":{"docs":{},"标":{"docs":{},"或":{"docs":{},"键":{"docs":{},"盘":{"docs":{},"输":{"docs":{},"入":{"docs":{},"字":{"docs":{},"符":{"docs":{"detailed/text_input/bi.text_editor.html":{"ref":"detailed/text_input/bi.text_editor.html","tf":0.010309278350515464}}}}}}}}}}}},"用":{"docs":{},"按":{"docs":{},"钮":{"docs":{"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":10}},",":{"docs":{},"详":{"docs":{},"情":{"docs":{},"见":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"detailed/bi.button/general.html":{"ref":"detailed/bi.button/general.html","tf":0.5}}}}}}}}}}}}}}}}}}},"填":{"docs":{},"充":{"docs":{},"中":{"docs":{},"空":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}},"实":{"docs":{},"心":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{"base/canvas.html":{"ref":"base/canvas.html","tf":0.016666666666666666}}}}}}}}},"复":{"docs":{},"选":{"docs":{},"框":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"c":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{},"t":{"docs":{},"o":{"docs":{},"n":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806}}}}}}}}}}}}}}}}}}}}}}}}},"杂":{"docs":{},"的":{"docs":{},"c":{"docs":{},"a":{"docs":{},"n":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"绘":{"docs":{},"图":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}}}}}}}}}}},"标":{"docs":{},"红":{"docs":{"case/button/multi_select_item.html":{"ref":"case/button/multi_select_item.html","tf":0.017543859649122806},"case/button/single_select_item.html":{"ref":"case/button/single_select_item.html","tf":0.016129032258064516},"case/button/single_select_radio_item.html":{"ref":"case/button/single_select_radio_item.html","tf":0.016129032258064516}}},"题":{"docs":{"case/layer/layer_panel.html":{"ref":"case/layer/layer_panel.html","tf":0.010752688172043012},"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}},"后":{"docs":{},"的":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"组":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}},"带":{"docs":{},"标":{"docs":{},"记":{"docs":{},"的":{"docs":{},"文":{"docs":{},"本":{"docs":{},"框":{"docs":{},",":{"docs":{},"需":{"docs":{},"手":{"docs":{},"动":{"docs":{},"控":{"docs":{},"制":{"docs":{},"进":{"docs":{},"入":{"docs":{},"编":{"docs":{},"辑":{"docs":{},"状":{"docs":{},"态":{"docs":{"case/editor/shelter_editor.html":{"ref":"case/editor/shelter_editor.html","tf":0.0051813471502590676}}}}}}}}}}}}},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/editor/sign_editor.html":{"ref":"case/editor/sign_editor.html","tf":0.005494505494505495}}}}}}}}}}}}}}}}}}}},"有":{"docs":{},"标":{"docs":{},"题":{"docs":{},"栏":{"docs":{},"的":{"docs":{},"p":{"docs":{},"a":{"docs":{},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/layer/panel.html":{"ref":"case/layer/panel.html","tf":0.015873015873015872}}}}}}}}}}}}}}}}}}}}}}}},"清":{"docs":{},"除":{"docs":{},"按":{"docs":{},"钮":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745}}}}}}}}}},"确":{"docs":{},"定":{"docs":{},"的":{"docs":{},"复":{"docs":{},"选":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/multi_select_combo.html":{"ref":"detailed/multi_select_combo.html","tf":0.04}}}}}}}}}},"方":{"docs":{},"向":{"docs":{},"的":{"docs":{},"路":{"docs":{},"径":{"docs":{},"选":{"docs":{},"择":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}}},"之":{"docs":{},"后":{"docs":{},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{},"会":{"docs":{},"一":{"docs":{},"直":{"docs":{},"显":{"docs":{},"示":{"docs":{},"的":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}}}}}}}}}}}}}},"指":{"docs":{},"定":{"docs":{},"初":{"docs":{},"始":{"docs":{},"值":{"docs":{"case/editor/sign_initial_editor.html":{"ref":"case/editor/sign_initial_editor.html","tf":0.005154639175257732}}}}}}},"记":{"docs":{},"录":{"docs":{},"状":{"docs":{},"态":{"docs":{},"的":{"docs":{},"输":{"docs":{},"入":{"docs":{},"框":{"docs":{},",":{"docs":{},"基":{"docs":{},"类":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"case/editor/state_editor.html":{"ref":"case/editor/state_editor.html","tf":0.005747126436781609}}}}}}}}}}}}}}}}}}}}}},"替":{"docs":{},"换":{"docs":{},"内":{"docs":{},"容":{"docs":{"case/list/list.select.html":{"ref":"case/list/list.select.html","tf":0.009433962264150943},"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288},"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012},"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}},"为":{"docs":{},"新":{"docs":{},"的":{"docs":{},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757}}}}},"内":{"docs":{},"容":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}},"懒":{"docs":{},"加":{"docs":{},"载":{"docs":{},"l":{"docs":{},"o":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"case/loader/lazy_loader.html":{"ref":"case/loader/lazy_loader.html","tf":0.01694915254237288}}}}}}}}}}},"为":{"docs":{},"解":{"docs":{},"决":{"docs":{},"排":{"docs":{},"序":{"docs":{},"问":{"docs":{},"题":{"docs":{},"引":{"docs":{},"入":{"docs":{},"的":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/loader/list_loader.html":{"ref":"case/loader/list_loader.html","tf":0.010752688172043012}}}}}}}}}}}}}},"排":{"docs":{},"序":{"docs":{},"列":{"docs":{},"表":{"docs":{"case/loader/sort_list.html":{"ref":"case/loader/sort_list.html","tf":0.010752688172043012}}}}}},"触":{"docs":{},"发":{"docs":{},"器":{"docs":{},"宽":{"docs":{},"度":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}},"退":{"docs":{},"出":{"docs":{},"时":{"docs":{},"验":{"docs":{},"证":{"docs":{},"函":{"docs":{},"数":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}}}}},"验":{"docs":{},"证":{"docs":{},"函":{"docs":{},"数":{"docs":{"case/trigger/editor_trigger.html":{"ref":"case/trigger/editor_trigger.html","tf":0.02}}}}}},"有":{"docs":{},"二":{"docs":{},"级":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"菜":{"docs":{},"单":{"docs":{},"的":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"case/combo/text_value_downlist_combo.html":{"ref":"case/combo/text_value_downlist_combo.html","tf":0.013513513513513514}}}}}}}}}}}}}},"总":{"docs":{},"页":{"docs":{},"数":{"docs":{},"和":{"docs":{},"总":{"docs":{},"行":{"docs":{},"数":{"docs":{},"的":{"docs":{},"分":{"docs":{},"页":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}}}}}}}}}}}}},"去":{"docs":{},"掉":{"docs":{},"所":{"docs":{},"有":{"docs":{},"内":{"docs":{},"容":{"docs":{"case/tree/branch_tree.html":{"ref":"case/tree/branch_tree.html","tf":0.02},"case/tree/handstand_branch_tree.html":{"ref":"case/tree/handstand_branch_tree.html","tf":0.019230769230769232},"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223},"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856},"case/tree/branch_relation.html":{"ref":"case/tree/branch_relation.html","tf":0.02040816326530612}}}}}}}},"摧":{"docs":{},"毁":{"docs":{},"元":{"docs":{},"素":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}},"表":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.preview_table.html":{"ref":"detailed/table/bi.preview_table.html","tf":0.006756756756756757},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.excel_table.html":{"ref":"detailed/table/bi.excel_table.html","tf":0.0055248618784530384},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"树":{"docs":{},"展":{"docs":{},"示":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}}},"状":{"docs":{},"结":{"docs":{},"构":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653}}}}}}}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},",":{"docs":{},"继":{"docs":{},"承":{"docs":{},"b":{"docs":{},"i":{"docs":{},".":{"docs":{},"w":{"docs":{},"i":{"docs":{},"d":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"detailed/tree/bi.multi_tree_combo.html":{"ref":"detailed/tree/bi.multi_tree_combo.html","tf":0.010869565217391304}}}}}}}}}}}}}}}}}},"配":{"docs":{},"置":{"docs":{},"项":{"docs":{"case/tree/display_tree.html":{"ref":"case/tree/display_tree.html","tf":0.030303030303030304}}}}},"简":{"docs":{},"单":{"docs":{},"的":{"docs":{},"多":{"docs":{},"选":{"docs":{},"树":{"docs":{"case/tree/simple_tree.html":{"ref":"case/tree/simple_tree.html","tf":0.022222222222222223}}}}}}}},"二":{"docs":{},"级":{"docs":{},"树":{"docs":{"case/tree/level_tree.html":{"ref":"case/tree/level_tree.html","tf":0.017857142857142856}},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}},"参":{"docs":{},"数":{"docs":{"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}},"可":{"docs":{},"选":{"docs":{},"节":{"docs":{},"点":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"树":{"docs":{"detailed/combo/select_tree_combo.html":{"ref":"detailed/combo/select_tree_combo.html","tf":0.02040816326530612}}}}}}}}}}},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{},",":{"docs":{},"每":{"docs":{},"个":{"docs":{},"元":{"docs":{},"素":{"docs":{},"代":{"docs":{},"表":{"docs":{},"一":{"docs":{},"条":{"docs":{},"路":{"docs":{},"径":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}},",":{"docs":{},"相":{"docs":{},"较":{"docs":{},"于":{"docs":{},"p":{"docs":{},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"_":{"docs":{},"c":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"多":{"docs":{},"一":{"docs":{},"个":{"docs":{},"属":{"docs":{},"性":{"docs":{},"d":{"docs":{},"i":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"来":{"docs":{},"指":{"docs":{},"定":{"docs":{},"方":{"docs":{},"向":{"docs":{"detailed/path/direction_path_chooser.html":{"ref":"detailed/path/direction_path_chooser.html","tf":0.02}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"交":{"docs":{},"叉":{"docs":{},"表":{"docs":{},"头":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"内":{"docs":{},"容":{"docs":{},"二":{"docs":{},"维":{"docs":{},"数":{"docs":{},"组":{"docs":{"detailed/table/bi.responsive_table.html":{"ref":"detailed/table/bi.responsive_table.html","tf":0.005263157894736842}}}}}}}}},"项":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}},"键":{"docs":{"case/table/adaptive_table.html":{"ref":"case/table/adaptive_table.html","tf":0.006060606060606061},"case/table/tree_table.html":{"ref":"case/table/tree_table.html","tf":0.00510204081632653},"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653},"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}},"层":{"docs":{},"级":{"docs":{},"树":{"docs":{},"状":{"docs":{},"结":{"docs":{},"构":{"docs":{},"的":{"docs":{},"表":{"docs":{},"格":{"docs":{"case/table/layer_tree_table.html":{"ref":"case/table/layer_tree_table.html","tf":0.00510204081632653}}}}}}}}}}},"总":{"docs":{},"行":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176}}}},"页":{"docs":{},"数":{"docs":{"case/pager/all_count_pager.html":{"ref":"case/pager/all_count_pager.html","tf":0.014705882352941176},"case/pager/direction_pager.html":{"ref":"case/pager/direction_pager.html","tf":0.00819672131147541}}}}},"日":{"docs":{},"历":{"docs":{},"控":{"docs":{},"件":{"docs":{"case/calendar.html":{"ref":"case/calendar.html","tf":0.013888888888888888}}}}},"期":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{},"(":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"的":{"docs":{},"年":{"docs":{},"月":{"docs":{},"选":{"docs":{},"择":{"docs":{},"可":{"docs":{},"以":{"docs":{},"进":{"docs":{},"一":{"docs":{},"步":{"docs":{},"选":{"docs":{},"择":{"docs":{},"日":{"docs":{},"期":{"docs":{},")":{"docs":{"detailed/date/date_combo.html":{"ref":"detailed/date/date_combo.html","tf":0.058823529411764705}}}}}}}}}}}}}}}}}}},"可":{"docs":{},"以":{"docs":{},"选":{"docs":{},"择":{"docs":{},"时":{"docs":{},"分":{"docs":{},"秒":{"docs":{},")":{"docs":{"detailed/date/custom_date_time.html":{"ref":"detailed/date/custom_date_time.html","tf":0.045454545454545456}}}}}}}}}}},"的":{"docs":{},"弹":{"docs":{},"出":{"docs":{},"面":{"docs":{},"板":{"docs":{"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}}}}}}}},"剪":{"docs":{},"切":{"docs":{},"板":{"docs":{"case/clipboard.html":{"ref":"case/clipboard.html","tf":0.03125}}}}},"(":{"docs":{},"以":{"docs":{},"x":{"0":{"docs":{},",":{"docs":{"case/complex_canvas.html":{"ref":"case/complex_canvas.html","tf":0.020833333333333332}}}},"docs":{}}}},"颜":{"docs":{},"色":{"docs":{},"值":{"docs":{},"改":{"docs":{},"变":{"docs":{},"时":{"docs":{},"触":{"docs":{},"发":{"docs":{"case/color_chooser_popup.html":{"ref":"case/color_chooser_popup.html","tf":0.029411764705882353}}}}}}}}}},"各":{"docs":{},"种":{"docs":{},"s":{"docs":{},"e":{"docs":{},"g":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"case/segment.html":{"ref":"case/segment.html","tf":0.009345794392523364},"detailed/bi.button/segment.html":{"ref":"detailed/bi.button/segment.html","tf":10.009345794392523}}}}}}}}},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"detailed/bi.button/items.html":{"ref":"detailed/bi.button/items.html","tf":10.01063829787234}}}}}},"节":{"docs":{},"点":{"docs":{},"n":{"docs":{},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"detailed/bi.button/node.html":{"ref":"detailed/bi.button/node.html","tf":10.00925925925926}}}}}}}}}},"三":{"docs":{},"级":{"docs":{},"参":{"docs":{},"数":{"docs":{"detailed/table/bi.page_table.html":{"ref":"detailed/table/bi.page_table.html","tf":0.004651162790697674}}}}}},"其":{"docs":{},"他":{"docs":{},"事":{"docs":{},"件":{"docs":{},"详":{"docs":{},"见":{"docs":{},"e":{"docs":{},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{},"o":{"docs":{},"r":{"docs":{"detailed/text_input/bi.search_editor.html":{"ref":"detailed/text_input/bi.search_editor.html","tf":0.010101010101010102}}}}}}}},"i":{"docs":{},"n":{"docs":{},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{"detailed/text_input/bi.clear_editor.html":{"ref":"detailed/text_input/bi.clear_editor.html","tf":0.00980392156862745},"detailed/combo/single_tree_combo.html":{"ref":"detailed/combo/single_tree_combo.html","tf":0.01694915254237288}}}}}}}}}}}}},"编":{"docs":{},"辑":{"docs":{},"框":{"docs":{},"中":{"docs":{},"的":{"docs":{},"值":{"docs":{},",":{"docs":{"detailed/text_input/finetuning_number_editor.html":{"ref":"detailed/text_input/finetuning_number_editor.html","tf":0.037037037037037035}}}}}}}}},"年":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025}}}}}}}},"月":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/date/year_month_combo.html":{"ref":"detailed/date/year_month_combo.html","tf":0.029411764705882353}}}}}}}},"季":{"docs":{},"度":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/date/year_quarter_combo.html":{"ref":"detailed/date/year_quarter_combo.html","tf":0.03225806451612903}}}}}}}}}},"限":{"docs":{},"定":{"docs":{},"可":{"docs":{},"选":{"docs":{},"日":{"docs":{},"期":{"docs":{},"的":{"docs":{},"上":{"docs":{},"限":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}},"下":{"docs":{},"限":{"docs":{"detailed/year_combo.html":{"ref":"detailed/year_combo.html","tf":0.025},"detailed/date/date_pane_widget.html":{"ref":"detailed/date/date_pane_widget.html","tf":0.02702702702702703}}}}}}}}}}},"月":{"docs":{},"份":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/month_combo.html":{"ref":"detailed/month_combo.html","tf":0.03571428571428571}}}}}}}}},"季":{"docs":{},"度":{"docs":{},"选":{"docs":{},"择":{"docs":{},"下":{"docs":{},"拉":{"docs":{},"框":{"docs":{"detailed/quarter_combo.html":{"ref":"detailed/quarter_combo.html","tf":0.03571428571428571}}}}}}}}},"具":{"docs":{},"体":{"docs":{},"配":{"docs":{},"置":{"docs":{},"方":{"docs":{},"法":{"docs":{},"见":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"b":{"docs":{},"o":{"docs":{"detailed/down_list_combo.html":{"ref":"detailed/down_list_combo.html","tf":0.006578947368421052}}}}}}}}}}}}}},"区":{"docs":{},"间":{"docs":{},"不":{"docs":{},"合":{"docs":{},"法":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}}},"合":{"docs":{},"法":{"docs":{},"的":{"docs":{},"状":{"docs":{},"态":{"docs":{},"事":{"docs":{},"件":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}},"是":{"docs":{},"否":{"docs":{},"成":{"docs":{},"立":{"docs":{},")":{"docs":{"detailed/numeric_interval.html":{"ref":"detailed/numeric_interval.html","tf":0.017241379310344827}}}}}}}}},"路":{"docs":{},"径":{"docs":{},"选":{"docs":{},"择":{"docs":{"detailed/path/path_chooser.html":{"ref":"detailed/path/path_chooser.html","tf":0.019230769230769232}}}}}}},"length":9340},"corpusTokens":["!==","\"","\"\"","\"\",","\"\"]","\"\"],","\"\"}","\"#wrapper\",","\"+\"","\".\"","\"0\",","\"0fbd0dc648f41e97\",","\"1\"","\"1\",","\"100%\"","\"100%\",","\"11\",","\"12\",","\"123\",","\"1f4711c201ef1842\",","\"2\",","\"2010年\",","\"3\"","\"3\",","\"456\",","\"5\"","\"8c4460bc3605685e\",","\"a\"","\"a\");","\"a\",","\"a1\",","\"a1字段\"},","\"aaa\"","\"aaa\",","\"aba\"","\"aba\",","\"acc\"","\"acc\",","\"auto\"","\"b\",","\"b2\",","\"b2...\",","\"b2字段\"","\"bbb\"","\"bbb\",","\"bi","\"bi.adaptive_table\",","\"bi.arrow_group_node\",","\"bi.branch_relation\",","\"bi.branch_tree\",","\"bi.bubble_combo\",","\"bi.button\",","\"bi.button_group\"","\"bi.button_group\",","\"bi.button_group\",behaviors:","\"bi.button_group\",items:","\"bi.button_tree\",","\"bi.button_tree\",choosetype:","\"bi.canvas\",","\"bi.center\",","\"bi.center\",hgap:","\"bi.center_adapt\",","\"bi.code_editor\",","\"bi.collection_table\",","\"bi.collection_view\",","\"bi.color_chooser\",","\"bi.color_chooser_popup\",","\"bi.combo\",","\"bi.combo_group\",","\"bi.complex_canvas\",","\"bi.custom_date_time_combo\",","\"bi.custom_tree\",","\"bi.custom_tree\"}}","\"bi.date_combo\",","\"bi.date_pane_widget\",","\"bi.direction_path_chooser\",","\"bi.display_tree\",","\"bi.editor\",","\"bi.editor_trigger\",","\"bi.excel_table\",","\"bi.expander\",","\"bi.file_manager\",","\"bi.formula_editor\",","\"bi.grid_table\",","\"bi.grid_view\",","\"bi.handstand_branch_tree\",","\"bi.horizontal_adapt\",","\"bi.horizontal_auto\",","\"bi.horizontal_float\",","\"bi.htape\",","\"bi.icon_combo\",","\"bi.icon_text_icon_item\",","\"bi.icon_text_item\",","\"bi.icon_text_node\",","\"bi.icon_trigger\",","\"bi.label\",","\"bi.label\"},","\"bi.label\"}}","\"bi.layer_tree_table\",","\"bi.lazy_loader\",","\"bi.left\",","\"bi.level_tree\",","\"bi.list_loader\",","\"bi.loader\",","\"bi.multi_popup_view\",","\"bi.multi_select_combo\",","\"bi.multi_select_item\",","\"bi.multi_tree_combo\",","\"bi.multifile_editor\",","\"bi.multilayer_select_tree_combo\",","\"bi.multilayer_single_tree_combo\",","\"bi.navigation\",","\"bi.numerical_interval\",","\"bi.page_table\",","\"bi.pager\",","\"bi.panel\",","\"bi.path_chooser\",","\"bi.plus_group_node\",","\"bi.popup_panel\",","\"bi.popup_view\",","\"bi.preview_table\",","\"bi.relation_view\",","\"bi.resizable_table\",","\"bi.responsive_table\",","\"bi.right\",","\"bi.search_editor\"}","\"bi.searcher\",","\"bi.searcher_view\",","\"bi.searcher_view\"}","\"bi.segment\",","\"bi.select_list\",","\"bi.select_tree_combo\",","\"bi.shelter_editor\",","\"bi.sign_editor\",","\"bi.sign_initial_editor\",","\"bi.simple_tree\",","\"bi.single_select_item\",","\"bi.single_select_radio_item\",","\"bi.single_tree_combo\",","\"bi.slider\",","\"bi.sort_list\",","\"bi.state_editor\",","\"bi.static_combo\",","\"bi.svg\",","\"bi.switch_tree\",","\"bi.switcher\",","\"bi.tab\",","\"bi.table\",","\"bi.table_view\",","\"bi.td\",","\"bi.text_button\",","\"bi.text_editor\",","\"bi.text_item\",","\"bi.text_value_combo\",","\"bi.text_value_down_list_combo\",","\"bi.textarea_editor\",","\"bi.tree_table\",","\"bi.triangle_group_node\",","\"bi.vertical\"","\"bi.vertical\",","\"bi.vertical\"}]}","\"bi.vertical\"}]}}","\"bi.vertical_adapt\",","\"bi.virtual_group\",","\"bi.virtual_list\",","\"bi.vtape\",","\"bi.year_month_combo\",","\"bi.year_quarter_combo\",","\"body\",","\"bottom\"","\"button_group\"","\"c\",","\"c1\",","\"c1字段\"}","\"c2\",","\"c2字段\"}","\"c6d72d6c7e19a667\",","\"center","\"chart","\"check","\"click\"","\"close","\"column","\"defa1f7ba8b2684a客户id\"","\"delet","\"direction\":","\"div\"","\"dot","\"e351e9f1d8147947合同id\",","\"expander\"","\"fill\",","\"floatcenter与center的不同在于,它可以控制最小宽度和最大宽度\",","\"green\");","\"horizont","\"http://www.easyicon.net/api/resizeapi.php?id=1206741&size=128\",","\"id\",","\"item\"","\"label1\",","\"layout","\"left","\"left\"","\"left,right,center\"","\"middle\"","\"move","\"mvc","\"normal\"","\"pull","\"red\",","\"red\"});","\"region\":","\"regiontext\":","\"renam","\"right","\"success\"","\"switcher\"","\"tab1\",","\"tab2\",","\"tab3","\"text\"","\"text\",","\"text\":","\"toast测试\"","\"top\"","\"valu","\"value\":","\"value_combo\",","\"vertic","\"warning\"","\"warning\",","\"xxxx\"}],","\"一月\",","\"三角形的节点\"","\"上一页\"","\"下一页\"","\"主键\",","\"供应商基本信息\",","\"前进\",","\"十字形的节点\"","\"单选item\"","\"单选项\"","\"原始值\",","\"右边的垂直居中\",","\"合同id\",","\"合同信息\",","\"合同的回款信息\",","\"后退\",","\"基本标签\"","\"复选item\"","\"复选项\"","\"字段不可重名!\",","\"学号\",","\"客户id\",","\"客户信息\",","\"尾页\"","\"左边的垂直居中\",","\"张三\"","\"标题\",","\"根目录\"","\"根目录\",","\"比\",","\"测试\"","\"测试\",","\"点击弹出floatbox\",","\"第\"","\"第一级子目录1\"","\"第一级子目录2\"","\"第一级目录1\"","\"第一级目录1\",","\"第一行第一列\"","\"第一行第三列\"","\"第一行第二列\"","\"第一项\",","\"第三项\",","\"第二级文件1\"","\"第二级文件1\",","\"第二行第一列\"","\"第二行第二列\"","\"第二项\",","\"箭头节点\"","\"表头1\"","\"表头2\"","\"表头3\"","\"这个是带标记的\"","\"这里设置了hgap(水平间距),vgap(垂直间距)\",","\"这里设置了lgap,rgap,tgap,bgap\",","\"采购订单\",","\"采购订单xxx\",","\"面板1\"","\"面板2\"","\"页\"","\"项目1\",","\"项目2\",","\"首页\",","\"默认值\",","\"默认风格\"","%","'#wrapper',","''","'',","'1',","'1900","'2',","'2099","'3',","'bi.all_count_pager',","'bi.border',","'bi.bubble',","'bi.button',","'bi.calendar',","'bi.clear_editor',","'bi.clipboard',","'bi.direction_pager',","'bi.down_list_combo',","'bi.fine_tuning_number_editor',","'bi.float_center',","'bi.grid',","'bi.horizontal',","'bi.icon_button',","'bi.image_button',","'bi.label',","'bi.left_right_vertical_adapt',","'bi.list_pane',","'bi.month_combo',","'bi.quarter_combo',","'bi.search_editor',","'bi.text_button',","'bi.toast',","'bi.vertical',","'bi.year_combo',","'body'","'body',","'button1'}},{height:","'button1'}},{width:","'button2'}},{height:","'button2'}},{width:","'button3'}}","'button3'}}]","'common',","'demo.vertical',","'fill',","'fill',el:","'fill']","'fill'],","'label1'}},{","'label2'},{","'label3'}","'sum(c5,","'一般按钮',","'文字按钮',","'点击我弹出一个消息框',","'简单toast测试',","()","(family,","(i","(i,","(index)","(options,","(row1,","(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高","(v)","(width,height)分别表示画布宽高","(x,","(x,y)","(x,y,r)分别表示原点的横坐标,纵坐标,以及半径","(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径","(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容","(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色","(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角bord","(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整","(x0,","(注:","*","+",",一些需要在设置状态后做的额外工作可以通过重写_setxxx来实现)","...",".attr({stroke:","/","//","//7表示八月","//width:","//初始化当前页,","//必选项","//最大日期","//最小日期","0","0\",","0,","0,behaviors:","0,layouts:","0,vgap:","01","01'","01',","0}]","1","1\",","1)","1,","1.","1.1\",","1.222222222222222222222222222222222222\",","10","10)","10,","100","100,","100,el:","100;","100],","11","11,","110,","1111\",","12","12,","130],","145","16,","18,","1:","1;}","1],","1表示自动","1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",","2","2\",","2,","2.","2.1\",","2.2\",","20","20,","200","200,","200,el:","200]","200],","2010,","2015","2015,","21,","22,","24","25","25,","26)',","2:","2,为了演示label是占满整个的,用了一个whitespace:normal\",","3","3.","30","30,","300","300,","30;","31'","31',","35","37","4","4.","400","400,","5,","50","50,","500","500,","500],","50],","6,","600","600,","7","7,","70,","8),","80,","90","90,",":","=","[","[\"\",","[0,","[10,","[100,","[20,","[200,","[200,200],","[50,50,200,250,400],","[82,","[[{","[[{el:","[]","[],","[{","[{type:","[{width:","]","accept","adapt","adapter:","adaptive_t","adapt上下自适应\",","adapt左右自适应\",","add","additem","additem(arr)","addwidget","adjustheight","adjustlength","adjustlength:","adjustview","adjustwidth","adjustxoffset","adjustyoffset","aftercardcr","aftercardshow","aftercopi","aftercopy:","alert","align","align:","all_count_pag","allowblank","api","array","array/numb","attr","attribut","auto左右自适应\",","b","b:","basecl","basic_button","basic_sure\")","beforeclick","beforecr","beforedestroy","beforemount","behavior","bg\"","bg1\"","bg1\",","bg2\"","bg2\",","bg3\"","bg3\",","bg4\",","bg5\"","bg5\",","bg6\"","bgap","bi.adaptive_t","bi.all_count_pag","bi.barpopoversection()).open(id);","bi.basic_button","bi.basicbutton","bi.bord","bi.branch_rel","bi.branch_tre","bi.bubbl","bi.bubble_combo","bi.button","bi.button_group","bi.button_tre","bi.buttongroup.choose_type_multi,","bi.buttongroup.choose_type_singl","bi.buttongroup.choose_type_single,","bi.calendar","bi.canva","bi.cent","bi.center_adapt","bi.clear_editor","bi.cleareditor.event_clear","bi.clipboard","bi.code_editor","bi.collection_t","bi.collection_view","bi.collectionview.event_scrol","bi.color_choos","bi.color_chooser_popup","bi.combo","bi.combo.event_after_hideview","bi.combo.event_after_init","bi.combo.event_after_popupview","bi.combo.event_before_hideview","bi.combo.event_before_popupview","bi.combo.event_chang","bi.combo.event_collaps","bi.combo.event_expand","bi.combo.event_trigger_chang","bi.combo_group","bi.createwidget();}","bi.createwidget({","bi.custom_tre","bi.customdatetimecombo.event_cancel","bi.customdatetimecombo.event_confirm","bi.direction.bottom","bi.direction.right,","bi.direction.top","bi.direction_pag","bi.display_tre","bi.downlistcombo.event_before_popupview","bi.downlistcombo.event_chang","bi.downlistcombo.event_son_value_chang","bi.editor","bi.editor.event_backspac","bi.editor.event_blur","bi.editor.event_chang","bi.editor.event_click","bi.editor.event_confirm","bi.editor.event_empti","bi.editor.event_ent","bi.editor.event_error","bi.editor.event_focu","bi.editor.event_key_down","bi.editor.event_paus","bi.editor.event_remov","bi.editor.event_restrict","bi.editor.event_spac","bi.editor.event_start","bi.editor.event_stop","bi.editor.event_valid","bi.editor_trigg","bi.emptyfn","bi.excel_t","bi.expand","bi.expander.event_after_hideview","bi.expander.event_after_init","bi.expander.event_after_popupview","bi.expander.event_before_hideview","bi.expander.event_before_popupview","bi.expander.event_chang","bi.expander.event_collaps","bi.expander.event_expand","bi.expander.event_trigger_chang","bi.extend(v,","bi.extend({},","bi.finetuningnumbereditor.event_confirm","bi.float_box","bi.float_cent","bi.flow","bi.formula_editor","bi.grid","bi.grid_t","bi.grid_view","bi.gridview.event_scrol","bi.handstand_branch_tre","bi.horizont","bi.horizontal_adapt","bi.horizontal_auto","bi.horizontal_float","bi.horizontalalign.right,","bi.htap","bi.i18ntext(\"bi","bi.icon_button","bi.icon_combo","bi.icon_trigg","bi.image_button","bi.label","bi.layer_tree_t","bi.lazy_load","bi.left_right_vertical_adapt","bi.level_tre","bi.list_load","bi.list_pan","bi.load","bi.makearray(100,","bi.map([{value:","bi.monthcombo.event_before_popupview","bi.monthcombo.event_confirm","bi.msg","bi.msg.alert(title,","bi.msg.confirm('测试消息框',\"我是测试消息框的内容\");","bi.msg.toast(\"这是一条简单的数据\");","bi.multi_popup_view","bi.multi_select_item","bi.multi_tree_combo","bi.multifile_editor","bi.multifileeditor.event_progress","bi.multifileeditor.event_upload","bi.multifileeditor.event_uploadstart","bi.multilayer_select_tree_combo","bi.multilayer_single_tree_combo","bi.multiselectcombo.event_confirm","bi.multitreecombo.event_confirm","bi.navig","bi.nodebutton","bi.numericalinterval.event_error","bi.numericalinterval.event_valid","bi.pag","bi.page_t","bi.pager.event_after_popul","bi.pan","bi.panel","bi.popovers.create(id,","bi.popovers.remove(id);","bi.popup_panel","bi.popup_view","bi.popuppanel.event_chang","bi.popuppanel.event_click_toolbar_button","bi.popuppanel.event_clos","bi.preview_t","bi.quartercombo.event_before_popupview","bi.quartercombo.event_confirm","bi.random(1,","bi.resizable_t","bi.responsive_t","bi.search","bi.search_editor","bi.searcheditor.event_clear","bi.searcher.event_after_init","bi.searcher.event_chang","bi.searcher.event_paus","bi.searcher.event_search","bi.searcher.event_start","bi.searcher.event_stop","bi.searcher_view","bi.select_list","bi.select_tree_combo","bi.selection.singl","bi.sgement","bi.shelter_editor","bi.sign_editor","bi.sign_initial_editor","bi.simple_tre","bi.singl","bi.single_select_item","bi.single_select_radio_item","bi.single_tree_combo","bi.singletreecombo.event_before_popupview","bi.slid","bi.sort_list","bi.state_editor","bi.static_combo","bi.svg","bi.switch","bi.switch_tre","bi.tabl","bi.table.event_table_after_init","bi.table.event_table_res","bi.table.event_table_scrol","bi.table_view","bi.td","bi.text_button","bi.text_editor","bi.text_trigg","bi.text_value_combo","bi.text_value_down_list_combo","bi.textarea_editor","bi.toast","bi.tree_t","bi.uuid()","bi.uuid();","bi.vert","bi.vertical_adapt","bi.verticalalign.middl","bi.verticalalign.top","bi.virtual_group","bi.virtual_list","bi.vtap","bi.widget","bi.yearcombo.event_before_popupview","bi.yearcombo.event_confirm","bi.yearmonthcombo.event_before_popupview","bi.yearmonthcombo.event_confirm","bi.yearquartercombo.event_before_popupview","bi.yearquartercombo.event_confirm","bindev","block","blocksiz","blur","blur事件","boolean","border","border\",","bottom","bottom,left","bottom,right","bottom:","branch","branch_expander组件配置项","branch_expander配置","branch_rel","branch_tre","bubbl","bubble_combo","button","button_group","button_tre","button的选中状态","calendar","callback","callback({","callback)","callback,","canva","canvas.branch(55,","canvas.circle(150,","canvas.stroke();","canvas绘图,基类bi.widget","card\",","cardcreat","cardcreator:","cardnam","case","cellsizeandpositiongett","cellsizeandpositiongetter:","center","center:","center_adapt","centeroffset","centeroffset:","check","childern","children:","choose_type_singl","choose_type_single,choose_type_multi,choose_type_all,choose_type_none,choose_type_default","choosetyp","choosetype:","choosetype可选值为","circl","cl","class类名","clear","click","click,","click,hov","clipboard","close","closemax","closemin","cls:","cls:\"layout","cneter","code_editor","collection_t","collection_view","collectionview,指定行列可以删除看不见的元素","color","color)分别表示原点的横坐标,纵坐标,半径以及颜色","color_choos","color_chooser_popup","column","column:","columns","columns:","columnsize:","columnwidthgett","columnwidthgetter:","combo","combo,基类bi.widget","comboclass","combo弹出层位置","combo类","common","common,success,warning,ignor","complex_canva","confirm","const","content","content)","context","copi","copy:","count","count:","creat","crosshead","crossheader,","crossheader:","crossitem","crossitems,","crossitems:","curr","curr:","custom_date_tim","custom_tre","data","date_combo","date_pane_widget","day","day:","day}","dblclick,","defaultshowindex","destroy","destroywhenhid","dialog","direct","direction:","direction_pag","direction_path_choos","disabl","disabled\",","disabled:","disabledhov","disableerror","disableselect","disablewatermark","dishov","display_tre","dobehavior","doclick","dohighlight","doredmark","dosearch","down_list_combo","dynamic:","dynamic:false}","dynamic:true}","dynamicshow","dynamicshowfirstlast","dynamicshowprevnext","e","east:","editor","editor_trigg","editor的value发生改变触发","el","el:","element:","element:\"#wrapper\",","element:\"body\",","ellips","empti","enabl","enableerror","enablehov","enablewatermark","end)","errortext","errortext:","estimatedcolumns","estimatedcolumnsize:","estimatedrows","estimatedrowsize:","event_after_hideview","event_after_init","event_after_popupview","event_before_hideview","event_before_popupview","event_collaps","event_expand","event_float_box_clos","event_paus","event_search","event_start","event_stop","event_trigger_chang","event_value_chang","excel_t","expand","expanderclass","expander初始化后触发","expander展开触发","expander收起触发","extracl","faker.name.findname(),","fals","false,","field","fieldtextvaluemap","file_manag","finetuning_number_editor","fineui2.0引入生命周期后,widget的实现类不需要重写setenable,setvalid等方法,会自动调用子组件的对应方法","fineuidoc","fineui的交互、前端以及视觉文档规范","first","first:","firstpag","firstpage:","float_box","float_cent","floatbox弹出层,bi.widget","float左右自适应\",","flow","fn","focu","focus事件","font\"","font\",","font,","footer","footerrows","forcecent","forcenotselect","forceselect","foreign:","formula_editor","freezecol","freezecols:","function","function()","function(){","function(){return","function(i,","function(idx,","function(op.callback)","function(option)","function(options,","function(row1,","function(v)","getallbutton","getallleav","getbyid","getcalculatecolumns","getcalculateregioncolumns","getcalculateregionrows","getcheckstr","getclientregioncolumns","getcolumn","getcolumns","getcurrentpag","getelementbypoint","getelementsbypoint","geterrortext","getfont","getformulastr","getheight","gethpag","getimageheight","getimagewidth","getindexbyvalu","getitems:","getkeyword","getlastvalidvalu","getlefthorizontalscrol","getmaxscrollleft","getmaxscrolltop","getnam","getnodebyid","getnodebyvalu","getnotselectedbutton","getnotselectedvalu","getpopupposit","getregioncolumns","getregions","getrighthorizontalscrol","getscrollleft","getscrollregioncolumns","getscrollregionrows","getscrolltop","getselect","getselectedbutton","getselectedcard","getselectedid","getselectedtab","getselectedvalue()","getsrc","getstat","getstyl","gettab","gettag","gettext","gettiptyp","gettitl","getusedfield","getvalu","getvalue,","getverticalscrol","getview","getvlau","getvpag","getwarningtitl","getwidgetbynam","getwidth","gradient","grid","grid_tabl","grid_view","group","group_combo","groups:","h","ha","handl","handler","handler:","handstand_branch_tre","hashnext","hashprev","hasmatch","hasnext","hasnext:","hasprev","hasverticalscrol","hasvnext","hasvprev","haswidget","header","header,","header:","headercellstylegett","headerrows","height","height:","height:30","height:50,","hgap","hgap:","hide","hidecheck","hideview","hollow","horizont","horizontal:","horizontal_adapt","horizontal_auto","horizontal_float","horizontaloverscans","hover","hover\"","hoverclass","hover事件","hover类","htape","html标签","icon_button","icon_combo","icon_trigg","iconclass","iconclass:","iconcls1:","iconcls:","iconheight","iconwidth","icon的类名","id","id:","imag","image_button","index","inittre","inputtyp","insertfield","insertfunct","insertoper","insertparam","insertstr","invalid","invis","isallselect","isautosearch","isautosearch为false时启用","isautosync","isdefaultinit","isdisableselect","isedit","isen","isexpand","isfinald","isforcenotselect","isforceselect","isfrontd","ismount","isneedadjustheight","isneedadjustwidth","isneedfreez","isneedfreeze:","isneedmerg","isneedmerge:","isneedres","isneedresize:","isol","isonc","isopen","isreadonli","isresizeadapt","isresizeadapt:","issearch","isselect","isshadowshowingonselect","isstatevalid()","isvalid","isviewvis","isvis","item","item)","item,","item.text,","items,","items:","items:[]","itemscr","itemscreator:","items构造器","json","jump","key","key,valu","key:","keydown时触发","keyword","keywords:","key:键,value:值","label","last","last:","lastpag","lastpage:","layer_panel","layer_tree_t","layout","layouts:","lazy_load","lclick","left","left,center,right","left,right,cent","left:","left_right_vertical_adapt","letter_spacing,","level","level,","level:","level_tre","lgap","lhgap","lhgap:","line","line_spacing)","lineheight","linewidth:","list_load","list面板,基类bi.widget","llgap","load","loader","logic","logic:","lrgap","mark","masker","masker:","masker层","matcher","matchresult,","math.floor(index","max","max:","maxcolumns","maxheight","maxheight:","maxsiz","maxwidth","mergecol","mergecols:","mergerul","messag","message,","min","min:","min_width","mincolumns","mincolumnsize:","minheight","minwidth","month","month,","month:","month_combo","monthbehavior","mount","mousedown,","mouseup,","multi_popup_lay","multi_select_combo","multi_select_item","multi_tree_combo","multifile_editor","multilayer_select_tree_combo","multilayer_single_tree_combo","multipl","m})","name","name,widget","nameorwidget","navig","new","next","no_select\")","no_selected_item\")","node","node:","node_button","normal,nowrap","north,east,west,south,cent","north:","nowrap","null","null),","number","number,funct","number/boolean","number/funct","number/str","numeric_interv","obejct","obj({year:","object","object:","offset:","offsetstyl","onc","once:","onject","onkeydown","onload","onsearch","op","open","open:","opt","option.count","origin,","overflowi","overflowx","overlap","overscancolumncount","overscanheight","overscanrowcount","padding值","page","page_t","pager","pager:","pager刷新完成事件","pages:","pages为数字时可用","pages为数字时可用,","pane","pane_list","panel","panel的value发生改变触发","panel的关闭事件","param","paramformatt","path","path_choos","pathstr","pid:","poplulate(items)","popul","populate(bi.map(bi.map(bi.makearray(3,","populate)","populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件","popup","popup\"","popup:","popup组件","prependitem","prev","preview_t","primary:","print","prompt","props.clear","py","quarter_combo","quitcheck","radius,","radius大小","readonli","rect","redmark:","refresh","region:","regioncolumns","regiontext:","relation_view","remov","removeitem","removeitemat","removetab","removewidget","render","reset","resetheight","resetlastvalidvalu","resetlistheight","resetlistwidth","resetwidth","resiz","resizable_t","resizehead","responsive_t","restor","result,","return","rgap","rhgap","rhgap:","right","right:","root","row","row2","row2)","row:","rowheightgett","rowheightgetter:","rows:","rowsiz","rowsize:","rrgap","scrolli","scrollleft","scrollleft,","scrollleft:","scrolltop","scrolltop:","scrolltop}","scrollx","searcher","searcher.populate([{","searchresult,","sectionprovid","segment","select","select_list","select_tree_combo","selectal","selected:","selectedtim","sequencecellstylegett","set","setadapt","setallpag","setallselect","setclosemaxenable(boolean)","setcloseminenable(boolean)","setcolumns","setcount","seten","setenabledvalu","seterrortext","seterrorvis","setestimatedcolumns","setestimatedrows","setfieldtextvaluemap","setfinish","setfunct","setheadercolumns","setheight","sethpag","sethpagervis","setimageheight","setimagewidth","setlefthorizontalscrol","setmaxenable(boolean)","setminenable(boolean)","setnotselectedvalu","setnumtip(string)","setopen","setoverflowi","setoverflowx","setpagervis","setregioncolumns","setrighthorizontalscrol","setscrollleft","setscrolltop","setselect","setsiz","setsrc","setstart","setstat","setstorecolor","setstyl","settag","settext","settextstyl","settings:","settipvis","settitl","settoolbarvis","setvalid","setvalid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setxxx来实现","setvalu","setverticalscrol","setviewbox","setvis","setvisible,","setvpag","setvpagervis","setwarningtitl","setwidth","setzindex","shadow","shelter_editor","show","showhint","showview","sign_editor","sign_initial_editor","simple_tre","singl","single_select_item","single_select_radio_item","single_tree_combo","size,","slider","slider插件","solid","sort_list","sourc","south:","src","src:","start,","state_editor","static_combo","sting,object","stopev","stoppropag","stopsearch","str","stretch)","string","string,","string,object","string/funct","string/numb","stroke","strokestyle:","style","style,","success,warn","summarycellstylegett","svg","svg.path(\"m10,10l50,50m50,10l10,50\")","svg绘图,基类bi.widget","switch","switch_tre","switcher","switcherclass","switchselect","tab","tab:","tabl","table_view","table作为一个列表集合存在,继承bi.widget","table初始化完成后触发","table大小调整时触发(窗口变化等)","tab标签页","tab页元素","tag","tagnam","td","text","text:","text_button","text_trigg","text_value_combo","text_value_downlist_combo","textalign","textarea_editor","textheight","textheight:","textwidth","textwidth:","tgap","this.button_group,","tiptext","tiptyp","titl","title,","title,opt","title:","titlebutton","titlebuttons:","title文本","title类型","toast","toast提示","toggl","tool","toolbar位置","toolbar栏","top","top,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)","top,bottom,left,right,custom","top,left","top,right","top:","tree","tree.inittree({","tree.populate(items);","tree_tabl","trigger","triggercollaps","triggerexpand","triggerwidth","trigger发生改变触发","true","true,","true,fals","true/fals","true;}","true;}},","type","type:","unhighlight","unredmark","updat","upload","url","v","v)","v:","valid","validationcheck","valu","value){","value,","value,可以是单个值也可以是个数组","value:","value值","var","vertic","vertical:","vertical_adapt","verticalalign","verticaloverscans","vgap","vgap:","vgap:10","virtual_group","virtual_list","visibl","vtape","warningtitl","watermark","watermark:","watermark:\"带清除按钮的输入框\",","watermark:\"搜索\",","watermark:\"请输入内容\"","watermark:'请输入公式',","weight,","west:","whitespac","whitespace:","widget","width","width:","x1,","x2,","x2,y2...)","x:","y,","y0,","y0为根节点,分支到x1,y1,","y1)","y1,","y2)","y:","year","year:","year_combo","year_month_combo","year_quarter_combo","yearbehavior","z","zindex在1000w,bi.widget","zindex在1000w,基类bi.multipopupview","{","{dynamic:false}","{dynamic:true,scrolly:true}","{dynamic:true}","{el:","{height:","{offset:","{redmark:","{region:","{return","{scrollleft:","{text:","{type:","{type:\"bi.horizontal\",hgap:10,vgap:0}","{year,","{}","{},","{},layouts:","{},popup:","{}}","|","}","})","}))","}),","});","},","},items:","},{","};","}]","}],","}];","}]]","}]],","}]}","—","一组具有相同属性的元素集合,基类bi.buttongroup","一组具有相同属性的元素集合,基类bi.widget","一般的button父级,基类bi.singl","三级参数","上一页","上下的高度固定/左右的宽度固定,中间的高度/宽度自适应","上传结束后触发","上传过程中触发","下一页","下拉列表弹出前触发","下拉列表弹出后触发","下拉列表收起前触发","下拉列表收起后触发","下拉列表的弹出方式","下拉框初始化后触发","下拉框展开触发","下拉框弹出前触发","下拉框弹出层,","下拉框弹出层的多选版本,toolbar带有若干按钮,","下拉框收起触发","不仅有选中状态而且有展开状态,","不变\",","不考虑超出边界的情况,","为解决排序问题引入的控件","主要作用于setvalue方法","之后初始值会一直显示的editor","事件","事件名称","事件方法","事件详见editor","二级参数","二级可选节点下拉框树","二级树","二级树下拉框","二维数组,每个元素代表一条路径","二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向","交叉表内容二维数组","交叉表头","交叉项","代码文本框,基类bi.singl","优化过的buttongroup,删除看不见的元素","使用populate来清空或者重置布局,不要使用empty,","使能选中","保存表","值","停止搜索","停止搜索触发(搜索框为空)","停止输入触发","储存","允许上传的文件类型","元素","元素内的空白处理方式","元素内空白处理方式","元素创造器","元素的垂直对齐方式","公式编辑控件,基类bi.singl","关联视图","关键字标红字符串","关闭弹出层","其他事件详见editor","其他事件详见input","具体配置方法见combo","内容项","内部元素间横向距离","内部元素间纵向距离","内部前插入","内部后插入","冻结列","冻结的列","冻结的列号,从0开始,isneedfreeze为true时生效","分页控件,基类bi.widget","分页表格","分页计数","分页选项","切换trigger图标的combo","切换显示或隐藏面板,bi.widget","切换树结构","切换状态","切换类","列宽","列宽数组","列宽,必设","列数","列表","列表创建器","列表展示的table,继承bi.widget","列表最前添加元素","列表最后添加元素","列项宽度","列项间的","创建卡导航页页之后","初始化之后","初始化当前页","判断是否怎么点击都不会被选中","判断是否显示","判断是否有上一页","判断是否有上一页,pages不可用时有效","判断是否有下一页","判断是否有下一页,pages不可用时有效","判断是否有前一页的函数","判断是否有前一页的方法","判断是否有后一页的方法","判断是否有效","判断是否有该组件","判断是否点击即选中","判断是否让选中","判断组件是否挂载","判断节点是否展开","刷新内容","刷新列表","刷新或者清空列表","刷新文本框","剪切板","加载tree结构","加载中","加载完成回调","加载完成的回调(测试了无效果)","加载完毕","加载控件,bi.widget","区间不合法的状态事件","区间合法的状态事件","区间是否成立)","单元格宽度集合","单元格控件,继承bi.layout","单选combo,trigger显示项不会改变","单选框item,基类bi.basicbutton","即是否保持搜索面板和adapter面板状态值的统一","去掉所有内容","参数","参数显示值构造函数","参数设置","参考button_group","参考input输入框类型","参考相关css属性","取消hover事件","取消文本标红","取消文本高亮","取消标红","可以单选多选切换的树,继承bi.widget","可以合并单元格,指定行列可以删除看不见的元素,基类bi.widget","可以点击的label,基类bi.basicbutton","可以点击的一行文字,基类bi.basicbutton","可以理解为multipopupview和panel两个面板的结合体,基类bi.multipopupview","可调整列宽的grid表格,继承bi.widget","可选值","右区间初始状态","右边容器left","右边容器right","右边容器左右padding值","各种item","各种segment","各种节点node","合并的单元格列号","合并规则,","名称","回调参数","回车事件","回车但是值不合法","图标button,基类bi.basicbutton","图标宽度","图标按钮trigger","图标类型","图标高度","图片的button,基类bi.basicbutton","图片路径","在未知宽度和高度时有效","垂直tape布局,两列定高,一列自适应","垂直流式布局","基本的表格","基础class类","基础元素","基础属性","基础用法","基类bi.widget","填充中空的路径","填充实心的路径","增加","增加内容","增加行","增加项","复杂的canvas绘图","复选框item,基类bi.basicbutton","多层下拉列表的下拉框","多层级下拉单选树","多层级下拉可选节点树","多文件,基类bi.singl","子控件对象","子控件数组","子组件","子组件二维数组","子组件数组","子组件构造器","子项","子项创建函数","子项数组","子项,pid代表父节点id","字段集合","存储","存储数据","季度选择下拉框","完全匹配的构造器","完成拷贝后执行的方法","宽度","宽度width","对外方法","对话框","对话框内容","对话框标题","对齐方向","对齐方式","导航栏","导航栏控件,bi.widget","导航页展示之后","层级树状结构的表格","展开类","属性","工具栏的方向","左区间初始状态","左右分离,垂直方向居中容器","左边容器left","左边容器right","左边容器左右padding值","已经加载","布局","布局逻辑","带方向的路径选择","带有标题栏的panel,基类bi.widget","带标记的文本框,基类bi.widget","带标记的文本框,需手动控制进入编辑状态","带清除按钮的输入框","带确定的复选下拉框","年份选择下拉框","年季度选择下拉框","年月选择下拉框","开启panel的元素","开启popup元素","开启弹出层的元素","开启或者隐藏弹出层","开始上传时触发","开始搜索","开始搜索触发","开始绘制","开始输入触发","弹出列表和trigger的位置关系","弹出列表和trigger的距离","弹出层","弹出层宽度","弹出层显示位置","弹出层显示的位置元素","弹出层最大宽度","弹出层最大高度","弹出层最小宽度","弹出层最小高度","弹出层点击触发","弹出层的位置","弹出层高度","弹出框弹出前触发","弹窗层是否可见","当前状态是否有效(输入是否合法,","当前页","当前页,","当没有元素时有提示信息的view,","得到列宽","总行数","总页数","恢复hover可用","恢复文本框placeholder可用","慎用resiz","懒加载loader","所有控件的超类","所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类bi.widget","打开弹出层","扩展class类","拼音","挂载组件","指定初始值","按下backspace触发","按下空格触发","按钮文本内容","按钮文本宽度","按钮文本高度","按钮类型","按钮组","按键事件","排序列表","控件位置","控件都会提供setenable,","控件都会提供setvalue,","控件高度","提示titl","提示性信息","提示消息框","提示类型","插入函数","插入参数","插入字符串","插入操作符","搜索中","搜索列表位置","搜索到的元素","搜索暂停触发(搜索文本以空白字符结尾)","搜索框","搜索结果面板初始化完成后触发","搜索结果面板发生改变触发","搜索逻辑控件,bi.widget","搜索面板,","摧毁元素","摧毁表","效果相当于容器bottom","效果相当于容器left","效果相当于容器right","效果相当于容器top","效果相当于容器上下padding值","效果相当于容器左右padding值","效果相当于文本框bottom","效果相当于文本框left","效果相当于文本框right","效果相当于文本框top","效果相当于文本框上下padding值","效果相当于文本框左右padding值","效果相当于文本框左右padding值,如果clear属性为true,该属性值置0","数值区间控件","数值微调器","数据","文件上传","文件管理器","文件路径","文字布局","文字类型的按钮,基类bi.basicbutton","文本value值","文本内容","文本域,基类bi.singl","文本域失焦","文本域的值","文本域获取焦点","文本对齐方式","文本标签","文本标签宽度","文本标红","文本框,基类bi.singl","文本框placehold","文本框值","文本框值是否有效","文本框失焦","文本框宽度","文本框是否处于编辑状态","文本框获取焦点","文本框高度","文本框默认值","文本输入框trigger","文本高亮","文档规范","方法","方法名","无","无论怎么点击都不会被选中","日历控件","日期选择下拉框的弹出面板","日期选择下拉框(可以选择时分秒)","日期选择下拉框(弹出的年月选择可以进一步选择日期)","时合并","是否为单页","是否为最大日期","是否为最小日期","是否停止mousedown、mouseup事件","是否停止mousedown、mouseup向上冒泡","是否允许为空","是否允许空值","是否允许退出编辑函数","是否全选中","是否冻结","是否冻结列","是否出现滚动条","是否动态显示上一页、下一页,dynamicshow为false时生效","是否动态显示上一页、下一页、首页、尾页,","是否动态显示首页、尾页,dynamicshow为false时生效","是否匹配","是否去掉边框和背景","是否只允许点击一次","是否只读","是否可改变列大小","是否可用","是否可见","是否含有数值滚动条","是否含有遮罩层","是否块状显示,即不显示边框,没有最小宽度的限制","是否支持多选","是否无论如何都要居中,","是否显示尾页","是否显示总页数","是否显示提示信息","是否显示横向滚动条","是否显示纵向滚动条","是否显示阴影","是否显示首页","是否有上一页","是否有下一页","是否有前一页","是否有匹配的元素","是否有后一页","是否有效","是否正在搜索","是否自动同步数据,","是否自动搜索","是否被选中","是否调整时自适应","是否阻止事件","是否隐藏弹出层检测","是否需要冻结","是否需要冻结列","是否需要冻结单元格","是否需要冻结表头","是否需要合并单元格","是否需要在调整列宽或区域宽度的时候它们自适应变化","是否需要宽度调整","是否需要表尾","是否需要调整列宽","是否需要调整大小","是否需要高度调整","是否默认初始化子数据","是否默认初始化子节点","是否默认显示","是否默认显示tab页","显示","显示内容","显示弹出层","显示总页数","显示页码的分页控件","普通单元格高度","暂停搜索","暂停输入触发(输入空白字符)","更换新的内容","更改树结构内容","替换为新内容","替换为新的内容","替换内容","最后一页","最后一页,在万不得已时才会调用这个函数获取最后一页的页码,","最大值","最大值初始值","最大列宽","最大可选数量","最大宽度","最大日期","最大高度","最小值","最小值初始值","最小列宽","最小宽度","最小宽度,如果block/clear中某一项为true,此项值为0,否则为90","最小日期","月份选择下拉框","有二级下拉菜单的combo","有总页数和总行数的分页控件","构造树结构","某个可以展开的节点,基类bi.widget","标红","标题","标题后的按钮组","树下拉框,继承bi.widget","树展示控件","树状结构的表格","根据id获取nod","根据id获取节点","根据id返回元素","根据value值获取value在数组中的索引","根据value值获取节点","根据值获取node","根据值获取索引","根据值获取节点","根据制定参数打印出路径","根据组件名称获取组件","根组件","根节点所在方向","检查是否为空","横向分支的树","横向坐标是否有上一页","横向坐标是否有下一页","横向滚动距离","横向翻页设置","横向超出可视范围区域预加载的数量","横向间隙","正在加载","正在搜索时触发","每列宽度所组成的数组","每格列宽","每格行宽","气泡提示","气泡显示位置","气泡显示内容","气泡高度","水印","水平tape布局,两列定宽,一列自适应","水平分页选项","水平和垂直方向都居中容器,","水平方向居中自适应容器","水平流式布局","浮动布局实现的居中容器","浮动的水平居中布局","消息提示","添加字段","添加对象到json数组","添加组件","清空","清空label","清空内容","清空树","清空组件","渲染列表","渲染组件","滚动事件","滚动加载的个数","滚动时触发的事件","滚动条相对于左边的偏移","滚动条相对于顶部的偏移","灰化","点击一次后失效","点击一次选中有效,再点无效","点击一级节点触发","点击事件","点击事件之前","点击事件回调","点击二级节点触发","点击即选中,","点击取消触发","点击增加/减少按钮或者编辑框确定时触发","点击展开","点击工具栏事件","点击清空按钮触发","点击确定触发","点击确认触发","点击编辑框触发(不在编辑状态时)","生命周期函数","生成树方法","用于表格预览,继承bi.widget","用法","看不见的元素全部删除的list,基类bi.widget","确定输入触发(blur时且输入值有效)","确认消息框","移除tab面板页","移除制定元素","移除指定索引处的item","移除组件","空","第一页","简单的多选树","类似excel式的表格,继承bi.widget","类型","纵向分支的树","纵向分页,参数与horizont","纵向坐标是否有上一页","纵向坐标是否有下一页","纵向滚动距离","纵向翻页设置,参数与horizontal相同","纵向超出可视范围区域预加载的数量","纵向间隙","组件text值","组件value值","组件不在页面展示,组件事件和内容都在","组件实例刚被创建","组件实例创建完成","组件挂载","组件挂载之前","组件是否可见","组件更新","组件销毁前调用","组件销毁后调用","绑定事件","结束绘制","绘制","绘制图片","绘制圆形","绘制形状的集合","绘制文本","绘制树枝节点","绘制椭圆","绘制渐变色","绘制矩形","绘制线段","绘制路径","继承bi.widget","编辑框中的值,","网格布局","能处理静态宽度以及动态宽度的表","自定义下拉列表中item项的行为,如高亮,标红等","自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)","自定义下拉框trigger","自定义列表中item项的行为,如高亮,标红等","自定义工具栏","自定义年份选择的行为(详见button_group)","自定义树,基类bi.widget","自适应垂直居中布局","自适应宽度的表格","自适应宽度的表格,继承bi.widget","自适应左右垂直居中布局","自适应左右居中布局","节点展开","节点收起","节点数组","节点是否展开","若为false,则指对其设置使能状态","获取combo","获取tab面板页","获取tag","获取text值","获取tiptyp","获取titl","获取value值","获取warningtitl","获取值","获取公式框内容","获取列项","获取可用字段","获取右往左横向滚动距离","获取图片宽度","获取图片路径","获取图片高度","获取左到右横向滚动距离","获取弹出层","获取弹出层的位置","获取当前选中项内容","获取当前选中项的id属性","获取当前选中项的value值","获取当前页码","获取所有button","获取所有叶节点","获取所有未被选中的元素","获取所有的叶子节点","获取所有被选中的元素","获取所选项值","获取搜索关键词","获取搜索关键词数组","获取搜索列表栏","获取文件名称","获取文本值","获取文本域值","获取文本域样式","获取文本样式","获取文本框值","获取文本框最后一次输入的有效值","获取未选中植","获取未选中的根节点","获取校验内容","获取横向滚动条宽度","获取水平向页码","获取没有被选中的值","获取浏览器中显示的列项之间的间隙","获取滚动条相对于左边的偏移","获取滚动条相对于左边的最大偏移","获取滚动条相对于顶部的偏移","获取滚动条相对于顶部的最大偏移","获取纵向滚动条宽度","获取纵向滚动距离","获取纵向页码","获取组件名称","获取组件宽度","获取组件高度","获取被选中的值","获取计算后的列项上下之间的间隙","获取计算后的列项之间的间隙","获取选中的index","获取选中的tab面板页","获取选中的导航页","获取选中的根节点","获取选中项","获取错误文本","获取间隙大小","获取需要拷贝的值","获取颜色值","获得值","获得列项之间的间隙","获得垂直页数","获得当前值","获得所以根节点","获得所有叶节点","获得日期","获得水平页数","获得计算后的列宽","获根据给定的点坐标返回元素","行宽,必设","行数","行高","表关联树","表头","表头内容","表头行高","表头高度","表尾","表尾行高","表尾高度","表示一个可以展开的节点,","被选元素要触发的事件","见上","触发器宽度","警告消息框","记录状态的输入框,基类bi.widget","设tip可见","设定的年份","设定的日期","设定的月份","设置combo","设置error不可用","设置error可用","设置tag","设置text值","设置titl","设置toolbar是否可见","设置valu","设置value值","设置value值可用","设置z","设置值","设置储存的颜色值","设置全选","设置函数","设置列宽","设置列项之间的间隙","设置右区间开闭combo的disable状态","设置右区间输入框disable状态","设置右往左横向滚动距离","设置图片宽度","设置图片路径","设置图片高度","设置垂直方向是否有滚动条","设置字段集合","设置宽度","设置属性","设置左到右横向滚动距离","设置左区间开闭combo的disable状态","设置左区间输入框disable状态","设置弹出层显示的位置元素","设置当前值","设置当前选中项内容","设置当前页码","设置总页数","设置按钮宽度","设置按钮高度","设置数值区间的tip提示","设置文本值","设置文本域值","设置文本域样式","设置文本样式","设置文本框placeholder不可用","设置文本框值","设置文本框样式","设置日期","设置是否显示横向滚动条","设置未被选中的值","设置未选中值","设置标红的关键词","设置标题","设置横向分页键可见","设置每个单元格的位置坐标和宽高","设置水平方向是否有滚动条","设置水平页数","设置滚动条相对于左边的偏移","设置滚动条相对于顶部的偏移","设置画布可视区域","设置画布尺寸","设置纵向分页键可见","设置纵向滚动距离","设置纵向页数","设置组件不可用","设置组件不可见","设置组件可用","设置组件可见","设置组件宽度","设置组件属性","设置组件无效","设置组件是否可用","设置组件是否可见","设置组件是否有效","设置组件有效","设置组件高度","设置节点展开状态","设置行宽","设置表头的列宽","设置计数","设置选中值","设置选中的index","设置选中的文本","设置选中项","设置错误titl","设置错误文本","设置错误文本可见","设置页码是否可见","设置颜色值","设置高度","说明","调整宽度","调整弹出层显示的位置元素","调整搜索列表栏","调整横向偏移","调整纵向偏移","调整表头","调整表格","调整高度","谨慎监听和触发bi.controller.event_change事件,一般来说,控件都会有一个bi.classname.event_change事件,一些特殊的事件会在对应控件文档中列出","超出可视范围区域的高度","超出可视范围区域预加载多少列","超出可视范围区域预加载多少行","路径选择","输入为空时按下backspac","输入值无效的状态事件","输入值有效的状态事件","输入框为空时触发","输入框类型","输入较验函数","返回该对象","还原列表设置","这仅仅只是一个超类,","连续显示分页数","退出时验证函数","选中了就不会被取消,与once的区别是forceselected不影响事件的触发","选中文本框文本","选中日期或者退出编辑状态触发","选中状态下是否显示阴影","选中的初始年月","选择列表","选择文件","选择类型","选色控件","选色控件弹窗","通用按钮","通用按钮,详情见bi.button","通过给定的参数在已注册的字体中找到字体对象","通过鼠标或键盘输入字符","配置项","重心偏移量","重新设置高度","重置","重置列表宽度","重置列表高度","重置宽度","重置文本框最后一次输入的有效值","重置画布","重置高度","销毁事件","销毁组件","错误titl","错误信息","错误提示","错误提示titl","键","阻止事件","阻止事件冒泡","阻止冒泡","限定可选日期的上限","限定可选日期的下限","隐藏","隐藏弹出层","隐藏弹窗层是否销毁","需要设置的文本值text","需要设置的文本域样式style,例{\"color\":\"#000\"}","需要设置的文本标签样式,例{\"color\":\"#000\"}","需要设置的文本标签样式style,例{\"color\":\"#000\"}","需要设置的高度值height","非自适应,用于宽度高度固定的面板","靠左/右对齐的自由浮动布局","面板切换","面板展开","面板收起","面板显示之前","面板显示之后","面板显示的位置","面板构造之后","面板构造器","面板隐藏之前","面板隐藏之后","页数跳转","页码","预估列宽,rowheightgetter为function时必设","预估行宽,columnwidthgetter为function时必设","颜色值改变时触发","验证函数","高度","高度height","高级属性","默认row1","默认值","默认相等时合并","(以x0,"],"pipeline":["stopWordFilter","stemmer"]},"store":{"./":{"url":"./","title":"文档规范","keywords":"","body":"FineUIdocs\nFineUI的交互、前端以及视觉文档规范\n1. 控件都会提供setValue, getValue, populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件\n2. 控件都会提供setEnable, setVisible, setValid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setXXX来实现\n3. 使用populate来清空或者重置布局,不要使用empty, 慎用resize\n4. 谨慎监听和触发BI.Controller.EVENT_CHANGE事件,一般来说,控件都会有一个BI.ClassName.EVENT_CHANGE事件,一些特殊的事件会在对应控件文档中列出\n"},"core/layout/vertical.html":{"url":"core/layout/vertical.html","title":"vertical","keywords":"","body":"bi.vertical\n垂直流式布局\nsource\n\nBI.createWidget({\n type: 'demo.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"这里设置了hgap(水平间距),vgap(垂直间距)\",\n height: 30\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"这里设置了hgap(水平间距),vgap(垂直间距)\",\n height: 30\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nscrolly\n设置垂直方向是否有滚动条\nboolean\ntrue,false\ntrue\n\n\n\n\n"},"core/layout/horizontal.html":{"url":"core/layout/horizontal.html","title":"horizontal","keywords":"","body":"bi.horizontal\n水平流式布局\nsource\n\nBI.createWidget({\n type: 'bi.horizontal',\n element: \"#wrapper\",\n items: [{\n type: \"bi.text_button\",\n cls: \"layout-bg1\",\n text: \"这里设置了lgap,rgap,tgap,bgap\",\n height: 30,\n width: 200\n }, {\n type: \"bi.text_button\",\n cls: \"layout-bg2\",\n text: \"这里设置了lgap,rgap,tgap,bgap\",\n height: 30,\n width: 200\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\nverticalAlign\n元素的垂直对齐方式\nstring\n参考相关css属性\n\"middle\"\n\n\nscrollx\n设置水平方向是否有滚动条\nboolean\ntrue,false\ntrue\n\n\n\n\n"},"core/layout/htape.html":{"url":"core/layout/htape.html","title":"htape","keywords":"","body":"bi.htape\n水平tape布局,两列定宽,一列自适应\nsource\n\nBI.createWidget({\n type: \"bi.htape\",\n element: \"#wrapper\", \n items : [\n {\n width: 100,\n el : {\n type : 'bi.label',\n text : '1',\n cls: \"layout-bg1\"\n }\n }, {\n width: 200,\n el : {\n type : 'bi.label',\n text : '2',\n cls: \"layout-bg2\"\n }\n }, {\n width: 'fill',\n el : {\n type : 'bi.label',\n text : '3',\n cls: \"layout-bg3\"\n }\n }\n ]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[{width: 100,el: {type: 'bi.button', text: 'button1'}},{width: 'fill',el: {type: 'bi.button', text: 'button2'}},{width: 200,el: {type: 'bi.button', text: 'button3'}}]\n\n\n\n\n"},"core/layout/vtape.html":{"url":"core/layout/vtape.html","title":"vtape","keywords":"","body":"bi.vtape\n垂直tape布局,两列定高,一列自适应\nsource\n\nBI.createWidget({\n type: \"bi.vtape\",\n element: \"#wrapper\", \n items : [\n {\n height: 100,\n el : {\n type : 'bi.label',\n text : '1',\n cls: \"layout-bg1\"\n }\n }, {\n height: 200,\n el : {\n type : 'bi.label',\n text : '2',\n cls: \"layout-bg2\"\n }\n }, {\n height: 'fill',\n el : {\n type : 'bi.label',\n text : '3',\n cls: \"layout-bg3\"\n }\n }\n ]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n{height: 100,el: {type: 'bi.button', text: 'button1'}},{height: 'fill',el: {type: 'bi.button', text: 'button2'}},{height: 200,el: {type: 'bi.button', text: 'button3'}}\n\n\n\n\n"},"core/layout/center_adapt.html":{"url":"core/layout/center_adapt.html","title":"center_adapt","keywords":"","body":"bi.center_adapt\n自适应左右垂直居中布局\nsource\n\nBI.createWidget({\n type: \"bi.center_adapt\",\n element: \"#wrapper\",\n hgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Center Adapt 1\",\n cls: \"layout-bg1\",\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Center Adapt 2\",\n cls: \"layout-bg2\",\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/vertical_adapt.html":{"url":"core/layout/vertical_adapt.html","title":"vertical_adapt","keywords":"","body":"bi.vertical_adapt\n自适应垂直居中布局\nsource\n\nBI.createWidget({\n type: \"bi.vertical_adapt\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Vertical Adapt上下自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Vertical Adapt上下自适应\",\n cls: \"layout-bg2\",\n width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/left_right_vertical_adapt.html":{"url":"core/layout/left_right_vertical_adapt.html","title":"left_right_vertical_adapt","keywords":"","body":"bi.left_right_vertical_adapt\n左右分离,垂直方向居中容器\nsource\n\nBI.createWidget({\n type: 'bi.left_right_vertical_adapt',\n element: \"#wrapper\",\n lhgap: 10,\n rhgap: 10,\n items: {\n left: [{\n type: \"bi.label\",\n text: \"左边的垂直居中\",\n cls: \"layout-bg1\",\n width: 100,\n height: 30\n }],\n right: [{\n type: \"bi.label\",\n text: \"右边的垂直居中\",\n cls: \"layout-bg1\",\n width: 100,\n height: 30\n }]\n }\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlhgap\n左边容器左右padding值\nnumber\n—\n0\n\n\nlrgap\n左边容器right-padding值\nnumber\n—\n0\n\n\nllgap\n左边容器left-padding值\nnumber\n—\n0\n\n\nrhgap\n右边容器左右padding值\nnumber\n—\n0\n\n\nrrgap\n右边容器right-padding值\nnumber\n—\n0\n\n\nrhgap\n右边容器left-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/flow.html":{"url":"core/layout/flow.html","title":"flow","keywords":"","body":"bi.flow\n靠左/右对齐的自由浮动布局\nsource\n\nBI.createWidget({\n type: \"bi.center_adapt\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.left\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"Left-1\",\n cls: \"layout-bg1\",\n hgap: 20\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"Left-2\",\n cls: \"layout-bg2\",\n hgap: 20\n }],\n hgap: 20,\n vgap: 20\n }, {\n type: \"bi.right\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"Right-1\",\n cls: \"layout-bg3\",\n hgap: 20\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"Right-2\",\n cls: \"layout-bg4\",\n hgap: 20\n }],\n hgap: 20,\n vgap: 20\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n—\n\n\n\n\n"},"core/layout/center.html":{"url":"core/layout/center.html","title":"center","keywords":"","body":"bi.center\n水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\nsource\n\nBI.createWidget({\n type: \"bi.center\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n text: \"Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局\",\n cls: \"layout-bg1\",\n whiteSpace: \"normal\"\n },{\n type: \"bi.label\",\n text: \"Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal\",\n cls: \"layout-bg2\",\n whiteSpace: \"normal\"\n }],\n hgap: 20,\n vgap: 20\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/horizontal_adapt.html":{"url":"core/layout/horizontal_adapt.html","title":"horizontal_adapt","keywords":"","body":"bi.horizontal_adapt\n自适应左右居中布局\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_adapt\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Adapt左右自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Horizontal Adapt左右自适应\",\n cls: \"layout-bg2\",\n //width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ncolumnSize\n每列宽度所组成的数组\narray\n—\n[ ]\n\n\nverticalAlign\n元素的垂直对齐方式\nconst\n参考相关css属性\nBI.VerticalAlign.Middle\n\n\n\n\n"},"core/layout/horizontal_auto.html":{"url":"core/layout/horizontal_auto.html","title":"horizontal_auto","keywords":"","body":"bi.horizontal_auto\n水平方向居中自适应容器\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_auto\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Auto左右自适应\",\n cls: \"layout-bg1\",\n width: 300,\n height: 30\n }, {\n type: \"bi.label\",\n text: \"Horizontal Auto左右自适应\",\n cls: \"layout-bg2\",\n width: 300,\n height: 30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/horizontal_float.html":{"url":"core/layout/horizontal_float.html","title":"horizontal_float","keywords":"","body":"bi.horizontal_float\n浮动的水平居中布局\nsource\n\nBI.createWidget({\n type: \"bi.horizontal_float\",\n element: \"#wrapper\",\n vgap: 10,\n items: [{\n type: \"bi.label\",\n text: \"Horizontal Float左右自适应\",\n cls: \"layout-bg1\",\n width: 200,\n height:30\n }]\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\n\n\n"},"core/layout/float_center.html":{"url":"core/layout/float_center.html","title":"float_center","keywords":"","body":"bi.float_center\n浮动布局实现的居中容器\nsource\n\nBI.createWidget({\n type: 'bi.float_center',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n text: \"floatCenter与center的不同在于,它可以控制最小宽度和最大宽度\",\n cls: \"layout-bg1\",\n whiteSpace: \"normal\"\n }, {\n type: \"bi.label\",\n text: \"floatCenter与center的不同在于,它可以控制最小宽度和最大宽度\",\n cls: \"layout-bg2\",\n whiteSpace: \"normal\"\n }],\n height: 300,\n hgap: 20,\n vgap: 20\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n\n"},"core/layout/border.html":{"url":"core/layout/border.html","title":"border","keywords":"","body":"bi.border\n上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\nsource\nBI.createWidget({\n type: 'bi.border',\n element: \"#wrapper\",\n items: {\n north: {\n el: {type: \"bi.label\"},\n height: 30,\n top: 20,\n left: 20,\n right: 20\n },\n south: {\n el: {type: \"bi.label\"},\n height: 50,\n bottom: 20,\n left: 20,\n right: 20\n },\n west: {\n el: {type: \"bi.label\"},\n width: 200,\n left: 20\n },\n east: {\n el: {type: \"bi.label\"},\n width: 300,\n right: 20\n },\n center: {el: {type: \"bi.label\"}}\n }\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子控件对象\nobject\nnorth,east,west,south,center\n[ ]\n\n\n\n\n"},"core/layout/grid.html":{"url":"core/layout/grid.html","title":"grid","keywords":"","body":"bi.grid\n网格布局\nsource\n\nBI.createWidget({\n type: 'bi.grid',\n element: \"#wrapper\",\n columns: 2,\n rows: 2,\n items: [{\n column: 0,\n row: 0,\n el: {\n type: \"bi.label\",\n text: \"column-0, row-0\",\n cls: \"layout-bg1\"\n }\n }, {\n column: 1,\n row: 0,\n el: {\n type: \"bi.label\",\n text: \"column-1, row-0\",\n cls: \"layout-bg2\"\n }\n } {\n column: 0,\n row: 1,\n el: {\n type: \"bi.label\",\n text: \"column-0, row-1\",\n cls: \"layout-bg5\"\n }\n }, {\n column: 1,\n row: 1,\n el: {\n type: \"bi.label\",\n text: \"column-1, row-1\",\n cls: \"layout-bg6\"\n }\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ncolumns\n列数\nnumber\n—\nnull\n\n\nrows\n行数\nnumber\n—\nnull\n\n\nitems\n子控件数组\narray\n—\n[]\n\n\n\n\n"},"core/layout/table.html":{"url":"core/layout/table.html","title":"table","keywords":"","body":"bi.table\ntable作为一个列表集合存在,继承BI.Widget\nsource\nBI.createWidget({\n element: \"body\",\n type: \"bi.table\",\n items: [],\n columnSize: [100, \"fill\", 200],\n rowSize: [10, 30, 50, 70, 90, 110, 130],\n hgap: 20,\n vgap: 10\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nscrolly\n是否出现滚动条\nboolean\ntrue\n\n\ncolumnSize\n列项宽度\narray/number\n[200, 200, 'fill']\n\n\nrowSize\n行高\narray/number\n30\n\n\nhgap\n内部元素间纵向距离\nnumber\n0\n\n\nvgap\n内部元素间横向距离\nnumber\n0\n\n\nitems\n子项\narray\n[{width: 100,el: {type: 'bi.button', text: 'button1'}},{width: 'fill',el: {type: 'bi.button', text: 'button2'}},{width: 200,el: {type: 'bi.button', text: 'button3'}}]\n\n\n\n方法\n\n\n\n方法名\n说明\n用法\n\n\n\n\naddItem\n增加内容\naddItem(arr)\n\n\npopulate\n更换新的内容\npoplulate(items)\n\n\n\n"},"core/layout/td.html":{"url":"core/layout/td.html","title":"td","keywords":"","body":"bi.td\n单元格控件,继承BI.Layout\nsource\nBI.createWidget({\n type: \"bi.td\",\n element: 'body',\n columnSize: [20, 20, 'fill'],\n items: []\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncolumnSize\n列宽\narray\n[200, 200, 200]\n\n\nhgap\n纵向间隙\nnumber\n0\n\n\nvgap\n横向间隙\nnumber\n0\n\n\nitems\n内容项\narray\n[[{el: {text: 'label1'}},{ el: {text: 'label2'},{ el: {text: 'label3'}\n\n\n\n方法\n\n\n\n方法名\n说明\n用法\n\n\n\n\naddItem\n增加内容\naddItem(arr)\n\n\npopulate\n更换新的内容\npoplulate(items)\n\n\n\n"},"core/abstract/button_group.html":{"url":"core/abstract/button_group.html","title":"button_group","keywords":"","body":"bi.button_group\n一组具有相同属性的元素集合,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.button_group\",\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\n layouts: [{\n type: \"bi.vertical\"\n }],\n items: [{\n el: {\n type: \"bi.label\",\n text: \"button_group\"\n },\n height: 50,\n }]\n})\n\n\n\nAPI\n基础属性\nchooseType可选值为 CHOOSE_TYPE_SINGLE,CHOOSE_TYPE_MULTI,CHOOSE_TYPE_ALL,CHOOSE_TYPE_NONE,CHOOSE_TYPE_DEFAULT\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义列表中item项的行为,如高亮,标红等\nobject\n—\n{ }\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nchooseType\n选择类型\nconst\n见上\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\nlayouts\n布局\narray\n—\n[{type: \"bi.center\",hgap: 0,vgap: 0}]\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoBehavior\n自定义列表中item项的行为,如高亮,标红等\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\nremoveItems\n移除制定元素\nvalues\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetEnabledValue\n设置value值可用\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/abstract/button_tree.html":{"url":"core/abstract/button_tree.html","title":"button_tree","keywords":"","body":"bi.button_tree\n一组具有相同属性的元素集合,基类BI.ButtonGroup\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.button_tree\",\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\n layouts: [{\n type: \"bi.vertical\"\n }],\n items: [{\n type: \"bi.label\",\n text: \"0\",\n value: \"label1\",\n height:50,\n vgap:10\n }]\n})\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetEnabledValue\n设置value值可用\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\n\n\n"},"core/abstract/virtual_group.html":{"url":"core/abstract/virtual_group.html","title":"virtual_group","keywords":"","body":"bi.virtual_group\n优化过的buttonGroup,删除看不见的元素 基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.virtual_group\",\n width: 500,\n height: 300,\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\n layouts: [{\n type: \"bi.vertical\"\n }, {\n type: \"bi.center_adapt\",\n }],\n items:[]\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nlayouts\n布局\narray\n—\n[{type: \"bi.center\",hgap: 0,vgap: 0}]\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetValue\n获取被选中的值\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nitems\n\n\nrender\n渲染列表\n—\n\n\n\n\n"},"core/abstract/custom_tree.html":{"url":"core/abstract/custom_tree.html","title":"custom_tree","keywords":"","body":"bi.custom_tree\n自定义树,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.custom_tree\",\n el: {\n type: \"bi.button_tree\",\n chooseType: 0,\n layouts: [{\n type: \"bi.vertical\",\n hgap: 30\n }]\n },\n items: [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n open: true,\n type: \"bi.plus_group_node\",\n height: 25\n },\n {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n type: \"bi.plus_group_node\",\n height: 25\n },\n {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n type: \"bi.single_select_item\",\n height: 25\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nitemsCreator\n子组件构造器\nobject\n—\n{ }\n\n\nexpander\npopup组件\nobject\n—\n{el: {},popup: {type: \"bi.custom_tree\"}}\n\n\nel\n开启popup元素\nobject\n—\n{type: \"bi.button_tree\",chooseType: 0,layouts: [{type: \"bi.vertical\"}]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ninitTree\n构造树结构\nnodes\n\n\nstroke\n生成树方法\nnodes\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nnodes\n\n\nrender\n渲染列表\n—\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\n\n\n"},"core/abstract/grid_view.html":{"url":"core/abstract/grid_view.html","title":"grid_view","keywords":"","body":"bi.grid_view\n可以合并单元格,指定行列可以删除看不见的元素,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.grid_view\",\n width: 400,\n height: 300,\n estimatedRowSize: 30,\n estimatedColumnSize: 100,\n items: [],\n scrollTop: 100,\n rowHeightGetter: function () {\n return 30;\n },\n columnWidthGetter: function () {\n return 100;\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\noverflowX\n是否显示横向滚动条\nboolean\ntrue,false\ntrue\n\n\noverflowY\n是否显示纵向滚动条\nboolean\ntrue,false\ntrue\n\n\noverscanColumnCount\n超出可视范围区域预加载多少列\nnumber\n—\n0\n\n\noverscanRowCount\n超出可视范围区域预加载多少行\nnumber\n—\n0\n\n\nwidth\n行宽,必设\nnumber\n—\n—\n\n\nheight\n列宽,必设\nnumber\n—\n—\n\n\nrowHeightGetter\n每格行宽\nnumber,function\n—\nfunction\n\n\ncolumnWidthGetter\n每格列宽\nnumber,function\n—\nfunction\n\n\nestimatedColumnSize\n预估行宽,columnWidthGetter为function时必设\nnumber,function\n—\nfunction\n\n\nestimatedRowSize\n预估列宽,rowHeightGetter为function时必设\nnumber,function\n—\nfunction\n\n\nscrollLeft\n滚动条相对于左边的偏移\nnumber\n—\n0\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetScrollLeft\n设置滚动条相对于左边的偏移\nscrollLeft\n\n\nsetScrollTop\n设置滚动条相对于顶部的偏移\nscrollTop\n\n\nsetOverflowX\n设置是否显示横向滚动条\nb\n\n\nsetOverflowY\n设置是否显示横向滚动条\nb\n\n\ngetScrollLeft\n获取滚动条相对于左边的偏移\n—\n\n\ngetScrollTop\n获取滚动条相对于顶部的偏移\n—\n\n\ngetMaxScrollLeft\n获取滚动条相对于左边的最大偏移\n—\n\n\ngetMaxScrollTop\n获取滚动条相对于顶部的最大偏移\n—\n\n\nsetEstimatedColumnSize\n设置列宽\nwidth\n\n\nsetEstimatedRowSize\n设置行宽\nheight\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n回调参数\n\n\n\n\nBI.GridView.EVENT_SCROLL\n滚动时触发的事件\n{scrollLeft: scrollLeft, scrollTop: scrollTop}\n\n\n\n\n"},"core/abstract/collection_view.html":{"url":"core/abstract/collection_view.html","title":"collection_view","keywords":"","body":"bi.collection_view\nCollectionView,指定行列可以删除看不见的元素 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.collection_view\",\n element:\"#wrapper\",\n width: 400,\n height: 300,\n items: [],\n cellSizeAndPositionGetter: function (index) {\n return {\n x: index % 10 * 50,\n y: Math.floor(index / 10) * 50,\n width: 50,\n height: 50\n }\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\noverflowX\n是否显示横向滚动条\nboolean\ntrue,false\ntrue\n\n\noverflowY\n是否显示纵向滚动条\nboolean\ntrue,false\ntrue\n\n\ncellSizeAndPositionGetter\n设置每个单元格的位置坐标和宽高\nfunction\n—\n—\n\n\nhorizontalOverscanSize\n横向超出可视范围区域预加载的数量\nnumber\n—\n0\n\n\nverticalOverscanSize\n纵向超出可视范围区域预加载的数量\nnumber\n—\n0\n\n\nwidth\n行宽,必设\nnumber\n—\n—\n\n\nheight\n列宽,必设\nnumber\n—\n—\n\n\nscrollLeft\n滚动条相对于左边的偏移\nnumber\n—\n0\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetScrollLeft\n设置滚动条相对于左边的偏移\nscrollLeft\n\n\nsetScrollTop\n设置滚动条相对于顶部的偏移\nscrollTop\n\n\nsetOverflowX\n设置是否显示横向滚动条\nb\n\n\nsetOverflowY\n设置是否显示横向滚动条\nb\n\n\ngetScrollLeft\n获取滚动条相对于左边的偏移\n—\n\n\ngetScrollTop\n获取滚动条相对于顶部的偏移\n—\n\n\ngetMaxScrollLeft\n获取滚动条相对于左边的最大偏移\n—\n\n\ngetMaxScrollTop\n获取滚动条相对于顶部的最大偏移\n—\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n回调参数\n\n\n\n\nBI.CollectionView.EVENT_SCROLL\n滚动时触发的事件\n{scrollLeft: scrollLeft, scrollTop: scrollTop}\n\n\n\n\n"},"core/abstract/virtual_list.html":{"url":"core/abstract/virtual_list.html","title":"virtual_list","keywords":"","body":"bi.virtual_list\n看不见的元素全部删除的list,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.virtual_list\",\n element:\"body\",\n items: BI.map([{value: \"xxxx\"}], function (i, item) {\n return BI.extend({}, item, {\n type: \"bi.label\",\n height: 30,\n text: (i + 1) + \".\" + item.text,\n });\n })\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n子组件数组\narray\n—\n[ ]\n\n\nblockSize\n滚动加载的个数\nnumber\n—\n10\n\n\noverscanHeight\n超出可视范围区域的高度\nnumber\n—\n100\n\n\nscrollTop\n滚动条相对于顶部的偏移\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染列表\n—\n\n\nmounted\n组件挂载\n—\n\n\nrestore\n还原列表设置\n—\n\n\npopulate\n刷新列表\nitems\n\n\ndestroyed\n销毁组件\n—\n\n\n\n\n"},"core/combination/bi.combo.html":{"url":"core/combination/bi.combo.html","title":"combo","keywords":"","body":"bi.combo\ncombo,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.combo\",\n element: \"body\",\n adjustLength: 2,\n el: {\n type: \"bi.button\",\n text: \"测试\",\n height: 25\n },\n popup: {}\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\ndestroyWhenHide\n隐藏弹窗层是否销毁\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustHeight\n是否需要高度调整\nboolean\ntrue,false\ntrue\n\n\nisNeedAdjustWidth\n是否需要宽度调整\nboolean\ntrue,false\ntrue\n\n\nstopEvent\n是否阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止事件冒泡\nboolean\ntrue,false\nfalse\n\n\nadjustXOffset\n调整横向偏移\nnumber\n—\n0\n\n\nadjustYOffset\n调整纵向偏移\nnumber\n—\n0\n\n\nhideChecker\n是否隐藏弹出层检测\nfunction\n—\n—\n\n\noffsetStyle\n弹出层显示位置\nstring\nleft,right,center\n\"left,right,center\"\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\ncomboClass\ncombo类\nstring\n—\n\"bi-combo-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-combo-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nadjustWidth\n调整宽度\n—\n\n\nadjustHeight\n调整高度\n—\n\n\nresetListHeight\n重置列表高度\nheight\n\n\nresetListWidth\n重置列表宽度\nwidth\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetPopupPosition\n获取弹出层的位置\n—\n\n\ntoggle\n开启或者隐藏弹出层\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Combo.EVENT_TRIGGER_CHANGE\ntrigger发生改变触发\n\n\nBI.Combo.EVENT_CHANGE\n弹出层点击触发\n\n\nBI.Combo.EVENT_EXPAND\n下拉框展开触发\n\n\nBI.Combo.EVENT_COLLAPSE\n下拉框收起触发\n\n\nBI.Combo.EVENT_AFTER_INIT\n下拉框初始化后触发\n\n\nBI.Combo.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\nBI.Combo.EVENT_AFTER_POPUPVIEW\n下拉列表弹出后触发\n\n\nBI.Combo.EVENT_BEFORE_HIDEVIEW\n下拉列表收起前触发\n\n\nBI.Combo.EVENT_AFTER_HIDEVIEW\n下拉列表收起后触发\n\n\n\n\n"},"core/combination/bi.expander.html":{"url":"core/combination/bi.expander.html","title":"expander","keywords":"","body":"bi.expander\n某个可以展开的节点,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.expander\",\n element: \"#wrapper\",\n el: {\n type: \"bi.icon_text_node\",\n cls: \"pull-right-ha-font\",\n height: 25,\n text: \"Expander\"\n },\n popup: {\n items: [{\n type: \"bi.single_select_item\",\n height: 25,\n text: \"项目1\",\n value: 1\n }, {\n type: \"bi.single_select_item\",\n height: 25,\n text: \"项目2\",\n value: 2\n }]\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nexpanderClass\n展开类\nstring\n—\n\"bi-expander-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-expander-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nisExpanded\n节点是否展开\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Expander.EVENT_TRIGGER_CHANGE\ntrigger发生改变触发\n\n\nBI.Expander.EVENT_CHANGE\n弹出层点击触发\n\n\nBI.Expander.EVENT_EXPAND\nExpander展开触发\n\n\nBI.Expander.EVENT_COLLAPSE\nExpander收起触发\n\n\nBI.Expander.EVENT_AFTER_INIT\nExpander初始化后触发\n\n\nBI.Expander.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\nBI.Expander.EVENT_AFTER_POPUPVIEW\n下拉列表弹出后触发\n\n\nBI.Expander.EVENT_BEFORE_HIDEVIEW\n下拉列表收起前触发\n\n\nBI.Expander.EVENT_AFTER_HIDEVIEW\n下拉列表收起后触发\n\n\n\n\n"},"core/combination/group_combo.html":{"url":"core/combination/group_combo.html","title":"group_combo","keywords":"","body":"bi.combo_group\n基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.combo_group\",\n el: {\n type: \"bi.icon_text_icon_item\",\n text: \"2010年\",\n value: 2010,\n height: 25,\n iconCls: \"close-ha-font\"\n },\n children: [{\n type: \"bi.single_select_item\",\n height: 25,\n text: \"一月\",\n value: 11\n }]\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nchildern\n子组件\narray\n—\n[ ]\n\n\npopup\n弹出层\nobject\n—\n{el: {type: \"bi.button_tree\",chooseType: 0,layouts: [{type: \"bi.vertical\"}]}}\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustHeight\n是否需要高度调整\nboolean\ntrue,false\nfalse\n\n\nisNeedAdjustWidth\n是否需要宽度调整\nboolean\ntrue,false\nfalse\n\n\nel\n自定义下拉框trigger\nobject\n—\n{type: \"bi.text_button\", text: \"\", value: \"\"}\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\n\"bottom\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置combo value值\nv\n\n\ngetValue\n获取combo value值\n—\n\n\n\n\n"},"core/combination/loader.html":{"url":"core/combination/loader.html","title":"loader","keywords":"","body":"bi.loader\n加载控件,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.loader\",\n itemsCreator: function(options, populate) {\n populate(BI.map(BI.map(BI.makeArray(3, null), function(idx, value){\n return {\n text: faker.name.findName(),\n value: BI.UUID()\n };\n }), function(i, v) {\n return BI.extend(v, {\n type: \"bi.single_select_item\",\n height: 25\n })\n }))\n },\n hasNext: function(option) {\n return option.count \n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\ncombo弹出层位置\nstring\ntop,bottom,left,right,(top,left),(top,right),(bottom,left),(bottom,right)\n\"top\"\n\n\nisDefaultInit\n是否默认初始化子数据\nboolean\ntrue,false\ntrue\n\n\nlogic\n布局逻辑\nobject\n—\n{dynamic:true,scrolly:true}\n\n\nitems\n子组件\narray\n—\n[]\n\n\nitemsCreator\n子组件构造器\nfunction\n—\n—\n\n\nonLoaded\n加载中\nfunction\n—\n—\n\n\ncount\n是否显示总页数\nboolean\ntrue,false\nboolean\n\n\nprev\n上一页\nboolean\ntrue,false\nboolean\n\n\nnext\n下一页\nboolean\ntrue,false\nboolean\n\n\nhasPrev\n判断是否有上一页\nfunction\n—\n—\n\n\nhasNext\n判断是否有下一页\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nhasNext\n判断是否有下一页\n—\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/combination/navigation.html":{"url":"core/combination/navigation.html","title":"navigation","keywords":"","body":"bi.navigation\n导航栏控件,BI.Widget\nsource\n\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.navigation\",\n tab: {\n height: 30,\n items: [{\n once: false,\n text: \"后退\",\n value: -1\n }, {\n once: false,\n text: \"前进\",\n value: 1\n }]\n },\n cardCreator: function(v) {\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"layout-bg\" + BI.random(1, 8),\n text: \"第\" + v + \"页\"\n })\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n控件位置\nstring\ntop,bottom,left,right,custom\n\"bottom\"\n\n\nsingle\n是否为单页\nboolean\ntrue,false\ntrue\n\n\ndefaultShowIndex\n是否默认显示\nboolean\ntrue,false\ntrue\n\n\ntab\ntab页元素\nboolean\ntrue,false\ntrue\n\n\nlogic\n布局逻辑\nobject\n—\n{dynamic:true}\n\n\ncardCreator\n面板构造器\nfunction\n—\nv\n\n\nafterCardCreated\n面板构造之后\nfunction\n—\n—\n\n\nafterCardShow\n面板显示之后\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染组件\n—\n\n\nmounted\n挂载组件\n—\n\n\nafterCardCreated\n创建卡导航页页之后\nv\n\n\nafterCardShow\n导航页展示之后\nv\n\n\nsetSelect\n设置选中的index\nv\n\n\ngetSelect\n获取选中的index\n—\n\n\ngetSelectedCard\n获取选中的导航页\n—\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/combination/searcher.html":{"url":"core/combination/searcher.html","title":"searcher","keywords":"","body":"bi.searcher\n搜索逻辑控件,BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.searcher\",\n element:\"#wrapper\",\n adapter: {\n getItems: function () {\n return [{\n type: \"bi.label\",\n value: \"张三\"\n }]\n }\n },\n popup: {\n type: \"bi.button_group\",\n cls: \"bi-border\",\n items: items,\n layouts: [{\n type: \"bi.vertical\"\n }],\n },\n masker: false\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\nchooseType\n选择类型\nconst\n\nCHOOSE_TYPE_SINGLE\n\n\nisDefaultInit\n是否默认初始化子节点\nboolean\ntrue,false\nfalse\n\n\nisAutoSearch\n是否自动搜索\nboolean\ntrue,false\ntrue\n\n\nisAutoSync\n是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一\nboolean\ntrue,false\ntrue\n\n\nonSearch\nisAutoSearch为false时启用\nfunction(op.callback)\n—\n—\n\n\nel\n开启弹出层的元素\nobject\n—\n{type: \"bi.search_editor\"}\n\n\npopup\n弹出层\nobject\n—\n{type: \"bi.searcher_view\"}\n\n\nadapter\n弹出层显示的位置元素\nobject\n—\nnull\n\n\nmasker\nmasker层\nobject\n—\n{offset: {}}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nresult, searchResult, keyword\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\nadapter\n搜索列表位置\n—\n\n\ndoSearch\n开始搜索\n—\n\n\nstopSearch\n停止搜索\n—\n\n\nisSearching\n是否正在搜索\n—\n\n\nisViewVisible\n组件是否可见\n—\n\n\ngetView\n获取搜索列表栏\n—\n\n\nhasMatched\n是否匹配\n—\n\n\nadjustHeight\n调整高度\n—\n\n\nadjustView\n调整搜索列表栏\n—\n\n\ngetKeyword\n获取搜索关键词\n—\n\n\ngetKeywords\n获取搜索关键词数组\n—\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_START\n开始搜索\n—\n\n\nEVENT_STOP\n停止搜索\n—\n\n\nEVENT_PAUSE\n暂停搜索\n—\n\n\nEVENT_SEARCHING\n搜索中\n—\n\n\nEVENT_AFTER_INIT\n初始化之后\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Searcher.EVENT_CHANGE\n搜索结果面板发生改变触发\n\n\nBI.Searcher.EVENT_START\n开始搜索触发\n\n\nBI.Searcher.EVENT_STOP\n停止搜索触发(搜索框为空)\n\n\nBI.Searcher.EVENT_PAUSE\n搜索暂停触发(搜索文本以空白字符结尾)\n\n\nBI.Searcher.EVENT_SEARCHING\n正在搜索时触发\n\n\nBI.Searcher.EVENT_AFTER_INIT\n搜索结果面板初始化完成后触发\n\n\n\n\n"},"core/combination/switcher.html":{"url":"core/combination/switcher.html","title":"switcher","keywords":"","body":"bi.switcher\n切换显示或隐藏面板,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.switcher\",\n el: {\n type: \"bi.button\",\n height: 25,\n text: \"Switcher\"\n },\n popup: {\n\n },\n adapter: { \n\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick,hover\n\"click\"\n\n\ntoggle\n切换状态\nboolean\ntrue,false\ntrue\n\n\ndirection\n面板显示的位置\nstring\n—\nBI.Direction.Top\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nadapter\n弹出层的位置\nobject\n—\nnull\n\n\nmasker\nmasker层\nobejct\n—\n{ }\n\n\nswitcherClass\n切换类\nstring\n—\n\"bi-switcher-popup\"\n\n\nhoverClass\nhover类\nstring\n—\n\"bi-switcher-hover\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\npopulate\n刷新列表\nitems\n\n\nisViewVisible\n弹窗层是否可见\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\ngetView\n获取弹出层\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nisExpanded\n节点是否展开\n—\n\n\nsetAdapter\n设置弹出层显示的位置元素\nadapter\n\n\nadjustView\n调整弹出层显示的位置元素\n—\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_EXPAND\n面板展开\n—\n\n\nEVENT_COLLAPSE\n面板收起\n—\n\n\nEVENT_TRIGGER_CHANGE\n面板切换\n—\n\n\nEVENT_AFTER_INIT\n初始化之后\n—\n\n\nEVENT_BEFORE_POPUPVIEW\n面板显示之前\n—\n\n\nEVENT_AFTER_POPUPVIEW\n面板显示之后\n—\n\n\nEVENT_BEFORE_HIDEVIEW\n面板隐藏之前\n—\n\n\nEVENT_AFTER_HIDEVIEW\n面板隐藏之后\n—\n\n\n\n\n"},"core/combination/tab.html":{"url":"core/combination/tab.html","title":"tab","keywords":"","body":"bi.switcher\n切换显示或隐藏面板,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.tab\",\n tab: {\n type: \"bi.button_group\",\n height: 30,\n items: [{\n text: \"Tab1\",\n value: 1,\n width: 50\n }, {\n text: \"Tab2\",\n value: 2,\n width: 50\n }]\n },\n cardCreator: function(v) {\n switch (v) {\n case 1:\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"bi-card\",\n text: \"面板1\"\n })\n case 2:\n return BI.createWidget({\n type: \"bi.label\",\n cls: \"bi-card\",\n text: \"面板2\"\n })\n }\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n控件位置\nstring\ntop,bottom,left,right,custom\n\"bottom\"\n\n\nsingle\n是否为单页\nboolean\ntrue,false\nfalse\n\n\ndefaultShowIndex\n是否默认显示tab页\nboolean\ntrue,false\nfalse\n\n\ntab\ntab标签页\nobject\n—\n{ }\n\n\nlogic\n布局逻辑\nobject\n—\n{dynamic:false}\n\n\ncardCreator\n面板构造器\nfunction\n—\nfunction (v) {return BI.createWidget();}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nrender\n渲染组件\n—\n\n\nmounted\n挂载组件\n—\n\n\nremoveTab\n移除tab面板页\ncardname\n\n\ngetTab\n获取tab面板页\nv\n\n\nsetSelect\n设置选中的index\nv\n\n\ngetSelect\n获取选中的index\n—\n\n\ngetSelectedTab\n获取选中的tab面板页\n—\n\n\npopulate\n刷新列表\nitems\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取被选中的值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/layer/layer_float_box.html":{"url":"core/layer/layer_float_box.html","title":"float_box","keywords":"","body":"bi.float_box\nfloatBox弹出层,BI.Widget\nsource\n\nvar id = BI.UUID();\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.text_button\",\n text: \"点击弹出FloatBox\",\n width: 200,\n height: 80,\n handler: function() {\n BI.Popovers.remove(id);\n BI.Popovers.create(id, new BI.BarPopoverSection()).open(id);\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwidth\n弹出层宽度\nnumber\n—\n600\n\n\nheight\n弹出层高度\nnumber\n—\n500\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nsectionProvider\n\n\ndestroyed\n销毁组件\n—\n\n\nshow\n显示\n—\n\n\nhide\n隐藏\n—\n\n\nopen\n打开弹出层\n—\n\n\nclose\n关闭弹出层\n—\n\n\nsetZindex\n设置z-index\nz-index\n\n\n\n事件方法\n\n\n\n事件名称\n说明\n回调参数\n\n\n\n\nEVENT_FLOAT_BOX_CLOSED\n关闭弹出层\n—\n\n\nEVENT_FLOAT_BOX_CLOSED\n打开弹出层\n—\n\n\n\n\n"},"core/layer/layer_popup.html":{"url":"core/layer/layer_popup.html","title":"popup","keywords":"","body":"bi.popup_view\n下拉框弹出层, zIndex在1000w,BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.popup_view\",\n el: {\n type: \"bi.button_group\",\n items: [{\n text: \"aaa\",\n value: \"aaa\"\n }, {\n text: \"bbb\",\n value: \"bbb\"\n }],\n layouts: [{\n type: \"bi.vertical\"\n }]\n }\n})\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmaxWidth\n弹出层最大宽度\nnumber/string\n—\n\"auto\"\n\n\nminWidth\n弹出层最小宽度\nnumber\n—\n100\n\n\nmaxHeight\n弹出层最大高度\nnumber/string\n—\n—\n\n\nminHeight\n弹出层最小高度\nnumber\n—\n25\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ndirection\n工具栏的方向\nconst\n参考button_group\nBI.Direction.Top\n\n\nstopEvent\n是否停止mousedown、mouseup事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n是否停止mousedown、mouseup向上冒泡\nboolean\ntrue,false\nfalse\n\n\ntabs\n导航栏\narray\n—\n[]\n\n\nlogic\n布局逻辑\nobject\n—\n{dynamic:true}\n\n\ntools\n自定义工具栏\nboolean\ntrue,false\nfalse\n\n\nbuttons\ntoolbar栏\narray\n—\n[]\n\n\nel\n子组件\nobject\n—\n{ type: \"bi.button_group\",items: [], chooseType: 0,behaviors: {},layouts: [{type: \"bi.vertical\"}]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nresetWidth\n重置宽度\nwidth\n\n\nresetHeight\n重置高度\nheight\n\n\nsetValue\n设置value 值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\nsetZindex\n设置z-index\nz-index\n\n\ngetView\n获取弹出层\n—\n\n\n\n\n"},"core/layer/layer_searcher.html":{"url":"core/layer/layer_searcher.html","title":"searcher","keywords":"","body":"bi.searcher_view\n搜索面板, 基类BI.Widget\nsource\n\nvar searcher = BI.createWidget({\n element: \"#wrapper\",\n type: \"bi.searcher_view\",\n});\nsearcher.populate([{\n text: \"aba\",\n value: \"aba\"\n},{\n text: \"acc\",\n value: \"acc\"\n}], [{\n text: \"a\",\n value: \"a\"\n}], \"a\");\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntipText\ntitle文本\nstring\n—\nBI.i18nText(\"BI-No_Select\")\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.Selection.Single\n\n\nmatcher\n完全匹配的构造器\nobject\n—\n{type: \"bi.button_group\",behaviors: { redmark: function () { return true;} },items: [], layouts: [{ type: \"bi.vertical\"}]}\n\n\nsearcher\n搜索到的元素\nobject\n—\n{type: \"bi.button_group\",behaviors: {redmark: function () {return true;}}, items: [], layouts: [{ type: \"bi.vertical\" }]}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nsearchResult, matchResult, keyword\n\n\nsetValue\n设置value 值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\nempty\n清空组件\n—\n\n\nhasMatched\n是否有匹配的元素\n—\n\n\n\n\n"},"core/widget.html":{"url":"core/widget.html","title":"widget","keywords":"","body":"bi.widget\n所有控件的超类\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nroot\n根组件\nboolean\ntrue,false\nfalse\n\n\ntagName\nhtml标签\nstring\n—\n\"div\"\n\n\nattributes\n属性\nobject\n—\nnull\n\n\ndata\n数据\nobject\n—\nnull\n\n\ndisabled\n是否可用\nboolean\ntrue,false\nfalse\n\n\ninvisible\n是否可见\nboolean\ntrue,false\nfalse\n\n\ninvalid\n是否有效\nboolean\ntrue,false\nfalse\n\n\nbaseCls\n基础class类\nstring\n—\n\" \"\n\n\nextraCls\n扩展class类\nstring\n—\n\" \"\n\n\ncls\nclass类名\nstring\n—\n\" \"\n\n\n\n生命周期函数\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbeforeCreate\n组件实例刚被创建\n—\n\n\ncreated\n组件实例创建完成\n—\n\n\nrender\n渲染组件\n—\n\n\nbeforeMounted\n组件挂载之前\n—\n\n\nmounted\n组件挂载\n—\n\n\nupdate\n组件更新\n—\n\n\nbeforeDestroyed\n组件销毁前调用\n—\n\n\ndestroyed\n组件销毁后调用\n—\n\n\n\n对外方法\n(注: fineui2.0引入生命周期后,widget的实现类不需要重写setEnable,setValid等方法,会自动调用子组件的对应方法\n,一些需要在设置状态后做的额外工作可以通过重写_setXXX来实现)\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nisMounted\n判断组件是否挂载\n—\n\n\nsetWidth\n设置组件宽度\nwidth\n\n\nsetHeight\n设置组件高度\nheight\n\n\nsetEnable\n设置组件是否可用\nenable\n\n\nsetVisible\n设置组件是否可见\nvisible\n\n\nsetValid\n设置组件是否有效\nvalid\n\n\ndoBehavior\n自定义下拉列表中item项的行为,如高亮,标红等\n—\n\n\ngetWidth\n获取组件宽度\n—\n\n\ngetHeight\n获取组件高度\n—\n\n\nisValid\n判断是否有效\n—\n\n\naddWidget\n添加组件\nname,widget\n\n\ngetWidgetByName\n根据组件名称获取组件\nname\n\n\nremoveWidget\n移除组件\nnameOrWidget\n\n\nhasWidget\n判断是否有该组件\nname\n\n\ngetName\n获取组件名称\n—\n\n\nsetTag\n设置tag\ntag\n\n\ngetTag\n获取tag\n—\n\n\nattr\n设置组件属性\nkey,value\n\n\ngetText\n获取text值\n—\n\n\nsetText\n设置text值\ntext\n\n\ngetValue\n获取value值\n—\n\n\nsetValue\n设置value值\nvalue\n\n\nisEnabled\n是否可用\n—\n\n\nisVisible\n是否可见\n—\n\n\ndisable\n设置组件不可用\n—\n\n\nenable\n设置组件可用\n—\n\n\nvalid\n设置组件有效\n—\n\n\ninvalid\n设置组件无效\n—\n\n\ninvisible\n设置组件不可见\n—\n\n\nvisible\n设置组件可见\n—\n\n\nisolate\n组件不在页面展示,组件事件和内容都在\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/single.html":{"url":"core/single.html","title":"single","keywords":"","body":"bi.single\n这仅仅只是一个超类, 所有简单控件的基类,类的控制,title的控制,文字超过边界显示3个点,cursor默认pointor,基类BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nreadonly\n是否只读\nboolean\ntrue,false\nfalse\n\n\ntitle\ntitle\nstring\n—\nnull\n\n\nwarningTitle\n错误title\nstring\n—\nnull\n\n\ntipType\ntitle类型\nstring\nsuccess,warning\nnull\n\n\nvalue\n组件value值\nstring\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nenableHover\n恢复hover可用\nopt\n\n\ndisabledHover\n取消hover事件\n—\n\n\npopulate\n刷新或者清空列表\nitems\n\n\nsetTitle\n设置title\ntitle,opt\n\n\nsetWarningTitle\n设置错误title\ntitle,opt\n\n\ngetTipType\n获取tipType\n—\n\n\nisReadOnly\n是否只读\n—\n\n\ngetTitle\n获取title\n—\n\n\ngetWarningTitle\n获取warningtitle\n—\n\n\nsetValue\n设置value值\nvalue\n\n\ngetValue\n获取value值\n—\n\n\n\n\n"},"core/basic_button.html":{"url":"core/basic_button.html","title":"basic_button","keywords":"","body":"bi.basic_button\n一般的button父级,基类BI.Single\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n组件value值\nstring\n—\nnull\n\n\nstopEvent\n阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止冒泡\nboolean\ntrue,false\nfalse\n\n\nselected\nbutton的选中状态\nboolean\ntrue,false\nfalse\n\n\nonce\n点击一次选中有效,再点无效\nboolean\ntrue,false\nfalse\n\n\nforceSelected\n点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\nboolean\ntrue,false\nfalse\n\n\nforceNotSelected\n无论怎么点击都不会被选中\nboolean\ntrue,false\nfalse\n\n\ndisableSelected\n使能选中\nboolean\ntrue,false\nfalse\n\n\nshadow\n是否显示阴影\nboolean\ntrue,false\nfalse\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\nfalse\n\n\ntrigger\n被选元素要触发的事件\nstring\nmousedown, mouseup, click, dblclick, lclick\nnull\n\n\nhandler\n点击事件回调\nfunction\n—\nBI.emptyFn\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbindEvent\n绑定事件\n—\n\n\nbeforeClick\n点击事件之前\n—\n\n\ndoClick\n点击事件\n—\n\n\nhandle\n返回该对象\n—\n\n\nhover\nhover事件\n—\n\n\ndishover\n取消hover事件\n—\n\n\nsetSelected\n设置选中的文本\nb\n\n\nisSelected\n是否被选中\n—\n\n\nisOnce\n是否只允许点击一次\n—\n\n\nisForceSelected\n判断是否点击即选中\n—\n\n\nisForceNotSelected\n判断是否怎么点击都不会被选中\n—\n\n\nisDisableSelected\n判断是否让选中\n—\n\n\nsetText\n设置文本值\n—\n\n\ngetText\n获取文本值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"core/node_button.html":{"url":"core/node_button.html","title":"node_button","keywords":"","body":"bi.NodeButton\n表示一个可以展开的节点, 不仅有选中状态而且有展开状态, BI.BasicButton\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nopen\n节点是否展开\nboolean\ntrue,false\nfalse\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击展开\n—\n\n\nisOnce\n点击一次后失效\n—\n\n\nisOpened\n判断节点是否展开\n—\n\n\nsetOpened\n设置节点展开状态\nb\n\n\ntriggerCollapse\n节点收起\n—\n\n\ntriggerExpand\n节点展开\n—\n\n\n\n\n"},"core/pane.html":{"url":"core/pane.html","title":"pane","keywords":"","body":"bi.pane\n当没有元素时有提示信息的view, BI.Widget\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntipText\ntitle文本\nstring\n—\nBI.i18nText(\"BI-No_Selected_Item\")\n\n\noverlap\n是否含有遮罩层\nboolean\ntrue,false\ntrue\n\n\nonLoaded\n已经加载\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\npopulate\n刷新列表\nitems\n\n\nempty\n清空组件\n—\n\n\nhasMatched\n是否有匹配的元素\n—\n\n\nloading\n加载中\n—\n\n\nloaded\n加载完毕\n—\n\n\ncheck\n检查是否为空\n—\n\n\nsetTipVisible\n设tip可见\n—\n\n\n\n\n"},"base/label.html":{"url":"base/label.html","title":"label","keywords":"","body":"bi.label\n文本标签\nsource\n\nBI.createWidget({\n type: \"bi.label\",\n textWidth: 100,\n textHeight: 30,\n text: \"基本标签\"\n});\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\ntextWidth\n文本标签宽度\nnumber\n—\nnull\n\n\ntextHeight\n文本标签宽度\nnumber\n—\nnull\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\ncenter\n\n\nwhiteSpace\n元素内空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\ntrue\n\n\npy\n拼音\nstring\n—\n空\n\n\nkeyword\n设置标红的关键词\nstring\n—\n空\n\n\ndisabled\n灰化\nboolean\ntrue,false\n无\n\n\ntitle\n提示title\nstring\n—\n空\n\n\nwarningTitle\n错误提示title\nstring\n—\n空\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ngetText\n获取文本值\n—\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式,例{\"color\":\"#000\"}\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\npopulate\n清空label\n—\n\n\n\n\n"},"base/bubble.html":{"url":"base/bubble.html","title":"bubble","keywords":"","body":"bi.bubble\n气泡提示\nsource\n\nBI.createWidget({\n type: 'bi.bubble',\n element: \"#wrapper\",\n height: 30,\n text: \"测试\"\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ndirection\n气泡显示位置\nstring\n—\n\"top\"\n\n\nheight\n气泡高度\nnumber\n—\n35\n\n\ntext\n气泡显示内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\n\n\n"},"base/toast.html":{"url":"base/toast.html","title":"toast","keywords":"","body":"bi.toast\ntoast提示\nsource\n\nBI.createWidget({\n type: 'bi.toast',\n element: \"#wrapper\",\n height: 30,\n level: \"warning\",\n text: \"toast测试\"\n})\n\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlevel\n提示类型\nstring\nsuccess,warning\n\"success\"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n显示内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\nsetHeight\n设置高度\n需要设置的高度值height\n\n\n\n\n"},"base/message.html":{"url":"base/message.html","title":"message","keywords":"","body":"bi.Msg\n消息提示\nsource\n\nBI.createWidget({\n type: \"bi.button\",\n element: \"#wrapper\",\n text : '点击我弹出一个消息框',\n height : 30,\n handler : function() {\n BI.Msg.confirm('测试消息框',\"我是测试消息框的内容\");\n }\n});\n\n\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nalert\n警告消息框\ntitle, message, callback\n\n\nconfirm\n确认消息框\ntitle, message, callback\n\n\nprompt\n提示消息框\ntitle, message, value, callback, min_width\n\n\ntoast\ntoast提示\nmessage, level, context\n\n\n\n\n"},"base/button/button.html":{"url":"base/button/button.html","title":"button","keywords":"","body":"bi.button\n文字类型的按钮,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.button',\n element: \"#wrapper\",\n text: '一般按钮',\n level: 'common',\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nlevel\n按钮类型\nstring\ncommon,success,warning,ignore\ncommon\n\n\nminWidth\n最小宽度,如果block/clear中某一项为true,此项值为0,否则为90\nnumber\n—\n90\n\n\nshadow\n是否显示阴影\nboolean\ntrue,false\nprops.clear !== true\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\ntrue\n\n\nreadonly\n是否只读\nboolean\ntrue,false\ntrue\n\n\niconClass\n图标类型\nstring\n—\n\" \"\n\n\nblock\n是否块状显示,即不显示边框,没有最小宽度的限制\nboolean\ntrue,false\nfalse\n\n\nclear\n是否去掉边框和背景\nboolean\ntrue,false\nfalse\n\n\ntextAlign\n文字布局\nstring\nleft,center,right\ncneter\n\n\nwhiteSpace\n元素内的空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\nfalse\n\n\ntextWidth\n按钮文本宽度\nnumber\n—\nnull\n\n\ntextHeight\n按钮文本高度\nnumber\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ndoClick\n点击事件\n—\n\n\ndestroy\n销毁事件\n—\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\n\n\n"},"base/button/text_button.html":{"url":"base/button/text_button.html","title":"text_button","keywords":"","body":"bi.text_button\n可以点击的一行文字,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.text_button',\n text: '文字按钮',\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntext\n按钮文本内容\nstring\n—\n—\n\n\ntextWidth\n按钮文本宽度\nnumber\n—\nnull\n\n\ntextHeight\n按钮文本高度\nnumber\n—\nnull\n\n\n\n高级属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\npy\n拼音\nstring\n\n\" \"\n\n\ntextAlign\n文字布局\nstring\nleft,center,right\ncneter\n\n\nwhiteSpace\n元素内的空白处理方式\nstring\nnormal,nowrap\nnowrap\n\n\nforceCenter\n是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效\nboolean\ntrue,false\nfalse\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetText\n设置文本值\n需要设置的文本值text\n\n\ndoClick\n点击事件\n—\n\n\nsetValue\n设置文本值\n需要设置的文本值text\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式,例{\"color\":\"#000\"}\n\n\n\n\n"},"base/button/icon_button.html":{"url":"base/button/icon_button.html","title":"icon_button","keywords":"","body":"bi.icon_button\n图标button,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.icon_button',\n cls: \"close-ha-font\",\n width: 20,\n height: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\niconWidth\n图标宽度\nnumber\n—\nnull\n\n\niconHeight\n图标高度\nnumber\n—\nnull\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"base/button/image_button.html":{"url":"base/button/image_button.html","title":"image_button","keywords":"","body":"bi.image_button\n图片的button,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.image_button',\n src: \"http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128\",\n width: 100,\n height: 100\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nsrc\n图片路径\nstring\n—\n\" \"\n\n\niconWidth\n图标宽度\nnumber/string\n—\n\"100%\"\n\n\niconHeight\n图标高度\nnumber/string\n—\n\"100%\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndoClick\n点击事件\n—\n\n\nsetWidth\n设置按钮宽度\n宽度width\n\n\nsetHeight\n设置按钮高度\n高度height\n\n\nsetImageWidth\n设置图片宽度\n宽度width\n\n\nsetImageHeight\n设置图片高度\n高度height\n\n\ngetImageWidth\n获取图片宽度\n—\n\n\ngetImageHeight\n获取图片高度\n—\n\n\nsetSrc\n设置图片路径\nsrc\n\n\ngetSrc\n获取图片路径\n—\n\n\n\n\n"},"base/editor/editor.html":{"url":"base/editor/editor.html","title":"editor","keywords":"","body":"bi.editor\n文本框,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.editor\",\n element: \"#wrapper\",\n errorText: \"字段不可重名!\",\n width: 200,\n height: 30\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\ntipType\n提示类型\nstring\nsuccess,warning\n\"warning\"\n\n\ninputType\n输入框类型\nstring\n参考input输入框类型\n\"text\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nsetErrorVisible\n设置错误文本可见\nb\n\n\ndisableError\n设置error不可用\n—\n\n\nenableError\n设置error可用\n—\n\n\ndisableWaterMark\n设置文本框placeholder不可用\n—\n\n\nenableWaterMark\n恢复文本框placeholder可用\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nselectAll\n选中文本框文本\n—\n\n\nonKeyDown\n按键事件\nkey\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\nresetLastValidValue\n重置文本框最后一次输入的有效值\nvalue\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"base/editor/code_editor.html":{"url":"base/editor/code_editor.html","title":"code_editor","keywords":"","body":"bi.code_editor\n代码文本框,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.code_editor\",\n cls: \"mvc-border\",\n width: 600,\n height: 400\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nreadOnly\n是否只读\nboolean\ntrue,false\nfalse\n\n\nlineHeight\n行高\nnumber\n—\n2\n\n\nvalue\n文本框值\nstring\n—\n\" \"\n\n\nparamFormatter\n参数显示值构造函数\nfunction\n—\nvalue\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ninsertParam\n插入参数\nparam\n\n\ninsertString\n插入字符串\nstr\n\n\ngetValue\n获取文本框值\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetStyle\n设置文本样式\n需要设置的文本标签样式style,例{\"color\":\"#000\"}\n\n\ngetStyle\n获取文本样式\n—\n\n\nrefresh\n刷新文本框\n—\n\n\n\n\n"},"base/editor/multifile_editor.html":{"url":"base/editor/multifile_editor.html","title":"multifile_editor","keywords":"","body":"bi.multifile_editor\n多文件,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.multifile_editor\",\n width: 400,\n height: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmultiple\n是否支持多选\nboolean\ntrue,false\nfalse\n\n\nmaxSize\n最大可选数量\nnumber\n—\n-1\n\n\naccept\n允许上传的文件类型\nstring\n—\n\" \"\n\n\nurl\n文件路径\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nselect\n选择文件\n—\n\n\ngetValue\n获取文件名称\n—\n\n\nupload\n文件上传\n—\n\n\nreset\n重置\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MultifileEditor.EVENT_UPLOADSTART\n开始上传时触发\n\n\nBI.MultifileEditor.EVENT_PROGRESS\n上传过程中触发\n\n\nBI.MultifileEditor.EVENT_UPLOADED\n上传结束后触发\n\n\n\n\n"},"base/editor/textarea_editor.html":{"url":"base/editor/textarea_editor.html","title":"textarea_editor","keywords":"","body":"bi.textarea_editor\n文本域,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.textarea_editor\",\n width: 400,\n height: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n文本域的值\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ngetValue\n获取文本域值\n—\n\n\nsetValue\n设置文本域值\nvalue\n\n\nsetStyle\n设置文本域样式\n需要设置的文本域样式style,例{\"color\":\"#000\"}\n\n\ngetStyle\n获取文本域样式\n—\n\n\nfocus\n文本域获取焦点\n—\n\n\nblur\n文本域失焦\n—\n\n\n\n\n"},"base/editor/formula_editor.html":{"url":"base/editor/formula_editor.html","title":"formula_editor","keywords":"","body":"bi.formula_editor\n公式编辑控件,基类BI.Single\nsource\n\nBI.createWidget({\n type: \"bi.formula_editor\",\n cls: \"bi-border\",\n watermark:'请输入公式',\n value: 'SUM(C5, 16, 26)',\n width: \"100%\",\n height: \"100%\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n文本域的值\nstring\n—\n\" \"\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nfieldTextValueMap\n字段集合\nonject\n—\n{}\n\n\nshowHint\n是否显示提示信息\nboolean\ntrue,false\ntrue\n\n\nlineHeight\n行高\nnumber\n—\n2\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ndisableWaterMark\n设置文本框placeholder不可用\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\ninsertField\n添加字段\nfield\n\n\ninsertFunction\n插入函数\nfn\n\n\ninsertOperator\n插入操作符\nop\n\n\nsetFunction\n设置函数\nv\n\n\ninsertString\n插入字符串\nstr\n\n\ngetFormulaString\n获取公式框内容\n—\n\n\ngetUsedFields\n获取可用字段\n—\n\n\ngetCheckString\n获取校验内容\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\nsetFieldTextValueMap\n设置字段集合\nfieldTextValueMap\n\n\nrefresh\n刷新文本框\n—\n\n\n\n\n"},"base/table/table_view.html":{"url":"base/table/table_view.html","title":"table_view","keywords":"","body":"bi.table_view\n能处理静态宽度以及动态宽度的表\nsource\nBI.createWidget({\n type: \"bi.table_view\",\n element: 'body',\n isNeedMerge: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n mergeCols: [0, 1],\n columnSize: [100, 200, 300, 400, 500],\n items: [],\n header: []\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nfooterRowSize\n表尾高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\nfalse\n\n\nheader\n表头\narray\n[]\n\n\nfooter\n表尾\narray\nfalse\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\npopulate\n刷新内容\nrows\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Table.EVENT_TABLE_AFTER_INIT\ntable初始化完成后触发\n\n\nBI.Table.EVENT_TABLE_RESIZE\ntable大小调整时触发(窗口变化等)\n\n\nBI.Table.EVENT_TABLE_SCROLL\n滚动事件\n\n\n\n\n"},"base/table/grid_table.html":{"url":"base/table/grid_table.html","title":"grid_table","keywords":"","body":"bi.grid_table\n列表展示的table,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.grid_table\",\n element: 'body',\n width: 600,\n height: 500,\n isResizeAdapt: true,\n isNeedResize: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n columnSize: [50,50,200,250,400],\n items: items,\n header: header\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结\nboolean\nfalse\n\n\nfreezeCols\n冻结列\narray\n[]\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth\n\n\nsetHeight\n设置高度\nheight\n\n\ngetRegionSize\n获取间隙大小\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\npopulate\n刷新内容\nrows\n\n\nrestore\n储存\n—\n\n\n\n\n"},"base/table/collection_table.html":{"url":"base/table/collection_table.html","title":"collection_table","keywords":"","body":"bi.collection_table\n基本的表格 继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.collection_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否冻结列\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth\n\n\nsetHeight\n设置高度\nheight\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\npopulate\n增加行\nrows\n\n\nrestore\n存储数据\n—\n\n\n\n\n"},"base/table/resizable_table.html":{"url":"base/table/resizable_table.html","title":"resizable_table","keywords":"","body":"bi.resizable_table\n可调整列宽的grid表格,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.resizable_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结列\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedResize\n是否需要调整大小\nboolean\nfalse\n\n\nisResizeAdapt\n是否调整时自适应\nboolean\ntrue\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nheader\n表头\narray\n[]\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\n—\n\n\nsetHeight\n设置高度\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n刷新内容\nrows\n\n\nrestore\n保存表\n—\n\n\n\n\n"},"base/pager.html":{"url":"base/pager.html","title":"pager","keywords":"","body":"bi.pager\n分页控件,基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.pager\",\n height: 50,\n pages: 18,\n groups: 5,\n curr: 6,\n first: \"首页\",\n last: \"尾页\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义列表中item项的行为,如高亮,标红等\nobject\n—\n{}\n\n\nlayouts\n布局\narray\n—\n{type:\"bi.horizontal\",hgap:10,vgap:0}\n\n\ndynamicShow\n是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\nboolean\ntrue,false\ntrue\n\n\ndynamicShowFirstLast\n是否动态显示首页、尾页,dynamicShow为false时生效\nboolean\ntrue,false\nfalse\n\n\ndynamicShowPrevNext\n是否动态显示上一页、下一页,dynamicShow为false时生效\nboolean\ntrue,false\nfalse\n\n\npages\n是否显示总页数\nboolean\ntrue,false\nfalse\n\n\ncurr\n初始化当前页\nfunction\n—\nfunction(){return 1;}\n\n\ngroups\n连续显示分页数\nnumber\n—\n0\n\n\njump\n页数跳转\nfunction\n—\n—\n\n\nfirst\n是否显示首页\nboolean\ntrue,false\nfalse\n\n\nlast\n是否显示尾页\nboolean\ntrue,false\nfalse\n\n\nprev\n上一页\nstring,object —\n—\n\"上一页\"\n\n\nnext\n下一页\nsting,object\n—\n\"下一页\"\n\n\nfirstPage\n第一页\nnumber\n—\n1\n\n\nlastPage\n最后一页,在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\nfunction\n—\nfunction(){ return 1;}\n\n\nhasPrev\n判断是否有上一页,pages不可用时有效\nfunction\n—\n—\n\n\nhasNext\n判断是否有下一页,pages不可用时有效\nfunction\n—\n—\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\ngetCurrentPage\n获取当前页码\n—\n\n\nsetAllPages\n设置总页数\npages\n\n\nhasPrev\n判断是否有上一页\nv\n\n\nhasNext\n判断是否有下一页\nv\n\n\nsetValue\n设置当前页码\nv\n\n\ngetValue\n获取当前页码\n—\n\n\nattr\n设置属性\nkey,value\n\n\npopulate\n刷新或者清空列表\n—\n\n\n\n事件\n\n\n\n名称\n说明\n\n\n\n\nBI.Pager.EVENT_AFTER_POPULATE\npager刷新完成事件\n\n\n\n\n"},"base/svg.html":{"url":"base/svg.html","title":"svg","keywords":"","body":"bi.svg\nsvg绘图,基类BI.Widget\nsource\n\nvar svg = BI.createWidget({\n type: \"bi.svg\",\n width: 500,\n height: 600\n});\n\nsvg.path(\"M10,10L50,50M50,10L10,50\")\n .attr({stroke: \"red\"});\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nadd\n添加对象到json数组\njson\n\n\npath\n绘制路径\npathString\n\n\nimage\n绘制图片\n(src,x,y,w,h)分别表示图片路径,绘制的原点横、纵坐标,宽、高\n\n\nrect\n绘制矩形\n(x,y,w,h,r)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及矩形的圆角border-radius大小\n\n\ncircle\n绘制圆形\n(x,y,r)分别表示原点的横坐标,纵坐标,以及半径\n\n\nellipse\n绘制椭圆\n(x,y,rx,ry)分别表示原点的横、纵坐标,以及水平半径和垂直半径\n\n\ntext\n绘制文本\n(x,y,text)分别表示绘制的原点横、纵坐标以及要绘制的文本内容\n\n\nprint\n根据制定参数打印出路径\n(x, y, string, font, size, origin, letter_spacing, line_spacing)\n\n\nsetStart\n开始绘制\n—\n\n\nsetFinish\n结束绘制\n—\n\n\nsetSize\n设置画布尺寸\n(width,height)分别表示画布宽高\n\n\nsetViewBox\n设置画布可视区域\n(x,y,width,height,fit)分别表示可视区域原点坐标以及可视区域宽高,以及是否根据可视区域进行调整\n\n\ngetById\n根据id返回元素\nid\n\n\ngetElementByPoint\n获根据给定的点坐标返回元素\n(x,y)\n\n\ngetElementsByPoint\n获根据给定的点坐标返回元素\n(x,y)\n\n\ngetFont\n通过给定的参数在已注册的字体中找到字体对象\n(family, weight, style, stretch)\n\n\nset\n绘制形状的集合\n—\n\n\nremove\n设置总页数\npages\n\n\nclear\n判断是否有上一页\nv\n\n\n\n\n"},"base/canvas.html":{"url":"base/canvas.html","title":"canvas","keywords":"","body":"bi.canvas\ncanvas绘图,基类BI.Widget\nsource\n\nvar canvas = BI.createWidget({\n type: \"bi.canvas\",\n element: \"#wrapper\",\n width: 500,\n height: 600\n});\ncanvas.circle(150, 50, 20, \"green\");\ncanvas.stroke();\n\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nline\n绘制线段\n(x0, y0, x1, y1)\n\n\nrect\n绘制矩形\n(x,y,w,h,color)分别表示左上角的横坐标、纵坐标,矩形宽、高、以及绘制的颜色\n\n\ncircle\n绘制圆形\n(x, y, radius, color)分别表示原点的横坐标,纵坐标,半径以及颜色\n\n\nhollow\n填充中空的路径\n—\n\n\nsolid\n填充实心的路径\n—\n\n\ngradient\n绘制渐变色\n(x0, y0, x1, y1, start, end)\n\n\nreset\n重置画布\n—\n\n\nstroke\n绘制\ncallback\n\n\n\n\n"},"case/button/multi_select_item.html":{"url":"case/button/multi_select_item.html","title":"multi_select_item","keywords":"","body":"bi.multi_select_item\n复选框item,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.multi_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n30\n\n\nlogic\n布局逻辑\nobject\n—\n{dynamic:false}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/button/single_select_item.html":{"url":"case/button/single_select_item.html","title":"single_select_item","keywords":"","body":"bi.single_select_item\n可以点击的label,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.single_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n25\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/button/single_select_radio_item.html":{"url":"case/button/single_select_radio_item.html","title":"single_select_radio_item","keywords":"","body":"bi.single_select_radio_item\n单选框item,基类BI.BasicButton\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"单选item\"\n }, {\n type: \"bi.single_select_radio_item\",\n text: \"单选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n25\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\ntextAlign\n文本对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetSelected\n设置选中值\nv\n\n\ndoRedMark\n标红\n—\n\n\nunRedMark\n取消标红\n—\n\n\ndoClick\n点击事件\n—\n\n\n\n\n"},"case/editor/shelter_editor.html":{"url":"case/editor/shelter_editor.html","title":"shelter_editor","keywords":"","body":"bi.shelter_editor\n带标记的文本框,需手动控制进入编辑状态 基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.shelter_editor\",\n cls: \"bi-border\",\n width: 300,\n watermark: \"这个是带标记的\"\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntextAlign\n对齐方式\nstring\nleft,center,right\n\"left\"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nonKeyDown\n按键事件\nkey\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\nsetTextStyle\n设置文本框样式\nstyle\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/sign_editor.html":{"url":"case/editor/sign_editor.html","title":"sign_editor","keywords":"","body":"bi.sign_editor\n带标记的文本框,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.sign_editor\",\n cls:\"layout-bg5\",\n value: \"123\",\n text: \"456\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/sign_initial_editor.html":{"url":"case/editor/sign_initial_editor.html","title":"sign_initial_editor","keywords":"","body":"bi.sign_initial_editor\n指定初始值 之后初始值会一直显示的editor 基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.sign_initial_editor\",\n cls: \"layout-bg5\",\n text: \"原始值\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\nvalue\n文本value值\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetTitle\n设置title\ntitle\n\n\nsetWarningTitle\n设置错误title\ntitle\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/editor/state_editor.html":{"url":"case/editor/state_editor.html","title":"state_editor","keywords":"","body":"bi.state_editor\n记录状态的输入框,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.state_editor\",\n value: \"123\",\n text: \"456\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\ntrue\n\n\nwatermark\n文本框placeholder\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring/function\n—\n\" \"\n\n\nheight\n高度\nnumber\n—\n30\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetErrorText\n设置错误文本\ntext\n\n\ngetErrorText\n获取错误文本\n—\n\n\nfocus\n文本框获取焦点\n—\n\n\nblur\n文本框失焦\n—\n\n\nsetValue\n设置文本框值\nvalue\n\n\ngetLastValidValue\n获取文本框最后一次输入的有效值\n—\n\n\ngetValue\n获取文本框值\n—\n\n\nisEditing\n文本框是否处于编辑状态\n—\n\n\nisValid\n文本框值是否有效\n—\n\n\ndoRedMark\n文本标红\n—\n\n\nunRedMark\n取消文本标红\n—\n\n\ndoHighLight\n文本高亮\n—\n\n\nunHighLight\n取消文本高亮\n—\n\n\nsetState\n设置文本框值\n—\n\n\ngetState\n获取文本框值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.Editor.EVENT_CHANGE\neditor的value发生改变触发\n\n\nBI.Editor.EVENT_FOCUS\nfocus事件\n\n\nBI.Editor.EVENT_BLUR\nblur事件\n\n\nBI.Editor.EVENT_CLICK\n点击编辑框触发(不在编辑状态时)\n\n\nBI.Editor.EVENT_KEY_DOWN\nkeyDown时触发\n\n\nBI.Editor.EVENT_SPACE\n按下空格触发\n\n\nBI.Editor.EVENT_BACKSPACE\n按下Backspace触发\n\n\nBI.Editor.EVENT_START\n开始输入触发\n\n\nBI.Editor.EVENT_PAUSE\n暂停输入触发(输入空白字符)\n\n\nBI.Editor.EVENT_STOP\n停止输入触发\n\n\nBI.Editor.EVENT_CONFIRM\n确定输入触发(blur时且输入值有效)\n\n\nBI.Editor.EVENT_VALID\n输入值有效的状态事件\n\n\nBI.Editor.EVENT_ERROR\n输入值无效的状态事件\n\n\nBI.Editor.EVENT_ENTER\n回车事件\n\n\nBI.Editor.EVENT_RESTRICT\n回车但是值不合法\n\n\nBI.Editor.EVENT_REMOVE\n输入为空时按下backspace\n\n\nBI.Editor.EVENT_EMPTY\n输入框为空时触发\n\n\n\n\n"},"case/layer/multi_popup_layer.html":{"url":"case/layer/multi_popup_layer.html","title":"multi_popup_layer","keywords":"","body":"bi.multi_popup_view\n下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w,基类BI.MultiPopupView\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.multi_popup_view\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbuttons\n按钮组\narray\n—\nBI.i18nText(\"BI-Basic_Sure\")\n\n\n\n\n"},"case/layer/layer_panel.html":{"url":"case/layer/layer_panel.html","title":"layer_panel","keywords":"","body":"bi.popup_panel\n可以理解为MultiPopupView和Panel两个面板的结合体,基类BI.MultiPopupView\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.popup_panel\",\n title: \"测试\",\n width: 300\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n标题\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.PopupPanel.EVENT_CHANGE\npanel的value发生改变触发\n\n\nBI.PopupPanel.EVENT_CLOSE\npanel的关闭事件\n\n\nBI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON\n点击工具栏事件\n\n\n\n\n"},"case/layer/pane_list.html":{"url":"case/layer/pane_list.html","title":"pane_list","keywords":"","body":"bi.list_pane\nlist面板,基类BI.Widget\nsource\n\nBI.createWidget({\n type: 'bi.list_pane',\n element: \"#wrapper\",\n cls: \"bi-border\",\n items: []\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n列表\narray\n—\n[ ]\n\n\nitemsCreator\n列表创建器\nfunction\n—\n—\n\n\nhasNext\n是否有下一页\nfunction\n—\n—\n\n\nonLoad\n正在加载\nfunction\n—\n— \n\n\nel\n开启panel的元素\nobject\n—\n{type: \"bi.button_group\" }\n\n\nlogic\n布局逻辑\nobject\n—\n{ dynamic:true}\n\n\nhgap\n效果相当于容器左右padding值\nnumber\n—\n0\n\n\nvgap\n效果相当于容器上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于容器left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于容器right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于容器top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于容器bottom-padding值\nnumber\n—\n0\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nprependItems\n内部前插入\nitems\n\n\naddItems\n内部后插入\nitems\n\n\nremoveItemAt\n移除指定索引处的item\nindexs\n\n\npopulate\n刷新列表\nitems\n\n\nsetNotSelectedValue\n设置未被选中的值\nvalue,可以是单个值也可以是个数组\n\n\nsetValue\n设置value值\nvalue,可以是单个值也可以是个数组\n\n\ngetNotSelectedValue\n获取没有被选中的值\n—\n\n\ngetValue\n获取被选中的值\n—\n\n\ngetAllButtons\n获取所有button\n—\n\n\ngetAllLeaves\n获取所有的叶子节点\n—\n\n\ngetSelectedButtons\n获取所有被选中的元素\n—\n\n\ngetNotSelectedButtons\n获取所有未被选中的元素\n—\n\n\ngetIndexByValue\n根据value值获取value在数组中的索引\nvalue\n\n\ngetNodeById\n根据id获取节点\nid\n\n\ngetNodeByValue\n根据value值获取节点\nvalue\n\n\nempty\n清空组件\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\n\n\n"},"case/layer/panel.html":{"url":"case/layer/panel.html","title":"panel","keywords":"","body":"bi.panel\n带有标题栏的panel,基类BI.Widget\nsource\n\nBI.createWidget({\n element: \"#wrapper\",\n type: \"bi.panel\",\n title: \"标题\",\n titleButtons: [{\n type: \"bi.button\",\n text: \"+\"\n }],\n el: this.button_group,\n logic: {\n dynamic: true\n }\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n标题\nstring\n—\n\" \"\n\n\ntitleButton\n标题后的按钮组\narray\n—\n[ ]\n\n\nel\n开启panel的元素\nobject\n—\n{ }\n\n\nlogic\n布局逻辑\nobject\n—\n{ dynamic:false}\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetTitle\n设置标题\ntitle\n\n\n\n\n"},"case/list/list.select.html":{"url":"case/list/list.select.html","title":"select_list","keywords":"","body":"bi.select_list\n选择列表\nsource\n\nBI.createWidget({\n type: \"bi.select_list\",\n items: [{\n text: '1',\n }, {\n text: '2',\n }]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ndirection\ntoolbar位置\nstring\nBI.Direction.Top\n\n\nonLoaded\n加载完成的回调(测试了无效果)\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetAllSelected\n设置全选\nv: boolean\n\n\nsetToolBarVisible\n设置toolbar是否可见\nb: boolean\n\n\nisAllSelected\n是否全选中\n—\n\n\nhasPrev\n是否有上一页\n—\n\n\nhasNext\n是否有下一页\n—\n\n\nprependItems\n列表最前添加元素\nitems\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/lazy_loader.html":{"url":"case/loader/lazy_loader.html","title":"lazy_loader","keywords":"","body":"bi.lazy_loader\n懒加载loader\nsource\n\nBI.createWidget({\n type: \"bi.lazy_loader\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/list_loader.html":{"url":"case/loader/list_loader.html","title":"list_loader","keywords":"","body":"bi.list_loader\n为解决排序问题引入的控件\nsource\n\nBI.createWidget({\n type: \"bi.list_loader\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncount\n分页计数\nnumber\nfalse\n\n\nnext\n\nobject\n{}\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nonLoaded\n加载完成回调\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nhasNext\n是否有下一页\n—\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/loader/sort_list.html":{"url":"case/loader/sort_list.html","title":"sort_list","keywords":"","body":"bi.sort_list\n排序列表\nsource\n\nBI.createWidget({\n type: \"bi.sort_list\",\n width: 100,\n element: 'body',\n items: items,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncount\n分页计数\nnumber\nfalse\n\n\nnext\n\nobject\n{}\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\nitems\n子项\narray\n[]\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nonLoaded\n加载完成回调\nfunction\nBI.emptyFn\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nhasNext\n是否有下一页\n—\n\n\naddItems\n列表最后添加元素\nitems\n\n\nsetValue\n设置值\ndata\n\n\ngetVlaue\n获得值\n—\n\n\nempty\n清空\n—\n\n\npopulate\n替换内容\nitems\n\n\nresetHeight\n重新设置高度\nh\n\n\nsetNotSelectedValue\n设置未选中值\n—\n\n\ngetNotSelectedValue\n获取未选中植\n—\n\n\ngetAllButtons\n获得所以根节点\n—\n\n\ngetAllLeaves\n获得所有叶节点\n—\n\n\ngetSelectedButtons\n获取选中的根节点\n—\n\n\ngetNotSelectedButtons\n获取未选中的根节点\n—\n\n\ngetIndexByValue\n根据值获取索引\nvalue\n\n\ngetNodeById\n根据id获取node\nid\n\n\ngetNodeByValue\n根据值获取node\nvalue\n\n\n\n\n"},"case/trigger/editor_trigger.html":{"url":"case/trigger/editor_trigger.html","title":"editor_trigger","keywords":"","body":"bi.editor_trigger\n文本输入框trigger\nsource\n\nBI.createWidget({\n type: \"bi.editor_trigger\",\n element: \"body\",\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nvalidationChecker\n验证函数\nfunction\nBI.emptyFn\n\n\nquitChecker\n退出时验证函数\nfunction\nBI.emptyFn\n\n\nallowBlank\n是否允许为空\nboolean\nfalse\n\n\nwatermark\n水印\nstring\n\"\"\n\n\nerrorText\n错误信息\nstring\n\"\"\n\n\ntriggerWidth\n触发器宽度\nnumber\n30\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置值\nvalue\n\n\ngetVlaue\n获得值\n—\n\n\nsetText\n\ntext\n\n\n\n\n"},"case/trigger/icon_trigger.html":{"url":"case/trigger/icon_trigger.html","title":"icon_trigger","keywords":"","body":"bi.icon_trigger\n图标按钮trigger\nsource\n\nBI.createWidget({\n type: \"bi.icon_trigger\",\n element: \"body\",\n});\n\n\n\n\n"},"case/trigger/text_trigger.html":{"url":"case/trigger/text_trigger.html","title":"text_trigger","keywords":"","body":"bi.text_trigger\n文本输入框trigger\nsource\n\nBI.createWidget({\n type: \"bi.editor_trigger\",\n element: \"body\",\n});\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置值\nvalue\n\n\ngetVlaue\n获得值\n—\n\n\n\n\n"},"case/combo/bubble_combo.html":{"url":"case/combo/bubble_combo.html","title":"bubble_combo","keywords":"","body":"bi.bubble_combo\n表示一个可以展开的节点, 不仅有选中状态而且有展开状态, 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.bubble_combo\",\n element:\"#wrapper\",\n el: {\n type: \"bi.button\",\n text: \"测试\",\n height: 25\n },\n popup: {\n el: {\n type: \"bi.button_group\",\n items: BI.makeArray(100, {\n type: \"bi.text_item\",\n height: 25,\n text: \"item\"\n }),\n layouts: [{\n type: \"bi.vertical\"\n }]\n },\n maxHeight: 200\n }\n })\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntext\n组件text值\nstring\n—\n\"\"\n\n\nvalue\n组件value值\nstring\n—\n\"\"\n\n\nstopEvent\n阻止事件\nboolean\ntrue,false\nfalse\n\n\nstopPropagation\n阻止冒泡\nboolean\ntrue,false\nfalse\n\n\nselected\nbutton的选中状态\nboolean\ntrue,false\nfalse\n\n\nonce\n点击一次选中有效,再点无效\nboolean\ntrue,false\nfalse\n\n\nforceSelected\n点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\nboolean\ntrue,false\nfalse\n\n\nforceNotSelected\n无论怎么点击都不会被选中\nboolean\ntrue,false\nfalse\n\n\ndisableSelected\n使能选中\nboolean\ntrue,false\nfalse\n\n\nshadow\n是否显示阴影\nboolean\ntrue,false\nfalse\n\n\nisShadowShowingOnSelected\n选中状态下是否显示阴影\nboolean\ntrue,false\nfalse\n\n\ntrigger\n被选元素要触发的事件\nstring\nmousedown, mouseup, click, dblclick, lclick\nnull\n\n\nhandler\n点击事件回调\nfunction\n—\nBI.emptyFn\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nbindEvent\n绑定事件\n—\n\n\nbeforeClick\n点击事件之前\n—\n\n\ndoClick\n点击事件\n—\n\n\nhandle\n返回该对象\n—\n\n\nhover\nhover事件\n—\n\n\ndishover\n取消hover事件\n—\n\n\nsetSelected\n设置选中的文本\nb\n\n\nisSelected\n是否被选中\n—\n\n\nisOnce\n是否只允许点击一次\n—\n\n\nisForceSelected\n判断是否点击即选中\n—\n\n\nisForceNotSelected\n判断是否怎么点击都不会被选中\n—\n\n\nisDisableSelected\n判断是否让选中\n—\n\n\nsetText\n设置文本值\n—\n\n\ngetText\n获取文本值\n—\n\n\nempty\n清空组件\n—\n\n\ndestroy\n销毁组件\n—\n\n\n\n\n"},"case/combo/icon_combo.html":{"url":"case/combo/icon_combo.html","title":"icon_combo","keywords":"","body":"bi.icon_combo\n切换trigger图标的combo 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.icon_combo\",\n element: \"#wrapper\",\n iconClass: \"rename-font\",\n items: [{\n value: \"第一项\",\n iconClass: \"delete-font\"\n }, {\n value: \"第二项\",\n iconClass: \"rename-font\"\n }, {\n value: \"第三项\",\n iconClass: \"move-font\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nwidth\n宽度\nnumber\n—\n24\n\n\nheight\n高度\nnumber\n—\n24\n\n\niconClass\nicon的类名\nstring\n—\n\" \"\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\npopup\n弹出层\nobject\n—\n{ }\n\n\nminWidth\n最小宽度\nnumber\n—\n100\n\n\nmaxWidth\n最大宽度\nstring/number\n—\n\"auto\"\n\n\nmaxHeight\n最大高度\nnumber\n—\n300\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n—\n0\n\n\nadjustXOffset\n调整横向偏移\nnumber\n—\n0\n\n\nadjustYOffset\n调整纵向偏移\nnumber\n—\n0\n\n\noffsetStyle\n弹出层显示位置\nstring\nleft,right,center\n\"left,right,center\"\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\nshowView\n显示弹出层\n—\n\n\nhideView\n隐藏弹出层\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/combo/static_combo.html":{"url":"case/combo/static_combo.html","title":"static_combo","keywords":"","body":"bi.static_combo\n单选combo,trigger显示项不会改变 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.static_combo\",\n element: \"#wrapper\",\n text: \"Value 不变\",\n items: [{\n text: \"1\",\n value: 1\n }, {\n text: \"2\",\n value: 2\n }, {\n text: \"3\",\n value: 3\n }]\n });\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n24\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\nitems\n子组件\narray\n—\n[ ]\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/combo/text_value_combo.html":{"url":"case/combo/text_value_combo.html","title":"text_value_combo","keywords":"","body":"bi.text_value_combo\n基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.text_value_combo\",\n element: \"#wrapper\",\n text: \"value_combo\",\n width: 300,\n items: [{\n text: \"1\",\n value: 1\n }, {\n text: \"2\",\n value: 2\n }, {\n text: \"3\",\n value: 3\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n30\n\n\nel\n自定义下拉框trigger\nobject\n—\n{ }\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\nchooseType\n选择类型\nconst\n参考button_group\nBI.ButtonGroup.CHOOSE_TYPE_SINGLE\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/combo/text_value_downlist_combo.html":{"url":"case/combo/text_value_downlist_combo.html","title":"text_value_downlist_combo","keywords":"","body":"bi.text_value_down_list_combo\n有二级下拉菜单的combo 基类BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.text_value_down_list_combo\",\n element: \"#wrapper\",\n text: \"text\",\n items: [\n [{\n el: {\n text: \"1\",\n value: 1\n },\n children: [{\n text: \"11\",\n value: 11\n }]\n }],\n [{\n text: \"2\",\n value: 2\n }, {\n text: \"3\",\n value: 3\n }]\n ]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nheight\n高度\nnumber\n—\n30\n\n\ntext\n文本内容\nstring\n—\n\" \"\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数 \n\n\n\n\nsetValue\n设置value值\n—\n\n\ngetValue\n获取value值\n—\n\n\npopulate\n刷新列表\nitems\n\n\n\n\n"},"case/tree/branch_tree.html":{"url":"case/tree/branch_tree.html","title":"branch_tree","keywords":"","body":"bi.branch_tree\n横向分支的树\nsource\nBI.createWidget({\n type: \"bi.branch_tree\",\n element: 'body',\n items: [{\n el: {},\n children: [{\n el: {},\n children: {},\n // ...\n }]\n }]\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander组件配置项\nobject\n{}\n\n\nel\n基础元素\nobject\n{}\n\n\nitems\n子项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\n—\n\n\ngetValue\n获取所选项值\n—\n\n\n\n\n"},"case/tree/handstand_branch_tree.html":{"url":"case/tree/handstand_branch_tree.html","title":"handstand_branch_tree","keywords":"","body":"bi.handstand_branch_tree\n纵向分支的树\nsource\nBI.createWidget({\n type: \"bi.handstand_branch_tree\",\n element: 'body',\n el: {},\n items: [{\n el: {},\n children: [{\n el: {},\n children: {},\n // ...\n }]\n }]\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander组件配置项\nobject\n{}\n\n\nel\n基础元素\nobject\n{}\n\n\nitems\n子项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\n—\n\n\ngetValue\n获取所选项值\n—\n\n\n\n\n"},"case/tree/display_tree.html":{"url":"case/tree/display_tree.html","title":"display_tree","keywords":"","body":"bi.display_tree\n树展示控件\nsource\nvar tree = BI.createWidget({\n type: \"bi.display_tree\",\n element: 'body',\n});\n\ntree.initTree({\n id: 1,\n text: '',\n open: true,\n});\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ninitTree\n加载tree结构\nnode: 节点数组 settings: 配置项\n\n\ndestroy\n摧毁元素\n—\n\n\n\n\n"},"case/tree/simple_tree.html":{"url":"case/tree/simple_tree.html","title":"simple_tree","keywords":"","body":"bi.simple_tree\n简单的多选树\nsource\nvar tree = BI.createWidget({\n type: \"bi.simple_tree\",\n element: 'body',\n});\n\ntree.populate(items);\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nitemsCreator\nitems构造器\nfunction\nBI.emptyFn\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\nitems: 子项数组 keywords: 关键字标红字符串\n\n\nsetValue\n设置值\nv\n\n\ngetValue\n获得值\n—\n\n\nempty\n清空树\n—\n\n\n\n\n"},"case/tree/level_tree.html":{"url":"case/tree/level_tree.html","title":"level_tree","keywords":"","body":"bi.level_tree\n二级树\nsource\nvar tree = BI.createWidget({\n type: \"bi.level_tree\",\n element: 'body',\n items: [],\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nexpander\nbranch_expander配置\nobject\n{}\n\n\nitems\n元素\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ninitTree\n构造树结构\nnodes\n\n\nstroke\n生成树方法\nnodes\n\n\npopulate\n去掉所有内容\nitems: 子项数组\n\n\nsetValue\n设置值\nv\n\n\ngetValue\n获得值\n—\n\n\ngetAllLeaves\n获取所有叶节点\n—\n\n\ngetNodeById\n根据Id获取节点\nid\n\n\ngetNodeByValue\n根据值获取节点\nid\n\n\n\n\n"},"case/tree/branch_relation.html":{"url":"case/tree/branch_relation.html","title":"branch_relation","keywords":"","body":"bi.branch_relation\n表关联树\nsource\nvar tree = BI.createWidget({\n type: \"bi.branch_relation\",\n element: 'body',\n items: [],\n direction: BI.Direction.Right,\n align: BI.HorizontalAlign.Right,\n centerOffset: -50\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncenterOffset\n重心偏移量\nnumber\n0\n\n\ndirection\n根节点所在方向\nstring\nBI.Direction.Bottom\n\n\nalign\n对齐方向\nstring\nBI.VerticalAlign.Top\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n去掉所有内容\nitems: 子项数组\n\n\n\n\n"},"case/table/adaptive_table.html":{"url":"case/table/adaptive_table.html","title":"adaptive_table","keywords":"","body":"bi.adaptive_table\n自适应宽度的表格\nsource\nBI.createWidget({\n type: \"bi.adaptive_table\",\n element: 'body',\n width: 600,\n height: 500,\n isResizeAdapt: true,\n isNeedResize: true,\n isNeedFreeze: true,\n freezeCols: [0, 1],\n columnSize: [50,50,200,250,400],\n header: [],\n items: [],\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否可改变列大小\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/table/tree_table.html":{"url":"case/table/tree_table.html","title":"tree_table","keywords":"","body":"bi.tree_table\n树状结构的表格\nsource\nvar table = BI.createWidget({\n type: \"bi.tree_table\",\n width: 600,\n height: 400,\n columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n header: header,\n items: items,\n crossHeader: crossHeader,\n crossItems: crossItems,\n element: 'body',\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整列宽\nboolean\nfalse\n\n\nisResizeAdapt\n是否需要在调整列宽或区域宽度的时候它们自适应变化\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nheaderCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/table/layer_tree_table.html":{"url":"case/table/layer_tree_table.html","title":"layer_tree_table","keywords":"","body":"bi.layer_tree_table\n层级树状结构的表格\nsource\nvar table = BI.createWidget({\n type: \"bi.layer_tree_table\",\n width: 600,\n height: 400,\n columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n header: header,\n items: items,\n crossHeader: crossHeader,\n crossItems: crossItems,\n element: 'body',\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整列宽\nboolean\nfalse\n\n\nisResizeAdapt\n是否需要在调整列宽或区域宽度的时候它们自适应变化\nboolean\ntrue\n\n\nisNeedFreeze\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n最大列宽\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n25\n\n\nheaderCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\nfunction\nBI.emptyFn\n\n\nrowSize\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n列项间的\narray\n[]\n\n\nheader\n表头\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\nrestore\n存储\n—\n\n\npopulate\n增加项\nitems: array\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"case/pager/all_count_pager.html":{"url":"case/pager/all_count_pager.html","title":"all_count_pager","keywords":"","body":"bi.all_count_pager\n有总页数和总行数的分页控件\nsource\n\nBI.createWidget({\n type: 'bi.all_count_pager',\n height: 30,\n pages: 10, //必选项\n curr: 1,\n count: 1,\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n控件高度\nnumber\n30\n\n\npages\n总页数\nnumber\n1\n\n\ncurr\n当前页\nnumber\n1\n\n\ncount\n总行数\nnumber\n1\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetAllPages\n设置总页数\nv\n\n\nsetValue\n设置当前页码\nv\n\n\nsetVPage\n设置当前页码\nv\n\n\nsetCount\n设置计数\ncount\n\n\ngetCurrentPage\n获取当前页码\n—\n\n\nhasPrev\n是否有前一页\n—\n\n\nhasNext\n是否有后一页\n—\n\n\nsetPagerVisible\n设置页码是否可见\ntrue/false\n\n\npopulate\n清空内容\n—\n\n\n\n\n"},"case/pager/direction_pager.html":{"url":"case/pager/direction_pager.html","title":"direction_pager","keywords":"","body":"bi.direction_pager\n显示页码的分页控件\nsource\n\nvar pager = BI.createWidget({\n type: 'bi.direction_pager',\n height: 30,\n horizontal: {\n pages: 10, //必选项\n curr: 1, //初始化当前页, pages为数字时可用,\n firstPage: 1,\n lastPage: 10,\n },\n vertical: {\n pages: 10, //必选项\n curr: 1, //初始化当前页, pages为数字时可用,\n firstPage: 1,\n lastPage: 10,\n },\n element: 'body',\n});\n\n\n\n参数\n\n\n\n参数\n二级参数\n说明\n类型\n默认值\n\n\n\n\nheight\n\n控件高度\nnumber\n30\n\n\nhorizontal\n\n横向翻页设置\nobject\n—\n\n\n\npages\n总页数\nnumber/boolean\nfalse\n\n\n\ncurr\n当前页, pages为数字时可用\nnumber\n1\n\n\n\nhasPrev\n判断是否有前一页的方法\nfunction\nBI.emptyFn\n\n\n\nhasNext\n判断是否有后一页的方法\nfunction\nBI.emptyFn\n\n\n\nfirstPage\n第一页\nnumber\n1\n\n\n\nlastPage\n最后一页\nnumber/function\nBI.emptyFn\n\n\nvertical\n\n纵向翻页设置,参数与horizontal相同\nobject\n—\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ngetVPage\n获取纵向页码\n—\n\n\ngetHPage\n获取水平向页码\n—\n\n\nsetVPage\n获取纵向页码\nv\n\n\nsetHPage\n获取水平向页码\nv\n\n\nhasVNext\n纵向坐标是否有下一页\n—\n\n\nhasHNext\n横向坐标是否有下一页\n—\n\n\nhasVPrev\n纵向坐标是否有上一页\n—\n\n\nhasHPrev\n横向坐标是否有上一页\n—\n\n\nsetHPagerVisible\n设置横向分页键可见\n—\n\n\nsetVPagerVisible\n设置纵向分页键可见\n—\n\n\npopulate\n清空内容\n—\n\n\n\n\n"},"case/calendar.html":{"url":"case/calendar.html","title":"calendar","keywords":"","body":"bi.calendar\n日历控件\nsource\n\nBI.createWidget({\n type: 'bi.calendar',\n min: '1900-01-01', //最小日期\n max: '2099-12-31', //最大日期\n year: 2015,\n month: 7, //7表示八月\n day: 25,\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nmin\n最小日期\nstring\n'1900-01-01'\n\n\nmax\n最大日期\nstring\n'2099-12-31'\n\n\nyear\n设定的年份\nnumber\n2015\n\n\nmonth\n设定的月份\nnumber\n7\n\n\nday\n设定的日期\nnumber\n25\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nisFrontDate\n是否为最小日期\n—\n\n\nisFinalDate\n是否为最大日期\n—\n\n\nsetValue\n设置日期\nobject: {year, month, day}\n\n\ngetVlaue\n获得日期\n—\n\n\n\n\n"},"case/clipboard.html":{"url":"case/clipboard.html","title":"clipboard","keywords":"","body":"bi.clipboard\n剪切板\nsource\n\nBI.createWidget({\n type: 'bi.clipboard',\n width: 100,\n height: 100,\n copy: function () {},\n\n afterCopy: function () {}\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ncopy\n获取需要拷贝的值\nfunction\nBI.emptyFn\n\n\nafterCopy\n完成拷贝后执行的方法\nfunction\nBI.emptyFn\n\n\n\n\n"},"case/complex_canvas.html":{"url":"case/complex_canvas.html","title":"complex_canvas","keywords":"","body":"complex_canvas\n复杂的canvas绘图\nsource\n\nvar canvas = BI.createWidget({\n type: \"bi.complex_canvas\",\n width: 500,\n height: 600\n });\ncanvas.branch(55, 100, 10, 10, 100, 10, 200, 10, {\n offset: 20,\n strokeStyle: \"red\",\n lineWidth: 2\n });\n\ncanvas.stroke();\n\n\n\n对外方法\n\n\n\n名称\n说明\n回调参数\n\n\n\n\nbranch\n绘制树枝节点\n(x0, y0, x1, y1, x2, y2) (以x0, y0为根节点,分支到x1,y1, x2,y2...)\n\n\nstroke\n绘制\n\n\n\n\n"},"case/color_chooser.html":{"url":"case/color_chooser.html","title":"color_chooser","keywords":"","body":"bi.color_chooser\n选色控件\nsource\n\nBI.createWidget({\n type: \"bi.color_chooser\",\n element: \"#wrapper\",\n width: 30,\n height: 30\n});\n\n\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nisViewVisible\n判断是否显示\n—\n\n\nsetValue\n设置颜色值\ncolor\n\n\ngetValue\n获取颜色值\n—\n\n\n\n\n"},"case/color_chooser_popup.html":{"url":"case/color_chooser_popup.html","title":"color_chooser_popup","keywords":"","body":"bi.color_chooser_popup\n选色控件弹窗\nsource\n\nBI.createWidget({\n type: \"bi.color_chooser_popup\",\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n145\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetStoreColors\n设置储存的颜色值\ncolors\n\n\nsetValue\n设置颜色值\ncolor\n\n\ngetValue\n获取颜色值\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nEVENT_VALUE_CHANGE\n颜色值改变时触发\n\n\n\n\n"},"case/segment.html":{"url":"case/segment.html","title":"segment","keywords":"","body":"bi.sgement\n各种segment\nsource\n\nBI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"默认风格\"\n }, {\n type: \"bi.segment\",\n items: [{\n text: \"tab1\",\n value: 1,\n selected: true\n }, {\n text: \"tab2\",\n value: 2\n }, {\n text: \"tab3 disabled\",\n disabled: true,\n value: 3\n }]\n }],\n hgap: 50,\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/general.html":{"url":"detailed/bi.button/general.html","title":"通用按钮","keywords":"","body":"bi.button\n通用按钮,详情见BI.button\n"},"detailed/bi.button/tooltip.html":{"url":"detailed/bi.button/tooltip.html","title":"提示性信息","keywords":"","body":"提示性信息\nsource\nvar toast = BI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n el: {\n type: 'bi.button',\n text: '简单Toast测试',\n height: 30,\n handler: function () {\n BI.Msg.toast(\"这是一条简单的数据\");\n }\n }\n }],\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/items.html":{"url":"detailed/bi.button/items.html","title":"各种items","keywords":"","body":"各种items\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"单选item\"\n }, {\n type: \"bi.single_select_item\",\n text: \"单选项\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"复选item\"\n }, {\n type: \"bi.multi_select_item\",\n text: \"复选项\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/node.html":{"url":"detailed/bi.button/node.html","title":"各种节点nodes","keywords":"","body":"各种节点nodes\nsource\n\nBI.createWidget({\n type: 'bi.vertical',\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"十字形的节点\"\n }, {\n type: \"bi.plus_group_node\",\n text: \"十字形的节点\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"三角形的节点\"\n }, {\n type: \"bi.triangle_group_node\",\n text: \"三角形的节点\"\n }, {\n type: \"bi.label\",\n height: 30,\n text: \"箭头节点\"\n }, {\n type: \"bi.arrow_group_node\",\n text: \"箭头节点\"\n }]\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值,如果clear属性为true,该属性值置0\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/bi.button/segment.html":{"url":"detailed/bi.button/segment.html","title":"各种segment","keywords":"","body":"bi.sgement\n各种segment\nsource\n\nBI.createWidget({\n type: \"bi.vertical\",\n element: \"#wrapper\",\n items: [{\n type: \"bi.label\",\n height: 30,\n text: \"默认风格\"\n }, {\n type: \"bi.segment\",\n items: [{\n text: \"tab1\",\n value: 1,\n selected: true\n }, {\n text: \"tab2\",\n value: 2\n }, {\n text: \"tab3 disabled\",\n disabled: true,\n value: 3\n }]\n }],\n hgap: 50,\n vgap: 20\n});\n\n\n\nAPI\n基础属性\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n10\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n0\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nitems\n子控件数组\narray\n—\n[ ]\n\n\nwidth\n宽度\nnumber\n—\n—\n\n\nheight\n高度\nnumber\n—\n—\n\n\n\n\n"},"detailed/tree/bi.multi_tree_combo.html":{"url":"detailed/tree/bi.multi_tree_combo.html","title":"multi_tree_combo","keywords":"","body":"bi.multi_tree_combo\n树下拉框,继承BI.Widget\nsource\nvar items = [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n text: \"根目录\"\n}, {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n text: \"第一级目录1\"\n}, {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n text: \"第二级文件1\"\n}];\n\nBI.createWidget({\n type: \"bi.multi_tree_combo\",\n itemsCreator: function (options, callback) {\n callback({\n items: items\n });\n },\n width: 300\n})\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nwidth\n宽度\nnumber\n200\n\n\nheight\n高度\nnumber\n30\n\n\nitems\n子项,pId代表父节点ID\narray\nnull\n\n\nitemsCreator\n子项创建函数\nfunction\nfunction() {}\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetValue\n设置文本框值\nv\n\n\ngetValue\n获取文本框值\n—\n\n\npopulate\n更改树结构内容\nitems\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MultiTreeCombo.EVENT_CONFIRM\n点击一级节点触发\n\n\n\n\n"},"detailed/tree/bi.switch_tree.html":{"url":"detailed/tree/bi.switch_tree.html","title":"switch_tree","keywords":"","body":"bi.switch_tree\n可以单选多选切换的树,继承BI.Widget\nsource\nvar items = [{\n id: -1,\n pId: -2,\n value: \"根目录\",\n text: \"根目录\"\n}, {\n id: 1,\n pId: -1,\n value: \"第一级目录1\",\n text: \"第一级目录1\"\n}, {\n id: 11,\n pId: 1,\n value: \"第二级文件1\",\n text: \"第二级文件1\"\n}];\n\nvar tree = BI.createWidget({\n type: \"bi.switch_tree\",\n items: items,\n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nitems\n子项,pId代表父节点ID\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nswitchSelect\n切换树结构\n—\n\n\nsetSelect\n设置选中项\nv\n\n\ngetSelect\n获取选中项\n—\n\n\nsetValue\n设置当前选中项内容\nv\n\n\ngetValue\n获取当前选中项内容\nv\n\n\npopulate\n更改树结构内容\nitems\n\n\n\n\n"},"detailed/table/bi.preview_table.html":{"url":"detailed/table/bi.preview_table.html","title":"preview_table","keywords":"","body":"bi.preview_table\n用于表格预览,继承BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.preview_table\",\n header: [[{\n text: \"表头1\"\n }, {\n text: \"表头2\"\n }, {\n text: \"表头3\"\n }]],\n element: 'body',\n columnSize: [100, \"\", 50],\n items: [[{\n text: \"第一行第一列\"\n }, {\n text: \"第一行第二列\"\n }, {\n text: \"第一行第三列\"\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否冻结\nboolean\nfalse\n\n\nfreezeCols\n冻结的列\narray\n[]\n\n\nrowSize\n行高\narray/number\nnull\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nheaderRowSize\n表头行高\nnumber\n30\n\n\nheader\n表头内容\narray\n[]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n替换为新的内容\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.responsive_table.html":{"url":"detailed/table/bi.responsive_table.html","title":"responsive_table","keywords":"","body":"bi.responsive_table\n自适应宽度的表格,继承BI.Widget\nsource\n\nBI.createWidget({\n type: \"bi.responsive_table\",\n isNeedMerge: true,\n isNeedFreeze: true,\n mergeCols: [0, 1],\n columnSize: [\"\", \"\", \"\"],\n items: [[{\n text: \"第一行第一列\"\n }, {\n text: \"第一行第二列\"\n }, {\n text: \"第一行第三列\"\n }]],\n header: [[{\n text: \"表头1\"\n }, {\n text: \"表头2\"\n }, {\n text: \"表头3\"\n }]],\n element: 'body'\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedFreeze\n是否需要冻结单元格\nboolean\nfalse\n\n\nfreezeCols\n冻结的列号,从0开始,isNeedFreeze为true时生效\narray\n[]\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeRule\nfunction (row1, row2) 合并规则, 默认相等时合并\nfunction\nfunction\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nheaderRowSize\n表头行高\nnumber\n25\n\n\nfooterRowSize\n表尾行高\nnumber\n25\n\n\nrowSize\n行高\nnumber\n25\n\n\ncolumnSize\n列宽\narray\n[]\n\n\nregionColumnSize\n\nboolean\nfalse\n\n\nheader\n表头内容\narray\n[]\n\n\nfooter\n是否需要表尾\nboolean\nfalse\n\n\nitems\n子组件二维数组\narray\n[]\n\n\ncrossHeader\n交叉表头\narray\n[]\n\n\ncrossItems\n交叉表内容二维数组\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n替换为新内容\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.excel_table.html":{"url":"detailed/table/bi.excel_table.html","title":"excel_table","keywords":"","body":"bi.excel_table\n类似excel式的表格,继承BI.Widget\nsource\nBI.createWidget({\n type: \"bi.excel_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [\n [{\n type: \"bi.label\",\n cls: \"layout-bg1\",\n text: \"第一行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg2\",\n text: \"第一行第二列\"\n }],\n [{\n type: \"bi.label\",\n cls: \"layout-bg3\",\n text: \"第二行第一列\"\n }, {\n type: \"bi.label\",\n cls: \"layout-bg4\",\n text: \"第二行第二列\"\n }]\n ] \n});\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nisNeedResize\n是否需要调整大小\nboolean\nfalse\n\n\nisResizeAdapt\n是否调整时自适应\nboolean\ntrue\n\n\nisNeedMerge\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n单元格宽度集合\narray\n[]\n\n\nheaderRowSize\n表头高度\nnumber\n37\n\n\nfooterRowSize\n表尾高度\nnumber\n37\n\n\nrowSize\n普通单元格高度\nnumber\n37\n\n\nregionColumnSize\n列项间的\narray\n[82, \"\"]\n\n\nitems\n子组件\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nresize\n调整表格\n—\n\n\nsetColumnSize\n设置列宽\ncolumnSize\n\n\ngetColumnSize\n得到列宽\n—\n\n\ngetCalculateColumnSize\n获得计算后的列宽\n—\n\n\nsetHeaderColumnSize\n设置表头的列宽\ncolumnSize\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\ngetCalculateRegionColumnSize\n获取计算后的列项之间的间隙\n—\n\n\ngetCalculateRegionRowSize\n获取计算后的列项上下之间的间隙\n—\n\n\ngetClientRegionColumnSize\n获取浏览器中显示的列项之间的间隙\n—\n\n\ngetScrollRegionColumnSize\n获取横向滚动条宽度\n—\n\n\ngetScrollRegionRowSize\n获取纵向滚动条宽度\n—\n\n\nhasVerticalScroll\n是否含有数值滚动条\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\ngetColumns\n获取列项\n—\n\n\nresizeHeader\n调整表头\n—\n\n\nattr\n设置属性\nkey:键,value:值\n\n\npopulate\n增加行\nrows\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/table/bi.page_table.html":{"url":"detailed/table/bi.page_table.html","title":"page_table","keywords":"","body":"bi.page_table\n分页表格\nsource\nBI.createWidget({\n type: \"bi.page_table\",\n element: \"body\",\n columnSize: [200,200],\n items: [],\n pager: {\n horizontal : {},\n vertical: {}\n } \n});\n\n\n\n参数设置\n\n\n\n参数\n二级参数\n三级参数\n说明\n类型\n默认值\n\n\n\n\npager\n\n\n分页选项\nobject\n—\n\n\n\nhorizontal\n\n水平分页选项\nobject\n—\n\n\n\n\npages\n显示总页数\nboolean\nfalse\n\n\n\n\ncurr\n当前页\nnumber\n1\n\n\n\n\nhasPrev\n判断是否有前一页的函数\nfunction\nBI.emptyFn\n\n\n\n\nhasNext\n是否有下一页\nfunction\nBI.emptyFn\n\n\n\n\nfirstPage\n第一页\nnumber\n1\n\n\n\n\nlastPage\n最后一页\nnumber/function\nBI.emptyFn\n\n\n\nvertical\n\n纵向分页,参数与horizontal\nobject\n—\n\n\nitemsCreator\n\n\n元素创造器\nfunction\nBI.emptyFn\n\n\nisNeedFreeze\n\n\n是否需要冻结表头\nboolean\nfalse\n\n\nfreezeCols\n\n\n冻结的列\narray\n[]\n\n\nisNeedMerge\n\n\n是否需要合并单元格\nboolean\nfalse\n\n\nmergeCols\n\n\n合并的单元格列号\narray\n[]\n\n\nmergeRule\n\n\n合并规则, 默认相等时合并\nfunction(row1, row2)\n默认row1 = row2 时合并\n\n\ncolumnSize\n\n\n单元格宽度集合\narray\n[]\n\n\nminColumnSize\n\n\n最小列宽\narray\n[]\n\n\nmaxColumnSize\n\n\n最大列宽\narray\n[]\n\n\nheaderRowSize\n\n\n表头高度\nnumber\n25\n\n\nrowSize\n\n\n普通单元格高度\nnumber\n25\n\n\nregionColumnSize\n\n\n列项间的\narray\n[]\n\n\nheaderCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nsummaryCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nsequenceCellStyleGetter\n\n\n\nfunction\nBI.emptyFn\n\n\nheader\n\n\n表头\narray\n[]\n\n\nitems\n\n\n子组件\narray\n[]\n\n\ncrossHeader\n\n\n交叉表头\narray\n[]\n\n\ncrossItems\n\n\n交叉项\narray\n[]\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\nsetHPage\n设置水平页数\nv: 页码\n\n\nsetVpage\n设置纵向页数\nv: 页码\n\n\ngetHPage\n获得水平页数\n—\n\n\ngetVPage\n获得垂直页数\n—\n\n\nsetWidth\n设置宽度\nwidth: 宽度\n\n\nsetHeight\n设置高度\nheight: 高度\n\n\nsetColumnSize\n设置列宽\ncolumnSize: 列宽数组\n\n\ngetColumnSize\n得到列宽\n—\n\n\nsetRegionColumnSize\n设置列项之间的间隙\ncolumnSize: 列宽数组\n\n\ngetRegionColumnSize\n获得列项之间的间隙\n—\n\n\nsetVerticalScroll\n设置纵向滚动距离\nscrollTop: 纵向滚动距离\n\n\nsetLeftHorizontalScroll\n设置左到右横向滚动距离\nscrollLeft: 横向滚动距离\n\n\nsetRightHorizontalScroll\n设置右往左横向滚动距离\nscrollLeft: 横向滚动距离\n\n\ngetVerticalScroll\n获取纵向滚动距离\n—\n\n\ngetLeftHorizontalScroll\n获取左到右横向滚动距离\n—\n\n\ngetRightHorizontalScroll\n获取右往左横向滚动距离\n—\n\n\nattr\n设置属性\nkey: 键 value: 值\n\n\npopulate\n增加\n—\n\n\ndestroy\n摧毁表\n—\n\n\n\n\n"},"detailed/text_input/bi.text_editor.html":{"url":"detailed/text_input/bi.text_editor.html","title":"bi.text_editor","keywords":"","body":"bi.text_editor\n通过鼠标或键盘输入字符\n基础用法\nsource\nBI.createWidget({\n type: \"bi.text_editor\",\n element: \"#wrapper\",\n width: 200,\n height: 30,\n watermark:\"请输入内容\"\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件详见Editor\n\n"},"detailed/text_input/bi.search_editor.html":{"url":"detailed/text_input/bi.search_editor.html","title":"bi.search_editor","keywords":"","body":"bi.search_editor\n搜索框\nsource\nBI.createWidget({\n type: 'bi.search_editor',\n element: '#wrapper',\n width: 300,\n watermark:\"搜索\",\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.SearchEditor.EVENT_CLEAR\n点击清空按钮触发\n\n\n\n其他事件详见Editor\n\n"},"detailed/text_input/bi.clear_editor.html":{"url":"detailed/text_input/bi.clear_editor.html","title":"bi.clear_editor","keywords":"","body":"bi.clear_editor\n带清除按钮的输入框\nsource\nBI.createWidget({\n type: 'bi.clear_editor',\n cls: \"bi-border\",\n element: '#wrapper',\n width: 300,\n watermark:\"带清除按钮的输入框\",\n});\n\n\n\nAPI\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nhgap\n效果相当于文本框左右padding值\nnumber\n—\n4\n\n\nvgap\n效果相当于文本框上下padding值\nnumber\n—\n2\n\n\nlgap\n效果相当于文本框left-padding值\nnumber\n—\n0\n\n\nrgap\n效果相当于文本框right-padding值\nnumber\n—\n0\n\n\ntgap\n效果相当于文本框top-padding值\nnumber\n—\n0\n\n\nbgap\n效果相当于文本框bottom-padding值\nnumber\n—\n0\n\n\nvalidationChecker\n输入较验函数\nfunction\n—\n—\n\n\nquitChecker\n是否允许退出编辑函数\nfunction\n—\n—\n\n\nallowBlank\n是否允许空值\nboolean\ntrue,false\nfalse\n\n\nwatermark\n文本框placeholder\nstring\n—\nnull\n\n\nvalue\n文本框默认值\nstring\n—\n\" \"\n\n\nerrorText\n错误提示\nstring\n—\nnull\n\n\nwidth\n文本框宽度\nnumber\n—\n—\n\n\nheight\n文本框高度\nnumber\n—\n30\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.ClearEditor.EVENT_CLEAR\n点击清空按钮触发\n\n\n\n其他事件详见Input\n\n"},"detailed/text_input/finetuning_number_editor.html":{"url":"detailed/text_input/finetuning_number_editor.html","title":"finetuning_number_editor","keywords":"","body":"finetuning_number_editor\n数值微调器\nsource\nBI.createWidget({\n type: 'bi.fine_tuning_number_editor',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nvalue\n编辑框中的值,-1表示自动\nnumber\n\n-1\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.FineTuningNumberEditor.EVENT_CONFIRM\n点击增加/减少按钮或者编辑框确定时触发\n\n\n\n\n"},"detailed/year_combo.html":{"url":"detailed/year_combo.html","title":"year_combo","keywords":"","body":"year_combo\n年份选择下拉框\nsource\nBI.createWidget({\n type: 'bi.year_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\nmin\n限定可选日期的下限\nstring\n\n'1900-01-01'\n\n\nmax\n限定可选日期的上限\nstring\n\n'2099-12-31'\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.YearCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n\n"},"detailed/month_combo.html":{"url":"detailed/month_combo.html","title":"month_combo","keywords":"","body":"month_combo\n月份选择下拉框\nsource\nBI.createWidget({\n type: 'bi.month_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.MonthCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.MonthCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n\n"},"detailed/quarter_combo.html":{"url":"detailed/quarter_combo.html","title":"quarter_combo","keywords":"","body":"quarter_combo\n季度选择下拉框\nsource\nBI.createWidget({\n type: 'bi.quarter_combo',\n element: '#wrapper',\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nbehaviors\n自定义下拉列表中item项的行为,如高亮,标红等(详见button_group)\nobject\n\n{}\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.QuarterCombo.EVENT_CONFIRM\n选中日期或者退出编辑状态触发\n\n\nBI.QuarterCombo.EVENT_BEFORE_POPUPVIEW\n选中日期或者退出编辑状态触发\n\n\n\n\n"},"detailed/down_list_combo.html":{"url":"detailed/down_list_combo.html","title":"down_list_combo","keywords":"","body":"down_list_combo\n多层下拉列表的下拉框\nsource\nBI.createWidget({\n type: 'bi.down_list_combo',\n element: '#wrapper',\n width: 300,\n items: [\n [{\n el: {\n text: \"column 1111\",\n iconCls1: \"check-mark-e-font\",\n value: 11\n },\n children: [{\n text: \"column 1.1\",\n value: 21,\n cls: \"dot-e-font\",\n selected: true\n }, {\n text: \"column 1.222222222222222222222222222222222222\",\n cls: \"dot-e-font\",\n value: 22,\n }]\n }],\n [{\n el: {\n type: \"bi.icon_text_icon_item\",\n text: \"column 2\",\n iconCls1: \"chart-type-e-font\",\n cls: \"dot-e-font\",\n value: 12\n },\n disabled: true,\n children: [{\n type: \"bi.icon_text_item\",\n cls: \"dot-e-font\",\n height: 25,\n text: \"column 2.1\",\n value: 11\n }, {\n text: \"column 2.2\",\n value: 12,\n cls: \"dot-e-font\"\n }]\n }]\n ]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nel\n自定义下拉框trigger\nobject\n\n\n\n\ntrigger\n下拉列表的弹出方式\nstring\nclick, hover\nclick\n\n\ndirection\n弹出列表和trigger的位置关系\nstring\ntop | bottom | left | right | top,left | top,right | bottom,left | bottom,right\nbottom\n\n\nadjustLength\n弹出列表和trigger的距离\nnumber\n\n0\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.DownListCombo.EVENT_CHANGE\n点击一级节点触发\n\n\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE\n点击二级节点触发\n\n\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW\n下拉列表弹出前触发\n\n\n\n具体配置方法见Combo\n\n"},"detailed/numeric_interval.html":{"url":"detailed/numeric_interval.html","title":"numeric_interval","keywords":"","body":"numeric_interval\n数值区间控件\nsource\nBI.createWidget({\n type: \"bi.numerical_interval\",\n element: '#wrapper',\n width: 500\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmin\n最小值初始值\nnumber\n\n无\n\n\nmax\n最大值初始值\nnumber\n\n无\n\n\ncloseMin\n左区间初始状态\nboolean\n\ntrue\n\n\ncloseMax\n右区间初始状态\nboolean\n\ntrue\n\n\n\n方法\n\n\n\n方法\n说明\n用法\n\n\n\n\nisStateValid()\n当前状态是否有效(输入是否合法, 区间是否成立)\n\n\n\nsetMinEnable(boolean)\n设置左区间输入框disable状态\n\n\n\nsetCloseMinEnable(boolean)\n设置左区间开闭combo的disable状态\n\n\n\nsetMaxEnable(boolean)\n设置右区间输入框disable状态\n\n\n\nsetCloseMaxEnable(boolean)\n设置右区间开闭combo的disable状态\n\n\n\nsetNumTip(string)\n设置数值区间的tip提示\n—\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.NumericalInterval.EVENT_VALID\n区间合法的状态事件\n\n\nBI.NumericalInterval.EVENT_ERROR\n区间不合法的状态事件\n\n\n\n\n"},"detailed/multi_select_combo.html":{"url":"detailed/multi_select_combo.html","title":"multi_select_combo","keywords":"","body":"multi_select_combo\n带确定的复选下拉框\nsource\nBI.createWidget({\n type: \"bi.multi_select_combo\",\n element: '#wrapper',\n width: 500,\n itemsCreator: function(){\n return {\n items: [],\n hasNext: false\n }\n }\n});\n\n\n\n\n\n\n\n事件\n说明\n\n\n\n\nBI.MultiSelectCombo.EVENT_CONFIRM\n点击确定触发\n\n\n\n\n"},"detailed/date/date_combo.html":{"url":"detailed/date/date_combo.html","title":"date_combo","keywords":"","body":"date_combo\n日期选择下拉框(弹出的年月选择可以进一步选择日期)\nsource\nBI.createWidget({\n type: \"bi.date_combo\",\n element: \"#wrapper\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n"},"detailed/date/date_pane_widget.html":{"url":"detailed/date/date_pane_widget.html","title":"date_pane_widget","keywords":"","body":"date_pane_widget\n日期选择下拉框的弹出面板\nsource\nBI.createWidget({\n type: \"bi.date_pane_widget\",\n element: \"#wrapper\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nmin\n限定可选日期的下限\nstring\n\n'1900-01-01'\n\n\nmax\n限定可选日期的上限\nstring\n\n'2099-12-31'\n\n\nselectedTime\n选中的初始年月\nobj({year: y, month: m})\n—\n—\n\n\n\n\n"},"detailed/date/year_month_combo.html":{"url":"detailed/date/year_month_combo.html","title":"year_month_combo","keywords":"","body":"year_month_combo\n年月选择下拉框\nsource\nBI.createWidget({\n type: \"bi.year_month_combo\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nyearBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n—\n{ }\n\n\nmonthBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n—\n{ }\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW\n弹出框弹出前触发\n\n\nBI.YearMonthCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/date/year_quarter_combo.html":{"url":"detailed/date/year_quarter_combo.html","title":"year_quarter_combo","keywords":"","body":"year_quarter_combo\n年季度选择下拉框\nsource\nBI.createWidget({\n type: \"bi.year_quarter_combo\",\n width: 300\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nyearBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n\n\n\n\nmonthBehaviors\n自定义年份选择的行为(详见button_group)\nobject\n—\n{ }\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW\n弹出框弹出前触发\n\n\nBI.YearQuarterCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/date/custom_date_time.html":{"url":"detailed/date/custom_date_time.html","title":"custom_date_time","keywords":"","body":"custom_date_time\n日期选择下拉框(可以选择时分秒)\nsource\nBI.createWidget({\n type: \"bi.custom_date_time_combo\",\n element: \"#wrapper\",\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.CustomDateTimeCombo.EVENT_CANCEL\n点击取消触发\n\n\nBI.CustomDateTimeCombo.EVENT_CONFIRM\n点击确认触发\n\n\n\n\n"},"detailed/combo/single_tree_combo.html":{"url":"detailed/combo/single_tree_combo.html","title":"single_tree_combo","keywords":"","body":"bi.single_tree_combo\n二级树下拉框\nsource\nvar tree = BI.createWidget({\n type: \"bi.single_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\ntrigger\n下拉列表的弹出方式\nobject\n{}\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n事件\n\n\n\n事件\n说明\n\n\n\n\nBI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW\n下拉框弹出前触发\n\n\n\n其他事件详见Input\n\n"},"detailed/combo/multilayer_single_tree_combo.html":{"url":"detailed/combo/multilayer_single_tree_combo.html","title":"multilayer_single_tree_combo","keywords":"","body":"bi.multilayer_single_tree_combo\n多层级下拉单选树\nsource\nvar tree = BI.createWidget({\n type: \"bi.multilayer_single_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitemsCreator\n元素创造器\nfunction\nBI.emptyFn\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/combo/select_tree_combo.html":{"url":"detailed/combo/select_tree_combo.html","title":"select_tree_combo","keywords":"","body":"bi.select_tree_combo\n二级可选节点下拉框树\nsource\nvar tree = BI.createWidget({\n type: \"bi.select_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/combo/multilayer_select_tree_combo.html":{"url":"detailed/combo/multilayer_select_tree_combo.html","title":"multilayer_select_tree_combo","keywords":"","body":"bi.multilayer_select_tree_combo\n多层级下拉可选节点树\nsource\nvar tree = BI.createWidget({\n type: \"bi.multilayer_select_tree_combo\",\n element: 'body',\n items: [],\n text: \"默认值\",\n width: 300,\n});\n\n\n\n\n\n参数设置\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nheight\n高度\nnumber\n30\n\n\ntext\n文本框值\nstring\n''\n\n\nitems\n元素\narray\nnull\n\n\n\n方法\n\n\n\n方法名\n说明\n回调参数\n\n\n\n\npopulate\n刷新内容\nitems: 子项数组\n\n\nsetValue\n设置值\nsetValue\n\n\ngetValue\n获取值\ngetValue\n\n\n\n\n"},"detailed/path/path_chooser.html":{"url":"detailed/path/path_chooser.html","title":"path_chooser","keywords":"","body":"path_chooser\n路径选择\nsource\nBI.createWidget({\n type: \"bi.path_chooser\",\n element: \"#wrapper\",\n items: [[{\n \"region\": \"8c4460bc3605685e\",\n \"regionText\": \"采购订单XXX\",\n \"text\": \"ID\",\n \"value\": \"1\"\n }, {\n \"region\": \"0fbd0dc648f41e97\",\n \"regionText\": \"采购订单\",\n \"text\": \"学号\",\n \"value\": \"3\"\n }, {\n \"region\": \"c6d72d6c7e19a667\",\n \"regionText\": \"供应商基本信息\",\n \"text\": \"ID\",\n \"value\": \"5\"\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n二维数组,每个元素代表一条路径\narray\n—\n[ ]\n\n\n\n\n"},"detailed/path/direction_path_chooser.html":{"url":"detailed/path/direction_path_chooser.html","title":"direction_path_chooser","keywords":"","body":"direction_path_chooser\n带方向的路径选择\nsource\nBI.createWidget({\n type: \"bi.direction_path_chooser\",\n element: \"#wrapper\",\n items: [[{\n \"region\": \"合同信息\",\n \"text\": \"客户ID\",\n \"value\": \"defa1f7ba8b2684a客户ID\"\n }, {\n \"region\": \"客户信息\",\n \"text\": \"主键\",\n \"value\": \"1f4711c201ef1842\",\n \"direction\": -1\n }, {\n \"region\": \"合同的回款信息\",\n \"text\": \"合同ID\",\n \"value\": \"e351e9f1d8147947合同ID\",\n \"direction\": -1\n }]]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\nitems\n二维数组,每个元素代表一条路径,相较于path_chooser多一个属性direction来指定方向\narray\n—\n[ ]\n\n\n\n\n"},"detailed/relation_view.html":{"url":"detailed/relation_view.html","title":"relation_view","keywords":"","body":"relation_view\n关联视图\nsource\nBI.createWidget({\n type: \"bi.relation_view\",\n items: [{\n primary: {\n region: \"B\", regionText: \"比\",\n title: \"b2...\",\n value: \"b2\", text: \"b2字段\"\n },\n foreign: {region: \"C\", value: \"c1\", text: \"c1字段\"}\n }, {\n primary: {region: \"A\", value: \"a1\", text: \"a1字段\"},\n foreign: {region: \"C\", value: \"c2\", text: \"c2字段\"}\n }]\n});\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\n\n\n\n\n\n"},"detailed/dialog.html":{"url":"detailed/dialog.html","title":"dialog","keywords":"","body":"dialog\n对话框\nsource\nBI.Msg.alert(title, content)\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n可选值\n默认值\n\n\n\n\ntitle\n对话框标题\nstring\n—\n\" \"\n\n\ncontent\n对话框内容\nstring\n—\n\" \"\n\n\n\n\n"},"detailed/file_manager.html":{"url":"detailed/file_manager.html","title":"file_manager","keywords":"","body":"file_manager\n文件管理器\nsource\nBI.createWidget({\n type: \"bi.file_manager\",\n items: [{\n id: \"1\",\n value: \"1\",\n text: \"根目录\"\n }, {\n id: \"11\",\n pId: \"1\",\n value: \"11\",\n text: \"第一级子目录1\"\n }, {\n id: \"12\",\n pId: \"1\",\n value: \"12\",\n text: \"第一级子目录2\"\n }]\n})\n\n\n\n\n\n方法\n\n\n\n方法\n说明\n\n\n\n\ngetSelectedValue()\n获取当前选中项的value值\n\n\ngetSelectedId\n获取当前选中项的id属性\n\n\n\n\n"},"detailed/slider.html":{"url":"detailed/slider.html","title":"slider","keywords":"","body":"bi.slider\nslider插件\nsource\nBI.createWidget({\n type: \"bi.slider\",\n min: 16,\n max: 50,\n});\n\n\n\n\n\n参数\n\n\n\n参数\n说明\n类型\n默认值\n\n\n\n\nmin\n最小值\nnumber\n10\n\n\nmax\n最大值\nnumber\n50\n\n\n\n方法\n\n\n\n方法名\n说明\n参数\n\n\n\n\ngetValue\n获得当前值\n—\n\n\nsetValue\n设置当前值\nvalue\n\n\n\n\n\n\n\n\n"}}} \ No newline at end of file From e737b8a876d47e8cf2f9023ed2f4b8bb7bce9f30 Mon Sep 17 00:00:00 2001 From: Urthur Date: Tue, 12 Sep 2017 19:33:57 +0800 Subject: [PATCH 13/14] =?UTF-8?q?slider=20=E6=B2=A1=E6=9C=89=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/slider.js | 273 +++++++++++++++++ demo/js/widget/slider/demo.slider.js | 25 +- dist/slider.js | 273 +++++++++++++++++ .../slider/singleslider/singleslider.label.js | 274 ++++++++++++++++++ 4 files changed, 842 insertions(+), 3 deletions(-) create mode 100644 src/addons/slider/singleslider/singleslider.label.js diff --git a/bi/slider.js b/bi/slider.js index 4bcc063db..c2b2f9e5a 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -321,6 +321,279 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); BI.SingleSlider.EVENT_CHANGE = "EVENT_CHANGE"; BI.shortcut("bi.single_slider", BI.SingleSlider);/** + * Created by Urthur on 2017/9/12. + */ +BI.SingleSliderLabel = BI.inherit(BI.Widget, { + _constant: { + EDITOR_WIDTH: 90, + EDITOR_HEIGHT: 30, + HEIGHT: 28, + SLIDER_WIDTH_HALF: 15, + SLIDER_WIDTH: 30, + SLIDER_HEIGHT: 30, + TRACK_HEIGHT: 24 + }, + _defaultConfig: function () { + return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-single-slider bi-slider-track", + digit: "", + unit: "" + }); + }, + _init: function () { + BI.SingleSliderLabel.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; + var c = this._constant; + this.enable = false; + this.value = ""; + + this.grayTrack = BI.createWidget({ + type: "bi.layout", + cls: "gray-track", + height: 6 + }); + this.blueTrack = BI.createWidget({ + type: "bi.layout", + cls: "blue-track bi-high-light-background", + height: 6 + }); + this.track = this._createTrackWrapper(); + + this.slider = BI.createWidget({ + type: "bi.single_slider_button" + }); + this.slider.element.draggable({ + axis: "x", + containment: this.grayTrack.element, + scroll: false, + drag: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 + self._setBlueTrack(significantPercent); + self._setLabelPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + }, + stop: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setSliderPosition(significantPercent); + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + var sliderVertical = BI.createWidget({ + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.slider] + }], + hgap: c.SLIDER_WIDTH_HALF, + height: c.SLIDER_HEIGHT + }); + sliderVertical.element.click(function (e) { + if (self.enable) { + var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; + var trackLength = self.track.element[0].scrollWidth; + var percent = 0; + if (offset < 0) { + percent = 0 + } + if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { + percent = offset * 100 / self._getGrayTrackLength(); + } + if (offset > (trackLength - c.SLIDER_WIDTH)) { + percent = 100 + } + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + this.label = BI.createWidget({ + type: "bi.label", + height: c.HEIGHT, + width: c.EDITOR_WIDTH - 2 + }); + + this._setVisible(false); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.track, + width: "100%", + height: c.TRACK_HEIGHT + }] + }], + hgap: 7, + height: c.TRACK_HEIGHT + }, + top: 33, + left: 0, + width: "100%" + }, { + el: sliderVertical, + top: 30, + left: 0, + width: "100%" + }, { + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.label] + }], + rgap: c.EDITOR_WIDTH, + height: c.EDITOR_HEIGHT + }, + top: 10, + left: 0, + width: "100%" + }] + }) + }, + + _createTrackWrapper: function () { + return BI.createWidget({ + type: "bi.absolute", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.grayTrack, + top: 0, + left: 0, + width: "100%" + }, { + el: this.blueTrack, + top: 0, + left: 0, + width: "0%" + }] + }], + hgap: 8, + height: 8 + }, + top: 8, + left: 0, + width: "100%" + }] + }) + }, + + _checkValidation: function (v) { + return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max) + }, + + _setBlueTrack: function (percent) { + this.blueTrack.element.css({"width": percent + "%"}); + }, + + _setLabelPosition: function (percent) { + this.label.element.css({"left": percent + "%"}); + }, + + _setSliderPosition: function (percent) { + this.slider.element.css({"left": percent + "%"}); + }, + + _setAllPosition: function (percent) { + this._setSliderPosition(percent); + this._setLabelPosition(percent); + this._setBlueTrack(percent); + }, + + _setVisible: function (visible) { + this.slider.setVisible(visible); + this.label.setVisible(visible); + }, + + _getGrayTrackLength: function () { + return this.grayTrack.element[0].scrollWidth + }, + + _getValueByPercent: function (percent) { + var thousandth = BI.parseInt(percent * 10); + return (((this.max - this.min) * thousandth) / 1000 + this.min); + }, + + _getPercentByValue: function (v) { + return (v - this.min) * 100 / (this.max - this.min); + }, + + getValue: function () { + return this.value; + }, + + setValue: function (v) { + var o = this.options; + var digitExist = (o.digit === "") ? false : true; + var value = BI.parseFloat(v); + value = digitExist ? value.toFixed(o.digit) : value; + if ((!isNaN(value))) { + if (this._checkValidation(value)) { + this.value = value; + } + if (value > this.max) { + this.value = this.max; + } + if (value < this.min) { + this.value = this.min; + } + } + }, + + setMinAndMax: function (v) { + var minNumber = BI.parseFloat(v.min); + var maxNumber = BI.parseFloat(v.max); + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { + this.min = minNumber; + this.max = maxNumber; + } + }, + + reset: function () { + this._setVisible(false); + this.enable = false; + this.value = ""; + this.min = 0; + this.max = 0; + this._setBlueTrack(0); + }, + + populate: function () { + var o = this.options; + if (!isNaN(this.min) && !isNaN(this.max)) { + this._setVisible(true); + this.enable = true; + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { + this.label.setValue(this.value + o.unit); + this._setAllPosition(this._getPercentByValue(this.value)); + } else { + this.label.setValue(this.max + o.unit); + this._setAllPosition(100); + } + } + } +}); +BI.SingleSliderLabel.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.single_slider_label", BI.SingleSliderLabel);/** * normal single slider * Created by Young on 2017/6/21. */ diff --git a/demo/js/widget/slider/demo.slider.js b/demo/js/widget/slider/demo.slider.js index fce9ad3b2..d049db3fa 100644 --- a/demo/js/widget/slider/demo.slider.js +++ b/demo/js/widget/slider/demo.slider.js @@ -30,19 +30,30 @@ Demo.Slider = BI.inherit(BI.Widget, { console.log(this.getValue()); }); + var singleSliderLabel = BI.createWidget({ + type: "bi.single_slider_label", + height: 30, + width: 300, + digit: 0, + unit: "个" + }); + singleSliderLabel.setMinAndMax({ + min: 0, + max: 100 + }); + singleSliderLabel.setValue(10); + singleSliderLabel.populate(); + var normalSingleSlider = BI.createWidget({ type: "bi.single_slider_normal", height: 30, width: 300 }); - normalSingleSlider.setMinAndMax({ min: 0, max: 100 }); - normalSingleSlider.setValue(10); - normalSingleSlider.populate(); BI.createWidget({ @@ -64,6 +75,14 @@ Demo.Slider = BI.inherit(BI.Widget, { }] }, height: 200 + }, { + el: { + type: "bi.center_adapt", + items: [{ + el: singleSliderLabel + }] + }, + height: 200 }], hgap: 20 }); diff --git a/dist/slider.js b/dist/slider.js index 4bcc063db..c2b2f9e5a 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -321,6 +321,279 @@ BI.SingleSlider = BI.inherit(BI.Widget, { }); BI.SingleSlider.EVENT_CHANGE = "EVENT_CHANGE"; BI.shortcut("bi.single_slider", BI.SingleSlider);/** + * Created by Urthur on 2017/9/12. + */ +BI.SingleSliderLabel = BI.inherit(BI.Widget, { + _constant: { + EDITOR_WIDTH: 90, + EDITOR_HEIGHT: 30, + HEIGHT: 28, + SLIDER_WIDTH_HALF: 15, + SLIDER_WIDTH: 30, + SLIDER_HEIGHT: 30, + TRACK_HEIGHT: 24 + }, + _defaultConfig: function () { + return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-single-slider bi-slider-track", + digit: "", + unit: "" + }); + }, + _init: function () { + BI.SingleSliderLabel.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; + var c = this._constant; + this.enable = false; + this.value = ""; + + this.grayTrack = BI.createWidget({ + type: "bi.layout", + cls: "gray-track", + height: 6 + }); + this.blueTrack = BI.createWidget({ + type: "bi.layout", + cls: "blue-track bi-high-light-background", + height: 6 + }); + this.track = this._createTrackWrapper(); + + this.slider = BI.createWidget({ + type: "bi.single_slider_button" + }); + this.slider.element.draggable({ + axis: "x", + containment: this.grayTrack.element, + scroll: false, + drag: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 + self._setBlueTrack(significantPercent); + self._setLabelPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + }, + stop: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setSliderPosition(significantPercent); + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + var sliderVertical = BI.createWidget({ + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.slider] + }], + hgap: c.SLIDER_WIDTH_HALF, + height: c.SLIDER_HEIGHT + }); + sliderVertical.element.click(function (e) { + if (self.enable) { + var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; + var trackLength = self.track.element[0].scrollWidth; + var percent = 0; + if (offset < 0) { + percent = 0 + } + if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { + percent = offset * 100 / self._getGrayTrackLength(); + } + if (offset > (trackLength - c.SLIDER_WIDTH)) { + percent = 100 + } + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + this.label = BI.createWidget({ + type: "bi.label", + height: c.HEIGHT, + width: c.EDITOR_WIDTH - 2 + }); + + this._setVisible(false); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.track, + width: "100%", + height: c.TRACK_HEIGHT + }] + }], + hgap: 7, + height: c.TRACK_HEIGHT + }, + top: 33, + left: 0, + width: "100%" + }, { + el: sliderVertical, + top: 30, + left: 0, + width: "100%" + }, { + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.label] + }], + rgap: c.EDITOR_WIDTH, + height: c.EDITOR_HEIGHT + }, + top: 10, + left: 0, + width: "100%" + }] + }) + }, + + _createTrackWrapper: function () { + return BI.createWidget({ + type: "bi.absolute", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.grayTrack, + top: 0, + left: 0, + width: "100%" + }, { + el: this.blueTrack, + top: 0, + left: 0, + width: "0%" + }] + }], + hgap: 8, + height: 8 + }, + top: 8, + left: 0, + width: "100%" + }] + }) + }, + + _checkValidation: function (v) { + return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max) + }, + + _setBlueTrack: function (percent) { + this.blueTrack.element.css({"width": percent + "%"}); + }, + + _setLabelPosition: function (percent) { + this.label.element.css({"left": percent + "%"}); + }, + + _setSliderPosition: function (percent) { + this.slider.element.css({"left": percent + "%"}); + }, + + _setAllPosition: function (percent) { + this._setSliderPosition(percent); + this._setLabelPosition(percent); + this._setBlueTrack(percent); + }, + + _setVisible: function (visible) { + this.slider.setVisible(visible); + this.label.setVisible(visible); + }, + + _getGrayTrackLength: function () { + return this.grayTrack.element[0].scrollWidth + }, + + _getValueByPercent: function (percent) { + var thousandth = BI.parseInt(percent * 10); + return (((this.max - this.min) * thousandth) / 1000 + this.min); + }, + + _getPercentByValue: function (v) { + return (v - this.min) * 100 / (this.max - this.min); + }, + + getValue: function () { + return this.value; + }, + + setValue: function (v) { + var o = this.options; + var digitExist = (o.digit === "") ? false : true; + var value = BI.parseFloat(v); + value = digitExist ? value.toFixed(o.digit) : value; + if ((!isNaN(value))) { + if (this._checkValidation(value)) { + this.value = value; + } + if (value > this.max) { + this.value = this.max; + } + if (value < this.min) { + this.value = this.min; + } + } + }, + + setMinAndMax: function (v) { + var minNumber = BI.parseFloat(v.min); + var maxNumber = BI.parseFloat(v.max); + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { + this.min = minNumber; + this.max = maxNumber; + } + }, + + reset: function () { + this._setVisible(false); + this.enable = false; + this.value = ""; + this.min = 0; + this.max = 0; + this._setBlueTrack(0); + }, + + populate: function () { + var o = this.options; + if (!isNaN(this.min) && !isNaN(this.max)) { + this._setVisible(true); + this.enable = true; + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { + this.label.setValue(this.value + o.unit); + this._setAllPosition(this._getPercentByValue(this.value)); + } else { + this.label.setValue(this.max + o.unit); + this._setAllPosition(100); + } + } + } +}); +BI.SingleSliderLabel.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.single_slider_label", BI.SingleSliderLabel);/** * normal single slider * Created by Young on 2017/6/21. */ diff --git a/src/addons/slider/singleslider/singleslider.label.js b/src/addons/slider/singleslider/singleslider.label.js new file mode 100644 index 000000000..472cb1a66 --- /dev/null +++ b/src/addons/slider/singleslider/singleslider.label.js @@ -0,0 +1,274 @@ +/** + * Created by Urthur on 2017/9/12. + */ +BI.SingleSliderLabel = BI.inherit(BI.Widget, { + _constant: { + EDITOR_WIDTH: 90, + EDITOR_HEIGHT: 30, + HEIGHT: 28, + SLIDER_WIDTH_HALF: 15, + SLIDER_WIDTH: 30, + SLIDER_HEIGHT: 30, + TRACK_HEIGHT: 24 + }, + _defaultConfig: function () { + return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-single-slider bi-slider-track", + digit: "", + unit: "" + }); + }, + _init: function () { + BI.SingleSliderLabel.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + var digitExist = (o.digit === "") ? false : true; + var c = this._constant; + this.enable = false; + this.value = ""; + + this.grayTrack = BI.createWidget({ + type: "bi.layout", + cls: "gray-track", + height: 6 + }); + this.blueTrack = BI.createWidget({ + type: "bi.layout", + cls: "blue-track bi-high-light-background", + height: 6 + }); + this.track = this._createTrackWrapper(); + + this.slider = BI.createWidget({ + type: "bi.single_slider_button" + }); + this.slider.element.draggable({ + axis: "x", + containment: this.grayTrack.element, + scroll: false, + drag: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1));//直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。 + self._setBlueTrack(significantPercent); + self._setLabelPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + }, + stop: function (e, ui) { + var percent = (ui.position.left) * 100 / (self._getGrayTrackLength()); + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setSliderPosition(significantPercent); + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + var sliderVertical = BI.createWidget({ + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.slider] + }], + hgap: c.SLIDER_WIDTH_HALF, + height: c.SLIDER_HEIGHT + }); + sliderVertical.element.click(function (e) { + if (self.enable) { + var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF; + var trackLength = self.track.element[0].scrollWidth; + var percent = 0; + if (offset < 0) { + percent = 0 + } + if (offset > 0 && offset < (trackLength - c.SLIDER_WIDTH)) { + percent = offset * 100 / self._getGrayTrackLength(); + } + if (offset > (trackLength - c.SLIDER_WIDTH)) { + percent = 100 + } + var significantPercent = BI.parseFloat(percent.toFixed(1)); + self._setAllPosition(significantPercent); + var v = self._getValueByPercent(significantPercent); + v = digitExist ? v.toFixed(o.digit) : v; + self.label.setText(v + o.unit); + self.value = v; + self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); + } + }); + this.label = BI.createWidget({ + type: "bi.label", + height: c.HEIGHT, + width: c.EDITOR_WIDTH - 2 + }); + + this._setVisible(false); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.track, + width: "100%", + height: c.TRACK_HEIGHT + }] + }], + hgap: 7, + height: c.TRACK_HEIGHT + }, + top: 33, + left: 0, + width: "100%" + }, { + el: sliderVertical, + top: 30, + left: 0, + width: "100%" + }, { + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [this.label] + }], + rgap: c.EDITOR_WIDTH, + height: c.EDITOR_HEIGHT + }, + top: 10, + left: 0, + width: "100%" + }] + }) + }, + + _createTrackWrapper: function () { + return BI.createWidget({ + type: "bi.absolute", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "bi.absolute", + items: [{ + el: this.grayTrack, + top: 0, + left: 0, + width: "100%" + }, { + el: this.blueTrack, + top: 0, + left: 0, + width: "0%" + }] + }], + hgap: 8, + height: 8 + }, + top: 8, + left: 0, + width: "100%" + }] + }) + }, + + _checkValidation: function (v) { + return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max) + }, + + _setBlueTrack: function (percent) { + this.blueTrack.element.css({"width": percent + "%"}); + }, + + _setLabelPosition: function (percent) { + this.label.element.css({"left": percent + "%"}); + }, + + _setSliderPosition: function (percent) { + this.slider.element.css({"left": percent + "%"}); + }, + + _setAllPosition: function (percent) { + this._setSliderPosition(percent); + this._setLabelPosition(percent); + this._setBlueTrack(percent); + }, + + _setVisible: function (visible) { + this.slider.setVisible(visible); + this.label.setVisible(visible); + }, + + _getGrayTrackLength: function () { + return this.grayTrack.element[0].scrollWidth + }, + + _getValueByPercent: function (percent) { + var thousandth = BI.parseInt(percent * 10); + return (((this.max - this.min) * thousandth) / 1000 + this.min); + }, + + _getPercentByValue: function (v) { + return (v - this.min) * 100 / (this.max - this.min); + }, + + getValue: function () { + return this.value; + }, + + setValue: function (v) { + var o = this.options; + var digitExist = (o.digit === "") ? false : true; + var value = BI.parseFloat(v); + value = digitExist ? value.toFixed(o.digit) : value; + if ((!isNaN(value))) { + if (this._checkValidation(value)) { + this.value = value; + } + if (value > this.max) { + this.value = this.max; + } + if (value < this.min) { + this.value = this.min; + } + } + }, + + setMinAndMax: function (v) { + var minNumber = BI.parseFloat(v.min); + var maxNumber = BI.parseFloat(v.max); + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { + this.min = minNumber; + this.max = maxNumber; + } + }, + + reset: function () { + this._setVisible(false); + this.enable = false; + this.value = ""; + this.min = 0; + this.max = 0; + this._setBlueTrack(0); + }, + + populate: function () { + var o = this.options; + if (!isNaN(this.min) && !isNaN(this.max)) { + this._setVisible(true); + this.enable = true; + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { + this.label.setValue(this.value + o.unit); + this._setAllPosition(this._getPercentByValue(this.value)); + } else { + this.label.setValue(this.max + o.unit); + this._setAllPosition(100); + } + } + } +}); +BI.SingleSliderLabel.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.single_slider_label", BI.SingleSliderLabel); \ No newline at end of file From 00e4569280d247061be928d42e131f06def51876 Mon Sep 17 00:00:00 2001 From: Urthur Date: Tue, 12 Sep 2017 19:49:05 +0800 Subject: [PATCH 14/14] update --- bi/base.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/bi/base.js b/bi/base.js index dcf07f9dd..e7cb34fd4 100644 --- a/bi/base.js +++ b/bi/base.js @@ -3024,6 +3024,9 @@ BI.Combo = BI.inherit(BI.Widget, { var debounce = BI.debounce(function (e) { if (self.combo.element.__isMouseInBounds__(e)) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (!o.toggle && self.isViewVisible()) { + return; + } o.toggle ? self._toggle() : self._popupView(); if (self.isViewVisible()) { self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); @@ -3040,6 +3043,33 @@ BI.Combo = BI.inherit(BI.Widget, { st(e); }); break; + case "click-hover": + var debounce = BI.debounce(function (e) { + if (self.combo.element.__isMouseInBounds__(e)) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { + if (self.isViewVisible()) { + return; + } + self._popupView(); + if (self.isViewVisible()) { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + } + } + }, BI.EVENT_RESPONSE_TIME, true); + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { + debounce(e); + st(e); + }); + self.element.on("mouseleave." + self.getName(), function (e) { + if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { + self._hideView(); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); + self.fireEvent(BI.Combo.EVENT_COLLAPSE); + } + }); + break; } }); },